question about AltiVec builtins
Janis Johnson
janis187@us.ibm.com
Tue May 11 00:28:00 GMT 2004
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
More information about the Gcc
mailing list