This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
question about AltiVec builtins
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: gcc at gcc dot gnu dot org, aldyh at redhat dot com
- Date: Mon, 10 May 2004 17:28:44 -0700
- Subject: question about AltiVec builtins
Do scalar parameters to AltiVec builtins need to have exactly the same
type as the prototype, or promotion rules apply? This test case fails
for all invocations of vec_dst where the second parameter is not 'int',
with gcc built from today's mainline:
#include <altivec.h>
vector int vi = { 1, 2, 3, 4 };
int
main ()
{
unsigned long ul = 2;
signed long sl = 2;
unsigned int ui = 2;
signed int si = 2;
vec_dst (&vi, ul, 0);
vec_dst (&vi, sl, 0);
vec_dst (&vi, ui, 0);
vec_dst (&vi, si, 0);
return 0;
}
dufur% $GCC -maltivec -c bug.c
bug.c: In function `main':
bug.c:13: error: invalid parameter combination for `vec_dst' AltiVec intrinsic
bug.c:14: error: invalid parameter combination for `vec_dst' AltiVec intrinsic
bug.c:15: error: invalid parameter combination for `vec_dst' AltiVec intrinsic
Janis