altivec: altivec.h
Aldy Hernandez
aldyh@redhat.com
Tue Apr 23 00:31:00 GMT 2002
*sigh* more of the same
vec_ctu() needed a cast. fixed.
and the parenthesizing patch from alan matsuoka was causing syntax errors
with jason's vector literal patch with parentheses. so i fixed vec_step()
to remove the extraneous parentheses.
committed as obvious to branch and trunk.
have i mentioned we need proper function overloading in C?
2002-04-23 Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/altivec.h (vec_step): Remove extraneous
parentheses.
(vec_ctu): Cast return.
Index: config/rs6000/altivec.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/altivec.h,v
retrieving revision 1.16
diff -c -p -r1.16 altivec.h
*** config/rs6000/altivec.h 22 Apr 2002 06:39:02 -0000 1.16
--- config/rs6000/altivec.h 23 Apr 2002 07:27:09 -0000
*************** struct __vec_step_help<vector float>
*** 4233,4245 ****
__altivec_link_error_invalid_argument ())))
#define vec_step(t) \
! __ch (__builtin_types_compatible_p ((t), vector signed int), 4, \
! __ch (__builtin_types_compatible_p ((t), vector unsigned int), 4, \
! __ch (__builtin_types_compatible_p ((t), vector signed short), 8, \
! __ch (__builtin_types_compatible_p ((t), vector unsigned short), 8, \
! __ch (__builtin_types_compatible_p ((t), vector signed char), 16, \
! __ch (__builtin_types_compatible_p ((t), vector unsigned char), 16, \
! __ch (__builtin_types_compatible_p ((t), vector float), 4, \
__altivec_link_error_invalid_argument ())))))))
#define vec_add(a1, a2) \
--- 4233,4245 ----
__altivec_link_error_invalid_argument ())))
#define vec_step(t) \
! __ch (__builtin_types_compatible_p (t, vector signed int), 4, \
! __ch (__builtin_types_compatible_p (t, vector unsigned int), 4, \
! __ch (__builtin_types_compatible_p (t, vector signed short), 8, \
! __ch (__builtin_types_compatible_p (t, vector unsigned short), 8, \
! __ch (__builtin_types_compatible_p (t, vector signed char), 16, \
! __ch (__builtin_types_compatible_p (t, vector unsigned char), 16, \
! __ch (__builtin_types_compatible_p (t, vector float), 4, \
__altivec_link_error_invalid_argument ())))))))
#define vec_add(a1, a2) \
*************** __ch (__bin_args_eq (vector signed int,
*** 4477,4483 ****
#define vec_cts(a1, a2) __builtin_altivec_vctsxs ((a1), (a2))
! #define vec_ctu(a1, a2) __builtin_altivec_vctuxs ((a1), (a2))
#define vec_dss(a1) __builtin_altivec_dss ((a1))
--- 4477,4483 ----
#define vec_cts(a1, a2) __builtin_altivec_vctsxs ((a1), (a2))
! #define vec_ctu(a1, a2) (vector unsigned int) __builtin_altivec_vctuxs ((a1), (a2))
#define vec_dss(a1) __builtin_altivec_dss ((a1))
More information about the Gcc-patches
mailing list