13 #error "AltiVec support not enabled" 19 #define __CR6_EQ_REV 1 21 #define __CR6_LT_REV 3 24 #define __VEC_CLASS_FP_SUBNORMAL_N (1 << 0) 25 #define __VEC_CLASS_FP_SUBNORMAL_P (1 << 1) 26 #define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \ 27 __VEC_CLASS_FP_SUBNORMAL_N) 28 #define __VEC_CLASS_FP_ZERO_N (1<<2) 29 #define __VEC_CLASS_FP_ZERO_P (1<<3) 30 #define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | \ 31 __VEC_CLASS_FP_ZERO_N) 32 #define __VEC_CLASS_FP_INFINITY_N (1<<4) 33 #define __VEC_CLASS_FP_INFINITY_P (1<<5) 34 #define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \ 35 __VEC_CLASS_FP_INFINITY_N) 36 #define __VEC_CLASS_FP_NAN (1<<6) 37 #define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \ 38 __VEC_CLASS_FP_SUBNORMAL | \ 39 __VEC_CLASS_FP_ZERO | \ 40 __VEC_CLASS_FP_INFINITY) 42 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__)) 44 #ifdef __POWER9_VECTOR__ 49 vector
signed char __a, vector
signed char __b, vector
unsigned char __c);
53 vector
unsigned char __c);
59 vector
signed short __b,
60 vector
unsigned char __c);
64 vector
unsigned char __c);
67 vector
bool short __a, vector
bool short __b, vector
unsigned char __c);
71 vector
unsigned char __c);
74 vector
signed int __b,
75 vector
unsigned char __c);
78 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned char __c);
85 vector
unsigned char __c);
90 vector
unsigned char __c);
93 vec_perm(vector
unsigned long long __a, vector
unsigned long long __b,
94 vector
unsigned char __c);
98 vector
unsigned char __c);
102 vector
unsigned char __c);
110 #define __builtin_altivec_abs_v16qi vec_abs 111 #define __builtin_altivec_abs_v8hi vec_abs 112 #define __builtin_altivec_abs_v4si vec_abs 116 return __builtin_altivec_vmaxsb(__a, -__a);
121 return __builtin_altivec_vmaxsh(__a, -__a);
126 return __builtin_altivec_vmaxsw(__a, -__a);
129 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 132 return __builtin_altivec_vmaxsd(__a, -__a);
138 return __builtin_vsx_xvabssp(__a);
140 vector
unsigned int __res =
141 (vector
unsigned int)__a & (vector
unsigned int)(0x7FFFFFFF);
142 return (vector
float)__res;
148 return __builtin_vsx_xvabsdp(__a);
153 #define __builtin_altivec_abss_v16qi vec_abss 154 #define __builtin_altivec_abss_v8hi vec_abss 155 #define __builtin_altivec_abss_v4si vec_abss 159 return __builtin_altivec_vmaxsb(
160 __a, __builtin_altivec_vsubsbs((vector
signed char)(0), __a));
165 return __builtin_altivec_vmaxsh(
166 __a, __builtin_altivec_vsubshs((vector
signed short)(0), __a));
171 return __builtin_altivec_vmaxsw(
172 __a, __builtin_altivec_vsubsws((vector
signed int)(0), __a));
176 #if defined(__POWER9_VECTOR__) 179 vec_absd(vector
unsigned char __a, vector
unsigned char __b) {
180 return __builtin_altivec_vabsdub(
__a, __b);
184 vec_absd(vector
unsigned short __a, vector
unsigned short __b) {
185 return __builtin_altivec_vabsduh(
__a, __b);
189 vec_absd(vector
unsigned int __a, vector
unsigned int __b) {
190 return __builtin_altivec_vabsduw(
__a, __b);
204 return (vector
signed char)__a +
__b;
209 return __a + (vector
signed char)__b;
219 return (vector
unsigned char)__a +
__b;
224 return __a + (vector
unsigned char)__b;
234 return (vector
short)__a +
__b;
238 vector
bool short __b) {
239 return __a + (vector short)__b;
249 return (vector
unsigned short)__a +
__b;
254 return __a + (vector
unsigned short)__b;
264 return (vector
int)__a +
__b;
268 vector
bool int __b) {
269 return __a + (vector int)__b;
279 return (vector
unsigned int)__a +
__b;
284 return __a + (vector
unsigned int)__b;
287 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 289 vec_add(vector
signed long long __a, vector
signed long long __b) {
293 static __inline__ vector
unsigned long long __ATTRS_o_ai 294 vec_add(vector
unsigned long long __a, vector
unsigned long long __b) {
299 vec_add(vector
signed __int128
__a, vector
signed __int128
__b) {
304 vec_add(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
307 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 323 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 326 vector
signed __int128
__c) {
327 return __builtin_altivec_vaddeuqm(
__a,
__b, __c);
331 vec_adde(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
332 vector
unsigned __int128
__c) {
333 return __builtin_altivec_vaddeuqm(
__a,
__b, __c);
339 vector
signed int __c) {
340 vector
signed int __mask = {1, 1, 1, 1};
341 vector
signed int __carry = __c & __mask;
347 vector
unsigned int __c) {
348 vector
unsigned int __mask = {1, 1, 1, 1};
349 vector
unsigned int __carry = __c & __mask;
355 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 357 vec_addec(vector
signed __int128
__a, vector
signed __int128
__b,
358 vector
signed __int128
__c) {
359 return __builtin_altivec_vaddecuq(
__a,
__b, __c);
363 vec_addec(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
364 vector
unsigned __int128
__c) {
365 return __builtin_altivec_vaddecuq(
__a,
__b, __c);
369 vec_addec(vector
signed int __a, vector
signed int __b,
370 vector
signed int __c) {
372 signed int __result[4];
373 for (
int i = 0; i < 4; i++) {
374 unsigned int __tempa = (
unsigned int)
__a[i];
375 unsigned int __tempb = (
unsigned int)
__b[i];
376 unsigned int __tempc = (
unsigned int) __c[i];
377 __tempc = __tempc & 0x00000001;
378 unsigned long long __longa = (
unsigned long long) __tempa;
379 unsigned long long __longb = (
unsigned long long) __tempb;
380 unsigned long long __longc = (
unsigned long long) __tempc;
381 unsigned long long __sum = __longa + __longb + __longc;
382 unsigned long long __res = (__sum >> 32) & 0x01;
383 unsigned long long __tempres = (
unsigned int) __res;
384 __result[i] = (
signed int) __tempres;
387 vector
signed int ret = { __result[0], __result[1], __result[2], __result[3] };
392 vec_addec(vector
unsigned int __a, vector
unsigned int __b,
393 vector
unsigned int __c) {
395 unsigned int __result[4];
396 for (
int i = 0; i < 4; i++) {
397 unsigned int __tempc = __c[i] & 1;
398 unsigned long long __longa = (
unsigned long long)
__a[i];
399 unsigned long long __longb = (
unsigned long long)
__b[i];
400 unsigned long long __longc = (
unsigned long long) __tempc;
401 unsigned long long __sum = __longa + __longb + __longc;
402 unsigned long long __res = (__sum >> 32) & 0x01;
403 unsigned long long __tempres = (
unsigned int) __res;
404 __result[i] = (
signed int) __tempres;
407 vector
unsigned int ret = { __result[0], __result[1], __result[2], __result[3] };
415 #define __builtin_altivec_vaddubm vec_vaddubm 424 return (vector
signed char)__a +
__b;
429 return __a + (vector
signed char)__b;
439 return (vector
unsigned char)__a +
__b;
444 return __a + (vector
unsigned char)__b;
449 #define __builtin_altivec_vadduhm vec_vadduhm 458 return (vector
short)__a +
__b;
462 vector
bool short __b) {
463 return __a + (vector short)__b;
473 return (vector
unsigned short)__a +
__b;
478 return __a + (vector
unsigned short)__b;
483 #define __builtin_altivec_vadduwm vec_vadduwm 492 return (vector
int)__a +
__b;
496 vector
bool int __b) {
497 return __a + (vector int)__b;
507 return (vector
unsigned int)__a +
__b;
512 return __a + (vector
unsigned int)__b;
517 #define __builtin_altivec_vaddfp vec_vaddfp 519 static __inline__ vector
float __attribute__((__always_inline__))
520 vec_vaddfp(vector
float __a, vector
float __b) {
528 return (vector
signed int)__builtin_altivec_vaddcuw((vector
unsigned int)__a,
529 (vector
unsigned int)__b);
534 return __builtin_altivec_vaddcuw(__a, __b);
537 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 539 vec_addc(vector
signed __int128
__a, vector
signed __int128
__b) {
540 return (vector
signed __int128)__builtin_altivec_vaddcuq(
541 (vector
unsigned __int128)__a, (vector
unsigned __int128)__b);
545 vec_addc(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
546 return __builtin_altivec_vaddcuq(__a, __b);
548 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 552 static __inline__ vector
unsigned int __attribute__((__always_inline__))
553 vec_vaddcuw(vector
unsigned int __a, vector
unsigned int __b) {
554 return __builtin_altivec_vaddcuw(__a, __b);
560 vec_adds(vector
signed char __a, vector
signed char __b) {
561 return __builtin_altivec_vaddsbs(__a, __b);
565 vec_adds(vector
bool char __a, vector
signed char __b) {
566 return __builtin_altivec_vaddsbs((vector
signed char)__a, __b);
570 vec_adds(vector
signed char __a, vector
bool char __b) {
571 return __builtin_altivec_vaddsbs(__a, (vector
signed char)__b);
575 vec_adds(vector
unsigned char __a, vector
unsigned char __b) {
576 return __builtin_altivec_vaddubs(__a, __b);
580 vec_adds(vector
bool char __a, vector
unsigned char __b) {
581 return __builtin_altivec_vaddubs((vector
unsigned char)__a, __b);
585 vec_adds(vector
unsigned char __a, vector
bool char __b) {
586 return __builtin_altivec_vaddubs(__a, (vector
unsigned char)__b);
591 return __builtin_altivec_vaddshs(__a, __b);
596 return __builtin_altivec_vaddshs((vector
short)__a, __b);
600 vector
bool short __b) {
601 return __builtin_altivec_vaddshs(__a, (vector
short)__b);
605 vec_adds(vector
unsigned short __a, vector
unsigned short __b) {
606 return __builtin_altivec_vadduhs(__a, __b);
610 vec_adds(vector
bool short __a, vector
unsigned short __b) {
611 return __builtin_altivec_vadduhs((vector
unsigned short)__a, __b);
615 vec_adds(vector
unsigned short __a, vector
bool short __b) {
616 return __builtin_altivec_vadduhs(__a, (vector
unsigned short)__b);
621 return __builtin_altivec_vaddsws(__a, __b);
626 return __builtin_altivec_vaddsws((vector
int)__a, __b);
630 vector
bool int __b) {
631 return __builtin_altivec_vaddsws(__a, (vector
int)__b);
635 vec_adds(vector
unsigned int __a, vector
unsigned int __b) {
636 return __builtin_altivec_vadduws(__a, __b);
640 vec_adds(vector
bool int __a, vector
unsigned int __b) {
641 return __builtin_altivec_vadduws((vector
unsigned int)__a, __b);
645 vec_adds(vector
unsigned int __a, vector
bool int __b) {
646 return __builtin_altivec_vadduws(__a, (vector
unsigned int)__b);
653 return __builtin_altivec_vaddsbs(__a, __b);
658 return __builtin_altivec_vaddsbs((vector
signed char)__a, __b);
663 return __builtin_altivec_vaddsbs(__a, (vector
signed char)__b);
670 return __builtin_altivec_vaddubs(__a, __b);
675 return __builtin_altivec_vaddubs((vector
unsigned char)__a, __b);
680 return __builtin_altivec_vaddubs(__a, (vector
unsigned char)__b);
687 return __builtin_altivec_vaddshs(__a, __b);
692 return __builtin_altivec_vaddshs((vector
short)__a, __b);
696 vector
bool short __b) {
697 return __builtin_altivec_vaddshs(__a, (vector
short)__b);
703 vec_vadduhs(vector
unsigned short __a, vector
unsigned short __b) {
704 return __builtin_altivec_vadduhs(__a, __b);
709 return __builtin_altivec_vadduhs((vector
unsigned short)__a, __b);
714 return __builtin_altivec_vadduhs(__a, (vector
unsigned short)__b);
721 return __builtin_altivec_vaddsws(__a, __b);
726 return __builtin_altivec_vaddsws((vector
int)__a, __b);
730 vector
bool int __b) {
731 return __builtin_altivec_vaddsws(__a, (vector
int)__b);
738 return __builtin_altivec_vadduws(__a, __b);
743 return __builtin_altivec_vadduws((vector
unsigned int)__a, __b);
748 return __builtin_altivec_vadduws(__a, (vector
unsigned int)__b);
751 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 755 vec_vadduqm(vector
signed __int128 __a, vector
signed __int128 __b) {
760 vec_vadduqm(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
767 vec_vaddeuqm(vector
signed __int128 __a, vector
signed __int128 __b,
768 vector
signed __int128
__c) {
769 return __builtin_altivec_vaddeuqm(__a, __b, __c);
773 vec_vaddeuqm(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
774 vector
unsigned __int128 __c) {
775 return __builtin_altivec_vaddeuqm(__a, __b, __c);
781 vec_vaddcuq(vector
signed __int128 __a, vector
signed __int128 __b) {
782 return __builtin_altivec_vaddcuq(__a, __b);
786 vec_vaddcuq(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
787 return __builtin_altivec_vaddcuq(__a, __b);
793 vec_vaddecuq(vector
signed __int128 __a, vector
signed __int128 __b,
794 vector
signed __int128 __c) {
795 return __builtin_altivec_vaddecuq(__a, __b, __c);
799 vec_vaddecuq(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
800 vector
unsigned __int128 __c) {
801 return __builtin_altivec_vaddecuq(__a, __b, __c);
803 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 807 #define __builtin_altivec_vand vec_and 810 vec_and(vector
signed char __a, vector
signed char __b) {
815 vec_and(vector
bool char __a, vector
signed char __b) {
816 return (vector
signed char)__a &
__b;
820 vec_and(vector
signed char __a, vector
bool char __b) {
821 return __a & (vector
signed char)__b;
825 vec_and(vector
unsigned char __a, vector
unsigned char __b) {
830 vec_and(vector
bool char __a, vector
unsigned char __b) {
831 return (vector
unsigned char)__a &
__b;
835 vec_and(vector
unsigned char __a, vector
bool char __b) {
836 return __a & (vector
unsigned char)__b;
840 vector
bool char __b) {
851 return (vector
short)__a &
__b;
855 vector
bool short __b) {
856 return __a & (vector short)__b;
860 vec_and(vector
unsigned short __a, vector
unsigned short __b) {
865 vec_and(vector
bool short __a, vector
unsigned short __b) {
866 return (vector
unsigned short)__a &
__b;
870 vec_and(vector
unsigned short __a, vector
bool short __b) {
871 return __a & (vector
unsigned short)__b;
875 vec_and(vector
bool short __a, vector
bool short __b) {
886 return (vector
int)__a &
__b;
890 vector
bool int __b) {
891 return __a & (vector int)__b;
895 vec_and(vector
unsigned int __a, vector
unsigned int __b) {
900 vec_and(vector
bool int __a, vector
unsigned int __b) {
901 return (vector
unsigned int)__a &
__b;
905 vec_and(vector
unsigned int __a, vector
bool int __b) {
906 return __a & (vector
unsigned int)__b;
910 vector
bool int __b) {
916 vector
unsigned int __res =
917 (vector
unsigned int)__a & (vector
unsigned int)
__b;
918 return (vector
float)__res;
923 vector
unsigned int __res =
924 (vector
unsigned int)__a & (vector
unsigned int)
__b;
925 return (vector
float)__res;
929 vector
bool int __b) {
930 vector
unsigned int __res =
931 (vector
unsigned int)__a & (vector
unsigned int)
__b;
932 return (vector
float)__res;
938 vector
unsigned long long __res =
939 (vector
unsigned long long)__a & (vector
unsigned long long)
__b;
940 return (vector
double)__res;
944 vec_and(vector
double __a, vector
bool long long __b) {
945 vector
unsigned long long __res =
946 (vector
unsigned long long)__a & (vector
unsigned long long)
__b;
947 return (vector
double)__res;
952 vector
unsigned long long __res =
953 (vector
unsigned long long)__a & (vector
unsigned long long)
__b;
954 return (vector
double)__res;
958 vec_and(vector
signed long long __a, vector
signed long long __b) {
963 vec_and(vector
bool long long __a, vector
signed long long __b) {
964 return (vector
signed long long)__a &
__b;
968 vec_and(vector
signed long long __a, vector
bool long long __b) {
969 return __a & (vector
signed long long)__b;
972 static __inline__ vector
unsigned long long __ATTRS_o_ai 973 vec_and(vector
unsigned long long __a, vector
unsigned long long __b) {
977 static __inline__ vector
unsigned long long __ATTRS_o_ai 978 vec_and(vector
bool long long __a, vector
unsigned long long __b) {
979 return (vector
unsigned long long)__a &
__b;
982 static __inline__ vector
unsigned long long __ATTRS_o_ai 983 vec_and(vector
unsigned long long __a, vector
bool long long __b) {
984 return __a & (vector
unsigned long long)__b;
988 vec_and(vector
bool long long __a, vector
bool long long __b) {
996 vec_vand(vector
signed char __a, vector
signed char __b) {
1001 vec_vand(vector
bool char __a, vector
signed char __b) {
1002 return (vector
signed char)__a &
__b;
1006 vec_vand(vector
signed char __a, vector
bool char __b) {
1007 return __a & (vector
signed char)__b;
1011 vec_vand(vector
unsigned char __a, vector
unsigned char __b) {
1016 vec_vand(vector
bool char __a, vector
unsigned char __b) {
1017 return (vector
unsigned char)__a &
__b;
1021 vec_vand(vector
unsigned char __a, vector
bool char __b) {
1022 return __a & (vector
unsigned char)__b;
1026 vector
bool char __b) {
1037 return (vector
short)__a &
__b;
1041 vector
bool short __b) {
1042 return __a & (vector short)__b;
1046 vec_vand(vector
unsigned short __a, vector
unsigned short __b) {
1051 vec_vand(vector
bool short __a, vector
unsigned short __b) {
1052 return (vector
unsigned short)__a &
__b;
1056 vec_vand(vector
unsigned short __a, vector
bool short __b) {
1057 return __a & (vector
unsigned short)__b;
1061 vec_vand(vector
bool short __a, vector
bool short __b) {
1072 return (vector
int)__a &
__b;
1076 vector
bool int __b) {
1077 return __a & (vector int)__b;
1081 vec_vand(vector
unsigned int __a, vector
unsigned int __b) {
1086 vec_vand(vector
bool int __a, vector
unsigned int __b) {
1087 return (vector
unsigned int)__a &
__b;
1091 vec_vand(vector
unsigned int __a, vector
bool int __b) {
1092 return __a & (vector
unsigned int)__b;
1096 vector
bool int __b) {
1102 vector
unsigned int __res =
1103 (vector
unsigned int)__a & (vector
unsigned int)
__b;
1104 return (vector
float)__res;
1109 vector
unsigned int __res =
1110 (vector
unsigned int)__a & (vector
unsigned int)
__b;
1111 return (vector
float)__res;
1115 vector
bool int __b) {
1116 vector
unsigned int __res =
1117 (vector
unsigned int)__a & (vector
unsigned int)
__b;
1118 return (vector
float)__res;
1123 vec_vand(vector
signed long long __a, vector
signed long long __b) {
1128 vec_vand(vector
bool long long __a, vector
signed long long __b) {
1129 return (vector
signed long long)__a &
__b;
1133 vec_vand(vector
signed long long __a, vector
bool long long __b) {
1134 return __a & (vector
signed long long)__b;
1137 static __inline__ vector
unsigned long long __ATTRS_o_ai 1138 vec_vand(vector
unsigned long long __a, vector
unsigned long long __b) {
1142 static __inline__ vector
unsigned long long __ATTRS_o_ai 1143 vec_vand(vector
bool long long __a, vector
unsigned long long __b) {
1144 return (vector
unsigned long long)__a &
__b;
1147 static __inline__ vector
unsigned long long __ATTRS_o_ai 1148 vec_vand(vector
unsigned long long __a, vector
bool long long __b) {
1149 return __a & (vector
unsigned long long)__b;
1153 vec_vand(vector
bool long long __a, vector
bool long long __b) {
1160 #define __builtin_altivec_vandc vec_andc 1163 vec_andc(vector
signed char __a, vector
signed char __b) {
1168 vec_andc(vector
bool char __a, vector
signed char __b) {
1169 return (vector
signed char)__a & ~__b;
1173 vec_andc(vector
signed char __a, vector
bool char __b) {
1174 return __a & ~(vector
signed char)__b;
1178 vec_andc(vector
unsigned char __a, vector
unsigned char __b) {
1183 vec_andc(vector
bool char __a, vector
unsigned char __b) {
1184 return (vector
unsigned char)__a & ~__b;
1188 vec_andc(vector
unsigned char __a, vector
bool char __b) {
1189 return __a & ~(vector
unsigned char)__b;
1193 vector
bool char __b) {
1204 return (vector
short)__a & ~__b;
1208 vector
bool short __b) {
1209 return __a & ~(vector short)__b;
1213 vec_andc(vector
unsigned short __a, vector
unsigned short __b) {
1218 vec_andc(vector
bool short __a, vector
unsigned short __b) {
1219 return (vector
unsigned short)__a & ~__b;
1223 vec_andc(vector
unsigned short __a, vector
bool short __b) {
1224 return __a & ~(vector
unsigned short)__b;
1228 vec_andc(vector
bool short __a, vector
bool short __b) {
1239 return (vector
int)__a & ~__b;
1243 vector
bool int __b) {
1244 return __a & ~(vector int)__b;
1248 vec_andc(vector
unsigned int __a, vector
unsigned int __b) {
1253 vec_andc(vector
bool int __a, vector
unsigned int __b) {
1254 return (vector
unsigned int)__a & ~__b;
1258 vec_andc(vector
unsigned int __a, vector
bool int __b) {
1259 return __a & ~(vector
unsigned int)__b;
1263 vector
bool int __b) {
1269 vector
unsigned int __res =
1270 (vector
unsigned int)__a & ~(vector
unsigned int)
__b;
1271 return (vector
float)__res;
1276 vector
unsigned int __res =
1277 (vector
unsigned int)__a & ~(vector
unsigned int)
__b;
1278 return (vector
float)__res;
1282 vector
bool int __b) {
1283 vector
unsigned int __res =
1284 (vector
unsigned int)__a & ~(vector
unsigned int)
__b;
1285 return (vector
float)__res;
1290 vector
double __b) {
1291 vector
unsigned long long __res =
1292 (vector
unsigned long long)__a & ~(vector
unsigned long long)
__b;
1293 return (vector
double)__res;
1297 vec_andc(vector
double __a, vector
bool long long __b) {
1298 vector
unsigned long long __res =
1299 (vector
unsigned long long)__a & ~(vector
unsigned long long)
__b;
1300 return (vector
double)__res;
1304 vector
double __b) {
1305 vector
unsigned long long __res =
1306 (vector
unsigned long long)__a & ~(vector
unsigned long long)
__b;
1307 return (vector
double)__res;
1311 vec_andc(vector
signed long long __a, vector
signed long long __b) {
1316 vec_andc(vector
bool long long __a, vector
signed long long __b) {
1317 return (vector
signed long long)__a & ~__b;
1321 vec_andc(vector
signed long long __a, vector
bool long long __b) {
1322 return __a & ~(vector
signed long long)__b;
1325 static __inline__ vector
unsigned long long __ATTRS_o_ai 1326 vec_andc(vector
unsigned long long __a, vector
unsigned long long __b) {
1330 static __inline__ vector
unsigned long long __ATTRS_o_ai 1331 vec_andc(vector
bool long long __a, vector
unsigned long long __b) {
1332 return (vector
unsigned long long)__a & ~__b;
1335 static __inline__ vector
unsigned long long __ATTRS_o_ai 1336 vec_andc(vector
unsigned long long __a, vector
bool long long __b) {
1337 return __a & ~(vector
unsigned long long)__b;
1341 vec_andc(vector
bool long long __a, vector
bool long long __b) {
1355 return (vector
signed char)__a & ~__b;
1360 return __a & ~(vector
signed char)__b;
1364 vec_vandc(vector
unsigned char __a, vector
unsigned char __b) {
1370 return (vector
unsigned char)__a & ~__b;
1375 return __a & ~(vector
unsigned char)__b;
1390 return (vector
short)__a & ~__b;
1394 vector
bool short __b) {
1395 return __a & ~(vector short)__b;
1399 vec_vandc(vector
unsigned short __a, vector
unsigned short __b) {
1404 vec_vandc(vector
bool short __a, vector
unsigned short __b) {
1405 return (vector
unsigned short)__a & ~__b;
1409 vec_vandc(vector
unsigned short __a, vector
bool short __b) {
1410 return __a & ~(vector
unsigned short)__b;
1425 return (vector
int)__a & ~__b;
1429 vector
bool int __b) {
1430 return __a & ~(vector int)__b;
1434 vec_vandc(vector
unsigned int __a, vector
unsigned int __b) {
1440 return (vector
unsigned int)__a & ~__b;
1445 return __a & ~(vector
unsigned int)__b;
1449 vector
bool int __b) {
1455 vector
unsigned int __res =
1456 (vector
unsigned int)__a & ~(vector
unsigned int)
__b;
1457 return (vector
float)__res;
1462 vector
unsigned int __res =
1463 (vector
unsigned int)__a & ~(vector
unsigned int)
__b;
1464 return (vector
float)__res;
1468 vector
bool int __b) {
1469 vector
unsigned int __res =
1470 (vector
unsigned int)__a & ~(vector
unsigned int)
__b;
1471 return (vector
float)__res;
1476 vec_vandc(vector
signed long long __a, vector
signed long long __b) {
1481 vec_vandc(vector
bool long long __a, vector
signed long long __b) {
1482 return (vector
signed long long)__a & ~__b;
1486 vec_vandc(vector
signed long long __a, vector
bool long long __b) {
1487 return __a & ~(vector
signed long long)__b;
1490 static __inline__ vector
unsigned long long __ATTRS_o_ai 1491 vec_vandc(vector
unsigned long long __a, vector
unsigned long long __b) {
1495 static __inline__ vector
unsigned long long __ATTRS_o_ai 1496 vec_vandc(vector
bool long long __a, vector
unsigned long long __b) {
1497 return (vector
unsigned long long)__a & ~__b;
1500 static __inline__ vector
unsigned long long __ATTRS_o_ai 1501 vec_vandc(vector
unsigned long long __a, vector
bool long long __b) {
1502 return __a & ~(vector
unsigned long long)__b;
1506 vec_vandc(vector
bool long long __a, vector
bool long long __b) {
1514 vec_avg(vector
signed char __a, vector
signed char __b) {
1515 return __builtin_altivec_vavgsb(__a, __b);
1519 vec_avg(vector
unsigned char __a, vector
unsigned char __b) {
1520 return __builtin_altivec_vavgub(__a, __b);
1525 return __builtin_altivec_vavgsh(__a, __b);
1529 vec_avg(vector
unsigned short __a, vector
unsigned short __b) {
1530 return __builtin_altivec_vavguh(__a, __b);
1535 return __builtin_altivec_vavgsw(__a, __b);
1539 vec_avg(vector
unsigned int __a, vector
unsigned int __b) {
1540 return __builtin_altivec_vavguw(__a, __b);
1545 static __inline__ vector
signed char __attribute__((__always_inline__))
1546 vec_vavgsb(vector
signed char __a, vector
signed char __b) {
1547 return __builtin_altivec_vavgsb(__a, __b);
1552 static __inline__ vector
unsigned char __attribute__((__always_inline__))
1553 vec_vavgub(vector
unsigned char __a, vector
unsigned char __b) {
1554 return __builtin_altivec_vavgub(__a, __b);
1559 static __inline__ vector
short __attribute__((__always_inline__))
1560 vec_vavgsh(vector
short __a, vector
short __b) {
1561 return __builtin_altivec_vavgsh(__a, __b);
1566 static __inline__ vector
unsigned short __attribute__((__always_inline__))
1567 vec_vavguh(vector
unsigned short __a, vector
unsigned short __b) {
1568 return __builtin_altivec_vavguh(__a, __b);
1573 static __inline__ vector
int __attribute__((__always_inline__))
1574 vec_vavgsw(vector
int __a, vector
int __b) {
1575 return __builtin_altivec_vavgsw(__a, __b);
1580 static __inline__ vector
unsigned int __attribute__((__always_inline__))
1581 vec_vavguw(vector
unsigned int __a, vector
unsigned int __b) {
1582 return __builtin_altivec_vavguw(__a, __b);
1589 return __builtin_vsx_xvrspip(__a);
1591 return __builtin_altivec_vrfip(__a);
1597 return __builtin_vsx_xvrdpip(__a);
1604 vec_vrfip(vector
float __a) {
1605 return __builtin_altivec_vrfip(__a);
1610 static __inline__ vector
int __attribute__((__always_inline__))
1611 vec_cmpb(vector
float __a, vector
float __b) {
1612 return __builtin_altivec_vcmpbfp(__a, __b);
1617 static __inline__ vector
int __attribute__((__always_inline__))
1618 vec_vcmpbfp(vector
float __a, vector
float __b) {
1619 return __builtin_altivec_vcmpbfp(__a, __b);
1626 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)__a,
1631 vec_cmpeq(vector
unsigned char __a, vector
unsigned char __b) {
1632 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)__a,
1638 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)__a,
1644 return (vector
bool short)__builtin_altivec_vcmpequh(__a, __b);
1648 vec_cmpeq(vector
unsigned short __a, vector
unsigned short __b) {
1649 return (vector
bool short)__builtin_altivec_vcmpequh((vector
short)__a,
1655 return (vector
bool short)__builtin_altivec_vcmpequh((vector
short)__a,
1661 return (vector
bool int)__builtin_altivec_vcmpequw(__a, __b);
1665 vec_cmpeq(vector
unsigned int __a, vector
unsigned int __b) {
1666 return (vector
bool int)__builtin_altivec_vcmpequw((vector
int)__a,
1671 vector
bool int __b) {
1672 return (vector
bool int)__builtin_altivec_vcmpequw((vector
int)__a,
1676 #ifdef __POWER8_VECTOR__ 1678 vec_cmpeq(vector
signed long long __a, vector
signed long long __b) {
1679 return (vector
bool long long)__builtin_altivec_vcmpequd(__a, __b);
1683 vec_cmpeq(vector
unsigned long long __a, vector
unsigned long long __b) {
1684 return (vector
bool long long)__builtin_altivec_vcmpequd(
1685 (vector
long long)__a, (vector
long long)__b);
1689 vec_cmpeq(vector
bool long long __a, vector
bool long long __b) {
1690 return (vector
bool long long)__builtin_altivec_vcmpequd(
1691 (vector
long long)__a, (vector
long long)__b);
1699 return (vector
bool int)__builtin_vsx_xvcmpeqsp(__a, __b);
1701 return (vector
bool int)__builtin_altivec_vcmpeqfp(__a, __b);
1707 vec_cmpeq(vector
double __a, vector
double __b) {
1708 return (vector
bool long long)__builtin_vsx_xvcmpeqdp(__a, __b);
1712 #ifdef __POWER9_VECTOR__ 1716 vec_cmpne(vector
bool char __a, vector
bool char __b) {
1717 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)__a,
1722 vec_cmpne(vector
signed char __a, vector
signed char __b) {
1723 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)__a,
1728 vec_cmpne(vector
unsigned char __a, vector
unsigned char __b) {
1729 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)__a,
1734 vec_cmpne(vector
bool short __a, vector
bool short __b) {
1735 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)__a,
1740 vec_cmpne(vector
signed short __a, vector
signed short __b) {
1741 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)__a,
1746 vec_cmpne(vector
unsigned short __a, vector
unsigned short __b) {
1747 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)__a,
1752 vec_cmpne(vector
bool int __a, vector
bool int __b) {
1753 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)__a,
1758 vec_cmpne(vector
signed int __a, vector
signed int __b) {
1759 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)__a,
1764 vec_cmpne(vector
unsigned int __a, vector
unsigned int __b) {
1765 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)__a,
1770 vec_cmpne(vector
bool long long __a, vector
bool long long __b) {
1771 return (vector
bool long long)
1772 ~(__builtin_altivec_vcmpequd((vector
long long)__a, (vector
long long)__b));
1776 vec_cmpne(vector
signed long long __a, vector
signed long long __b) {
1777 return (vector
bool long long)
1778 ~(__builtin_altivec_vcmpequd((vector
long long)__a, (vector
long long)__b));
1782 vec_cmpne(vector
unsigned long long __a, vector
unsigned long long __b) {
1783 return (vector
bool long long)
1784 ~(__builtin_altivec_vcmpequd((vector
long long)__a, (vector
long long)__b));
1788 vec_cmpne(vector
float __a, vector
float __b) {
1789 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)__a,
1794 vec_cmpne(vector
double __a, vector
double __b) {
1795 return (vector
bool long long)
1796 ~(__builtin_altivec_vcmpequd((vector
long long)__a, (vector
long long)__b));
1802 vec_cmpnez(vector
signed char __a, vector
signed char __b) {
1803 return (vector
bool char)__builtin_altivec_vcmpnezb((vector
char)__a,
1808 vec_cmpnez(vector
unsigned char __a, vector
unsigned char __b) {
1809 return (vector
bool char)__builtin_altivec_vcmpnezb((vector
char)__a,
1814 vec_cmpnez(vector
signed short __a, vector
signed short __b) {
1815 return (vector
bool short)__builtin_altivec_vcmpnezh((vector
short)__a,
1820 vec_cmpnez(vector
unsigned short __a, vector
unsigned short __b) {
1821 return (vector
bool short)__builtin_altivec_vcmpnezh((vector
short)__a,
1826 vec_cmpnez(vector
signed int __a, vector
signed int __b) {
1827 return (vector
bool int)__builtin_altivec_vcmpnezw((vector
int)__a,
1832 vec_cmpnez(vector
unsigned int __a, vector
unsigned int __b) {
1833 return (vector
bool int)__builtin_altivec_vcmpnezw((vector
int)__a,
1838 vec_cntlz_lsbb(vector
signed char __a) {
1839 #ifdef __LITTLE_ENDIAN__ 1840 return __builtin_altivec_vctzlsbb(__a);
1842 return __builtin_altivec_vclzlsbb(__a);
1847 vec_cntlz_lsbb(vector
unsigned char __a) {
1848 #ifdef __LITTLE_ENDIAN__ 1849 return __builtin_altivec_vctzlsbb(__a);
1851 return __builtin_altivec_vclzlsbb(__a);
1856 vec_cnttz_lsbb(vector
signed char __a) {
1857 #ifdef __LITTLE_ENDIAN__ 1858 return __builtin_altivec_vclzlsbb(__a);
1860 return __builtin_altivec_vctzlsbb(__a);
1865 vec_cnttz_lsbb(vector
unsigned char __a) {
1866 #ifdef __LITTLE_ENDIAN__ 1867 return __builtin_altivec_vclzlsbb(__a);
1869 return __builtin_altivec_vctzlsbb(__a);
1874 vec_parity_lsbb(vector
unsigned int __a) {
1875 return __builtin_altivec_vprtybw(__a);
1879 vec_parity_lsbb(vector
signed int __a) {
1880 return __builtin_altivec_vprtybw(__a);
1883 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 1884 vec_parity_lsbb(vector
unsigned __int128 __a) {
1885 return __builtin_altivec_vprtybq(__a);
1888 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 1889 vec_parity_lsbb(vector
signed __int128 __a) {
1890 return __builtin_altivec_vprtybq(__a);
1893 static __inline__ vector
unsigned long long __ATTRS_o_ai 1894 vec_parity_lsbb(vector
unsigned long long __a) {
1895 return __builtin_altivec_vprtybd(__a);
1898 static __inline__ vector
unsigned long long __ATTRS_o_ai 1899 vec_parity_lsbb(vector
signed long long __a) {
1900 return __builtin_altivec_vprtybd(__a);
1909 return (vector
bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1913 vec_cmpgt(vector
unsigned char __a, vector
unsigned char __b) {
1914 return (vector
bool char)__builtin_altivec_vcmpgtub(__a, __b);
1919 return (vector
bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1923 vec_cmpgt(vector
unsigned short __a, vector
unsigned short __b) {
1924 return (vector
bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1929 return (vector
bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1933 vec_cmpgt(vector
unsigned int __a, vector
unsigned int __b) {
1934 return (vector
bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1937 #ifdef __POWER8_VECTOR__ 1939 vec_cmpgt(vector
signed long long __a, vector
signed long long __b) {
1940 return (vector
bool long long)__builtin_altivec_vcmpgtsd(__a, __b);
1944 vec_cmpgt(vector
unsigned long long __a, vector
unsigned long long __b) {
1945 return (vector
bool long long)__builtin_altivec_vcmpgtud(__a, __b);
1952 return (vector
bool int)__builtin_vsx_xvcmpgtsp(__a, __b);
1954 return (vector
bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1960 vec_cmpgt(vector
double __a, vector
double __b) {
1961 return (vector
bool long long)__builtin_vsx_xvcmpgtdp(__a, __b);
1973 vec_cmpge(vector
unsigned char __a, vector
unsigned char __b) {
1978 vec_cmpge(vector
signed short __a, vector
signed short __b) {
1983 vec_cmpge(vector
unsigned short __a, vector
unsigned short __b) {
1993 vec_cmpge(vector
unsigned int __a, vector
unsigned int __b) {
2000 return (vector
bool int)__builtin_vsx_xvcmpgesp(__a, __b);
2002 return (vector
bool int)__builtin_altivec_vcmpgefp(__a, __b);
2008 vec_cmpge(vector
double __a, vector
double __b) {
2009 return (vector
bool long long)__builtin_vsx_xvcmpgedp(__a, __b);
2013 #ifdef __POWER8_VECTOR__ 2015 vec_cmpge(vector
signed long long __a, vector
signed long long __b) {
2020 vec_cmpge(vector
unsigned long long __a, vector
unsigned long long __b) {
2027 static __inline__ vector
bool int __attribute__((__always_inline__))
2028 vec_vcmpgefp(vector
float __a, vector
float __b) {
2029 return (vector
bool int)__builtin_altivec_vcmpgefp(__a, __b);
2034 static __inline__ vector
bool char __attribute__((__always_inline__))
2035 vec_vcmpgtsb(vector
signed char __a, vector
signed char __b) {
2036 return (vector
bool char)__builtin_altivec_vcmpgtsb(__a, __b);
2041 static __inline__ vector
bool char __attribute__((__always_inline__))
2042 vec_vcmpgtub(vector
unsigned char __a, vector
unsigned char __b) {
2043 return (vector
bool char)__builtin_altivec_vcmpgtub(__a, __b);
2048 static __inline__ vector
bool short __attribute__((__always_inline__))
2049 vec_vcmpgtsh(vector
short __a, vector
short __b) {
2050 return (vector
bool short)__builtin_altivec_vcmpgtsh(__a, __b);
2055 static __inline__ vector
bool short __attribute__((__always_inline__))
2056 vec_vcmpgtuh(vector
unsigned short __a, vector
unsigned short __b) {
2057 return (vector
bool short)__builtin_altivec_vcmpgtuh(__a, __b);
2062 static __inline__ vector
bool int __attribute__((__always_inline__))
2063 vec_vcmpgtsw(vector
int __a, vector
int __b) {
2064 return (vector
bool int)__builtin_altivec_vcmpgtsw(__a, __b);
2069 static __inline__ vector
bool int __attribute__((__always_inline__))
2070 vec_vcmpgtuw(vector
unsigned int __a, vector
unsigned int __b) {
2071 return (vector
bool int)__builtin_altivec_vcmpgtuw(__a, __b);
2076 static __inline__ vector
bool int __attribute__((__always_inline__))
2077 vec_vcmpgtfp(vector
float __a, vector
float __b) {
2078 return (vector
bool int)__builtin_altivec_vcmpgtfp(__a, __b);
2089 vec_cmple(vector
unsigned char __a, vector
unsigned char __b) {
2094 vec_cmple(vector
signed short __a, vector
signed short __b) {
2099 vec_cmple(vector
unsigned short __a, vector
unsigned short __b) {
2109 vec_cmple(vector
unsigned int __a, vector
unsigned int __b) {
2120 vec_cmple(vector
double __a, vector
double __b) {
2125 #ifdef __POWER8_VECTOR__ 2127 vec_cmple(vector
signed long long __a, vector
signed long long __b) {
2132 vec_cmple(vector
unsigned long long __a, vector
unsigned long long __b) {
2145 vec_cmplt(vector
unsigned char __a, vector
unsigned char __b) {
2155 vec_cmplt(vector
unsigned short __a, vector
unsigned short __b) {
2165 vec_cmplt(vector
unsigned int __a, vector
unsigned int __b) {
2176 vec_cmplt(vector
double __a, vector
double __b) {
2181 #ifdef __POWER8_VECTOR__ 2183 vec_cmplt(vector
signed long long __a, vector
signed long long __b) {
2188 vec_cmplt(vector
unsigned long long __a, vector
unsigned long long __b) {
2195 vec_popcnt(vector
signed char __a) {
2196 return __builtin_altivec_vpopcntb(__a);
2199 vec_popcnt(vector
unsigned char __a) {
2200 return __builtin_altivec_vpopcntb(__a);
2203 vec_popcnt(vector
signed short __a) {
2204 return __builtin_altivec_vpopcnth(__a);
2207 vec_popcnt(vector
unsigned short __a) {
2208 return __builtin_altivec_vpopcnth(__a);
2211 vec_popcnt(vector
signed int __a) {
2212 return __builtin_altivec_vpopcntw(__a);
2215 vec_popcnt(vector
unsigned int __a) {
2216 return __builtin_altivec_vpopcntw(__a);
2219 vec_popcnt(vector
signed long long __a) {
2220 return __builtin_altivec_vpopcntd(__a);
2222 static __inline__ vector
unsigned long long __ATTRS_o_ai 2223 vec_popcnt(vector
unsigned long long __a) {
2224 return __builtin_altivec_vpopcntd(__a);
2230 vec_cntlz(vector
signed char __a) {
2231 return __builtin_altivec_vclzb(__a);
2234 vec_cntlz(vector
unsigned char __a) {
2235 return __builtin_altivec_vclzb(__a);
2238 vec_cntlz(vector
signed short __a) {
2239 return __builtin_altivec_vclzh(__a);
2242 vec_cntlz(vector
unsigned short __a) {
2243 return __builtin_altivec_vclzh(__a);
2246 vec_cntlz(vector
signed int __a) {
2247 return __builtin_altivec_vclzw(__a);
2250 vec_cntlz(vector
unsigned int __a) {
2251 return __builtin_altivec_vclzw(__a);
2254 vec_cntlz(vector
signed long long __a) {
2255 return __builtin_altivec_vclzd(__a);
2257 static __inline__ vector
unsigned long long __ATTRS_o_ai 2258 vec_cntlz(vector
unsigned long long __a) {
2259 return __builtin_altivec_vclzd(__a);
2263 #ifdef __POWER9_VECTOR__ 2268 vec_cnttz(vector
signed char __a) {
2269 return __builtin_altivec_vctzb(__a);
2272 vec_cnttz(vector
unsigned char __a) {
2273 return __builtin_altivec_vctzb(__a);
2276 vec_cnttz(vector
signed short __a) {
2277 return __builtin_altivec_vctzh(__a);
2280 vec_cnttz(vector
unsigned short __a) {
2281 return __builtin_altivec_vctzh(__a);
2284 vec_cnttz(vector
signed int __a) {
2285 return __builtin_altivec_vctzw(__a);
2288 vec_cnttz(vector
unsigned int __a) {
2289 return __builtin_altivec_vctzw(__a);
2292 vec_cnttz(vector
signed long long __a) {
2293 return __builtin_altivec_vctzd(__a);
2295 static __inline__ vector
unsigned long long __ATTRS_o_ai 2296 vec_cnttz(vector
unsigned long long __a) {
2297 return __builtin_altivec_vctzd(__a);
2303 vec_first_match_index(vector
signed char __a, vector
signed char __b) {
2304 vector
unsigned long long __res =
2305 #ifdef __LITTLE_ENDIAN__ 2306 vec_cnttz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2308 vec_cntlz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2310 if (__res[0] == 64) {
2311 return (__res[1] + 64) >> 3;
2313 return __res[0] >> 3;
2317 vec_first_match_index(vector
unsigned char __a, vector
unsigned char __b) {
2318 vector
unsigned long long __res =
2319 #ifdef __LITTLE_ENDIAN__ 2320 vec_cnttz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2322 vec_cntlz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2324 if (__res[0] == 64) {
2325 return (__res[1] + 64) >> 3;
2327 return __res[0] >> 3;
2331 vec_first_match_index(vector
signed short __a, vector
signed short __b) {
2332 vector
unsigned long long __res =
2333 #ifdef __LITTLE_ENDIAN__ 2334 vec_cnttz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2336 vec_cntlz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2338 if (__res[0] == 64) {
2339 return (__res[1] + 64) >> 4;
2341 return __res[0] >> 4;
2345 vec_first_match_index(vector
unsigned short __a, vector
unsigned short __b) {
2346 vector
unsigned long long __res =
2347 #ifdef __LITTLE_ENDIAN__ 2348 vec_cnttz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2350 vec_cntlz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2352 if (__res[0] == 64) {
2353 return (__res[1] + 64) >> 4;
2355 return __res[0] >> 4;
2359 vec_first_match_index(vector
signed int __a, vector
signed int __b) {
2360 vector
unsigned long long __res =
2361 #ifdef __LITTLE_ENDIAN__ 2362 vec_cnttz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2364 vec_cntlz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2366 if (__res[0] == 64) {
2367 return (__res[1] + 64) >> 5;
2369 return __res[0] >> 5;
2373 vec_first_match_index(vector
unsigned int __a, vector
unsigned int __b) {
2374 vector
unsigned long long __res =
2375 #ifdef __LITTLE_ENDIAN__ 2376 vec_cnttz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2378 vec_cntlz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2380 if (__res[0] == 64) {
2381 return (__res[1] + 64) >> 5;
2383 return __res[0] >> 5;
2389 vec_first_match_or_eos_index(vector
signed char __a, vector
signed char __b) {
2394 vector
bool char __tmp1 =
vec_cmpeq(__a, __b);
2395 vector
bool char __tmp2 = __tmp1 |
2396 vec_cmpeq((vector
signed char)__tmp1, __a) |
2397 vec_cmpeq((vector
signed char)__tmp1, __b);
2399 vector
unsigned long long __res =
2400 #ifdef __LITTLE_ENDIAN__ 2401 vec_cnttz((vector
unsigned long long)__tmp2);
2403 vec_cntlz((vector
unsigned long long)__tmp2);
2405 if (__res[0] == 64) {
2406 return (__res[1] + 64) >> 3;
2408 return __res[0] >> 3;
2412 vec_first_match_or_eos_index(vector
unsigned char __a,
2413 vector
unsigned char __b) {
2414 vector
bool char __tmp1 =
vec_cmpeq(__a, __b);
2415 vector
bool char __tmp2 = __tmp1 |
2416 vec_cmpeq((vector
unsigned char)__tmp1, __a) |
2417 vec_cmpeq((vector
unsigned char)__tmp1, __b);
2419 vector
unsigned long long __res =
2420 #ifdef __LITTLE_ENDIAN__ 2421 vec_cnttz((vector
unsigned long long)__tmp2);
2423 vec_cntlz((vector
unsigned long long)__tmp2);
2425 if (__res[0] == 64) {
2426 return (__res[1] + 64) >> 3;
2428 return __res[0] >> 3;
2432 vec_first_match_or_eos_index(vector
signed short __a, vector
signed short __b) {
2433 vector
bool short __tmp1 =
vec_cmpeq(__a, __b);
2434 vector
bool short __tmp2 = __tmp1 |
2435 vec_cmpeq((vector
signed short)__tmp1, __a) |
2436 vec_cmpeq((vector
signed short)__tmp1, __b);
2438 vector
unsigned long long __res =
2439 #ifdef __LITTLE_ENDIAN__ 2440 vec_cnttz((vector
unsigned long long)__tmp2);
2442 vec_cntlz((vector
unsigned long long)__tmp2);
2444 if (__res[0] == 64) {
2445 return (__res[1] + 64) >> 4;
2447 return __res[0] >> 4;
2451 vec_first_match_or_eos_index(vector
unsigned short __a,
2452 vector
unsigned short __b) {
2453 vector
bool short __tmp1 =
vec_cmpeq(__a, __b);
2454 vector
bool short __tmp2 = __tmp1 |
2455 vec_cmpeq((vector
unsigned short)__tmp1, __a) |
2456 vec_cmpeq((vector
unsigned short)__tmp1, __b);
2458 vector
unsigned long long __res =
2459 #ifdef __LITTLE_ENDIAN__ 2460 vec_cnttz((vector
unsigned long long)__tmp2);
2462 vec_cntlz((vector
unsigned long long)__tmp2);
2464 if (__res[0] == 64) {
2465 return (__res[1] + 64) >> 4;
2467 return __res[0] >> 4;
2471 vec_first_match_or_eos_index(vector
signed int __a, vector
signed int __b) {
2472 vector
bool int __tmp1 =
vec_cmpeq(__a, __b);
2473 vector
bool int __tmp2 = __tmp1 |
vec_cmpeq((vector
signed int)__tmp1, __a) |
2474 vec_cmpeq((vector
signed int)__tmp1, __b);
2476 vector
unsigned long long __res =
2477 #ifdef __LITTLE_ENDIAN__ 2478 vec_cnttz((vector
unsigned long long)__tmp2);
2480 vec_cntlz((vector
unsigned long long)__tmp2);
2482 if (__res[0] == 64) {
2483 return (__res[1] + 64) >> 5;
2485 return __res[0] >> 5;
2489 vec_first_match_or_eos_index(vector
unsigned int __a, vector
unsigned int __b) {
2490 vector
bool int __tmp1 =
vec_cmpeq(__a, __b);
2491 vector
bool int __tmp2 = __tmp1 |
2492 vec_cmpeq((vector
unsigned int)__tmp1, __a) |
2493 vec_cmpeq((vector
unsigned int)__tmp1, __b);
2495 vector
unsigned long long __res =
2496 #ifdef __LITTLE_ENDIAN__ 2497 vec_cnttz((vector
unsigned long long)__tmp2);
2499 vec_cntlz((vector
unsigned long long)__tmp2);
2501 if (__res[0] == 64) {
2502 return (__res[1] + 64) >> 5;
2504 return __res[0] >> 5;
2510 vec_first_mismatch_index(vector
signed char __a, vector
signed char __b) {
2511 vector
unsigned long long __res =
2512 #ifdef __LITTLE_ENDIAN__ 2513 vec_cnttz((vector
unsigned long long)vec_cmpne(__a, __b));
2515 vec_cntlz((vector
unsigned long long)vec_cmpne(__a, __b));
2517 if (__res[0] == 64) {
2518 return (__res[1] + 64) >> 3;
2520 return __res[0] >> 3;
2524 vec_first_mismatch_index(vector
unsigned char __a, vector
unsigned char __b) {
2525 vector
unsigned long long __res =
2526 #ifdef __LITTLE_ENDIAN__ 2527 vec_cnttz((vector
unsigned long long)vec_cmpne(__a, __b));
2529 vec_cntlz((vector
unsigned long long)vec_cmpne(__a, __b));
2531 if (__res[0] == 64) {
2532 return (__res[1] + 64) >> 3;
2534 return __res[0] >> 3;
2538 vec_first_mismatch_index(vector
signed short __a, vector
signed short __b) {
2539 vector
unsigned long long __res =
2540 #ifdef __LITTLE_ENDIAN__ 2541 vec_cnttz((vector
unsigned long long)vec_cmpne(__a, __b));
2543 vec_cntlz((vector
unsigned long long)vec_cmpne(__a, __b));
2545 if (__res[0] == 64) {
2546 return (__res[1] + 64) >> 4;
2548 return __res[0] >> 4;
2552 vec_first_mismatch_index(vector
unsigned short __a, vector
unsigned short __b) {
2553 vector
unsigned long long __res =
2554 #ifdef __LITTLE_ENDIAN__ 2555 vec_cnttz((vector
unsigned long long)vec_cmpne(__a, __b));
2557 vec_cntlz((vector
unsigned long long)vec_cmpne(__a, __b));
2559 if (__res[0] == 64) {
2560 return (__res[1] + 64) >> 4;
2562 return __res[0] >> 4;
2566 vec_first_mismatch_index(vector
signed int __a, vector
signed int __b) {
2567 vector
unsigned long long __res =
2568 #ifdef __LITTLE_ENDIAN__ 2569 vec_cnttz((vector
unsigned long long)vec_cmpne(__a, __b));
2571 vec_cntlz((vector
unsigned long long)vec_cmpne(__a, __b));
2573 if (__res[0] == 64) {
2574 return (__res[1] + 64) >> 5;
2576 return __res[0] >> 5;
2580 vec_first_mismatch_index(vector
unsigned int __a, vector
unsigned int __b) {
2581 vector
unsigned long long __res =
2582 #ifdef __LITTLE_ENDIAN__ 2583 vec_cnttz((vector
unsigned long long)vec_cmpne(__a, __b));
2585 vec_cntlz((vector
unsigned long long)vec_cmpne(__a, __b));
2587 if (__res[0] == 64) {
2588 return (__res[1] + 64) >> 5;
2590 return __res[0] >> 5;
2596 vec_first_mismatch_or_eos_index(vector
signed char __a,
2597 vector
signed char __b) {
2598 vector
unsigned long long __res =
2599 #ifdef __LITTLE_ENDIAN__ 2600 vec_cnttz((vector
unsigned long long)vec_cmpnez(__a, __b));
2602 vec_cntlz((vector
unsigned long long)vec_cmpnez(__a, __b));
2604 if (__res[0] == 64) {
2605 return (__res[1] + 64) >> 3;
2607 return __res[0] >> 3;
2611 vec_first_mismatch_or_eos_index(vector
unsigned char __a,
2612 vector
unsigned char __b) {
2613 vector
unsigned long long __res =
2614 #ifdef __LITTLE_ENDIAN__ 2615 vec_cnttz((vector
unsigned long long)vec_cmpnez(__a, __b));
2617 vec_cntlz((vector
unsigned long long)vec_cmpnez(__a, __b));
2619 if (__res[0] == 64) {
2620 return (__res[1] + 64) >> 3;
2622 return __res[0] >> 3;
2626 vec_first_mismatch_or_eos_index(vector
signed short __a,
2627 vector
signed short __b) {
2628 vector
unsigned long long __res =
2629 #ifdef __LITTLE_ENDIAN__ 2630 vec_cnttz((vector
unsigned long long)vec_cmpnez(__a, __b));
2632 vec_cntlz((vector
unsigned long long)vec_cmpnez(__a, __b));
2634 if (__res[0] == 64) {
2635 return (__res[1] + 64) >> 4;
2637 return __res[0] >> 4;
2641 vec_first_mismatch_or_eos_index(vector
unsigned short __a,
2642 vector
unsigned short __b) {
2643 vector
unsigned long long __res =
2644 #ifdef __LITTLE_ENDIAN__ 2645 vec_cnttz((vector
unsigned long long)vec_cmpnez(__a, __b));
2647 vec_cntlz((vector
unsigned long long)vec_cmpnez(__a, __b));
2649 if (__res[0] == 64) {
2650 return (__res[1] + 64) >> 4;
2652 return __res[0] >> 4;
2656 vec_first_mismatch_or_eos_index(vector
signed int __a, vector
signed int __b) {
2657 vector
unsigned long long __res =
2658 #ifdef __LITTLE_ENDIAN__ 2659 vec_cnttz((vector
unsigned long long)vec_cmpnez(__a, __b));
2661 vec_cntlz((vector
unsigned long long)vec_cmpnez(__a, __b));
2663 if (__res[0] == 64) {
2664 return (__res[1] + 64) >> 5;
2666 return __res[0] >> 5;
2670 vec_first_mismatch_or_eos_index(vector
unsigned int __a,
2671 vector
unsigned int __b) {
2672 vector
unsigned long long __res =
2673 #ifdef __LITTLE_ENDIAN__ 2674 vec_cnttz((vector
unsigned long long)vec_cmpnez(__a, __b));
2676 vec_cntlz((vector
unsigned long long)vec_cmpnez(__a, __b));
2678 if (__res[0] == 64) {
2679 return (__res[1] + 64) >> 5;
2681 return __res[0] >> 5;
2685 vec_insert_exp(vector
double __a, vector
unsigned long long __b) {
2686 return __builtin_vsx_xviexpdp((vector
unsigned long long)__a,__b);
2690 vec_insert_exp(vector
unsigned long long __a, vector
unsigned long long __b) {
2691 return __builtin_vsx_xviexpdp(__a,__b);
2695 vec_insert_exp(vector
float __a, vector
unsigned int __b) {
2696 return __builtin_vsx_xviexpsp((vector
unsigned int)__a,__b);
2700 vec_insert_exp(vector
unsigned int __a, vector
unsigned int __b) {
2701 return __builtin_vsx_xviexpsp(__a,__b);
2704 #if defined(__powerpc64__) 2705 static __inline__ vector
signed char __ATTRS_o_ai vec_xl_len(
signed char *__a,
2707 return (vector
signed char)__builtin_vsx_lxvl(__a, (__b << 56));
2711 vec_xl_len(
unsigned char *__a,
size_t __b) {
2712 return (vector
unsigned char)__builtin_vsx_lxvl(__a, (__b << 56));
2715 static __inline__ vector
signed short __ATTRS_o_ai vec_xl_len(
signed short *__a,
2717 return (vector
signed short)__builtin_vsx_lxvl(__a, (__b << 56));
2721 vec_xl_len(
unsigned short *__a,
size_t __b) {
2722 return (vector
unsigned short)__builtin_vsx_lxvl(__a, (__b << 56));
2725 static __inline__ vector
signed int __ATTRS_o_ai vec_xl_len(
signed int *__a,
2727 return (vector
signed int)__builtin_vsx_lxvl(__a, (__b << 56));
2730 static __inline__ vector
unsigned int __ATTRS_o_ai vec_xl_len(
unsigned int *__a,
2732 return (vector
unsigned int)__builtin_vsx_lxvl(__a, (__b << 56));
2735 static __inline__ vector
float __ATTRS_o_ai vec_xl_len(
float *__a,
size_t __b) {
2736 return (vector
float)__builtin_vsx_lxvl(__a, (__b << 56));
2740 vec_xl_len(
signed __int128 *__a,
size_t __b) {
2741 return (vector
signed __int128)__builtin_vsx_lxvl(__a, (__b << 56));
2744 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 2745 vec_xl_len(
unsigned __int128 *__a,
size_t __b) {
2746 return (vector
unsigned __int128)__builtin_vsx_lxvl(__a, (__b << 56));
2750 vec_xl_len(
signed long long *__a,
size_t __b) {
2751 return (vector
signed long long)__builtin_vsx_lxvl(__a, (__b << 56));
2754 static __inline__ vector
unsigned long long __ATTRS_o_ai 2755 vec_xl_len(
unsigned long long *__a,
size_t __b) {
2756 return (vector
unsigned long long)__builtin_vsx_lxvl(__a, (__b << 56));
2759 static __inline__ vector
double __ATTRS_o_ai vec_xl_len(
double *__a,
2761 return (vector
double)__builtin_vsx_lxvl(__a, (__b << 56));
2765 vec_xl_len_r(
unsigned char *__a,
size_t __b) {
2766 vector
unsigned char __res =
2767 (vector
unsigned char)__builtin_vsx_lxvll(__a, (__b << 56));
2768 #ifdef __LITTLE_ENDIAN__ 2769 vector
unsigned char __mask =
2770 (vector
unsigned char)__builtin_altivec_lvsr(16 - __b, (
int *)
NULL);
2771 __res = (vector
unsigned char)__builtin_altivec_vperm_4si(
2772 (vector
int)__res, (vector int)__res, __mask);
2778 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned char __a,
2781 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2784 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed char __a,
2785 signed char *__b,
size_t __c) {
2786 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2789 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed short __a,
2790 signed short *__b,
size_t __c) {
2791 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2794 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned short __a,
2795 unsigned short *__b,
2797 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2800 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed int __a,
2801 signed int *__b,
size_t __c) {
2802 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2805 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned int __a,
2806 unsigned int *__b,
size_t __c) {
2807 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2810 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
float __a,
float *__b,
2812 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2815 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed __int128 __a,
2816 signed __int128 *__b,
2818 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2821 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned __int128 __a,
2822 unsigned __int128 *__b,
2824 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2827 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed long long __a,
2828 signed long long *__b,
2830 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2833 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned long long __a,
2834 unsigned long long *__b,
2836 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2839 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
double __a,
double *__b,
2841 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2844 static __inline__
void __ATTRS_o_ai vec_xst_len_r(vector
unsigned char __a,
2847 #ifdef __LITTLE_ENDIAN__ 2848 vector
unsigned char __mask =
2849 (vector
unsigned char)__builtin_altivec_lvsl(16 - __c, (
int *)
NULL);
2850 vector
unsigned char __res =
2851 __builtin_altivec_vperm_4si((vector
int)__a, (vector
int)__a, __mask);
2852 return __builtin_vsx_stxvll((vector
int)__res, __b, (__c << 56));
2854 return __builtin_vsx_stxvll((vector
int)__a, __b, (__c << 56));
2863 static __inline__ vector
float __ATTRS_o_ai vec_cpsgn(vector
float __a,
2865 return __builtin_vsx_xvcpsgnsp(__a, __b);
2868 static __inline__ vector
double __ATTRS_o_ai vec_cpsgn(vector
double __a,
2869 vector
double __b) {
2870 return __builtin_vsx_xvcpsgndp(__a, __b);
2877 #define vec_ctf(__a, __b) \ 2878 _Generic((__a), vector int \ 2879 : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \ 2880 vector unsigned int \ 2881 : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \ 2883 vector unsigned long long \ 2884 : (__builtin_convertvector((vector unsigned long long)(__a), \ 2886 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \ 2888 vector signed long long \ 2889 : (__builtin_convertvector((vector signed long long)(__a), \ 2891 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \ 2894 #define vec_ctf(__a, __b) \ 2895 _Generic((__a), vector int \ 2896 : (vector float)__builtin_altivec_vcfsx((vector int)(__a), (__b)), \ 2897 vector unsigned int \ 2898 : (vector float)__builtin_altivec_vcfux((vector unsigned int)(__a), \ 2904 #define vec_vcfux __builtin_altivec_vcfux 2908 #define vec_vcfsx(__a, __b) __builtin_altivec_vcfsx((vector int)(__a), (__b)) 2913 #define vec_cts(__a, __b) \ 2914 _Generic((__a), vector float \ 2915 : __builtin_altivec_vctsxs((vector float)(__a), (__b)), \ 2918 vector double __ret = \ 2919 (vector double)(__a) * \ 2920 (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \ 2922 __builtin_convertvector(__ret, vector signed long long); \ 2925 #define vec_cts __builtin_altivec_vctsxs 2930 #define vec_vctsxs __builtin_altivec_vctsxs 2935 #define vec_ctu(__a, __b) \ 2936 _Generic((__a), vector float \ 2937 : __builtin_altivec_vctuxs((vector float)(__a), (__b)), \ 2940 vector double __ret = \ 2941 (vector double)(__a) * \ 2942 (vector double)(vector unsigned long long)((0x3ffULL + __b) \ 2944 __builtin_convertvector(__ret, vector unsigned long long); \ 2947 #define vec_ctu __builtin_altivec_vctuxs 2952 #define vec_vctuxs __builtin_altivec_vctuxs 2957 vec_sld(vector
signed int, vector
signed int,
unsigned const int __c);
2961 return __builtin_convertvector(__a, vector
signed int);
2967 return __builtin_convertvector(__a, vector
signed long long);
2970 static __inline__ vector
signed int __attribute__((__always_inline__))
2971 vec_signed2(vector
double __a, vector
double __b) {
2972 return (vector
signed int) { __a[0], __a[1], __b[0], __b[1] };
2976 vec_signede(vector
double __a) {
2977 #ifdef __LITTLE_ENDIAN__ 2978 vector
signed int __ret = __builtin_vsx_xvcvdpsxws(__a);
2979 return vec_sld(__ret, __ret, 12);
2981 return __builtin_vsx_xvcvdpsxws(__a);
2986 vec_signedo(vector
double __a) {
2987 #ifdef __LITTLE_ENDIAN__ 2988 return __builtin_vsx_xvcvdpsxws(__a);
2990 vector
signed int __ret = __builtin_vsx_xvcvdpsxws(__a);
2991 return vec_sld(__ret, __ret, 12);
2999 vec_sld(vector
unsigned int, vector
unsigned int,
unsigned const int __c);
3003 return __builtin_convertvector(__a, vector
unsigned int);
3007 static __inline__ vector
unsigned long long __ATTRS_o_ai 3009 return __builtin_convertvector(__a, vector
unsigned long long);
3012 static __inline__ vector
unsigned int __attribute__((__always_inline__))
3013 vec_unsigned2(vector
double __a, vector
double __b) {
3014 return (vector
unsigned int) { __a[0], __a[1], __b[0], __b[1] };
3018 vec_unsignede(vector
double __a) {
3019 #ifdef __LITTLE_ENDIAN__ 3020 vector
unsigned int __ret = __builtin_vsx_xvcvdpuxws(__a);
3021 return vec_sld(__ret, __ret, 12);
3023 return __builtin_vsx_xvcvdpuxws(__a);
3028 vec_unsignedo(vector
double __a) {
3029 #ifdef __LITTLE_ENDIAN__ 3030 return __builtin_vsx_xvcvdpuxws(__a);
3032 vector
unsigned int __ret = __builtin_vsx_xvcvdpuxws(__a);
3033 return vec_sld(__ret, __ret, 12);
3041 vec_sld(vector
float, vector
float,
unsigned const int __c);
3045 return __builtin_convertvector(__a, vector
float);
3050 return __builtin_convertvector(__a, vector
float);
3055 vec_float2(vector
signed long long __a, vector
signed long long __b) {
3056 return (vector
float) { __a[0], __a[1], __b[0], __b[1] };
3060 vec_float2(vector
unsigned long long __a, vector
unsigned long long __b) {
3061 return (vector
float) { __a[0], __a[1], __b[0], __b[1] };
3065 vec_float2(vector
double __a, vector
double __b) {
3066 return (vector
float) { __a[0], __a[1], __b[0], __b[1] };
3070 vec_floate(vector
signed long long __a) {
3071 #ifdef __LITTLE_ENDIAN__ 3072 vector
float __ret = __builtin_vsx_xvcvsxdsp(__a);
3073 return vec_sld(__ret, __ret, 12);
3075 return __builtin_vsx_xvcvsxdsp(__a);
3080 vec_floate(vector
unsigned long long __a) {
3081 #ifdef __LITTLE_ENDIAN__ 3082 vector
float __ret = __builtin_vsx_xvcvuxdsp(__a);
3083 return vec_sld(__ret, __ret, 12);
3085 return __builtin_vsx_xvcvuxdsp(__a);
3090 vec_floate(vector
double __a) {
3091 #ifdef __LITTLE_ENDIAN__ 3092 vector
float __ret = __builtin_vsx_xvcvdpsp(__a);
3093 return vec_sld(__ret, __ret, 12);
3095 return __builtin_vsx_xvcvdpsp(__a);
3100 vec_floato(vector
signed long long __a) {
3101 #ifdef __LITTLE_ENDIAN__ 3102 return __builtin_vsx_xvcvsxdsp(__a);
3104 vector
float __ret = __builtin_vsx_xvcvsxdsp(__a);
3105 return vec_sld(__ret, __ret, 12);
3110 vec_floato(vector
unsigned long long __a) {
3111 #ifdef __LITTLE_ENDIAN__ 3112 return __builtin_vsx_xvcvuxdsp(__a);
3114 vector
float __ret = __builtin_vsx_xvcvuxdsp(__a);
3115 return vec_sld(__ret, __ret, 12);
3120 vec_floato(vector
double __a) {
3121 #ifdef __LITTLE_ENDIAN__ 3122 return __builtin_vsx_xvcvdpsp(__a);
3124 vector
float __ret = __builtin_vsx_xvcvdpsp(__a);
3125 return vec_sld(__ret, __ret, 12);
3134 vec_double(vector
signed long long __a) {
3135 return __builtin_convertvector(__a, vector
double);
3139 vec_double(vector
unsigned long long __a) {
3140 return __builtin_convertvector(__a, vector
double);
3144 vec_doublee(vector
signed int __a) {
3145 #ifdef __LITTLE_ENDIAN__ 3146 return __builtin_vsx_xvcvsxwdp(
vec_sld(__a, __a, 4));
3148 return __builtin_vsx_xvcvsxwdp(__a);
3153 vec_doublee(vector
unsigned int __a) {
3154 #ifdef __LITTLE_ENDIAN__ 3155 return __builtin_vsx_xvcvuxwdp(
vec_sld(__a, __a, 4));
3157 return __builtin_vsx_xvcvuxwdp(__a);
3162 vec_doublee(vector
float __a) {
3163 #ifdef __LITTLE_ENDIAN__ 3164 return __builtin_vsx_xvcvspdp(
vec_sld(__a, __a, 4));
3166 return __builtin_vsx_xvcvspdp(__a);
3171 vec_doubleh(vector
signed int __a) {
3172 vector
double __ret = {__a[0], __a[1]};
3177 vec_doubleh(vector
unsigned int __a) {
3178 vector
double __ret = {__a[0], __a[1]};
3183 vec_doubleh(vector
float __a) {
3184 vector
double __ret = {__a[0], __a[1]};
3189 vec_doublel(vector
signed int __a) {
3190 vector
double __ret = {__a[2], __a[3]};
3195 vec_doublel(vector
unsigned int __a) {
3196 vector
double __ret = {__a[2], __a[3]};
3201 vec_doublel(vector
float __a) {
3202 vector
double __ret = {__a[2], __a[3]};
3207 vec_doubleo(vector
signed int __a) {
3208 #ifdef __LITTLE_ENDIAN__ 3209 return __builtin_vsx_xvcvsxwdp(__a);
3211 return __builtin_vsx_xvcvsxwdp(
vec_sld(__a, __a, 4));
3216 vec_doubleo(vector
unsigned int __a) {
3217 #ifdef __LITTLE_ENDIAN__ 3218 return __builtin_vsx_xvcvuxwdp(__a);
3220 return __builtin_vsx_xvcvuxwdp(
vec_sld(__a, __a, 4));
3225 vec_doubleo(vector
float __a) {
3226 #ifdef __LITTLE_ENDIAN__ 3227 return __builtin_vsx_xvcvspdp(__a);
3229 return __builtin_vsx_xvcvspdp(
vec_sld(__a, __a, 4));
3240 vec_div(vector
signed char __a, vector
signed char __b) {
3245 vec_div(vector
unsigned char __a, vector
unsigned char __b) {
3250 vec_div(vector
signed short __a, vector
signed short __b) {
3255 vec_div(vector
unsigned short __a, vector
unsigned short __b) {
3260 vec_div(vector
signed int __a, vector
signed int __b) {
3265 vec_div(vector
unsigned int __a, vector
unsigned int __b) {
3271 vec_div(vector
signed long long __a, vector
signed long long __b) {
3275 static __inline__ vector
unsigned long long __ATTRS_o_ai 3276 vec_div(vector
unsigned long long __a, vector
unsigned long long __b) {
3286 vector
double __b) {
3293 #define vec_dss __builtin_altivec_dss 3297 static __inline__
void __attribute__((__always_inline__)) vec_dssall(
void) {
3298 __builtin_altivec_dssall();
3302 #define vec_dst(__PTR, __CW, __STR) \ 3304 { __builtin_altivec_dst((const void *)(__PTR), (__CW), (__STR)); }) 3307 #define vec_dstst(__PTR, __CW, __STR) \ 3309 { __builtin_altivec_dstst((const void *)(__PTR), (__CW), (__STR)); }) 3312 #define vec_dststt(__PTR, __CW, __STR) \ 3314 { __builtin_altivec_dststt((const void *)(__PTR), (__CW), (__STR)); }) 3317 #define vec_dstt(__PTR, __CW, __STR) \ 3319 { __builtin_altivec_dstt((const void *)(__PTR), (__CW), (__STR)); }) 3323 #ifdef __POWER8_VECTOR__ 3325 vec_eqv(vector
signed char __a, vector
signed char __b) {
3326 return (vector
signed char)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3327 (vector
unsigned int)__b);
3331 vec_eqv(vector
unsigned char __a, vector
unsigned char __b) {
3332 return (vector
unsigned char)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3333 (vector
unsigned int)__b);
3336 static __inline__ vector
bool char __ATTRS_o_ai vec_eqv(vector
bool char __a,
3337 vector
bool char __b) {
3338 return (vector
bool char)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3339 (vector
unsigned int)__b);
3343 vec_eqv(vector
signed short __a, vector
signed short __b) {
3344 return (vector
signed short)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3345 (vector
unsigned int)__b);
3349 vec_eqv(vector
unsigned short __a, vector
unsigned short __b) {
3350 return (vector
unsigned short)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3351 (vector
unsigned int)__b);
3355 vec_eqv(vector
bool short __a, vector
bool short __b) {
3356 return (vector
bool short)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3357 (vector
unsigned int)__b);
3361 vec_eqv(vector
signed int __a, vector
signed int __b) {
3362 return (vector
signed int)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3363 (vector
unsigned int)__b);
3367 vec_eqv(vector
unsigned int __a, vector
unsigned int __b) {
3368 return __builtin_vsx_xxleqv(__a, __b);
3371 static __inline__ vector
bool int __ATTRS_o_ai vec_eqv(vector
bool int __a,
3372 vector
bool int __b) {
3373 return (vector
bool int)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3374 (vector
unsigned int)__b);
3378 vec_eqv(vector
signed long long __a, vector
signed long long __b) {
3379 return (vector
signed long long)__builtin_vsx_xxleqv(
3380 (vector
unsigned int)__a, (vector
unsigned int)__b);
3383 static __inline__ vector
unsigned long long __ATTRS_o_ai 3384 vec_eqv(vector
unsigned long long __a, vector
unsigned long long __b) {
3385 return (vector
unsigned long long)__builtin_vsx_xxleqv(
3386 (vector
unsigned int)__a, (vector
unsigned int)__b);
3390 vec_eqv(vector
bool long long __a, vector
bool long long __b) {
3391 return (vector
bool long long)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3392 (vector
unsigned int)__b);
3395 static __inline__ vector
float __ATTRS_o_ai vec_eqv(vector
float __a,
3397 return (vector
float)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3398 (vector
unsigned int)__b);
3401 static __inline__ vector
double __ATTRS_o_ai vec_eqv(vector
double __a,
3402 vector
double __b) {
3403 return (vector
double)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3404 (vector
unsigned int)__b);
3410 static __inline__ vector
float __attribute__((__always_inline__))
3411 vec_expte(vector
float __a) {
3412 return __builtin_altivec_vexptefp(__a);
3417 static __inline__ vector
float __attribute__((__always_inline__))
3418 vec_vexptefp(vector
float __a) {
3419 return __builtin_altivec_vexptefp(__a);
3426 return __builtin_vsx_xvrspim(__a);
3428 return __builtin_altivec_vrfim(__a);
3434 return __builtin_vsx_xvrdpim(__a);
3440 static __inline__ vector
float __attribute__((__always_inline__))
3441 vec_vrfim(vector
float __a) {
3442 return __builtin_altivec_vrfim(__a);
3448 vec_ld(
int __a,
const vector
signed char *__b) {
3449 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3454 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3458 vec_ld(
int __a,
const vector
unsigned char *__b) {
3459 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3464 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3468 vec_ld(
int __a,
const vector
bool char *__b) {
3469 return (vector
bool char)__builtin_altivec_lvx(__a, __b);
3473 const vector
short *__b) {
3474 return (vector
short)__builtin_altivec_lvx(__a, __b);
3478 return (vector
short)__builtin_altivec_lvx(__a, __b);
3482 vec_ld(
int __a,
const vector
unsigned short *__b) {
3483 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3488 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3492 vec_ld(
int __a,
const vector
bool short *__b) {
3493 return (vector
bool short)__builtin_altivec_lvx(__a, __b);
3497 const vector pixel *__b) {
3498 return (vector pixel)__builtin_altivec_lvx(__a, __b);
3502 const vector
int *__b) {
3503 return (vector
int)__builtin_altivec_lvx(__a, __b);
3507 return (vector
int)__builtin_altivec_lvx(__a, __b);
3511 vec_ld(
int __a,
const vector
unsigned int *__b) {
3512 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3517 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3521 vec_ld(
int __a,
const vector
bool int *__b) {
3522 return (vector
bool int)__builtin_altivec_lvx(__a, __b);
3526 const vector
float *__b) {
3527 return (vector
float)__builtin_altivec_lvx(__a, __b);
3531 return (vector
float)__builtin_altivec_lvx(__a, __b);
3538 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3543 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3547 vec_lvx(
int __a,
const vector
unsigned char *__b) {
3548 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3553 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3558 return (vector
bool char)__builtin_altivec_lvx(__a, __b);
3562 const vector
short *__b) {
3563 return (vector
short)__builtin_altivec_lvx(__a, __b);
3567 return (vector
short)__builtin_altivec_lvx(__a, __b);
3571 vec_lvx(
int __a,
const vector
unsigned short *__b) {
3572 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3577 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3582 return (vector
bool short)__builtin_altivec_lvx(__a, __b);
3586 const vector pixel *__b) {
3587 return (vector pixel)__builtin_altivec_lvx(__a, __b);
3591 const vector
int *__b) {
3592 return (vector
int)__builtin_altivec_lvx(__a, __b);
3596 return (vector
int)__builtin_altivec_lvx(__a, __b);
3600 vec_lvx(
int __a,
const vector
unsigned int *__b) {
3601 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3606 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3611 return (vector
bool int)__builtin_altivec_lvx(__a, __b);
3615 const vector
float *__b) {
3616 return (vector
float)__builtin_altivec_lvx(__a, __b);
3620 return (vector
float)__builtin_altivec_lvx(__a, __b);
3627 return (vector
signed char)__builtin_altivec_lvebx(__a, __b);
3632 return (vector
unsigned char)__builtin_altivec_lvebx(__a, __b);
3636 return (vector
short)__builtin_altivec_lvehx(__a, __b);
3641 return (vector
unsigned short)__builtin_altivec_lvehx(__a, __b);
3645 return (vector
int)__builtin_altivec_lvewx(__a, __b);
3650 return (vector
unsigned int)__builtin_altivec_lvewx(__a, __b);
3654 return (vector
float)__builtin_altivec_lvewx(__a, __b);
3661 return (vector
signed char)__builtin_altivec_lvebx(__a, __b);
3666 return (vector
unsigned char)__builtin_altivec_lvebx(__a, __b);
3673 return (vector
short)__builtin_altivec_lvehx(__a, __b);
3678 return (vector
unsigned short)__builtin_altivec_lvehx(__a, __b);
3684 return (vector
int)__builtin_altivec_lvewx(__a, __b);
3689 return (vector
unsigned int)__builtin_altivec_lvewx(__a, __b);
3694 return (vector
float)__builtin_altivec_lvewx(__a, __b);
3701 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3706 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3710 vec_ldl(
int __a,
const vector
unsigned char *__b) {
3711 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3716 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3721 return (vector
bool char)__builtin_altivec_lvxl(__a, __b);
3725 const vector
short *__b) {
3726 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3730 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3734 vec_ldl(
int __a,
const vector
unsigned short *__b) {
3735 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3740 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3745 return (vector
bool short)__builtin_altivec_lvxl(__a, __b);
3749 const vector pixel *__b) {
3750 return (vector pixel
short)__builtin_altivec_lvxl(__a, __b);
3754 const vector
int *__b) {
3755 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3759 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3763 vec_ldl(
int __a,
const vector
unsigned int *__b) {
3764 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3769 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3774 return (vector
bool int)__builtin_altivec_lvxl(__a, __b);
3778 const vector
float *__b) {
3779 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3783 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3790 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3795 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3800 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3805 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3810 return (vector
bool char)__builtin_altivec_lvxl(__a, __b);
3814 const vector
short *__b) {
3815 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3820 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3825 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3830 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3835 return (vector
bool short)__builtin_altivec_lvxl(__a, __b);
3839 const vector pixel *__b) {
3840 return (vector pixel)__builtin_altivec_lvxl(__a, __b);
3844 const vector
int *__b) {
3845 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3849 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3854 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3859 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3864 return (vector
bool int)__builtin_altivec_lvxl(__a, __b);
3868 const vector
float *__b) {
3869 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3874 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3879 static __inline__ vector
float __attribute__((__always_inline__))
3880 vec_loge(vector
float __a) {
3881 return __builtin_altivec_vlogefp(__a);
3886 static __inline__ vector
float __attribute__((__always_inline__))
3887 vec_vlogefp(vector
float __a) {
3888 return __builtin_altivec_vlogefp(__a);
3893 #ifdef __LITTLE_ENDIAN__ 3895 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3896 loads/stores")))
vec_lvsl(
int __a,
const signed char *__b) {
3897 vector
unsigned char mask =
3898 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3899 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3900 7, 6, 5, 4, 3, 2, 1, 0};
3901 return vec_perm(mask, mask, reverse);
3906 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3910 #ifdef __LITTLE_ENDIAN__ 3912 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3913 loads/stores")))
vec_lvsl(
int __a,
const unsigned char *__b) {
3914 vector
unsigned char mask =
3915 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3916 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3917 7, 6, 5, 4, 3, 2, 1, 0};
3918 return vec_perm(mask, mask, reverse);
3923 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3927 #ifdef __LITTLE_ENDIAN__ 3929 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3930 loads/stores")))
vec_lvsl(
int __a,
const short *__b) {
3931 vector
unsigned char mask =
3932 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3933 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3934 7, 6, 5, 4, 3, 2, 1, 0};
3935 return vec_perm(mask, mask, reverse);
3940 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3944 #ifdef __LITTLE_ENDIAN__ 3946 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3947 loads/stores")))
vec_lvsl(
int __a,
const unsigned short *__b) {
3948 vector
unsigned char mask =
3949 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3950 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3951 7, 6, 5, 4, 3, 2, 1, 0};
3952 return vec_perm(mask, mask, reverse);
3957 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3961 #ifdef __LITTLE_ENDIAN__ 3963 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3964 loads/stores")))
vec_lvsl(
int __a,
const int *__b) {
3965 vector
unsigned char mask =
3966 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3967 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3968 7, 6, 5, 4, 3, 2, 1, 0};
3969 return vec_perm(mask, mask, reverse);
3974 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3978 #ifdef __LITTLE_ENDIAN__ 3980 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3981 loads/stores")))
vec_lvsl(
int __a,
const unsigned int *__b) {
3982 vector
unsigned char mask =
3983 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3984 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3985 7, 6, 5, 4, 3, 2, 1, 0};
3986 return vec_perm(mask, mask, reverse);
3991 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3995 #ifdef __LITTLE_ENDIAN__ 3997 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3998 loads/stores")))
vec_lvsl(
int __a,
const float *__b) {
3999 vector
unsigned char mask =
4000 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
4001 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4002 7, 6, 5, 4, 3, 2, 1, 0};
4003 return vec_perm(mask, mask, reverse);
4008 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
4014 #ifdef __LITTLE_ENDIAN__ 4016 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4017 loads/stores")))
vec_lvsr(
int __a,
const signed char *__b) {
4018 vector
unsigned char mask =
4019 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4020 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4021 7, 6, 5, 4, 3, 2, 1, 0};
4022 return vec_perm(mask, mask, reverse);
4027 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4031 #ifdef __LITTLE_ENDIAN__ 4033 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4034 loads/stores")))
vec_lvsr(
int __a,
const unsigned char *__b) {
4035 vector
unsigned char mask =
4036 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4037 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4038 7, 6, 5, 4, 3, 2, 1, 0};
4039 return vec_perm(mask, mask, reverse);
4044 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4048 #ifdef __LITTLE_ENDIAN__ 4050 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4051 loads/stores")))
vec_lvsr(
int __a,
const short *__b) {
4052 vector
unsigned char mask =
4053 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4054 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4055 7, 6, 5, 4, 3, 2, 1, 0};
4056 return vec_perm(mask, mask, reverse);
4061 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4065 #ifdef __LITTLE_ENDIAN__ 4067 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4068 loads/stores")))
vec_lvsr(
int __a,
const unsigned short *__b) {
4069 vector
unsigned char mask =
4070 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4071 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4072 7, 6, 5, 4, 3, 2, 1, 0};
4073 return vec_perm(mask, mask, reverse);
4078 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4082 #ifdef __LITTLE_ENDIAN__ 4084 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4085 loads/stores")))
vec_lvsr(
int __a,
const int *__b) {
4086 vector
unsigned char mask =
4087 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4088 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4089 7, 6, 5, 4, 3, 2, 1, 0};
4090 return vec_perm(mask, mask, reverse);
4095 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4099 #ifdef __LITTLE_ENDIAN__ 4101 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4102 loads/stores")))
vec_lvsr(
int __a,
const unsigned int *__b) {
4103 vector
unsigned char mask =
4104 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4105 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4106 7, 6, 5, 4, 3, 2, 1, 0};
4107 return vec_perm(mask, mask, reverse);
4112 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4116 #ifdef __LITTLE_ENDIAN__ 4118 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4119 loads/stores")))
vec_lvsr(
int __a,
const float *__b) {
4120 vector
unsigned char mask =
4121 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4122 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4123 7, 6, 5, 4, 3, 2, 1, 0};
4124 return vec_perm(mask, mask, reverse);
4129 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4135 vec_mladd(vector
signed short, vector
signed short, vector
signed short);
4137 vec_mladd(vector
signed short, vector
unsigned short, vector
unsigned short);
4139 vec_mladd(vector
unsigned short, vector
signed short, vector
signed short);
4141 vec_mladd(vector
unsigned short, vector
unsigned short, vector
unsigned short);
4144 vector
signed short __a, vector
signed short __b, vector
signed short __c) {
4149 vec_madd(vector
signed short __a, vector
unsigned short __b,
4150 vector
unsigned short __c) {
4155 vec_madd(vector
unsigned short __a, vector
signed short __b,
4156 vector
signed short __c) {
4161 vec_madd(vector
unsigned short __a, vector
unsigned short __b,
4162 vector
unsigned short __c) {
4170 return __builtin_vsx_xvmaddasp(__a, __b, __c);
4172 return __builtin_altivec_vmaddfp(__a, __b, __c);
4179 vector
double __c) {
4180 return __builtin_vsx_xvmaddadp(__a, __b, __c);
4186 static __inline__ vector
float __attribute__((__always_inline__))
4187 vec_vmaddfp(vector
float __a, vector
float __b, vector
float __c) {
4188 return __builtin_altivec_vmaddfp(__a, __b, __c);
4193 static __inline__ vector
signed short __attribute__((__always_inline__))
4194 vec_madds(vector
signed short __a, vector
signed short __b,
4195 vector
signed short __c) {
4196 return __builtin_altivec_vmhaddshs(__a, __b, __c);
4200 static __inline__ vector
signed short __attribute__((__always_inline__))
4201 vec_vmhaddshs(vector
signed short __a, vector
signed short __b,
4202 vector
signed short __c) {
4203 return __builtin_altivec_vmhaddshs(__a, __b, __c);
4209 static __inline__ vector
float __ATTRS_o_ai vec_msub(vector
float __a,
4212 return __builtin_vsx_xvmsubasp(__a, __b, __c);
4215 static __inline__ vector
double __ATTRS_o_ai vec_msub(vector
double __a,
4217 vector
double __c) {
4218 return __builtin_vsx_xvmsubadp(__a, __b, __c);
4225 vec_max(vector
signed char __a, vector
signed char __b) {
4226 return __builtin_altivec_vmaxsb(__a, __b);
4230 vec_max(vector
bool char __a, vector
signed char __b) {
4231 return __builtin_altivec_vmaxsb((vector
signed char)__a, __b);
4235 vec_max(vector
signed char __a, vector
bool char __b) {
4236 return __builtin_altivec_vmaxsb(__a, (vector
signed char)__b);
4240 vec_max(vector
unsigned char __a, vector
unsigned char __b) {
4241 return __builtin_altivec_vmaxub(__a, __b);
4245 vec_max(vector
bool char __a, vector
unsigned char __b) {
4246 return __builtin_altivec_vmaxub((vector
unsigned char)__a, __b);
4250 vec_max(vector
unsigned char __a, vector
bool char __b) {
4251 return __builtin_altivec_vmaxub(__a, (vector
unsigned char)__b);
4256 return __builtin_altivec_vmaxsh(__a, __b);
4261 return __builtin_altivec_vmaxsh((vector
short)__a, __b);
4265 vector
bool short __b) {
4266 return __builtin_altivec_vmaxsh(__a, (vector
short)__b);
4270 vec_max(vector
unsigned short __a, vector
unsigned short __b) {
4271 return __builtin_altivec_vmaxuh(__a, __b);
4275 vec_max(vector
bool short __a, vector
unsigned short __b) {
4276 return __builtin_altivec_vmaxuh((vector
unsigned short)__a, __b);
4280 vec_max(vector
unsigned short __a, vector
bool short __b) {
4281 return __builtin_altivec_vmaxuh(__a, (vector
unsigned short)__b);
4286 return __builtin_altivec_vmaxsw(__a, __b);
4291 return __builtin_altivec_vmaxsw((vector
int)__a, __b);
4295 vector
bool int __b) {
4296 return __builtin_altivec_vmaxsw(__a, (vector
int)__b);
4300 vec_max(vector
unsigned int __a, vector
unsigned int __b) {
4301 return __builtin_altivec_vmaxuw(__a, __b);
4305 vec_max(vector
bool int __a, vector
unsigned int __b) {
4306 return __builtin_altivec_vmaxuw((vector
unsigned int)__a, __b);
4310 vec_max(vector
unsigned int __a, vector
bool int __b) {
4311 return __builtin_altivec_vmaxuw(__a, (vector
unsigned int)__b);
4314 #ifdef __POWER8_VECTOR__ 4316 vec_max(vector
signed long long __a, vector
signed long long __b) {
4317 return __builtin_altivec_vmaxsd(__a, __b);
4321 vec_max(vector
bool long long __a, vector
signed long long __b) {
4322 return __builtin_altivec_vmaxsd((vector
signed long long)__a, __b);
4326 vec_max(vector
signed long long __a, vector
bool long long __b) {
4327 return __builtin_altivec_vmaxsd(__a, (vector
signed long long)__b);
4330 static __inline__ vector
unsigned long long __ATTRS_o_ai 4331 vec_max(vector
unsigned long long __a, vector
unsigned long long __b) {
4332 return __builtin_altivec_vmaxud(__a, __b);
4335 static __inline__ vector
unsigned long long __ATTRS_o_ai 4336 vec_max(vector
bool long long __a, vector
unsigned long long __b) {
4337 return __builtin_altivec_vmaxud((vector
unsigned long long)__a, __b);
4340 static __inline__ vector
unsigned long long __ATTRS_o_ai 4341 vec_max(vector
unsigned long long __a, vector
bool long long __b) {
4342 return __builtin_altivec_vmaxud(__a, (vector
unsigned long long)__b);
4349 return __builtin_vsx_xvmaxsp(__a, __b);
4351 return __builtin_altivec_vmaxfp(__a, __b);
4357 vector
double __b) {
4358 return __builtin_vsx_xvmaxdp(__a, __b);
4366 return __builtin_altivec_vmaxsb(__a, __b);
4371 return __builtin_altivec_vmaxsb((vector
signed char)__a, __b);
4376 return __builtin_altivec_vmaxsb(__a, (vector
signed char)__b);
4383 return __builtin_altivec_vmaxub(__a, __b);
4388 return __builtin_altivec_vmaxub((vector
unsigned char)__a, __b);
4393 return __builtin_altivec_vmaxub(__a, (vector
unsigned char)__b);
4400 return __builtin_altivec_vmaxsh(__a, __b);
4405 return __builtin_altivec_vmaxsh((vector
short)__a, __b);
4409 vector
bool short __b) {
4410 return __builtin_altivec_vmaxsh(__a, (vector
short)__b);
4416 vec_vmaxuh(vector
unsigned short __a, vector
unsigned short __b) {
4417 return __builtin_altivec_vmaxuh(__a, __b);
4422 return __builtin_altivec_vmaxuh((vector
unsigned short)__a, __b);
4427 return __builtin_altivec_vmaxuh(__a, (vector
unsigned short)__b);
4434 return __builtin_altivec_vmaxsw(__a, __b);
4439 return __builtin_altivec_vmaxsw((vector
int)__a, __b);
4443 vector
bool int __b) {
4444 return __builtin_altivec_vmaxsw(__a, (vector
int)__b);
4451 return __builtin_altivec_vmaxuw(__a, __b);
4456 return __builtin_altivec_vmaxuw((vector
unsigned int)__a, __b);
4461 return __builtin_altivec_vmaxuw(__a, (vector
unsigned int)__b);
4466 static __inline__ vector
float __attribute__((__always_inline__))
4467 vec_vmaxfp(vector
float __a, vector
float __b) {
4469 return __builtin_vsx_xvmaxsp(__a, __b);
4471 return __builtin_altivec_vmaxfp(__a, __b);
4480 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4481 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4482 0x06, 0x16, 0x07, 0x17));
4488 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4489 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4490 0x06, 0x16, 0x07, 0x17));
4496 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4497 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4498 0x06, 0x16, 0x07, 0x17));
4504 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4505 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4506 0x06, 0x07, 0x16, 0x17));
4510 vec_mergeh(vector
unsigned short __a, vector
unsigned short __b) {
4512 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4513 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4514 0x06, 0x07, 0x16, 0x17));
4520 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4521 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4522 0x06, 0x07, 0x16, 0x17));
4528 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4529 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4530 0x06, 0x07, 0x16, 0x17));
4536 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4537 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4538 0x14, 0x15, 0x16, 0x17));
4544 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4545 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4546 0x14, 0x15, 0x16, 0x17));
4550 vector
bool int __b) {
4552 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4553 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4554 0x14, 0x15, 0x16, 0x17));
4560 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4561 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4562 0x14, 0x15, 0x16, 0x17));
4567 vec_mergeh(vector
signed long long __a, vector
signed long long __b) {
4569 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4570 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4571 0x14, 0x15, 0x16, 0x17));
4575 vec_mergeh(vector
signed long long __a, vector
bool long long __b) {
4576 return vec_perm(__a, (vector
signed long long)__b,
4577 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4578 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4579 0x14, 0x15, 0x16, 0x17));
4583 vec_mergeh(vector
bool long long __a, vector
signed long long __b) {
4584 return vec_perm((vector
signed long long)__a, __b,
4585 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4586 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4587 0x14, 0x15, 0x16, 0x17));
4590 static __inline__ vector
unsigned long long __ATTRS_o_ai 4591 vec_mergeh(vector
unsigned long long __a, vector
unsigned long long __b) {
4593 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4594 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4595 0x14, 0x15, 0x16, 0x17));
4598 static __inline__ vector
unsigned long long __ATTRS_o_ai 4599 vec_mergeh(vector
unsigned long long __a, vector
bool long long __b) {
4600 return vec_perm(__a, (vector
unsigned long long)__b,
4601 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4602 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4603 0x14, 0x15, 0x16, 0x17));
4606 static __inline__ vector
unsigned long long __ATTRS_o_ai 4607 vec_mergeh(vector
bool long long __a, vector
unsigned long long __b) {
4608 return vec_perm((vector
unsigned long long)__a, __b,
4609 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4610 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4611 0x14, 0x15, 0x16, 0x17));
4615 vec_mergeh(vector
bool long long __a, vector
bool long long __b) {
4617 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4618 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4619 0x14, 0x15, 0x16, 0x17));
4623 vector
double __b) {
4625 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4626 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4627 0x14, 0x15, 0x16, 0x17));
4630 vec_mergeh(vector
double __a, vector
bool long long __b) {
4631 return vec_perm(__a, (vector
double)__b,
4632 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4633 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4634 0x14, 0x15, 0x16, 0x17));
4637 vec_mergeh(vector
bool long long __a, vector
double __b) {
4638 return vec_perm((vector
double)__a, __b,
4639 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4640 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4641 0x14, 0x15, 0x16, 0x17));
4647 #define __builtin_altivec_vmrghb vec_vmrghb 4652 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4653 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4654 0x06, 0x16, 0x07, 0x17));
4660 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4661 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4662 0x06, 0x16, 0x07, 0x17));
4668 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4669 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4670 0x06, 0x16, 0x07, 0x17));
4675 #define __builtin_altivec_vmrghh vec_vmrghh 4680 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4681 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4682 0x06, 0x07, 0x16, 0x17));
4686 vec_vmrghh(vector
unsigned short __a, vector
unsigned short __b) {
4688 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4689 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4690 0x06, 0x07, 0x16, 0x17));
4696 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4697 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4698 0x06, 0x07, 0x16, 0x17));
4704 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4705 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4706 0x06, 0x07, 0x16, 0x17));
4711 #define __builtin_altivec_vmrghw vec_vmrghw 4716 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4717 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4718 0x14, 0x15, 0x16, 0x17));
4724 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4725 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4726 0x14, 0x15, 0x16, 0x17));
4730 vector
bool int __b) {
4732 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4733 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4734 0x14, 0x15, 0x16, 0x17));
4740 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4741 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4742 0x14, 0x15, 0x16, 0x17));
4750 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4751 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4752 0x0E, 0x1E, 0x0F, 0x1F));
4758 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4759 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4760 0x0E, 0x1E, 0x0F, 0x1F));
4766 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4767 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4768 0x0E, 0x1E, 0x0F, 0x1F));
4774 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4775 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4776 0x0E, 0x0F, 0x1E, 0x1F));
4780 vec_mergel(vector
unsigned short __a, vector
unsigned short __b) {
4782 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4783 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4784 0x0E, 0x0F, 0x1E, 0x1F));
4790 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4791 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4792 0x0E, 0x0F, 0x1E, 0x1F));
4798 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4799 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4800 0x0E, 0x0F, 0x1E, 0x1F));
4806 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4807 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4808 0x1C, 0x1D, 0x1E, 0x1F));
4814 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4815 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4816 0x1C, 0x1D, 0x1E, 0x1F));
4820 vector
bool int __b) {
4822 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4823 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4824 0x1C, 0x1D, 0x1E, 0x1F));
4830 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4831 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4832 0x1C, 0x1D, 0x1E, 0x1F));
4837 vec_mergel(vector
signed long long __a, vector
signed long long __b) {
4839 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4840 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4841 0x1C, 0x1D, 0x1E, 0x1F));
4844 vec_mergel(vector
signed long long __a, vector
bool long long __b) {
4845 return vec_perm(__a, (vector
signed long long)__b,
4846 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4847 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4848 0x1C, 0x1D, 0x1E, 0x1F));
4851 vec_mergel(vector
bool long long __a, vector
signed long long __b) {
4852 return vec_perm((vector
signed long long)__a, __b,
4853 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4854 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4855 0x1C, 0x1D, 0x1E, 0x1F));
4857 static __inline__ vector
unsigned long long __ATTRS_o_ai 4858 vec_mergel(vector
unsigned long long __a, vector
unsigned long long __b) {
4860 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4861 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4862 0x1C, 0x1D, 0x1E, 0x1F));
4864 static __inline__ vector
unsigned long long __ATTRS_o_ai 4865 vec_mergel(vector
unsigned long long __a, vector
bool long long __b) {
4866 return vec_perm(__a, (vector
unsigned long long)__b,
4867 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4868 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4869 0x1C, 0x1D, 0x1E, 0x1F));
4871 static __inline__ vector
unsigned long long __ATTRS_o_ai 4872 vec_mergel(vector
bool long long __a, vector
unsigned long long __b) {
4873 return vec_perm((vector
unsigned long long)__a, __b,
4874 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4875 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4876 0x1C, 0x1D, 0x1E, 0x1F));
4879 vec_mergel(vector
bool long long __a, vector
bool long long __b) {
4881 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4882 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4883 0x1C, 0x1D, 0x1E, 0x1F));
4886 vector
double __b) {
4888 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4889 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4890 0x1C, 0x1D, 0x1E, 0x1F));
4893 vec_mergel(vector
double __a, vector
bool long long __b) {
4894 return vec_perm(__a, (vector
double)__b,
4895 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4896 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4897 0x1C, 0x1D, 0x1E, 0x1F));
4900 vec_mergel(vector
bool long long __a, vector
double __b) {
4901 return vec_perm((vector
double)__a, __b,
4902 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4903 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4904 0x1C, 0x1D, 0x1E, 0x1F));
4910 #define __builtin_altivec_vmrglb vec_vmrglb 4915 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4916 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4917 0x0E, 0x1E, 0x0F, 0x1F));
4923 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4924 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4925 0x0E, 0x1E, 0x0F, 0x1F));
4931 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4932 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4933 0x0E, 0x1E, 0x0F, 0x1F));
4938 #define __builtin_altivec_vmrglh vec_vmrglh 4943 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4944 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4945 0x0E, 0x0F, 0x1E, 0x1F));
4949 vec_vmrglh(vector
unsigned short __a, vector
unsigned short __b) {
4951 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4952 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4953 0x0E, 0x0F, 0x1E, 0x1F));
4959 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4960 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4961 0x0E, 0x0F, 0x1E, 0x1F));
4967 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4968 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4969 0x0E, 0x0F, 0x1E, 0x1F));
4974 #define __builtin_altivec_vmrglw vec_vmrglw 4979 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4980 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4981 0x1C, 0x1D, 0x1E, 0x1F));
4987 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4988 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4989 0x1C, 0x1D, 0x1E, 0x1F));
4993 vector
bool int __b) {
4995 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4996 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4997 0x1C, 0x1D, 0x1E, 0x1F));
5003 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5004 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5005 0x1C, 0x1D, 0x1E, 0x1F));
5008 #ifdef __POWER8_VECTOR__ 5011 static __inline__ vector
bool int __ATTRS_o_ai vec_mergee(vector
bool int __a,
5012 vector
bool int __b) {
5014 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5015 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5016 0x18, 0x19, 0x1A, 0x1B));
5020 vec_mergee(vector
signed int __a, vector
signed int __b) {
5022 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5023 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5024 0x18, 0x19, 0x1A, 0x1B));
5028 vec_mergee(vector
unsigned int __a, vector
unsigned int __b) {
5030 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5031 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5032 0x18, 0x19, 0x1A, 0x1B));
5036 vec_mergee(vector
bool long long __a, vector
bool long long __b) {
5041 vec_mergee(vector
signed long long __a, vector
signed long long __b) {
5045 static __inline__ vector
unsigned long long __ATTRS_o_ai 5046 vec_mergee(vector
unsigned long long __a, vector
unsigned long long __b) {
5051 vec_mergee(vector
float __a, vector
float __b) {
5053 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5054 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5055 0x18, 0x19, 0x1A, 0x1B));
5059 vec_mergee(vector
double __a, vector
double __b) {
5065 static __inline__ vector
bool int __ATTRS_o_ai vec_mergeo(vector
bool int __a,
5066 vector
bool int __b) {
5068 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5069 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5070 0x1C, 0x1D, 0x1E, 0x1F));
5074 vec_mergeo(vector
signed int __a, vector
signed int __b) {
5076 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5077 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5078 0x1C, 0x1D, 0x1E, 0x1F));
5082 vec_mergeo(vector
unsigned int __a, vector
unsigned int __b) {
5084 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5085 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5086 0x1C, 0x1D, 0x1E, 0x1F));
5090 vec_mergeo(vector
bool long long __a, vector
bool long long __b) {
5095 vec_mergeo(vector
signed long long __a, vector
signed long long __b) {
5099 static __inline__ vector
unsigned long long __ATTRS_o_ai 5100 vec_mergeo(vector
unsigned long long __a, vector
unsigned long long __b) {
5105 vec_mergeo(vector
float __a, vector
float __b) {
5107 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5108 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5109 0x1C, 0x1D, 0x1E, 0x1F));
5113 vec_mergeo(vector
double __a, vector
double __b) {
5121 static __inline__ vector
unsigned short __attribute__((__always_inline__))
5123 return __builtin_altivec_mfvscr();
5129 vec_min(vector
signed char __a, vector
signed char __b) {
5130 return __builtin_altivec_vminsb(__a, __b);
5134 vec_min(vector
bool char __a, vector
signed char __b) {
5135 return __builtin_altivec_vminsb((vector
signed char)__a, __b);
5139 vec_min(vector
signed char __a, vector
bool char __b) {
5140 return __builtin_altivec_vminsb(__a, (vector
signed char)__b);
5144 vec_min(vector
unsigned char __a, vector
unsigned char __b) {
5145 return __builtin_altivec_vminub(__a, __b);
5149 vec_min(vector
bool char __a, vector
unsigned char __b) {
5150 return __builtin_altivec_vminub((vector
unsigned char)__a, __b);
5154 vec_min(vector
unsigned char __a, vector
bool char __b) {
5155 return __builtin_altivec_vminub(__a, (vector
unsigned char)__b);
5160 return __builtin_altivec_vminsh(__a, __b);
5165 return __builtin_altivec_vminsh((vector
short)__a, __b);
5169 vector
bool short __b) {
5170 return __builtin_altivec_vminsh(__a, (vector
short)__b);
5174 vec_min(vector
unsigned short __a, vector
unsigned short __b) {
5175 return __builtin_altivec_vminuh(__a, __b);
5179 vec_min(vector
bool short __a, vector
unsigned short __b) {
5180 return __builtin_altivec_vminuh((vector
unsigned short)__a, __b);
5184 vec_min(vector
unsigned short __a, vector
bool short __b) {
5185 return __builtin_altivec_vminuh(__a, (vector
unsigned short)__b);
5190 return __builtin_altivec_vminsw(__a, __b);
5195 return __builtin_altivec_vminsw((vector
int)__a, __b);
5199 vector
bool int __b) {
5200 return __builtin_altivec_vminsw(__a, (vector
int)__b);
5204 vec_min(vector
unsigned int __a, vector
unsigned int __b) {
5205 return __builtin_altivec_vminuw(__a, __b);
5209 vec_min(vector
bool int __a, vector
unsigned int __b) {
5210 return __builtin_altivec_vminuw((vector
unsigned int)__a, __b);
5214 vec_min(vector
unsigned int __a, vector
bool int __b) {
5215 return __builtin_altivec_vminuw(__a, (vector
unsigned int)__b);
5218 #ifdef __POWER8_VECTOR__ 5220 vec_min(vector
signed long long __a, vector
signed long long __b) {
5221 return __builtin_altivec_vminsd(__a, __b);
5225 vec_min(vector
bool long long __a, vector
signed long long __b) {
5226 return __builtin_altivec_vminsd((vector
signed long long)__a, __b);
5230 vec_min(vector
signed long long __a, vector
bool long long __b) {
5231 return __builtin_altivec_vminsd(__a, (vector
signed long long)__b);
5234 static __inline__ vector
unsigned long long __ATTRS_o_ai 5235 vec_min(vector
unsigned long long __a, vector
unsigned long long __b) {
5236 return __builtin_altivec_vminud(__a, __b);
5239 static __inline__ vector
unsigned long long __ATTRS_o_ai 5240 vec_min(vector
bool long long __a, vector
unsigned long long __b) {
5241 return __builtin_altivec_vminud((vector
unsigned long long)__a, __b);
5244 static __inline__ vector
unsigned long long __ATTRS_o_ai 5245 vec_min(vector
unsigned long long __a, vector
bool long long __b) {
5246 return __builtin_altivec_vminud(__a, (vector
unsigned long long)__b);
5253 return __builtin_vsx_xvminsp(__a, __b);
5255 return __builtin_altivec_vminfp(__a, __b);
5261 vector
double __b) {
5262 return __builtin_vsx_xvmindp(__a, __b);
5270 return __builtin_altivec_vminsb(__a, __b);
5275 return __builtin_altivec_vminsb((vector
signed char)__a, __b);
5280 return __builtin_altivec_vminsb(__a, (vector
signed char)__b);
5287 return __builtin_altivec_vminub(__a, __b);
5292 return __builtin_altivec_vminub((vector
unsigned char)__a, __b);
5297 return __builtin_altivec_vminub(__a, (vector
unsigned char)__b);
5304 return __builtin_altivec_vminsh(__a, __b);
5309 return __builtin_altivec_vminsh((vector
short)__a, __b);
5313 vector
bool short __b) {
5314 return __builtin_altivec_vminsh(__a, (vector
short)__b);
5320 vec_vminuh(vector
unsigned short __a, vector
unsigned short __b) {
5321 return __builtin_altivec_vminuh(__a, __b);
5326 return __builtin_altivec_vminuh((vector
unsigned short)__a, __b);
5331 return __builtin_altivec_vminuh(__a, (vector
unsigned short)__b);
5338 return __builtin_altivec_vminsw(__a, __b);
5343 return __builtin_altivec_vminsw((vector
int)__a, __b);
5347 vector
bool int __b) {
5348 return __builtin_altivec_vminsw(__a, (vector
int)__b);
5355 return __builtin_altivec_vminuw(__a, __b);
5360 return __builtin_altivec_vminuw((vector
unsigned int)__a, __b);
5365 return __builtin_altivec_vminuw(__a, (vector
unsigned int)__b);
5370 static __inline__ vector
float __attribute__((__always_inline__))
5371 vec_vminfp(vector
float __a, vector
float __b) {
5373 return __builtin_vsx_xvminsp(__a, __b);
5375 return __builtin_altivec_vminfp(__a, __b);
5381 #define __builtin_altivec_vmladduhm vec_mladd 5386 return __a * __b +
__c;
5390 vector
short __a, vector
unsigned short __b, vector
unsigned short __c) {
5391 return __a * (vector short)__b + (vector
short)
__c;
5397 return (vector
short)__a * __b +
__c;
5401 vec_mladd(vector
unsigned short __a, vector
unsigned short __b,
5402 vector
unsigned short __c) {
5403 return __a * __b +
__c;
5411 return __a * __b +
__c;
5415 vector
short __a, vector
unsigned short __b, vector
unsigned short __c) {
5416 return __a * (vector short)__b + (vector
short)
__c;
5421 return (vector
short)__a * __b +
__c;
5426 vector
unsigned short __c) {
5427 return __a * __b +
__c;
5432 static __inline__ vector
short __attribute__((__always_inline__))
5433 vec_mradds(vector
short __a, vector
short __b, vector
short __c) {
5434 return __builtin_altivec_vmhraddshs(__a, __b, __c);
5439 static __inline__ vector
short __attribute__((__always_inline__))
5440 vec_vmhraddshs(vector
short __a, vector
short __b, vector
short __c) {
5441 return __builtin_altivec_vmhraddshs(__a, __b, __c);
5447 vector
unsigned char __b,
5449 return __builtin_altivec_vmsummbm(__a, __b, __c);
5453 vec_msum(vector
unsigned char __a, vector
unsigned char __b,
5454 vector
unsigned int __c) {
5455 return __builtin_altivec_vmsumubm(__a, __b, __c);
5461 return __builtin_altivec_vmsumshm(__a, __b, __c);
5465 vec_msum(vector
unsigned short __a, vector
unsigned short __b,
5466 vector
unsigned int __c) {
5467 return __builtin_altivec_vmsumuhm(__a, __b, __c);
5472 static __inline__ vector
int __attribute__((__always_inline__))
5473 vec_vmsummbm(vector
signed char __a, vector
unsigned char __b, vector
int __c) {
5474 return __builtin_altivec_vmsummbm(__a, __b, __c);
5479 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5480 vec_vmsumubm(vector
unsigned char __a, vector
unsigned char __b,
5481 vector
unsigned int __c) {
5482 return __builtin_altivec_vmsumubm(__a, __b, __c);
5487 static __inline__ vector
int __attribute__((__always_inline__))
5488 vec_vmsumshm(vector
short __a, vector
short __b, vector
int __c) {
5489 return __builtin_altivec_vmsumshm(__a, __b, __c);
5494 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5495 vec_vmsumuhm(vector
unsigned short __a, vector
unsigned short __b,
5496 vector
unsigned int __c) {
5497 return __builtin_altivec_vmsumuhm(__a, __b, __c);
5505 return __builtin_altivec_vmsumshs(__a, __b, __c);
5509 vec_msums(vector
unsigned short __a, vector
unsigned short __b,
5510 vector
unsigned int __c) {
5511 return __builtin_altivec_vmsumuhs(__a, __b, __c);
5516 static __inline__ vector
int __attribute__((__always_inline__))
5517 vec_vmsumshs(vector
short __a, vector
short __b, vector
int __c) {
5518 return __builtin_altivec_vmsumshs(__a, __b, __c);
5523 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5524 vec_vmsumuhs(vector
unsigned short __a, vector
unsigned short __b,
5525 vector
unsigned int __c) {
5526 return __builtin_altivec_vmsumuhs(__a, __b, __c);
5532 __builtin_altivec_mtvscr((vector
int)__a);
5536 __builtin_altivec_mtvscr((vector
int)__a);
5540 __builtin_altivec_mtvscr((vector
int)__a);
5544 __builtin_altivec_mtvscr((vector
int)__a);
5548 __builtin_altivec_mtvscr((vector
int)__a);
5552 __builtin_altivec_mtvscr((vector
int)__a);
5556 __builtin_altivec_mtvscr((vector
int)__a);
5560 __builtin_altivec_mtvscr((vector
int)__a);
5564 __builtin_altivec_mtvscr((vector
int)__a);
5568 __builtin_altivec_mtvscr((vector
int)__a);
5572 __builtin_altivec_mtvscr((vector
int)__a);
5582 vec_mul(vector
signed char __a, vector
signed char __b) {
5587 vec_mul(vector
unsigned char __a, vector
unsigned char __b) {
5592 vec_mul(vector
signed short __a, vector
signed short __b) {
5597 vec_mul(vector
unsigned short __a, vector
unsigned short __b) {
5602 vec_mul(vector
signed int __a, vector
signed int __b) {
5607 vec_mul(vector
unsigned int __a, vector
unsigned int __b) {
5613 vec_mul(vector
signed long long __a, vector
signed long long __b) {
5617 static __inline__ vector
unsigned long long __ATTRS_o_ai 5618 vec_mul(vector
unsigned long long __a, vector
unsigned long long __b) {
5630 vector
double __b) {
5641 vector
signed char __b) {
5642 #ifdef __LITTLE_ENDIAN__ 5643 return __builtin_altivec_vmulosb(__a, __b);
5645 return __builtin_altivec_vmulesb(__a, __b);
5650 vec_mule(vector
unsigned char __a, vector
unsigned char __b) {
5651 #ifdef __LITTLE_ENDIAN__ 5652 return __builtin_altivec_vmuloub(__a, __b);
5654 return __builtin_altivec_vmuleub(__a, __b);
5660 #ifdef __LITTLE_ENDIAN__ 5661 return __builtin_altivec_vmulosh(__a, __b);
5663 return __builtin_altivec_vmulesh(__a, __b);
5668 vec_mule(vector
unsigned short __a, vector
unsigned short __b) {
5669 #ifdef __LITTLE_ENDIAN__ 5670 return __builtin_altivec_vmulouh(__a, __b);
5672 return __builtin_altivec_vmuleuh(__a, __b);
5676 #ifdef __POWER8_VECTOR__ 5678 vec_mule(vector
signed int __a, vector
signed int __b) {
5679 #ifdef __LITTLE_ENDIAN__ 5680 return __builtin_altivec_vmulosw(__a, __b);
5682 return __builtin_altivec_vmulesw(__a, __b);
5686 static __inline__ vector
unsigned long long __ATTRS_o_ai 5687 vec_mule(vector
unsigned int __a, vector
unsigned int __b) {
5688 #ifdef __LITTLE_ENDIAN__ 5689 return __builtin_altivec_vmulouw(__a, __b);
5691 return __builtin_altivec_vmuleuw(__a, __b);
5698 static __inline__ vector
short __attribute__((__always_inline__))
5699 vec_vmulesb(vector
signed char __a, vector
signed char __b) {
5700 #ifdef __LITTLE_ENDIAN__ 5701 return __builtin_altivec_vmulosb(__a, __b);
5703 return __builtin_altivec_vmulesb(__a, __b);
5709 static __inline__ vector
unsigned short __attribute__((__always_inline__))
5710 vec_vmuleub(vector
unsigned char __a, vector
unsigned char __b) {
5711 #ifdef __LITTLE_ENDIAN__ 5712 return __builtin_altivec_vmuloub(__a, __b);
5714 return __builtin_altivec_vmuleub(__a, __b);
5720 static __inline__ vector
int __attribute__((__always_inline__))
5721 vec_vmulesh(vector
short __a, vector
short __b) {
5722 #ifdef __LITTLE_ENDIAN__ 5723 return __builtin_altivec_vmulosh(__a, __b);
5725 return __builtin_altivec_vmulesh(__a, __b);
5731 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5732 vec_vmuleuh(vector
unsigned short __a, vector
unsigned short __b) {
5733 #ifdef __LITTLE_ENDIAN__ 5734 return __builtin_altivec_vmulouh(__a, __b);
5736 return __builtin_altivec_vmuleuh(__a, __b);
5743 vector
signed char __b) {
5744 #ifdef __LITTLE_ENDIAN__ 5745 return __builtin_altivec_vmulesb(__a, __b);
5747 return __builtin_altivec_vmulosb(__a, __b);
5752 vec_mulo(vector
unsigned char __a, vector
unsigned char __b) {
5753 #ifdef __LITTLE_ENDIAN__ 5754 return __builtin_altivec_vmuleub(__a, __b);
5756 return __builtin_altivec_vmuloub(__a, __b);
5762 #ifdef __LITTLE_ENDIAN__ 5763 return __builtin_altivec_vmulesh(__a, __b);
5765 return __builtin_altivec_vmulosh(__a, __b);
5770 vec_mulo(vector
unsigned short __a, vector
unsigned short __b) {
5771 #ifdef __LITTLE_ENDIAN__ 5772 return __builtin_altivec_vmuleuh(__a, __b);
5774 return __builtin_altivec_vmulouh(__a, __b);
5778 #ifdef __POWER8_VECTOR__ 5780 vec_mulo(vector
signed int __a, vector
signed int __b) {
5781 #ifdef __LITTLE_ENDIAN__ 5782 return __builtin_altivec_vmulesw(__a, __b);
5784 return __builtin_altivec_vmulosw(__a, __b);
5788 static __inline__ vector
unsigned long long __ATTRS_o_ai 5789 vec_mulo(vector
unsigned int __a, vector
unsigned int __b) {
5790 #ifdef __LITTLE_ENDIAN__ 5791 return __builtin_altivec_vmuleuw(__a, __b);
5793 return __builtin_altivec_vmulouw(__a, __b);
5800 static __inline__ vector
short __attribute__((__always_inline__))
5801 vec_vmulosb(vector
signed char __a, vector
signed char __b) {
5802 #ifdef __LITTLE_ENDIAN__ 5803 return __builtin_altivec_vmulesb(__a, __b);
5805 return __builtin_altivec_vmulosb(__a, __b);
5811 static __inline__ vector
unsigned short __attribute__((__always_inline__))
5812 vec_vmuloub(vector
unsigned char __a, vector
unsigned char __b) {
5813 #ifdef __LITTLE_ENDIAN__ 5814 return __builtin_altivec_vmuleub(__a, __b);
5816 return __builtin_altivec_vmuloub(__a, __b);
5822 static __inline__ vector
int __attribute__((__always_inline__))
5823 vec_vmulosh(vector
short __a, vector
short __b) {
5824 #ifdef __LITTLE_ENDIAN__ 5825 return __builtin_altivec_vmulesh(__a, __b);
5827 return __builtin_altivec_vmulosh(__a, __b);
5833 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5834 vec_vmulouh(vector
unsigned short __a, vector
unsigned short __b) {
5835 #ifdef __LITTLE_ENDIAN__ 5836 return __builtin_altivec_vmuleuh(__a, __b);
5838 return __builtin_altivec_vmulouh(__a, __b);
5844 #ifdef __POWER8_VECTOR__ 5846 vec_nand(vector
signed char __a, vector
signed char __b) {
5847 return ~(__a &
__b);
5851 vec_nand(vector
signed char __a, vector
bool char __b) {
5852 return ~(__a &
__b);
5856 vec_nand(vector
bool char __a, vector
signed char __b) {
5857 return ~(__a &
__b);
5861 vec_nand(vector
unsigned char __a, vector
unsigned char __b) {
5862 return ~(__a &
__b);
5866 vec_nand(vector
unsigned char __a, vector
bool char __b) {
5867 return ~(__a &
__b);
5871 vec_nand(vector
bool char __a, vector
unsigned char __b) {
5872 return ~(__a &
__b);
5875 static __inline__ vector
bool char __ATTRS_o_ai vec_nand(vector
bool char __a,
5876 vector
bool char __b) {
5877 return ~(__a &
__b);
5881 vec_nand(vector
signed short __a, vector
signed short __b) {
5882 return ~(__a &
__b);
5886 vec_nand(vector
signed short __a, vector
bool short __b) {
5887 return ~(__a &
__b);
5891 vec_nand(vector
bool short __a, vector
signed short __b) {
5892 return ~(__a &
__b);
5896 vec_nand(vector
unsigned short __a, vector
unsigned short __b) {
5897 return ~(__a &
__b);
5901 vec_nand(vector
unsigned short __a, vector
bool short __b) {
5902 return ~(__a &
__b);
5906 vec_nand(vector
bool short __a, vector
bool short __b) {
5907 return ~(__a &
__b);
5911 vec_nand(vector
signed int __a, vector
signed int __b) {
5912 return ~(__a &
__b);
5915 static __inline__ vector
signed int __ATTRS_o_ai vec_nand(vector
signed int __a,
5916 vector
bool int __b) {
5917 return ~(__a &
__b);
5921 vec_nand(vector
bool int __a, vector
signed int __b) {
5922 return ~(__a &
__b);
5926 vec_nand(vector
unsigned int __a, vector
unsigned int __b) {
5927 return ~(__a &
__b);
5931 vec_nand(vector
unsigned int __a, vector
bool int __b) {
5932 return ~(__a &
__b);
5936 vec_nand(vector
bool int __a, vector
unsigned int __b) {
5937 return ~(__a &
__b);
5940 static __inline__ vector
bool int __ATTRS_o_ai vec_nand(vector
bool int __a,
5941 vector
bool int __b) {
5942 return ~(__a &
__b);
5946 vec_nand(vector
float __a, vector
float __b) {
5947 return (vector
float)(~((vector
unsigned int)__a &
5948 (vector
unsigned int)
__b));
5952 vec_nand(vector
signed long long __a, vector
signed long long __b) {
5953 return ~(__a &
__b);
5957 vec_nand(vector
signed long long __a, vector
bool long long __b) {
5958 return ~(__a &
__b);
5962 vec_nand(vector
bool long long __a, vector
signed long long __b) {
5963 return ~(__a &
__b);
5966 static __inline__ vector
unsigned long long __ATTRS_o_ai 5967 vec_nand(vector
unsigned long long __a, vector
unsigned long long __b) {
5968 return ~(__a &
__b);
5971 static __inline__ vector
unsigned long long __ATTRS_o_ai 5972 vec_nand(vector
unsigned long long __a, vector
bool long long __b) {
5973 return ~(__a &
__b);
5976 static __inline__ vector
unsigned long long __ATTRS_o_ai 5977 vec_nand(vector
bool long long __a, vector
unsigned long long __b) {
5978 return ~(__a &
__b);
5982 vec_nand(vector
bool long long __a, vector
bool long long __b) {
5983 return ~(__a &
__b);
5987 vec_nand(vector
double __a, vector
double __b) {
5988 return (vector
double)(~((vector
unsigned long long)__a &
5989 (vector
unsigned long long)
__b));
5997 static __inline__ vector
float __ATTRS_o_ai vec_nmadd(vector
float __a,
6000 return __builtin_vsx_xvnmaddasp(__a, __b, __c);
6003 static __inline__ vector
double __ATTRS_o_ai vec_nmadd(vector
double __a,
6005 vector
double __c) {
6006 return __builtin_vsx_xvnmaddadp(__a, __b, __c);
6016 return __builtin_vsx_xvnmsubasp(__a, __b, __c);
6018 return __builtin_altivec_vnmsubfp(__a, __b, __c);
6025 vector
double __c) {
6026 return __builtin_vsx_xvnmsubadp(__a, __b, __c);
6032 static __inline__ vector
float __attribute__((__always_inline__))
6033 vec_vnmsubfp(vector
float __a, vector
float __b, vector
float __c) {
6034 return __builtin_altivec_vnmsubfp(__a, __b, __c);
6039 #define __builtin_altivec_vnor vec_nor 6042 vec_nor(vector
signed char __a, vector
signed char __b) {
6043 return ~(__a |
__b);
6047 vec_nor(vector
unsigned char __a, vector
unsigned char __b) {
6048 return ~(__a |
__b);
6052 vector
bool char __b) {
6053 return ~(__a |
__b);
6058 return ~(__a |
__b);
6062 vec_nor(vector
unsigned short __a, vector
unsigned short __b) {
6063 return ~(__a |
__b);
6067 vec_nor(vector
bool short __a, vector
bool short __b) {
6068 return ~(__a |
__b);
6073 return ~(__a |
__b);
6077 vec_nor(vector
unsigned int __a, vector
unsigned int __b) {
6078 return ~(__a |
__b);
6082 vector
bool int __b) {
6083 return ~(__a |
__b);
6088 vector
unsigned int __res =
6089 ~((vector
unsigned int)__a | (vector
unsigned int)
__b);
6090 return (vector
float)__res;
6095 vector
double __b) {
6096 vector
unsigned long long __res =
6097 ~((vector
unsigned long long)__a | (vector
unsigned long long)
__b);
6098 return (vector
double)__res;
6105 vec_vnor(vector
signed char __a, vector
signed char __b) {
6106 return ~(__a |
__b);
6110 vec_vnor(vector
unsigned char __a, vector
unsigned char __b) {
6111 return ~(__a |
__b);
6115 vector
bool char __b) {
6116 return ~(__a |
__b);
6121 return ~(__a |
__b);
6125 vec_vnor(vector
unsigned short __a, vector
unsigned short __b) {
6126 return ~(__a |
__b);
6130 vec_vnor(vector
bool short __a, vector
bool short __b) {
6131 return ~(__a |
__b);
6136 return ~(__a |
__b);
6140 vec_vnor(vector
unsigned int __a, vector
unsigned int __b) {
6141 return ~(__a |
__b);
6145 vector
bool int __b) {
6146 return ~(__a |
__b);
6151 vector
unsigned int __res =
6152 ~((vector
unsigned int)__a | (vector
unsigned int)
__b);
6153 return (vector
float)__res;
6158 vec_nor(vector
signed long long __a, vector
signed long long __b) {
6159 return ~(__a |
__b);
6162 static __inline__ vector
unsigned long long __ATTRS_o_ai 6163 vec_nor(vector
unsigned long long __a, vector
unsigned long long __b) {
6164 return ~(__a |
__b);
6168 vec_nor(vector
bool long long __a, vector
bool long long __b) {
6169 return ~(__a |
__b);
6175 #define __builtin_altivec_vor vec_or 6178 vec_or(vector
signed char __a, vector
signed char __b) {
6183 vec_or(vector
bool char __a, vector
signed char __b) {
6184 return (vector
signed char)__a |
__b;
6188 vector
bool char __b) {
6189 return __a | (vector
signed char)__b;
6193 vec_or(vector
unsigned char __a, vector
unsigned char __b) {
6198 vec_or(vector
bool char __a, vector
unsigned char __b) {
6199 return (vector
unsigned char)__a |
__b;
6203 vec_or(vector
unsigned char __a, vector
bool char __b) {
6204 return __a | (vector
unsigned char)__b;
6208 vector
bool char __b) {
6219 return (vector
short)__a |
__b;
6223 vector
bool short __b) {
6224 return __a | (vector short)__b;
6228 vec_or(vector
unsigned short __a, vector
unsigned short __b) {
6233 vec_or(vector
bool short __a, vector
unsigned short __b) {
6234 return (vector
unsigned short)__a |
__b;
6238 vec_or(vector
unsigned short __a, vector
bool short __b) {
6239 return __a | (vector
unsigned short)__b;
6243 vector
bool short __b) {
6254 return (vector
int)__a |
__b;
6258 vector
bool int __b) {
6259 return __a | (vector int)__b;
6263 vec_or(vector
unsigned int __a, vector
unsigned int __b) {
6268 vec_or(vector
bool int __a, vector
unsigned int __b) {
6269 return (vector
unsigned int)__a |
__b;
6273 vec_or(vector
unsigned int __a, vector
bool int __b) {
6274 return __a | (vector
unsigned int)__b;
6278 vector
bool int __b) {
6284 vector
unsigned int __res =
6285 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6286 return (vector
float)__res;
6291 vector
unsigned int __res =
6292 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6293 return (vector
float)__res;
6297 vector
bool int __b) {
6298 vector
unsigned int __res =
6299 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6300 return (vector
float)__res;
6305 vector
double __b) {
6306 return (vector
double)((vector
unsigned long long)__a |
6307 (vector
unsigned long long)
__b);
6311 vector
bool long long __b) {
6312 return (vector
double)((vector
unsigned long long)__a |
6313 (vector
unsigned long long)
__b);
6317 vector
double __b) {
6318 return (vector
double)((vector
unsigned long long)__a |
6319 (vector
unsigned long long)
__b);
6323 vec_or(vector
signed long long __a, vector
signed long long __b) {
6328 vec_or(vector
bool long long __a, vector
signed long long __b) {
6329 return (vector
signed long long)__a |
__b;
6333 vec_or(vector
signed long long __a, vector
bool long long __b) {
6334 return __a | (vector
signed long long)__b;
6337 static __inline__ vector
unsigned long long __ATTRS_o_ai 6338 vec_or(vector
unsigned long long __a, vector
unsigned long long __b) {
6342 static __inline__ vector
unsigned long long __ATTRS_o_ai 6343 vec_or(vector
bool long long __a, vector
unsigned long long __b) {
6344 return (vector
unsigned long long)__a |
__b;
6347 static __inline__ vector
unsigned long long __ATTRS_o_ai 6348 vec_or(vector
unsigned long long __a, vector
bool long long __b) {
6349 return __a | (vector
unsigned long long)__b;
6353 vec_or(vector
bool long long __a, vector
bool long long __b) {
6358 #ifdef __POWER8_VECTOR__ 6360 vec_orc(vector
signed char __a, vector
signed char __b) {
6365 vec_orc(vector
signed char __a, vector
bool char __b) {
6370 vec_orc(vector
bool char __a, vector
signed char __b) {
6375 vec_orc(vector
unsigned char __a, vector
unsigned char __b) {
6380 vec_orc(vector
unsigned char __a, vector
bool char __b) {
6385 vec_orc(vector
bool char __a, vector
unsigned char __b) {
6389 static __inline__ vector
bool char __ATTRS_o_ai vec_orc(vector
bool char __a,
6390 vector
bool char __b) {
6395 vec_orc(vector
signed short __a, vector
signed short __b) {
6400 vec_orc(vector
signed short __a, vector
bool short __b) {
6405 vec_orc(vector
bool short __a, vector
signed short __b) {
6410 vec_orc(vector
unsigned short __a, vector
unsigned short __b) {
6415 vec_orc(vector
unsigned short __a, vector
bool short __b) {
6420 vec_orc(vector
bool short __a, vector
unsigned short __b) {
6425 vec_orc(vector
bool short __a, vector
bool short __b) {
6430 vec_orc(vector
signed int __a, vector
signed int __b) {
6434 static __inline__ vector
signed int __ATTRS_o_ai vec_orc(vector
signed int __a,
6435 vector
bool int __b) {
6440 vec_orc(vector
bool int __a, vector
signed int __b) {
6445 vec_orc(vector
unsigned int __a, vector
unsigned int __b) {
6450 vec_orc(vector
unsigned int __a, vector
bool int __b) {
6455 vec_orc(vector
bool int __a, vector
unsigned int __b) {
6459 static __inline__ vector
bool int __ATTRS_o_ai vec_orc(vector
bool int __a,
6460 vector
bool int __b) {
6465 vec_orc(vector
bool int __a, vector
float __b) {
6466 return (vector
float)(__a | ~(vector
unsigned int)__b);
6470 vec_orc(vector
float __a, vector
bool int __b) {
6471 return (vector
float)((vector
unsigned int)__a | ~__b);
6475 vec_orc(vector
signed long long __a, vector
signed long long __b) {
6480 vec_orc(vector
signed long long __a, vector
bool long long __b) {
6485 vec_orc(vector
bool long long __a, vector
signed long long __b) {
6489 static __inline__ vector
unsigned long long __ATTRS_o_ai 6490 vec_orc(vector
unsigned long long __a, vector
unsigned long long __b) {
6494 static __inline__ vector
unsigned long long __ATTRS_o_ai 6495 vec_orc(vector
unsigned long long __a, vector
bool long long __b) {
6499 static __inline__ vector
unsigned long long __ATTRS_o_ai 6500 vec_orc(vector
bool long long __a, vector
unsigned long long __b) {
6505 vec_orc(vector
bool long long __a, vector
bool long long __b) {
6510 vec_orc(vector
double __a, vector
bool long long __b) {
6511 return (vector
double)((vector
unsigned long long)__a | ~__b);
6515 vec_orc(vector
bool long long __a, vector
double __b) {
6516 return (vector
double)(__a | ~(vector
unsigned long long)__b);
6523 vec_vor(vector
signed char __a, vector
signed char __b) {
6528 vec_vor(vector
bool char __a, vector
signed char __b) {
6529 return (vector
signed char)__a |
__b;
6533 vec_vor(vector
signed char __a, vector
bool char __b) {
6534 return __a | (vector
signed char)__b;
6538 vec_vor(vector
unsigned char __a, vector
unsigned char __b) {
6543 vec_vor(vector
bool char __a, vector
unsigned char __b) {
6544 return (vector
unsigned char)__a |
__b;
6548 vec_vor(vector
unsigned char __a, vector
bool char __b) {
6549 return __a | (vector
unsigned char)__b;
6553 vector
bool char __b) {
6564 return (vector
short)__a |
__b;
6568 vector
bool short __b) {
6569 return __a | (vector short)__b;
6573 vec_vor(vector
unsigned short __a, vector
unsigned short __b) {
6578 vec_vor(vector
bool short __a, vector
unsigned short __b) {
6579 return (vector
unsigned short)__a |
__b;
6583 vec_vor(vector
unsigned short __a, vector
bool short __b) {
6584 return __a | (vector
unsigned short)__b;
6588 vec_vor(vector
bool short __a, vector
bool short __b) {
6599 return (vector
int)__a |
__b;
6603 vector
bool int __b) {
6604 return __a | (vector int)__b;
6608 vec_vor(vector
unsigned int __a, vector
unsigned int __b) {
6613 vec_vor(vector
bool int __a, vector
unsigned int __b) {
6614 return (vector
unsigned int)__a |
__b;
6618 vec_vor(vector
unsigned int __a, vector
bool int __b) {
6619 return __a | (vector
unsigned int)__b;
6623 vector
bool int __b) {
6629 vector
unsigned int __res =
6630 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6631 return (vector
float)__res;
6636 vector
unsigned int __res =
6637 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6638 return (vector
float)__res;
6642 vector
bool int __b) {
6643 vector
unsigned int __res =
6644 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6645 return (vector
float)__res;
6650 vec_vor(vector
signed long long __a, vector
signed long long __b) {
6655 vec_vor(vector
bool long long __a, vector
signed long long __b) {
6656 return (vector
signed long long)__a |
__b;
6660 vec_vor(vector
signed long long __a, vector
bool long long __b) {
6661 return __a | (vector
signed long long)__b;
6664 static __inline__ vector
unsigned long long __ATTRS_o_ai 6665 vec_vor(vector
unsigned long long __a, vector
unsigned long long __b) {
6669 static __inline__ vector
unsigned long long __ATTRS_o_ai 6670 vec_vor(vector
bool long long __a, vector
unsigned long long __b) {
6671 return (vector
unsigned long long)__a |
__b;
6674 static __inline__ vector
unsigned long long __ATTRS_o_ai 6675 vec_vor(vector
unsigned long long __a, vector
bool long long __b) {
6676 return __a | (vector
unsigned long long)__b;
6680 vec_vor(vector
bool long long __a, vector
bool long long __b) {
6691 vec_pack(vector
signed short __a, vector
signed short __b) {
6692 #ifdef __LITTLE_ENDIAN__ 6693 return (vector
signed char)
vec_perm(
6695 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6696 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6698 return (vector
signed char)
vec_perm(
6700 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6701 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6706 vec_pack(vector
unsigned short __a, vector
unsigned short __b) {
6707 #ifdef __LITTLE_ENDIAN__ 6708 return (vector
unsigned char)
vec_perm(
6710 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6711 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6713 return (vector
unsigned char)
vec_perm(
6715 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6716 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6721 vec_pack(vector
bool short __a, vector
bool short __b) {
6722 #ifdef __LITTLE_ENDIAN__ 6725 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6726 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6730 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6731 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6737 #ifdef __LITTLE_ENDIAN__ 6740 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6741 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6745 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6746 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6751 vec_pack(vector
unsigned int __a, vector
unsigned int __b) {
6752 #ifdef __LITTLE_ENDIAN__ 6753 return (vector
unsigned short)
vec_perm(
6755 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6756 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6758 return (vector
unsigned short)
vec_perm(
6760 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6761 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6766 vector
bool int __b) {
6767 #ifdef __LITTLE_ENDIAN__ 6768 return (vector
bool short)
vec_perm(
6770 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6771 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6773 return (vector
bool short)
vec_perm(
6775 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6776 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6782 vec_pack(vector
signed long long __a, vector
signed long long __b) {
6783 #ifdef __LITTLE_ENDIAN__ 6784 return (vector
signed int)
vec_perm(
6786 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6787 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6789 return (vector
signed int)
vec_perm(
6791 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6792 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6796 vec_pack(vector
unsigned long long __a, vector
unsigned long long __b) {
6797 #ifdef __LITTLE_ENDIAN__ 6798 return (vector
unsigned int)
vec_perm(
6800 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6801 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6803 return (vector
unsigned int)
vec_perm(
6805 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6806 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6811 vec_pack(vector
bool long long __a, vector
bool long long __b) {
6812 #ifdef __LITTLE_ENDIAN__ 6815 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6816 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6820 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6821 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6826 vec_pack(vector
double __a, vector
double __b) {
6827 return (vector
float) (__a[0], __a[1], __b[0], __b[1]);
6831 #ifdef __POWER9_VECTOR__ 6833 vec_pack_to_short_fp32(vector
float __a, vector
float __b) {
6834 vector
float __resa = __builtin_vsx_xvcvsphp(__a);
6835 vector
float __resb = __builtin_vsx_xvcvsphp(__b);
6836 #ifdef __LITTLE_ENDIAN__ 6837 return (vector
unsigned short)vec_mergee(__resa, __resb);
6839 return (vector
unsigned short)vec_mergeo(__resa, __resb);
6846 #define __builtin_altivec_vpkuhum vec_vpkuhum 6850 #ifdef __LITTLE_ENDIAN__ 6851 return (vector
signed char)
vec_perm(
6853 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6854 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6856 return (vector
signed char)
vec_perm(
6858 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6859 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6865 #ifdef __LITTLE_ENDIAN__ 6866 return (vector
unsigned char)
vec_perm(
6868 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6869 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6871 return (vector
unsigned char)
vec_perm(
6873 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6874 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6880 #ifdef __LITTLE_ENDIAN__ 6883 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6884 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6888 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6889 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6895 #define __builtin_altivec_vpkuwum vec_vpkuwum 6899 #ifdef __LITTLE_ENDIAN__ 6902 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6903 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6907 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6908 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6914 #ifdef __LITTLE_ENDIAN__ 6915 return (vector
unsigned short)
vec_perm(
6917 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6918 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6920 return (vector
unsigned short)
vec_perm(
6922 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6923 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6929 #ifdef __LITTLE_ENDIAN__ 6930 return (vector
bool short)
vec_perm(
6932 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6933 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6935 return (vector
bool short)
vec_perm(
6937 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6938 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6944 #ifdef __POWER8_VECTOR__ 6945 #define __builtin_altivec_vpkudum vec_vpkudum 6947 static __inline__ vector
int __ATTRS_o_ai vec_vpkudum(vector
long long __a,
6948 vector
long long __b) {
6949 #ifdef __LITTLE_ENDIAN__ 6952 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6953 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6957 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6958 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6963 vec_vpkudum(vector
unsigned long long __a, vector
unsigned long long __b) {
6964 #ifdef __LITTLE_ENDIAN__ 6965 return (vector
unsigned int)
vec_perm(
6967 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6968 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6970 return (vector
unsigned int)
vec_perm(
6972 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6973 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6978 vec_vpkudum(vector
bool long long __a, vector
bool long long __b) {
6979 #ifdef __LITTLE_ENDIAN__ 6981 (vector
long long)__a, (vector
long long)__b,
6982 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6983 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6986 (vector
long long)__a, (vector
long long)__b,
6987 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6988 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6995 static __inline__ vector pixel
__attribute__((__always_inline__))
6996 vec_packpx(vector
unsigned int __a, vector
unsigned int __b) {
6997 #ifdef __LITTLE_ENDIAN__ 6998 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
7000 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
7006 static __inline__ vector pixel
__attribute__((__always_inline__))
7007 vec_vpkpx(vector
unsigned int __a, vector
unsigned int __b) {
7008 #ifdef __LITTLE_ENDIAN__ 7009 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
7011 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
7019 #ifdef __LITTLE_ENDIAN__ 7020 return __builtin_altivec_vpkshss(__b, __a);
7022 return __builtin_altivec_vpkshss(__a, __b);
7027 vec_packs(vector
unsigned short __a, vector
unsigned short __b) {
7028 #ifdef __LITTLE_ENDIAN__ 7029 return __builtin_altivec_vpkuhus(__b, __a);
7031 return __builtin_altivec_vpkuhus(__a, __b);
7037 #ifdef __LITTLE_ENDIAN__ 7038 return __builtin_altivec_vpkswss(__b, __a);
7040 return __builtin_altivec_vpkswss(__a, __b);
7045 vec_packs(vector
unsigned int __a, vector
unsigned int __b) {
7046 #ifdef __LITTLE_ENDIAN__ 7047 return __builtin_altivec_vpkuwus(__b, __a);
7049 return __builtin_altivec_vpkuwus(__a, __b);
7053 #ifdef __POWER8_VECTOR__ 7055 vector
long long __b) {
7056 #ifdef __LITTLE_ENDIAN__ 7057 return __builtin_altivec_vpksdss(__b, __a);
7059 return __builtin_altivec_vpksdss(__a, __b);
7064 vec_packs(vector
unsigned long long __a, vector
unsigned long long __b) {
7065 #ifdef __LITTLE_ENDIAN__ 7066 return __builtin_altivec_vpkudus(__b, __a);
7068 return __builtin_altivec_vpkudus(__a, __b);
7075 static __inline__ vector
signed char __attribute__((__always_inline__))
7076 vec_vpkshss(vector
short __a, vector
short __b) {
7077 #ifdef __LITTLE_ENDIAN__ 7078 return __builtin_altivec_vpkshss(__b, __a);
7080 return __builtin_altivec_vpkshss(__a, __b);
7086 #ifdef __POWER8_VECTOR__ 7087 static __inline__ vector
int __ATTRS_o_ai vec_vpksdss(vector
long long __a,
7088 vector
long long __b) {
7089 #ifdef __LITTLE_ENDIAN__ 7090 return __builtin_altivec_vpksdss(__b, __a);
7092 return __builtin_altivec_vpksdss(__a, __b);
7099 static __inline__ vector
unsigned char __attribute__((__always_inline__))
7100 vec_vpkuhus(vector
unsigned short __a, vector
unsigned short __b) {
7101 #ifdef __LITTLE_ENDIAN__ 7102 return __builtin_altivec_vpkuhus(__b, __a);
7104 return __builtin_altivec_vpkuhus(__a, __b);
7110 #ifdef __POWER8_VECTOR__ 7111 static __inline__ vector
unsigned int __attribute__((__always_inline__))
7112 vec_vpkudus(vector
unsigned long long __a, vector
unsigned long long __b) {
7113 #ifdef __LITTLE_ENDIAN__ 7114 return __builtin_altivec_vpkudus(__b, __a);
7116 return __builtin_altivec_vpkudus(__a, __b);
7123 static __inline__ vector
signed short __attribute__((__always_inline__))
7124 vec_vpkswss(vector
int __a, vector
int __b) {
7125 #ifdef __LITTLE_ENDIAN__ 7126 return __builtin_altivec_vpkswss(__b, __a);
7128 return __builtin_altivec_vpkswss(__a, __b);
7134 static __inline__ vector
unsigned short __attribute__((__always_inline__))
7135 vec_vpkuwus(vector
unsigned int __a, vector
unsigned int __b) {
7136 #ifdef __LITTLE_ENDIAN__ 7137 return __builtin_altivec_vpkuwus(__b, __a);
7139 return __builtin_altivec_vpkuwus(__a, __b);
7147 #ifdef __LITTLE_ENDIAN__ 7148 return __builtin_altivec_vpkshus(__b, __a);
7150 return __builtin_altivec_vpkshus(__a, __b);
7155 vec_packsu(vector
unsigned short __a, vector
unsigned short __b) {
7156 #ifdef __LITTLE_ENDIAN__ 7157 return __builtin_altivec_vpkuhus(__b, __a);
7159 return __builtin_altivec_vpkuhus(__a, __b);
7165 #ifdef __LITTLE_ENDIAN__ 7166 return __builtin_altivec_vpkswus(__b, __a);
7168 return __builtin_altivec_vpkswus(__a, __b);
7174 #ifdef __LITTLE_ENDIAN__ 7175 return __builtin_altivec_vpkuwus(__b, __a);
7177 return __builtin_altivec_vpkuwus(__a, __b);
7181 #ifdef __POWER8_VECTOR__ 7183 vec_packsu(vector
long long __a, vector
long long __b) {
7184 #ifdef __LITTLE_ENDIAN__ 7185 return __builtin_altivec_vpksdus(__b, __a);
7187 return __builtin_altivec_vpksdus(__a, __b);
7192 vec_packsu(vector
unsigned long long __a, vector
unsigned long long __b) {
7193 #ifdef __LITTLE_ENDIAN__ 7194 return __builtin_altivec_vpkudus(__b, __a);
7196 return __builtin_altivec_vpkudus(__a, __b);
7205 #ifdef __LITTLE_ENDIAN__ 7206 return __builtin_altivec_vpkshus(__b, __a);
7208 return __builtin_altivec_vpkshus(__a, __b);
7214 #ifdef __LITTLE_ENDIAN__ 7215 return __builtin_altivec_vpkuhus(__b, __a);
7217 return __builtin_altivec_vpkuhus(__a, __b);
7225 #ifdef __LITTLE_ENDIAN__ 7226 return __builtin_altivec_vpkswus(__b, __a);
7228 return __builtin_altivec_vpkswus(__a, __b);
7234 #ifdef __LITTLE_ENDIAN__ 7235 return __builtin_altivec_vpkuwus(__b, __a);
7237 return __builtin_altivec_vpkuwus(__a, __b);
7243 #ifdef __POWER8_VECTOR__ 7245 vec_vpksdus(vector
long long __a, vector
long long __b) {
7246 #ifdef __LITTLE_ENDIAN__ 7247 return __builtin_altivec_vpksdus(__b, __a);
7249 return __builtin_altivec_vpksdus(__a, __b);
7265 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7266 #ifdef __LITTLE_ENDIAN__ 7267 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7268 255, 255, 255, 255, 255, 255, 255, 255};
7270 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)__b,
7271 (vector
int)__a, __d);
7273 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)__a,
7274 (vector
int)__b, __c);
7279 vec_perm(vector
unsigned char __a, vector
unsigned char __b,
7280 vector
unsigned char __c) {
7281 #ifdef __LITTLE_ENDIAN__ 7282 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7283 255, 255, 255, 255, 255, 255, 255, 255};
7285 return (vector
unsigned char)__builtin_altivec_vperm_4si(
7286 (vector
int)__b, (vector
int)__a, __d);
7288 return (vector
unsigned char)__builtin_altivec_vperm_4si(
7289 (vector
int)__a, (vector
int)__b, __c);
7294 vec_perm(vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7295 #ifdef __LITTLE_ENDIAN__ 7296 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7297 255, 255, 255, 255, 255, 255, 255, 255};
7299 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)__b,
7300 (vector
int)__a, __d);
7302 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)__a,
7303 (vector
int)__b, __c);
7308 vector
signed short __b,
7309 vector
unsigned char __c) {
7310 #ifdef __LITTLE_ENDIAN__ 7311 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7312 255, 255, 255, 255, 255, 255, 255, 255};
7314 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)__b,
7315 (vector
int)__a, __d);
7317 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)__a,
7318 (vector
int)__b, __c);
7323 vec_perm(vector
unsigned short __a, vector
unsigned short __b,
7324 vector
unsigned char __c) {
7325 #ifdef __LITTLE_ENDIAN__ 7326 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7327 255, 255, 255, 255, 255, 255, 255, 255};
7329 return (vector
unsigned short)__builtin_altivec_vperm_4si(
7330 (vector
int)__b, (vector
int)__a, __d);
7332 return (vector
unsigned short)__builtin_altivec_vperm_4si(
7333 (vector
int)__a, (vector
int)__b, __c);
7338 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
7339 #ifdef __LITTLE_ENDIAN__ 7340 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7341 255, 255, 255, 255, 255, 255, 255, 255};
7343 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)__b,
7344 (vector
int)__a, __d);
7346 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)__a,
7347 (vector
int)__b, __c);
7353 vector
unsigned char __c) {
7354 #ifdef __LITTLE_ENDIAN__ 7355 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7356 255, 255, 255, 255, 255, 255, 255, 255};
7358 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)__b,
7359 (vector
int)__a, __d);
7361 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)__a,
7362 (vector
int)__b, __c);
7367 vector
signed int __b,
7368 vector
unsigned char __c) {
7369 #ifdef __LITTLE_ENDIAN__ 7370 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7371 255, 255, 255, 255, 255, 255, 255, 255};
7373 return (vector
signed int)__builtin_altivec_vperm_4si(__b, __a, __d);
7375 return (vector
signed int)__builtin_altivec_vperm_4si(__a, __b, __c);
7380 vec_perm(vector
unsigned int __a, vector
unsigned int __b,
7381 vector
unsigned char __c) {
7382 #ifdef __LITTLE_ENDIAN__ 7383 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7384 255, 255, 255, 255, 255, 255, 255, 255};
7386 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)__b,
7387 (vector
int)__a, __d);
7389 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)__a,
7390 (vector
int)__b, __c);
7395 vec_perm(vector
bool int __a, vector
bool int __b, vector
unsigned char __c) {
7396 #ifdef __LITTLE_ENDIAN__ 7397 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7398 255, 255, 255, 255, 255, 255, 255, 255};
7400 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)__b,
7401 (vector
int)__a, __d);
7403 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)__a,
7404 (vector
int)__b, __c);
7410 vector
unsigned char __c) {
7411 #ifdef __LITTLE_ENDIAN__ 7412 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7413 255, 255, 255, 255, 255, 255, 255, 255};
7415 return (vector
float)__builtin_altivec_vperm_4si((vector
int)__b,
7416 (vector
int)__a, __d);
7418 return (vector
float)__builtin_altivec_vperm_4si((vector
int)__a,
7419 (vector
int)__b, __c);
7425 vec_perm(vector
signed long long __a, vector
signed long long __b,
7426 vector
unsigned char __c) {
7427 #ifdef __LITTLE_ENDIAN__ 7428 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7429 255, 255, 255, 255, 255, 255, 255, 255};
7431 return (vector
signed long long)__builtin_altivec_vperm_4si(
7432 (vector
int)__b, (vector
int)__a, __d);
7434 return (vector
signed long long)__builtin_altivec_vperm_4si(
7435 (vector
int)__a, (vector
int)__b, __c);
7439 static __inline__ vector
unsigned long long __ATTRS_o_ai 7440 vec_perm(vector
unsigned long long __a, vector
unsigned long long __b,
7441 vector
unsigned char __c) {
7442 #ifdef __LITTLE_ENDIAN__ 7443 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7444 255, 255, 255, 255, 255, 255, 255, 255};
7446 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
7447 (vector
int)__b, (vector
int)__a, __d);
7449 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
7450 (vector
int)__a, (vector
int)__b, __c);
7455 vec_perm(vector
bool long long __a, vector
bool long long __b,
7456 vector
unsigned char __c) {
7457 #ifdef __LITTLE_ENDIAN__ 7458 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7459 255, 255, 255, 255, 255, 255, 255, 255};
7461 return (vector
bool long long)__builtin_altivec_vperm_4si(
7462 (vector
int)__b, (vector
int)__a, __d);
7464 return (vector
bool long long)__builtin_altivec_vperm_4si(
7465 (vector
int)__a, (vector
int)__b, __c);
7470 vec_perm(vector
double __a, vector
double __b, vector
unsigned char __c) {
7471 #ifdef __LITTLE_ENDIAN__ 7472 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7473 255, 255, 255, 255, 255, 255, 255, 255};
7475 return (vector
double)__builtin_altivec_vperm_4si((vector
int)__b,
7476 (vector
int)__a, __d);
7478 return (vector
double)__builtin_altivec_vperm_4si((vector
int)__a,
7479 (vector
int)__b, __c);
7487 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7492 vec_vperm(vector
unsigned char __a, vector
unsigned char __b,
7493 vector
unsigned char __c) {
7498 vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7503 vec_vperm(vector
short __a, vector
short __b, vector
unsigned char __c) {
7508 vec_vperm(vector
unsigned short __a, vector
unsigned short __b,
7509 vector
unsigned char __c) {
7514 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
7519 vec_vperm(vector pixel __a, vector pixel __b, vector
unsigned char __c) {
7525 vector
unsigned char __c) {
7531 vector
unsigned char __c) {
7536 vec_vperm(vector
bool int __a, vector
bool int __b, vector
unsigned char __c) {
7541 vec_vperm(vector
float __a, vector
float __b, vector
unsigned char __c) {
7547 vector
long long __a, vector
long long __b, vector
unsigned char __c) {
7551 static __inline__ vector
unsigned long long __ATTRS_o_ai 7552 vec_vperm(vector
unsigned long long __a, vector
unsigned long long __b,
7553 vector
unsigned char __c) {
7558 vec_vperm(vector
double __a, vector
double __b, vector
unsigned char __c) {
7567 return __builtin_vsx_xvresp(__a);
7569 return __builtin_altivec_vrefp(__a);
7575 return __builtin_vsx_xvredp(__a);
7581 static __inline__ vector
float __attribute__((__always_inline__))
7582 vec_vrefp(vector
float __a) {
7583 return __builtin_altivec_vrefp(__a);
7589 vec_rl(vector
signed char __a, vector
unsigned char __b) {
7590 return (vector
signed char)__builtin_altivec_vrlb((vector
char)__a, __b);
7594 vec_rl(vector
unsigned char __a, vector
unsigned char __b) {
7595 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)__a, __b);
7599 vector
unsigned short __b) {
7600 return __builtin_altivec_vrlh(__a, __b);
7604 vec_rl(vector
unsigned short __a, vector
unsigned short __b) {
7605 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)__a, __b);
7609 vector
unsigned int __b) {
7610 return __builtin_altivec_vrlw(__a, __b);
7614 vec_rl(vector
unsigned int __a, vector
unsigned int __b) {
7615 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)__a, __b);
7618 #ifdef __POWER8_VECTOR__ 7620 vec_rl(vector
signed long long __a, vector
unsigned long long __b) {
7621 return __builtin_altivec_vrld(__a, __b);
7624 static __inline__ vector
unsigned long long __ATTRS_o_ai 7625 vec_rl(vector
unsigned long long __a, vector
unsigned long long __b) {
7626 return __builtin_altivec_vrld(__a, __b);
7631 #ifdef __POWER9_VECTOR__ 7633 vec_rlmi(vector
unsigned int __a, vector
unsigned int __b,
7634 vector
unsigned int __c) {
7635 return __builtin_altivec_vrlwmi(__a, __c, __b);
7638 static __inline__ vector
unsigned long long __ATTRS_o_ai 7639 vec_rlmi(vector
unsigned long long __a, vector
unsigned long long __b,
7640 vector
unsigned long long __c) {
7641 return __builtin_altivec_vrldmi(__a, __c, __b);
7646 vec_rlnm(vector
unsigned int __a, vector
unsigned int __b,
7647 vector
unsigned int __c) {
7648 vector
unsigned int OneByte = { 0x8, 0x8, 0x8, 0x8 };
7649 return __builtin_altivec_vrlwnm(__a, ((__c << OneByte) | __b));
7652 static __inline__ vector
unsigned long long __ATTRS_o_ai 7653 vec_rlnm(vector
unsigned long long __a, vector
unsigned long long __b,
7654 vector
unsigned long long __c) {
7655 vector
unsigned long long OneByte = { 0x8, 0x8 };
7656 return __builtin_altivec_vrldnm(__a, ((__c << OneByte) | __b));
7663 vec_vrlb(vector
signed char __a, vector
unsigned char __b) {
7664 return (vector
signed char)__builtin_altivec_vrlb((vector
char)__a, __b);
7668 vec_vrlb(vector
unsigned char __a, vector
unsigned char __b) {
7669 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)__a, __b);
7675 vec_vrlh(vector
short __a, vector
unsigned short __b) {
7676 return __builtin_altivec_vrlh(__a, __b);
7680 vec_vrlh(vector
unsigned short __a, vector
unsigned short __b) {
7681 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)__a, __b);
7687 vector
unsigned int __b) {
7688 return __builtin_altivec_vrlw(__a, __b);
7692 vec_vrlw(vector
unsigned int __a, vector
unsigned int __b) {
7693 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)__a, __b);
7700 return __builtin_vsx_xvrspi(__a);
7702 return __builtin_altivec_vrfin(__a);
7708 return __builtin_vsx_xvrdpi(__a);
7713 static __inline__ vector
float __ATTRS_o_ai vec_rint(vector
float __a) {
7714 return __builtin_vsx_xvrspic(__a);
7717 static __inline__ vector
double __ATTRS_o_ai vec_rint(vector
double __a) {
7718 return __builtin_vsx_xvrdpic(__a);
7723 static __inline__ vector
float __ATTRS_o_ai vec_nearbyint(vector
float __a) {
7724 return __builtin_vsx_xvrspi(__a);
7727 static __inline__ vector
double __ATTRS_o_ai vec_nearbyint(vector
double __a) {
7728 return __builtin_vsx_xvrdpi(__a);
7734 static __inline__ vector
float __attribute__((__always_inline__))
7735 vec_vrfin(vector
float __a) {
7736 return __builtin_altivec_vrfin(__a);
7742 static __inline__ vector
float __ATTRS_o_ai vec_sqrt(vector
float __a) {
7743 return __builtin_vsx_xvsqrtsp(__a);
7746 static __inline__ vector
double __ATTRS_o_ai vec_sqrt(vector
double __a) {
7747 return __builtin_vsx_xvsqrtdp(__a);
7755 return __builtin_vsx_xvrsqrtesp(__a);
7757 return __builtin_altivec_vrsqrtefp(__a);
7763 return __builtin_vsx_xvrsqrtedp(__a);
7769 static __inline__ __vector
float __attribute__((__always_inline__))
7770 vec_vrsqrtefp(vector
float __a) {
7771 return __builtin_altivec_vrsqrtefp(__a);
7776 #define __builtin_altivec_vsel_4si vec_sel 7779 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7780 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7784 vec_sel(vector
signed char __a, vector
signed char __b, vector
bool char __c) {
7785 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7789 vec_sel(vector
unsigned char __a, vector
unsigned char __b,
7790 vector
unsigned char __c) {
7791 return (__a & ~__c) | (__b &
__c);
7795 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
7796 return (__a & ~(vector
unsigned char)__c) | (__b & (vector
unsigned char)__c);
7800 vec_sel(vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7801 return (__a & ~(vector
bool char)__c) | (__b & (vector
bool char)__c);
7805 vector
bool char __b,
7806 vector
bool char __c) {
7807 return (__a & ~__c) | (__b &
__c);
7812 vector
unsigned short __c) {
7813 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7818 vector
bool short __c) {
7819 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7823 vec_sel(vector
unsigned short __a, vector
unsigned short __b,
7824 vector
unsigned short __c) {
7825 return (__a & ~__c) | (__b &
__c);
7829 vec_sel(vector
unsigned short __a, vector
unsigned short __b,
7830 vector
bool short __c) {
7831 return (__a & ~(vector
unsigned short)__c) |
7832 (__b & (vector
unsigned short)__c);
7836 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
7837 return (__a & ~(vector
bool short)__c) | (__b & (vector
bool short)__c);
7841 vec_sel(vector
bool short __a, vector
bool short __b, vector
bool short __c) {
7842 return (__a & ~__c) | (__b &
__c);
7847 vector
unsigned int __c) {
7848 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
7853 vector
bool int __c) {
7854 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
7858 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
7859 return (__a & ~__c) | (__b &
__c);
7863 vec_sel(vector
unsigned int __a, vector
unsigned int __b, vector
bool int __c) {
7864 return (__a & ~(vector
unsigned int)__c) | (__b & (vector
unsigned int)__c);
7868 vec_sel(vector
bool int __a, vector
bool int __b, vector
unsigned int __c) {
7869 return (__a & ~(vector
bool int)__c) | (__b & (vector
bool int)__c);
7873 vector
bool int __b,
7874 vector
bool int __c) {
7875 return (__a & ~__c) | (__b &
__c);
7880 vector
unsigned int __c) {
7881 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
7882 ((vector
int)__b & (vector int)__c);
7883 return (vector
float)__res;
7888 vector
bool int __c) {
7889 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
7890 ((vector
int)__b & (vector int)__c);
7891 return (vector
float)__res;
7896 vec_sel(vector
double __a, vector
double __b, vector
bool long long __c) {
7897 vector
long long __res = ((vector
long long)__a & ~(vector
long long)
__c) |
7898 ((vector
long long)__b & (vector
long long)__c);
7899 return (vector
double)__res;
7903 vec_sel(vector
double __a, vector
double __b, vector
unsigned long long __c) {
7904 vector
long long __res = ((vector
long long)__a & ~(vector
long long)
__c) |
7905 ((vector
long long)__b & (vector
long long)__c);
7906 return (vector
double)__res;
7913 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7914 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7918 vec_vsel(vector
signed char __a, vector
signed char __b, vector
bool char __c) {
7919 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7923 vec_vsel(vector
unsigned char __a, vector
unsigned char __b,
7924 vector
unsigned char __c) {
7925 return (__a & ~__c) | (__b &
__c);
7929 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
7930 return (__a & ~(vector
unsigned char)__c) | (__b & (vector
unsigned char)__c);
7934 vec_vsel(vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7935 return (__a & ~(vector
bool char)__c) | (__b & (vector
bool char)__c);
7939 vector
bool char __b,
7940 vector
bool char __c) {
7941 return (__a & ~__c) | (__b &
__c);
7945 vec_vsel(vector
short __a, vector
short __b, vector
unsigned short __c) {
7946 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7951 vector
bool short __c) {
7952 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7956 vec_vsel(vector
unsigned short __a, vector
unsigned short __b,
7957 vector
unsigned short __c) {
7958 return (__a & ~__c) | (__b &
__c);
7962 vec_vsel(vector
unsigned short __a, vector
unsigned short __b,
7963 vector
bool short __c) {
7964 return (__a & ~(vector
unsigned short)__c) |
7965 (__b & (vector
unsigned short)__c);
7969 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
7970 return (__a & ~(vector
bool short)__c) | (__b & (vector
bool short)__c);
7974 vec_vsel(vector
bool short __a, vector
bool short __b, vector
bool short __c) {
7975 return (__a & ~__c) | (__b &
__c);
7980 vector
unsigned int __c) {
7981 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
7986 vector
bool int __c) {
7987 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
7991 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
7992 return (__a & ~__c) | (__b &
__c);
7996 vector
unsigned int __a, vector
unsigned int __b, vector
bool int __c) {
7997 return (__a & ~(vector
unsigned int)__c) | (__b & (vector
unsigned int)__c);
8001 vec_vsel(vector
bool int __a, vector
bool int __b, vector
unsigned int __c) {
8002 return (__a & ~(vector
bool int)__c) | (__b & (vector
bool int)__c);
8006 vector
bool int __b,
8007 vector
bool int __c) {
8008 return (__a & ~__c) | (__b &
__c);
8013 vector
unsigned int __c) {
8014 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
8015 ((vector
int)__b & (vector int)__c);
8016 return (vector
float)__res;
8021 vector
bool int __c) {
8022 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
8023 ((vector
int)__b & (vector int)__c);
8024 return (vector
float)__res;
8032 vec_sl(vector
unsigned char __a, vector
unsigned char __b) {
8033 return __a << (__b %
8034 (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
8038 vec_sl(vector
signed char __a, vector
unsigned char __b) {
8039 return (vector
signed char)
vec_sl((vector
unsigned char)__a, __b);
8043 vec_sl(vector
unsigned short __a, vector
unsigned short __b) {
8044 return __a << (__b % (vector
unsigned short)(
sizeof(
unsigned short) *
8049 vector
unsigned short __b) {
8050 return (vector
short)
vec_sl((vector
unsigned short)__a, __b);
8054 vec_sl(vector
unsigned int __a, vector
unsigned int __b) {
8055 return __a << (__b %
8056 (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
8060 vector
unsigned int __b) {
8061 return (vector
int)
vec_sl((vector
unsigned int)__a, __b);
8064 #ifdef __POWER8_VECTOR__ 8065 static __inline__ vector
unsigned long long __ATTRS_o_ai 8066 vec_sl(vector
unsigned long long __a, vector
unsigned long long __b) {
8067 return __a << (__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
8072 vec_sl(vector
long long __a, vector
unsigned long long __b) {
8073 return (vector
long long)
vec_sl((vector
unsigned long long)__a, __b);
8079 #define __builtin_altivec_vslb vec_vslb 8082 vec_vslb(vector
signed char __a, vector
unsigned char __b) {
8087 vec_vslb(vector
unsigned char __a, vector
unsigned char __b) {
8093 #define __builtin_altivec_vslh vec_vslh 8096 vec_vslh(vector
short __a, vector
unsigned short __b) {
8101 vec_vslh(vector
unsigned short __a, vector
unsigned short __b) {
8107 #define __builtin_altivec_vslw vec_vslw 8110 vector
unsigned int __b) {
8115 vec_vslw(vector
unsigned int __a, vector
unsigned int __b) {
8121 #define __builtin_altivec_vsldoi_4si vec_sld 8124 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
8125 unsigned char __d = __c & 0x0F;
8126 #ifdef __LITTLE_ENDIAN__ 8128 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8129 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8130 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8131 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8135 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8136 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8137 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8142 vec_sld(vector
unsigned char __a, vector
unsigned char __b,
8143 unsigned const int __c) {
8144 unsigned char __d = __c & 0x0F;
8145 #ifdef __LITTLE_ENDIAN__ 8147 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8148 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8149 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8150 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8154 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8155 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8156 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8161 vec_sld(vector
bool char __a, vector
bool char __b,
unsigned const int __c) {
8162 unsigned char __d = __c & 0x0F;
8163 #ifdef __LITTLE_ENDIAN__ 8165 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8166 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8167 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8168 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8172 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8173 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8174 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8179 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
8180 unsigned char __d = __c & 0x0F;
8181 #ifdef __LITTLE_ENDIAN__ 8183 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8184 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8185 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8186 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8190 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8191 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8192 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8197 vec_sld(vector
unsigned short __a, vector
unsigned short __b,
8198 unsigned const int __c) {
8199 unsigned char __d = __c & 0x0F;
8200 #ifdef __LITTLE_ENDIAN__ 8202 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8203 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8204 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8205 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8209 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8210 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8211 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8216 vec_sld(vector
bool short __a, vector
bool short __b,
unsigned const int __c) {
8217 unsigned char __d = __c & 0x0F;
8218 #ifdef __LITTLE_ENDIAN__ 8220 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8221 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8222 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8223 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8227 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8228 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8229 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8235 unsigned const int __c) {
8236 unsigned char __d = __c & 0x0F;
8237 #ifdef __LITTLE_ENDIAN__ 8239 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8240 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8241 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8242 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8246 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8247 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8248 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8253 vec_sld(vector
signed int __a, vector
signed int __b,
unsigned const int __c) {
8254 unsigned char __d = __c & 0x0F;
8255 #ifdef __LITTLE_ENDIAN__ 8257 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8258 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8259 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8260 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8264 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8265 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8266 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8271 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
8272 unsigned char __d = __c & 0x0F;
8273 #ifdef __LITTLE_ENDIAN__ 8275 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8276 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8277 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8278 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8282 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8283 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8284 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8289 vector
bool int __b,
8290 unsigned const int __c) {
8291 unsigned char __d = __c & 0x0F;
8292 #ifdef __LITTLE_ENDIAN__ 8294 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8295 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8296 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8297 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8301 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8302 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8303 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8309 unsigned const int __c) {
8310 unsigned char __d = __c & 0x0F;
8311 #ifdef __LITTLE_ENDIAN__ 8313 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8314 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8315 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8316 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8320 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8321 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8322 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8328 vec_sld(vector
bool long long __a, vector
bool long long __b,
8329 unsigned const int __c) {
8330 unsigned char __d = __c & 0x0F;
8331 #ifdef __LITTLE_ENDIAN__ 8333 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8334 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8335 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8336 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8340 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8341 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8342 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8347 vec_sld(vector
signed long long __a, vector
signed long long __b,
8348 unsigned const int __c) {
8349 unsigned char __d = __c & 0x0F;
8350 #ifdef __LITTLE_ENDIAN__ 8352 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8353 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8354 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8355 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8359 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8360 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8361 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8365 static __inline__ vector
unsigned long long __ATTRS_o_ai 8366 vec_sld(vector
unsigned long long __a, vector
unsigned long long __b,
8367 unsigned const int __c) {
8368 unsigned char __d = __c & 0x0F;
8369 #ifdef __LITTLE_ENDIAN__ 8371 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8372 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8373 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8374 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8378 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8379 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8380 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8386 unsigned const int __c) {
8387 unsigned char __d = __c & 0x0F;
8388 #ifdef __LITTLE_ENDIAN__ 8390 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8391 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8392 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8393 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8397 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8398 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8399 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8406 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
8407 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8411 vec_sldw(vector
unsigned char __a, vector
unsigned char __b,
8412 unsigned const int __c) {
8413 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8417 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
8418 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8422 vec_sldw(vector
unsigned short __a, vector
unsigned short __b,
8423 unsigned const int __c) {
8424 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8428 vec_sldw(vector
signed int __a, vector
signed int __b,
unsigned const int __c) {
8429 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8433 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
8434 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8439 vec_sldw(vector
signed long long __a, vector
signed long long __b,
8440 unsigned const int __c) {
8441 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8444 static __inline__ vector
unsigned long long __ATTRS_o_ai 8445 vec_sldw(vector
unsigned long long __a, vector
unsigned long long __b,
8446 unsigned const int __c) {
8447 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8451 #ifdef __POWER9_VECTOR__ 8454 vec_slv(vector
unsigned char __a, vector
unsigned char __b) {
8455 return __builtin_altivec_vslv(__a, __b);
8460 vec_srv(vector
unsigned char __a, vector
unsigned char __b) {
8461 return __builtin_altivec_vsrv(__a, __b);
8468 vec_vsldoi(vector
signed char __a, vector
signed char __b,
unsigned char __c) {
8469 unsigned char __d = __c & 0x0F;
8470 #ifdef __LITTLE_ENDIAN__ 8472 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8473 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8474 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8475 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8479 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8480 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8481 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8486 vector
unsigned char __a, vector
unsigned char __b,
unsigned char __c) {
8487 unsigned char __d = __c & 0x0F;
8488 #ifdef __LITTLE_ENDIAN__ 8490 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8491 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8492 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8493 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8497 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8498 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8499 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8505 unsigned char __c) {
8506 unsigned char __d = __c & 0x0F;
8507 #ifdef __LITTLE_ENDIAN__ 8509 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8510 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8511 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8512 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8516 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8517 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8518 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8523 vector
unsigned short __a, vector
unsigned short __b,
unsigned char __c) {
8524 unsigned char __d = __c & 0x0F;
8525 #ifdef __LITTLE_ENDIAN__ 8527 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8528 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8529 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8530 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8534 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8535 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8536 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8542 unsigned char __c) {
8543 unsigned char __d = __c & 0x0F;
8544 #ifdef __LITTLE_ENDIAN__ 8546 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8547 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8548 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8549 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8553 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8554 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8555 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8561 unsigned char __c) {
8562 unsigned char __d = __c & 0x0F;
8563 #ifdef __LITTLE_ENDIAN__ 8565 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8566 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8567 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8568 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8572 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8573 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8574 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8579 vector
unsigned int __a, vector
unsigned int __b,
unsigned char __c) {
8580 unsigned char __d = __c & 0x0F;
8581 #ifdef __LITTLE_ENDIAN__ 8583 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8584 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8585 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8586 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8590 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8591 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8592 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8598 unsigned char __c) {
8599 unsigned char __d = __c & 0x0F;
8600 #ifdef __LITTLE_ENDIAN__ 8602 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8603 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8604 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8605 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8609 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8610 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8611 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8618 vec_sll(vector
signed char __a, vector
unsigned char __b) {
8619 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8624 vec_sll(vector
signed char __a, vector
unsigned short __b) {
8625 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8630 vec_sll(vector
signed char __a, vector
unsigned int __b) {
8631 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8636 vec_sll(vector
unsigned char __a, vector
unsigned char __b) {
8637 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8642 vec_sll(vector
unsigned char __a, vector
unsigned short __b) {
8643 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8648 vec_sll(vector
unsigned char __a, vector
unsigned int __b) {
8649 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8654 vec_sll(vector
bool char __a, vector
unsigned char __b) {
8655 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8660 vec_sll(vector
bool char __a, vector
unsigned short __b) {
8661 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8666 vec_sll(vector
bool char __a, vector
unsigned int __b) {
8667 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8672 vector
unsigned char __b) {
8673 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8677 vector
unsigned short __b) {
8678 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8682 vector
unsigned int __b) {
8683 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8687 vec_sll(vector
unsigned short __a, vector
unsigned char __b) {
8688 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8693 vec_sll(vector
unsigned short __a, vector
unsigned short __b) {
8694 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8699 vec_sll(vector
unsigned short __a, vector
unsigned int __b) {
8700 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8705 vec_sll(vector
bool short __a, vector
unsigned char __b) {
8706 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8711 vec_sll(vector
bool short __a, vector
unsigned short __b) {
8712 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8717 vec_sll(vector
bool short __a, vector
unsigned int __b) {
8718 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8723 vector
unsigned char __b) {
8724 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8728 vector
unsigned short __b) {
8729 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8733 vector
unsigned int __b) {
8734 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8738 vector
unsigned char __b) {
8739 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8743 vector
unsigned short __b) {
8744 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8748 vector
unsigned int __b) {
8749 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8753 vec_sll(vector
unsigned int __a, vector
unsigned char __b) {
8754 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8759 vec_sll(vector
unsigned int __a, vector
unsigned short __b) {
8760 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8765 vec_sll(vector
unsigned int __a, vector
unsigned int __b) {
8766 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8771 vec_sll(vector
bool int __a, vector
unsigned char __b) {
8772 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8777 vec_sll(vector
bool int __a, vector
unsigned short __b) {
8778 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8783 vec_sll(vector
bool int __a, vector
unsigned int __b) {
8784 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8790 vec_sll(vector
signed long long __a, vector
unsigned char __b) {
8791 return (vector
signed long long)__builtin_altivec_vsl((vector
int)__a,
8795 static __inline__ vector
unsigned long long __ATTRS_o_ai 8796 vec_sll(vector
unsigned long long __a, vector
unsigned char __b) {
8797 return (vector
unsigned long long)__builtin_altivec_vsl((vector
int)__a,
8805 vec_vsl(vector
signed char __a, vector
unsigned char __b) {
8806 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8811 vec_vsl(vector
signed char __a, vector
unsigned short __b) {
8812 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8817 vec_vsl(vector
signed char __a, vector
unsigned int __b) {
8818 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8823 vec_vsl(vector
unsigned char __a, vector
unsigned char __b) {
8824 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8829 vec_vsl(vector
unsigned char __a, vector
unsigned short __b) {
8830 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8835 vec_vsl(vector
unsigned char __a, vector
unsigned int __b) {
8836 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8841 vec_vsl(vector
bool char __a, vector
unsigned char __b) {
8842 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8847 vec_vsl(vector
bool char __a, vector
unsigned short __b) {
8848 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8853 vec_vsl(vector
bool char __a, vector
unsigned int __b) {
8854 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8859 vector
unsigned char __b) {
8860 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8864 vector
unsigned short __b) {
8865 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8869 vector
unsigned int __b) {
8870 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8874 vec_vsl(vector
unsigned short __a, vector
unsigned char __b) {
8875 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8880 vec_vsl(vector
unsigned short __a, vector
unsigned short __b) {
8881 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8886 vec_vsl(vector
unsigned short __a, vector
unsigned int __b) {
8887 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8892 vec_vsl(vector
bool short __a, vector
unsigned char __b) {
8893 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8898 vec_vsl(vector
bool short __a, vector
unsigned short __b) {
8899 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8904 vec_vsl(vector
bool short __a, vector
unsigned int __b) {
8905 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8910 vector
unsigned char __b) {
8911 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8915 vector
unsigned short __b) {
8916 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8920 vector
unsigned int __b) {
8921 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8925 vector
unsigned char __b) {
8926 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8930 vector
unsigned short __b) {
8931 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8935 vector
unsigned int __b) {
8936 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8940 vec_vsl(vector
unsigned int __a, vector
unsigned char __b) {
8941 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8946 vec_vsl(vector
unsigned int __a, vector
unsigned short __b) {
8947 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8952 vec_vsl(vector
unsigned int __a, vector
unsigned int __b) {
8953 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8958 vec_vsl(vector
bool int __a, vector
unsigned char __b) {
8959 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8964 vec_vsl(vector
bool int __a, vector
unsigned short __b) {
8965 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8970 vec_vsl(vector
bool int __a, vector
unsigned int __b) {
8971 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8978 vec_slo(vector
signed char __a, vector
signed char __b) {
8979 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
8984 vec_slo(vector
signed char __a, vector
unsigned char __b) {
8985 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
8990 vec_slo(vector
unsigned char __a, vector
signed char __b) {
8991 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
8996 vec_slo(vector
unsigned char __a, vector
unsigned char __b) {
8997 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
9002 vector
signed char __b) {
9003 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9007 vector
unsigned char __b) {
9008 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9012 vec_slo(vector
unsigned short __a, vector
signed char __b) {
9013 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9018 vec_slo(vector
unsigned short __a, vector
unsigned char __b) {
9019 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9024 vector
signed char __b) {
9025 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9029 vector
unsigned char __b) {
9030 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9034 vector
signed char __b) {
9035 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9039 vector
unsigned char __b) {
9040 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9044 vec_slo(vector
unsigned int __a, vector
signed char __b) {
9045 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9050 vec_slo(vector
unsigned int __a, vector
unsigned char __b) {
9051 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9056 vector
signed char __b) {
9057 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9061 vector
unsigned char __b) {
9062 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9067 vec_slo(vector
signed long long __a, vector
signed char __b) {
9068 return (vector
signed long long)__builtin_altivec_vslo((vector
int)__a,
9073 vec_slo(vector
signed long long __a, vector
unsigned char __b) {
9074 return (vector
signed long long)__builtin_altivec_vslo((vector
int)__a,
9078 static __inline__ vector
unsigned long long __ATTRS_o_ai 9079 vec_slo(vector
unsigned long long __a, vector
signed char __b) {
9080 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)__a,
9084 static __inline__ vector
unsigned long long __ATTRS_o_ai 9085 vec_slo(vector
unsigned long long __a, vector
unsigned char __b) {
9086 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)__a,
9094 vec_vslo(vector
signed char __a, vector
signed char __b) {
9095 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
9100 vec_vslo(vector
signed char __a, vector
unsigned char __b) {
9101 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
9106 vec_vslo(vector
unsigned char __a, vector
signed char __b) {
9107 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
9112 vec_vslo(vector
unsigned char __a, vector
unsigned char __b) {
9113 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
9118 vector
signed char __b) {
9119 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9123 vector
unsigned char __b) {
9124 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9128 vec_vslo(vector
unsigned short __a, vector
signed char __b) {
9129 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9134 vec_vslo(vector
unsigned short __a, vector
unsigned char __b) {
9135 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9140 vector
signed char __b) {
9141 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9145 vector
unsigned char __b) {
9146 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9150 vector
signed char __b) {
9151 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9155 vector
unsigned char __b) {
9156 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9160 vec_vslo(vector
unsigned int __a, vector
signed char __b) {
9161 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9166 vec_vslo(vector
unsigned int __a, vector
unsigned char __b) {
9167 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9172 vector
signed char __b) {
9173 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9177 vector
unsigned char __b) {
9178 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9185 return vec_perm(__a, __a, (vector
unsigned char)(__b & 0x0F));
9189 vec_splat(vector
unsigned char __a,
unsigned const int __b) {
9190 return vec_perm(__a, __a, (vector
unsigned char)(__b & 0x0F));
9195 return vec_perm(__a, __a, (vector
unsigned char)(__b & 0x0F));
9199 vec_splat(vector
signed short __a,
unsigned const int __b) {
9200 unsigned char b0 = (__b & 0x07) * 2;
9201 unsigned char b1 = b0 + 1;
9203 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9204 b0, b1, b0, b1, b0, b1));
9208 vec_splat(vector
unsigned short __a,
unsigned const int __b) {
9209 unsigned char b0 = (__b & 0x07) * 2;
9210 unsigned char b1 = b0 + 1;
9212 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9213 b0, b1, b0, b1, b0, b1));
9218 unsigned char b0 = (__b & 0x07) * 2;
9219 unsigned char b1 = b0 + 1;
9221 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9222 b0, b1, b0, b1, b0, b1));
9226 unsigned const int __b) {
9227 unsigned char b0 = (__b & 0x07) * 2;
9228 unsigned char b1 = b0 + 1;
9230 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9231 b0, b1, b0, b1, b0, b1));
9236 unsigned char b0 = (__b & 0x03) * 4;
9237 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9239 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9240 b2, b3, b0, b1, b2, b3));
9244 vec_splat(vector
unsigned int __a,
unsigned const int __b) {
9245 unsigned char b0 = (__b & 0x03) * 4;
9246 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9248 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9249 b2, b3, b0, b1, b2, b3));
9254 unsigned char b0 = (__b & 0x03) * 4;
9255 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9257 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9258 b2, b3, b0, b1, b2, b3));
9262 unsigned const int __b) {
9263 unsigned char b0 = (__b & 0x03) * 4;
9264 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9266 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9267 b2, b3, b0, b1, b2, b3));
9272 unsigned const int __b) {
9273 unsigned char b0 = (__b & 0x01) * 8;
9274 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9275 b6 = b0 + 6, b7 = b0 + 7;
9277 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9278 b2, b3, b4, b5, b6, b7));
9281 vec_splat(vector
bool long long __a,
unsigned const int __b) {
9282 unsigned char b0 = (__b & 0x01) * 8;
9283 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9284 b6 = b0 + 6, b7 = b0 + 7;
9286 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9287 b2, b3, b4, b5, b6, b7));
9290 vec_splat(vector
signed long long __a,
unsigned const int __b) {
9291 unsigned char b0 = (__b & 0x01) * 8;
9292 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9293 b6 = b0 + 6, b7 = b0 + 7;
9295 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9296 b2, b3, b4, b5, b6, b7));
9298 static __inline__ vector
unsigned long long __ATTRS_o_ai 9299 vec_splat(vector
unsigned long long __a,
unsigned const int __b) {
9300 unsigned char b0 = (__b & 0x01) * 8;
9301 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9302 b6 = b0 + 6, b7 = b0 + 7;
9304 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9305 b2, b3, b4, b5, b6, b7));
9311 #define __builtin_altivec_vspltb vec_vspltb 9315 return vec_perm(__a, __a, (vector
unsigned char)(__b));
9320 return vec_perm(__a, __a, (vector
unsigned char)(__b));
9324 unsigned char __b) {
9325 return vec_perm(__a, __a, (vector
unsigned char)(__b));
9330 #define __builtin_altivec_vsplth vec_vsplth 9333 unsigned char __b) {
9335 unsigned char b1 = __b + 1;
9337 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9338 __b, b1, __b, b1, __b, b1, __b, b1));
9344 unsigned char b1 = __b + 1;
9346 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9347 __b, b1, __b, b1, __b, b1, __b, b1));
9353 unsigned char b1 = __b + 1;
9355 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9356 __b, b1, __b, b1, __b, b1, __b, b1));
9360 unsigned char __b) {
9362 unsigned char b1 = __b + 1;
9364 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9365 __b, b1, __b, b1, __b, b1, __b, b1));
9370 #define __builtin_altivec_vspltw vec_vspltw 9373 unsigned char __b) {
9375 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9377 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9378 b1, b2, b3, __b, b1, b2, b3));
9384 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9386 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9387 b1, b2, b3, __b, b1, b2, b3));
9391 unsigned char __b) {
9393 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9395 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9396 b1, b2, b3, __b, b1, b2, b3));
9400 unsigned char __b) {
9402 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9404 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9405 b1, b2, b3, __b, b1, b2, b3));
9410 #define __builtin_altivec_vspltisb vec_splat_s8 9415 return (vector
signed char)(
__a);
9423 return (vector
signed char)(
__a);
9428 #define __builtin_altivec_vspltish vec_splat_s16 9432 return (vector
short)(
__a);
9439 return (vector
short)(
__a);
9444 #define __builtin_altivec_vspltisw vec_splat_s32 9448 return (vector
int)(
__a);
9455 return (vector
int)(
__a);
9463 return (vector
unsigned char)(
__a);
9471 return (vector
unsigned short)(
__a);
9479 return (vector
unsigned int)(
__a);
9487 vec_sr(vector
unsigned char __a, vector
unsigned char __b) {
9489 (__b % (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
9493 vec_sr(vector
signed char __a, vector
unsigned char __b) {
9494 return (vector
signed char)
vec_sr((vector
unsigned char)__a, __b);
9498 vec_sr(vector
unsigned short __a, vector
unsigned short __b) {
9500 (__b % (vector
unsigned short)(
sizeof(
unsigned short) * __CHAR_BIT__));
9504 vector
unsigned short __b) {
9505 return (vector
short)
vec_sr((vector
unsigned short)__a, __b);
9509 vec_sr(vector
unsigned int __a, vector
unsigned int __b) {
9511 (__b % (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
9515 vector
unsigned int __b) {
9516 return (vector
int)
vec_sr((vector
unsigned int)__a, __b);
9519 #ifdef __POWER8_VECTOR__ 9520 static __inline__ vector
unsigned long long __ATTRS_o_ai 9521 vec_sr(vector
unsigned long long __a, vector
unsigned long long __b) {
9522 return __a >> (__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
9527 vec_sr(vector
long long __a, vector
unsigned long long __b) {
9528 return (vector
long long)
vec_sr((vector
unsigned long long)__a, __b);
9534 #define __builtin_altivec_vsrb vec_vsrb 9537 vec_vsrb(vector
signed char __a, vector
unsigned char __b) {
9542 vec_vsrb(vector
unsigned char __a, vector
unsigned char __b) {
9548 #define __builtin_altivec_vsrh vec_vsrh 9551 vec_vsrh(vector
short __a, vector
unsigned short __b) {
9556 vec_vsrh(vector
unsigned short __a, vector
unsigned short __b) {
9562 #define __builtin_altivec_vsrw vec_vsrw 9565 vector
unsigned int __b) {
9570 vec_vsrw(vector
unsigned int __a, vector
unsigned int __b) {
9577 vec_sra(vector
signed char __a, vector
unsigned char __b) {
9578 return (vector
signed char)__builtin_altivec_vsrab((vector
char)__a, __b);
9582 vec_sra(vector
unsigned char __a, vector
unsigned char __b) {
9583 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)__a, __b);
9587 vector
unsigned short __b) {
9588 return __builtin_altivec_vsrah(__a, (vector
unsigned short)__b);
9592 vec_sra(vector
unsigned short __a, vector
unsigned short __b) {
9593 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)__a, __b);
9597 vector
unsigned int __b) {
9598 return __builtin_altivec_vsraw(__a, __b);
9602 vec_sra(vector
unsigned int __a, vector
unsigned int __b) {
9603 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)__a, __b);
9606 #ifdef __POWER8_VECTOR__ 9608 vec_sra(vector
signed long long __a, vector
unsigned long long __b) {
9612 static __inline__ vector
unsigned long long __ATTRS_o_ai 9613 vec_sra(vector
unsigned long long __a, vector
unsigned long long __b) {
9614 return (vector
unsigned long long)((vector
signed long long)__a >> __b);
9621 vec_vsrab(vector
signed char __a, vector
unsigned char __b) {
9622 return (vector
signed char)__builtin_altivec_vsrab((vector
char)__a, __b);
9626 vec_vsrab(vector
unsigned char __a, vector
unsigned char __b) {
9627 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)__a, __b);
9634 return __builtin_altivec_vsrah(__a, (vector
unsigned short)__b);
9638 vec_vsrah(vector
unsigned short __a, vector
unsigned short __b) {
9639 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)__a, __b);
9645 vector
unsigned int __b) {
9646 return __builtin_altivec_vsraw(__a, __b);
9650 vec_vsraw(vector
unsigned int __a, vector
unsigned int __b) {
9651 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)__a, __b);
9657 vec_srl(vector
signed char __a, vector
unsigned char __b) {
9658 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9663 vec_srl(vector
signed char __a, vector
unsigned short __b) {
9664 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9669 vec_srl(vector
signed char __a, vector
unsigned int __b) {
9670 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9675 vec_srl(vector
unsigned char __a, vector
unsigned char __b) {
9676 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9681 vec_srl(vector
unsigned char __a, vector
unsigned short __b) {
9682 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9687 vec_srl(vector
unsigned char __a, vector
unsigned int __b) {
9688 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9693 vec_srl(vector
bool char __a, vector
unsigned char __b) {
9694 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9699 vec_srl(vector
bool char __a, vector
unsigned short __b) {
9700 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9705 vec_srl(vector
bool char __a, vector
unsigned int __b) {
9706 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9711 vector
unsigned char __b) {
9712 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9716 vector
unsigned short __b) {
9717 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9721 vector
unsigned int __b) {
9722 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9726 vec_srl(vector
unsigned short __a, vector
unsigned char __b) {
9727 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9732 vec_srl(vector
unsigned short __a, vector
unsigned short __b) {
9733 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9738 vec_srl(vector
unsigned short __a, vector
unsigned int __b) {
9739 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9744 vec_srl(vector
bool short __a, vector
unsigned char __b) {
9745 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9750 vec_srl(vector
bool short __a, vector
unsigned short __b) {
9751 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9756 vec_srl(vector
bool short __a, vector
unsigned int __b) {
9757 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9762 vector
unsigned char __b) {
9763 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9767 vector
unsigned short __b) {
9768 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9772 vector
unsigned int __b) {
9773 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9777 vector
unsigned char __b) {
9778 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9782 vector
unsigned short __b) {
9783 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9787 vector
unsigned int __b) {
9788 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9792 vec_srl(vector
unsigned int __a, vector
unsigned char __b) {
9793 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9798 vec_srl(vector
unsigned int __a, vector
unsigned short __b) {
9799 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9804 vec_srl(vector
unsigned int __a, vector
unsigned int __b) {
9805 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9810 vec_srl(vector
bool int __a, vector
unsigned char __b) {
9811 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
9816 vec_srl(vector
bool int __a, vector
unsigned short __b) {
9817 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
9822 vec_srl(vector
bool int __a, vector
unsigned int __b) {
9823 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
9829 vec_srl(vector
signed long long __a, vector
unsigned char __b) {
9830 return (vector
signed long long)__builtin_altivec_vsr((vector
int)__a,
9834 static __inline__ vector
unsigned long long __ATTRS_o_ai 9835 vec_srl(vector
unsigned long long __a, vector
unsigned char __b) {
9836 return (vector
unsigned long long)__builtin_altivec_vsr((vector
int)__a,
9844 vec_vsr(vector
signed char __a, vector
unsigned char __b) {
9845 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9850 vec_vsr(vector
signed char __a, vector
unsigned short __b) {
9851 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9856 vec_vsr(vector
signed char __a, vector
unsigned int __b) {
9857 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9862 vec_vsr(vector
unsigned char __a, vector
unsigned char __b) {
9863 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9868 vec_vsr(vector
unsigned char __a, vector
unsigned short __b) {
9869 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9874 vec_vsr(vector
unsigned char __a, vector
unsigned int __b) {
9875 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9880 vec_vsr(vector
bool char __a, vector
unsigned char __b) {
9881 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9886 vec_vsr(vector
bool char __a, vector
unsigned short __b) {
9887 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9892 vec_vsr(vector
bool char __a, vector
unsigned int __b) {
9893 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9898 vector
unsigned char __b) {
9899 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9903 vector
unsigned short __b) {
9904 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9908 vector
unsigned int __b) {
9909 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9913 vec_vsr(vector
unsigned short __a, vector
unsigned char __b) {
9914 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9919 vec_vsr(vector
unsigned short __a, vector
unsigned short __b) {
9920 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9925 vec_vsr(vector
unsigned short __a, vector
unsigned int __b) {
9926 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9931 vec_vsr(vector
bool short __a, vector
unsigned char __b) {
9932 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9937 vec_vsr(vector
bool short __a, vector
unsigned short __b) {
9938 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9943 vec_vsr(vector
bool short __a, vector
unsigned int __b) {
9944 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9949 vector
unsigned char __b) {
9950 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9954 vector
unsigned short __b) {
9955 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9959 vector
unsigned int __b) {
9960 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9964 vector
unsigned char __b) {
9965 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9969 vector
unsigned short __b) {
9970 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9974 vector
unsigned int __b) {
9975 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9979 vec_vsr(vector
unsigned int __a, vector
unsigned char __b) {
9980 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9985 vec_vsr(vector
unsigned int __a, vector
unsigned short __b) {
9986 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9991 vec_vsr(vector
unsigned int __a, vector
unsigned int __b) {
9992 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9997 vec_vsr(vector
bool int __a, vector
unsigned char __b) {
9998 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
10003 vec_vsr(vector
bool int __a, vector
unsigned short __b) {
10004 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
10009 vec_vsr(vector
bool int __a, vector
unsigned int __b) {
10010 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
10017 vec_sro(vector
signed char __a, vector
signed char __b) {
10018 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10023 vec_sro(vector
signed char __a, vector
unsigned char __b) {
10024 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10029 vec_sro(vector
unsigned char __a, vector
signed char __b) {
10030 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10035 vec_sro(vector
unsigned char __a, vector
unsigned char __b) {
10036 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10041 vector
signed char __b) {
10042 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10046 vector
unsigned char __b) {
10047 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10051 vec_sro(vector
unsigned short __a, vector
signed char __b) {
10052 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10057 vec_sro(vector
unsigned short __a, vector
unsigned char __b) {
10058 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10063 vector
signed char __b) {
10064 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10068 vector
unsigned char __b) {
10069 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10073 vector
signed char __b) {
10074 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10078 vector
unsigned char __b) {
10079 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10083 vec_sro(vector
unsigned int __a, vector
signed char __b) {
10084 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10089 vec_sro(vector
unsigned int __a, vector
unsigned char __b) {
10090 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10095 vector
signed char __b) {
10096 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10100 vector
unsigned char __b) {
10101 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10105 static __inline__ vector
signed long long __ATTRS_o_ai 10106 vec_sro(vector
signed long long __a, vector
signed char __b) {
10107 return (vector
signed long long)__builtin_altivec_vsro((vector
int)__a,
10111 static __inline__ vector
signed long long __ATTRS_o_ai 10112 vec_sro(vector
signed long long __a, vector
unsigned char __b) {
10113 return (vector
signed long long)__builtin_altivec_vsro((vector
int)__a,
10117 static __inline__ vector
unsigned long long __ATTRS_o_ai 10118 vec_sro(vector
unsigned long long __a, vector
signed char __b) {
10119 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)__a,
10123 static __inline__ vector
unsigned long long __ATTRS_o_ai 10124 vec_sro(vector
unsigned long long __a, vector
unsigned char __b) {
10125 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)__a,
10134 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10139 vec_vsro(vector
signed char __a, vector
unsigned char __b) {
10140 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10145 vec_vsro(vector
unsigned char __a, vector
signed char __b) {
10146 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10151 vec_vsro(vector
unsigned char __a, vector
unsigned char __b) {
10152 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10157 vector
signed char __b) {
10158 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10162 vector
unsigned char __b) {
10163 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10167 vec_vsro(vector
unsigned short __a, vector
signed char __b) {
10168 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10173 vec_vsro(vector
unsigned short __a, vector
unsigned char __b) {
10174 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10179 vector
signed char __b) {
10180 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10184 vector
unsigned char __b) {
10185 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10189 vector
signed char __b) {
10190 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10194 vector
unsigned char __b) {
10195 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10199 vec_vsro(vector
unsigned int __a, vector
signed char __b) {
10200 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10205 vec_vsro(vector
unsigned int __a, vector
unsigned char __b) {
10206 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10211 vector
signed char __b) {
10212 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10216 vector
unsigned char __b) {
10217 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10223 vector
signed char *__c) {
10224 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10228 signed char *__c) {
10229 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10233 vector
unsigned char *__c) {
10234 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10238 unsigned char *__c) {
10239 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10243 signed char *__c) {
10244 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10248 unsigned char *__c) {
10249 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10253 vector
bool char *__c) {
10254 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10258 vector
short *__c) {
10259 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10264 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10268 vector
unsigned short *__c) {
10269 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10273 unsigned short *__c) {
10274 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10279 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10283 unsigned short *__c) {
10284 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10288 vector
bool short *__c) {
10289 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10294 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10298 unsigned short *__c) {
10299 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10303 vector pixel *__c) {
10304 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10309 __builtin_altivec_stvx(__a, __b, __c);
10313 __builtin_altivec_stvx(__a, __b, __c);
10317 vector
unsigned int *__c) {
10318 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10322 unsigned int *__c) {
10323 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10328 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10332 unsigned int *__c) {
10333 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10337 vector
bool int *__c) {
10338 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10342 vector
float *__c) {
10343 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10348 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10354 vector
signed char *__c) {
10355 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10359 signed char *__c) {
10360 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10364 vector
unsigned char *__c) {
10365 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10369 unsigned char *__c) {
10370 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10374 signed char *__c) {
10375 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10379 unsigned char *__c) {
10380 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10384 vector
bool char *__c) {
10385 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10389 vector
short *__c) {
10390 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10395 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10399 vector
unsigned short *__c) {
10400 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10404 unsigned short *__c) {
10405 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10410 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10414 unsigned short *__c) {
10415 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10419 vector
bool short *__c) {
10420 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10425 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10429 unsigned short *__c) {
10430 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10434 vector pixel *__c) {
10435 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10440 __builtin_altivec_stvx(__a, __b, __c);
10445 __builtin_altivec_stvx(__a, __b, __c);
10449 vector
unsigned int *__c) {
10450 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10454 unsigned int *__c) {
10455 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10460 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10464 unsigned int *__c) {
10465 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10469 vector
bool int *__c) {
10470 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10474 vector
float *__c) {
10475 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10480 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10486 signed char *__c) {
10487 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10491 unsigned char *__c) {
10492 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10496 signed char *__c) {
10497 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10501 unsigned char *__c) {
10502 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10507 __builtin_altivec_stvehx(__a, __b, __c);
10511 unsigned short *__c) {
10512 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10517 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10521 unsigned short *__c) {
10522 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10527 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10531 unsigned short *__c) {
10532 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10536 __builtin_altivec_stvewx(__a, __b, __c);
10540 unsigned int *__c) {
10541 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10546 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10550 unsigned int *__c) {
10551 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10556 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10562 signed char *__c) {
10563 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10567 int __b,
unsigned char *__c) {
10568 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10572 signed char *__c) {
10573 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10577 unsigned char *__c) {
10578 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10585 __builtin_altivec_stvehx(__a, __b, __c);
10589 int __b,
unsigned short *__c) {
10590 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10595 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10599 unsigned short *__c) {
10600 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10605 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10609 unsigned short *__c) {
10610 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10617 __builtin_altivec_stvewx(__a, __b, __c);
10621 unsigned int *__c) {
10622 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10627 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10631 unsigned int *__c) {
10632 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10637 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10643 vector
signed char *__c) {
10644 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10648 signed char *__c) {
10649 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10653 vector
unsigned char *__c) {
10654 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10658 unsigned char *__c) {
10659 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10663 signed char *__c) {
10664 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10668 unsigned char *__c) {
10669 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10673 vector
bool char *__c) {
10674 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10678 vector
short *__c) {
10679 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10684 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10688 vector
unsigned short *__c) {
10689 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10693 unsigned short *__c) {
10694 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10699 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10703 unsigned short *__c) {
10704 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10708 vector
bool short *__c) {
10709 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10714 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10718 unsigned short *__c) {
10719 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10723 vector pixel *__c) {
10724 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10729 __builtin_altivec_stvxl(__a, __b, __c);
10733 __builtin_altivec_stvxl(__a, __b, __c);
10737 vector
unsigned int *__c) {
10738 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10742 unsigned int *__c) {
10743 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10748 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10752 unsigned int *__c) {
10753 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10757 vector
bool int *__c) {
10758 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10762 vector
float *__c) {
10763 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10768 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10774 vector
signed char *__c) {
10775 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10779 signed char *__c) {
10780 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10784 vector
unsigned char *__c) {
10785 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10789 unsigned char *__c) {
10790 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10794 signed char *__c) {
10795 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10799 unsigned char *__c) {
10800 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10804 vector
bool char *__c) {
10805 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10809 vector
short *__c) {
10810 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10815 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10820 vector
unsigned short *__c) {
10821 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10825 int __b,
unsigned short *__c) {
10826 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10831 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10835 unsigned short *__c) {
10836 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10840 vector
bool short *__c) {
10841 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10846 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10850 unsigned short *__c) {
10851 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10855 vector pixel *__c) {
10856 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10861 __builtin_altivec_stvxl(__a, __b, __c);
10866 __builtin_altivec_stvxl(__a, __b, __c);
10870 vector
unsigned int *__c) {
10871 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10875 unsigned int *__c) {
10876 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10881 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10885 unsigned int *__c) {
10886 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10890 vector
bool int *__c) {
10891 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10895 vector
float *__c) {
10896 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10901 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10907 vec_sub(vector
signed char __a, vector
signed char __b) {
10912 vec_sub(vector
bool char __a, vector
signed char __b) {
10913 return (vector
signed char)__a -
__b;
10917 vec_sub(vector
signed char __a, vector
bool char __b) {
10918 return __a - (vector
signed char)__b;
10922 vec_sub(vector
unsigned char __a, vector
unsigned char __b) {
10927 vec_sub(vector
bool char __a, vector
unsigned char __b) {
10928 return (vector
unsigned char)__a -
__b;
10932 vec_sub(vector
unsigned char __a, vector
bool char __b) {
10933 return __a - (vector
unsigned char)__b;
10937 vector
short __b) {
10942 vector
short __b) {
10943 return (vector
short)__a -
__b;
10947 vector
bool short __b) {
10948 return __a - (vector short)__b;
10952 vec_sub(vector
unsigned short __a, vector
unsigned short __b) {
10957 vec_sub(vector
bool short __a, vector
unsigned short __b) {
10958 return (vector
unsigned short)__a -
__b;
10962 vec_sub(vector
unsigned short __a, vector
bool short __b) {
10963 return __a - (vector
unsigned short)__b;
10973 return (vector
int)__a -
__b;
10977 vector
bool int __b) {
10978 return __a - (vector int)__b;
10982 vec_sub(vector
unsigned int __a, vector
unsigned int __b) {
10987 vec_sub(vector
bool int __a, vector
unsigned int __b) {
10988 return (vector
unsigned int)__a -
__b;
10992 vec_sub(vector
unsigned int __a, vector
bool int __b) {
10993 return __a - (vector
unsigned int)__b;
10996 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 10998 vec_sub(vector
signed __int128 __a, vector
signed __int128 __b) {
11002 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11003 vec_sub(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11006 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11009 static __inline__ vector
signed long long __ATTRS_o_ai 11010 vec_sub(vector
signed long long __a, vector
signed long long __b) {
11014 static __inline__ vector
unsigned long long __ATTRS_o_ai 11015 vec_sub(vector
unsigned long long __a, vector
unsigned long long __b) {
11020 vector
double __b) {
11026 vector
float __b) {
11032 #define __builtin_altivec_vsububm vec_vsububm 11041 return (vector
signed char)__a -
__b;
11046 return __a - (vector
signed char)__b;
11056 return (vector
unsigned char)__a -
__b;
11061 return __a - (vector
unsigned char)__b;
11066 #define __builtin_altivec_vsubuhm vec_vsubuhm 11069 vector
short __b) {
11074 vector
short __b) {
11075 return (vector
short)__a -
__b;
11079 vector
bool short __b) {
11080 return __a - (vector short)__b;
11090 return (vector
unsigned short)__a -
__b;
11095 return __a - (vector
unsigned short)__b;
11100 #define __builtin_altivec_vsubuwm vec_vsubuwm 11109 return (vector
int)__a -
__b;
11113 vector
bool int __b) {
11114 return __a - (vector int)__b;
11124 return (vector
unsigned int)__a -
__b;
11129 return __a - (vector
unsigned int)__b;
11134 #define __builtin_altivec_vsubfp vec_vsubfp 11136 static __inline__ vector
float __attribute__((__always_inline__))
11137 vec_vsubfp(vector
float __a, vector
float __b) {
11145 return (vector
signed int)__builtin_altivec_vsubcuw((vector
unsigned int)__a,
11146 (vector
unsigned int) __b);
11150 vec_subc(vector
unsigned int __a, vector
unsigned int __b) {
11151 return __builtin_altivec_vsubcuw(__a, __b);
11154 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11155 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11156 vec_subc(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11157 return __builtin_altivec_vsubcuq(__a, __b);
11161 vec_subc(vector
signed __int128 __a, vector
signed __int128 __b) {
11162 return __builtin_altivec_vsubcuq(__a, __b);
11164 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11168 static __inline__ vector
unsigned int __attribute__((__always_inline__))
11169 vec_vsubcuw(vector
unsigned int __a, vector
unsigned int __b) {
11170 return __builtin_altivec_vsubcuw(__a, __b);
11177 return __builtin_altivec_vsubsbs(__a, __b);
11182 return __builtin_altivec_vsubsbs((vector
signed char)__a, __b);
11187 return __builtin_altivec_vsubsbs(__a, (vector
signed char)__b);
11191 vec_subs(vector
unsigned char __a, vector
unsigned char __b) {
11192 return __builtin_altivec_vsububs(__a, __b);
11197 return __builtin_altivec_vsububs((vector
unsigned char)__a, __b);
11202 return __builtin_altivec_vsububs(__a, (vector
unsigned char)__b);
11206 vector
short __b) {
11207 return __builtin_altivec_vsubshs(__a, __b);
11211 vector
short __b) {
11212 return __builtin_altivec_vsubshs((vector
short)__a, __b);
11216 vector
bool short __b) {
11217 return __builtin_altivec_vsubshs(__a, (vector
short)__b);
11221 vec_subs(vector
unsigned short __a, vector
unsigned short __b) {
11222 return __builtin_altivec_vsubuhs(__a, __b);
11226 vec_subs(vector
bool short __a, vector
unsigned short __b) {
11227 return __builtin_altivec_vsubuhs((vector
unsigned short)__a, __b);
11231 vec_subs(vector
unsigned short __a, vector
bool short __b) {
11232 return __builtin_altivec_vsubuhs(__a, (vector
unsigned short)__b);
11237 return __builtin_altivec_vsubsws(__a, __b);
11242 return __builtin_altivec_vsubsws((vector
int)__a, __b);
11246 vector
bool int __b) {
11247 return __builtin_altivec_vsubsws(__a, (vector
int)__b);
11251 vec_subs(vector
unsigned int __a, vector
unsigned int __b) {
11252 return __builtin_altivec_vsubuws(__a, __b);
11257 return __builtin_altivec_vsubuws((vector
unsigned int)__a, __b);
11262 return __builtin_altivec_vsubuws(__a, (vector
unsigned int)__b);
11269 return __builtin_altivec_vsubsbs(__a, __b);
11274 return __builtin_altivec_vsubsbs((vector
signed char)__a, __b);
11279 return __builtin_altivec_vsubsbs(__a, (vector
signed char)__b);
11286 return __builtin_altivec_vsububs(__a, __b);
11291 return __builtin_altivec_vsububs((vector
unsigned char)__a, __b);
11296 return __builtin_altivec_vsububs(__a, (vector
unsigned char)__b);
11302 vector
short __b) {
11303 return __builtin_altivec_vsubshs(__a, __b);
11307 vector
short __b) {
11308 return __builtin_altivec_vsubshs((vector
short)__a, __b);
11312 vector
bool short __b) {
11313 return __builtin_altivec_vsubshs(__a, (vector
short)__b);
11320 return __builtin_altivec_vsubuhs(__a, __b);
11325 return __builtin_altivec_vsubuhs((vector
unsigned short)__a, __b);
11330 return __builtin_altivec_vsubuhs(__a, (vector
unsigned short)__b);
11337 return __builtin_altivec_vsubsws(__a, __b);
11342 return __builtin_altivec_vsubsws((vector
int)__a, __b);
11346 vector
bool int __b) {
11347 return __builtin_altivec_vsubsws(__a, (vector
int)__b);
11354 return __builtin_altivec_vsubuws(__a, __b);
11359 return __builtin_altivec_vsubuws((vector
unsigned int)__a, __b);
11364 return __builtin_altivec_vsubuws(__a, (vector
unsigned int)__b);
11367 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11371 vec_vsubuqm(vector
signed __int128 __a, vector
signed __int128 __b) {
11375 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11376 vec_vsubuqm(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11384 vec_vsubeuqm(vector
signed __int128 __a, vector
signed __int128 __b,
11385 vector
signed __int128 __c) {
11386 return __builtin_altivec_vsubeuqm(__a, __b, __c);
11389 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11390 vec_vsubeuqm(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11391 vector
unsigned __int128 __c) {
11392 return __builtin_altivec_vsubeuqm(__a, __b, __c);
11396 vec_sube(vector
signed __int128 __a, vector
signed __int128 __b,
11397 vector
signed __int128 __c) {
11398 return __builtin_altivec_vsubeuqm(__a, __b, __c);
11401 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11402 vec_sube(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11403 vector
unsigned __int128 __c) {
11404 return __builtin_altivec_vsubeuqm(__a, __b, __c);
11410 vec_vsubcuq(vector
signed __int128 __a, vector
signed __int128 __b) {
11411 return __builtin_altivec_vsubcuq(__a, __b);
11414 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11415 vec_vsubcuq(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11416 return __builtin_altivec_vsubcuq(__a, __b);
11422 vec_vsubecuq(vector
signed __int128 __a, vector
signed __int128 __b,
11423 vector
signed __int128 __c) {
11424 return __builtin_altivec_vsubecuq(__a, __b, __c);
11427 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11428 vec_vsubecuq(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11429 vector
unsigned __int128 __c) {
11430 return __builtin_altivec_vsubecuq(__a, __b, __c);
11434 vec_subec(vector
signed int __a, vector
signed int __b,
11435 vector
signed int __c) {
11436 return vec_addec(__a, ~__b, __c);
11440 vec_subec(vector
unsigned int __a, vector
unsigned int __b,
11441 vector
unsigned int __c) {
11442 return vec_addec(__a, ~__b, __c);
11446 vec_subec(vector
signed __int128 __a, vector
signed __int128 __b,
11447 vector
signed __int128 __c) {
11448 return __builtin_altivec_vsubecuq(__a, __b, __c);
11451 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11452 vec_subec(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11453 vector
unsigned __int128 __c) {
11454 return __builtin_altivec_vsubecuq(__a, __b, __c);
11456 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11460 vector
signed int __c) {
11461 vector
signed int __mask = {1, 1, 1, 1};
11462 vector
signed int __carry = __c & __mask;
11463 return vec_adde(__a, ~__b, __carry);
11468 vector
unsigned int __c) {
11469 vector
unsigned int __mask = {1, 1, 1, 1};
11470 vector
unsigned int __carry = __c & __mask;
11471 return vec_adde(__a, ~__b, __carry);
11477 return __builtin_altivec_vsum4sbs(__a, __b);
11482 return __builtin_altivec_vsum4ubs(__a, __b);
11487 return __builtin_altivec_vsum4shs(__a, __b);
11492 static __inline__ vector
int __attribute__((__always_inline__))
11493 vec_vsum4sbs(vector
signed char __a, vector
int __b) {
11494 return __builtin_altivec_vsum4sbs(__a, __b);
11499 static __inline__ vector
unsigned int __attribute__((__always_inline__))
11500 vec_vsum4ubs(vector
unsigned char __a, vector
unsigned int __b) {
11501 return __builtin_altivec_vsum4ubs(__a, __b);
11506 static __inline__ vector
int __attribute__((__always_inline__))
11507 vec_vsum4shs(vector
signed short __a, vector
int __b) {
11508 return __builtin_altivec_vsum4shs(__a, __b);
11519 static __inline__ vector
signed int __attribute__((__always_inline__))
11520 vec_sum2s(vector
int __a, vector
int __b) {
11521 #ifdef __LITTLE_ENDIAN__ 11522 vector
int __c = (vector
signed int)
vec_perm(
11523 __b, __b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11525 __c = __builtin_altivec_vsum2sws(__a, __c);
11526 return (vector
signed int)
vec_perm(
11527 __c, __c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11530 return __builtin_altivec_vsum2sws(__a, __b);
11536 static __inline__ vector
signed int __attribute__((__always_inline__))
11537 vec_vsum2sws(vector
int __a, vector
int __b) {
11538 #ifdef __LITTLE_ENDIAN__ 11539 vector
int __c = (vector
signed int)
vec_perm(
11540 __b, __b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11542 __c = __builtin_altivec_vsum2sws(__a, __c);
11543 return (vector
signed int)
vec_perm(
11544 __c, __c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11547 return __builtin_altivec_vsum2sws(__a, __b);
11559 static __inline__ vector
signed int __attribute__((__always_inline__))
11560 vec_sums(vector
signed int __a, vector
signed int __b) {
11561 #ifdef __LITTLE_ENDIAN__ 11562 __b = (vector
signed int)
vec_splat(__b, 3);
11563 __b = __builtin_altivec_vsumsws(__a, __b);
11564 return (vector
signed int)(0, 0, 0, __b[0]);
11566 return __builtin_altivec_vsumsws(__a, __b);
11572 static __inline__ vector
signed int __attribute__((__always_inline__))
11573 vec_vsumsws(vector
signed int __a, vector
signed int __b) {
11574 #ifdef __LITTLE_ENDIAN__ 11575 __b = (vector
signed int)
vec_splat(__b, 3);
11576 __b = __builtin_altivec_vsumsws(__a, __b);
11577 return (vector
signed int)(0, 0, 0, __b[0]);
11579 return __builtin_altivec_vsumsws(__a, __b);
11587 return __builtin_vsx_xvrspiz(__a);
11589 return __builtin_altivec_vrfiz(__a);
11595 return __builtin_vsx_xvrdpiz(__a);
11601 static __inline__ vector
float __attribute__((__always_inline__))
11602 vec_vrfiz(vector
float __a) {
11603 return __builtin_altivec_vrfiz(__a);
11613 #ifdef __LITTLE_ENDIAN__ 11614 return __builtin_altivec_vupklsb((vector
char)__a);
11616 return __builtin_altivec_vupkhsb((vector
char)__a);
11622 #ifdef __LITTLE_ENDIAN__ 11623 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11625 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11630 #ifdef __LITTLE_ENDIAN__ 11631 return __builtin_altivec_vupklsh(__a);
11633 return __builtin_altivec_vupkhsh(__a);
11639 #ifdef __LITTLE_ENDIAN__ 11640 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11642 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11648 #ifdef __LITTLE_ENDIAN__ 11649 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11651 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11655 #ifdef __POWER8_VECTOR__ 11657 #ifdef __LITTLE_ENDIAN__ 11658 return __builtin_altivec_vupklsw(__a);
11660 return __builtin_altivec_vupkhsw(__a);
11666 #ifdef __LITTLE_ENDIAN__ 11667 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11669 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11675 return (vector
double)(__a[0], __a[1]);
11683 #ifdef __LITTLE_ENDIAN__ 11684 return __builtin_altivec_vupklsb((vector
char)__a);
11686 return __builtin_altivec_vupkhsb((vector
char)__a);
11692 #ifdef __LITTLE_ENDIAN__ 11693 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11695 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11702 #ifdef __LITTLE_ENDIAN__ 11703 return __builtin_altivec_vupklsh(__a);
11705 return __builtin_altivec_vupkhsh(__a);
11711 #ifdef __LITTLE_ENDIAN__ 11712 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11714 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11720 #ifdef __LITTLE_ENDIAN__ 11721 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11723 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11729 #ifdef __POWER8_VECTOR__ 11730 static __inline__ vector
long long __ATTRS_o_ai vec_vupkhsw(vector
int __a) {
11731 #ifdef __LITTLE_ENDIAN__ 11732 return __builtin_altivec_vupklsw(__a);
11734 return __builtin_altivec_vupkhsw(__a);
11739 vec_vupkhsw(vector
bool int __a) {
11740 #ifdef __LITTLE_ENDIAN__ 11741 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11743 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11752 #ifdef __LITTLE_ENDIAN__ 11753 return __builtin_altivec_vupkhsb((vector
char)__a);
11755 return __builtin_altivec_vupklsb((vector
char)__a);
11761 #ifdef __LITTLE_ENDIAN__ 11762 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11764 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11769 #ifdef __LITTLE_ENDIAN__ 11770 return __builtin_altivec_vupkhsh(__a);
11772 return __builtin_altivec_vupklsh(__a);
11778 #ifdef __LITTLE_ENDIAN__ 11779 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11781 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11787 #ifdef __LITTLE_ENDIAN__ 11788 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11790 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11794 #ifdef __POWER8_VECTOR__ 11796 #ifdef __LITTLE_ENDIAN__ 11797 return __builtin_altivec_vupkhsw(__a);
11799 return __builtin_altivec_vupklsw(__a);
11805 #ifdef __LITTLE_ENDIAN__ 11806 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11808 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11814 return (vector
double)(__a[2], __a[3]);
11822 #ifdef __LITTLE_ENDIAN__ 11823 return __builtin_altivec_vupkhsb((vector
char)__a);
11825 return __builtin_altivec_vupklsb((vector
char)__a);
11831 #ifdef __LITTLE_ENDIAN__ 11832 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11834 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11841 #ifdef __LITTLE_ENDIAN__ 11842 return __builtin_altivec_vupkhsh(__a);
11844 return __builtin_altivec_vupklsh(__a);
11850 #ifdef __LITTLE_ENDIAN__ 11851 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11853 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11859 #ifdef __LITTLE_ENDIAN__ 11860 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11862 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11868 #ifdef __POWER8_VECTOR__ 11869 static __inline__ vector
long long __ATTRS_o_ai vec_vupklsw(vector
int __a) {
11870 #ifdef __LITTLE_ENDIAN__ 11871 return __builtin_altivec_vupkhsw(__a);
11873 return __builtin_altivec_vupklsw(__a);
11878 vec_vupklsw(vector
bool int __a) {
11879 #ifdef __LITTLE_ENDIAN__ 11880 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11882 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11892 vec_vsx_ld(
int __a,
const vector
bool int *__b) {
11893 return (vector
bool int)__builtin_vsx_lxvw4x(__a, __b);
11897 vec_vsx_ld(
int __a,
const vector
signed int *__b) {
11898 return (vector
signed int)__builtin_vsx_lxvw4x(__a, __b);
11902 vec_vsx_ld(
int __a,
const signed int *__b) {
11903 return (vector
signed int)__builtin_vsx_lxvw4x(__a, __b);
11907 vec_vsx_ld(
int __a,
const vector
unsigned int *__b) {
11908 return (vector
unsigned int)__builtin_vsx_lxvw4x(__a, __b);
11912 vec_vsx_ld(
int __a,
const unsigned int *__b) {
11913 return (vector
unsigned int)__builtin_vsx_lxvw4x(__a, __b);
11917 vec_vsx_ld(
int __a,
const vector
float *__b) {
11918 return (vector
float)__builtin_vsx_lxvw4x(__a, __b);
11921 static __inline__ vector
float __ATTRS_o_ai vec_vsx_ld(
int __a,
11922 const float *__b) {
11923 return (vector
float)__builtin_vsx_lxvw4x(__a, __b);
11926 static __inline__ vector
signed long long __ATTRS_o_ai 11927 vec_vsx_ld(
int __a,
const vector
signed long long *__b) {
11928 return (vector
signed long long)__builtin_vsx_lxvd2x(__a, __b);
11931 static __inline__ vector
unsigned long long __ATTRS_o_ai 11932 vec_vsx_ld(
int __a,
const vector
unsigned long long *__b) {
11933 return (vector
unsigned long long)__builtin_vsx_lxvd2x(__a, __b);
11937 vec_vsx_ld(
int __a,
const vector
double *__b) {
11938 return (vector
double)__builtin_vsx_lxvd2x(__a, __b);
11942 vec_vsx_ld(
int __a,
const double *__b) {
11943 return (vector
double)__builtin_vsx_lxvd2x(__a, __b);
11947 vec_vsx_ld(
int __a,
const vector
bool short *__b) {
11948 return (vector
bool short)__builtin_vsx_lxvw4x(__a, __b);
11952 vec_vsx_ld(
int __a,
const vector
signed short *__b) {
11953 return (vector
signed short)__builtin_vsx_lxvw4x(__a, __b);
11957 vec_vsx_ld(
int __a,
const signed short *__b) {
11958 return (vector
signed short)__builtin_vsx_lxvw4x(__a, __b);
11962 vec_vsx_ld(
int __a,
const vector
unsigned short *__b) {
11963 return (vector
unsigned short)__builtin_vsx_lxvw4x(__a, __b);
11967 vec_vsx_ld(
int __a,
const unsigned short *__b) {
11968 return (vector
unsigned short)__builtin_vsx_lxvw4x(__a, __b);
11972 vec_vsx_ld(
int __a,
const vector
bool char *__b) {
11973 return (vector
bool char)__builtin_vsx_lxvw4x(__a, __b);
11977 vec_vsx_ld(
int __a,
const vector
signed char *__b) {
11978 return (vector
signed char)__builtin_vsx_lxvw4x(__a, __b);
11982 vec_vsx_ld(
int __a,
const signed char *__b) {
11983 return (vector
signed char)__builtin_vsx_lxvw4x(__a, __b);
11987 vec_vsx_ld(
int __a,
const vector
unsigned char *__b) {
11988 return (vector
unsigned char)__builtin_vsx_lxvw4x(__a, __b);
11992 vec_vsx_ld(
int __a,
const unsigned char *__b) {
11993 return (vector
unsigned char)__builtin_vsx_lxvw4x(__a, __b);
12002 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool int __a,
int __b,
12003 vector
bool int *__c) {
12004 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12007 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool int __a,
int __b,
12009 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12012 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool int __a,
int __b,
12013 unsigned int *__c) {
12014 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12017 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed int __a,
int __b,
12018 vector
signed int *__c) {
12019 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12022 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed int __a,
int __b,
12024 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12027 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned int __a,
int __b,
12028 vector
unsigned int *__c) {
12029 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12032 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned int __a,
int __b,
12033 unsigned int *__c) {
12034 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12037 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
float __a,
int __b,
12038 vector
float *__c) {
12039 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12042 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
float __a,
int __b,
12044 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12047 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed long long __a,
12049 vector
signed long long *__c) {
12050 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12053 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned long long __a,
12055 vector
unsigned long long *__c) {
12056 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12059 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
double __a,
int __b,
12060 vector
double *__c) {
12061 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12064 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
double __a,
int __b,
12066 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12069 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool short __a,
int __b,
12070 vector
bool short *__c) {
12071 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12074 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool short __a,
int __b,
12075 signed short *__c) {
12076 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12079 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool short __a,
int __b,
12080 unsigned short *__c) {
12081 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12083 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed short __a,
int __b,
12084 vector
signed short *__c) {
12085 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12088 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed short __a,
int __b,
12089 signed short *__c) {
12090 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12093 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
12095 vector
unsigned short *__c) {
12096 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12099 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
12100 int __b,
unsigned short *__c) {
12101 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12104 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool char __a,
int __b,
12105 vector
bool char *__c) {
12106 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12109 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool char __a,
int __b,
12110 signed char *__c) {
12111 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12114 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool char __a,
int __b,
12115 unsigned char *__c) {
12116 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12119 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed char __a,
int __b,
12120 vector
signed char *__c) {
12121 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12124 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed char __a,
int __b,
12125 signed char *__c) {
12126 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12129 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
12131 vector
unsigned char *__c) {
12132 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12135 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
12136 int __b,
unsigned char *__c) {
12137 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12143 #define vec_xxpermdi __builtin_vsx_xxpermdi 12144 #define vec_xxsldwi __builtin_vsx_xxsldwi 12149 #define __builtin_altivec_vxor vec_xor 12152 vec_xor(vector
signed char __a, vector
signed char __b) {
12157 vec_xor(vector
bool char __a, vector
signed char __b) {
12158 return (vector
signed char)__a ^
__b;
12162 vec_xor(vector
signed char __a, vector
bool char __b) {
12163 return __a ^ (vector
signed char)__b;
12167 vec_xor(vector
unsigned char __a, vector
unsigned char __b) {
12172 vec_xor(vector
bool char __a, vector
unsigned char __b) {
12173 return (vector
unsigned char)__a ^
__b;
12177 vec_xor(vector
unsigned char __a, vector
bool char __b) {
12178 return __a ^ (vector
unsigned char)__b;
12182 vector
bool char __b) {
12187 vector
short __b) {
12192 vector
short __b) {
12193 return (vector
short)__a ^
__b;
12197 vector
bool short __b) {
12198 return __a ^ (vector short)__b;
12202 vec_xor(vector
unsigned short __a, vector
unsigned short __b) {
12207 vec_xor(vector
bool short __a, vector
unsigned short __b) {
12208 return (vector
unsigned short)__a ^
__b;
12212 vec_xor(vector
unsigned short __a, vector
bool short __b) {
12213 return __a ^ (vector
unsigned short)__b;
12217 vec_xor(vector
bool short __a, vector
bool short __b) {
12228 return (vector
int)__a ^
__b;
12232 vector
bool int __b) {
12233 return __a ^ (vector int)__b;
12237 vec_xor(vector
unsigned int __a, vector
unsigned int __b) {
12242 vec_xor(vector
bool int __a, vector
unsigned int __b) {
12243 return (vector
unsigned int)__a ^
__b;
12247 vec_xor(vector
unsigned int __a, vector
bool int __b) {
12248 return __a ^ (vector
unsigned int)__b;
12252 vector
bool int __b) {
12257 vector
float __b) {
12258 vector
unsigned int __res =
12259 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12260 return (vector
float)__res;
12264 vector
float __b) {
12265 vector
unsigned int __res =
12266 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12267 return (vector
float)__res;
12271 vector
bool int __b) {
12272 vector
unsigned int __res =
12273 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12274 return (vector
float)__res;
12278 static __inline__ vector
signed long long __ATTRS_o_ai 12279 vec_xor(vector
signed long long __a, vector
signed long long __b) {
12283 static __inline__ vector
signed long long __ATTRS_o_ai 12284 vec_xor(vector
bool long long __a, vector
signed long long __b) {
12285 return (vector
signed long long)__a ^
__b;
12288 static __inline__ vector
signed long long __ATTRS_o_ai 12289 vec_xor(vector
signed long long __a, vector
bool long long __b) {
12290 return __a ^ (vector
signed long long)__b;
12293 static __inline__ vector
unsigned long long __ATTRS_o_ai 12294 vec_xor(vector
unsigned long long __a, vector
unsigned long long __b) {
12298 static __inline__ vector
unsigned long long __ATTRS_o_ai 12299 vec_xor(vector
bool long long __a, vector
unsigned long long __b) {
12300 return (vector
unsigned long long)__a ^
__b;
12303 static __inline__ vector
unsigned long long __ATTRS_o_ai 12304 vec_xor(vector
unsigned long long __a, vector
bool long long __b) {
12305 return __a ^ (vector
unsigned long long)__b;
12309 vec_xor(vector
bool long long __a, vector
bool long long __b) {
12314 vector
double __b) {
12315 return (vector
double)((vector
unsigned long long)__a ^
12316 (vector
unsigned long long)
__b);
12320 vec_xor(vector
double __a, vector
bool long long __b) {
12321 return (vector
double)((vector
unsigned long long)__a ^
12322 (vector
unsigned long long)
__b);
12326 vector
double __b) {
12327 return (vector
double)((vector
unsigned long long)__a ^
12328 (vector
unsigned long long)
__b);
12341 return (vector
signed char)__a ^
__b;
12346 return __a ^ (vector
signed char)__b;
12350 vec_vxor(vector
unsigned char __a, vector
unsigned char __b) {
12356 return (vector
unsigned char)__a ^
__b;
12361 return __a ^ (vector
unsigned char)__b;
12365 vector
bool char __b) {
12370 vector
short __b) {
12375 vector
short __b) {
12376 return (vector
short)__a ^
__b;
12380 vector
bool short __b) {
12381 return __a ^ (vector short)__b;
12385 vec_vxor(vector
unsigned short __a, vector
unsigned short __b) {
12390 vec_vxor(vector
bool short __a, vector
unsigned short __b) {
12391 return (vector
unsigned short)__a ^
__b;
12395 vec_vxor(vector
unsigned short __a, vector
bool short __b) {
12396 return __a ^ (vector
unsigned short)__b;
12411 return (vector
int)__a ^
__b;
12415 vector
bool int __b) {
12416 return __a ^ (vector int)__b;
12420 vec_vxor(vector
unsigned int __a, vector
unsigned int __b) {
12426 return (vector
unsigned int)__a ^
__b;
12431 return __a ^ (vector
unsigned int)__b;
12435 vector
bool int __b) {
12440 vector
float __b) {
12441 vector
unsigned int __res =
12442 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12443 return (vector
float)__res;
12447 vector
float __b) {
12448 vector
unsigned int __res =
12449 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12450 return (vector
float)__res;
12454 vector
bool int __b) {
12455 vector
unsigned int __res =
12456 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12457 return (vector
float)__res;
12461 static __inline__ vector
signed long long __ATTRS_o_ai 12462 vec_vxor(vector
signed long long __a, vector
signed long long __b) {
12466 static __inline__ vector
signed long long __ATTRS_o_ai 12467 vec_vxor(vector
bool long long __a, vector
signed long long __b) {
12468 return (vector
signed long long)__a ^
__b;
12471 static __inline__ vector
signed long long __ATTRS_o_ai 12472 vec_vxor(vector
signed long long __a, vector
bool long long __b) {
12473 return __a ^ (vector
signed long long)__b;
12476 static __inline__ vector
unsigned long long __ATTRS_o_ai 12477 vec_vxor(vector
unsigned long long __a, vector
unsigned long long __b) {
12481 static __inline__ vector
unsigned long long __ATTRS_o_ai 12482 vec_vxor(vector
bool long long __a, vector
unsigned long long __b) {
12483 return (vector
unsigned long long)__a ^
__b;
12486 static __inline__ vector
unsigned long long __ATTRS_o_ai 12487 vec_vxor(vector
unsigned long long __a, vector
bool long long __b) {
12488 return __a ^ (vector
unsigned long long)__b;
12492 vec_vxor(vector
bool long long __a, vector
bool long long __b) {
12548 vec_extract(vector
signed long long __a,
int __b) {
12553 vec_extract(vector
unsigned long long __a,
int __b) {
12558 vec_extract(vector
bool long long __a,
int __b) {
12571 #ifdef __POWER9_VECTOR__ 12573 #define vec_insert4b __builtin_vsx_insertword 12574 #define vec_extract4b __builtin_vsx_extractuword 12579 vec_extract_exp(vector
float __a) {
12580 return __builtin_vsx_xvxexpsp(__a);
12583 static __inline__ vector
unsigned long long __ATTRS_o_ai 12584 vec_extract_exp(vector
double __a) {
12585 return __builtin_vsx_xvxexpdp(__a);
12591 vec_extract_sig(vector
float __a) {
12592 return __builtin_vsx_xvxsigsp(__a);
12595 static __inline__ vector
unsigned long long __ATTRS_o_ai 12596 vec_extract_sig (vector
double __a) {
12597 return __builtin_vsx_xvxsigdp(__a);
12601 vec_extract_fp32_from_shorth(vector
unsigned short __a) {
12602 vector
unsigned short __b =
12603 #ifdef __LITTLE_ENDIAN__ 12604 __builtin_shufflevector(__a, __a, 0, -1, 1, -1, 2, -1, 3, -1);
12606 __builtin_shufflevector(__a, __a, -1, 0, -1, 1, -1, 2, -1, 3);
12608 return __builtin_vsx_xvcvhpsp(__b);
12612 vec_extract_fp32_from_shortl(vector
unsigned short __a) {
12613 vector
unsigned short __b =
12614 #ifdef __LITTLE_ENDIAN__ 12615 __builtin_shufflevector(__a, __a, 4, -1, 5, -1, 6, -1, 7, -1);
12617 __builtin_shufflevector(__a, __a, -1, 4, -1, 5, -1, 6, -1, 7);
12619 return __builtin_vsx_xvcvhpsp(__b);
12638 vector
bool char __b,
12675 vector
bool int __b,
12682 static __inline__ vector
signed long long __ATTRS_o_ai 12683 vec_insert(
signed long long __a, vector
signed long long __b,
int __c) {
12688 static __inline__ vector
unsigned long long __ATTRS_o_ai 12689 vec_insert(
unsigned long long __a, vector
unsigned long long __b,
int __c) {
12695 vec_insert(
unsigned long long __a, vector
bool long long __b,
int __c) {
12725 vec_lvsl(__a, (
unsigned char *)__b));
12737 vec_lvsl(__a, (
unsigned char *)__b));
12743 vec_lvsl(__a, (
unsigned char *)__b));
12747 const short *__b) {
12752 const vector
short *__b) {
12754 vec_lvsl(__a, (
unsigned char *)__b));
12766 vec_lvsl(__a, (
unsigned char *)__b));
12772 vec_lvsl(__a, (
unsigned char *)__b));
12776 const vector pixel *__b) {
12778 vec_lvsl(__a, (
unsigned char *)__b));
12786 const vector
int *__b) {
12788 vec_lvsl(__a, (
unsigned char *)__b));
12800 vec_lvsl(__a, (
unsigned char *)__b));
12806 vec_lvsl(__a, (
unsigned char *)__b));
12810 const float *__b) {
12815 const vector
float *__b) {
12817 vec_lvsl(__a, (
unsigned char *)__b));
12831 vec_lvsl(__a, (
unsigned char *)__b));
12843 vec_lvsl(__a, (
unsigned char *)__b));
12849 vec_lvsl(__a, (
unsigned char *)__b));
12853 const short *__b) {
12858 const vector
short *__b) {
12860 vec_lvsl(__a, (
unsigned char *)__b));
12872 vec_lvsl(__a, (
unsigned char *)__b));
12878 vec_lvsl(__a, (
unsigned char *)__b));
12882 const vector pixel *__b) {
12884 vec_lvsl(__a, (
unsigned char *)__b));
12892 const vector
int *__b) {
12894 vec_lvsl(__a, (
unsigned char *)__b));
12906 vec_lvsl(__a, (
unsigned char *)__b));
12912 vec_lvsl(__a, (
unsigned char *)__b));
12916 const float *__b) {
12921 vector
float *__b) {
12923 vec_lvsl(__a, (
unsigned char *)__b));
12937 vec_lvsl(__a, (
unsigned char *)__b));
12949 vec_lvsl(__a, (
unsigned char *)__b));
12955 vec_lvsl(__a, (
unsigned char *)__b));
12959 const short *__b) {
12964 const vector
short *__b) {
12966 vec_lvsl(__a, (
unsigned char *)__b));
12978 vec_lvsl(__a, (
unsigned char *)__b));
12984 vec_lvsl(__a, (
unsigned char *)__b));
12988 const vector pixel *__b) {
12990 vec_lvsl(__a, (
unsigned char *)__b));
12998 const vector
int *__b) {
13000 vec_lvsl(__a, (
unsigned char *)__b));
13012 vec_lvsl(__a, (
unsigned char *)__b));
13018 vec_lvsl(__a, (
unsigned char *)__b));
13022 const float *__b) {
13027 const vector
float *__b) {
13029 vec_lvsl(__a, (
unsigned char *)__b));
13043 vec_lvsl(__a, (
unsigned char *)__b));
13055 vec_lvsl(__a, (
unsigned char *)__b));
13061 vec_lvsl(__a, (
unsigned char *)__b));
13065 const short *__b) {
13070 const vector
short *__b) {
13072 vec_lvsl(__a, (
unsigned char *)__b));
13084 vec_lvsl(__a, (
unsigned char *)__b));
13090 vec_lvsl(__a, (
unsigned char *)__b));
13094 const vector pixel *__b) {
13096 vec_lvsl(__a, (
unsigned char *)__b));
13104 const vector
int *__b) {
13106 vec_lvsl(__a, (
unsigned char *)__b));
13118 vec_lvsl(__a, (
unsigned char *)__b));
13124 vec_lvsl(__a, (
unsigned char *)__b));
13128 const float *__b) {
13133 const vector
float *__b) {
13135 vec_lvsl(__a, (
unsigned char *)__b));
13141 signed char *__c) {
13147 vector
signed char *__c) {
13154 unsigned char *__c) {
13160 vector
unsigned char *__c) {
13167 vector
bool char *__c) {
13180 vector
short *__c) {
13187 int __b,
unsigned short *__c) {
13194 vector
unsigned short *__c) {
13201 vector
bool short *__c) {
13208 vector pixel *__c) {
13228 unsigned int *__c) {
13234 vector
unsigned int *__c) {
13241 vector
bool int *__c) {
13248 vector
float *__c) {
13257 signed char *__c) {
13263 vector
signed char *__c) {
13270 int __b,
unsigned char *__c) {
13277 vector
unsigned char *__c) {
13284 vector
bool char *__c) {
13297 vector
short *__c) {
13304 int __b,
unsigned short *__c) {
13311 vector
unsigned short *__c) {
13318 vector
bool short *__c) {
13325 vector pixel *__c) {
13345 unsigned int *__c) {
13351 vector
unsigned int *__c) {
13358 vector
bool int *__c) {
13365 vector
float *__c) {
13374 signed char *__c) {
13380 vector
signed char *__c) {
13387 unsigned char *__c) {
13393 vector
unsigned char *__c) {
13400 vector
bool char *__c) {
13413 vector
short *__c) {
13420 int __b,
unsigned short *__c) {
13427 vector
unsigned short *__c) {
13434 vector
bool short *__c) {
13441 vector pixel *__c) {
13461 unsigned int *__c) {
13467 vector
unsigned int *__c) {
13474 vector
bool int *__c) {
13481 vector
float *__c) {
13490 signed char *__c) {
13496 vector
signed char *__c) {
13503 int __b,
unsigned char *__c) {
13510 vector
unsigned char *__c) {
13517 vector
bool char *__c) {
13530 vector
short *__c) {
13537 int __b,
unsigned short *__c) {
13544 vector
unsigned short *__c) {
13551 vector
bool short *__c) {
13558 vector pixel *__c) {
13578 unsigned int *__c) {
13584 vector
unsigned int *__c) {
13591 vector
bool int *__c) {
13598 vector
float *__c) {
13608 vector
signed char __res = (vector
signed char)(0);
13615 vector
unsigned char __res = (vector
unsigned char)(0);
13621 vector
short __res = (vector short)(0);
13628 vector
unsigned short __res = (vector
unsigned short)(0);
13634 vector
int __res = (vector int)(0);
13641 vector
unsigned int __res = (vector
unsigned int)(0);
13647 vector
float __res = (vector float)(0);
13655 return (vector
signed char)(
__a);
13660 return (vector
unsigned char)(
__a);
13664 return (vector
short)(
__a);
13669 return (vector
unsigned short)(
__a);
13673 return (vector
int)(
__a);
13678 return (vector
unsigned int)(
__a);
13682 static __inline__ vector
signed long long __ATTRS_o_ai 13684 return (vector
signed long long)(
__a);
13687 static __inline__ vector
unsigned long long __ATTRS_o_ai 13689 return (vector
unsigned long long)(
__a);
13692 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 13695 return (vector
signed __int128)(
__a);
13698 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 13700 return (vector
unsigned __int128)(
__a);
13706 return (vector
double)(
__a);
13711 return (vector
float)(
__a);
13719 vector
signed char __b) {
13720 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13725 vector
bool char __b) {
13726 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13731 vector
unsigned char __b) {
13732 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13737 vector
bool char __b) {
13738 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13743 vector
signed char __b) {
13744 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13749 vector
unsigned char __b) {
13750 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13755 vector
bool char __b) {
13756 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13761 vector
short __b) {
13762 return __builtin_altivec_vcmpequh_p(
__CR6_LT, __a, __b);
13766 vector
bool short __b) {
13767 return __builtin_altivec_vcmpequh_p(
__CR6_LT, __a, (vector
short)__b);
13771 vector
unsigned short __b) {
13772 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13773 (vector
short)__b);
13777 vector
bool short __b) {
13778 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13779 (vector
short)__b);
13783 vector
short __b) {
13784 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13785 (vector
short)__b);
13789 vector
unsigned short __b) {
13790 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13791 (vector
short)__b);
13795 vector
bool short __b) {
13796 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13797 (vector
short)__b);
13801 vector pixel __b) {
13802 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13803 (vector
short)__b);
13807 return __builtin_altivec_vcmpequw_p(
__CR6_LT, __a, __b);
13811 vector
bool int __b) {
13812 return __builtin_altivec_vcmpequw_p(
__CR6_LT, __a, (vector
int)__b);
13816 vector
unsigned int __b) {
13817 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13822 vector
bool int __b) {
13823 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13829 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13834 vector
unsigned int __b) {
13835 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13840 vector
bool int __b) {
13841 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13845 #ifdef __POWER8_VECTOR__ 13847 vector
signed long long __b) {
13848 return __builtin_altivec_vcmpequd_p(
__CR6_LT, __a, __b);
13852 vector
bool long long __b) {
13853 return __builtin_altivec_vcmpequd_p(
__CR6_LT, __a, (vector
long long)__b);
13857 vector
unsigned long long __b) {
13858 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13859 (vector
long long)__b);
13863 vector
bool long long __b) {
13864 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13865 (vector
long long)__b);
13869 vector
long long __b) {
13870 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13871 (vector
long long)__b);
13875 vector
unsigned long long __b) {
13876 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13877 (vector
long long)__b);
13881 vector
bool long long __b) {
13882 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13883 (vector
long long)__b);
13888 vector
float __b) {
13890 return __builtin_vsx_xvcmpeqsp_p(
__CR6_LT, __a, __b);
13892 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT, __a, __b);
13898 vector
double __b) {
13899 return __builtin_vsx_xvcmpeqdp_p(
__CR6_LT, __a, __b);
13906 vector
signed char __b) {
13907 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, __b, __a);
13911 vector
bool char __b) {
13912 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, (vector
signed char)__b, __a);
13916 vector
unsigned char __b) {
13917 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __b, __a);
13921 vector
bool char __b) {
13922 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__b, __a);
13926 vector
signed char __b) {
13927 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__b,
13928 (vector
unsigned char)__a);
13932 vector
unsigned char __b) {
13933 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __b, (vector
unsigned char)__a);
13937 vector
bool char __b) {
13938 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__b,
13939 (vector
unsigned char)__a);
13943 vector
short __b) {
13944 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, __b, __a);
13948 vector
bool short __b) {
13949 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, (vector
short)__b, __a);
13953 vector
unsigned short __b) {
13954 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __b, __a);
13958 vector
bool short __b) {
13959 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__b,
13964 vector
short __b) {
13965 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__b,
13966 (vector
unsigned short)__a);
13970 vector
unsigned short __b) {
13971 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __b,
13972 (vector
unsigned short)__a);
13976 vector
bool short __b) {
13977 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__b,
13978 (vector
unsigned short)__a);
13982 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, __b, __a);
13986 vector
bool int __b) {
13987 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, (vector
int)__b, __a);
13991 vector
unsigned int __b) {
13992 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __b, __a);
13996 vector
bool int __b) {
13997 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__b, __a);
14002 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__b,
14003 (vector
unsigned int)__a);
14007 vector
unsigned int __b) {
14008 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __b, (vector
unsigned int)__a);
14012 vector
bool int __b) {
14013 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__b,
14014 (vector
unsigned int)__a);
14017 #ifdef __POWER8_VECTOR__ 14019 vector
signed long long __b) {
14020 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, __b, __a);
14023 vector
bool long long __b) {
14024 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, (vector
signed long long)__b,
14029 vector
unsigned long long __b) {
14030 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __b, __a);
14034 vector
bool long long __b) {
14035 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__b,
14040 vector
signed long long __b) {
14041 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__b,
14042 (vector
unsigned long long)__a);
14046 vector
unsigned long long __b) {
14047 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __b,
14048 (vector
unsigned long long)__a);
14052 vector
bool long long __b) {
14053 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__b,
14054 (vector
unsigned long long)__a);
14059 vector
float __b) {
14061 return __builtin_vsx_xvcmpgesp_p(
__CR6_LT, __a, __b);
14063 return __builtin_altivec_vcmpgefp_p(
__CR6_LT, __a, __b);
14069 vector
double __b) {
14070 return __builtin_vsx_xvcmpgedp_p(
__CR6_LT, __a, __b);
14077 vector
signed char __b) {
14078 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, __a, __b);
14082 vector
bool char __b) {
14083 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, __a, (vector
signed char)__b);
14087 vector
unsigned char __b) {
14088 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __a, __b);
14092 vector
bool char __b) {
14093 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __a, (vector
unsigned char)__b);
14097 vector
signed char __b) {
14098 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__a,
14099 (vector
unsigned char)__b);
14103 vector
unsigned char __b) {
14104 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__a, __b);
14108 vector
bool char __b) {
14109 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__a,
14110 (vector
unsigned char)__b);
14114 vector
short __b) {
14115 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, __a, __b);
14119 vector
bool short __b) {
14120 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, __a, (vector
short)__b);
14124 vector
unsigned short __b) {
14125 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __a, __b);
14129 vector
bool short __b) {
14130 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __a,
14131 (vector
unsigned short)__b);
14135 vector
short __b) {
14136 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__a,
14137 (vector
unsigned short)__b);
14141 vector
unsigned short __b) {
14142 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__a,
14147 vector
bool short __b) {
14148 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__a,
14149 (vector
unsigned short)__b);
14153 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, __a, __b);
14157 vector
bool int __b) {
14158 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, __a, (vector
int)__b);
14162 vector
unsigned int __b) {
14163 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __a, __b);
14167 vector
bool int __b) {
14168 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __a, (vector
unsigned int)__b);
14173 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__a,
14174 (vector
unsigned int)__b);
14178 vector
unsigned int __b) {
14179 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__a, __b);
14183 vector
bool int __b) {
14184 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__a,
14185 (vector
unsigned int)__b);
14188 #ifdef __POWER8_VECTOR__ 14190 vector
signed long long __b) {
14191 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, __a, __b);
14194 vector
bool long long __b) {
14195 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, __a,
14196 (vector
signed long long)__b);
14200 vector
unsigned long long __b) {
14201 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __a, __b);
14205 vector
bool long long __b) {
14206 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __a,
14207 (vector
unsigned long long)__b);
14211 vector
signed long long __b) {
14212 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__a,
14213 (vector
unsigned long long)__b);
14217 vector
unsigned long long __b) {
14218 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__a,
14223 vector
bool long long __b) {
14224 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__a,
14225 (vector
unsigned long long)__b);
14230 vector
float __b) {
14232 return __builtin_vsx_xvcmpgtsp_p(
__CR6_LT, __a, __b);
14234 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT, __a, __b);
14240 vector
double __b) {
14241 return __builtin_vsx_xvcmpgtdp_p(
__CR6_LT, __a, __b);
14248 vec_all_in(vector
float __a, vector
float __b) {
14249 return __builtin_altivec_vcmpbfp_p(
__CR6_EQ, __a, __b);
14255 vector
signed char __b) {
14256 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, __a, __b);
14260 vector
bool char __b) {
14261 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, __a, (vector
signed char)__b);
14265 vector
unsigned char __b) {
14266 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __a, __b);
14270 vector
bool char __b) {
14271 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __a, (vector
unsigned char)__b);
14275 vector
signed char __b) {
14276 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__a,
14277 (vector
unsigned char)__b);
14281 vector
unsigned char __b) {
14282 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__a, __b);
14286 vector
bool char __b) {
14287 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__a,
14288 (vector
unsigned char)__b);
14292 vector
short __b) {
14293 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, __a, __b);
14297 vector
bool short __b) {
14298 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, __a, (vector
short)__b);
14302 vector
unsigned short __b) {
14303 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __a, __b);
14307 vector
bool short __b) {
14308 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __a,
14309 (vector
unsigned short)__b);
14313 vector
short __b) {
14314 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__a,
14315 (vector
unsigned short)__b);
14319 vector
unsigned short __b) {
14320 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__a,
14325 vector
bool short __b) {
14326 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__a,
14327 (vector
unsigned short)__b);
14331 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, __a, __b);
14335 vector
bool int __b) {
14336 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, __a, (vector
int)__b);
14340 vector
unsigned int __b) {
14341 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __a, __b);
14345 vector
bool int __b) {
14346 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __a, (vector
unsigned int)__b);
14351 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__a,
14352 (vector
unsigned int)__b);
14356 vector
unsigned int __b) {
14357 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__a, __b);
14361 vector
bool int __b) {
14362 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__a,
14363 (vector
unsigned int)__b);
14366 #ifdef __POWER8_VECTOR__ 14368 vector
signed long long __b) {
14369 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, __a, __b);
14373 vector
unsigned long long __b) {
14374 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __a, __b);
14378 vector
bool long long __b) {
14379 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, __a,
14380 (vector
signed long long)__b);
14384 vector
bool long long __b) {
14385 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __a,
14386 (vector
unsigned long long)__b);
14390 vector
signed long long __b) {
14391 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__a,
14392 (vector
unsigned long long)__b);
14396 vector
unsigned long long __b) {
14397 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__a,
14402 vector
bool long long __b) {
14403 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__a,
14404 (vector
unsigned long long)__b);
14409 vector
float __b) {
14411 return __builtin_vsx_xvcmpgesp_p(
__CR6_LT, __b, __a);
14413 return __builtin_altivec_vcmpgefp_p(
__CR6_LT, __b, __a);
14419 vector
double __b) {
14420 return __builtin_vsx_xvcmpgedp_p(
__CR6_LT, __b, __a);
14427 vector
signed char __b) {
14428 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, __b, __a);
14432 vector
bool char __b) {
14433 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, (vector
signed char)__b, __a);
14437 vector
unsigned char __b) {
14438 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __b, __a);
14442 vector
bool char __b) {
14443 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__b, __a);
14447 vector
signed char __b) {
14448 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__b,
14449 (vector
unsigned char)__a);
14453 vector
unsigned char __b) {
14454 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __b, (vector
unsigned char)__a);
14458 vector
bool char __b) {
14459 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__b,
14460 (vector
unsigned char)__a);
14464 vector
short __b) {
14465 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, __b, __a);
14469 vector
bool short __b) {
14470 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, (vector
short)__b, __a);
14474 vector
unsigned short __b) {
14475 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __b, __a);
14479 vector
bool short __b) {
14480 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__b,
14485 vector
short __b) {
14486 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__b,
14487 (vector
unsigned short)__a);
14491 vector
unsigned short __b) {
14492 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __b,
14493 (vector
unsigned short)__a);
14497 vector
bool short __b) {
14498 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__b,
14499 (vector
unsigned short)__a);
14503 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, __b, __a);
14507 vector
bool int __b) {
14508 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, (vector
int)__b, __a);
14512 vector
unsigned int __b) {
14513 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __b, __a);
14517 vector
bool int __b) {
14518 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__b, __a);
14523 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__b,
14524 (vector
unsigned int)__a);
14528 vector
unsigned int __b) {
14529 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __b, (vector
unsigned int)__a);
14533 vector
bool int __b) {
14534 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__b,
14535 (vector
unsigned int)__a);
14538 #ifdef __POWER8_VECTOR__ 14540 vector
signed long long __b) {
14541 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, __b, __a);
14545 vector
unsigned long long __b) {
14546 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __b, __a);
14550 vector
bool long long __b) {
14551 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, (vector
signed long long)__b,
14556 vector
bool long long __b) {
14557 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__b,
14562 vector
signed long long __b) {
14563 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__b,
14564 (vector
unsigned long long)__a);
14568 vector
unsigned long long __b) {
14569 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __b,
14570 (vector
unsigned long long)__a);
14574 vector
bool long long __b) {
14575 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__b,
14576 (vector
unsigned long long)__a);
14581 vector
float __b) {
14583 return __builtin_vsx_xvcmpgtsp_p(
__CR6_LT, __b, __a);
14585 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT, __b, __a);
14591 vector
double __b) {
14592 return __builtin_vsx_xvcmpgtdp_p(
__CR6_LT, __b, __a);
14600 return __builtin_vsx_xvcmpeqsp_p(
__CR6_EQ, __a, __a);
14602 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ, __a, __a);
14608 return __builtin_vsx_xvcmpeqdp_p(
__CR6_EQ, __a, __a);
14615 vector
signed char __b) {
14616 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14621 vector
bool char __b) {
14622 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14627 vector
unsigned char __b) {
14628 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14633 vector
bool char __b) {
14634 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14639 vector
signed char __b) {
14640 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14645 vector
unsigned char __b) {
14646 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14651 vector
bool char __b) {
14652 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14657 vector
short __b) {
14658 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, __a, __b);
14662 vector
bool short __b) {
14663 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, __a, (vector
short)__b);
14667 vector
unsigned short __b) {
14668 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14669 (vector
short)__b);
14673 vector
bool short __b) {
14674 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14675 (vector
short)__b);
14679 vector
short __b) {
14680 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14681 (vector
short)__b);
14685 vector
unsigned short __b) {
14686 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14687 (vector
short)__b);
14691 vector
bool short __b) {
14692 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14693 (vector
short)__b);
14697 vector pixel __b) {
14698 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14699 (vector
short)__b);
14703 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, __a, __b);
14707 vector
bool int __b) {
14708 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, __a, (vector
int)__b);
14712 vector
unsigned int __b) {
14713 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14718 vector
bool int __b) {
14719 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14725 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14730 vector
unsigned int __b) {
14731 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14736 vector
bool int __b) {
14737 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14741 #ifdef __POWER8_VECTOR__ 14743 vector
signed long long __b) {
14744 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, __a, __b);
14748 vector
unsigned long long __b) {
14749 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
long long)__a,
14750 (vector
long long)__b);
14754 vector
bool long long __b) {
14755 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, __a,
14756 (vector
signed long long)__b);
14760 vector
bool long long __b) {
14761 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14762 (vector
signed long long)__b);
14766 vector
signed long long __b) {
14767 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14768 (vector
signed long long)__b);
14772 vector
unsigned long long __b) {
14773 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14774 (vector
signed long long)__b);
14778 vector
bool long long __b) {
14779 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14780 (vector
signed long long)__b);
14785 vector
float __b) {
14787 return __builtin_vsx_xvcmpeqsp_p(
__CR6_EQ, __a, __b);
14789 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ, __a, __b);
14795 vector
double __b) {
14796 return __builtin_vsx_xvcmpeqdp_p(
__CR6_EQ, __a, __b);
14803 vector
float __b) {
14805 return __builtin_vsx_xvcmpgesp_p(
__CR6_EQ, __a, __b);
14807 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ, __a, __b);
14813 vector
double __b) {
14814 return __builtin_vsx_xvcmpgedp_p(
__CR6_EQ, __a, __b);
14821 vector
float __b) {
14823 return __builtin_vsx_xvcmpgtsp_p(
__CR6_EQ, __a, __b);
14825 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ, __a, __b);
14831 vector
double __b) {
14832 return __builtin_vsx_xvcmpgtdp_p(
__CR6_EQ, __a, __b);
14839 vec_all_nle(vector
float __a, vector
float __b) {
14840 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ, __b, __a);
14846 vec_all_nlt(vector
float __a, vector
float __b) {
14847 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ, __b, __a);
14853 vec_all_numeric(vector
float __a) {
14854 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT, __a, __a);
14860 vector
signed char __b) {
14861 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14866 vector
bool char __b) {
14867 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14872 vector
unsigned char __b) {
14873 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14878 vector
bool char __b) {
14879 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14884 vector
signed char __b) {
14885 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14890 vector
unsigned char __b) {
14891 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14896 vector
bool char __b) {
14897 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14902 vector
short __b) {
14903 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, __a, __b);
14907 vector
bool short __b) {
14908 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, __a, (vector
short)__b);
14912 vector
unsigned short __b) {
14913 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14914 (vector
short)__b);
14918 vector
bool short __b) {
14919 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14920 (vector
short)__b);
14924 vector
short __b) {
14925 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14926 (vector
short)__b);
14930 vector
unsigned short __b) {
14931 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14932 (vector
short)__b);
14936 vector
bool short __b) {
14937 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14938 (vector
short)__b);
14942 vector pixel __b) {
14943 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14944 (vector
short)__b);
14948 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, __a, __b);
14952 vector
bool int __b) {
14953 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, __a, (vector
int)__b);
14957 vector
unsigned int __b) {
14958 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14963 vector
bool int __b) {
14964 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14970 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14975 vector
unsigned int __b) {
14976 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14981 vector
bool int __b) {
14982 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14986 #ifdef __POWER8_VECTOR__ 14988 vector
signed long long __b) {
14989 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, __a, __b);
14993 vector
unsigned long long __b) {
14994 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, (vector
long long)__a,
14995 (vector
long long)__b);
14999 vector
bool long long __b) {
15000 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, __a,
15001 (vector
signed long long)__b);
15005 vector
bool long long __b) {
15006 return __builtin_altivec_vcmpequd_p(
15007 __CR6_EQ_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15011 vector
signed long long __b) {
15012 return __builtin_altivec_vcmpequd_p(
15013 __CR6_EQ_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15017 vector
unsigned long long __b) {
15018 return __builtin_altivec_vcmpequd_p(
15019 __CR6_EQ_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15023 vector
bool long long __b) {
15024 return __builtin_altivec_vcmpequd_p(
15025 __CR6_EQ_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15030 vector
float __b) {
15032 return __builtin_vsx_xvcmpeqsp_p(
__CR6_EQ_REV, __a, __b);
15034 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ_REV, __a, __b);
15040 vector
double __b) {
15041 return __builtin_vsx_xvcmpeqdp_p(
__CR6_EQ_REV, __a, __b);
15048 vector
signed char __b) {
15049 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, __b, __a);
15053 vector
bool char __b) {
15054 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, (vector
signed char)__b,
15059 vector
unsigned char __b) {
15060 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __b, __a);
15064 vector
bool char __b) {
15065 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__b,
15070 vector
signed char __b) {
15071 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__b,
15072 (vector
unsigned char)__a);
15076 vector
unsigned char __b) {
15077 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __b,
15078 (vector
unsigned char)__a);
15082 vector
bool char __b) {
15083 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__b,
15084 (vector
unsigned char)__a);
15088 vector
short __b) {
15089 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, __b, __a);
15093 vector
bool short __b) {
15094 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, (vector
short)__b, __a);
15098 vector
unsigned short __b) {
15099 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __b, __a);
15103 vector
bool short __b) {
15104 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__b,
15109 vector
short __b) {
15110 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__b,
15111 (vector
unsigned short)__a);
15115 vector
unsigned short __b) {
15116 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __b,
15117 (vector
unsigned short)__a);
15121 vector
bool short __b) {
15122 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__b,
15123 (vector
unsigned short)__a);
15127 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, __b, __a);
15131 vector
bool int __b) {
15132 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, (vector
int)__b, __a);
15136 vector
unsigned int __b) {
15137 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __b, __a);
15141 vector
bool int __b) {
15142 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__b,
15148 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__b,
15149 (vector
unsigned int)__a);
15153 vector
unsigned int __b) {
15154 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __b,
15155 (vector
unsigned int)__a);
15159 vector
bool int __b) {
15160 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__b,
15161 (vector
unsigned int)__a);
15164 #ifdef __POWER8_VECTOR__ 15166 vector
signed long long __b) {
15167 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT_REV, __b, __a);
15171 vector
unsigned long long __b) {
15172 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __b, __a);
15176 vector
bool long long __b) {
15178 (vector
signed long long)__b, __a);
15182 vector
bool long long __b) {
15184 (vector
unsigned long long)__b, __a);
15188 vector
signed long long __b) {
15190 (vector
unsigned long long)__b,
15191 (vector
unsigned long long)__a);
15195 vector
unsigned long long __b) {
15196 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __b,
15197 (vector
unsigned long long)__a);
15201 vector
bool long long __b) {
15203 (vector
unsigned long long)__b,
15204 (vector
unsigned long long)__a);
15209 vector
float __b) {
15211 return __builtin_vsx_xvcmpgesp_p(
__CR6_EQ_REV, __a, __b);
15213 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ_REV, __a, __b);
15219 vector
double __b) {
15220 return __builtin_vsx_xvcmpgedp_p(
__CR6_EQ_REV, __a, __b);
15227 vector
signed char __b) {
15228 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, __a, __b);
15232 vector
bool char __b) {
15233 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, __a,
15234 (vector
signed char)__b);
15238 vector
unsigned char __b) {
15239 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __a, __b);
15243 vector
bool char __b) {
15244 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __a,
15245 (vector
unsigned char)__b);
15249 vector
signed char __b) {
15250 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__a,
15251 (vector
unsigned char)__b);
15255 vector
unsigned char __b) {
15256 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__a,
15261 vector
bool char __b) {
15262 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__a,
15263 (vector
unsigned char)__b);
15267 vector
short __b) {
15268 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, __a, __b);
15272 vector
bool short __b) {
15273 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, __a, (vector
short)__b);
15277 vector
unsigned short __b) {
15278 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __a, __b);
15282 vector
bool short __b) {
15283 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __a,
15284 (vector
unsigned short)__b);
15288 vector
short __b) {
15289 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__a,
15290 (vector
unsigned short)__b);
15294 vector
unsigned short __b) {
15295 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__a,
15300 vector
bool short __b) {
15301 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__a,
15302 (vector
unsigned short)__b);
15306 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, __a, __b);
15310 vector
bool int __b) {
15311 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, __a, (vector
int)__b);
15315 vector
unsigned int __b) {
15316 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __a, __b);
15320 vector
bool int __b) {
15321 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __a,
15322 (vector
unsigned int)__b);
15327 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__a,
15328 (vector
unsigned int)__b);
15332 vector
unsigned int __b) {
15333 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__a,
15338 vector
bool int __b) {
15339 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__a,
15340 (vector
unsigned int)__b);
15343 #ifdef __POWER8_VECTOR__ 15345 vector
signed long long __b) {
15346 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ_REV, __a, __b);
15350 vector
unsigned long long __b) {
15351 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __a, __b);
15355 vector
bool long long __b) {
15356 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ_REV, __a,
15357 (vector
signed long long)__b);
15361 vector
bool long long __b) {
15362 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __a,
15363 (vector
unsigned long long)__b);
15367 vector
signed long long __b) {
15369 (vector
unsigned long long)__a,
15370 (vector
unsigned long long)__b);
15374 vector
unsigned long long __b) {
15376 (vector
unsigned long long)__a, __b);
15380 vector
bool long long __b) {
15382 (vector
unsigned long long)__a,
15383 (vector
unsigned long long)__b);
15388 vector
float __b) {
15390 return __builtin_vsx_xvcmpgtsp_p(
__CR6_EQ_REV, __a, __b);
15392 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ_REV, __a, __b);
15398 vector
double __b) {
15399 return __builtin_vsx_xvcmpgtdp_p(
__CR6_EQ_REV, __a, __b);
15406 vector
signed char __b) {
15407 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, __a, __b);
15411 vector
bool char __b) {
15412 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, __a,
15413 (vector
signed char)__b);
15417 vector
unsigned char __b) {
15418 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __a, __b);
15422 vector
bool char __b) {
15423 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __a,
15424 (vector
unsigned char)__b);
15428 vector
signed char __b) {
15429 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__a,
15430 (vector
unsigned char)__b);
15434 vector
unsigned char __b) {
15435 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__a,
15440 vector
bool char __b) {
15441 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__a,
15442 (vector
unsigned char)__b);
15446 vector
short __b) {
15447 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, __a, __b);
15451 vector
bool short __b) {
15452 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, __a, (vector
short)__b);
15456 vector
unsigned short __b) {
15457 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __a, __b);
15461 vector
bool short __b) {
15462 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __a,
15463 (vector
unsigned short)__b);
15467 vector
short __b) {
15468 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__a,
15469 (vector
unsigned short)__b);
15473 vector
unsigned short __b) {
15474 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__a,
15479 vector
bool short __b) {
15480 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__a,
15481 (vector
unsigned short)__b);
15485 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, __a, __b);
15489 vector
bool int __b) {
15490 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, __a, (vector
int)__b);
15494 vector
unsigned int __b) {
15495 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __a, __b);
15499 vector
bool int __b) {
15500 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __a,
15501 (vector
unsigned int)__b);
15506 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__a,
15507 (vector
unsigned int)__b);
15511 vector
unsigned int __b) {
15512 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__a,
15517 vector
bool int __b) {
15518 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__a,
15519 (vector
unsigned int)__b);
15522 #ifdef __POWER8_VECTOR__ 15524 vector
signed long long __b) {
15525 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT_REV, __a, __b);
15529 vector
unsigned long long __b) {
15530 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __a, __b);
15534 vector
bool long long __b) {
15535 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT_REV, __a,
15536 (vector
signed long long)__b);
15540 vector
bool long long __b) {
15541 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __a,
15542 (vector
unsigned long long)__b);
15546 vector
signed long long __b) {
15548 (vector
unsigned long long)__a,
15549 (vector
unsigned long long)__b);
15553 vector
unsigned long long __b) {
15555 (vector
unsigned long long)__a, __b);
15559 vector
bool long long __b) {
15561 (vector
unsigned long long)__a,
15562 (vector
unsigned long long)__b);
15567 vector
float __b) {
15569 return __builtin_vsx_xvcmpgesp_p(
__CR6_EQ_REV, __b, __a);
15571 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ_REV, __b, __a);
15577 vector
double __b) {
15578 return __builtin_vsx_xvcmpgedp_p(
__CR6_EQ_REV, __b, __a);
15585 vector
signed char __b) {
15586 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, __b, __a);
15590 vector
bool char __b) {
15591 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, (vector
signed char)__b,
15596 vector
unsigned char __b) {
15597 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __b, __a);
15601 vector
bool char __b) {
15602 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__b,
15607 vector
signed char __b) {
15608 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__b,
15609 (vector
unsigned char)__a);
15613 vector
unsigned char __b) {
15614 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __b,
15615 (vector
unsigned char)__a);
15619 vector
bool char __b) {
15620 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__b,
15621 (vector
unsigned char)__a);
15625 vector
short __b) {
15626 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, __b, __a);
15630 vector
bool short __b) {
15631 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, (vector
short)__b, __a);
15635 vector
unsigned short __b) {
15636 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __b, __a);
15640 vector
bool short __b) {
15641 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__b,
15646 vector
short __b) {
15647 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__b,
15648 (vector
unsigned short)__a);
15652 vector
unsigned short __b) {
15653 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __b,
15654 (vector
unsigned short)__a);
15658 vector
bool short __b) {
15659 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__b,
15660 (vector
unsigned short)__a);
15664 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, __b, __a);
15668 vector
bool int __b) {
15669 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, (vector
int)__b, __a);
15673 vector
unsigned int __b) {
15674 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __b, __a);
15678 vector
bool int __b) {
15679 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__b,
15685 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__b,
15686 (vector
unsigned int)__a);
15690 vector
unsigned int __b) {
15691 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __b,
15692 (vector
unsigned int)__a);
15696 vector
bool int __b) {
15697 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__b,
15698 (vector
unsigned int)__a);
15701 #ifdef __POWER8_VECTOR__ 15703 vector
signed long long __b) {
15704 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ_REV, __b, __a);
15708 vector
unsigned long long __b) {
15709 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __b, __a);
15713 vector
bool long long __b) {
15715 (vector
signed long long)__b, __a);
15719 vector
bool long long __b) {
15721 (vector
unsigned long long)__b, __a);
15725 vector
signed long long __b) {
15727 (vector
unsigned long long)__b,
15728 (vector
unsigned long long)__a);
15732 vector
unsigned long long __b) {
15733 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __b,
15734 (vector
unsigned long long)__a);
15738 vector
bool long long __b) {
15740 (vector
unsigned long long)__b,
15741 (vector
unsigned long long)__a);
15746 vector
float __b) {
15748 return __builtin_vsx_xvcmpgtsp_p(
__CR6_EQ_REV, __b, __a);
15750 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ_REV, __b, __a);
15756 vector
double __b) {
15757 return __builtin_vsx_xvcmpgtdp_p(
__CR6_EQ_REV, __b, __a);
15764 vec_any_nan(vector
float __a) {
15765 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT_REV, __a, __a);
15771 vector
signed char __b) {
15772 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15777 vector
bool char __b) {
15778 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15783 vector
unsigned char __b) {
15784 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15789 vector
bool char __b) {
15790 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15795 vector
signed char __b) {
15796 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15801 vector
unsigned char __b) {
15802 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15807 vector
bool char __b) {
15808 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15813 vector
short __b) {
15814 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, __a, __b);
15818 vector
bool short __b) {
15819 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, __a, (vector
short)__b);
15823 vector
unsigned short __b) {
15824 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15825 (vector
short)__b);
15829 vector
bool short __b) {
15830 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15831 (vector
short)__b);
15835 vector
short __b) {
15836 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15837 (vector
short)__b);
15841 vector
unsigned short __b) {
15842 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15843 (vector
short)__b);
15847 vector
bool short __b) {
15848 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15849 (vector
short)__b);
15853 vector pixel __b) {
15854 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15855 (vector
short)__b);
15859 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, __a, __b);
15863 vector
bool int __b) {
15864 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, __a, (vector
int)__b);
15868 vector
unsigned int __b) {
15869 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15874 vector
bool int __b) {
15875 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15881 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15886 vector
unsigned int __b) {
15887 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15892 vector
bool int __b) {
15893 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15897 #ifdef __POWER8_VECTOR__ 15899 vector
signed long long __b) {
15900 return __builtin_altivec_vcmpequd_p(
__CR6_LT_REV, __a, __b);
15904 vector
unsigned long long __b) {
15905 return __builtin_altivec_vcmpequd_p(
__CR6_LT_REV, (vector
long long)__a,
15906 (vector
long long)__b);
15910 vector
bool long long __b) {
15911 return __builtin_altivec_vcmpequd_p(
__CR6_LT_REV, __a,
15912 (vector
signed long long)__b);
15916 vector
bool long long __b) {
15917 return __builtin_altivec_vcmpequd_p(
15918 __CR6_LT_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15922 vector
signed long long __b) {
15923 return __builtin_altivec_vcmpequd_p(
15924 __CR6_LT_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15928 vector
unsigned long long __b) {
15929 return __builtin_altivec_vcmpequd_p(
15930 __CR6_LT_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15934 vector
bool long long __b) {
15935 return __builtin_altivec_vcmpequd_p(
15936 __CR6_LT_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15941 vector
float __b) {
15943 return __builtin_vsx_xvcmpeqsp_p(
__CR6_LT_REV, __a, __b);
15945 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT_REV, __a, __b);
15951 vector
double __b) {
15952 return __builtin_vsx_xvcmpeqdp_p(
__CR6_LT_REV, __a, __b);
15959 vec_any_nge(vector
float __a, vector
float __b) {
15960 return __builtin_altivec_vcmpgefp_p(
__CR6_LT_REV, __a, __b);
15966 vec_any_ngt(vector
float __a, vector
float __b) {
15967 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT_REV, __a, __b);
15973 vec_any_nle(vector
float __a, vector
float __b) {
15974 return __builtin_altivec_vcmpgefp_p(
__CR6_LT_REV, __b, __a);
15980 vec_any_nlt(vector
float __a, vector
float __b) {
15981 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT_REV, __b, __a);
15987 vec_any_numeric(vector
float __a) {
15988 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ_REV, __a, __a);
15994 vec_any_out(vector
float __a, vector
float __b) {
15995 return __builtin_altivec_vcmpbfp_p(
__CR6_EQ_REV, __a, __b);
16012 #define vec_sbox_be __builtin_altivec_crypto_vsbox 16013 #define vec_cipher_be __builtin_altivec_crypto_vcipher 16014 #define vec_cipherlast_be __builtin_altivec_crypto_vcipherlast 16015 #define vec_ncipher_be __builtin_altivec_crypto_vncipher 16016 #define vec_ncipherlast_be __builtin_altivec_crypto_vncipherlast 16018 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16019 __builtin_crypto_vsbox(vector
unsigned long long __a) {
16020 return __builtin_altivec_crypto_vsbox(__a);
16023 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16024 __builtin_crypto_vcipher(vector
unsigned long long __a,
16025 vector
unsigned long long __b) {
16026 return __builtin_altivec_crypto_vcipher(__a, __b);
16029 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16030 __builtin_crypto_vcipherlast(vector
unsigned long long __a,
16031 vector
unsigned long long __b) {
16032 return __builtin_altivec_crypto_vcipherlast(__a, __b);
16035 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16036 __builtin_crypto_vncipher(vector
unsigned long long __a,
16037 vector
unsigned long long __b) {
16038 return __builtin_altivec_crypto_vncipher(__a, __b);
16041 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16042 __builtin_crypto_vncipherlast(vector
unsigned long long __a,
16043 vector
unsigned long long __b) {
16044 return __builtin_altivec_crypto_vncipherlast(__a, __b);
16047 #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad 16048 #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw 16050 #define vec_shasigma_be(X, Y, Z) \ 16051 _Generic((X), vector unsigned int \ 16052 : __builtin_crypto_vshasigmaw, vector unsigned long long \ 16053 : __builtin_crypto_vshasigmad)((X), (Y), (Z)) 16056 #ifdef __POWER8_VECTOR__ 16058 vec_permxor(vector
bool char __a, vector
bool char __b,
16059 vector
bool char __c) {
16060 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16064 vec_permxor(vector
signed char __a, vector
signed char __b,
16065 vector
signed char __c) {
16066 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16070 vec_permxor(vector
unsigned char __a, vector
unsigned char __b,
16071 vector
unsigned char __c) {
16072 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16076 __builtin_crypto_vpermxor(vector
unsigned char __a, vector
unsigned char __b,
16077 vector
unsigned char __c) {
16078 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16082 __builtin_crypto_vpermxor(vector
unsigned short __a, vector
unsigned short __b,
16083 vector
unsigned short __c) {
16084 return (vector
unsigned short)__builtin_altivec_crypto_vpermxor(
16085 (vector
unsigned char)__a, (vector
unsigned char)__b,
16086 (vector
unsigned char)__c);
16089 static __inline__ vector
unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
16090 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
16091 return (vector
unsigned int)__builtin_altivec_crypto_vpermxor(
16092 (vector
unsigned char)__a, (vector
unsigned char)__b,
16093 (vector
unsigned char)__c);
16096 static __inline__ vector
unsigned long long __ATTRS_o_ai 16097 __builtin_crypto_vpermxor(vector
unsigned long long __a,
16098 vector
unsigned long long __b,
16099 vector
unsigned long long __c) {
16100 return (vector
unsigned long long)__builtin_altivec_crypto_vpermxor(
16101 (vector
unsigned char)__a, (vector
unsigned char)__b,
16102 (vector
unsigned char)__c);
16106 __builtin_crypto_vpmsumb(vector
unsigned char __a, vector
unsigned char __b) {
16107 return __builtin_altivec_crypto_vpmsumb(__a, __b);
16111 __builtin_crypto_vpmsumb(vector
unsigned short __a, vector
unsigned short __b) {
16112 return __builtin_altivec_crypto_vpmsumh(__a, __b);
16116 __builtin_crypto_vpmsumb(vector
unsigned int __a, vector
unsigned int __b) {
16117 return __builtin_altivec_crypto_vpmsumw(__a, __b);
16120 static __inline__ vector
unsigned long long __ATTRS_o_ai 16121 __builtin_crypto_vpmsumb(vector
unsigned long long __a,
16122 vector
unsigned long long __b) {
16123 return __builtin_altivec_crypto_vpmsumd(__a, __b);
16127 vec_vgbbd(vector
signed char __a) {
16128 return __builtin_altivec_vgbbd((vector
unsigned char)__a);
16131 #define vec_pmsum_be __builtin_crypto_vpmsumb 16132 #define vec_gb __builtin_altivec_vgbbd 16135 vec_vgbbd(vector
unsigned char __a) {
16136 return __builtin_altivec_vgbbd(__a);
16140 vec_vbpermq(vector
signed char __a, vector
signed char __b) {
16141 return __builtin_altivec_vbpermq((vector
unsigned char)__a,
16142 (vector
unsigned char)__b);
16146 vec_vbpermq(vector
unsigned char __a, vector
unsigned char __b) {
16147 return __builtin_altivec_vbpermq(__a, __b);
16150 #ifdef __powerpc64__ 16151 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16152 vec_bperm(vector
unsigned __int128 __a, vector
unsigned char __b) {
16153 return __builtin_altivec_vbpermq((vector
unsigned char)__a,
16154 (vector
unsigned char)__b);
16163 return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
16168 return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
16174 return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
16179 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16183 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16188 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16192 return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0);
16197 return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0);
16202 return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0);
16206 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16211 vec_reve(vector
bool long long __a) {
16212 return __builtin_shufflevector(__a, __a, 1, 0);
16216 vec_reve(vector
signed long long __a) {
16217 return __builtin_shufflevector(__a, __a, 1, 0);
16221 vec_reve(vector
unsigned long long __a) {
16222 return __builtin_shufflevector(__a, __a, 1, 0);
16226 return __builtin_shufflevector(__a, __a, 1, 0);
16248 vector
unsigned char __indices =
16249 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
16250 return vec_perm(__a, __a, __indices);
16255 vector
unsigned char __indices =
16256 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
16257 return vec_perm(__a, __a, __indices);
16262 vector
unsigned char __indices =
16263 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
16264 return vec_perm(__a, __a, __indices);
16269 vector
unsigned char __indices =
16270 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16271 return vec_perm(__a, __a, __indices);
16276 vector
unsigned char __indices =
16277 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16278 return vec_perm(__a, __a, __indices);
16283 vector
unsigned char __indices =
16284 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16285 return vec_perm(__a, __a, __indices);
16290 vector
unsigned char __indices =
16291 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16292 return vec_perm(__a, __a, __indices);
16297 vec_revb(vector
bool long long __a) {
16298 vector
unsigned char __indices =
16299 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16300 return vec_perm(__a, __a, __indices);
16303 static __inline__ vector
signed long long __ATTRS_o_ai 16304 vec_revb(vector
signed long long __a) {
16305 vector
unsigned char __indices =
16306 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16307 return vec_perm(__a, __a, __indices);
16310 static __inline__ vector
unsigned long long __ATTRS_o_ai 16311 vec_revb(vector
unsigned long long __a) {
16312 vector
unsigned char __indices =
16313 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16314 return vec_perm(__a, __a, __indices);
16319 vector
unsigned char __indices =
16320 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16321 return vec_perm(__a, __a, __indices);
16325 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16327 vec_revb(vector
signed __int128 __a) {
16328 vector
unsigned char __indices =
16329 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
16330 return (vector
signed __int128)
vec_perm((vector
signed int)__a,
16331 (vector
signed int)__a,
16335 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 16336 vec_revb(vector
unsigned __int128 __a) {
16337 vector
unsigned char __indices =
16338 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
16339 return (vector
unsigned __int128)
vec_perm((vector
signed int)__a,
16340 (vector
signed int)__a,
16348 typedef vector
unsigned char unaligned_vec_uchar
__attribute__((aligned(1)));
16349 typedef vector
signed short unaligned_vec_sshort
__attribute__((aligned(1)));
16350 typedef vector
unsigned short unaligned_vec_ushort
__attribute__((aligned(1)));
16351 typedef vector
signed int unaligned_vec_sint
__attribute__((aligned(1)));
16352 typedef vector
unsigned int unaligned_vec_uint
__attribute__((aligned(1)));
16353 typedef vector
float unaligned_vec_float
__attribute__((aligned(1)));
16356 signed char *__ptr) {
16357 return *(unaligned_vec_schar *)(__ptr + __offset);
16361 vec_xl(
signed long long __offset,
unsigned char *__ptr) {
16362 return *(unaligned_vec_uchar*)(__ptr + __offset);
16366 signed short *__ptr) {
16367 signed char *__addr = (
signed char *)__ptr + __offset;
16368 return *(unaligned_vec_sshort *)__addr;
16372 vec_xl(
signed long long __offset,
unsigned short *__ptr) {
16373 signed char *__addr = (
signed char *)__ptr + __offset;
16374 return *(unaligned_vec_ushort *)__addr;
16378 signed int *__ptr) {
16379 signed char *__addr = (
signed char *)__ptr + __offset;
16380 return *(unaligned_vec_sint *)__addr;
16384 unsigned int *__ptr) {
16385 signed char *__addr = (
signed char *)__ptr + __offset;
16386 return *(unaligned_vec_uint *)__addr;
16391 signed char *__addr = (
signed char *)__ptr + __offset;
16392 return *(unaligned_vec_float *)__addr;
16396 typedef vector
signed long long unaligned_vec_sll
__attribute__((aligned(1)));
16397 typedef vector
unsigned long long unaligned_vec_ull
__attribute__((aligned(1)));
16398 typedef vector
double unaligned_vec_double
__attribute__((aligned(1)));
16401 vec_xl(
signed long long __offset,
signed long long *__ptr) {
16402 signed char *__addr = (
signed char *)__ptr + __offset;
16403 return *(unaligned_vec_sll *)__addr;
16407 vec_xl(
signed long long __offset,
unsigned long long *__ptr) {
16408 signed char *__addr = (
signed char *)__ptr + __offset;
16409 return *(unaligned_vec_ull *)__addr;
16414 signed char *__addr = (
signed char *)__ptr + __offset;
16415 return *(unaligned_vec_double *)__addr;
16419 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16420 typedef vector
signed __int128 unaligned_vec_si128
__attribute__((aligned(1)));
16421 typedef vector
unsigned __int128 unaligned_vec_ui128
16424 vec_xl(
signed long long __offset,
signed __int128 *__ptr) {
16425 signed char *__addr = (
signed char *)__ptr + __offset;
16426 return *(unaligned_vec_si128 *)__addr;
16430 vec_xl(
signed long long __offset,
unsigned __int128 *__ptr) {
16431 signed char *__addr = (
signed char *)__ptr + __offset;
16432 return *(unaligned_vec_ui128 *)__addr;
16438 #ifdef __LITTLE_ENDIAN__ 16440 vec_xl_be(
signed long long __offset,
signed char *__ptr) {
16441 vector
signed char __vec = (vector
signed char)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16442 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16443 13, 12, 11, 10, 9, 8);
16447 vec_xl_be(
signed long long __offset,
unsigned char *__ptr) {
16448 vector
unsigned char __vec = (vector
unsigned char)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16449 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16450 13, 12, 11, 10, 9, 8);
16454 vec_xl_be(
signed long long __offset,
signed short *__ptr) {
16455 vector
signed short __vec = (vector
signed short)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16456 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16460 vec_xl_be(
signed long long __offset,
unsigned short *__ptr) {
16461 vector
unsigned short __vec = (vector
unsigned short)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16462 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16466 vec_xl_be(
signed long long __offset,
signed int *__ptr) {
16467 return (vector
signed int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
16471 vec_xl_be(
signed long long __offset,
unsigned int *__ptr) {
16472 return (vector
unsigned int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
16476 vec_xl_be(
signed long long __offset,
float *__ptr) {
16477 return (vector
float)__builtin_vsx_lxvw4x_be(__offset, __ptr);
16481 static __inline__ vector
signed long long __ATTRS_o_ai 16482 vec_xl_be(
signed long long __offset,
signed long long *__ptr) {
16483 return (vector
signed long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16486 static __inline__ vector
unsigned long long __ATTRS_o_ai 16487 vec_xl_be(
signed long long __offset,
unsigned long long *__ptr) {
16488 return (vector
unsigned long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16492 vec_xl_be(
signed long long __offset,
double *__ptr) {
16493 return (vector
double)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16497 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16499 vec_xl_be(
signed long long __offset,
signed __int128 *__ptr) {
16500 return vec_xl(__offset, __ptr);
16503 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 16504 vec_xl_be(
signed long long __offset,
unsigned __int128 *__ptr) {
16505 return vec_xl(__offset, __ptr);
16509 #define vec_xl_be vec_xl 16515 signed long long __offset,
16516 signed char *__ptr) {
16517 *(unaligned_vec_schar *)(__ptr + __offset) = __vec;
16521 signed long long __offset,
16522 unsigned char *__ptr) {
16523 *(unaligned_vec_uchar *)(__ptr + __offset) = __vec;
16527 signed long long __offset,
16528 signed short *__ptr) {
16529 signed char *__addr = (
signed char *)__ptr + __offset;
16530 *(unaligned_vec_sshort *)__addr = __vec;
16534 signed long long __offset,
16535 unsigned short *__ptr) {
16536 signed char *__addr = (
signed char *)__ptr + __offset;
16537 *(unaligned_vec_ushort *)__addr = __vec;
16541 signed long long __offset,
16542 signed int *__ptr) {
16543 signed char *__addr = (
signed char *)__ptr + __offset;
16544 *(unaligned_vec_sint *)__addr = __vec;
16548 signed long long __offset,
16549 unsigned int *__ptr) {
16550 signed char *__addr = (
signed char *)__ptr + __offset;
16551 *(unaligned_vec_uint *)__addr = __vec;
16555 signed long long __offset,
16557 signed char *__addr = (
signed char *)__ptr + __offset;
16558 *(unaligned_vec_float *)__addr = __vec;
16563 signed long long __offset,
16564 signed long long *__ptr) {
16565 signed char *__addr = (
signed char *)__ptr + __offset;
16566 *(unaligned_vec_sll *)__addr = __vec;
16570 signed long long __offset,
16571 unsigned long long *__ptr) {
16572 signed char *__addr = (
signed char *)__ptr + __offset;
16573 *(unaligned_vec_ull *)__addr = __vec;
16577 signed long long __offset,
16579 signed char *__addr = (
signed char *)__ptr + __offset;
16580 *(unaligned_vec_double *)__addr = __vec;
16584 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16586 signed long long __offset,
16587 signed __int128 *__ptr) {
16588 signed char *__addr = (
signed char *)__ptr + __offset;
16589 *(unaligned_vec_si128 *)__addr = __vec;
16593 signed long long __offset,
16594 unsigned __int128 *__ptr) {
16595 signed char *__addr = (
signed char *)__ptr + __offset;
16596 *(unaligned_vec_ui128 *)__addr = __vec;
16602 #ifdef __LITTLE_ENDIAN__ 16604 signed long long __offset,
16605 signed char *__ptr) {
16606 vector
signed char __tmp =
16607 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16608 13, 12, 11, 10, 9, 8);
16609 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
16610 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
16614 signed long long __offset,
16615 unsigned char *__ptr) {
16616 vector
unsigned char __tmp =
16617 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16618 13, 12, 11, 10, 9, 8);
16619 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
16620 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
16624 signed long long __offset,
16625 signed short *__ptr) {
16626 vector
signed short __tmp =
16627 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16628 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
16629 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
16633 signed long long __offset,
16634 unsigned short *__ptr) {
16635 vector
unsigned short __tmp =
16636 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16637 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
16638 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
16642 signed long long __offset,
16643 signed int *__ptr) {
16644 __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr);
16648 signed long long __offset,
16649 unsigned int *__ptr) {
16650 __builtin_vsx_stxvw4x_be((vector
int)__vec, __offset, __ptr);
16654 signed long long __offset,
16656 __builtin_vsx_stxvw4x_be((vector
int)__vec, __offset, __ptr);
16661 signed long long __offset,
16662 signed long long *__ptr) {
16663 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
16667 signed long long __offset,
16668 unsigned long long *__ptr) {
16669 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
16673 signed long long __offset,
16675 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
16679 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16681 signed long long __offset,
16682 signed __int128 *__ptr) {
16683 vec_xst(__vec, __offset, __ptr);
16687 signed long long __offset,
16688 unsigned __int128 *__ptr) {
16689 vec_xst(__vec, __offset, __ptr);
16693 #define vec_xst_be vec_xst 16696 #ifdef __POWER9_VECTOR__ 16697 #define vec_test_data_class(__a, __b) \ 16699 (__a), vector float \ 16700 : (vector bool int)__builtin_vsx_xvtstdcsp((vector float)(__a), (__b)), \ 16702 : (vector bool long long)__builtin_vsx_xvtstdcdp((vector double)(__a), \ 16718 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16747 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16749 return __builtin_altivec_vminsd(__a, -__a);
16754 return __builtin_altivec_vminsw(__a, -__a);
16758 return __builtin_altivec_vminsh(__a, -__a);
16762 return __builtin_altivec_vminsb(__a, -__a);
16764 #undef __ATTRS_o_ai static __inline__ vector int __ATTRS_o_ai vec_vupkhsh(vector short __a)
static __inline__ vector short __ATTRS_o_ai vec_vsrh(vector short __a, vector unsigned short __b)
static __inline__ void __ATTRS_o_ai vec_stvehx(vector short __a, int __b, short *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_srl(vector signed char __a, vector unsigned char __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_rl(vector signed char __a, vector unsigned char __b)
static __inline__ int __ATTRS_o_ai vec_any_le(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_sum4s(vector signed char __a, vector int __b)
static __inline__ vector int __ATTRS_o_ai vec_msums(vector short __a, vector short __b, vector int __c)
static __inline__ vector int __ATTRS_o_ai vec_vupklsh(vector short __a)
static __inline__ vector signed char __ATTRS_o_ai vec_packs(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a, vector unsigned char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vpkshus(vector short __a, vector short __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_ld(int __a, const vector signed char *__b)
static __inline__ vector float __ATTRS_o_ai vec_ceil(vector float __a)
static __inline__ vector float __ATTRS_o_ai vec_trunc(vector float __a)
static __inline__ vector int __ATTRS_o_ai vec_vsrw(vector int __a, vector unsigned int __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_packsu(vector short __a, vector short __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmple(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed char __a, vector signed char __b)
static __inline__ vector signed int __ATTRS_o_ai vec_adde(vector signed int __a, vector signed int __b, vector signed int __c)
static __inline__ vector signed char __ATTRS_o_ai vec_vand(vector signed char __a, vector signed char __b)
vector signed char unaligned_vec_schar __attribute__((aligned(1)))
Zeroes the upper 128 bits (bits 255:128) of all YMM registers.
static __inline__ vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sel(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ vector int __ATTRS_o_ai vec_lvewx(int __a, const int *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vspltisb(signed char __a)
static __inline__ vector short __ATTRS_o_ai vec_vadduhm(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vperm(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_abss(vector signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_div(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_adds(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_mulo(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_unsigned(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_lde(int __a, const signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_nor(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vadduhs(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_splat(vector signed char __a, unsigned const int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a, vector signed char __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a, vector signed char __b)
static __inline__ void __ATTRS_o_ai vec_mtvscr(vector signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_sll(vector signed char __a, vector unsigned char __b)
static __inline__ vector int __ATTRS_o_ai vec_vmrglw(vector int __a, vector int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sldw(vector signed char __a, vector signed char __b, unsigned const int __c)
static __inline__ vector signed int __ATTRS_o_ai vec_sube(vector signed int __a, vector signed int __b, vector signed int __c)
static __inline__ vector short __ATTRS_o_ai vec_vsubuhm(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vnor(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_and(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_add(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_msum(vector signed char __a, vector unsigned char __b, vector int __c)
static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vmrglh(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed char __a, vector signed char __b)
static __inline__ vector signed short __ATTRS_o_ai vec_mladd(vector signed short, vector signed short, vector signed short)
static __inline__ void __ATTRS_o_ai vec_stvewx(vector int __a, int __b, int *__c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sro(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vsplth(vector short __a, unsigned char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a, vector signed char __b)
static __inline__ void int __a
static vector float __ATTRS_o_ai vec_nabs(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_insert(signed char __a, vector signed char __b, int __c)
static __inline__ vector signed char __ATTRS_o_ai vec_lvrxl(int __a, const signed char *__b)
static __ATTRS_o_ai vector signed char vec_xl(signed long long __offset, signed char *__ptr)
static __inline__ vector signed char __ATTRS_o_ai vec_vpkuhum(vector signed short __a, vector signed short __b)
static __inline__ vector float __ATTRS_o_ai vec_rsqrte(vector float __a)
static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_sl(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed short __ATTRS_o_ai vec_madd(vector signed short __a, vector signed short __b, vector signed short __c)
static __inline__ int __ATTRS_o_ai vec_all_nge(vector float __a, vector float __b)
static __inline__ vector float __ATTRS_o_ai vec_float(vector signed int __a)
static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_subs(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_mul(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector int __b)
static __inline__ vector float __ATTRS_o_ai vec_floor(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_or(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_andc(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vaddshs(vector short __a, vector short __b)
static __inline__ vector signed int __ATTRS_o_ai vec_signed(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_slo(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vpkswus(vector int __a, vector int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a, vector unsigned char __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_splats(signed char __a)
static __inline__ void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_sub(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sra(vector signed char __a, vector unsigned char __b)
static __inline__ void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b, vector signed char *__c)
static __inline__ vector int __ATTRS_o_ai vec_vmrghw(vector int __a, vector int __b)
static __inline__ vector int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b)
static __inline__ vector signed int __ATTRS_o_ai vec_subc(vector signed int __a, vector signed int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_max(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vor(vector signed char __a, vector signed char __b)
static __inline__ vector signed int __ATTRS_o_ai vec_sld(vector signed int, vector signed int, unsigned const int __c)
static __inline__ vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector int __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector short __ATTRS_o_ai vec_vslh(vector short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmrglb(vector signed char __a, vector signed char __b)
static __inline__ vector float vector float __b
static __inline__ vector signed char __ATTRS_o_ai vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b, signed char *__c)
static __inline__ vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpge(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_unpackh(vector signed char __a)
static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vsraw(vector int __a, vector unsigned int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvrx(int __a, const signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmrghb(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vmladduhm(vector short __a, vector short __b, vector short __c)
static __ATTRS_o_ai void vec_xst(vector signed char __vec, signed long long __offset, signed char *__ptr)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vminuh(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvlxl(int __a, const signed char *__b)
static __inline__ vector short __ATTRS_o_ai vec_lvehx(int __a, const short *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vsrah(vector short __a, vector unsigned short __b)
static __inline__ vector int __ATTRS_o_ai vec_splat_s32(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vslb(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvxl(int __a, const vector signed char *__b)
static __inline__ vector signed int __ATTRS_o_ai vec_addc(vector signed int __a, vector signed int __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vspltb(vector signed char __a, unsigned char __b)
static __inline__ vector float __ATTRS_o_ai vec_nmsub(vector float __a, vector float __b, vector float __c)
static __inline__ vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a)
static __inline__ vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a)
static __inline__ void __ATTRS_o_ai vec_stl(vector signed char __a, int __b, vector signed char *__c)
static __inline__ void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b)
static __inline__ void __ATTRS_o_ai vec_st(vector signed char __a, int __b, vector signed char *__c)
static __inline__ void __ATTRS_o_ai vec_ste(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_avg(vector signed char __a, vector signed char __b)
static vector float __ATTRS_o_ai vec_neg(vector float __a)
static __inline__ vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a)
static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvlx(int __a, const signed char *__b)
static __inline__ vector short __ATTRS_o_ai vec_vminsh(vector short __a, vector short __b)
static __inline__ vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b)
static __inline__ vector short __ATTRS_o_ai vec_vmaxsh(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_pack(vector signed short __a, vector signed short __b)
static __inline__ vector float __ATTRS_o_ai vec_re(vector float __a)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector short __ATTRS_o_ai vec_mule(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vspltish(signed char __a)
static __inline__ vector int __ATTRS_o_ai vec_vspltisw(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_ldl(int __a, const vector signed char *__b)
static __inline__ signed char __ATTRS_o_ai vec_extract(vector signed char __a, int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvebx(int __a, const signed char *__b)
static __inline__ void __ATTRS_o_ai vec_stvebx(vector signed char __a, int __b, signed char *__c)
static __inline__ vector int __ATTRS_o_ai vec_vrlw(vector int __a, vector unsigned int __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a, vector unsigned char __b)
static __inline__ int __ATTRS_o_ai vec_all_nan(vector float __a)
static __inline__ void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b, signed char *__c)
static __inline__ vector short __ATTRS_o_ai vec_vrlh(vector short __a, vector unsigned short __b)
static __inline__ vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector int __b)
static __inline__ vector short __ATTRS_o_ai vec_vmrghh(vector short __a, vector short __b)
static __inline__ vector bool char __ATTRS_o_ai vec_revb(vector bool char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vsrb(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_abs(vector signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_lvx(int __a, const vector signed char *__b)
static __inline__ vector float __ATTRS_o_ai vec_round(vector float __a)
static __inline__ vector short __ATTRS_o_ai vec_unpackl(vector signed char __a)
static __inline__ void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b, vector signed char *__c)
static __inline__ int __ATTRS_o_ai vec_all_ngt(vector float __a, vector float __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsldoi(vector signed char __a, vector signed char __b, unsigned char __c)
static __inline__ int __ATTRS_o_ai vec_all_le(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a, vector signed char __b)
static __ATTRS_o_ai vector bool char vec_reve(vector bool char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_mergeh(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_splat_s16(signed char __a)
static __inline__ vector int __ATTRS_o_ai vec_vslw(vector int __a, vector unsigned int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_min(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vsubshs(vector short __a, vector short __b)
static __inline__ vector float vector float vector float __c
static __inline__ vector signed char __ATTRS_o_ai vec_vrlb(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const signed char *__b)
static __inline__ vector int __ATTRS_o_ai vec_vaddsws(vector int __a, vector int __b)
static __inline__ vector short __ATTRS_o_ai vec_vpkuwum(vector int __a, vector int __b)
static __inline__ int __ATTRS_o_ai vec_all_eq(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector int __b)