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));
2764 static __inline__ vector
double __ATTRS_o_ai vec_xl_len_r(
unsigned char *__a,
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((__a), (__b)), \ 2880 vector unsigned int \ 2881 : (vector float)__builtin_altivec_vcfux((vector int)(__a), (__b)), \ 2882 vector unsigned long long \ 2883 : (__builtin_convertvector((vector unsigned long long)(__a), \ 2885 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \ 2887 vector signed long long \ 2888 : (__builtin_convertvector((vector signed long long)(__a), \ 2890 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \ 2893 #define vec_ctf(__a, __b) \ 2894 _Generic((__a), vector int \ 2895 : (vector float)__builtin_altivec_vcfsx((__a), (__b)), \ 2896 vector unsigned int \ 2897 : (vector float)__builtin_altivec_vcfux((vector int)(__a), (__b))) 2902 #define vec_vcfux __builtin_altivec_vcfux 2906 #define vec_vcfsx(__a, __b) __builtin_altivec_vcfsx((vector int)(__a), (__b)) 2911 #define vec_cts(__a, __b) \ 2912 _Generic((__a), vector float \ 2913 : __builtin_altivec_vctsxs((__a), (__b)), vector double \ 2915 vector double __ret = \ 2917 (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \ 2919 __builtin_convertvector(__ret, vector signed long long); \ 2922 #define vec_cts __builtin_altivec_vctsxs 2927 #define vec_vctsxs __builtin_altivec_vctsxs 2932 #define vec_ctu(__a, __b) \ 2933 _Generic((__a), vector float \ 2934 : __builtin_altivec_vctuxs((__a), (__b)), vector double \ 2936 vector double __ret = \ 2938 (vector double)(vector unsigned long long)((0x3ffULL + __b) \ 2940 __builtin_convertvector(__ret, vector unsigned long long); \ 2943 #define vec_ctu __builtin_altivec_vctuxs 2948 #define vec_vctuxs __builtin_altivec_vctuxs 2953 vec_sld(vector
signed int, vector
signed int,
unsigned const int __c);
2957 return __builtin_convertvector(__a, vector
signed int);
2963 return __builtin_convertvector(__a, vector
signed long long);
2966 static __inline__ vector
signed int __attribute__((__always_inline__))
2967 vec_signed2(vector
double __a, vector
double __b) {
2968 return (vector
signed int) { __a[0], __a[1], __b[0], __b[1] };
2972 vec_signede(vector
double __a) {
2973 #ifdef __LITTLE_ENDIAN__ 2974 vector
signed int __ret = __builtin_vsx_xvcvdpsxws(__a);
2975 return vec_sld(__ret, __ret, 12);
2977 return __builtin_vsx_xvcvdpsxws(__a);
2982 vec_signedo(vector
double __a) {
2983 #ifdef __LITTLE_ENDIAN__ 2984 return __builtin_vsx_xvcvdpsxws(__a);
2986 vector
signed int __ret = __builtin_vsx_xvcvdpsxws(__a);
2987 return vec_sld(__ret, __ret, 12);
2995 vec_sld(vector
unsigned int, vector
unsigned int,
unsigned const int __c);
2999 return __builtin_convertvector(__a, vector
unsigned int);
3003 static __inline__ vector
unsigned long long __ATTRS_o_ai 3005 return __builtin_convertvector(__a, vector
unsigned long long);
3008 static __inline__ vector
unsigned int __attribute__((__always_inline__))
3009 vec_unsigned2(vector
double __a, vector
double __b) {
3010 return (vector
unsigned int) { __a[0], __a[1], __b[0], __b[1] };
3014 vec_unsignede(vector
double __a) {
3015 #ifdef __LITTLE_ENDIAN__ 3016 vector
unsigned int __ret = __builtin_vsx_xvcvdpuxws(__a);
3017 return vec_sld(__ret, __ret, 12);
3019 return __builtin_vsx_xvcvdpuxws(__a);
3024 vec_unsignedo(vector
double __a) {
3025 #ifdef __LITTLE_ENDIAN__ 3026 return __builtin_vsx_xvcvdpuxws(__a);
3028 vector
unsigned int __ret = __builtin_vsx_xvcvdpuxws(__a);
3029 return vec_sld(__ret, __ret, 12);
3037 vec_sld(vector
float, vector
float,
unsigned const int __c);
3041 return __builtin_convertvector(__a, vector
float);
3046 return __builtin_convertvector(__a, vector
float);
3051 vec_float2(vector
signed long long __a, vector
signed long long __b) {
3052 return (vector
float) { __a[0], __a[1], __b[0], __b[1] };
3056 vec_float2(vector
unsigned long long __a, vector
unsigned long long __b) {
3057 return (vector
float) { __a[0], __a[1], __b[0], __b[1] };
3061 vec_float2(vector
double __a, vector
double __b) {
3062 return (vector
float) { __a[0], __a[1], __b[0], __b[1] };
3066 vec_floate(vector
signed long long __a) {
3067 #ifdef __LITTLE_ENDIAN__ 3068 vector
float __ret = __builtin_vsx_xvcvsxdsp(__a);
3069 return vec_sld(__ret, __ret, 12);
3071 return __builtin_vsx_xvcvsxdsp(__a);
3076 vec_floate(vector
unsigned long long __a) {
3077 #ifdef __LITTLE_ENDIAN__ 3078 vector
float __ret = __builtin_vsx_xvcvuxdsp(__a);
3079 return vec_sld(__ret, __ret, 12);
3081 return __builtin_vsx_xvcvuxdsp(__a);
3086 vec_floate(vector
double __a) {
3087 #ifdef __LITTLE_ENDIAN__ 3088 vector
float __ret = __builtin_vsx_xvcvdpsp(__a);
3089 return vec_sld(__ret, __ret, 12);
3091 return __builtin_vsx_xvcvdpsp(__a);
3096 vec_floato(vector
signed long long __a) {
3097 #ifdef __LITTLE_ENDIAN__ 3098 return __builtin_vsx_xvcvsxdsp(__a);
3100 vector
float __ret = __builtin_vsx_xvcvsxdsp(__a);
3101 return vec_sld(__ret, __ret, 12);
3106 vec_floato(vector
unsigned long long __a) {
3107 #ifdef __LITTLE_ENDIAN__ 3108 return __builtin_vsx_xvcvuxdsp(__a);
3110 vector
float __ret = __builtin_vsx_xvcvuxdsp(__a);
3111 return vec_sld(__ret, __ret, 12);
3116 vec_floato(vector
double __a) {
3117 #ifdef __LITTLE_ENDIAN__ 3118 return __builtin_vsx_xvcvdpsp(__a);
3120 vector
float __ret = __builtin_vsx_xvcvdpsp(__a);
3121 return vec_sld(__ret, __ret, 12);
3130 vec_double(vector
signed long long __a) {
3131 return __builtin_convertvector(__a, vector
double);
3135 vec_double(vector
unsigned long long __a) {
3136 return __builtin_convertvector(__a, vector
double);
3140 vec_doublee(vector
signed int __a) {
3141 #ifdef __LITTLE_ENDIAN__ 3142 return __builtin_vsx_xvcvsxwdp(
vec_sld(__a, __a, 4));
3144 return __builtin_vsx_xvcvsxwdp(__a);
3149 vec_doublee(vector
unsigned int __a) {
3150 #ifdef __LITTLE_ENDIAN__ 3151 return __builtin_vsx_xvcvuxwdp(
vec_sld(__a, __a, 4));
3153 return __builtin_vsx_xvcvuxwdp(__a);
3158 vec_doublee(vector
float __a) {
3159 #ifdef __LITTLE_ENDIAN__ 3160 return __builtin_vsx_xvcvspdp(
vec_sld(__a, __a, 4));
3162 return __builtin_vsx_xvcvspdp(__a);
3167 vec_doubleh(vector
signed int __a) {
3168 vector
double __ret = {__a[0], __a[1]};
3173 vec_doubleh(vector
unsigned int __a) {
3174 vector
double __ret = {__a[0], __a[1]};
3179 vec_doubleh(vector
float __a) {
3180 vector
double __ret = {__a[0], __a[1]};
3185 vec_doublel(vector
signed int __a) {
3186 vector
double __ret = {__a[2], __a[3]};
3191 vec_doublel(vector
unsigned int __a) {
3192 vector
double __ret = {__a[2], __a[3]};
3197 vec_doublel(vector
float __a) {
3198 vector
double __ret = {__a[2], __a[3]};
3203 vec_doubleo(vector
signed int __a) {
3204 #ifdef __LITTLE_ENDIAN__ 3205 return __builtin_vsx_xvcvsxwdp(__a);
3207 return __builtin_vsx_xvcvsxwdp(
vec_sld(__a, __a, 4));
3212 vec_doubleo(vector
unsigned int __a) {
3213 #ifdef __LITTLE_ENDIAN__ 3214 return __builtin_vsx_xvcvuxwdp(__a);
3216 return __builtin_vsx_xvcvuxwdp(
vec_sld(__a, __a, 4));
3221 vec_doubleo(vector
float __a) {
3222 #ifdef __LITTLE_ENDIAN__ 3223 return __builtin_vsx_xvcvspdp(__a);
3225 return __builtin_vsx_xvcvspdp(
vec_sld(__a, __a, 4));
3236 vec_div(vector
signed char __a, vector
signed char __b) {
3241 vec_div(vector
unsigned char __a, vector
unsigned char __b) {
3246 vec_div(vector
signed short __a, vector
signed short __b) {
3251 vec_div(vector
unsigned short __a, vector
unsigned short __b) {
3256 vec_div(vector
signed int __a, vector
signed int __b) {
3261 vec_div(vector
unsigned int __a, vector
unsigned int __b) {
3267 vec_div(vector
signed long long __a, vector
signed long long __b) {
3271 static __inline__ vector
unsigned long long __ATTRS_o_ai 3272 vec_div(vector
unsigned long long __a, vector
unsigned long long __b) {
3282 vector
double __b) {
3289 static __inline__
void __attribute__((__always_inline__)) vec_dss(
int __a) {
3290 __builtin_altivec_dss(__a);
3295 static __inline__
void __attribute__((__always_inline__)) vec_dssall(
void) {
3296 __builtin_altivec_dssall();
3300 #define vec_dst(__PTR, __CW, __STR) \ 3302 { __builtin_altivec_dst((const void *)(__PTR), (__CW), (__STR)); }) 3305 #define vec_dstst(__PTR, __CW, __STR) \ 3307 { __builtin_altivec_dstst((const void *)(__PTR), (__CW), (__STR)); }) 3310 #define vec_dststt(__PTR, __CW, __STR) \ 3312 { __builtin_altivec_dststt((const void *)(__PTR), (__CW), (__STR)); }) 3315 #define vec_dstt(__PTR, __CW, __STR) \ 3317 { __builtin_altivec_dstt((const void *)(__PTR), (__CW), (__STR)); }) 3321 #ifdef __POWER8_VECTOR__ 3323 vec_eqv(vector
signed char __a, vector
signed char __b) {
3324 return (vector
signed char)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3325 (vector
unsigned int)__b);
3329 vec_eqv(vector
unsigned char __a, vector
unsigned char __b) {
3330 return (vector
unsigned char)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3331 (vector
unsigned int)__b);
3334 static __inline__ vector
bool char __ATTRS_o_ai vec_eqv(vector
bool char __a,
3335 vector
bool char __b) {
3336 return (vector
bool char)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3337 (vector
unsigned int)__b);
3341 vec_eqv(vector
signed short __a, vector
signed short __b) {
3342 return (vector
signed short)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3343 (vector
unsigned int)__b);
3347 vec_eqv(vector
unsigned short __a, vector
unsigned short __b) {
3348 return (vector
unsigned short)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3349 (vector
unsigned int)__b);
3353 vec_eqv(vector
bool short __a, vector
bool short __b) {
3354 return (vector
bool short)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3355 (vector
unsigned int)__b);
3359 vec_eqv(vector
signed int __a, vector
signed int __b) {
3360 return (vector
signed int)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3361 (vector
unsigned int)__b);
3365 vec_eqv(vector
unsigned int __a, vector
unsigned int __b) {
3366 return __builtin_vsx_xxleqv(__a, __b);
3369 static __inline__ vector
bool int __ATTRS_o_ai vec_eqv(vector
bool int __a,
3370 vector
bool int __b) {
3371 return (vector
bool int)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3372 (vector
unsigned int)__b);
3376 vec_eqv(vector
signed long long __a, vector
signed long long __b) {
3377 return (vector
signed long long)__builtin_vsx_xxleqv(
3378 (vector
unsigned int)__a, (vector
unsigned int)__b);
3381 static __inline__ vector
unsigned long long __ATTRS_o_ai 3382 vec_eqv(vector
unsigned long long __a, vector
unsigned long long __b) {
3383 return (vector
unsigned long long)__builtin_vsx_xxleqv(
3384 (vector
unsigned int)__a, (vector
unsigned int)__b);
3388 vec_eqv(vector
bool long long __a, vector
bool long long __b) {
3389 return (vector
bool long long)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3390 (vector
unsigned int)__b);
3393 static __inline__ vector
float __ATTRS_o_ai vec_eqv(vector
float __a,
3395 return (vector
float)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3396 (vector
unsigned int)__b);
3399 static __inline__ vector
double __ATTRS_o_ai vec_eqv(vector
double __a,
3400 vector
double __b) {
3401 return (vector
double)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3402 (vector
unsigned int)__b);
3408 static __inline__ vector
float __attribute__((__always_inline__))
3409 vec_expte(vector
float __a) {
3410 return __builtin_altivec_vexptefp(__a);
3415 static __inline__ vector
float __attribute__((__always_inline__))
3416 vec_vexptefp(vector
float __a) {
3417 return __builtin_altivec_vexptefp(__a);
3424 return __builtin_vsx_xvrspim(__a);
3426 return __builtin_altivec_vrfim(__a);
3432 return __builtin_vsx_xvrdpim(__a);
3438 static __inline__ vector
float __attribute__((__always_inline__))
3439 vec_vrfim(vector
float __a) {
3440 return __builtin_altivec_vrfim(__a);
3446 vec_ld(
int __a,
const vector
signed char *__b) {
3447 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3452 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3456 vec_ld(
int __a,
const vector
unsigned char *__b) {
3457 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3462 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3466 vec_ld(
int __a,
const vector
bool char *__b) {
3467 return (vector
bool char)__builtin_altivec_lvx(__a, __b);
3471 const vector
short *__b) {
3472 return (vector
short)__builtin_altivec_lvx(__a, __b);
3476 return (vector
short)__builtin_altivec_lvx(__a, __b);
3480 vec_ld(
int __a,
const vector
unsigned short *__b) {
3481 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3486 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3490 vec_ld(
int __a,
const vector
bool short *__b) {
3491 return (vector
bool short)__builtin_altivec_lvx(__a, __b);
3495 const vector pixel *__b) {
3496 return (vector pixel)__builtin_altivec_lvx(__a, __b);
3500 const vector
int *__b) {
3501 return (vector
int)__builtin_altivec_lvx(__a, __b);
3505 return (vector
int)__builtin_altivec_lvx(__a, __b);
3509 vec_ld(
int __a,
const vector
unsigned int *__b) {
3510 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3515 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3519 vec_ld(
int __a,
const vector
bool int *__b) {
3520 return (vector
bool int)__builtin_altivec_lvx(__a, __b);
3524 const vector
float *__b) {
3525 return (vector
float)__builtin_altivec_lvx(__a, __b);
3529 return (vector
float)__builtin_altivec_lvx(__a, __b);
3536 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3541 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3545 vec_lvx(
int __a,
const vector
unsigned char *__b) {
3546 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3551 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3556 return (vector
bool char)__builtin_altivec_lvx(__a, __b);
3560 const vector
short *__b) {
3561 return (vector
short)__builtin_altivec_lvx(__a, __b);
3565 return (vector
short)__builtin_altivec_lvx(__a, __b);
3569 vec_lvx(
int __a,
const vector
unsigned short *__b) {
3570 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3575 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3580 return (vector
bool short)__builtin_altivec_lvx(__a, __b);
3584 const vector pixel *__b) {
3585 return (vector pixel)__builtin_altivec_lvx(__a, __b);
3589 const vector
int *__b) {
3590 return (vector
int)__builtin_altivec_lvx(__a, __b);
3594 return (vector
int)__builtin_altivec_lvx(__a, __b);
3598 vec_lvx(
int __a,
const vector
unsigned int *__b) {
3599 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3604 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3609 return (vector
bool int)__builtin_altivec_lvx(__a, __b);
3613 const vector
float *__b) {
3614 return (vector
float)__builtin_altivec_lvx(__a, __b);
3618 return (vector
float)__builtin_altivec_lvx(__a, __b);
3625 return (vector
signed char)__builtin_altivec_lvebx(__a, __b);
3630 return (vector
unsigned char)__builtin_altivec_lvebx(__a, __b);
3634 return (vector
short)__builtin_altivec_lvehx(__a, __b);
3639 return (vector
unsigned short)__builtin_altivec_lvehx(__a, __b);
3643 return (vector
int)__builtin_altivec_lvewx(__a, __b);
3648 return (vector
unsigned int)__builtin_altivec_lvewx(__a, __b);
3652 return (vector
float)__builtin_altivec_lvewx(__a, __b);
3659 return (vector
signed char)__builtin_altivec_lvebx(__a, __b);
3664 return (vector
unsigned char)__builtin_altivec_lvebx(__a, __b);
3671 return (vector
short)__builtin_altivec_lvehx(__a, __b);
3676 return (vector
unsigned short)__builtin_altivec_lvehx(__a, __b);
3682 return (vector
int)__builtin_altivec_lvewx(__a, __b);
3687 return (vector
unsigned int)__builtin_altivec_lvewx(__a, __b);
3692 return (vector
float)__builtin_altivec_lvewx(__a, __b);
3699 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3704 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3708 vec_ldl(
int __a,
const vector
unsigned char *__b) {
3709 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3714 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3719 return (vector
bool char)__builtin_altivec_lvxl(__a, __b);
3723 const vector
short *__b) {
3724 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3728 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3732 vec_ldl(
int __a,
const vector
unsigned short *__b) {
3733 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3738 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3743 return (vector
bool short)__builtin_altivec_lvxl(__a, __b);
3747 const vector pixel *__b) {
3748 return (vector pixel
short)__builtin_altivec_lvxl(__a, __b);
3752 const vector
int *__b) {
3753 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3757 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3761 vec_ldl(
int __a,
const vector
unsigned int *__b) {
3762 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3767 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3772 return (vector
bool int)__builtin_altivec_lvxl(__a, __b);
3776 const vector
float *__b) {
3777 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3781 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3788 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3793 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3798 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3803 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3808 return (vector
bool char)__builtin_altivec_lvxl(__a, __b);
3812 const vector
short *__b) {
3813 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3818 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3823 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3828 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3833 return (vector
bool short)__builtin_altivec_lvxl(__a, __b);
3837 const vector pixel *__b) {
3838 return (vector pixel)__builtin_altivec_lvxl(__a, __b);
3842 const vector
int *__b) {
3843 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3847 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3852 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3857 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3862 return (vector
bool int)__builtin_altivec_lvxl(__a, __b);
3866 const vector
float *__b) {
3867 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3872 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3877 static __inline__ vector
float __attribute__((__always_inline__))
3878 vec_loge(vector
float __a) {
3879 return __builtin_altivec_vlogefp(__a);
3884 static __inline__ vector
float __attribute__((__always_inline__))
3885 vec_vlogefp(vector
float __a) {
3886 return __builtin_altivec_vlogefp(__a);
3891 #ifdef __LITTLE_ENDIAN__ 3893 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3894 loads/stores")))
vec_lvsl(
int __a,
const signed char *__b) {
3895 vector
unsigned char mask =
3896 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3897 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3898 7, 6, 5, 4, 3, 2, 1, 0};
3899 return vec_perm(mask, mask, reverse);
3904 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3908 #ifdef __LITTLE_ENDIAN__ 3910 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3911 loads/stores")))
vec_lvsl(
int __a,
const unsigned char *__b) {
3912 vector
unsigned char mask =
3913 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3914 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3915 7, 6, 5, 4, 3, 2, 1, 0};
3916 return vec_perm(mask, mask, reverse);
3921 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3925 #ifdef __LITTLE_ENDIAN__ 3927 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3928 loads/stores")))
vec_lvsl(
int __a,
const short *__b) {
3929 vector
unsigned char mask =
3930 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3931 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3932 7, 6, 5, 4, 3, 2, 1, 0};
3933 return vec_perm(mask, mask, reverse);
3938 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3942 #ifdef __LITTLE_ENDIAN__ 3944 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3945 loads/stores")))
vec_lvsl(
int __a,
const unsigned short *__b) {
3946 vector
unsigned char mask =
3947 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3948 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3949 7, 6, 5, 4, 3, 2, 1, 0};
3950 return vec_perm(mask, mask, reverse);
3955 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3959 #ifdef __LITTLE_ENDIAN__ 3961 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3962 loads/stores")))
vec_lvsl(
int __a,
const int *__b) {
3963 vector
unsigned char mask =
3964 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3965 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3966 7, 6, 5, 4, 3, 2, 1, 0};
3967 return vec_perm(mask, mask, reverse);
3972 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3976 #ifdef __LITTLE_ENDIAN__ 3978 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3979 loads/stores")))
vec_lvsl(
int __a,
const unsigned int *__b) {
3980 vector
unsigned char mask =
3981 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3982 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3983 7, 6, 5, 4, 3, 2, 1, 0};
3984 return vec_perm(mask, mask, reverse);
3989 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3993 #ifdef __LITTLE_ENDIAN__ 3995 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3996 loads/stores")))
vec_lvsl(
int __a,
const float *__b) {
3997 vector
unsigned char mask =
3998 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3999 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4000 7, 6, 5, 4, 3, 2, 1, 0};
4001 return vec_perm(mask, mask, reverse);
4006 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
4012 #ifdef __LITTLE_ENDIAN__ 4014 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4015 loads/stores")))
vec_lvsr(
int __a,
const signed char *__b) {
4016 vector
unsigned char mask =
4017 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4018 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4019 7, 6, 5, 4, 3, 2, 1, 0};
4020 return vec_perm(mask, mask, reverse);
4025 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4029 #ifdef __LITTLE_ENDIAN__ 4031 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4032 loads/stores")))
vec_lvsr(
int __a,
const unsigned char *__b) {
4033 vector
unsigned char mask =
4034 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4035 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4036 7, 6, 5, 4, 3, 2, 1, 0};
4037 return vec_perm(mask, mask, reverse);
4042 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4046 #ifdef __LITTLE_ENDIAN__ 4048 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4049 loads/stores")))
vec_lvsr(
int __a,
const short *__b) {
4050 vector
unsigned char mask =
4051 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4052 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4053 7, 6, 5, 4, 3, 2, 1, 0};
4054 return vec_perm(mask, mask, reverse);
4059 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4063 #ifdef __LITTLE_ENDIAN__ 4065 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4066 loads/stores")))
vec_lvsr(
int __a,
const unsigned short *__b) {
4067 vector
unsigned char mask =
4068 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4069 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4070 7, 6, 5, 4, 3, 2, 1, 0};
4071 return vec_perm(mask, mask, reverse);
4076 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4080 #ifdef __LITTLE_ENDIAN__ 4082 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4083 loads/stores")))
vec_lvsr(
int __a,
const int *__b) {
4084 vector
unsigned char mask =
4085 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4086 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4087 7, 6, 5, 4, 3, 2, 1, 0};
4088 return vec_perm(mask, mask, reverse);
4093 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4097 #ifdef __LITTLE_ENDIAN__ 4099 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4100 loads/stores")))
vec_lvsr(
int __a,
const unsigned int *__b) {
4101 vector
unsigned char mask =
4102 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4103 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4104 7, 6, 5, 4, 3, 2, 1, 0};
4105 return vec_perm(mask, mask, reverse);
4110 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4114 #ifdef __LITTLE_ENDIAN__ 4116 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4117 loads/stores")))
vec_lvsr(
int __a,
const float *__b) {
4118 vector
unsigned char mask =
4119 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4120 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4121 7, 6, 5, 4, 3, 2, 1, 0};
4122 return vec_perm(mask, mask, reverse);
4127 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4133 vec_mladd(vector
signed short, vector
signed short, vector
signed short);
4135 vec_mladd(vector
signed short, vector
unsigned short, vector
unsigned short);
4137 vec_mladd(vector
unsigned short, vector
signed short, vector
signed short);
4139 vec_mladd(vector
unsigned short, vector
unsigned short, vector
unsigned short);
4142 vector
signed short __a, vector
signed short __b, vector
signed short __c) {
4147 vec_madd(vector
signed short __a, vector
unsigned short __b,
4148 vector
unsigned short __c) {
4153 vec_madd(vector
unsigned short __a, vector
signed short __b,
4154 vector
signed short __c) {
4159 vec_madd(vector
unsigned short __a, vector
unsigned short __b,
4160 vector
unsigned short __c) {
4168 return __builtin_vsx_xvmaddasp(__a, __b, __c);
4170 return __builtin_altivec_vmaddfp(__a, __b, __c);
4177 vector
double __c) {
4178 return __builtin_vsx_xvmaddadp(__a, __b, __c);
4184 static __inline__ vector
float __attribute__((__always_inline__))
4185 vec_vmaddfp(vector
float __a, vector
float __b, vector
float __c) {
4186 return __builtin_altivec_vmaddfp(__a, __b, __c);
4191 static __inline__ vector
signed short __attribute__((__always_inline__))
4192 vec_madds(vector
signed short __a, vector
signed short __b,
4193 vector
signed short __c) {
4194 return __builtin_altivec_vmhaddshs(__a, __b, __c);
4198 static __inline__ vector
signed short __attribute__((__always_inline__))
4199 vec_vmhaddshs(vector
signed short __a, vector
signed short __b,
4200 vector
signed short __c) {
4201 return __builtin_altivec_vmhaddshs(__a, __b, __c);
4207 static __inline__ vector
float __ATTRS_o_ai vec_msub(vector
float __a,
4210 return __builtin_vsx_xvmsubasp(__a, __b, __c);
4213 static __inline__ vector
double __ATTRS_o_ai vec_msub(vector
double __a,
4215 vector
double __c) {
4216 return __builtin_vsx_xvmsubadp(__a, __b, __c);
4223 vec_max(vector
signed char __a, vector
signed char __b) {
4224 return __builtin_altivec_vmaxsb(__a, __b);
4228 vec_max(vector
bool char __a, vector
signed char __b) {
4229 return __builtin_altivec_vmaxsb((vector
signed char)__a, __b);
4233 vec_max(vector
signed char __a, vector
bool char __b) {
4234 return __builtin_altivec_vmaxsb(__a, (vector
signed char)__b);
4238 vec_max(vector
unsigned char __a, vector
unsigned char __b) {
4239 return __builtin_altivec_vmaxub(__a, __b);
4243 vec_max(vector
bool char __a, vector
unsigned char __b) {
4244 return __builtin_altivec_vmaxub((vector
unsigned char)__a, __b);
4248 vec_max(vector
unsigned char __a, vector
bool char __b) {
4249 return __builtin_altivec_vmaxub(__a, (vector
unsigned char)__b);
4254 return __builtin_altivec_vmaxsh(__a, __b);
4259 return __builtin_altivec_vmaxsh((vector
short)__a, __b);
4263 vector
bool short __b) {
4264 return __builtin_altivec_vmaxsh(__a, (vector
short)__b);
4268 vec_max(vector
unsigned short __a, vector
unsigned short __b) {
4269 return __builtin_altivec_vmaxuh(__a, __b);
4273 vec_max(vector
bool short __a, vector
unsigned short __b) {
4274 return __builtin_altivec_vmaxuh((vector
unsigned short)__a, __b);
4278 vec_max(vector
unsigned short __a, vector
bool short __b) {
4279 return __builtin_altivec_vmaxuh(__a, (vector
unsigned short)__b);
4284 return __builtin_altivec_vmaxsw(__a, __b);
4289 return __builtin_altivec_vmaxsw((vector
int)__a, __b);
4293 vector
bool int __b) {
4294 return __builtin_altivec_vmaxsw(__a, (vector
int)__b);
4298 vec_max(vector
unsigned int __a, vector
unsigned int __b) {
4299 return __builtin_altivec_vmaxuw(__a, __b);
4303 vec_max(vector
bool int __a, vector
unsigned int __b) {
4304 return __builtin_altivec_vmaxuw((vector
unsigned int)__a, __b);
4308 vec_max(vector
unsigned int __a, vector
bool int __b) {
4309 return __builtin_altivec_vmaxuw(__a, (vector
unsigned int)__b);
4312 #ifdef __POWER8_VECTOR__ 4314 vec_max(vector
signed long long __a, vector
signed long long __b) {
4315 return __builtin_altivec_vmaxsd(__a, __b);
4319 vec_max(vector
bool long long __a, vector
signed long long __b) {
4320 return __builtin_altivec_vmaxsd((vector
signed long long)__a, __b);
4324 vec_max(vector
signed long long __a, vector
bool long long __b) {
4325 return __builtin_altivec_vmaxsd(__a, (vector
signed long long)__b);
4328 static __inline__ vector
unsigned long long __ATTRS_o_ai 4329 vec_max(vector
unsigned long long __a, vector
unsigned long long __b) {
4330 return __builtin_altivec_vmaxud(__a, __b);
4333 static __inline__ vector
unsigned long long __ATTRS_o_ai 4334 vec_max(vector
bool long long __a, vector
unsigned long long __b) {
4335 return __builtin_altivec_vmaxud((vector
unsigned long long)__a, __b);
4338 static __inline__ vector
unsigned long long __ATTRS_o_ai 4339 vec_max(vector
unsigned long long __a, vector
bool long long __b) {
4340 return __builtin_altivec_vmaxud(__a, (vector
unsigned long long)__b);
4347 return __builtin_vsx_xvmaxsp(__a, __b);
4349 return __builtin_altivec_vmaxfp(__a, __b);
4355 vector
double __b) {
4356 return __builtin_vsx_xvmaxdp(__a, __b);
4364 return __builtin_altivec_vmaxsb(__a, __b);
4369 return __builtin_altivec_vmaxsb((vector
signed char)__a, __b);
4374 return __builtin_altivec_vmaxsb(__a, (vector
signed char)__b);
4381 return __builtin_altivec_vmaxub(__a, __b);
4386 return __builtin_altivec_vmaxub((vector
unsigned char)__a, __b);
4391 return __builtin_altivec_vmaxub(__a, (vector
unsigned char)__b);
4398 return __builtin_altivec_vmaxsh(__a, __b);
4403 return __builtin_altivec_vmaxsh((vector
short)__a, __b);
4407 vector
bool short __b) {
4408 return __builtin_altivec_vmaxsh(__a, (vector
short)__b);
4414 vec_vmaxuh(vector
unsigned short __a, vector
unsigned short __b) {
4415 return __builtin_altivec_vmaxuh(__a, __b);
4420 return __builtin_altivec_vmaxuh((vector
unsigned short)__a, __b);
4425 return __builtin_altivec_vmaxuh(__a, (vector
unsigned short)__b);
4432 return __builtin_altivec_vmaxsw(__a, __b);
4437 return __builtin_altivec_vmaxsw((vector
int)__a, __b);
4441 vector
bool int __b) {
4442 return __builtin_altivec_vmaxsw(__a, (vector
int)__b);
4449 return __builtin_altivec_vmaxuw(__a, __b);
4454 return __builtin_altivec_vmaxuw((vector
unsigned int)__a, __b);
4459 return __builtin_altivec_vmaxuw(__a, (vector
unsigned int)__b);
4464 static __inline__ vector
float __attribute__((__always_inline__))
4465 vec_vmaxfp(vector
float __a, vector
float __b) {
4467 return __builtin_vsx_xvmaxsp(__a, __b);
4469 return __builtin_altivec_vmaxfp(__a, __b);
4478 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4479 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4480 0x06, 0x16, 0x07, 0x17));
4486 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4487 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4488 0x06, 0x16, 0x07, 0x17));
4494 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4495 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4496 0x06, 0x16, 0x07, 0x17));
4502 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4503 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4504 0x06, 0x07, 0x16, 0x17));
4508 vec_mergeh(vector
unsigned short __a, vector
unsigned short __b) {
4510 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4511 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4512 0x06, 0x07, 0x16, 0x17));
4518 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4519 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4520 0x06, 0x07, 0x16, 0x17));
4526 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4527 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4528 0x06, 0x07, 0x16, 0x17));
4534 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4535 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4536 0x14, 0x15, 0x16, 0x17));
4542 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4543 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4544 0x14, 0x15, 0x16, 0x17));
4548 vector
bool int __b) {
4550 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4551 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4552 0x14, 0x15, 0x16, 0x17));
4558 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4559 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4560 0x14, 0x15, 0x16, 0x17));
4565 vec_mergeh(vector
signed long long __a, vector
signed long long __b) {
4567 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4568 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4569 0x14, 0x15, 0x16, 0x17));
4573 vec_mergeh(vector
signed long long __a, vector
bool long long __b) {
4574 return vec_perm(__a, (vector
signed long long)__b,
4575 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4576 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4577 0x14, 0x15, 0x16, 0x17));
4581 vec_mergeh(vector
bool long long __a, vector
signed long long __b) {
4582 return vec_perm((vector
signed long long)__a, __b,
4583 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4584 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4585 0x14, 0x15, 0x16, 0x17));
4588 static __inline__ vector
unsigned long long __ATTRS_o_ai 4589 vec_mergeh(vector
unsigned long long __a, vector
unsigned long long __b) {
4591 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4592 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4593 0x14, 0x15, 0x16, 0x17));
4596 static __inline__ vector
unsigned long long __ATTRS_o_ai 4597 vec_mergeh(vector
unsigned long long __a, vector
bool long long __b) {
4598 return vec_perm(__a, (vector
unsigned long long)__b,
4599 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4600 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4601 0x14, 0x15, 0x16, 0x17));
4604 static __inline__ vector
unsigned long long __ATTRS_o_ai 4605 vec_mergeh(vector
bool long long __a, vector
unsigned long long __b) {
4606 return vec_perm((vector
unsigned long long)__a, __b,
4607 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4608 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4609 0x14, 0x15, 0x16, 0x17));
4613 vec_mergeh(vector
bool long long __a, vector
bool long long __b) {
4615 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4616 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4617 0x14, 0x15, 0x16, 0x17));
4621 vector
double __b) {
4623 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4624 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4625 0x14, 0x15, 0x16, 0x17));
4628 vec_mergeh(vector
double __a, vector
bool long long __b) {
4629 return vec_perm(__a, (vector
double)__b,
4630 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4631 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4632 0x14, 0x15, 0x16, 0x17));
4635 vec_mergeh(vector
bool long long __a, vector
double __b) {
4636 return vec_perm((vector
double)__a, __b,
4637 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4638 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4639 0x14, 0x15, 0x16, 0x17));
4645 #define __builtin_altivec_vmrghb vec_vmrghb 4650 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4651 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4652 0x06, 0x16, 0x07, 0x17));
4658 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4659 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4660 0x06, 0x16, 0x07, 0x17));
4666 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4667 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4668 0x06, 0x16, 0x07, 0x17));
4673 #define __builtin_altivec_vmrghh vec_vmrghh 4678 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4679 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4680 0x06, 0x07, 0x16, 0x17));
4684 vec_vmrghh(vector
unsigned short __a, vector
unsigned short __b) {
4686 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4687 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4688 0x06, 0x07, 0x16, 0x17));
4694 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4695 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4696 0x06, 0x07, 0x16, 0x17));
4702 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4703 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4704 0x06, 0x07, 0x16, 0x17));
4709 #define __builtin_altivec_vmrghw vec_vmrghw 4714 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4715 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4716 0x14, 0x15, 0x16, 0x17));
4722 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4723 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4724 0x14, 0x15, 0x16, 0x17));
4728 vector
bool int __b) {
4730 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4731 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4732 0x14, 0x15, 0x16, 0x17));
4738 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4739 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4740 0x14, 0x15, 0x16, 0x17));
4748 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4749 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4750 0x0E, 0x1E, 0x0F, 0x1F));
4756 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4757 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4758 0x0E, 0x1E, 0x0F, 0x1F));
4764 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4765 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4766 0x0E, 0x1E, 0x0F, 0x1F));
4772 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4773 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4774 0x0E, 0x0F, 0x1E, 0x1F));
4778 vec_mergel(vector
unsigned short __a, vector
unsigned short __b) {
4780 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4781 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4782 0x0E, 0x0F, 0x1E, 0x1F));
4788 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4789 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4790 0x0E, 0x0F, 0x1E, 0x1F));
4796 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4797 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4798 0x0E, 0x0F, 0x1E, 0x1F));
4804 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4805 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4806 0x1C, 0x1D, 0x1E, 0x1F));
4812 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4813 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4814 0x1C, 0x1D, 0x1E, 0x1F));
4818 vector
bool int __b) {
4820 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4821 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4822 0x1C, 0x1D, 0x1E, 0x1F));
4828 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4829 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4830 0x1C, 0x1D, 0x1E, 0x1F));
4835 vec_mergel(vector
signed long long __a, vector
signed long long __b) {
4837 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4838 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4839 0x1C, 0x1D, 0x1E, 0x1F));
4842 vec_mergel(vector
signed long long __a, vector
bool long long __b) {
4843 return vec_perm(__a, (vector
signed long long)__b,
4844 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4845 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4846 0x1C, 0x1D, 0x1E, 0x1F));
4849 vec_mergel(vector
bool long long __a, vector
signed long long __b) {
4850 return vec_perm((vector
signed long long)__a, __b,
4851 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4852 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4853 0x1C, 0x1D, 0x1E, 0x1F));
4855 static __inline__ vector
unsigned long long __ATTRS_o_ai 4856 vec_mergel(vector
unsigned long long __a, vector
unsigned long long __b) {
4858 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4859 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4860 0x1C, 0x1D, 0x1E, 0x1F));
4862 static __inline__ vector
unsigned long long __ATTRS_o_ai 4863 vec_mergel(vector
unsigned long long __a, vector
bool long long __b) {
4864 return vec_perm(__a, (vector
unsigned long long)__b,
4865 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4866 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4867 0x1C, 0x1D, 0x1E, 0x1F));
4869 static __inline__ vector
unsigned long long __ATTRS_o_ai 4870 vec_mergel(vector
bool long long __a, vector
unsigned long long __b) {
4871 return vec_perm((vector
unsigned long long)__a, __b,
4872 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4873 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4874 0x1C, 0x1D, 0x1E, 0x1F));
4877 vec_mergel(vector
bool long long __a, vector
bool long long __b) {
4879 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4880 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4881 0x1C, 0x1D, 0x1E, 0x1F));
4884 vector
double __b) {
4886 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4887 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4888 0x1C, 0x1D, 0x1E, 0x1F));
4891 vec_mergel(vector
double __a, vector
bool long long __b) {
4892 return vec_perm(__a, (vector
double)__b,
4893 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4894 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4895 0x1C, 0x1D, 0x1E, 0x1F));
4898 vec_mergel(vector
bool long long __a, vector
double __b) {
4899 return vec_perm((vector
double)__a, __b,
4900 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4901 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4902 0x1C, 0x1D, 0x1E, 0x1F));
4908 #define __builtin_altivec_vmrglb vec_vmrglb 4913 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4914 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4915 0x0E, 0x1E, 0x0F, 0x1F));
4921 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4922 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4923 0x0E, 0x1E, 0x0F, 0x1F));
4929 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4930 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4931 0x0E, 0x1E, 0x0F, 0x1F));
4936 #define __builtin_altivec_vmrglh vec_vmrglh 4941 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4942 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4943 0x0E, 0x0F, 0x1E, 0x1F));
4947 vec_vmrglh(vector
unsigned short __a, vector
unsigned short __b) {
4949 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4950 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4951 0x0E, 0x0F, 0x1E, 0x1F));
4957 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4958 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4959 0x0E, 0x0F, 0x1E, 0x1F));
4965 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4966 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4967 0x0E, 0x0F, 0x1E, 0x1F));
4972 #define __builtin_altivec_vmrglw vec_vmrglw 4977 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4978 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4979 0x1C, 0x1D, 0x1E, 0x1F));
4985 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4986 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4987 0x1C, 0x1D, 0x1E, 0x1F));
4991 vector
bool int __b) {
4993 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4994 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4995 0x1C, 0x1D, 0x1E, 0x1F));
5001 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5002 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5003 0x1C, 0x1D, 0x1E, 0x1F));
5006 #ifdef __POWER8_VECTOR__ 5009 static __inline__ vector
bool int __ATTRS_o_ai vec_mergee(vector
bool int __a,
5010 vector
bool int __b) {
5012 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5013 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5014 0x18, 0x19, 0x1A, 0x1B));
5018 vec_mergee(vector
signed int __a, vector
signed int __b) {
5020 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5021 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5022 0x18, 0x19, 0x1A, 0x1B));
5026 vec_mergee(vector
unsigned int __a, vector
unsigned int __b) {
5028 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5029 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5030 0x18, 0x19, 0x1A, 0x1B));
5034 vec_mergee(vector
bool long long __a, vector
bool long long __b) {
5039 vec_mergee(vector
signed long long __a, vector
signed long long __b) {
5043 static __inline__ vector
unsigned long long __ATTRS_o_ai 5044 vec_mergee(vector
unsigned long long __a, vector
unsigned long long __b) {
5049 vec_mergee(vector
float __a, vector
float __b) {
5051 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5052 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5053 0x18, 0x19, 0x1A, 0x1B));
5057 vec_mergee(vector
double __a, vector
double __b) {
5063 static __inline__ vector
bool int __ATTRS_o_ai vec_mergeo(vector
bool int __a,
5064 vector
bool int __b) {
5066 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5067 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5068 0x1C, 0x1D, 0x1E, 0x1F));
5072 vec_mergeo(vector
signed int __a, vector
signed int __b) {
5074 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5075 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5076 0x1C, 0x1D, 0x1E, 0x1F));
5080 vec_mergeo(vector
unsigned int __a, vector
unsigned int __b) {
5082 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5083 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5084 0x1C, 0x1D, 0x1E, 0x1F));
5088 vec_mergeo(vector
bool long long __a, vector
bool long long __b) {
5093 vec_mergeo(vector
signed long long __a, vector
signed long long __b) {
5097 static __inline__ vector
unsigned long long __ATTRS_o_ai 5098 vec_mergeo(vector
unsigned long long __a, vector
unsigned long long __b) {
5103 vec_mergeo(vector
float __a, vector
float __b) {
5105 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5106 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5107 0x1C, 0x1D, 0x1E, 0x1F));
5111 vec_mergeo(vector
double __a, vector
double __b) {
5119 static __inline__ vector
unsigned short __attribute__((__always_inline__))
5121 return __builtin_altivec_mfvscr();
5127 vec_min(vector
signed char __a, vector
signed char __b) {
5128 return __builtin_altivec_vminsb(__a, __b);
5132 vec_min(vector
bool char __a, vector
signed char __b) {
5133 return __builtin_altivec_vminsb((vector
signed char)__a, __b);
5137 vec_min(vector
signed char __a, vector
bool char __b) {
5138 return __builtin_altivec_vminsb(__a, (vector
signed char)__b);
5142 vec_min(vector
unsigned char __a, vector
unsigned char __b) {
5143 return __builtin_altivec_vminub(__a, __b);
5147 vec_min(vector
bool char __a, vector
unsigned char __b) {
5148 return __builtin_altivec_vminub((vector
unsigned char)__a, __b);
5152 vec_min(vector
unsigned char __a, vector
bool char __b) {
5153 return __builtin_altivec_vminub(__a, (vector
unsigned char)__b);
5158 return __builtin_altivec_vminsh(__a, __b);
5163 return __builtin_altivec_vminsh((vector
short)__a, __b);
5167 vector
bool short __b) {
5168 return __builtin_altivec_vminsh(__a, (vector
short)__b);
5172 vec_min(vector
unsigned short __a, vector
unsigned short __b) {
5173 return __builtin_altivec_vminuh(__a, __b);
5177 vec_min(vector
bool short __a, vector
unsigned short __b) {
5178 return __builtin_altivec_vminuh((vector
unsigned short)__a, __b);
5182 vec_min(vector
unsigned short __a, vector
bool short __b) {
5183 return __builtin_altivec_vminuh(__a, (vector
unsigned short)__b);
5188 return __builtin_altivec_vminsw(__a, __b);
5193 return __builtin_altivec_vminsw((vector
int)__a, __b);
5197 vector
bool int __b) {
5198 return __builtin_altivec_vminsw(__a, (vector
int)__b);
5202 vec_min(vector
unsigned int __a, vector
unsigned int __b) {
5203 return __builtin_altivec_vminuw(__a, __b);
5207 vec_min(vector
bool int __a, vector
unsigned int __b) {
5208 return __builtin_altivec_vminuw((vector
unsigned int)__a, __b);
5212 vec_min(vector
unsigned int __a, vector
bool int __b) {
5213 return __builtin_altivec_vminuw(__a, (vector
unsigned int)__b);
5216 #ifdef __POWER8_VECTOR__ 5218 vec_min(vector
signed long long __a, vector
signed long long __b) {
5219 return __builtin_altivec_vminsd(__a, __b);
5223 vec_min(vector
bool long long __a, vector
signed long long __b) {
5224 return __builtin_altivec_vminsd((vector
signed long long)__a, __b);
5228 vec_min(vector
signed long long __a, vector
bool long long __b) {
5229 return __builtin_altivec_vminsd(__a, (vector
signed long long)__b);
5232 static __inline__ vector
unsigned long long __ATTRS_o_ai 5233 vec_min(vector
unsigned long long __a, vector
unsigned long long __b) {
5234 return __builtin_altivec_vminud(__a, __b);
5237 static __inline__ vector
unsigned long long __ATTRS_o_ai 5238 vec_min(vector
bool long long __a, vector
unsigned long long __b) {
5239 return __builtin_altivec_vminud((vector
unsigned long long)__a, __b);
5242 static __inline__ vector
unsigned long long __ATTRS_o_ai 5243 vec_min(vector
unsigned long long __a, vector
bool long long __b) {
5244 return __builtin_altivec_vminud(__a, (vector
unsigned long long)__b);
5251 return __builtin_vsx_xvminsp(__a, __b);
5253 return __builtin_altivec_vminfp(__a, __b);
5259 vector
double __b) {
5260 return __builtin_vsx_xvmindp(__a, __b);
5268 return __builtin_altivec_vminsb(__a, __b);
5273 return __builtin_altivec_vminsb((vector
signed char)__a, __b);
5278 return __builtin_altivec_vminsb(__a, (vector
signed char)__b);
5285 return __builtin_altivec_vminub(__a, __b);
5290 return __builtin_altivec_vminub((vector
unsigned char)__a, __b);
5295 return __builtin_altivec_vminub(__a, (vector
unsigned char)__b);
5302 return __builtin_altivec_vminsh(__a, __b);
5307 return __builtin_altivec_vminsh((vector
short)__a, __b);
5311 vector
bool short __b) {
5312 return __builtin_altivec_vminsh(__a, (vector
short)__b);
5318 vec_vminuh(vector
unsigned short __a, vector
unsigned short __b) {
5319 return __builtin_altivec_vminuh(__a, __b);
5324 return __builtin_altivec_vminuh((vector
unsigned short)__a, __b);
5329 return __builtin_altivec_vminuh(__a, (vector
unsigned short)__b);
5336 return __builtin_altivec_vminsw(__a, __b);
5341 return __builtin_altivec_vminsw((vector
int)__a, __b);
5345 vector
bool int __b) {
5346 return __builtin_altivec_vminsw(__a, (vector
int)__b);
5353 return __builtin_altivec_vminuw(__a, __b);
5358 return __builtin_altivec_vminuw((vector
unsigned int)__a, __b);
5363 return __builtin_altivec_vminuw(__a, (vector
unsigned int)__b);
5368 static __inline__ vector
float __attribute__((__always_inline__))
5369 vec_vminfp(vector
float __a, vector
float __b) {
5371 return __builtin_vsx_xvminsp(__a, __b);
5373 return __builtin_altivec_vminfp(__a, __b);
5379 #define __builtin_altivec_vmladduhm vec_mladd 5384 return __a * __b +
__c;
5388 vector
short __a, vector
unsigned short __b, vector
unsigned short __c) {
5389 return __a * (vector short)__b + (vector
short)
__c;
5395 return (vector
short)__a * __b +
__c;
5399 vec_mladd(vector
unsigned short __a, vector
unsigned short __b,
5400 vector
unsigned short __c) {
5401 return __a * __b +
__c;
5409 return __a * __b +
__c;
5413 vector
short __a, vector
unsigned short __b, vector
unsigned short __c) {
5414 return __a * (vector short)__b + (vector
short)
__c;
5419 return (vector
short)__a * __b +
__c;
5424 vector
unsigned short __c) {
5425 return __a * __b +
__c;
5430 static __inline__ vector
short __attribute__((__always_inline__))
5431 vec_mradds(vector
short __a, vector
short __b, vector
short __c) {
5432 return __builtin_altivec_vmhraddshs(__a, __b, __c);
5437 static __inline__ vector
short __attribute__((__always_inline__))
5438 vec_vmhraddshs(vector
short __a, vector
short __b, vector
short __c) {
5439 return __builtin_altivec_vmhraddshs(__a, __b, __c);
5445 vector
unsigned char __b,
5447 return __builtin_altivec_vmsummbm(__a, __b, __c);
5451 vec_msum(vector
unsigned char __a, vector
unsigned char __b,
5452 vector
unsigned int __c) {
5453 return __builtin_altivec_vmsumubm(__a, __b, __c);
5459 return __builtin_altivec_vmsumshm(__a, __b, __c);
5463 vec_msum(vector
unsigned short __a, vector
unsigned short __b,
5464 vector
unsigned int __c) {
5465 return __builtin_altivec_vmsumuhm(__a, __b, __c);
5470 static __inline__ vector
int __attribute__((__always_inline__))
5471 vec_vmsummbm(vector
signed char __a, vector
unsigned char __b, vector
int __c) {
5472 return __builtin_altivec_vmsummbm(__a, __b, __c);
5477 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5478 vec_vmsumubm(vector
unsigned char __a, vector
unsigned char __b,
5479 vector
unsigned int __c) {
5480 return __builtin_altivec_vmsumubm(__a, __b, __c);
5485 static __inline__ vector
int __attribute__((__always_inline__))
5486 vec_vmsumshm(vector
short __a, vector
short __b, vector
int __c) {
5487 return __builtin_altivec_vmsumshm(__a, __b, __c);
5492 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5493 vec_vmsumuhm(vector
unsigned short __a, vector
unsigned short __b,
5494 vector
unsigned int __c) {
5495 return __builtin_altivec_vmsumuhm(__a, __b, __c);
5503 return __builtin_altivec_vmsumshs(__a, __b, __c);
5507 vec_msums(vector
unsigned short __a, vector
unsigned short __b,
5508 vector
unsigned int __c) {
5509 return __builtin_altivec_vmsumuhs(__a, __b, __c);
5514 static __inline__ vector
int __attribute__((__always_inline__))
5515 vec_vmsumshs(vector
short __a, vector
short __b, vector
int __c) {
5516 return __builtin_altivec_vmsumshs(__a, __b, __c);
5521 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5522 vec_vmsumuhs(vector
unsigned short __a, vector
unsigned short __b,
5523 vector
unsigned int __c) {
5524 return __builtin_altivec_vmsumuhs(__a, __b, __c);
5530 __builtin_altivec_mtvscr((vector
int)__a);
5534 __builtin_altivec_mtvscr((vector
int)__a);
5538 __builtin_altivec_mtvscr((vector
int)__a);
5542 __builtin_altivec_mtvscr((vector
int)__a);
5546 __builtin_altivec_mtvscr((vector
int)__a);
5550 __builtin_altivec_mtvscr((vector
int)__a);
5554 __builtin_altivec_mtvscr((vector
int)__a);
5558 __builtin_altivec_mtvscr((vector
int)__a);
5562 __builtin_altivec_mtvscr((vector
int)__a);
5566 __builtin_altivec_mtvscr((vector
int)__a);
5570 __builtin_altivec_mtvscr((vector
int)__a);
5580 vec_mul(vector
signed char __a, vector
signed char __b) {
5585 vec_mul(vector
unsigned char __a, vector
unsigned char __b) {
5590 vec_mul(vector
signed short __a, vector
signed short __b) {
5595 vec_mul(vector
unsigned short __a, vector
unsigned short __b) {
5600 vec_mul(vector
signed int __a, vector
signed int __b) {
5605 vec_mul(vector
unsigned int __a, vector
unsigned int __b) {
5611 vec_mul(vector
signed long long __a, vector
signed long long __b) {
5615 static __inline__ vector
unsigned long long __ATTRS_o_ai 5616 vec_mul(vector
unsigned long long __a, vector
unsigned long long __b) {
5628 vector
double __b) {
5639 vector
signed char __b) {
5640 #ifdef __LITTLE_ENDIAN__ 5641 return __builtin_altivec_vmulosb(__a, __b);
5643 return __builtin_altivec_vmulesb(__a, __b);
5648 vec_mule(vector
unsigned char __a, vector
unsigned char __b) {
5649 #ifdef __LITTLE_ENDIAN__ 5650 return __builtin_altivec_vmuloub(__a, __b);
5652 return __builtin_altivec_vmuleub(__a, __b);
5658 #ifdef __LITTLE_ENDIAN__ 5659 return __builtin_altivec_vmulosh(__a, __b);
5661 return __builtin_altivec_vmulesh(__a, __b);
5666 vec_mule(vector
unsigned short __a, vector
unsigned short __b) {
5667 #ifdef __LITTLE_ENDIAN__ 5668 return __builtin_altivec_vmulouh(__a, __b);
5670 return __builtin_altivec_vmuleuh(__a, __b);
5674 #ifdef __POWER8_VECTOR__ 5676 vec_mule(vector
signed int __a, vector
signed int __b) {
5677 #ifdef __LITTLE_ENDIAN__ 5678 return __builtin_altivec_vmulosw(__a, __b);
5680 return __builtin_altivec_vmulesw(__a, __b);
5684 static __inline__ vector
unsigned long long __ATTRS_o_ai 5685 vec_mule(vector
unsigned int __a, vector
unsigned int __b) {
5686 #ifdef __LITTLE_ENDIAN__ 5687 return __builtin_altivec_vmulouw(__a, __b);
5689 return __builtin_altivec_vmuleuw(__a, __b);
5696 static __inline__ vector
short __attribute__((__always_inline__))
5697 vec_vmulesb(vector
signed char __a, vector
signed char __b) {
5698 #ifdef __LITTLE_ENDIAN__ 5699 return __builtin_altivec_vmulosb(__a, __b);
5701 return __builtin_altivec_vmulesb(__a, __b);
5707 static __inline__ vector
unsigned short __attribute__((__always_inline__))
5708 vec_vmuleub(vector
unsigned char __a, vector
unsigned char __b) {
5709 #ifdef __LITTLE_ENDIAN__ 5710 return __builtin_altivec_vmuloub(__a, __b);
5712 return __builtin_altivec_vmuleub(__a, __b);
5718 static __inline__ vector
int __attribute__((__always_inline__))
5719 vec_vmulesh(vector
short __a, vector
short __b) {
5720 #ifdef __LITTLE_ENDIAN__ 5721 return __builtin_altivec_vmulosh(__a, __b);
5723 return __builtin_altivec_vmulesh(__a, __b);
5729 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5730 vec_vmuleuh(vector
unsigned short __a, vector
unsigned short __b) {
5731 #ifdef __LITTLE_ENDIAN__ 5732 return __builtin_altivec_vmulouh(__a, __b);
5734 return __builtin_altivec_vmuleuh(__a, __b);
5741 vector
signed char __b) {
5742 #ifdef __LITTLE_ENDIAN__ 5743 return __builtin_altivec_vmulesb(__a, __b);
5745 return __builtin_altivec_vmulosb(__a, __b);
5750 vec_mulo(vector
unsigned char __a, vector
unsigned char __b) {
5751 #ifdef __LITTLE_ENDIAN__ 5752 return __builtin_altivec_vmuleub(__a, __b);
5754 return __builtin_altivec_vmuloub(__a, __b);
5760 #ifdef __LITTLE_ENDIAN__ 5761 return __builtin_altivec_vmulesh(__a, __b);
5763 return __builtin_altivec_vmulosh(__a, __b);
5768 vec_mulo(vector
unsigned short __a, vector
unsigned short __b) {
5769 #ifdef __LITTLE_ENDIAN__ 5770 return __builtin_altivec_vmuleuh(__a, __b);
5772 return __builtin_altivec_vmulouh(__a, __b);
5776 #ifdef __POWER8_VECTOR__ 5778 vec_mulo(vector
signed int __a, vector
signed int __b) {
5779 #ifdef __LITTLE_ENDIAN__ 5780 return __builtin_altivec_vmulesw(__a, __b);
5782 return __builtin_altivec_vmulosw(__a, __b);
5786 static __inline__ vector
unsigned long long __ATTRS_o_ai 5787 vec_mulo(vector
unsigned int __a, vector
unsigned int __b) {
5788 #ifdef __LITTLE_ENDIAN__ 5789 return __builtin_altivec_vmuleuw(__a, __b);
5791 return __builtin_altivec_vmulouw(__a, __b);
5798 static __inline__ vector
short __attribute__((__always_inline__))
5799 vec_vmulosb(vector
signed char __a, vector
signed char __b) {
5800 #ifdef __LITTLE_ENDIAN__ 5801 return __builtin_altivec_vmulesb(__a, __b);
5803 return __builtin_altivec_vmulosb(__a, __b);
5809 static __inline__ vector
unsigned short __attribute__((__always_inline__))
5810 vec_vmuloub(vector
unsigned char __a, vector
unsigned char __b) {
5811 #ifdef __LITTLE_ENDIAN__ 5812 return __builtin_altivec_vmuleub(__a, __b);
5814 return __builtin_altivec_vmuloub(__a, __b);
5820 static __inline__ vector
int __attribute__((__always_inline__))
5821 vec_vmulosh(vector
short __a, vector
short __b) {
5822 #ifdef __LITTLE_ENDIAN__ 5823 return __builtin_altivec_vmulesh(__a, __b);
5825 return __builtin_altivec_vmulosh(__a, __b);
5831 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5832 vec_vmulouh(vector
unsigned short __a, vector
unsigned short __b) {
5833 #ifdef __LITTLE_ENDIAN__ 5834 return __builtin_altivec_vmuleuh(__a, __b);
5836 return __builtin_altivec_vmulouh(__a, __b);
5842 #ifdef __POWER8_VECTOR__ 5844 vec_nand(vector
signed char __a, vector
signed char __b) {
5845 return ~(__a &
__b);
5849 vec_nand(vector
signed char __a, vector
bool char __b) {
5850 return ~(__a &
__b);
5854 vec_nand(vector
bool char __a, vector
signed char __b) {
5855 return ~(__a &
__b);
5859 vec_nand(vector
unsigned char __a, vector
unsigned char __b) {
5860 return ~(__a &
__b);
5864 vec_nand(vector
unsigned char __a, vector
bool char __b) {
5865 return ~(__a &
__b);
5869 vec_nand(vector
bool char __a, vector
unsigned char __b) {
5870 return ~(__a &
__b);
5873 static __inline__ vector
bool char __ATTRS_o_ai vec_nand(vector
bool char __a,
5874 vector
bool char __b) {
5875 return ~(__a &
__b);
5879 vec_nand(vector
signed short __a, vector
signed short __b) {
5880 return ~(__a &
__b);
5884 vec_nand(vector
signed short __a, vector
bool short __b) {
5885 return ~(__a &
__b);
5889 vec_nand(vector
bool short __a, vector
signed short __b) {
5890 return ~(__a &
__b);
5894 vec_nand(vector
unsigned short __a, vector
unsigned short __b) {
5895 return ~(__a &
__b);
5899 vec_nand(vector
unsigned short __a, vector
bool short __b) {
5900 return ~(__a &
__b);
5904 vec_nand(vector
bool short __a, vector
bool short __b) {
5905 return ~(__a &
__b);
5909 vec_nand(vector
signed int __a, vector
signed int __b) {
5910 return ~(__a &
__b);
5913 static __inline__ vector
signed int __ATTRS_o_ai vec_nand(vector
signed int __a,
5914 vector
bool int __b) {
5915 return ~(__a &
__b);
5919 vec_nand(vector
bool int __a, vector
signed int __b) {
5920 return ~(__a &
__b);
5924 vec_nand(vector
unsigned int __a, vector
unsigned int __b) {
5925 return ~(__a &
__b);
5929 vec_nand(vector
unsigned int __a, vector
bool int __b) {
5930 return ~(__a &
__b);
5934 vec_nand(vector
bool int __a, vector
unsigned int __b) {
5935 return ~(__a &
__b);
5938 static __inline__ vector
bool int __ATTRS_o_ai vec_nand(vector
bool int __a,
5939 vector
bool int __b) {
5940 return ~(__a &
__b);
5944 vec_nand(vector
float __a, vector
float __b) {
5945 return (vector
float)(~((vector
unsigned int)__a &
5946 (vector
unsigned int)
__b));
5950 vec_nand(vector
signed long long __a, vector
signed long long __b) {
5951 return ~(__a &
__b);
5955 vec_nand(vector
signed long long __a, vector
bool long long __b) {
5956 return ~(__a &
__b);
5960 vec_nand(vector
bool long long __a, vector
signed long long __b) {
5961 return ~(__a &
__b);
5964 static __inline__ vector
unsigned long long __ATTRS_o_ai 5965 vec_nand(vector
unsigned long long __a, vector
unsigned long long __b) {
5966 return ~(__a &
__b);
5969 static __inline__ vector
unsigned long long __ATTRS_o_ai 5970 vec_nand(vector
unsigned long long __a, vector
bool long long __b) {
5971 return ~(__a &
__b);
5974 static __inline__ vector
unsigned long long __ATTRS_o_ai 5975 vec_nand(vector
bool long long __a, vector
unsigned long long __b) {
5976 return ~(__a &
__b);
5980 vec_nand(vector
bool long long __a, vector
bool long long __b) {
5981 return ~(__a &
__b);
5985 vec_nand(vector
double __a, vector
double __b) {
5986 return (vector
double)(~((vector
unsigned long long)__a &
5987 (vector
unsigned long long)
__b));
5995 static __inline__ vector
float __ATTRS_o_ai vec_nmadd(vector
float __a,
5998 return __builtin_vsx_xvnmaddasp(__a, __b, __c);
6001 static __inline__ vector
double __ATTRS_o_ai vec_nmadd(vector
double __a,
6003 vector
double __c) {
6004 return __builtin_vsx_xvnmaddadp(__a, __b, __c);
6014 return __builtin_vsx_xvnmsubasp(__a, __b, __c);
6016 return __builtin_altivec_vnmsubfp(__a, __b, __c);
6023 vector
double __c) {
6024 return __builtin_vsx_xvnmsubadp(__a, __b, __c);
6030 static __inline__ vector
float __attribute__((__always_inline__))
6031 vec_vnmsubfp(vector
float __a, vector
float __b, vector
float __c) {
6032 return __builtin_altivec_vnmsubfp(__a, __b, __c);
6037 #define __builtin_altivec_vnor vec_nor 6040 vec_nor(vector
signed char __a, vector
signed char __b) {
6041 return ~(__a |
__b);
6045 vec_nor(vector
unsigned char __a, vector
unsigned char __b) {
6046 return ~(__a |
__b);
6050 vector
bool char __b) {
6051 return ~(__a |
__b);
6056 return ~(__a |
__b);
6060 vec_nor(vector
unsigned short __a, vector
unsigned short __b) {
6061 return ~(__a |
__b);
6065 vec_nor(vector
bool short __a, vector
bool short __b) {
6066 return ~(__a |
__b);
6071 return ~(__a |
__b);
6075 vec_nor(vector
unsigned int __a, vector
unsigned int __b) {
6076 return ~(__a |
__b);
6080 vector
bool int __b) {
6081 return ~(__a |
__b);
6086 vector
unsigned int __res =
6087 ~((vector
unsigned int)__a | (vector
unsigned int)
__b);
6088 return (vector
float)__res;
6093 vector
double __b) {
6094 vector
unsigned long long __res =
6095 ~((vector
unsigned long long)__a | (vector
unsigned long long)
__b);
6096 return (vector
double)__res;
6103 vec_vnor(vector
signed char __a, vector
signed char __b) {
6104 return ~(__a |
__b);
6108 vec_vnor(vector
unsigned char __a, vector
unsigned char __b) {
6109 return ~(__a |
__b);
6113 vector
bool char __b) {
6114 return ~(__a |
__b);
6119 return ~(__a |
__b);
6123 vec_vnor(vector
unsigned short __a, vector
unsigned short __b) {
6124 return ~(__a |
__b);
6128 vec_vnor(vector
bool short __a, vector
bool short __b) {
6129 return ~(__a |
__b);
6134 return ~(__a |
__b);
6138 vec_vnor(vector
unsigned int __a, vector
unsigned int __b) {
6139 return ~(__a |
__b);
6143 vector
bool int __b) {
6144 return ~(__a |
__b);
6149 vector
unsigned int __res =
6150 ~((vector
unsigned int)__a | (vector
unsigned int)
__b);
6151 return (vector
float)__res;
6156 vec_nor(vector
signed long long __a, vector
signed long long __b) {
6157 return ~(__a |
__b);
6160 static __inline__ vector
unsigned long long __ATTRS_o_ai 6161 vec_nor(vector
unsigned long long __a, vector
unsigned long long __b) {
6162 return ~(__a |
__b);
6166 vec_nor(vector
bool long long __a, vector
bool long long __b) {
6167 return ~(__a |
__b);
6173 #define __builtin_altivec_vor vec_or 6176 vec_or(vector
signed char __a, vector
signed char __b) {
6181 vec_or(vector
bool char __a, vector
signed char __b) {
6182 return (vector
signed char)__a |
__b;
6186 vector
bool char __b) {
6187 return __a | (vector
signed char)__b;
6191 vec_or(vector
unsigned char __a, vector
unsigned char __b) {
6196 vec_or(vector
bool char __a, vector
unsigned char __b) {
6197 return (vector
unsigned char)__a |
__b;
6201 vec_or(vector
unsigned char __a, vector
bool char __b) {
6202 return __a | (vector
unsigned char)__b;
6206 vector
bool char __b) {
6217 return (vector
short)__a |
__b;
6221 vector
bool short __b) {
6222 return __a | (vector short)__b;
6226 vec_or(vector
unsigned short __a, vector
unsigned short __b) {
6231 vec_or(vector
bool short __a, vector
unsigned short __b) {
6232 return (vector
unsigned short)__a |
__b;
6236 vec_or(vector
unsigned short __a, vector
bool short __b) {
6237 return __a | (vector
unsigned short)__b;
6241 vector
bool short __b) {
6252 return (vector
int)__a |
__b;
6256 vector
bool int __b) {
6257 return __a | (vector int)__b;
6261 vec_or(vector
unsigned int __a, vector
unsigned int __b) {
6266 vec_or(vector
bool int __a, vector
unsigned int __b) {
6267 return (vector
unsigned int)__a |
__b;
6271 vec_or(vector
unsigned int __a, vector
bool int __b) {
6272 return __a | (vector
unsigned int)__b;
6276 vector
bool int __b) {
6282 vector
unsigned int __res =
6283 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6284 return (vector
float)__res;
6289 vector
unsigned int __res =
6290 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6291 return (vector
float)__res;
6295 vector
bool int __b) {
6296 vector
unsigned int __res =
6297 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6298 return (vector
float)__res;
6303 vector
double __b) {
6304 return (vector
unsigned long long)__a | (vector
unsigned long long)__b;
6308 vector
bool long long __b) {
6309 return (vector
unsigned long long)__a | (vector
unsigned long long)__b;
6313 vector
double __b) {
6314 vector
unsigned long long __res =
6315 (vector
unsigned long long)__a | (vector
unsigned long long)
__b;
6316 return (vector
double)__res;
6320 vec_or(vector
signed long long __a, vector
signed long long __b) {
6325 vec_or(vector
bool long long __a, vector
signed long long __b) {
6326 return (vector
signed long long)__a |
__b;
6330 vec_or(vector
signed long long __a, vector
bool long long __b) {
6331 return __a | (vector
signed long long)__b;
6334 static __inline__ vector
unsigned long long __ATTRS_o_ai 6335 vec_or(vector
unsigned long long __a, vector
unsigned long long __b) {
6339 static __inline__ vector
unsigned long long __ATTRS_o_ai 6340 vec_or(vector
bool long long __a, vector
unsigned long long __b) {
6341 return (vector
unsigned long long)__a |
__b;
6344 static __inline__ vector
unsigned long long __ATTRS_o_ai 6345 vec_or(vector
unsigned long long __a, vector
bool long long __b) {
6346 return __a | (vector
unsigned long long)__b;
6350 vec_or(vector
bool long long __a, vector
bool long long __b) {
6355 #ifdef __POWER8_VECTOR__ 6357 vec_orc(vector
signed char __a, vector
signed char __b) {
6362 vec_orc(vector
signed char __a, vector
bool char __b) {
6367 vec_orc(vector
bool char __a, vector
signed char __b) {
6372 vec_orc(vector
unsigned char __a, vector
unsigned char __b) {
6377 vec_orc(vector
unsigned char __a, vector
bool char __b) {
6382 vec_orc(vector
bool char __a, vector
unsigned char __b) {
6386 static __inline__ vector
bool char __ATTRS_o_ai vec_orc(vector
bool char __a,
6387 vector
bool char __b) {
6392 vec_orc(vector
signed short __a, vector
signed short __b) {
6397 vec_orc(vector
signed short __a, vector
bool short __b) {
6402 vec_orc(vector
bool short __a, vector
signed short __b) {
6407 vec_orc(vector
unsigned short __a, vector
unsigned short __b) {
6412 vec_orc(vector
unsigned short __a, vector
bool short __b) {
6417 vec_orc(vector
bool short __a, vector
unsigned short __b) {
6422 vec_orc(vector
bool short __a, vector
bool short __b) {
6427 vec_orc(vector
signed int __a, vector
signed int __b) {
6431 static __inline__ vector
signed int __ATTRS_o_ai vec_orc(vector
signed int __a,
6432 vector
bool int __b) {
6437 vec_orc(vector
bool int __a, vector
signed int __b) {
6442 vec_orc(vector
unsigned int __a, vector
unsigned int __b) {
6447 vec_orc(vector
unsigned int __a, vector
bool int __b) {
6452 vec_orc(vector
bool int __a, vector
unsigned int __b) {
6456 static __inline__ vector
bool int __ATTRS_o_ai vec_orc(vector
bool int __a,
6457 vector
bool int __b) {
6462 vec_orc(vector
bool int __a, vector
float __b) {
6463 return (vector
float)(__a | ~(vector
unsigned int)__b);
6467 vec_orc(vector
float __a, vector
bool int __b) {
6468 return (vector
float)((vector
unsigned int)__a | ~__b);
6472 vec_orc(vector
signed long long __a, vector
signed long long __b) {
6477 vec_orc(vector
signed long long __a, vector
bool long long __b) {
6482 vec_orc(vector
bool long long __a, vector
signed long long __b) {
6486 static __inline__ vector
unsigned long long __ATTRS_o_ai 6487 vec_orc(vector
unsigned long long __a, vector
unsigned long long __b) {
6491 static __inline__ vector
unsigned long long __ATTRS_o_ai 6492 vec_orc(vector
unsigned long long __a, vector
bool long long __b) {
6496 static __inline__ vector
unsigned long long __ATTRS_o_ai 6497 vec_orc(vector
bool long long __a, vector
unsigned long long __b) {
6502 vec_orc(vector
bool long long __a, vector
bool long long __b) {
6507 vec_orc(vector
double __a, vector
bool long long __b) {
6508 return (vector
double)((vector
unsigned long long)__a | ~__b);
6512 vec_orc(vector
bool long long __a, vector
double __b) {
6513 return (vector
double)(__a | ~(vector
unsigned long long)__b);
6520 vec_vor(vector
signed char __a, vector
signed char __b) {
6525 vec_vor(vector
bool char __a, vector
signed char __b) {
6526 return (vector
signed char)__a |
__b;
6530 vec_vor(vector
signed char __a, vector
bool char __b) {
6531 return __a | (vector
signed char)__b;
6535 vec_vor(vector
unsigned char __a, vector
unsigned char __b) {
6540 vec_vor(vector
bool char __a, vector
unsigned char __b) {
6541 return (vector
unsigned char)__a |
__b;
6545 vec_vor(vector
unsigned char __a, vector
bool char __b) {
6546 return __a | (vector
unsigned char)__b;
6550 vector
bool char __b) {
6561 return (vector
short)__a |
__b;
6565 vector
bool short __b) {
6566 return __a | (vector short)__b;
6570 vec_vor(vector
unsigned short __a, vector
unsigned short __b) {
6575 vec_vor(vector
bool short __a, vector
unsigned short __b) {
6576 return (vector
unsigned short)__a |
__b;
6580 vec_vor(vector
unsigned short __a, vector
bool short __b) {
6581 return __a | (vector
unsigned short)__b;
6585 vec_vor(vector
bool short __a, vector
bool short __b) {
6596 return (vector
int)__a |
__b;
6600 vector
bool int __b) {
6601 return __a | (vector int)__b;
6605 vec_vor(vector
unsigned int __a, vector
unsigned int __b) {
6610 vec_vor(vector
bool int __a, vector
unsigned int __b) {
6611 return (vector
unsigned int)__a |
__b;
6615 vec_vor(vector
unsigned int __a, vector
bool int __b) {
6616 return __a | (vector
unsigned int)__b;
6620 vector
bool int __b) {
6626 vector
unsigned int __res =
6627 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6628 return (vector
float)__res;
6633 vector
unsigned int __res =
6634 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6635 return (vector
float)__res;
6639 vector
bool int __b) {
6640 vector
unsigned int __res =
6641 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6642 return (vector
float)__res;
6647 vec_vor(vector
signed long long __a, vector
signed long long __b) {
6652 vec_vor(vector
bool long long __a, vector
signed long long __b) {
6653 return (vector
signed long long)__a |
__b;
6657 vec_vor(vector
signed long long __a, vector
bool long long __b) {
6658 return __a | (vector
signed long long)__b;
6661 static __inline__ vector
unsigned long long __ATTRS_o_ai 6662 vec_vor(vector
unsigned long long __a, vector
unsigned long long __b) {
6666 static __inline__ vector
unsigned long long __ATTRS_o_ai 6667 vec_vor(vector
bool long long __a, vector
unsigned long long __b) {
6668 return (vector
unsigned long long)__a |
__b;
6671 static __inline__ vector
unsigned long long __ATTRS_o_ai 6672 vec_vor(vector
unsigned long long __a, vector
bool long long __b) {
6673 return __a | (vector
unsigned long long)__b;
6677 vec_vor(vector
bool long long __a, vector
bool long long __b) {
6688 vec_pack(vector
signed short __a, vector
signed short __b) {
6689 #ifdef __LITTLE_ENDIAN__ 6690 return (vector
signed char)
vec_perm(
6692 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6693 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6695 return (vector
signed char)
vec_perm(
6697 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6698 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6703 vec_pack(vector
unsigned short __a, vector
unsigned short __b) {
6704 #ifdef __LITTLE_ENDIAN__ 6705 return (vector
unsigned char)
vec_perm(
6707 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6708 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6710 return (vector
unsigned char)
vec_perm(
6712 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6713 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6718 vec_pack(vector
bool short __a, vector
bool short __b) {
6719 #ifdef __LITTLE_ENDIAN__ 6722 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6723 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6727 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6728 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6734 #ifdef __LITTLE_ENDIAN__ 6737 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6738 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6742 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6743 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6748 vec_pack(vector
unsigned int __a, vector
unsigned int __b) {
6749 #ifdef __LITTLE_ENDIAN__ 6750 return (vector
unsigned short)
vec_perm(
6752 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6753 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6755 return (vector
unsigned short)
vec_perm(
6757 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6758 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6763 vector
bool int __b) {
6764 #ifdef __LITTLE_ENDIAN__ 6765 return (vector
bool short)
vec_perm(
6767 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6768 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6770 return (vector
bool short)
vec_perm(
6772 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6773 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6779 vec_pack(vector
signed long long __a, vector
signed long long __b) {
6780 #ifdef __LITTLE_ENDIAN__ 6781 return (vector
signed int)
vec_perm(
6783 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6784 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6786 return (vector
signed int)
vec_perm(
6788 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6789 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6793 vec_pack(vector
unsigned long long __a, vector
unsigned long long __b) {
6794 #ifdef __LITTLE_ENDIAN__ 6795 return (vector
unsigned int)
vec_perm(
6797 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6798 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6800 return (vector
unsigned int)
vec_perm(
6802 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6803 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6808 vec_pack(vector
bool long long __a, vector
bool long long __b) {
6809 #ifdef __LITTLE_ENDIAN__ 6812 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6813 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6817 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6818 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6823 vec_pack(vector
double __a, vector
double __b) {
6824 return (vector
float) (__a[0], __a[1], __b[0], __b[1]);
6828 #ifdef __POWER9_VECTOR__ 6830 vec_pack_to_short_fp32(vector
float __a, vector
float __b) {
6831 vector
float __resa = __builtin_vsx_xvcvsphp(__a);
6832 vector
float __resb = __builtin_vsx_xvcvsphp(__b);
6833 #ifdef __LITTLE_ENDIAN__ 6834 return (vector
unsigned short)vec_mergee(__resa, __resb);
6836 return (vector
unsigned short)vec_mergeo(__resa, __resb);
6843 #define __builtin_altivec_vpkuhum vec_vpkuhum 6847 #ifdef __LITTLE_ENDIAN__ 6848 return (vector
signed char)
vec_perm(
6850 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6851 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6853 return (vector
signed char)
vec_perm(
6855 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6856 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6862 #ifdef __LITTLE_ENDIAN__ 6863 return (vector
unsigned char)
vec_perm(
6865 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6866 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6868 return (vector
unsigned char)
vec_perm(
6870 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6871 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6877 #ifdef __LITTLE_ENDIAN__ 6880 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6881 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6885 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6886 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6892 #define __builtin_altivec_vpkuwum vec_vpkuwum 6896 #ifdef __LITTLE_ENDIAN__ 6899 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6900 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6904 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6905 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6911 #ifdef __LITTLE_ENDIAN__ 6912 return (vector
unsigned short)
vec_perm(
6914 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6915 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6917 return (vector
unsigned short)
vec_perm(
6919 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6920 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6926 #ifdef __LITTLE_ENDIAN__ 6927 return (vector
bool short)
vec_perm(
6929 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6930 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6932 return (vector
bool short)
vec_perm(
6934 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6935 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6941 #ifdef __POWER8_VECTOR__ 6942 #define __builtin_altivec_vpkudum vec_vpkudum 6944 static __inline__ vector
int __ATTRS_o_ai vec_vpkudum(vector
long long __a,
6945 vector
long long __b) {
6946 #ifdef __LITTLE_ENDIAN__ 6949 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6950 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6954 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6955 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6960 vec_vpkudum(vector
unsigned long long __a, vector
unsigned long long __b) {
6961 #ifdef __LITTLE_ENDIAN__ 6962 return (vector
unsigned int)
vec_perm(
6964 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6965 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6967 return (vector
unsigned int)
vec_perm(
6969 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6970 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6975 vec_vpkudum(vector
bool long long __a, vector
bool long long __b) {
6976 #ifdef __LITTLE_ENDIAN__ 6978 (vector
long long)__a, (vector
long long)__b,
6979 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6980 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6983 (vector
long long)__a, (vector
long long)__b,
6984 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6985 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6992 static __inline__ vector pixel
__attribute__((__always_inline__))
6993 vec_packpx(vector
unsigned int __a, vector
unsigned int __b) {
6994 #ifdef __LITTLE_ENDIAN__ 6995 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
6997 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
7003 static __inline__ vector pixel
__attribute__((__always_inline__))
7004 vec_vpkpx(vector
unsigned int __a, vector
unsigned int __b) {
7005 #ifdef __LITTLE_ENDIAN__ 7006 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
7008 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
7016 #ifdef __LITTLE_ENDIAN__ 7017 return __builtin_altivec_vpkshss(__b, __a);
7019 return __builtin_altivec_vpkshss(__a, __b);
7024 vec_packs(vector
unsigned short __a, vector
unsigned short __b) {
7025 #ifdef __LITTLE_ENDIAN__ 7026 return __builtin_altivec_vpkuhus(__b, __a);
7028 return __builtin_altivec_vpkuhus(__a, __b);
7034 #ifdef __LITTLE_ENDIAN__ 7035 return __builtin_altivec_vpkswss(__b, __a);
7037 return __builtin_altivec_vpkswss(__a, __b);
7042 vec_packs(vector
unsigned int __a, vector
unsigned int __b) {
7043 #ifdef __LITTLE_ENDIAN__ 7044 return __builtin_altivec_vpkuwus(__b, __a);
7046 return __builtin_altivec_vpkuwus(__a, __b);
7050 #ifdef __POWER8_VECTOR__ 7052 vector
long long __b) {
7053 #ifdef __LITTLE_ENDIAN__ 7054 return __builtin_altivec_vpksdss(__b, __a);
7056 return __builtin_altivec_vpksdss(__a, __b);
7061 vec_packs(vector
unsigned long long __a, vector
unsigned long long __b) {
7062 #ifdef __LITTLE_ENDIAN__ 7063 return __builtin_altivec_vpkudus(__b, __a);
7065 return __builtin_altivec_vpkudus(__a, __b);
7072 static __inline__ vector
signed char __attribute__((__always_inline__))
7073 vec_vpkshss(vector
short __a, vector
short __b) {
7074 #ifdef __LITTLE_ENDIAN__ 7075 return __builtin_altivec_vpkshss(__b, __a);
7077 return __builtin_altivec_vpkshss(__a, __b);
7083 #ifdef __POWER8_VECTOR__ 7084 static __inline__ vector
int __ATTRS_o_ai vec_vpksdss(vector
long long __a,
7085 vector
long long __b) {
7086 #ifdef __LITTLE_ENDIAN__ 7087 return __builtin_altivec_vpksdss(__b, __a);
7089 return __builtin_altivec_vpksdss(__a, __b);
7096 static __inline__ vector
unsigned char __attribute__((__always_inline__))
7097 vec_vpkuhus(vector
unsigned short __a, vector
unsigned short __b) {
7098 #ifdef __LITTLE_ENDIAN__ 7099 return __builtin_altivec_vpkuhus(__b, __a);
7101 return __builtin_altivec_vpkuhus(__a, __b);
7107 #ifdef __POWER8_VECTOR__ 7108 static __inline__ vector
unsigned int __attribute__((__always_inline__))
7109 vec_vpkudus(vector
unsigned long long __a, vector
unsigned long long __b) {
7110 #ifdef __LITTLE_ENDIAN__ 7111 return __builtin_altivec_vpkudus(__b, __a);
7113 return __builtin_altivec_vpkudus(__a, __b);
7120 static __inline__ vector
signed short __attribute__((__always_inline__))
7121 vec_vpkswss(vector
int __a, vector
int __b) {
7122 #ifdef __LITTLE_ENDIAN__ 7123 return __builtin_altivec_vpkswss(__b, __a);
7125 return __builtin_altivec_vpkswss(__a, __b);
7131 static __inline__ vector
unsigned short __attribute__((__always_inline__))
7132 vec_vpkuwus(vector
unsigned int __a, vector
unsigned int __b) {
7133 #ifdef __LITTLE_ENDIAN__ 7134 return __builtin_altivec_vpkuwus(__b, __a);
7136 return __builtin_altivec_vpkuwus(__a, __b);
7144 #ifdef __LITTLE_ENDIAN__ 7145 return __builtin_altivec_vpkshus(__b, __a);
7147 return __builtin_altivec_vpkshus(__a, __b);
7152 vec_packsu(vector
unsigned short __a, vector
unsigned short __b) {
7153 #ifdef __LITTLE_ENDIAN__ 7154 return __builtin_altivec_vpkuhus(__b, __a);
7156 return __builtin_altivec_vpkuhus(__a, __b);
7162 #ifdef __LITTLE_ENDIAN__ 7163 return __builtin_altivec_vpkswus(__b, __a);
7165 return __builtin_altivec_vpkswus(__a, __b);
7171 #ifdef __LITTLE_ENDIAN__ 7172 return __builtin_altivec_vpkuwus(__b, __a);
7174 return __builtin_altivec_vpkuwus(__a, __b);
7178 #ifdef __POWER8_VECTOR__ 7180 vec_packsu(vector
long long __a, vector
long long __b) {
7181 #ifdef __LITTLE_ENDIAN__ 7182 return __builtin_altivec_vpksdus(__b, __a);
7184 return __builtin_altivec_vpksdus(__a, __b);
7189 vec_packsu(vector
unsigned long long __a, vector
unsigned long long __b) {
7190 #ifdef __LITTLE_ENDIAN__ 7191 return __builtin_altivec_vpkudus(__b, __a);
7193 return __builtin_altivec_vpkudus(__a, __b);
7202 #ifdef __LITTLE_ENDIAN__ 7203 return __builtin_altivec_vpkshus(__b, __a);
7205 return __builtin_altivec_vpkshus(__a, __b);
7211 #ifdef __LITTLE_ENDIAN__ 7212 return __builtin_altivec_vpkuhus(__b, __a);
7214 return __builtin_altivec_vpkuhus(__a, __b);
7222 #ifdef __LITTLE_ENDIAN__ 7223 return __builtin_altivec_vpkswus(__b, __a);
7225 return __builtin_altivec_vpkswus(__a, __b);
7231 #ifdef __LITTLE_ENDIAN__ 7232 return __builtin_altivec_vpkuwus(__b, __a);
7234 return __builtin_altivec_vpkuwus(__a, __b);
7240 #ifdef __POWER8_VECTOR__ 7242 vec_vpksdus(vector
long long __a, vector
long long __b) {
7243 #ifdef __LITTLE_ENDIAN__ 7244 return __builtin_altivec_vpksdus(__b, __a);
7246 return __builtin_altivec_vpksdus(__a, __b);
7262 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7263 #ifdef __LITTLE_ENDIAN__ 7264 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7265 255, 255, 255, 255, 255, 255, 255, 255};
7267 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)__b,
7268 (vector
int)__a, __d);
7270 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)__a,
7271 (vector
int)__b, __c);
7276 vec_perm(vector
unsigned char __a, vector
unsigned char __b,
7277 vector
unsigned char __c) {
7278 #ifdef __LITTLE_ENDIAN__ 7279 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7280 255, 255, 255, 255, 255, 255, 255, 255};
7282 return (vector
unsigned char)__builtin_altivec_vperm_4si(
7283 (vector
int)__b, (vector
int)__a, __d);
7285 return (vector
unsigned char)__builtin_altivec_vperm_4si(
7286 (vector
int)__a, (vector
int)__b, __c);
7291 vec_perm(vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7292 #ifdef __LITTLE_ENDIAN__ 7293 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7294 255, 255, 255, 255, 255, 255, 255, 255};
7296 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)__b,
7297 (vector
int)__a, __d);
7299 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)__a,
7300 (vector
int)__b, __c);
7305 vector
signed short __b,
7306 vector
unsigned char __c) {
7307 #ifdef __LITTLE_ENDIAN__ 7308 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7309 255, 255, 255, 255, 255, 255, 255, 255};
7311 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)__b,
7312 (vector
int)__a, __d);
7314 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)__a,
7315 (vector
int)__b, __c);
7320 vec_perm(vector
unsigned short __a, vector
unsigned short __b,
7321 vector
unsigned char __c) {
7322 #ifdef __LITTLE_ENDIAN__ 7323 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7324 255, 255, 255, 255, 255, 255, 255, 255};
7326 return (vector
unsigned short)__builtin_altivec_vperm_4si(
7327 (vector
int)__b, (vector
int)__a, __d);
7329 return (vector
unsigned short)__builtin_altivec_vperm_4si(
7330 (vector
int)__a, (vector
int)__b, __c);
7335 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
7336 #ifdef __LITTLE_ENDIAN__ 7337 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7338 255, 255, 255, 255, 255, 255, 255, 255};
7340 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)__b,
7341 (vector
int)__a, __d);
7343 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)__a,
7344 (vector
int)__b, __c);
7350 vector
unsigned char __c) {
7351 #ifdef __LITTLE_ENDIAN__ 7352 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7353 255, 255, 255, 255, 255, 255, 255, 255};
7355 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)__b,
7356 (vector
int)__a, __d);
7358 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)__a,
7359 (vector
int)__b, __c);
7364 vector
signed int __b,
7365 vector
unsigned char __c) {
7366 #ifdef __LITTLE_ENDIAN__ 7367 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7368 255, 255, 255, 255, 255, 255, 255, 255};
7370 return (vector
signed int)__builtin_altivec_vperm_4si(__b, __a, __d);
7372 return (vector
signed int)__builtin_altivec_vperm_4si(__a, __b, __c);
7377 vec_perm(vector
unsigned int __a, vector
unsigned int __b,
7378 vector
unsigned char __c) {
7379 #ifdef __LITTLE_ENDIAN__ 7380 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7381 255, 255, 255, 255, 255, 255, 255, 255};
7383 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)__b,
7384 (vector
int)__a, __d);
7386 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)__a,
7387 (vector
int)__b, __c);
7392 vec_perm(vector
bool int __a, vector
bool int __b, vector
unsigned char __c) {
7393 #ifdef __LITTLE_ENDIAN__ 7394 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7395 255, 255, 255, 255, 255, 255, 255, 255};
7397 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)__b,
7398 (vector
int)__a, __d);
7400 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)__a,
7401 (vector
int)__b, __c);
7407 vector
unsigned char __c) {
7408 #ifdef __LITTLE_ENDIAN__ 7409 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7410 255, 255, 255, 255, 255, 255, 255, 255};
7412 return (vector
float)__builtin_altivec_vperm_4si((vector
int)__b,
7413 (vector
int)__a, __d);
7415 return (vector
float)__builtin_altivec_vperm_4si((vector
int)__a,
7416 (vector
int)__b, __c);
7422 vec_perm(vector
signed long long __a, vector
signed long long __b,
7423 vector
unsigned char __c) {
7424 #ifdef __LITTLE_ENDIAN__ 7425 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7426 255, 255, 255, 255, 255, 255, 255, 255};
7428 return (vector
signed long long)__builtin_altivec_vperm_4si(
7429 (vector
int)__b, (vector
int)__a, __d);
7431 return (vector
signed long long)__builtin_altivec_vperm_4si(
7432 (vector
int)__a, (vector
int)__b, __c);
7436 static __inline__ vector
unsigned long long __ATTRS_o_ai 7437 vec_perm(vector
unsigned long long __a, vector
unsigned long long __b,
7438 vector
unsigned char __c) {
7439 #ifdef __LITTLE_ENDIAN__ 7440 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7441 255, 255, 255, 255, 255, 255, 255, 255};
7443 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
7444 (vector
int)__b, (vector
int)__a, __d);
7446 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
7447 (vector
int)__a, (vector
int)__b, __c);
7452 vec_perm(vector
bool long long __a, vector
bool long long __b,
7453 vector
unsigned char __c) {
7454 #ifdef __LITTLE_ENDIAN__ 7455 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7456 255, 255, 255, 255, 255, 255, 255, 255};
7458 return (vector
bool long long)__builtin_altivec_vperm_4si(
7459 (vector
int)__b, (vector
int)__a, __d);
7461 return (vector
bool long long)__builtin_altivec_vperm_4si(
7462 (vector
int)__a, (vector
int)__b, __c);
7467 vec_perm(vector
double __a, vector
double __b, vector
unsigned char __c) {
7468 #ifdef __LITTLE_ENDIAN__ 7469 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7470 255, 255, 255, 255, 255, 255, 255, 255};
7472 return (vector
double)__builtin_altivec_vperm_4si((vector
int)__b,
7473 (vector
int)__a, __d);
7475 return (vector
double)__builtin_altivec_vperm_4si((vector
int)__a,
7476 (vector
int)__b, __c);
7484 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7489 vec_vperm(vector
unsigned char __a, vector
unsigned char __b,
7490 vector
unsigned char __c) {
7495 vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7500 vec_vperm(vector
short __a, vector
short __b, vector
unsigned char __c) {
7505 vec_vperm(vector
unsigned short __a, vector
unsigned short __b,
7506 vector
unsigned char __c) {
7511 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
7516 vec_vperm(vector pixel __a, vector pixel __b, vector
unsigned char __c) {
7522 vector
unsigned char __c) {
7528 vector
unsigned char __c) {
7533 vec_vperm(vector
bool int __a, vector
bool int __b, vector
unsigned char __c) {
7538 vec_vperm(vector
float __a, vector
float __b, vector
unsigned char __c) {
7544 vector
long long __a, vector
long long __b, vector
unsigned char __c) {
7548 static __inline__ vector
unsigned long long __ATTRS_o_ai 7549 vec_vperm(vector
unsigned long long __a, vector
unsigned long long __b,
7550 vector
unsigned char __c) {
7555 vec_vperm(vector
double __a, vector
double __b, vector
unsigned char __c) {
7564 return __builtin_vsx_xvresp(__a);
7566 return __builtin_altivec_vrefp(__a);
7572 return __builtin_vsx_xvredp(__a);
7578 static __inline__ vector
float __attribute__((__always_inline__))
7579 vec_vrefp(vector
float __a) {
7580 return __builtin_altivec_vrefp(__a);
7586 vec_rl(vector
signed char __a, vector
unsigned char __b) {
7587 return (vector
signed char)__builtin_altivec_vrlb((vector
char)__a, __b);
7591 vec_rl(vector
unsigned char __a, vector
unsigned char __b) {
7592 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)__a, __b);
7596 vector
unsigned short __b) {
7597 return __builtin_altivec_vrlh(__a, __b);
7601 vec_rl(vector
unsigned short __a, vector
unsigned short __b) {
7602 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)__a, __b);
7606 vector
unsigned int __b) {
7607 return __builtin_altivec_vrlw(__a, __b);
7611 vec_rl(vector
unsigned int __a, vector
unsigned int __b) {
7612 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)__a, __b);
7615 #ifdef __POWER8_VECTOR__ 7617 vec_rl(vector
signed long long __a, vector
unsigned long long __b) {
7618 return __builtin_altivec_vrld(__a, __b);
7621 static __inline__ vector
unsigned long long __ATTRS_o_ai 7622 vec_rl(vector
unsigned long long __a, vector
unsigned long long __b) {
7623 return __builtin_altivec_vrld(__a, __b);
7628 #ifdef __POWER9_VECTOR__ 7630 vec_rlmi(vector
unsigned int __a, vector
unsigned int __b,
7631 vector
unsigned int __c) {
7632 return __builtin_altivec_vrlwmi(__a, __c, __b);
7635 static __inline__ vector
unsigned long long __ATTRS_o_ai 7636 vec_rlmi(vector
unsigned long long __a, vector
unsigned long long __b,
7637 vector
unsigned long long __c) {
7638 return __builtin_altivec_vrldmi(__a, __c, __b);
7643 vec_rlnm(vector
unsigned int __a, vector
unsigned int __b,
7644 vector
unsigned int __c) {
7645 vector
unsigned int OneByte = { 0x8, 0x8, 0x8, 0x8 };
7646 return __builtin_altivec_vrlwnm(__a, ((__c << OneByte) | __b));
7649 static __inline__ vector
unsigned long long __ATTRS_o_ai 7650 vec_rlnm(vector
unsigned long long __a, vector
unsigned long long __b,
7651 vector
unsigned long long __c) {
7652 vector
unsigned long long OneByte = { 0x8, 0x8 };
7653 return __builtin_altivec_vrldnm(__a, ((__c << OneByte) | __b));
7660 vec_vrlb(vector
signed char __a, vector
unsigned char __b) {
7661 return (vector
signed char)__builtin_altivec_vrlb((vector
char)__a, __b);
7665 vec_vrlb(vector
unsigned char __a, vector
unsigned char __b) {
7666 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)__a, __b);
7672 vec_vrlh(vector
short __a, vector
unsigned short __b) {
7673 return __builtin_altivec_vrlh(__a, __b);
7677 vec_vrlh(vector
unsigned short __a, vector
unsigned short __b) {
7678 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)__a, __b);
7684 vector
unsigned int __b) {
7685 return __builtin_altivec_vrlw(__a, __b);
7689 vec_vrlw(vector
unsigned int __a, vector
unsigned int __b) {
7690 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)__a, __b);
7697 return __builtin_vsx_xvrspi(__a);
7699 return __builtin_altivec_vrfin(__a);
7705 return __builtin_vsx_xvrdpi(__a);
7710 static __inline__ vector
float __ATTRS_o_ai vec_rint(vector
float __a) {
7711 return __builtin_vsx_xvrspic(__a);
7714 static __inline__ vector
double __ATTRS_o_ai vec_rint(vector
double __a) {
7715 return __builtin_vsx_xvrdpic(__a);
7720 static __inline__ vector
float __ATTRS_o_ai vec_nearbyint(vector
float __a) {
7721 return __builtin_vsx_xvrspi(__a);
7724 static __inline__ vector
double __ATTRS_o_ai vec_nearbyint(vector
double __a) {
7725 return __builtin_vsx_xvrdpi(__a);
7731 static __inline__ vector
float __attribute__((__always_inline__))
7732 vec_vrfin(vector
float __a) {
7733 return __builtin_altivec_vrfin(__a);
7739 static __inline__ vector
float __ATTRS_o_ai vec_sqrt(vector
float __a) {
7740 return __builtin_vsx_xvsqrtsp(__a);
7743 static __inline__ vector
double __ATTRS_o_ai vec_sqrt(vector
double __a) {
7744 return __builtin_vsx_xvsqrtdp(__a);
7752 return __builtin_vsx_xvrsqrtesp(__a);
7754 return __builtin_altivec_vrsqrtefp(__a);
7760 return __builtin_vsx_xvrsqrtedp(__a);
7766 static __inline__ __vector
float __attribute__((__always_inline__))
7767 vec_vrsqrtefp(vector
float __a) {
7768 return __builtin_altivec_vrsqrtefp(__a);
7773 #define __builtin_altivec_vsel_4si vec_sel 7776 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7777 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7781 vec_sel(vector
signed char __a, vector
signed char __b, vector
bool char __c) {
7782 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7786 vec_sel(vector
unsigned char __a, vector
unsigned char __b,
7787 vector
unsigned char __c) {
7788 return (__a & ~__c) | (__b &
__c);
7792 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
7793 return (__a & ~(vector
unsigned char)__c) | (__b & (vector
unsigned char)__c);
7797 vec_sel(vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7798 return (__a & ~(vector
bool char)__c) | (__b & (vector
bool char)__c);
7802 vector
bool char __b,
7803 vector
bool char __c) {
7804 return (__a & ~__c) | (__b &
__c);
7809 vector
unsigned short __c) {
7810 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7815 vector
bool short __c) {
7816 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7820 vec_sel(vector
unsigned short __a, vector
unsigned short __b,
7821 vector
unsigned short __c) {
7822 return (__a & ~__c) | (__b &
__c);
7826 vec_sel(vector
unsigned short __a, vector
unsigned short __b,
7827 vector
bool short __c) {
7828 return (__a & ~(vector
unsigned short)__c) |
7829 (__b & (vector
unsigned short)__c);
7833 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
7834 return (__a & ~(vector
bool short)__c) | (__b & (vector
bool short)__c);
7838 vec_sel(vector
bool short __a, vector
bool short __b, vector
bool short __c) {
7839 return (__a & ~__c) | (__b &
__c);
7844 vector
unsigned int __c) {
7845 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
7850 vector
bool int __c) {
7851 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
7855 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
7856 return (__a & ~__c) | (__b &
__c);
7860 vec_sel(vector
unsigned int __a, vector
unsigned int __b, vector
bool int __c) {
7861 return (__a & ~(vector
unsigned int)__c) | (__b & (vector
unsigned int)__c);
7865 vec_sel(vector
bool int __a, vector
bool int __b, vector
unsigned int __c) {
7866 return (__a & ~(vector
bool int)__c) | (__b & (vector
bool int)__c);
7870 vector
bool int __b,
7871 vector
bool int __c) {
7872 return (__a & ~__c) | (__b &
__c);
7877 vector
unsigned int __c) {
7878 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
7879 ((vector
int)__b & (vector int)__c);
7880 return (vector
float)__res;
7885 vector
bool int __c) {
7886 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
7887 ((vector
int)__b & (vector int)__c);
7888 return (vector
float)__res;
7893 vec_sel(vector
double __a, vector
double __b, vector
bool long long __c) {
7894 vector
long long __res = ((vector
long long)__a & ~(vector
long long)
__c) |
7895 ((vector
long long)__b & (vector
long long)__c);
7896 return (vector
double)__res;
7900 vec_sel(vector
double __a, vector
double __b, vector
unsigned long long __c) {
7901 vector
long long __res = ((vector
long long)__a & ~(vector
long long)
__c) |
7902 ((vector
long long)__b & (vector
long long)__c);
7903 return (vector
double)__res;
7910 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7911 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7915 vec_vsel(vector
signed char __a, vector
signed char __b, vector
bool char __c) {
7916 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7920 vec_vsel(vector
unsigned char __a, vector
unsigned char __b,
7921 vector
unsigned char __c) {
7922 return (__a & ~__c) | (__b &
__c);
7926 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
7927 return (__a & ~(vector
unsigned char)__c) | (__b & (vector
unsigned char)__c);
7931 vec_vsel(vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7932 return (__a & ~(vector
bool char)__c) | (__b & (vector
bool char)__c);
7936 vector
bool char __b,
7937 vector
bool char __c) {
7938 return (__a & ~__c) | (__b &
__c);
7942 vec_vsel(vector
short __a, vector
short __b, vector
unsigned short __c) {
7943 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7948 vector
bool short __c) {
7949 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7953 vec_vsel(vector
unsigned short __a, vector
unsigned short __b,
7954 vector
unsigned short __c) {
7955 return (__a & ~__c) | (__b &
__c);
7959 vec_vsel(vector
unsigned short __a, vector
unsigned short __b,
7960 vector
bool short __c) {
7961 return (__a & ~(vector
unsigned short)__c) |
7962 (__b & (vector
unsigned short)__c);
7966 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
7967 return (__a & ~(vector
bool short)__c) | (__b & (vector
bool short)__c);
7971 vec_vsel(vector
bool short __a, vector
bool short __b, vector
bool short __c) {
7972 return (__a & ~__c) | (__b &
__c);
7977 vector
unsigned int __c) {
7978 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
7983 vector
bool int __c) {
7984 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
7988 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
7989 return (__a & ~__c) | (__b &
__c);
7993 vector
unsigned int __a, vector
unsigned int __b, vector
bool int __c) {
7994 return (__a & ~(vector
unsigned int)__c) | (__b & (vector
unsigned int)__c);
7998 vec_vsel(vector
bool int __a, vector
bool int __b, vector
unsigned int __c) {
7999 return (__a & ~(vector
bool int)__c) | (__b & (vector
bool int)__c);
8003 vector
bool int __b,
8004 vector
bool int __c) {
8005 return (__a & ~__c) | (__b &
__c);
8010 vector
unsigned int __c) {
8011 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
8012 ((vector
int)__b & (vector int)__c);
8013 return (vector
float)__res;
8018 vector
bool int __c) {
8019 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
8020 ((vector
int)__b & (vector int)__c);
8021 return (vector
float)__res;
8029 vec_sl(vector
unsigned char __a, vector
unsigned char __b) {
8030 return __a << (__b %
8031 (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
8035 vec_sl(vector
signed char __a, vector
unsigned char __b) {
8036 return (vector
signed char)
vec_sl((vector
unsigned char)__a, __b);
8040 vec_sl(vector
unsigned short __a, vector
unsigned short __b) {
8041 return __a << (__b % (vector
unsigned short)(
sizeof(
unsigned short) *
8046 vector
unsigned short __b) {
8047 return (vector
short)
vec_sl((vector
unsigned short)__a, __b);
8051 vec_sl(vector
unsigned int __a, vector
unsigned int __b) {
8052 return __a << (__b %
8053 (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
8057 vector
unsigned int __b) {
8058 return (vector
int)
vec_sl((vector
unsigned int)__a, __b);
8061 #ifdef __POWER8_VECTOR__ 8062 static __inline__ vector
unsigned long long __ATTRS_o_ai 8063 vec_sl(vector
unsigned long long __a, vector
unsigned long long __b) {
8064 return __a << (__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
8069 vec_sl(vector
long long __a, vector
unsigned long long __b) {
8070 return (vector
long long)
vec_sl((vector
unsigned long long)__a, __b);
8076 #define __builtin_altivec_vslb vec_vslb 8079 vec_vslb(vector
signed char __a, vector
unsigned char __b) {
8084 vec_vslb(vector
unsigned char __a, vector
unsigned char __b) {
8090 #define __builtin_altivec_vslh vec_vslh 8093 vec_vslh(vector
short __a, vector
unsigned short __b) {
8098 vec_vslh(vector
unsigned short __a, vector
unsigned short __b) {
8104 #define __builtin_altivec_vslw vec_vslw 8107 vector
unsigned int __b) {
8112 vec_vslw(vector
unsigned int __a, vector
unsigned int __b) {
8118 #define __builtin_altivec_vsldoi_4si vec_sld 8121 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
8122 unsigned char __d = __c & 0x0F;
8123 #ifdef __LITTLE_ENDIAN__ 8125 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8126 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8127 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8128 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8132 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8133 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8134 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8139 vec_sld(vector
unsigned char __a, vector
unsigned char __b,
8140 unsigned const int __c) {
8141 unsigned char __d = __c & 0x0F;
8142 #ifdef __LITTLE_ENDIAN__ 8144 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8145 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8146 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8147 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8151 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8152 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8153 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8158 vec_sld(vector
bool char __a, vector
bool char __b,
unsigned const int __c) {
8159 unsigned char __d = __c & 0x0F;
8160 #ifdef __LITTLE_ENDIAN__ 8162 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8163 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8164 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8165 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8169 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8170 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8171 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8176 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
8177 unsigned char __d = __c & 0x0F;
8178 #ifdef __LITTLE_ENDIAN__ 8180 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8181 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8182 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8183 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8187 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8188 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8189 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8194 vec_sld(vector
unsigned short __a, vector
unsigned short __b,
8195 unsigned const int __c) {
8196 unsigned char __d = __c & 0x0F;
8197 #ifdef __LITTLE_ENDIAN__ 8199 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8200 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8201 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8202 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8206 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8207 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8208 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8213 vec_sld(vector
bool short __a, vector
bool short __b,
unsigned const int __c) {
8214 unsigned char __d = __c & 0x0F;
8215 #ifdef __LITTLE_ENDIAN__ 8217 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8218 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8219 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8220 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8224 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8225 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8226 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8232 unsigned const int __c) {
8233 unsigned char __d = __c & 0x0F;
8234 #ifdef __LITTLE_ENDIAN__ 8236 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8237 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8238 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8239 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8243 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8244 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8245 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8250 vec_sld(vector
signed int __a, vector
signed int __b,
unsigned const int __c) {
8251 unsigned char __d = __c & 0x0F;
8252 #ifdef __LITTLE_ENDIAN__ 8254 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8255 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8256 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8257 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8261 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8262 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8263 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8268 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
8269 unsigned char __d = __c & 0x0F;
8270 #ifdef __LITTLE_ENDIAN__ 8272 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8273 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8274 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8275 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8279 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8280 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8281 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8286 vector
bool int __b,
8287 unsigned const int __c) {
8288 unsigned char __d = __c & 0x0F;
8289 #ifdef __LITTLE_ENDIAN__ 8291 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8292 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8293 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8294 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8298 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8299 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8300 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8306 unsigned const int __c) {
8307 unsigned char __d = __c & 0x0F;
8308 #ifdef __LITTLE_ENDIAN__ 8310 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8311 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8312 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8313 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8317 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8318 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8319 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8325 vec_sld(vector
bool long long __a, vector
bool long long __b,
8326 unsigned const int __c) {
8327 unsigned char __d = __c & 0x0F;
8328 #ifdef __LITTLE_ENDIAN__ 8330 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8331 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8332 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8333 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8337 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8338 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8339 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8344 vec_sld(vector
signed long long __a, vector
signed long long __b,
8345 unsigned const int __c) {
8346 unsigned char __d = __c & 0x0F;
8347 #ifdef __LITTLE_ENDIAN__ 8349 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8350 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8351 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8352 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8356 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8357 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8358 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8362 static __inline__ vector
unsigned long long __ATTRS_o_ai 8363 vec_sld(vector
unsigned long long __a, vector
unsigned long long __b,
8364 unsigned const int __c) {
8365 unsigned char __d = __c & 0x0F;
8366 #ifdef __LITTLE_ENDIAN__ 8368 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8369 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8370 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8371 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8375 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8376 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8377 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8383 unsigned const int __c) {
8384 unsigned char __d = __c & 0x0F;
8385 #ifdef __LITTLE_ENDIAN__ 8387 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8388 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8389 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8390 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8394 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8395 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8396 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8403 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
8404 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8408 vec_sldw(vector
unsigned char __a, vector
unsigned char __b,
8409 unsigned const int __c) {
8410 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8414 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
8415 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8419 vec_sldw(vector
unsigned short __a, vector
unsigned short __b,
8420 unsigned const int __c) {
8421 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8425 vec_sldw(vector
signed int __a, vector
signed int __b,
unsigned const int __c) {
8426 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8430 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
8431 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8436 vec_sldw(vector
signed long long __a, vector
signed long long __b,
8437 unsigned const int __c) {
8438 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8441 static __inline__ vector
unsigned long long __ATTRS_o_ai 8442 vec_sldw(vector
unsigned long long __a, vector
unsigned long long __b,
8443 unsigned const int __c) {
8444 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8448 #ifdef __POWER9_VECTOR__ 8451 vec_slv(vector
unsigned char __a, vector
unsigned char __b) {
8452 return __builtin_altivec_vslv(__a, __b);
8457 vec_srv(vector
unsigned char __a, vector
unsigned char __b) {
8458 return __builtin_altivec_vsrv(__a, __b);
8465 vec_vsldoi(vector
signed char __a, vector
signed char __b,
unsigned char __c) {
8466 unsigned char __d = __c & 0x0F;
8467 #ifdef __LITTLE_ENDIAN__ 8469 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8470 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8471 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8472 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8476 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8477 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8478 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8483 vector
unsigned char __a, vector
unsigned char __b,
unsigned char __c) {
8484 unsigned char __d = __c & 0x0F;
8485 #ifdef __LITTLE_ENDIAN__ 8487 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8488 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8489 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8490 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8494 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8495 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8496 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8502 unsigned char __c) {
8503 unsigned char __d = __c & 0x0F;
8504 #ifdef __LITTLE_ENDIAN__ 8506 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8507 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8508 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8509 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8513 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8514 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8515 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8520 vector
unsigned short __a, vector
unsigned short __b,
unsigned char __c) {
8521 unsigned char __d = __c & 0x0F;
8522 #ifdef __LITTLE_ENDIAN__ 8524 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8525 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8526 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8527 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8531 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8532 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8533 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8539 unsigned char __c) {
8540 unsigned char __d = __c & 0x0F;
8541 #ifdef __LITTLE_ENDIAN__ 8543 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8544 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8545 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8546 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8550 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8551 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8552 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8558 unsigned char __c) {
8559 unsigned char __d = __c & 0x0F;
8560 #ifdef __LITTLE_ENDIAN__ 8562 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8563 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8564 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8565 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8569 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8570 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8571 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8576 vector
unsigned int __a, vector
unsigned int __b,
unsigned char __c) {
8577 unsigned char __d = __c & 0x0F;
8578 #ifdef __LITTLE_ENDIAN__ 8580 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8581 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8582 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8583 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8587 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8588 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8589 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8595 unsigned char __c) {
8596 unsigned char __d = __c & 0x0F;
8597 #ifdef __LITTLE_ENDIAN__ 8599 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8600 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8601 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8602 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8606 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8607 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8608 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8615 vec_sll(vector
signed char __a, vector
unsigned char __b) {
8616 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8621 vec_sll(vector
signed char __a, vector
unsigned short __b) {
8622 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8627 vec_sll(vector
signed char __a, vector
unsigned int __b) {
8628 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8633 vec_sll(vector
unsigned char __a, vector
unsigned char __b) {
8634 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8639 vec_sll(vector
unsigned char __a, vector
unsigned short __b) {
8640 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8645 vec_sll(vector
unsigned char __a, vector
unsigned int __b) {
8646 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8651 vec_sll(vector
bool char __a, vector
unsigned char __b) {
8652 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8657 vec_sll(vector
bool char __a, vector
unsigned short __b) {
8658 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8663 vec_sll(vector
bool char __a, vector
unsigned int __b) {
8664 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8669 vector
unsigned char __b) {
8670 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8674 vector
unsigned short __b) {
8675 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8679 vector
unsigned int __b) {
8680 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8684 vec_sll(vector
unsigned short __a, vector
unsigned char __b) {
8685 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8690 vec_sll(vector
unsigned short __a, vector
unsigned short __b) {
8691 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8696 vec_sll(vector
unsigned short __a, vector
unsigned int __b) {
8697 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8702 vec_sll(vector
bool short __a, vector
unsigned char __b) {
8703 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8708 vec_sll(vector
bool short __a, vector
unsigned short __b) {
8709 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8714 vec_sll(vector
bool short __a, vector
unsigned int __b) {
8715 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8720 vector
unsigned char __b) {
8721 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8725 vector
unsigned short __b) {
8726 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8730 vector
unsigned int __b) {
8731 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8735 vector
unsigned char __b) {
8736 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8740 vector
unsigned short __b) {
8741 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8745 vector
unsigned int __b) {
8746 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8750 vec_sll(vector
unsigned int __a, vector
unsigned char __b) {
8751 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8756 vec_sll(vector
unsigned int __a, vector
unsigned short __b) {
8757 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8762 vec_sll(vector
unsigned int __a, vector
unsigned int __b) {
8763 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8768 vec_sll(vector
bool int __a, vector
unsigned char __b) {
8769 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8774 vec_sll(vector
bool int __a, vector
unsigned short __b) {
8775 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8780 vec_sll(vector
bool int __a, vector
unsigned int __b) {
8781 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8787 vec_sll(vector
signed long long __a, vector
unsigned char __b) {
8788 return (vector
signed long long)__builtin_altivec_vsl((vector
int)__a,
8792 static __inline__ vector
unsigned long long __ATTRS_o_ai 8793 vec_sll(vector
unsigned long long __a, vector
unsigned char __b) {
8794 return (vector
unsigned long long)__builtin_altivec_vsl((vector
int)__a,
8802 vec_vsl(vector
signed char __a, vector
unsigned char __b) {
8803 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8808 vec_vsl(vector
signed char __a, vector
unsigned short __b) {
8809 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8814 vec_vsl(vector
signed char __a, vector
unsigned int __b) {
8815 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8820 vec_vsl(vector
unsigned char __a, vector
unsigned char __b) {
8821 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8826 vec_vsl(vector
unsigned char __a, vector
unsigned short __b) {
8827 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8832 vec_vsl(vector
unsigned char __a, vector
unsigned int __b) {
8833 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8838 vec_vsl(vector
bool char __a, vector
unsigned char __b) {
8839 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8844 vec_vsl(vector
bool char __a, vector
unsigned short __b) {
8845 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8850 vec_vsl(vector
bool char __a, vector
unsigned int __b) {
8851 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8856 vector
unsigned char __b) {
8857 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8861 vector
unsigned short __b) {
8862 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8866 vector
unsigned int __b) {
8867 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8871 vec_vsl(vector
unsigned short __a, vector
unsigned char __b) {
8872 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8877 vec_vsl(vector
unsigned short __a, vector
unsigned short __b) {
8878 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8883 vec_vsl(vector
unsigned short __a, vector
unsigned int __b) {
8884 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8889 vec_vsl(vector
bool short __a, vector
unsigned char __b) {
8890 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8895 vec_vsl(vector
bool short __a, vector
unsigned short __b) {
8896 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8901 vec_vsl(vector
bool short __a, vector
unsigned int __b) {
8902 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8907 vector
unsigned char __b) {
8908 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8912 vector
unsigned short __b) {
8913 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8917 vector
unsigned int __b) {
8918 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8922 vector
unsigned char __b) {
8923 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8927 vector
unsigned short __b) {
8928 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8932 vector
unsigned int __b) {
8933 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8937 vec_vsl(vector
unsigned int __a, vector
unsigned char __b) {
8938 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8943 vec_vsl(vector
unsigned int __a, vector
unsigned short __b) {
8944 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8949 vec_vsl(vector
unsigned int __a, vector
unsigned int __b) {
8950 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8955 vec_vsl(vector
bool int __a, vector
unsigned char __b) {
8956 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8961 vec_vsl(vector
bool int __a, vector
unsigned short __b) {
8962 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8967 vec_vsl(vector
bool int __a, vector
unsigned int __b) {
8968 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8975 vec_slo(vector
signed char __a, vector
signed char __b) {
8976 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
8981 vec_slo(vector
signed char __a, vector
unsigned char __b) {
8982 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
8987 vec_slo(vector
unsigned char __a, vector
signed char __b) {
8988 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
8993 vec_slo(vector
unsigned char __a, vector
unsigned char __b) {
8994 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
8999 vector
signed char __b) {
9000 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9004 vector
unsigned char __b) {
9005 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9009 vec_slo(vector
unsigned short __a, vector
signed char __b) {
9010 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9015 vec_slo(vector
unsigned short __a, vector
unsigned char __b) {
9016 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9021 vector
signed char __b) {
9022 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9026 vector
unsigned char __b) {
9027 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9031 vector
signed char __b) {
9032 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9036 vector
unsigned char __b) {
9037 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9041 vec_slo(vector
unsigned int __a, vector
signed char __b) {
9042 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9047 vec_slo(vector
unsigned int __a, vector
unsigned char __b) {
9048 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9053 vector
signed char __b) {
9054 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9058 vector
unsigned char __b) {
9059 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9064 vec_slo(vector
signed long long __a, vector
signed char __b) {
9065 return (vector
signed long long)__builtin_altivec_vslo((vector
int)__a,
9070 vec_slo(vector
signed long long __a, vector
unsigned char __b) {
9071 return (vector
signed long long)__builtin_altivec_vslo((vector
int)__a,
9075 static __inline__ vector
unsigned long long __ATTRS_o_ai 9076 vec_slo(vector
unsigned long long __a, vector
signed char __b) {
9077 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)__a,
9081 static __inline__ vector
unsigned long long __ATTRS_o_ai 9082 vec_slo(vector
unsigned long long __a, vector
unsigned char __b) {
9083 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)__a,
9091 vec_vslo(vector
signed char __a, vector
signed char __b) {
9092 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
9097 vec_vslo(vector
signed char __a, vector
unsigned char __b) {
9098 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
9103 vec_vslo(vector
unsigned char __a, vector
signed char __b) {
9104 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
9109 vec_vslo(vector
unsigned char __a, vector
unsigned char __b) {
9110 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
9115 vector
signed char __b) {
9116 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9120 vector
unsigned char __b) {
9121 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9125 vec_vslo(vector
unsigned short __a, vector
signed char __b) {
9126 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9131 vec_vslo(vector
unsigned short __a, vector
unsigned char __b) {
9132 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9137 vector
signed char __b) {
9138 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9142 vector
unsigned char __b) {
9143 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9147 vector
signed char __b) {
9148 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9152 vector
unsigned char __b) {
9153 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9157 vec_vslo(vector
unsigned int __a, vector
signed char __b) {
9158 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9163 vec_vslo(vector
unsigned int __a, vector
unsigned char __b) {
9164 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9169 vector
signed char __b) {
9170 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9174 vector
unsigned char __b) {
9175 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9182 return vec_perm(__a, __a, (vector
unsigned char)(__b & 0x0F));
9186 vec_splat(vector
unsigned char __a,
unsigned const int __b) {
9187 return vec_perm(__a, __a, (vector
unsigned char)(__b & 0x0F));
9192 return vec_perm(__a, __a, (vector
unsigned char)(__b & 0x0F));
9196 vec_splat(vector
signed short __a,
unsigned const int __b) {
9197 unsigned char b0 = (__b & 0x07) * 2;
9198 unsigned char b1 = b0 + 1;
9200 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9201 b0, b1, b0, b1, b0, b1));
9205 vec_splat(vector
unsigned short __a,
unsigned const int __b) {
9206 unsigned char b0 = (__b & 0x07) * 2;
9207 unsigned char b1 = b0 + 1;
9209 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9210 b0, b1, b0, b1, b0, b1));
9215 unsigned char b0 = (__b & 0x07) * 2;
9216 unsigned char b1 = b0 + 1;
9218 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9219 b0, b1, b0, b1, b0, b1));
9223 unsigned const int __b) {
9224 unsigned char b0 = (__b & 0x07) * 2;
9225 unsigned char b1 = b0 + 1;
9227 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9228 b0, b1, b0, b1, b0, b1));
9233 unsigned char b0 = (__b & 0x03) * 4;
9234 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9236 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9237 b2, b3, b0, b1, b2, b3));
9241 vec_splat(vector
unsigned int __a,
unsigned const int __b) {
9242 unsigned char b0 = (__b & 0x03) * 4;
9243 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9245 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9246 b2, b3, b0, b1, b2, b3));
9251 unsigned char b0 = (__b & 0x03) * 4;
9252 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9254 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9255 b2, b3, b0, b1, b2, b3));
9259 unsigned const int __b) {
9260 unsigned char b0 = (__b & 0x03) * 4;
9261 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9263 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9264 b2, b3, b0, b1, b2, b3));
9269 unsigned const int __b) {
9270 unsigned char b0 = (__b & 0x01) * 8;
9271 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9272 b6 = b0 + 6, b7 = b0 + 7;
9274 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9275 b2, b3, b4, b5, b6, b7));
9278 vec_splat(vector
bool long long __a,
unsigned const int __b) {
9279 unsigned char b0 = (__b & 0x01) * 8;
9280 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9281 b6 = b0 + 6, b7 = b0 + 7;
9283 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9284 b2, b3, b4, b5, b6, b7));
9287 vec_splat(vector
signed long long __a,
unsigned const int __b) {
9288 unsigned char b0 = (__b & 0x01) * 8;
9289 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9290 b6 = b0 + 6, b7 = b0 + 7;
9292 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9293 b2, b3, b4, b5, b6, b7));
9295 static __inline__ vector
unsigned long long __ATTRS_o_ai 9296 vec_splat(vector
unsigned long long __a,
unsigned const int __b) {
9297 unsigned char b0 = (__b & 0x01) * 8;
9298 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9299 b6 = b0 + 6, b7 = b0 + 7;
9301 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9302 b2, b3, b4, b5, b6, b7));
9308 #define __builtin_altivec_vspltb vec_vspltb 9312 return vec_perm(__a, __a, (vector
unsigned char)(__b));
9317 return vec_perm(__a, __a, (vector
unsigned char)(__b));
9321 unsigned char __b) {
9322 return vec_perm(__a, __a, (vector
unsigned char)(__b));
9327 #define __builtin_altivec_vsplth vec_vsplth 9330 unsigned char __b) {
9332 unsigned char b1 = __b + 1;
9334 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9335 __b, b1, __b, b1, __b, b1, __b, b1));
9341 unsigned char b1 = __b + 1;
9343 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9344 __b, b1, __b, b1, __b, b1, __b, b1));
9350 unsigned char b1 = __b + 1;
9352 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9353 __b, b1, __b, b1, __b, b1, __b, b1));
9357 unsigned char __b) {
9359 unsigned char b1 = __b + 1;
9361 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9362 __b, b1, __b, b1, __b, b1, __b, b1));
9367 #define __builtin_altivec_vspltw vec_vspltw 9370 unsigned char __b) {
9372 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9374 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9375 b1, b2, b3, __b, b1, b2, b3));
9381 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9383 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9384 b1, b2, b3, __b, b1, b2, b3));
9388 unsigned char __b) {
9390 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9392 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9393 b1, b2, b3, __b, b1, b2, b3));
9397 unsigned char __b) {
9399 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9401 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9402 b1, b2, b3, __b, b1, b2, b3));
9407 #define __builtin_altivec_vspltisb vec_splat_s8 9412 return (vector
signed char)(
__a);
9420 return (vector
signed char)(
__a);
9425 #define __builtin_altivec_vspltish vec_splat_s16 9429 return (vector
short)(
__a);
9436 return (vector
short)(
__a);
9441 #define __builtin_altivec_vspltisw vec_splat_s32 9445 return (vector
int)(
__a);
9452 return (vector
int)(
__a);
9460 return (vector
unsigned char)(
__a);
9468 return (vector
unsigned short)(
__a);
9476 return (vector
unsigned int)(
__a);
9484 vec_sr(vector
unsigned char __a, vector
unsigned char __b) {
9486 (__b % (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
9490 vec_sr(vector
signed char __a, vector
unsigned char __b) {
9491 return (vector
signed char)
vec_sr((vector
unsigned char)__a, __b);
9495 vec_sr(vector
unsigned short __a, vector
unsigned short __b) {
9497 (__b % (vector
unsigned short)(
sizeof(
unsigned short) * __CHAR_BIT__));
9501 vector
unsigned short __b) {
9502 return (vector
short)
vec_sr((vector
unsigned short)__a, __b);
9506 vec_sr(vector
unsigned int __a, vector
unsigned int __b) {
9508 (__b % (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
9512 vector
unsigned int __b) {
9513 return (vector
int)
vec_sr((vector
unsigned int)__a, __b);
9516 #ifdef __POWER8_VECTOR__ 9517 static __inline__ vector
unsigned long long __ATTRS_o_ai 9518 vec_sr(vector
unsigned long long __a, vector
unsigned long long __b) {
9519 return __a >> (__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
9524 vec_sr(vector
long long __a, vector
unsigned long long __b) {
9525 return (vector
long long)
vec_sr((vector
unsigned long long)__a, __b);
9531 #define __builtin_altivec_vsrb vec_vsrb 9534 vec_vsrb(vector
signed char __a, vector
unsigned char __b) {
9539 vec_vsrb(vector
unsigned char __a, vector
unsigned char __b) {
9545 #define __builtin_altivec_vsrh vec_vsrh 9548 vec_vsrh(vector
short __a, vector
unsigned short __b) {
9553 vec_vsrh(vector
unsigned short __a, vector
unsigned short __b) {
9559 #define __builtin_altivec_vsrw vec_vsrw 9562 vector
unsigned int __b) {
9567 vec_vsrw(vector
unsigned int __a, vector
unsigned int __b) {
9574 vec_sra(vector
signed char __a, vector
unsigned char __b) {
9575 return (vector
signed char)__builtin_altivec_vsrab((vector
char)__a, __b);
9579 vec_sra(vector
unsigned char __a, vector
unsigned char __b) {
9580 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)__a, __b);
9584 vector
unsigned short __b) {
9585 return __builtin_altivec_vsrah(__a, (vector
unsigned short)__b);
9589 vec_sra(vector
unsigned short __a, vector
unsigned short __b) {
9590 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)__a, __b);
9594 vector
unsigned int __b) {
9595 return __builtin_altivec_vsraw(__a, __b);
9599 vec_sra(vector
unsigned int __a, vector
unsigned int __b) {
9600 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)__a, __b);
9603 #ifdef __POWER8_VECTOR__ 9605 vec_sra(vector
signed long long __a, vector
unsigned long long __b) {
9609 static __inline__ vector
unsigned long long __ATTRS_o_ai 9610 vec_sra(vector
unsigned long long __a, vector
unsigned long long __b) {
9611 return (vector
unsigned long long)((vector
signed long long)__a >> __b);
9618 vec_vsrab(vector
signed char __a, vector
unsigned char __b) {
9619 return (vector
signed char)__builtin_altivec_vsrab((vector
char)__a, __b);
9623 vec_vsrab(vector
unsigned char __a, vector
unsigned char __b) {
9624 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)__a, __b);
9631 return __builtin_altivec_vsrah(__a, (vector
unsigned short)__b);
9635 vec_vsrah(vector
unsigned short __a, vector
unsigned short __b) {
9636 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)__a, __b);
9642 vector
unsigned int __b) {
9643 return __builtin_altivec_vsraw(__a, __b);
9647 vec_vsraw(vector
unsigned int __a, vector
unsigned int __b) {
9648 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)__a, __b);
9654 vec_srl(vector
signed char __a, vector
unsigned char __b) {
9655 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9660 vec_srl(vector
signed char __a, vector
unsigned short __b) {
9661 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9666 vec_srl(vector
signed char __a, vector
unsigned int __b) {
9667 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9672 vec_srl(vector
unsigned char __a, vector
unsigned char __b) {
9673 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9678 vec_srl(vector
unsigned char __a, vector
unsigned short __b) {
9679 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9684 vec_srl(vector
unsigned char __a, vector
unsigned int __b) {
9685 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9690 vec_srl(vector
bool char __a, vector
unsigned char __b) {
9691 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9696 vec_srl(vector
bool char __a, vector
unsigned short __b) {
9697 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9702 vec_srl(vector
bool char __a, vector
unsigned int __b) {
9703 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9708 vector
unsigned char __b) {
9709 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9713 vector
unsigned short __b) {
9714 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9718 vector
unsigned int __b) {
9719 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9723 vec_srl(vector
unsigned short __a, vector
unsigned char __b) {
9724 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9729 vec_srl(vector
unsigned short __a, vector
unsigned short __b) {
9730 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9735 vec_srl(vector
unsigned short __a, vector
unsigned int __b) {
9736 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9741 vec_srl(vector
bool short __a, vector
unsigned char __b) {
9742 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9747 vec_srl(vector
bool short __a, vector
unsigned short __b) {
9748 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9753 vec_srl(vector
bool short __a, vector
unsigned int __b) {
9754 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9759 vector
unsigned char __b) {
9760 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9764 vector
unsigned short __b) {
9765 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9769 vector
unsigned int __b) {
9770 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9774 vector
unsigned char __b) {
9775 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9779 vector
unsigned short __b) {
9780 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9784 vector
unsigned int __b) {
9785 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9789 vec_srl(vector
unsigned int __a, vector
unsigned char __b) {
9790 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9795 vec_srl(vector
unsigned int __a, vector
unsigned short __b) {
9796 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9801 vec_srl(vector
unsigned int __a, vector
unsigned int __b) {
9802 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9807 vec_srl(vector
bool int __a, vector
unsigned char __b) {
9808 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
9813 vec_srl(vector
bool int __a, vector
unsigned short __b) {
9814 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
9819 vec_srl(vector
bool int __a, vector
unsigned int __b) {
9820 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
9826 vec_srl(vector
signed long long __a, vector
unsigned char __b) {
9827 return (vector
signed long long)__builtin_altivec_vsr((vector
int)__a,
9831 static __inline__ vector
unsigned long long __ATTRS_o_ai 9832 vec_srl(vector
unsigned long long __a, vector
unsigned char __b) {
9833 return (vector
unsigned long long)__builtin_altivec_vsr((vector
int)__a,
9841 vec_vsr(vector
signed char __a, vector
unsigned char __b) {
9842 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9847 vec_vsr(vector
signed char __a, vector
unsigned short __b) {
9848 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9853 vec_vsr(vector
signed char __a, vector
unsigned int __b) {
9854 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9859 vec_vsr(vector
unsigned char __a, vector
unsigned char __b) {
9860 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9865 vec_vsr(vector
unsigned char __a, vector
unsigned short __b) {
9866 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9871 vec_vsr(vector
unsigned char __a, vector
unsigned int __b) {
9872 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9877 vec_vsr(vector
bool char __a, vector
unsigned char __b) {
9878 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9883 vec_vsr(vector
bool char __a, vector
unsigned short __b) {
9884 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9889 vec_vsr(vector
bool char __a, vector
unsigned int __b) {
9890 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9895 vector
unsigned char __b) {
9896 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9900 vector
unsigned short __b) {
9901 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9905 vector
unsigned int __b) {
9906 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9910 vec_vsr(vector
unsigned short __a, vector
unsigned char __b) {
9911 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9916 vec_vsr(vector
unsigned short __a, vector
unsigned short __b) {
9917 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9922 vec_vsr(vector
unsigned short __a, vector
unsigned int __b) {
9923 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9928 vec_vsr(vector
bool short __a, vector
unsigned char __b) {
9929 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9934 vec_vsr(vector
bool short __a, vector
unsigned short __b) {
9935 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9940 vec_vsr(vector
bool short __a, vector
unsigned int __b) {
9941 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9946 vector
unsigned char __b) {
9947 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9951 vector
unsigned short __b) {
9952 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9956 vector
unsigned int __b) {
9957 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9961 vector
unsigned char __b) {
9962 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9966 vector
unsigned short __b) {
9967 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9971 vector
unsigned int __b) {
9972 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9976 vec_vsr(vector
unsigned int __a, vector
unsigned char __b) {
9977 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9982 vec_vsr(vector
unsigned int __a, vector
unsigned short __b) {
9983 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9988 vec_vsr(vector
unsigned int __a, vector
unsigned int __b) {
9989 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9994 vec_vsr(vector
bool int __a, vector
unsigned char __b) {
9995 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
10000 vec_vsr(vector
bool int __a, vector
unsigned short __b) {
10001 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
10006 vec_vsr(vector
bool int __a, vector
unsigned int __b) {
10007 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
10014 vec_sro(vector
signed char __a, vector
signed char __b) {
10015 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10020 vec_sro(vector
signed char __a, vector
unsigned char __b) {
10021 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10026 vec_sro(vector
unsigned char __a, vector
signed char __b) {
10027 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10032 vec_sro(vector
unsigned char __a, vector
unsigned char __b) {
10033 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10038 vector
signed char __b) {
10039 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10043 vector
unsigned char __b) {
10044 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10048 vec_sro(vector
unsigned short __a, vector
signed char __b) {
10049 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10054 vec_sro(vector
unsigned short __a, vector
unsigned char __b) {
10055 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10060 vector
signed char __b) {
10061 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10065 vector
unsigned char __b) {
10066 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10070 vector
signed char __b) {
10071 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10075 vector
unsigned char __b) {
10076 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10080 vec_sro(vector
unsigned int __a, vector
signed char __b) {
10081 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10086 vec_sro(vector
unsigned int __a, vector
unsigned char __b) {
10087 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10092 vector
signed char __b) {
10093 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10097 vector
unsigned char __b) {
10098 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10102 static __inline__ vector
signed long long __ATTRS_o_ai 10103 vec_sro(vector
signed long long __a, vector
signed char __b) {
10104 return (vector
signed long long)__builtin_altivec_vsro((vector
int)__a,
10108 static __inline__ vector
signed long long __ATTRS_o_ai 10109 vec_sro(vector
signed long long __a, vector
unsigned char __b) {
10110 return (vector
signed long long)__builtin_altivec_vsro((vector
int)__a,
10114 static __inline__ vector
unsigned long long __ATTRS_o_ai 10115 vec_sro(vector
unsigned long long __a, vector
signed char __b) {
10116 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)__a,
10120 static __inline__ vector
unsigned long long __ATTRS_o_ai 10121 vec_sro(vector
unsigned long long __a, vector
unsigned char __b) {
10122 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)__a,
10131 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10136 vec_vsro(vector
signed char __a, vector
unsigned char __b) {
10137 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10142 vec_vsro(vector
unsigned char __a, vector
signed char __b) {
10143 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10148 vec_vsro(vector
unsigned char __a, vector
unsigned char __b) {
10149 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10154 vector
signed char __b) {
10155 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10159 vector
unsigned char __b) {
10160 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10164 vec_vsro(vector
unsigned short __a, vector
signed char __b) {
10165 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10170 vec_vsro(vector
unsigned short __a, vector
unsigned char __b) {
10171 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10176 vector
signed char __b) {
10177 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10181 vector
unsigned char __b) {
10182 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10186 vector
signed char __b) {
10187 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10191 vector
unsigned char __b) {
10192 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10196 vec_vsro(vector
unsigned int __a, vector
signed char __b) {
10197 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10202 vec_vsro(vector
unsigned int __a, vector
unsigned char __b) {
10203 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10208 vector
signed char __b) {
10209 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10213 vector
unsigned char __b) {
10214 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10220 vector
signed char *__c) {
10221 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10225 signed char *__c) {
10226 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10230 vector
unsigned char *__c) {
10231 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10235 unsigned char *__c) {
10236 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10240 signed char *__c) {
10241 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10245 unsigned char *__c) {
10246 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10250 vector
bool char *__c) {
10251 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10255 vector
short *__c) {
10256 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10261 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10265 vector
unsigned short *__c) {
10266 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10270 unsigned short *__c) {
10271 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10276 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10280 unsigned short *__c) {
10281 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10285 vector
bool short *__c) {
10286 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10291 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10295 unsigned short *__c) {
10296 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10300 vector pixel *__c) {
10301 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10306 __builtin_altivec_stvx(__a, __b, __c);
10310 __builtin_altivec_stvx(__a, __b, __c);
10314 vector
unsigned int *__c) {
10315 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10319 unsigned int *__c) {
10320 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10325 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10329 unsigned int *__c) {
10330 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10334 vector
bool int *__c) {
10335 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10339 vector
float *__c) {
10340 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10345 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10351 vector
signed char *__c) {
10352 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10356 signed char *__c) {
10357 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10361 vector
unsigned char *__c) {
10362 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10366 unsigned char *__c) {
10367 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10371 signed char *__c) {
10372 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10376 unsigned char *__c) {
10377 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10381 vector
bool char *__c) {
10382 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10386 vector
short *__c) {
10387 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10392 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10396 vector
unsigned short *__c) {
10397 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10401 unsigned short *__c) {
10402 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10407 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10411 unsigned short *__c) {
10412 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10416 vector
bool short *__c) {
10417 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10422 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10426 unsigned short *__c) {
10427 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10431 vector pixel *__c) {
10432 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10437 __builtin_altivec_stvx(__a, __b, __c);
10442 __builtin_altivec_stvx(__a, __b, __c);
10446 vector
unsigned int *__c) {
10447 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10451 unsigned int *__c) {
10452 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10457 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10461 unsigned int *__c) {
10462 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10466 vector
bool int *__c) {
10467 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10471 vector
float *__c) {
10472 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10477 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10483 signed char *__c) {
10484 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10488 unsigned char *__c) {
10489 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10493 signed char *__c) {
10494 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10498 unsigned char *__c) {
10499 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10504 __builtin_altivec_stvehx(__a, __b, __c);
10508 unsigned short *__c) {
10509 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10514 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10518 unsigned short *__c) {
10519 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10524 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10528 unsigned short *__c) {
10529 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10533 __builtin_altivec_stvewx(__a, __b, __c);
10537 unsigned int *__c) {
10538 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10543 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10547 unsigned int *__c) {
10548 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10553 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10559 signed char *__c) {
10560 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10564 int __b,
unsigned char *__c) {
10565 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10569 signed char *__c) {
10570 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10574 unsigned char *__c) {
10575 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10582 __builtin_altivec_stvehx(__a, __b, __c);
10586 int __b,
unsigned short *__c) {
10587 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10592 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10596 unsigned short *__c) {
10597 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10602 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10606 unsigned short *__c) {
10607 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10614 __builtin_altivec_stvewx(__a, __b, __c);
10618 unsigned int *__c) {
10619 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10624 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10628 unsigned int *__c) {
10629 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10634 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10640 vector
signed char *__c) {
10641 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10645 signed char *__c) {
10646 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10650 vector
unsigned char *__c) {
10651 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10655 unsigned char *__c) {
10656 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10660 signed char *__c) {
10661 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10665 unsigned char *__c) {
10666 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10670 vector
bool char *__c) {
10671 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10675 vector
short *__c) {
10676 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10681 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10685 vector
unsigned short *__c) {
10686 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10690 unsigned short *__c) {
10691 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10696 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10700 unsigned short *__c) {
10701 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10705 vector
bool short *__c) {
10706 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10711 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10715 unsigned short *__c) {
10716 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10720 vector pixel *__c) {
10721 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10726 __builtin_altivec_stvxl(__a, __b, __c);
10730 __builtin_altivec_stvxl(__a, __b, __c);
10734 vector
unsigned int *__c) {
10735 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10739 unsigned int *__c) {
10740 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10745 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10749 unsigned int *__c) {
10750 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10754 vector
bool int *__c) {
10755 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10759 vector
float *__c) {
10760 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10765 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10771 vector
signed char *__c) {
10772 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10776 signed char *__c) {
10777 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10781 vector
unsigned char *__c) {
10782 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10786 unsigned char *__c) {
10787 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10791 signed char *__c) {
10792 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10796 unsigned char *__c) {
10797 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10801 vector
bool char *__c) {
10802 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10806 vector
short *__c) {
10807 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10812 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10817 vector
unsigned short *__c) {
10818 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10822 int __b,
unsigned short *__c) {
10823 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10828 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10832 unsigned short *__c) {
10833 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10837 vector
bool short *__c) {
10838 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10843 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10847 unsigned short *__c) {
10848 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10852 vector pixel *__c) {
10853 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10858 __builtin_altivec_stvxl(__a, __b, __c);
10863 __builtin_altivec_stvxl(__a, __b, __c);
10867 vector
unsigned int *__c) {
10868 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10872 unsigned int *__c) {
10873 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10878 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10882 unsigned int *__c) {
10883 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10887 vector
bool int *__c) {
10888 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10892 vector
float *__c) {
10893 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10898 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10904 vec_sub(vector
signed char __a, vector
signed char __b) {
10909 vec_sub(vector
bool char __a, vector
signed char __b) {
10910 return (vector
signed char)__a -
__b;
10914 vec_sub(vector
signed char __a, vector
bool char __b) {
10915 return __a - (vector
signed char)__b;
10919 vec_sub(vector
unsigned char __a, vector
unsigned char __b) {
10924 vec_sub(vector
bool char __a, vector
unsigned char __b) {
10925 return (vector
unsigned char)__a -
__b;
10929 vec_sub(vector
unsigned char __a, vector
bool char __b) {
10930 return __a - (vector
unsigned char)__b;
10934 vector
short __b) {
10939 vector
short __b) {
10940 return (vector
short)__a -
__b;
10944 vector
bool short __b) {
10945 return __a - (vector short)__b;
10949 vec_sub(vector
unsigned short __a, vector
unsigned short __b) {
10954 vec_sub(vector
bool short __a, vector
unsigned short __b) {
10955 return (vector
unsigned short)__a -
__b;
10959 vec_sub(vector
unsigned short __a, vector
bool short __b) {
10960 return __a - (vector
unsigned short)__b;
10970 return (vector
int)__a -
__b;
10974 vector
bool int __b) {
10975 return __a - (vector int)__b;
10979 vec_sub(vector
unsigned int __a, vector
unsigned int __b) {
10984 vec_sub(vector
bool int __a, vector
unsigned int __b) {
10985 return (vector
unsigned int)__a -
__b;
10989 vec_sub(vector
unsigned int __a, vector
bool int __b) {
10990 return __a - (vector
unsigned int)__b;
10993 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 10995 vec_sub(vector
signed __int128 __a, vector
signed __int128 __b) {
10999 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11000 vec_sub(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11003 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11006 static __inline__ vector
signed long long __ATTRS_o_ai 11007 vec_sub(vector
signed long long __a, vector
signed long long __b) {
11011 static __inline__ vector
unsigned long long __ATTRS_o_ai 11012 vec_sub(vector
unsigned long long __a, vector
unsigned long long __b) {
11017 vector
double __b) {
11023 vector
float __b) {
11029 #define __builtin_altivec_vsububm vec_vsububm 11038 return (vector
signed char)__a -
__b;
11043 return __a - (vector
signed char)__b;
11053 return (vector
unsigned char)__a -
__b;
11058 return __a - (vector
unsigned char)__b;
11063 #define __builtin_altivec_vsubuhm vec_vsubuhm 11066 vector
short __b) {
11071 vector
short __b) {
11072 return (vector
short)__a -
__b;
11076 vector
bool short __b) {
11077 return __a - (vector short)__b;
11087 return (vector
unsigned short)__a -
__b;
11092 return __a - (vector
unsigned short)__b;
11097 #define __builtin_altivec_vsubuwm vec_vsubuwm 11106 return (vector
int)__a -
__b;
11110 vector
bool int __b) {
11111 return __a - (vector int)__b;
11121 return (vector
unsigned int)__a -
__b;
11126 return __a - (vector
unsigned int)__b;
11131 #define __builtin_altivec_vsubfp vec_vsubfp 11133 static __inline__ vector
float __attribute__((__always_inline__))
11134 vec_vsubfp(vector
float __a, vector
float __b) {
11142 return (vector
signed int)__builtin_altivec_vsubcuw((vector
unsigned int)__a,
11143 (vector
unsigned int) __b);
11147 vec_subc(vector
unsigned int __a, vector
unsigned int __b) {
11148 return __builtin_altivec_vsubcuw(__a, __b);
11151 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11152 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11153 vec_subc(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11154 return __builtin_altivec_vsubcuq(__a, __b);
11158 vec_subc(vector
signed __int128 __a, vector
signed __int128 __b) {
11159 return __builtin_altivec_vsubcuq(__a, __b);
11161 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11165 static __inline__ vector
unsigned int __attribute__((__always_inline__))
11166 vec_vsubcuw(vector
unsigned int __a, vector
unsigned int __b) {
11167 return __builtin_altivec_vsubcuw(__a, __b);
11174 return __builtin_altivec_vsubsbs(__a, __b);
11179 return __builtin_altivec_vsubsbs((vector
signed char)__a, __b);
11184 return __builtin_altivec_vsubsbs(__a, (vector
signed char)__b);
11188 vec_subs(vector
unsigned char __a, vector
unsigned char __b) {
11189 return __builtin_altivec_vsububs(__a, __b);
11194 return __builtin_altivec_vsububs((vector
unsigned char)__a, __b);
11199 return __builtin_altivec_vsububs(__a, (vector
unsigned char)__b);
11203 vector
short __b) {
11204 return __builtin_altivec_vsubshs(__a, __b);
11208 vector
short __b) {
11209 return __builtin_altivec_vsubshs((vector
short)__a, __b);
11213 vector
bool short __b) {
11214 return __builtin_altivec_vsubshs(__a, (vector
short)__b);
11218 vec_subs(vector
unsigned short __a, vector
unsigned short __b) {
11219 return __builtin_altivec_vsubuhs(__a, __b);
11223 vec_subs(vector
bool short __a, vector
unsigned short __b) {
11224 return __builtin_altivec_vsubuhs((vector
unsigned short)__a, __b);
11228 vec_subs(vector
unsigned short __a, vector
bool short __b) {
11229 return __builtin_altivec_vsubuhs(__a, (vector
unsigned short)__b);
11234 return __builtin_altivec_vsubsws(__a, __b);
11239 return __builtin_altivec_vsubsws((vector
int)__a, __b);
11243 vector
bool int __b) {
11244 return __builtin_altivec_vsubsws(__a, (vector
int)__b);
11248 vec_subs(vector
unsigned int __a, vector
unsigned int __b) {
11249 return __builtin_altivec_vsubuws(__a, __b);
11254 return __builtin_altivec_vsubuws((vector
unsigned int)__a, __b);
11259 return __builtin_altivec_vsubuws(__a, (vector
unsigned int)__b);
11266 return __builtin_altivec_vsubsbs(__a, __b);
11271 return __builtin_altivec_vsubsbs((vector
signed char)__a, __b);
11276 return __builtin_altivec_vsubsbs(__a, (vector
signed char)__b);
11283 return __builtin_altivec_vsububs(__a, __b);
11288 return __builtin_altivec_vsububs((vector
unsigned char)__a, __b);
11293 return __builtin_altivec_vsububs(__a, (vector
unsigned char)__b);
11299 vector
short __b) {
11300 return __builtin_altivec_vsubshs(__a, __b);
11304 vector
short __b) {
11305 return __builtin_altivec_vsubshs((vector
short)__a, __b);
11309 vector
bool short __b) {
11310 return __builtin_altivec_vsubshs(__a, (vector
short)__b);
11317 return __builtin_altivec_vsubuhs(__a, __b);
11322 return __builtin_altivec_vsubuhs((vector
unsigned short)__a, __b);
11327 return __builtin_altivec_vsubuhs(__a, (vector
unsigned short)__b);
11334 return __builtin_altivec_vsubsws(__a, __b);
11339 return __builtin_altivec_vsubsws((vector
int)__a, __b);
11343 vector
bool int __b) {
11344 return __builtin_altivec_vsubsws(__a, (vector
int)__b);
11351 return __builtin_altivec_vsubuws(__a, __b);
11356 return __builtin_altivec_vsubuws((vector
unsigned int)__a, __b);
11361 return __builtin_altivec_vsubuws(__a, (vector
unsigned int)__b);
11364 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11368 vec_vsubuqm(vector
signed __int128 __a, vector
signed __int128 __b) {
11372 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11373 vec_vsubuqm(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11381 vec_vsubeuqm(vector
signed __int128 __a, vector
signed __int128 __b,
11382 vector
signed __int128 __c) {
11383 return __builtin_altivec_vsubeuqm(__a, __b, __c);
11386 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11387 vec_vsubeuqm(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11388 vector
unsigned __int128 __c) {
11389 return __builtin_altivec_vsubeuqm(__a, __b, __c);
11393 vec_sube(vector
signed __int128 __a, vector
signed __int128 __b,
11394 vector
signed __int128 __c) {
11395 return __builtin_altivec_vsubeuqm(__a, __b, __c);
11398 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11399 vec_sube(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11400 vector
unsigned __int128 __c) {
11401 return __builtin_altivec_vsubeuqm(__a, __b, __c);
11407 vec_vsubcuq(vector
signed __int128 __a, vector
signed __int128 __b) {
11408 return __builtin_altivec_vsubcuq(__a, __b);
11411 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11412 vec_vsubcuq(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11413 return __builtin_altivec_vsubcuq(__a, __b);
11419 vec_vsubecuq(vector
signed __int128 __a, vector
signed __int128 __b,
11420 vector
signed __int128 __c) {
11421 return __builtin_altivec_vsubecuq(__a, __b, __c);
11424 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11425 vec_vsubecuq(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11426 vector
unsigned __int128 __c) {
11427 return __builtin_altivec_vsubecuq(__a, __b, __c);
11431 vec_subec(vector
signed int __a, vector
signed int __b,
11432 vector
signed int __c) {
11433 return vec_addec(__a, ~__b, __c);
11437 vec_subec(vector
unsigned int __a, vector
unsigned int __b,
11438 vector
unsigned int __c) {
11439 return vec_addec(__a, ~__b, __c);
11443 vec_subec(vector
signed __int128 __a, vector
signed __int128 __b,
11444 vector
signed __int128 __c) {
11445 return __builtin_altivec_vsubecuq(__a, __b, __c);
11448 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11449 vec_subec(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11450 vector
unsigned __int128 __c) {
11451 return __builtin_altivec_vsubecuq(__a, __b, __c);
11453 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11457 vector
signed int __c) {
11458 vector
signed int __mask = {1, 1, 1, 1};
11459 vector
signed int __carry = __c &
__mask;
11460 return vec_adde(__a, ~__b, __carry);
11465 vector
unsigned int __c) {
11466 vector
unsigned int __mask = {1, 1, 1, 1};
11467 vector
unsigned int __carry = __c &
__mask;
11468 return vec_adde(__a, ~__b, __carry);
11474 return __builtin_altivec_vsum4sbs(__a, __b);
11479 return __builtin_altivec_vsum4ubs(__a, __b);
11484 return __builtin_altivec_vsum4shs(__a, __b);
11489 static __inline__ vector
int __attribute__((__always_inline__))
11490 vec_vsum4sbs(vector
signed char __a, vector
int __b) {
11491 return __builtin_altivec_vsum4sbs(__a, __b);
11496 static __inline__ vector
unsigned int __attribute__((__always_inline__))
11497 vec_vsum4ubs(vector
unsigned char __a, vector
unsigned int __b) {
11498 return __builtin_altivec_vsum4ubs(__a, __b);
11503 static __inline__ vector
int __attribute__((__always_inline__))
11504 vec_vsum4shs(vector
signed short __a, vector
int __b) {
11505 return __builtin_altivec_vsum4shs(__a, __b);
11516 static __inline__ vector
signed int __attribute__((__always_inline__))
11517 vec_sum2s(vector
int __a, vector
int __b) {
11518 #ifdef __LITTLE_ENDIAN__ 11519 vector
int __c = (vector
signed int)
vec_perm(
11520 __b, __b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11522 __c = __builtin_altivec_vsum2sws(__a, __c);
11523 return (vector
signed int)
vec_perm(
11524 __c, __c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11527 return __builtin_altivec_vsum2sws(__a, __b);
11533 static __inline__ vector
signed int __attribute__((__always_inline__))
11534 vec_vsum2sws(vector
int __a, vector
int __b) {
11535 #ifdef __LITTLE_ENDIAN__ 11536 vector
int __c = (vector
signed int)
vec_perm(
11537 __b, __b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11539 __c = __builtin_altivec_vsum2sws(__a, __c);
11540 return (vector
signed int)
vec_perm(
11541 __c, __c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11544 return __builtin_altivec_vsum2sws(__a, __b);
11556 static __inline__ vector
signed int __attribute__((__always_inline__))
11557 vec_sums(vector
signed int __a, vector
signed int __b) {
11558 #ifdef __LITTLE_ENDIAN__ 11559 __b = (vector
signed int)
vec_splat(__b, 3);
11560 __b = __builtin_altivec_vsumsws(__a, __b);
11561 return (vector
signed int)(0, 0, 0, __b[0]);
11563 return __builtin_altivec_vsumsws(__a, __b);
11569 static __inline__ vector
signed int __attribute__((__always_inline__))
11570 vec_vsumsws(vector
signed int __a, vector
signed int __b) {
11571 #ifdef __LITTLE_ENDIAN__ 11572 __b = (vector
signed int)
vec_splat(__b, 3);
11573 __b = __builtin_altivec_vsumsws(__a, __b);
11574 return (vector
signed int)(0, 0, 0, __b[0]);
11576 return __builtin_altivec_vsumsws(__a, __b);
11584 return __builtin_vsx_xvrspiz(__a);
11586 return __builtin_altivec_vrfiz(__a);
11592 return __builtin_vsx_xvrdpiz(__a);
11598 static __inline__ vector
float __attribute__((__always_inline__))
11599 vec_vrfiz(vector
float __a) {
11600 return __builtin_altivec_vrfiz(__a);
11610 #ifdef __LITTLE_ENDIAN__ 11611 return __builtin_altivec_vupklsb((vector
char)__a);
11613 return __builtin_altivec_vupkhsb((vector
char)__a);
11619 #ifdef __LITTLE_ENDIAN__ 11620 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11622 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11627 #ifdef __LITTLE_ENDIAN__ 11628 return __builtin_altivec_vupklsh(__a);
11630 return __builtin_altivec_vupkhsh(__a);
11636 #ifdef __LITTLE_ENDIAN__ 11637 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11639 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11645 #ifdef __LITTLE_ENDIAN__ 11646 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11648 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11652 #ifdef __POWER8_VECTOR__ 11654 #ifdef __LITTLE_ENDIAN__ 11655 return __builtin_altivec_vupklsw(__a);
11657 return __builtin_altivec_vupkhsw(__a);
11663 #ifdef __LITTLE_ENDIAN__ 11664 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11666 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11672 return (vector
double)(__a[0], __a[1]);
11680 #ifdef __LITTLE_ENDIAN__ 11681 return __builtin_altivec_vupklsb((vector
char)__a);
11683 return __builtin_altivec_vupkhsb((vector
char)__a);
11689 #ifdef __LITTLE_ENDIAN__ 11690 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11692 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11699 #ifdef __LITTLE_ENDIAN__ 11700 return __builtin_altivec_vupklsh(__a);
11702 return __builtin_altivec_vupkhsh(__a);
11708 #ifdef __LITTLE_ENDIAN__ 11709 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11711 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11717 #ifdef __LITTLE_ENDIAN__ 11718 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11720 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11726 #ifdef __POWER8_VECTOR__ 11727 static __inline__ vector
long long __ATTRS_o_ai vec_vupkhsw(vector
int __a) {
11728 #ifdef __LITTLE_ENDIAN__ 11729 return __builtin_altivec_vupklsw(__a);
11731 return __builtin_altivec_vupkhsw(__a);
11736 vec_vupkhsw(vector
bool int __a) {
11737 #ifdef __LITTLE_ENDIAN__ 11738 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11740 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11749 #ifdef __LITTLE_ENDIAN__ 11750 return __builtin_altivec_vupkhsb((vector
char)__a);
11752 return __builtin_altivec_vupklsb((vector
char)__a);
11758 #ifdef __LITTLE_ENDIAN__ 11759 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11761 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11766 #ifdef __LITTLE_ENDIAN__ 11767 return __builtin_altivec_vupkhsh(__a);
11769 return __builtin_altivec_vupklsh(__a);
11775 #ifdef __LITTLE_ENDIAN__ 11776 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11778 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11784 #ifdef __LITTLE_ENDIAN__ 11785 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11787 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11791 #ifdef __POWER8_VECTOR__ 11793 #ifdef __LITTLE_ENDIAN__ 11794 return __builtin_altivec_vupkhsw(__a);
11796 return __builtin_altivec_vupklsw(__a);
11802 #ifdef __LITTLE_ENDIAN__ 11803 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11805 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11811 return (vector
double)(__a[2], __a[3]);
11819 #ifdef __LITTLE_ENDIAN__ 11820 return __builtin_altivec_vupkhsb((vector
char)__a);
11822 return __builtin_altivec_vupklsb((vector
char)__a);
11828 #ifdef __LITTLE_ENDIAN__ 11829 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11831 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11838 #ifdef __LITTLE_ENDIAN__ 11839 return __builtin_altivec_vupkhsh(__a);
11841 return __builtin_altivec_vupklsh(__a);
11847 #ifdef __LITTLE_ENDIAN__ 11848 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11850 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11856 #ifdef __LITTLE_ENDIAN__ 11857 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11859 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11865 #ifdef __POWER8_VECTOR__ 11866 static __inline__ vector
long long __ATTRS_o_ai vec_vupklsw(vector
int __a) {
11867 #ifdef __LITTLE_ENDIAN__ 11868 return __builtin_altivec_vupkhsw(__a);
11870 return __builtin_altivec_vupklsw(__a);
11875 vec_vupklsw(vector
bool int __a) {
11876 #ifdef __LITTLE_ENDIAN__ 11877 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11879 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11889 vec_vsx_ld(
int __a,
const vector
bool int *__b) {
11890 return (vector
bool int)__builtin_vsx_lxvw4x(__a, __b);
11894 vec_vsx_ld(
int __a,
const vector
signed int *__b) {
11895 return (vector
signed int)__builtin_vsx_lxvw4x(__a, __b);
11899 vec_vsx_ld(
int __a,
const signed int *__b) {
11900 return (vector
signed int)__builtin_vsx_lxvw4x(__a, __b);
11904 vec_vsx_ld(
int __a,
const vector
unsigned int *__b) {
11905 return (vector
unsigned int)__builtin_vsx_lxvw4x(__a, __b);
11909 vec_vsx_ld(
int __a,
const unsigned int *__b) {
11910 return (vector
unsigned int)__builtin_vsx_lxvw4x(__a, __b);
11914 vec_vsx_ld(
int __a,
const vector
float *__b) {
11915 return (vector
float)__builtin_vsx_lxvw4x(__a, __b);
11918 static __inline__ vector
float __ATTRS_o_ai vec_vsx_ld(
int __a,
11919 const float *__b) {
11920 return (vector
float)__builtin_vsx_lxvw4x(__a, __b);
11923 static __inline__ vector
signed long long __ATTRS_o_ai 11924 vec_vsx_ld(
int __a,
const vector
signed long long *__b) {
11925 return (vector
signed long long)__builtin_vsx_lxvd2x(__a, __b);
11928 static __inline__ vector
unsigned long long __ATTRS_o_ai 11929 vec_vsx_ld(
int __a,
const vector
unsigned long long *__b) {
11930 return (vector
unsigned long long)__builtin_vsx_lxvd2x(__a, __b);
11934 vec_vsx_ld(
int __a,
const vector
double *__b) {
11935 return (vector
double)__builtin_vsx_lxvd2x(__a, __b);
11939 vec_vsx_ld(
int __a,
const double *__b) {
11940 return (vector
double)__builtin_vsx_lxvd2x(__a, __b);
11944 vec_vsx_ld(
int __a,
const vector
bool short *__b) {
11945 return (vector
bool short)__builtin_vsx_lxvw4x(__a, __b);
11949 vec_vsx_ld(
int __a,
const vector
signed short *__b) {
11950 return (vector
signed short)__builtin_vsx_lxvw4x(__a, __b);
11954 vec_vsx_ld(
int __a,
const signed short *__b) {
11955 return (vector
signed short)__builtin_vsx_lxvw4x(__a, __b);
11959 vec_vsx_ld(
int __a,
const vector
unsigned short *__b) {
11960 return (vector
unsigned short)__builtin_vsx_lxvw4x(__a, __b);
11964 vec_vsx_ld(
int __a,
const unsigned short *__b) {
11965 return (vector
unsigned short)__builtin_vsx_lxvw4x(__a, __b);
11969 vec_vsx_ld(
int __a,
const vector
bool char *__b) {
11970 return (vector
bool char)__builtin_vsx_lxvw4x(__a, __b);
11974 vec_vsx_ld(
int __a,
const vector
signed char *__b) {
11975 return (vector
signed char)__builtin_vsx_lxvw4x(__a, __b);
11979 vec_vsx_ld(
int __a,
const signed char *__b) {
11980 return (vector
signed char)__builtin_vsx_lxvw4x(__a, __b);
11984 vec_vsx_ld(
int __a,
const vector
unsigned char *__b) {
11985 return (vector
unsigned char)__builtin_vsx_lxvw4x(__a, __b);
11989 vec_vsx_ld(
int __a,
const unsigned char *__b) {
11990 return (vector
unsigned char)__builtin_vsx_lxvw4x(__a, __b);
11999 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool int __a,
int __b,
12000 vector
bool int *__c) {
12001 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12004 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool int __a,
int __b,
12006 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12009 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool int __a,
int __b,
12010 unsigned int *__c) {
12011 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12014 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed int __a,
int __b,
12015 vector
signed int *__c) {
12016 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12019 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed int __a,
int __b,
12021 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12024 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned int __a,
int __b,
12025 vector
unsigned int *__c) {
12026 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12029 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned int __a,
int __b,
12030 unsigned int *__c) {
12031 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12034 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
float __a,
int __b,
12035 vector
float *__c) {
12036 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12039 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
float __a,
int __b,
12041 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12044 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed long long __a,
12046 vector
signed long long *__c) {
12047 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12050 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned long long __a,
12052 vector
unsigned long long *__c) {
12053 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12056 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
double __a,
int __b,
12057 vector
double *__c) {
12058 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12061 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
double __a,
int __b,
12063 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12066 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool short __a,
int __b,
12067 vector
bool short *__c) {
12068 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12071 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool short __a,
int __b,
12072 signed short *__c) {
12073 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12076 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool short __a,
int __b,
12077 unsigned short *__c) {
12078 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12080 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed short __a,
int __b,
12081 vector
signed short *__c) {
12082 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12085 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed short __a,
int __b,
12086 signed short *__c) {
12087 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12090 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
12092 vector
unsigned short *__c) {
12093 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12096 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
12097 int __b,
unsigned short *__c) {
12098 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12101 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool char __a,
int __b,
12102 vector
bool char *__c) {
12103 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12106 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool char __a,
int __b,
12107 signed char *__c) {
12108 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12111 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool char __a,
int __b,
12112 unsigned char *__c) {
12113 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12116 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed char __a,
int __b,
12117 vector
signed char *__c) {
12118 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12121 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed char __a,
int __b,
12122 signed char *__c) {
12123 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12126 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
12128 vector
unsigned char *__c) {
12129 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12132 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
12133 int __b,
unsigned char *__c) {
12134 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12140 #define vec_xxpermdi __builtin_vsx_xxpermdi 12141 #define vec_xxsldwi __builtin_vsx_xxsldwi 12146 #define __builtin_altivec_vxor vec_xor 12149 vec_xor(vector
signed char __a, vector
signed char __b) {
12154 vec_xor(vector
bool char __a, vector
signed char __b) {
12155 return (vector
signed char)__a ^
__b;
12159 vec_xor(vector
signed char __a, vector
bool char __b) {
12160 return __a ^ (vector
signed char)__b;
12164 vec_xor(vector
unsigned char __a, vector
unsigned char __b) {
12169 vec_xor(vector
bool char __a, vector
unsigned char __b) {
12170 return (vector
unsigned char)__a ^
__b;
12174 vec_xor(vector
unsigned char __a, vector
bool char __b) {
12175 return __a ^ (vector
unsigned char)__b;
12179 vector
bool char __b) {
12184 vector
short __b) {
12189 vector
short __b) {
12190 return (vector
short)__a ^
__b;
12194 vector
bool short __b) {
12195 return __a ^ (vector short)__b;
12199 vec_xor(vector
unsigned short __a, vector
unsigned short __b) {
12204 vec_xor(vector
bool short __a, vector
unsigned short __b) {
12205 return (vector
unsigned short)__a ^
__b;
12209 vec_xor(vector
unsigned short __a, vector
bool short __b) {
12210 return __a ^ (vector
unsigned short)__b;
12214 vec_xor(vector
bool short __a, vector
bool short __b) {
12225 return (vector
int)__a ^
__b;
12229 vector
bool int __b) {
12230 return __a ^ (vector int)__b;
12234 vec_xor(vector
unsigned int __a, vector
unsigned int __b) {
12239 vec_xor(vector
bool int __a, vector
unsigned int __b) {
12240 return (vector
unsigned int)__a ^
__b;
12244 vec_xor(vector
unsigned int __a, vector
bool int __b) {
12245 return __a ^ (vector
unsigned int)__b;
12249 vector
bool int __b) {
12254 vector
float __b) {
12255 vector
unsigned int __res =
12256 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12257 return (vector
float)__res;
12261 vector
float __b) {
12262 vector
unsigned int __res =
12263 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12264 return (vector
float)__res;
12268 vector
bool int __b) {
12269 vector
unsigned int __res =
12270 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12271 return (vector
float)__res;
12275 static __inline__ vector
signed long long __ATTRS_o_ai 12276 vec_xor(vector
signed long long __a, vector
signed long long __b) {
12280 static __inline__ vector
signed long long __ATTRS_o_ai 12281 vec_xor(vector
bool long long __a, vector
signed long long __b) {
12282 return (vector
signed long long)__a ^
__b;
12285 static __inline__ vector
signed long long __ATTRS_o_ai 12286 vec_xor(vector
signed long long __a, vector
bool long long __b) {
12287 return __a ^ (vector
signed long long)__b;
12290 static __inline__ vector
unsigned long long __ATTRS_o_ai 12291 vec_xor(vector
unsigned long long __a, vector
unsigned long long __b) {
12295 static __inline__ vector
unsigned long long __ATTRS_o_ai 12296 vec_xor(vector
bool long long __a, vector
unsigned long long __b) {
12297 return (vector
unsigned long long)__a ^
__b;
12300 static __inline__ vector
unsigned long long __ATTRS_o_ai 12301 vec_xor(vector
unsigned long long __a, vector
bool long long __b) {
12302 return __a ^ (vector
unsigned long long)__b;
12306 vec_xor(vector
bool long long __a, vector
bool long long __b) {
12311 vector
double __b) {
12312 return (vector
double)((vector
unsigned long long)__a ^
12313 (vector
unsigned long long)
__b);
12317 vec_xor(vector
double __a, vector
bool long long __b) {
12318 return (vector
double)((vector
unsigned long long)__a ^
12319 (vector
unsigned long long)
__b);
12323 vector
double __b) {
12324 return (vector
double)((vector
unsigned long long)__a ^
12325 (vector
unsigned long long)
__b);
12338 return (vector
signed char)__a ^
__b;
12343 return __a ^ (vector
signed char)__b;
12347 vec_vxor(vector
unsigned char __a, vector
unsigned char __b) {
12353 return (vector
unsigned char)__a ^
__b;
12358 return __a ^ (vector
unsigned char)__b;
12362 vector
bool char __b) {
12367 vector
short __b) {
12372 vector
short __b) {
12373 return (vector
short)__a ^
__b;
12377 vector
bool short __b) {
12378 return __a ^ (vector short)__b;
12382 vec_vxor(vector
unsigned short __a, vector
unsigned short __b) {
12387 vec_vxor(vector
bool short __a, vector
unsigned short __b) {
12388 return (vector
unsigned short)__a ^
__b;
12392 vec_vxor(vector
unsigned short __a, vector
bool short __b) {
12393 return __a ^ (vector
unsigned short)__b;
12408 return (vector
int)__a ^
__b;
12412 vector
bool int __b) {
12413 return __a ^ (vector int)__b;
12417 vec_vxor(vector
unsigned int __a, vector
unsigned int __b) {
12423 return (vector
unsigned int)__a ^
__b;
12428 return __a ^ (vector
unsigned int)__b;
12432 vector
bool int __b) {
12437 vector
float __b) {
12438 vector
unsigned int __res =
12439 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12440 return (vector
float)__res;
12444 vector
float __b) {
12445 vector
unsigned int __res =
12446 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12447 return (vector
float)__res;
12451 vector
bool int __b) {
12452 vector
unsigned int __res =
12453 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12454 return (vector
float)__res;
12458 static __inline__ vector
signed long long __ATTRS_o_ai 12459 vec_vxor(vector
signed long long __a, vector
signed long long __b) {
12463 static __inline__ vector
signed long long __ATTRS_o_ai 12464 vec_vxor(vector
bool long long __a, vector
signed long long __b) {
12465 return (vector
signed long long)__a ^
__b;
12468 static __inline__ vector
signed long long __ATTRS_o_ai 12469 vec_vxor(vector
signed long long __a, vector
bool long long __b) {
12470 return __a ^ (vector
signed long long)__b;
12473 static __inline__ vector
unsigned long long __ATTRS_o_ai 12474 vec_vxor(vector
unsigned long long __a, vector
unsigned long long __b) {
12478 static __inline__ vector
unsigned long long __ATTRS_o_ai 12479 vec_vxor(vector
bool long long __a, vector
unsigned long long __b) {
12480 return (vector
unsigned long long)__a ^
__b;
12483 static __inline__ vector
unsigned long long __ATTRS_o_ai 12484 vec_vxor(vector
unsigned long long __a, vector
bool long long __b) {
12485 return __a ^ (vector
unsigned long long)__b;
12489 vec_vxor(vector
bool long long __a, vector
bool long long __b) {
12545 vec_extract(vector
signed long long __a,
int __b) {
12550 vec_extract(vector
unsigned long long __a,
int __b) {
12555 vec_extract(vector
bool long long __a,
int __b) {
12568 #ifdef __POWER9_VECTOR__ 12570 #define vec_insert4b __builtin_vsx_insertword 12571 #define vec_extract4b __builtin_vsx_extractuword 12576 vec_extract_exp(vector
float __a) {
12577 return __builtin_vsx_xvxexpsp(__a);
12580 static __inline__ vector
unsigned long long __ATTRS_o_ai 12581 vec_extract_exp(vector
double __a) {
12582 return __builtin_vsx_xvxexpdp(__a);
12588 vec_extract_sig(vector
float __a) {
12589 return __builtin_vsx_xvxsigsp(__a);
12592 static __inline__ vector
unsigned long long __ATTRS_o_ai 12593 vec_extract_sig (vector
double __a) {
12594 return __builtin_vsx_xvxsigdp(__a);
12598 vec_extract_fp32_from_shorth(vector
unsigned short __a) {
12599 vector
unsigned short __b =
12600 #ifdef __LITTLE_ENDIAN__ 12601 __builtin_shufflevector(__a, __a, 0, -1, 1, -1, 2, -1, 3, -1);
12603 __builtin_shufflevector(__a, __a, -1, 0, -1, 1, -1, 2, -1, 3);
12605 return __builtin_vsx_xvcvhpsp(__b);
12609 vec_extract_fp32_from_shortl(vector
unsigned short __a) {
12610 vector
unsigned short __b =
12611 #ifdef __LITTLE_ENDIAN__ 12612 __builtin_shufflevector(__a, __a, 4, -1, 5, -1, 6, -1, 7, -1);
12614 __builtin_shufflevector(__a, __a, -1, 4, -1, 5, -1, 6, -1, 7);
12616 return __builtin_vsx_xvcvhpsp(__b);
12635 vector
bool char __b,
12672 vector
bool int __b,
12679 static __inline__ vector
signed long long __ATTRS_o_ai 12680 vec_insert(
signed long long __a, vector
signed long long __b,
int __c) {
12685 static __inline__ vector
unsigned long long __ATTRS_o_ai 12686 vec_insert(
unsigned long long __a, vector
unsigned long long __b,
int __c) {
12692 vec_insert(
unsigned long long __a, vector
bool long long __b,
int __c) {
12722 vec_lvsl(__a, (
unsigned char *)__b));
12734 vec_lvsl(__a, (
unsigned char *)__b));
12740 vec_lvsl(__a, (
unsigned char *)__b));
12744 const short *__b) {
12749 const vector
short *__b) {
12751 vec_lvsl(__a, (
unsigned char *)__b));
12763 vec_lvsl(__a, (
unsigned char *)__b));
12769 vec_lvsl(__a, (
unsigned char *)__b));
12773 const vector pixel *__b) {
12775 vec_lvsl(__a, (
unsigned char *)__b));
12783 const vector
int *__b) {
12785 vec_lvsl(__a, (
unsigned char *)__b));
12797 vec_lvsl(__a, (
unsigned char *)__b));
12803 vec_lvsl(__a, (
unsigned char *)__b));
12807 const float *__b) {
12812 const vector
float *__b) {
12814 vec_lvsl(__a, (
unsigned char *)__b));
12828 vec_lvsl(__a, (
unsigned char *)__b));
12840 vec_lvsl(__a, (
unsigned char *)__b));
12846 vec_lvsl(__a, (
unsigned char *)__b));
12850 const short *__b) {
12855 const vector
short *__b) {
12857 vec_lvsl(__a, (
unsigned char *)__b));
12869 vec_lvsl(__a, (
unsigned char *)__b));
12875 vec_lvsl(__a, (
unsigned char *)__b));
12879 const vector pixel *__b) {
12881 vec_lvsl(__a, (
unsigned char *)__b));
12889 const vector
int *__b) {
12891 vec_lvsl(__a, (
unsigned char *)__b));
12903 vec_lvsl(__a, (
unsigned char *)__b));
12909 vec_lvsl(__a, (
unsigned char *)__b));
12913 const float *__b) {
12918 vector
float *__b) {
12920 vec_lvsl(__a, (
unsigned char *)__b));
12934 vec_lvsl(__a, (
unsigned char *)__b));
12946 vec_lvsl(__a, (
unsigned char *)__b));
12952 vec_lvsl(__a, (
unsigned char *)__b));
12956 const short *__b) {
12961 const vector
short *__b) {
12963 vec_lvsl(__a, (
unsigned char *)__b));
12975 vec_lvsl(__a, (
unsigned char *)__b));
12981 vec_lvsl(__a, (
unsigned char *)__b));
12985 const vector pixel *__b) {
12987 vec_lvsl(__a, (
unsigned char *)__b));
12995 const vector
int *__b) {
12997 vec_lvsl(__a, (
unsigned char *)__b));
13009 vec_lvsl(__a, (
unsigned char *)__b));
13015 vec_lvsl(__a, (
unsigned char *)__b));
13019 const float *__b) {
13024 const vector
float *__b) {
13026 vec_lvsl(__a, (
unsigned char *)__b));
13040 vec_lvsl(__a, (
unsigned char *)__b));
13052 vec_lvsl(__a, (
unsigned char *)__b));
13058 vec_lvsl(__a, (
unsigned char *)__b));
13062 const short *__b) {
13067 const vector
short *__b) {
13069 vec_lvsl(__a, (
unsigned char *)__b));
13081 vec_lvsl(__a, (
unsigned char *)__b));
13087 vec_lvsl(__a, (
unsigned char *)__b));
13091 const vector pixel *__b) {
13093 vec_lvsl(__a, (
unsigned char *)__b));
13101 const vector
int *__b) {
13103 vec_lvsl(__a, (
unsigned char *)__b));
13115 vec_lvsl(__a, (
unsigned char *)__b));
13121 vec_lvsl(__a, (
unsigned char *)__b));
13125 const float *__b) {
13130 const vector
float *__b) {
13132 vec_lvsl(__a, (
unsigned char *)__b));
13138 signed char *__c) {
13144 vector
signed char *__c) {
13151 unsigned char *__c) {
13157 vector
unsigned char *__c) {
13164 vector
bool char *__c) {
13177 vector
short *__c) {
13184 int __b,
unsigned short *__c) {
13191 vector
unsigned short *__c) {
13198 vector
bool short *__c) {
13205 vector pixel *__c) {
13225 unsigned int *__c) {
13231 vector
unsigned int *__c) {
13238 vector
bool int *__c) {
13245 vector
float *__c) {
13254 signed char *__c) {
13260 vector
signed char *__c) {
13267 int __b,
unsigned char *__c) {
13274 vector
unsigned char *__c) {
13281 vector
bool char *__c) {
13294 vector
short *__c) {
13301 int __b,
unsigned short *__c) {
13308 vector
unsigned short *__c) {
13315 vector
bool short *__c) {
13322 vector pixel *__c) {
13342 unsigned int *__c) {
13348 vector
unsigned int *__c) {
13355 vector
bool int *__c) {
13362 vector
float *__c) {
13371 signed char *__c) {
13377 vector
signed char *__c) {
13384 unsigned char *__c) {
13390 vector
unsigned char *__c) {
13397 vector
bool char *__c) {
13410 vector
short *__c) {
13417 int __b,
unsigned short *__c) {
13424 vector
unsigned short *__c) {
13431 vector
bool short *__c) {
13438 vector pixel *__c) {
13458 unsigned int *__c) {
13464 vector
unsigned int *__c) {
13471 vector
bool int *__c) {
13478 vector
float *__c) {
13487 signed char *__c) {
13493 vector
signed char *__c) {
13500 int __b,
unsigned char *__c) {
13507 vector
unsigned char *__c) {
13514 vector
bool char *__c) {
13527 vector
short *__c) {
13534 int __b,
unsigned short *__c) {
13541 vector
unsigned short *__c) {
13548 vector
bool short *__c) {
13555 vector pixel *__c) {
13575 unsigned int *__c) {
13581 vector
unsigned int *__c) {
13588 vector
bool int *__c) {
13595 vector
float *__c) {
13605 vector
signed char __res = (vector
signed char)(0);
13612 vector
unsigned char __res = (vector
unsigned char)(0);
13618 vector
short __res = (vector short)(0);
13625 vector
unsigned short __res = (vector
unsigned short)(0);
13631 vector
int __res = (vector int)(0);
13638 vector
unsigned int __res = (vector
unsigned int)(0);
13644 vector
float __res = (vector float)(0);
13652 return (vector
signed char)(
__a);
13657 return (vector
unsigned char)(
__a);
13661 return (vector
short)(
__a);
13666 return (vector
unsigned short)(
__a);
13670 return (vector
int)(
__a);
13675 return (vector
unsigned int)(
__a);
13679 static __inline__ vector
signed long long __ATTRS_o_ai 13681 return (vector
signed long long)(
__a);
13684 static __inline__ vector
unsigned long long __ATTRS_o_ai 13686 return (vector
unsigned long long)(
__a);
13689 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 13692 return (vector
signed __int128)(
__a);
13695 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 13697 return (vector
unsigned __int128)(
__a);
13703 return (vector
double)(
__a);
13708 return (vector
float)(
__a);
13716 vector
signed char __b) {
13717 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13722 vector
bool char __b) {
13723 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13728 vector
unsigned char __b) {
13729 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13734 vector
bool char __b) {
13735 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13740 vector
signed char __b) {
13741 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13746 vector
unsigned char __b) {
13747 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13752 vector
bool char __b) {
13753 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13758 vector
short __b) {
13759 return __builtin_altivec_vcmpequh_p(
__CR6_LT, __a, __b);
13763 vector
bool short __b) {
13764 return __builtin_altivec_vcmpequh_p(
__CR6_LT, __a, (vector
short)__b);
13768 vector
unsigned short __b) {
13769 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13770 (vector
short)__b);
13774 vector
bool short __b) {
13775 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13776 (vector
short)__b);
13780 vector
short __b) {
13781 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13782 (vector
short)__b);
13786 vector
unsigned short __b) {
13787 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13788 (vector
short)__b);
13792 vector
bool short __b) {
13793 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13794 (vector
short)__b);
13798 vector pixel __b) {
13799 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13800 (vector
short)__b);
13804 return __builtin_altivec_vcmpequw_p(
__CR6_LT, __a, __b);
13808 vector
bool int __b) {
13809 return __builtin_altivec_vcmpequw_p(
__CR6_LT, __a, (vector
int)__b);
13813 vector
unsigned int __b) {
13814 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13819 vector
bool int __b) {
13820 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13826 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13831 vector
unsigned int __b) {
13832 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13837 vector
bool int __b) {
13838 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13842 #ifdef __POWER8_VECTOR__ 13844 vector
signed long long __b) {
13845 return __builtin_altivec_vcmpequd_p(
__CR6_LT, __a, __b);
13849 vector
bool long long __b) {
13850 return __builtin_altivec_vcmpequd_p(
__CR6_LT, __a, (vector
long long)__b);
13854 vector
unsigned long long __b) {
13855 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13856 (vector
long long)__b);
13860 vector
bool long long __b) {
13861 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13862 (vector
long long)__b);
13866 vector
long long __b) {
13867 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13868 (vector
long long)__b);
13872 vector
unsigned long long __b) {
13873 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13874 (vector
long long)__b);
13878 vector
bool long long __b) {
13879 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13880 (vector
long long)__b);
13885 vector
float __b) {
13887 return __builtin_vsx_xvcmpeqsp_p(
__CR6_LT, __a, __b);
13889 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT, __a, __b);
13895 vector
double __b) {
13896 return __builtin_vsx_xvcmpeqdp_p(
__CR6_LT, __a, __b);
13903 vector
signed char __b) {
13904 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, __b, __a);
13908 vector
bool char __b) {
13909 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, (vector
signed char)__b, __a);
13913 vector
unsigned char __b) {
13914 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __b, __a);
13918 vector
bool char __b) {
13919 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__b, __a);
13923 vector
signed char __b) {
13924 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__b,
13925 (vector
unsigned char)__a);
13929 vector
unsigned char __b) {
13930 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __b, (vector
unsigned char)__a);
13934 vector
bool char __b) {
13935 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__b,
13936 (vector
unsigned char)__a);
13940 vector
short __b) {
13941 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, __b, __a);
13945 vector
bool short __b) {
13946 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, (vector
short)__b, __a);
13950 vector
unsigned short __b) {
13951 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __b, __a);
13955 vector
bool short __b) {
13956 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__b,
13961 vector
short __b) {
13962 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__b,
13963 (vector
unsigned short)__a);
13967 vector
unsigned short __b) {
13968 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __b,
13969 (vector
unsigned short)__a);
13973 vector
bool short __b) {
13974 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__b,
13975 (vector
unsigned short)__a);
13979 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, __b, __a);
13983 vector
bool int __b) {
13984 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, (vector
int)__b, __a);
13988 vector
unsigned int __b) {
13989 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __b, __a);
13993 vector
bool int __b) {
13994 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__b, __a);
13999 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__b,
14000 (vector
unsigned int)__a);
14004 vector
unsigned int __b) {
14005 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __b, (vector
unsigned int)__a);
14009 vector
bool int __b) {
14010 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__b,
14011 (vector
unsigned int)__a);
14014 #ifdef __POWER8_VECTOR__ 14016 vector
signed long long __b) {
14017 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, __b, __a);
14020 vector
bool long long __b) {
14021 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, (vector
signed long long)__b,
14026 vector
unsigned long long __b) {
14027 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __b, __a);
14031 vector
bool long long __b) {
14032 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__b,
14037 vector
signed long long __b) {
14038 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__b,
14039 (vector
unsigned long long)__a);
14043 vector
unsigned long long __b) {
14044 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __b,
14045 (vector
unsigned long long)__a);
14049 vector
bool long long __b) {
14050 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__b,
14051 (vector
unsigned long long)__a);
14056 vector
float __b) {
14058 return __builtin_vsx_xvcmpgesp_p(
__CR6_LT, __a, __b);
14060 return __builtin_altivec_vcmpgefp_p(
__CR6_LT, __a, __b);
14066 vector
double __b) {
14067 return __builtin_vsx_xvcmpgedp_p(
__CR6_LT, __a, __b);
14074 vector
signed char __b) {
14075 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, __a, __b);
14079 vector
bool char __b) {
14080 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, __a, (vector
signed char)__b);
14084 vector
unsigned char __b) {
14085 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __a, __b);
14089 vector
bool char __b) {
14090 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __a, (vector
unsigned char)__b);
14094 vector
signed char __b) {
14095 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__a,
14096 (vector
unsigned char)__b);
14100 vector
unsigned char __b) {
14101 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__a, __b);
14105 vector
bool char __b) {
14106 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__a,
14107 (vector
unsigned char)__b);
14111 vector
short __b) {
14112 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, __a, __b);
14116 vector
bool short __b) {
14117 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, __a, (vector
short)__b);
14121 vector
unsigned short __b) {
14122 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __a, __b);
14126 vector
bool short __b) {
14127 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __a,
14128 (vector
unsigned short)__b);
14132 vector
short __b) {
14133 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__a,
14134 (vector
unsigned short)__b);
14138 vector
unsigned short __b) {
14139 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__a,
14144 vector
bool short __b) {
14145 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__a,
14146 (vector
unsigned short)__b);
14150 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, __a, __b);
14154 vector
bool int __b) {
14155 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, __a, (vector
int)__b);
14159 vector
unsigned int __b) {
14160 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __a, __b);
14164 vector
bool int __b) {
14165 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __a, (vector
unsigned int)__b);
14170 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__a,
14171 (vector
unsigned int)__b);
14175 vector
unsigned int __b) {
14176 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__a, __b);
14180 vector
bool int __b) {
14181 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__a,
14182 (vector
unsigned int)__b);
14185 #ifdef __POWER8_VECTOR__ 14187 vector
signed long long __b) {
14188 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, __a, __b);
14191 vector
bool long long __b) {
14192 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, __a,
14193 (vector
signed long long)__b);
14197 vector
unsigned long long __b) {
14198 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __a, __b);
14202 vector
bool long long __b) {
14203 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __a,
14204 (vector
unsigned long long)__b);
14208 vector
signed long long __b) {
14209 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__a,
14210 (vector
unsigned long long)__b);
14214 vector
unsigned long long __b) {
14215 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__a,
14220 vector
bool long long __b) {
14221 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__a,
14222 (vector
unsigned long long)__b);
14227 vector
float __b) {
14229 return __builtin_vsx_xvcmpgtsp_p(
__CR6_LT, __a, __b);
14231 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT, __a, __b);
14237 vector
double __b) {
14238 return __builtin_vsx_xvcmpgtdp_p(
__CR6_LT, __a, __b);
14245 vec_all_in(vector
float __a, vector
float __b) {
14246 return __builtin_altivec_vcmpbfp_p(
__CR6_EQ, __a, __b);
14252 vector
signed char __b) {
14253 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, __a, __b);
14257 vector
bool char __b) {
14258 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, __a, (vector
signed char)__b);
14262 vector
unsigned char __b) {
14263 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __a, __b);
14267 vector
bool char __b) {
14268 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __a, (vector
unsigned char)__b);
14272 vector
signed char __b) {
14273 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__a,
14274 (vector
unsigned char)__b);
14278 vector
unsigned char __b) {
14279 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__a, __b);
14283 vector
bool char __b) {
14284 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__a,
14285 (vector
unsigned char)__b);
14289 vector
short __b) {
14290 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, __a, __b);
14294 vector
bool short __b) {
14295 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, __a, (vector
short)__b);
14299 vector
unsigned short __b) {
14300 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __a, __b);
14304 vector
bool short __b) {
14305 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __a,
14306 (vector
unsigned short)__b);
14310 vector
short __b) {
14311 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__a,
14312 (vector
unsigned short)__b);
14316 vector
unsigned short __b) {
14317 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__a,
14322 vector
bool short __b) {
14323 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__a,
14324 (vector
unsigned short)__b);
14328 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, __a, __b);
14332 vector
bool int __b) {
14333 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, __a, (vector
int)__b);
14337 vector
unsigned int __b) {
14338 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __a, __b);
14342 vector
bool int __b) {
14343 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __a, (vector
unsigned int)__b);
14348 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__a,
14349 (vector
unsigned int)__b);
14353 vector
unsigned int __b) {
14354 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__a, __b);
14358 vector
bool int __b) {
14359 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__a,
14360 (vector
unsigned int)__b);
14363 #ifdef __POWER8_VECTOR__ 14365 vector
signed long long __b) {
14366 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, __a, __b);
14370 vector
unsigned long long __b) {
14371 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __a, __b);
14375 vector
bool long long __b) {
14376 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, __a,
14377 (vector
signed long long)__b);
14381 vector
bool long long __b) {
14382 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __a,
14383 (vector
unsigned long long)__b);
14387 vector
signed long long __b) {
14388 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__a,
14389 (vector
unsigned long long)__b);
14393 vector
unsigned long long __b) {
14394 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__a,
14399 vector
bool long long __b) {
14400 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__a,
14401 (vector
unsigned long long)__b);
14406 vector
float __b) {
14408 return __builtin_vsx_xvcmpgesp_p(
__CR6_LT, __b, __a);
14410 return __builtin_altivec_vcmpgefp_p(
__CR6_LT, __b, __a);
14416 vector
double __b) {
14417 return __builtin_vsx_xvcmpgedp_p(
__CR6_LT, __b, __a);
14424 vector
signed char __b) {
14425 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, __b, __a);
14429 vector
bool char __b) {
14430 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, (vector
signed char)__b, __a);
14434 vector
unsigned char __b) {
14435 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __b, __a);
14439 vector
bool char __b) {
14440 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__b, __a);
14444 vector
signed char __b) {
14445 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__b,
14446 (vector
unsigned char)__a);
14450 vector
unsigned char __b) {
14451 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __b, (vector
unsigned char)__a);
14455 vector
bool char __b) {
14456 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__b,
14457 (vector
unsigned char)__a);
14461 vector
short __b) {
14462 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, __b, __a);
14466 vector
bool short __b) {
14467 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, (vector
short)__b, __a);
14471 vector
unsigned short __b) {
14472 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __b, __a);
14476 vector
bool short __b) {
14477 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__b,
14482 vector
short __b) {
14483 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__b,
14484 (vector
unsigned short)__a);
14488 vector
unsigned short __b) {
14489 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __b,
14490 (vector
unsigned short)__a);
14494 vector
bool short __b) {
14495 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__b,
14496 (vector
unsigned short)__a);
14500 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, __b, __a);
14504 vector
bool int __b) {
14505 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, (vector
int)__b, __a);
14509 vector
unsigned int __b) {
14510 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __b, __a);
14514 vector
bool int __b) {
14515 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__b, __a);
14520 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__b,
14521 (vector
unsigned int)__a);
14525 vector
unsigned int __b) {
14526 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __b, (vector
unsigned int)__a);
14530 vector
bool int __b) {
14531 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__b,
14532 (vector
unsigned int)__a);
14535 #ifdef __POWER8_VECTOR__ 14537 vector
signed long long __b) {
14538 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, __b, __a);
14542 vector
unsigned long long __b) {
14543 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __b, __a);
14547 vector
bool long long __b) {
14548 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, (vector
signed long long)__b,
14553 vector
bool long long __b) {
14554 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__b,
14559 vector
signed long long __b) {
14560 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__b,
14561 (vector
unsigned long long)__a);
14565 vector
unsigned long long __b) {
14566 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __b,
14567 (vector
unsigned long long)__a);
14571 vector
bool long long __b) {
14572 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__b,
14573 (vector
unsigned long long)__a);
14578 vector
float __b) {
14580 return __builtin_vsx_xvcmpgtsp_p(
__CR6_LT, __b, __a);
14582 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT, __b, __a);
14588 vector
double __b) {
14589 return __builtin_vsx_xvcmpgtdp_p(
__CR6_LT, __b, __a);
14597 return __builtin_vsx_xvcmpeqsp_p(
__CR6_EQ, __a, __a);
14599 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ, __a, __a);
14605 return __builtin_vsx_xvcmpeqdp_p(
__CR6_EQ, __a, __a);
14612 vector
signed char __b) {
14613 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14618 vector
bool char __b) {
14619 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14624 vector
unsigned char __b) {
14625 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14630 vector
bool char __b) {
14631 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14636 vector
signed char __b) {
14637 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14642 vector
unsigned char __b) {
14643 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14648 vector
bool char __b) {
14649 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14654 vector
short __b) {
14655 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, __a, __b);
14659 vector
bool short __b) {
14660 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, __a, (vector
short)__b);
14664 vector
unsigned short __b) {
14665 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14666 (vector
short)__b);
14670 vector
bool short __b) {
14671 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14672 (vector
short)__b);
14676 vector
short __b) {
14677 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14678 (vector
short)__b);
14682 vector
unsigned short __b) {
14683 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14684 (vector
short)__b);
14688 vector
bool short __b) {
14689 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14690 (vector
short)__b);
14694 vector pixel __b) {
14695 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14696 (vector
short)__b);
14700 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, __a, __b);
14704 vector
bool int __b) {
14705 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, __a, (vector
int)__b);
14709 vector
unsigned int __b) {
14710 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14715 vector
bool int __b) {
14716 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14722 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14727 vector
unsigned int __b) {
14728 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14733 vector
bool int __b) {
14734 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14738 #ifdef __POWER8_VECTOR__ 14740 vector
signed long long __b) {
14741 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, __a, __b);
14745 vector
unsigned long long __b) {
14746 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
long long)__a,
14747 (vector
long long)__b);
14751 vector
bool long long __b) {
14752 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, __a,
14753 (vector
signed long long)__b);
14757 vector
bool long long __b) {
14758 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14759 (vector
signed long long)__b);
14763 vector
signed long long __b) {
14764 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14765 (vector
signed long long)__b);
14769 vector
unsigned long long __b) {
14770 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14771 (vector
signed long long)__b);
14775 vector
bool long long __b) {
14776 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14777 (vector
signed long long)__b);
14782 vector
float __b) {
14784 return __builtin_vsx_xvcmpeqdp_p(
__CR6_EQ, __a, __b);
14786 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ, __a, __b);
14792 vector
double __b) {
14793 return __builtin_vsx_xvcmpeqdp_p(
__CR6_EQ, __a, __b);
14800 vector
float __b) {
14802 return __builtin_vsx_xvcmpgesp_p(
__CR6_EQ, __a, __b);
14804 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ, __a, __b);
14810 vector
double __b) {
14811 return __builtin_vsx_xvcmpgedp_p(
__CR6_EQ, __a, __b);
14818 vector
float __b) {
14820 return __builtin_vsx_xvcmpgtsp_p(
__CR6_EQ, __a, __b);
14822 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ, __a, __b);
14828 vector
double __b) {
14829 return __builtin_vsx_xvcmpgtdp_p(
__CR6_EQ, __a, __b);
14836 vec_all_nle(vector
float __a, vector
float __b) {
14837 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ, __b, __a);
14843 vec_all_nlt(vector
float __a, vector
float __b) {
14844 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ, __b, __a);
14850 vec_all_numeric(vector
float __a) {
14851 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT, __a, __a);
14857 vector
signed char __b) {
14858 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14863 vector
bool char __b) {
14864 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14869 vector
unsigned char __b) {
14870 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14875 vector
bool char __b) {
14876 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14881 vector
signed char __b) {
14882 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14887 vector
unsigned char __b) {
14888 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14893 vector
bool char __b) {
14894 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14899 vector
short __b) {
14900 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, __a, __b);
14904 vector
bool short __b) {
14905 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, __a, (vector
short)__b);
14909 vector
unsigned short __b) {
14910 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14911 (vector
short)__b);
14915 vector
bool short __b) {
14916 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14917 (vector
short)__b);
14921 vector
short __b) {
14922 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14923 (vector
short)__b);
14927 vector
unsigned short __b) {
14928 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14929 (vector
short)__b);
14933 vector
bool short __b) {
14934 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14935 (vector
short)__b);
14939 vector pixel __b) {
14940 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14941 (vector
short)__b);
14945 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, __a, __b);
14949 vector
bool int __b) {
14950 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, __a, (vector
int)__b);
14954 vector
unsigned int __b) {
14955 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14960 vector
bool int __b) {
14961 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14967 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14972 vector
unsigned int __b) {
14973 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14978 vector
bool int __b) {
14979 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14983 #ifdef __POWER8_VECTOR__ 14985 vector
signed long long __b) {
14986 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, __a, __b);
14990 vector
unsigned long long __b) {
14991 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, (vector
long long)__a,
14992 (vector
long long)__b);
14996 vector
bool long long __b) {
14997 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, __a,
14998 (vector
signed long long)__b);
15002 vector
bool long long __b) {
15003 return __builtin_altivec_vcmpequd_p(
15004 __CR6_EQ_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15008 vector
signed long long __b) {
15009 return __builtin_altivec_vcmpequd_p(
15010 __CR6_EQ_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15014 vector
unsigned long long __b) {
15015 return __builtin_altivec_vcmpequd_p(
15016 __CR6_EQ_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15020 vector
bool long long __b) {
15021 return __builtin_altivec_vcmpequd_p(
15022 __CR6_EQ_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15027 vector
float __b) {
15029 return __builtin_vsx_xvcmpeqsp_p(
__CR6_EQ_REV, __a, __b);
15031 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ_REV, __a, __b);
15037 vector
double __b) {
15038 return __builtin_vsx_xvcmpeqdp_p(
__CR6_EQ_REV, __a, __b);
15045 vector
signed char __b) {
15046 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, __b, __a);
15050 vector
bool char __b) {
15051 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, (vector
signed char)__b,
15056 vector
unsigned char __b) {
15057 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __b, __a);
15061 vector
bool char __b) {
15062 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__b,
15067 vector
signed char __b) {
15068 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__b,
15069 (vector
unsigned char)__a);
15073 vector
unsigned char __b) {
15074 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __b,
15075 (vector
unsigned char)__a);
15079 vector
bool char __b) {
15080 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__b,
15081 (vector
unsigned char)__a);
15085 vector
short __b) {
15086 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, __b, __a);
15090 vector
bool short __b) {
15091 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, (vector
short)__b, __a);
15095 vector
unsigned short __b) {
15096 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __b, __a);
15100 vector
bool short __b) {
15101 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__b,
15106 vector
short __b) {
15107 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__b,
15108 (vector
unsigned short)__a);
15112 vector
unsigned short __b) {
15113 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __b,
15114 (vector
unsigned short)__a);
15118 vector
bool short __b) {
15119 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__b,
15120 (vector
unsigned short)__a);
15124 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, __b, __a);
15128 vector
bool int __b) {
15129 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, (vector
int)__b, __a);
15133 vector
unsigned int __b) {
15134 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __b, __a);
15138 vector
bool int __b) {
15139 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__b,
15145 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__b,
15146 (vector
unsigned int)__a);
15150 vector
unsigned int __b) {
15151 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __b,
15152 (vector
unsigned int)__a);
15156 vector
bool int __b) {
15157 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__b,
15158 (vector
unsigned int)__a);
15161 #ifdef __POWER8_VECTOR__ 15163 vector
signed long long __b) {
15164 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT_REV, __b, __a);
15168 vector
unsigned long long __b) {
15169 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __b, __a);
15173 vector
bool long long __b) {
15175 (vector
signed long long)__b, __a);
15179 vector
bool long long __b) {
15181 (vector
unsigned long long)__b, __a);
15185 vector
signed long long __b) {
15187 (vector
unsigned long long)__b,
15188 (vector
unsigned long long)__a);
15192 vector
unsigned long long __b) {
15193 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __b,
15194 (vector
unsigned long long)__a);
15198 vector
bool long long __b) {
15200 (vector
unsigned long long)__b,
15201 (vector
unsigned long long)__a);
15206 vector
float __b) {
15208 return __builtin_vsx_xvcmpgesp_p(
__CR6_EQ_REV, __a, __b);
15210 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ_REV, __a, __b);
15216 vector
double __b) {
15217 return __builtin_vsx_xvcmpgedp_p(
__CR6_EQ_REV, __a, __b);
15224 vector
signed char __b) {
15225 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, __a, __b);
15229 vector
bool char __b) {
15230 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, __a,
15231 (vector
signed char)__b);
15235 vector
unsigned char __b) {
15236 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __a, __b);
15240 vector
bool char __b) {
15241 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __a,
15242 (vector
unsigned char)__b);
15246 vector
signed char __b) {
15247 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__a,
15248 (vector
unsigned char)__b);
15252 vector
unsigned char __b) {
15253 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__a,
15258 vector
bool char __b) {
15259 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__a,
15260 (vector
unsigned char)__b);
15264 vector
short __b) {
15265 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, __a, __b);
15269 vector
bool short __b) {
15270 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, __a, (vector
short)__b);
15274 vector
unsigned short __b) {
15275 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __a, __b);
15279 vector
bool short __b) {
15280 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __a,
15281 (vector
unsigned short)__b);
15285 vector
short __b) {
15286 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__a,
15287 (vector
unsigned short)__b);
15291 vector
unsigned short __b) {
15292 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__a,
15297 vector
bool short __b) {
15298 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__a,
15299 (vector
unsigned short)__b);
15303 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, __a, __b);
15307 vector
bool int __b) {
15308 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, __a, (vector
int)__b);
15312 vector
unsigned int __b) {
15313 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __a, __b);
15317 vector
bool int __b) {
15318 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __a,
15319 (vector
unsigned int)__b);
15324 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__a,
15325 (vector
unsigned int)__b);
15329 vector
unsigned int __b) {
15330 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__a,
15335 vector
bool int __b) {
15336 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__a,
15337 (vector
unsigned int)__b);
15340 #ifdef __POWER8_VECTOR__ 15342 vector
signed long long __b) {
15343 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ_REV, __a, __b);
15347 vector
unsigned long long __b) {
15348 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __a, __b);
15352 vector
bool long long __b) {
15353 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ_REV, __a,
15354 (vector
signed long long)__b);
15358 vector
bool long long __b) {
15359 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __a,
15360 (vector
unsigned long long)__b);
15364 vector
signed long long __b) {
15366 (vector
unsigned long long)__a,
15367 (vector
unsigned long long)__b);
15371 vector
unsigned long long __b) {
15373 (vector
unsigned long long)__a, __b);
15377 vector
bool long long __b) {
15379 (vector
unsigned long long)__a,
15380 (vector
unsigned long long)__b);
15385 vector
float __b) {
15387 return __builtin_vsx_xvcmpgtsp_p(
__CR6_EQ_REV, __a, __b);
15389 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ_REV, __a, __b);
15395 vector
double __b) {
15396 return __builtin_vsx_xvcmpgtdp_p(
__CR6_EQ_REV, __a, __b);
15403 vector
signed char __b) {
15404 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, __a, __b);
15408 vector
bool char __b) {
15409 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, __a,
15410 (vector
signed char)__b);
15414 vector
unsigned char __b) {
15415 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __a, __b);
15419 vector
bool char __b) {
15420 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __a,
15421 (vector
unsigned char)__b);
15425 vector
signed char __b) {
15426 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__a,
15427 (vector
unsigned char)__b);
15431 vector
unsigned char __b) {
15432 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__a,
15437 vector
bool char __b) {
15438 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__a,
15439 (vector
unsigned char)__b);
15443 vector
short __b) {
15444 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, __a, __b);
15448 vector
bool short __b) {
15449 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, __a, (vector
short)__b);
15453 vector
unsigned short __b) {
15454 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __a, __b);
15458 vector
bool short __b) {
15459 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __a,
15460 (vector
unsigned short)__b);
15464 vector
short __b) {
15465 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__a,
15466 (vector
unsigned short)__b);
15470 vector
unsigned short __b) {
15471 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__a,
15476 vector
bool short __b) {
15477 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__a,
15478 (vector
unsigned short)__b);
15482 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, __a, __b);
15486 vector
bool int __b) {
15487 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, __a, (vector
int)__b);
15491 vector
unsigned int __b) {
15492 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __a, __b);
15496 vector
bool int __b) {
15497 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __a,
15498 (vector
unsigned int)__b);
15503 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__a,
15504 (vector
unsigned int)__b);
15508 vector
unsigned int __b) {
15509 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__a,
15514 vector
bool int __b) {
15515 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__a,
15516 (vector
unsigned int)__b);
15519 #ifdef __POWER8_VECTOR__ 15521 vector
signed long long __b) {
15522 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT_REV, __a, __b);
15526 vector
unsigned long long __b) {
15527 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __a, __b);
15531 vector
bool long long __b) {
15532 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT_REV, __a,
15533 (vector
signed long long)__b);
15537 vector
bool long long __b) {
15538 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __a,
15539 (vector
unsigned long long)__b);
15543 vector
signed long long __b) {
15545 (vector
unsigned long long)__a,
15546 (vector
unsigned long long)__b);
15550 vector
unsigned long long __b) {
15552 (vector
unsigned long long)__a, __b);
15556 vector
bool long long __b) {
15558 (vector
unsigned long long)__a,
15559 (vector
unsigned long long)__b);
15564 vector
float __b) {
15566 return __builtin_vsx_xvcmpgesp_p(
__CR6_EQ_REV, __b, __a);
15568 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ_REV, __b, __a);
15574 vector
double __b) {
15575 return __builtin_vsx_xvcmpgedp_p(
__CR6_EQ_REV, __b, __a);
15582 vector
signed char __b) {
15583 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, __b, __a);
15587 vector
bool char __b) {
15588 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, (vector
signed char)__b,
15593 vector
unsigned char __b) {
15594 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __b, __a);
15598 vector
bool char __b) {
15599 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__b,
15604 vector
signed char __b) {
15605 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__b,
15606 (vector
unsigned char)__a);
15610 vector
unsigned char __b) {
15611 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __b,
15612 (vector
unsigned char)__a);
15616 vector
bool char __b) {
15617 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__b,
15618 (vector
unsigned char)__a);
15622 vector
short __b) {
15623 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, __b, __a);
15627 vector
bool short __b) {
15628 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, (vector
short)__b, __a);
15632 vector
unsigned short __b) {
15633 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __b, __a);
15637 vector
bool short __b) {
15638 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__b,
15643 vector
short __b) {
15644 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__b,
15645 (vector
unsigned short)__a);
15649 vector
unsigned short __b) {
15650 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __b,
15651 (vector
unsigned short)__a);
15655 vector
bool short __b) {
15656 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__b,
15657 (vector
unsigned short)__a);
15661 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, __b, __a);
15665 vector
bool int __b) {
15666 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, (vector
int)__b, __a);
15670 vector
unsigned int __b) {
15671 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __b, __a);
15675 vector
bool int __b) {
15676 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__b,
15682 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__b,
15683 (vector
unsigned int)__a);
15687 vector
unsigned int __b) {
15688 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __b,
15689 (vector
unsigned int)__a);
15693 vector
bool int __b) {
15694 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__b,
15695 (vector
unsigned int)__a);
15698 #ifdef __POWER8_VECTOR__ 15700 vector
signed long long __b) {
15701 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ_REV, __b, __a);
15705 vector
unsigned long long __b) {
15706 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __b, __a);
15710 vector
bool long long __b) {
15712 (vector
signed long long)__b, __a);
15716 vector
bool long long __b) {
15718 (vector
unsigned long long)__b, __a);
15722 vector
signed long long __b) {
15724 (vector
unsigned long long)__b,
15725 (vector
unsigned long long)__a);
15729 vector
unsigned long long __b) {
15730 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __b,
15731 (vector
unsigned long long)__a);
15735 vector
bool long long __b) {
15737 (vector
unsigned long long)__b,
15738 (vector
unsigned long long)__a);
15743 vector
float __b) {
15745 return __builtin_vsx_xvcmpgtsp_p(
__CR6_EQ_REV, __b, __a);
15747 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ_REV, __b, __a);
15753 vector
double __b) {
15754 return __builtin_vsx_xvcmpgtdp_p(
__CR6_EQ_REV, __b, __a);
15761 vec_any_nan(vector
float __a) {
15762 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT_REV, __a, __a);
15768 vector
signed char __b) {
15769 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15774 vector
bool char __b) {
15775 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15780 vector
unsigned char __b) {
15781 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15786 vector
bool char __b) {
15787 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15792 vector
signed char __b) {
15793 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15798 vector
unsigned char __b) {
15799 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15804 vector
bool char __b) {
15805 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15810 vector
short __b) {
15811 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, __a, __b);
15815 vector
bool short __b) {
15816 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, __a, (vector
short)__b);
15820 vector
unsigned short __b) {
15821 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15822 (vector
short)__b);
15826 vector
bool short __b) {
15827 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15828 (vector
short)__b);
15832 vector
short __b) {
15833 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15834 (vector
short)__b);
15838 vector
unsigned short __b) {
15839 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15840 (vector
short)__b);
15844 vector
bool short __b) {
15845 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15846 (vector
short)__b);
15850 vector pixel __b) {
15851 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15852 (vector
short)__b);
15856 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, __a, __b);
15860 vector
bool int __b) {
15861 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, __a, (vector
int)__b);
15865 vector
unsigned int __b) {
15866 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15871 vector
bool int __b) {
15872 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15878 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15883 vector
unsigned int __b) {
15884 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15889 vector
bool int __b) {
15890 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15894 #ifdef __POWER8_VECTOR__ 15896 vector
signed long long __b) {
15897 return __builtin_altivec_vcmpequd_p(
__CR6_LT_REV, __a, __b);
15901 vector
unsigned long long __b) {
15902 return __builtin_altivec_vcmpequd_p(
__CR6_LT_REV, (vector
long long)__a,
15903 (vector
long long)__b);
15907 vector
bool long long __b) {
15908 return __builtin_altivec_vcmpequd_p(
__CR6_LT_REV, __a,
15909 (vector
signed long long)__b);
15913 vector
bool long long __b) {
15914 return __builtin_altivec_vcmpequd_p(
15915 __CR6_LT_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15919 vector
signed long long __b) {
15920 return __builtin_altivec_vcmpequd_p(
15921 __CR6_LT_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15925 vector
unsigned long long __b) {
15926 return __builtin_altivec_vcmpequd_p(
15927 __CR6_LT_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15931 vector
bool long long __b) {
15932 return __builtin_altivec_vcmpequd_p(
15933 __CR6_LT_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15938 vector
float __b) {
15940 return __builtin_vsx_xvcmpeqsp_p(
__CR6_LT_REV, __a, __b);
15942 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT_REV, __a, __b);
15948 vector
double __b) {
15949 return __builtin_vsx_xvcmpeqdp_p(
__CR6_LT_REV, __a, __b);
15956 vec_any_nge(vector
float __a, vector
float __b) {
15957 return __builtin_altivec_vcmpgefp_p(
__CR6_LT_REV, __a, __b);
15963 vec_any_ngt(vector
float __a, vector
float __b) {
15964 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT_REV, __a, __b);
15970 vec_any_nle(vector
float __a, vector
float __b) {
15971 return __builtin_altivec_vcmpgefp_p(
__CR6_LT_REV, __b, __a);
15977 vec_any_nlt(vector
float __a, vector
float __b) {
15978 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT_REV, __b, __a);
15984 vec_any_numeric(vector
float __a) {
15985 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ_REV, __a, __a);
15991 vec_any_out(vector
float __a, vector
float __b) {
15992 return __builtin_altivec_vcmpbfp_p(
__CR6_EQ_REV, __a, __b);
16009 #define vec_sbox_be __builtin_altivec_crypto_vsbox 16010 #define vec_cipher_be __builtin_altivec_crypto_vcipher 16011 #define vec_cipherlast_be __builtin_altivec_crypto_vcipherlast 16012 #define vec_ncipher_be __builtin_altivec_crypto_vncipher 16013 #define vec_ncipherlast_be __builtin_altivec_crypto_vncipherlast 16015 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16016 __builtin_crypto_vsbox(vector
unsigned long long __a) {
16017 return __builtin_altivec_crypto_vsbox(__a);
16020 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16021 __builtin_crypto_vcipher(vector
unsigned long long __a,
16022 vector
unsigned long long __b) {
16023 return __builtin_altivec_crypto_vcipher(__a, __b);
16026 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16027 __builtin_crypto_vcipherlast(vector
unsigned long long __a,
16028 vector
unsigned long long __b) {
16029 return __builtin_altivec_crypto_vcipherlast(__a, __b);
16032 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16033 __builtin_crypto_vncipher(vector
unsigned long long __a,
16034 vector
unsigned long long __b) {
16035 return __builtin_altivec_crypto_vncipher(__a, __b);
16038 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16039 __builtin_crypto_vncipherlast(vector
unsigned long long __a,
16040 vector
unsigned long long __b) {
16041 return __builtin_altivec_crypto_vncipherlast(__a, __b);
16044 #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad 16045 #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw 16047 #define vec_shasigma_be(X, Y, Z) \ 16048 _Generic((X), vector unsigned int \ 16049 : __builtin_crypto_vshasigmaw, vector unsigned long long \ 16050 : __builtin_crypto_vshasigmad)((X), (Y), (Z)) 16053 #ifdef __POWER8_VECTOR__ 16055 vec_permxor(vector
bool char __a, vector
bool char __b,
16056 vector
bool char __c) {
16057 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16061 vec_permxor(vector
signed char __a, vector
signed char __b,
16062 vector
signed char __c) {
16063 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16067 vec_permxor(vector
unsigned char __a, vector
unsigned char __b,
16068 vector
unsigned char __c) {
16069 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16073 __builtin_crypto_vpermxor(vector
unsigned char __a, vector
unsigned char __b,
16074 vector
unsigned char __c) {
16075 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16079 __builtin_crypto_vpermxor(vector
unsigned short __a, vector
unsigned short __b,
16080 vector
unsigned short __c) {
16081 return (vector
unsigned short)__builtin_altivec_crypto_vpermxor(
16082 (vector
unsigned char)__a, (vector
unsigned char)__b,
16083 (vector
unsigned char)__c);
16086 static __inline__ vector
unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
16087 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
16088 return (vector
unsigned int)__builtin_altivec_crypto_vpermxor(
16089 (vector
unsigned char)__a, (vector
unsigned char)__b,
16090 (vector
unsigned char)__c);
16093 static __inline__ vector
unsigned long long __ATTRS_o_ai 16094 __builtin_crypto_vpermxor(vector
unsigned long long __a,
16095 vector
unsigned long long __b,
16096 vector
unsigned long long __c) {
16097 return (vector
unsigned long long)__builtin_altivec_crypto_vpermxor(
16098 (vector
unsigned char)__a, (vector
unsigned char)__b,
16099 (vector
unsigned char)__c);
16103 __builtin_crypto_vpmsumb(vector
unsigned char __a, vector
unsigned char __b) {
16104 return __builtin_altivec_crypto_vpmsumb(__a, __b);
16108 __builtin_crypto_vpmsumb(vector
unsigned short __a, vector
unsigned short __b) {
16109 return __builtin_altivec_crypto_vpmsumh(__a, __b);
16113 __builtin_crypto_vpmsumb(vector
unsigned int __a, vector
unsigned int __b) {
16114 return __builtin_altivec_crypto_vpmsumw(__a, __b);
16117 static __inline__ vector
unsigned long long __ATTRS_o_ai 16118 __builtin_crypto_vpmsumb(vector
unsigned long long __a,
16119 vector
unsigned long long __b) {
16120 return __builtin_altivec_crypto_vpmsumd(__a, __b);
16124 vec_vgbbd(vector
signed char __a) {
16125 return __builtin_altivec_vgbbd((vector
unsigned char)__a);
16128 #define vec_pmsum_be __builtin_crypto_vpmsumb 16129 #define vec_gb __builtin_altivec_vgbbd 16132 vec_vgbbd(vector
unsigned char __a) {
16133 return __builtin_altivec_vgbbd(__a);
16137 vec_vbpermq(vector
signed char __a, vector
signed char __b) {
16138 return __builtin_altivec_vbpermq((vector
unsigned char)__a,
16139 (vector
unsigned char)__b);
16143 vec_vbpermq(vector
unsigned char __a, vector
unsigned char __b) {
16144 return __builtin_altivec_vbpermq(__a, __b);
16147 #ifdef __powerpc64__ 16148 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16149 vec_bperm(vector
unsigned __int128 __a, vector
unsigned char __b) {
16150 return __builtin_altivec_vbpermq((vector
unsigned char)__a,
16151 (vector
unsigned char)__b);
16160 return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
16165 return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
16171 return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
16176 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16180 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16185 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16189 return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0);
16194 return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0);
16199 return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0);
16203 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16208 vec_reve(vector
bool long long __a) {
16209 return __builtin_shufflevector(__a, __a, 1, 0);
16213 vec_reve(vector
signed long long __a) {
16214 return __builtin_shufflevector(__a, __a, 1, 0);
16218 vec_reve(vector
unsigned long long __a) {
16219 return __builtin_shufflevector(__a, __a, 1, 0);
16223 return __builtin_shufflevector(__a, __a, 1, 0);
16245 vector
unsigned char __indices =
16246 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
16247 return vec_perm(__a, __a, __indices);
16252 vector
unsigned char __indices =
16253 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
16254 return vec_perm(__a, __a, __indices);
16259 vector
unsigned char __indices =
16260 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
16261 return vec_perm(__a, __a, __indices);
16266 vector
unsigned char __indices =
16267 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16268 return vec_perm(__a, __a, __indices);
16273 vector
unsigned char __indices =
16274 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16275 return vec_perm(__a, __a, __indices);
16280 vector
unsigned char __indices =
16281 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16282 return vec_perm(__a, __a, __indices);
16287 vector
unsigned char __indices =
16288 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16289 return vec_perm(__a, __a, __indices);
16294 vec_revb(vector
bool long long __a) {
16295 vector
unsigned char __indices =
16296 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16297 return vec_perm(__a, __a, __indices);
16300 static __inline__ vector
signed long long __ATTRS_o_ai 16301 vec_revb(vector
signed long long __a) {
16302 vector
unsigned char __indices =
16303 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16304 return vec_perm(__a, __a, __indices);
16307 static __inline__ vector
unsigned long long __ATTRS_o_ai 16308 vec_revb(vector
unsigned long long __a) {
16309 vector
unsigned char __indices =
16310 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16311 return vec_perm(__a, __a, __indices);
16316 vector
unsigned char __indices =
16317 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16318 return vec_perm(__a, __a, __indices);
16322 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16324 vec_revb(vector
signed __int128 __a) {
16325 vector
unsigned char __indices =
16326 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
16327 return (vector
signed __int128)
vec_perm((vector
signed int)__a,
16328 (vector
signed int)__a,
16332 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 16333 vec_revb(vector
unsigned __int128 __a) {
16334 vector
unsigned char __indices =
16335 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
16336 return (vector
unsigned __int128)
vec_perm((vector
signed int)__a,
16337 (vector
signed int)__a,
16345 typedef vector
unsigned char unaligned_vec_uchar
__attribute__((aligned(1)));
16346 typedef vector
signed short unaligned_vec_sshort
__attribute__((aligned(1)));
16347 typedef vector
unsigned short unaligned_vec_ushort
__attribute__((aligned(1)));
16348 typedef vector
signed int unaligned_vec_sint
__attribute__((aligned(1)));
16349 typedef vector
unsigned int unaligned_vec_uint
__attribute__((aligned(1)));
16350 typedef vector
float unaligned_vec_float
__attribute__((aligned(1)));
16353 signed char *__ptr) {
16354 return *(unaligned_vec_schar *)(__ptr + __offset);
16358 vec_xl(
signed long long __offset,
unsigned char *__ptr) {
16359 return *(unaligned_vec_uchar*)(__ptr + __offset);
16363 signed short *__ptr) {
16364 return *(unaligned_vec_sshort *)(__ptr + __offset);
16368 vec_xl(
signed long long __offset,
unsigned short *__ptr) {
16369 return *(unaligned_vec_ushort *)(__ptr + __offset);
16373 signed int *__ptr) {
16374 return *(unaligned_vec_sint *)(__ptr + __offset);
16378 unsigned int *__ptr) {
16379 return *(unaligned_vec_uint *)(__ptr + __offset);
16384 return *(unaligned_vec_float *)(__ptr + __offset);
16388 typedef vector
signed long long unaligned_vec_sll
__attribute__((aligned(1)));
16389 typedef vector
unsigned long long unaligned_vec_ull
__attribute__((aligned(1)));
16390 typedef vector
double unaligned_vec_double
__attribute__((aligned(1)));
16393 vec_xl(
signed long long __offset,
signed long long *__ptr) {
16394 return *(unaligned_vec_sll *)(__ptr + __offset);
16398 vec_xl(
signed long long __offset,
unsigned long long *__ptr) {
16399 return *(unaligned_vec_ull *)(__ptr + __offset);
16404 return *(unaligned_vec_double *)(__ptr + __offset);
16408 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16409 typedef vector
signed __int128 unaligned_vec_si128
__attribute__((aligned(1)));
16410 typedef vector
unsigned __int128 unaligned_vec_ui128
16413 vec_xl(
signed long long __offset,
signed __int128 *__ptr) {
16414 return *(unaligned_vec_si128 *)(__ptr + __offset);
16418 vec_xl(
signed long long __offset,
unsigned __int128 *__ptr) {
16419 return *(unaligned_vec_ui128 *)(__ptr + __offset);
16425 #ifdef __LITTLE_ENDIAN__ 16427 vec_xl_be(
signed long long __offset,
signed char *__ptr) {
16428 vector
signed char __vec = __builtin_vsx_lxvd2x_be(__offset, __ptr);
16429 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16430 13, 12, 11, 10, 9, 8);
16434 vec_xl_be(
signed long long __offset,
unsigned char *__ptr) {
16435 vector
unsigned char __vec = __builtin_vsx_lxvd2x_be(__offset, __ptr);
16436 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16437 13, 12, 11, 10, 9, 8);
16441 vec_xl_be(
signed long long __offset,
signed short *__ptr) {
16442 vector
signed short __vec = __builtin_vsx_lxvd2x_be(__offset, __ptr);
16443 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16447 vec_xl_be(
signed long long __offset,
unsigned short *__ptr) {
16448 vector
unsigned short __vec = __builtin_vsx_lxvd2x_be(__offset, __ptr);
16449 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16453 vec_xl_be(
signed long long __offset,
signed int *__ptr) {
16454 return (vector
signed int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
16458 vec_xl_be(
signed long long __offset,
unsigned int *__ptr) {
16459 return (vector
unsigned int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
16463 vec_xl_be(
signed long long __offset,
float *__ptr) {
16464 return (vector
float)__builtin_vsx_lxvw4x_be(__offset, __ptr);
16468 static __inline__ vector
signed long long __ATTRS_o_ai 16469 vec_xl_be(
signed long long __offset,
signed long long *__ptr) {
16470 return (vector
signed long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16473 static __inline__ vector
unsigned long long __ATTRS_o_ai 16474 vec_xl_be(
signed long long __offset,
unsigned long long *__ptr) {
16475 return (vector
unsigned long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16479 vec_xl_be(
signed long long __offset,
double *__ptr) {
16480 return (vector
double)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16484 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16486 vec_xl_be(
signed long long __offset,
signed __int128 *__ptr) {
16487 return vec_xl(__offset, __ptr);
16490 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 16491 vec_xl_be(
signed long long __offset,
unsigned __int128 *__ptr) {
16492 return vec_xl(__offset, __ptr);
16496 #define vec_xl_be vec_xl 16502 signed long long __offset,
16503 signed char *__ptr) {
16504 *(unaligned_vec_schar *)(__ptr + __offset) = __vec;
16508 signed long long __offset,
16509 unsigned char *__ptr) {
16510 *(unaligned_vec_uchar *)(__ptr + __offset) = __vec;
16514 signed long long __offset,
16515 signed short *__ptr) {
16516 *(unaligned_vec_sshort *)(__ptr + __offset) = __vec;
16520 signed long long __offset,
16521 unsigned short *__ptr) {
16522 *(unaligned_vec_ushort *)(__ptr + __offset) = __vec;
16526 signed long long __offset,
16527 signed int *__ptr) {
16528 *(unaligned_vec_sint *)(__ptr + __offset) = __vec;
16532 signed long long __offset,
16533 unsigned int *__ptr) {
16534 *(unaligned_vec_uint *)(__ptr + __offset) = __vec;
16538 signed long long __offset,
16540 *(unaligned_vec_float *)(__ptr + __offset) = __vec;
16545 signed long long __offset,
16546 signed long long *__ptr) {
16547 *(unaligned_vec_sll *)(__ptr + __offset) = __vec;
16551 signed long long __offset,
16552 unsigned long long *__ptr) {
16553 *(unaligned_vec_ull *)(__ptr + __offset) = __vec;
16557 signed long long __offset,
16559 *(unaligned_vec_double *)(__ptr + __offset) = __vec;
16563 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16565 signed long long __offset,
16566 signed __int128 *__ptr) {
16567 *(unaligned_vec_si128 *)(__ptr + __offset) = __vec;
16571 signed long long __offset,
16572 unsigned __int128 *__ptr) {
16573 *(unaligned_vec_ui128 *)(__ptr + __offset) = __vec;
16579 #ifdef __LITTLE_ENDIAN__ 16581 signed long long __offset,
16582 signed char *__ptr) {
16583 vector
signed char __tmp =
16584 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16585 13, 12, 11, 10, 9, 8);
16586 __builtin_vsx_stxvd2x_be(__tmp, __offset, __ptr);
16590 signed long long __offset,
16591 unsigned char *__ptr) {
16592 vector
unsigned char __tmp =
16593 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16594 13, 12, 11, 10, 9, 8);
16595 __builtin_vsx_stxvd2x_be(__tmp, __offset, __ptr);
16599 signed long long __offset,
16600 signed short *__ptr) {
16601 vector
signed short __tmp =
16602 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16603 __builtin_vsx_stxvd2x_be(__tmp, __offset, __ptr);
16607 signed long long __offset,
16608 unsigned short *__ptr) {
16609 vector
unsigned short __tmp =
16610 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16611 __builtin_vsx_stxvd2x_be(__tmp, __offset, __ptr);
16615 signed long long __offset,
16616 signed int *__ptr) {
16617 __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr);
16621 signed long long __offset,
16622 unsigned int *__ptr) {
16623 __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr);
16627 signed long long __offset,
16629 __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr);
16634 signed long long __offset,
16635 signed long long *__ptr) {
16636 __builtin_vsx_stxvd2x_be(__vec, __offset, __ptr);
16640 signed long long __offset,
16641 unsigned long long *__ptr) {
16642 __builtin_vsx_stxvd2x_be(__vec, __offset, __ptr);
16646 signed long long __offset,
16648 __builtin_vsx_stxvd2x_be(__vec, __offset, __ptr);
16652 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16654 signed long long __offset,
16655 signed __int128 *__ptr) {
16656 vec_xst(__vec, __offset, __ptr);
16660 signed long long __offset,
16661 unsigned __int128 *__ptr) {
16662 vec_xst(__vec, __offset, __ptr);
16666 #define vec_xst_be vec_xst 16669 #ifdef __POWER9_VECTOR__ 16670 #define vec_test_data_class(__a, __b) \ 16673 (vector bool int)__builtin_vsx_xvtstdcsp((__a), (__b)), \ 16675 (vector bool long long)__builtin_vsx_xvtstdcdp((__a), (__b)) \ 16691 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16720 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16722 return __builtin_altivec_vminsd(__a, -__a);
16727 return __builtin_altivec_vminsw(__a, -__a);
16731 return __builtin_altivec_vminsh(__a, -__a);
16735 return __builtin_altivec_vminsb(__a, -__a);
16737 #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)
__inline __m128d __m128d const int __mask
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)