diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0cf656b85eb..d395b031176 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-12-18 Aldy Hernandez + + * config/rs6000/altivec.h (vec_cmplt macro): Reverse arguments in + macro. + (vec_cmplt C++ functions): Reverse arguments. + 2002-11-18 Geoffrey Keating * config/rs6000/t-rs6000: Move contents to t-fprules, diff --git a/gcc/config/rs6000/altivec.h b/gcc/config/rs6000/altivec.h index f1387c0c898..1e2d8c8d408 100644 --- a/gcc/config/rs6000/altivec.h +++ b/gcc/config/rs6000/altivec.h @@ -1102,43 +1102,43 @@ vec_cmple (vector float a1, vector float a2) inline vector signed char vec_cmplt (vector unsigned char a1, vector unsigned char a2) { - return (vector signed char) __builtin_altivec_vcmpgtub ((vector signed char) a1, (vector signed char) a2); + return (vector signed char) __builtin_altivec_vcmpgtub ((vector signed char) a2, (vector signed char) a1); } inline vector signed char vec_cmplt (vector signed char a1, vector signed char a2) { - return (vector signed char) __builtin_altivec_vcmpgtsb ((vector signed char) a1, (vector signed char) a2); + return (vector signed char) __builtin_altivec_vcmpgtsb ((vector signed char) a2, (vector signed char) a1); } inline vector signed short vec_cmplt (vector unsigned short a1, vector unsigned short a2) { - return (vector signed short) __builtin_altivec_vcmpgtuh ((vector signed short) a1, (vector signed short) a2); + return (vector signed short) __builtin_altivec_vcmpgtuh ((vector signed short) a2, (vector signed short) a1); } inline vector signed short vec_cmplt (vector signed short a1, vector signed short a2) { - return (vector signed short) __builtin_altivec_vcmpgtsh ((vector signed short) a1, (vector signed short) a2); + return (vector signed short) __builtin_altivec_vcmpgtsh ((vector signed short) a2, (vector signed short) a1); } inline vector signed int vec_cmplt (vector unsigned int a1, vector unsigned int a2) { - return (vector signed int) __builtin_altivec_vcmpgtuw ((vector signed int) a1, (vector signed int) a2); + return (vector signed int) __builtin_altivec_vcmpgtuw ((vector signed int) a2, (vector signed int) a1); } inline vector signed int vec_cmplt (vector signed int a1, vector signed int a2) { - return (vector signed int) __builtin_altivec_vcmpgtsw ((vector signed int) a1, (vector signed int) a2); + return (vector signed int) __builtin_altivec_vcmpgtsw ((vector signed int) a2, (vector signed int) a1); } inline vector signed int vec_cmplt (vector float a1, vector float a2) { - return (vector signed int) __builtin_altivec_vcmpgtfp ((vector float) a1, (vector float) a2); + return (vector signed int) __builtin_altivec_vcmpgtfp ((vector float) a2, (vector float) a1); } /* vec_ctf */ @@ -6523,7 +6523,7 @@ __ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ #define vec_cmple(a1, a2) __builtin_altivec_vcmpgefp ((a1), (a2)) -#define vec_cmplt(a1, a2) \ +#define vec_cmplt(a2, a1) \ __ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \ ((vector signed char) __builtin_altivec_vcmpgtub ((vector signed char) (a1), (vector signed char) (a2))), \ __ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \