27 #error "AltiVec support not enabled" 33 #define __CR6_EQ_REV 1 35 #define __CR6_LT_REV 3 38 #define __VEC_CLASS_FP_SUBNORMAL_N (1 << 0) 39 #define __VEC_CLASS_FP_SUBNORMAL_P (1 << 1) 40 #define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \ 41 __VEC_CLASS_FP_SUBNORMAL_N) 42 #define __VEC_CLASS_FP_ZERO_N (1<<2) 43 #define __VEC_CLASS_FP_ZERO_P (1<<3) 44 #define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | \ 45 __VEC_CLASS_FP_ZERO_N) 46 #define __VEC_CLASS_FP_INFINITY_N (1<<4) 47 #define __VEC_CLASS_FP_INFINITY_P (1<<5) 48 #define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \ 49 __VEC_CLASS_FP_INFINITY_N) 50 #define __VEC_CLASS_FP_NAN (1<<6) 51 #define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \ 52 __VEC_CLASS_FP_SUBNORMAL | \ 53 __VEC_CLASS_FP_ZERO | \ 54 __VEC_CLASS_FP_INFINITY) 56 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__)) 58 #ifdef __POWER9_VECTOR__ 63 vector
signed char __a, vector
signed char __b, vector
unsigned char __c);
67 vector
unsigned char __c);
73 vector
signed short __b,
74 vector
unsigned char __c);
78 vector
unsigned char __c);
81 vector
bool short __a, vector
bool short __b, vector
unsigned char __c);
85 vector
unsigned char __c);
88 vector
signed int __b,
89 vector
unsigned char __c);
92 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned char __c);
99 vector
unsigned char __c);
103 vec_perm(vector
signed long long __a, vector
signed long long __b,
104 vector
unsigned char __c);
106 static __inline__ vector
unsigned long long __ATTRS_o_ai 107 vec_perm(vector
unsigned long long __a, vector
unsigned long long __b,
108 vector
unsigned char __c);
112 vector
unsigned char __c);
116 vector
unsigned char __c);
124 #define __builtin_altivec_abs_v16qi vec_abs 125 #define __builtin_altivec_abs_v8hi vec_abs 126 #define __builtin_altivec_abs_v4si vec_abs 130 return __builtin_altivec_vmaxsb(__a, -__a);
135 return __builtin_altivec_vmaxsh(__a, -__a);
140 return __builtin_altivec_vmaxsw(__a, -__a);
143 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 146 return __builtin_altivec_vmaxsd(__a, -__a);
152 return __builtin_vsx_xvabssp(__a);
154 vector
unsigned int __res =
155 (vector
unsigned int)__a & (vector
unsigned int)(0x7FFFFFFF);
156 return (vector
float)__res;
162 return __builtin_vsx_xvabsdp(__a);
167 #define __builtin_altivec_abss_v16qi vec_abss 168 #define __builtin_altivec_abss_v8hi vec_abss 169 #define __builtin_altivec_abss_v4si vec_abss 173 return __builtin_altivec_vmaxsb(
174 __a, __builtin_altivec_vsubsbs((vector
signed char)(0), __a));
179 return __builtin_altivec_vmaxsh(
180 __a, __builtin_altivec_vsubshs((vector
signed short)(0), __a));
185 return __builtin_altivec_vmaxsw(
186 __a, __builtin_altivec_vsubsws((vector
signed int)(0), __a));
190 #if defined(__POWER9_VECTOR__) 193 vec_absd(vector
unsigned char __a, vector
unsigned char __b) {
194 return __builtin_altivec_vabsdub(
__a, __b);
198 vec_absd(vector
unsigned short __a, vector
unsigned short __b) {
199 return __builtin_altivec_vabsduh(
__a, __b);
203 vec_absd(vector
unsigned int __a, vector
unsigned int __b) {
204 return __builtin_altivec_vabsduw(
__a, __b);
218 return (vector
signed char)__a +
__b;
223 return __a + (vector
signed char)__b;
233 return (vector
unsigned char)__a +
__b;
238 return __a + (vector
unsigned char)__b;
248 return (vector
short)__a +
__b;
252 vector
bool short __b) {
253 return __a + (vector short)__b;
263 return (vector
unsigned short)__a +
__b;
268 return __a + (vector
unsigned short)__b;
278 return (vector
int)__a +
__b;
282 vector
bool int __b) {
283 return __a + (vector int)__b;
293 return (vector
unsigned int)__a +
__b;
298 return __a + (vector
unsigned int)__b;
301 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 303 vec_add(vector
signed long long __a, vector
signed long long __b) {
307 static __inline__ vector
unsigned long long __ATTRS_o_ai 308 vec_add(vector
unsigned long long __a, vector
unsigned long long __b) {
313 vec_add(vector
signed __int128
__a, vector
signed __int128
__b) {
318 vec_add(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
321 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 337 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 340 vector
signed __int128
__c) {
341 return __builtin_altivec_vaddeuqm(
__a,
__b, __c);
345 vec_adde(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
346 vector
unsigned __int128
__c) {
347 return __builtin_altivec_vaddeuqm(
__a,
__b, __c);
353 vector
signed int __c) {
354 vector
signed int __mask = {1, 1, 1, 1};
355 vector
signed int __carry = __c & __mask;
361 vector
unsigned int __c) {
362 vector
unsigned int __mask = {1, 1, 1, 1};
363 vector
unsigned int __carry = __c & __mask;
369 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 371 vec_addec(vector
signed __int128
__a, vector
signed __int128
__b,
372 vector
signed __int128
__c) {
373 return __builtin_altivec_vaddecuq(
__a,
__b, __c);
377 vec_addec(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
378 vector
unsigned __int128
__c) {
379 return __builtin_altivec_vaddecuq(
__a,
__b, __c);
383 vec_addec(vector
signed int __a, vector
signed int __b,
384 vector
signed int __c) {
386 signed int __result[4];
387 for (
int i = 0; i < 4; i++) {
388 unsigned int __tempa = (
unsigned int)
__a[i];
389 unsigned int __tempb = (
unsigned int)
__b[i];
390 unsigned int __tempc = (
unsigned int) __c[i];
391 __tempc = __tempc & 0x00000001;
392 unsigned long long __longa = (
unsigned long long) __tempa;
393 unsigned long long __longb = (
unsigned long long) __tempb;
394 unsigned long long __longc = (
unsigned long long) __tempc;
395 unsigned long long __sum = __longa + __longb + __longc;
396 unsigned long long __res = (__sum >> 32) & 0x01;
397 unsigned long long __tempres = (
unsigned int) __res;
398 __result[i] = (
signed int) __tempres;
401 vector
signed int ret = { __result[0], __result[1], __result[2], __result[3] };
406 vec_addec(vector
unsigned int __a, vector
unsigned int __b,
407 vector
unsigned int __c) {
409 unsigned int __result[4];
410 for (
int i = 0; i < 4; i++) {
411 unsigned int __tempc = __c[i] & 1;
412 unsigned long long __longa = (
unsigned long long)
__a[i];
413 unsigned long long __longb = (
unsigned long long)
__b[i];
414 unsigned long long __longc = (
unsigned long long) __tempc;
415 unsigned long long __sum = __longa + __longb + __longc;
416 unsigned long long __res = (__sum >> 32) & 0x01;
417 unsigned long long __tempres = (
unsigned int) __res;
418 __result[i] = (
signed int) __tempres;
421 vector
unsigned int ret = { __result[0], __result[1], __result[2], __result[3] };
429 #define __builtin_altivec_vaddubm vec_vaddubm 438 return (vector
signed char)__a +
__b;
443 return __a + (vector
signed char)__b;
453 return (vector
unsigned char)__a +
__b;
458 return __a + (vector
unsigned char)__b;
463 #define __builtin_altivec_vadduhm vec_vadduhm 472 return (vector
short)__a +
__b;
476 vector
bool short __b) {
477 return __a + (vector short)__b;
487 return (vector
unsigned short)__a +
__b;
492 return __a + (vector
unsigned short)__b;
497 #define __builtin_altivec_vadduwm vec_vadduwm 506 return (vector
int)__a +
__b;
510 vector
bool int __b) {
511 return __a + (vector int)__b;
521 return (vector
unsigned int)__a +
__b;
526 return __a + (vector
unsigned int)__b;
531 #define __builtin_altivec_vaddfp vec_vaddfp 533 static __inline__ vector
float __attribute__((__always_inline__))
534 vec_vaddfp(vector
float __a, vector
float __b) {
542 return (vector
signed int)__builtin_altivec_vaddcuw((vector
unsigned int)__a,
543 (vector
unsigned int)__b);
548 return __builtin_altivec_vaddcuw(__a, __b);
551 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 553 vec_addc(vector
signed __int128
__a, vector
signed __int128
__b) {
554 return (vector
signed __int128)__builtin_altivec_vaddcuq(
555 (vector
unsigned __int128)__a, (vector
unsigned __int128)__b);
559 vec_addc(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
560 return __builtin_altivec_vaddcuq(__a, __b);
562 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 566 static __inline__ vector
unsigned int __attribute__((__always_inline__))
567 vec_vaddcuw(vector
unsigned int __a, vector
unsigned int __b) {
568 return __builtin_altivec_vaddcuw(__a, __b);
574 vec_adds(vector
signed char __a, vector
signed char __b) {
575 return __builtin_altivec_vaddsbs(__a, __b);
579 vec_adds(vector
bool char __a, vector
signed char __b) {
580 return __builtin_altivec_vaddsbs((vector
signed char)__a, __b);
584 vec_adds(vector
signed char __a, vector
bool char __b) {
585 return __builtin_altivec_vaddsbs(__a, (vector
signed char)__b);
589 vec_adds(vector
unsigned char __a, vector
unsigned char __b) {
590 return __builtin_altivec_vaddubs(__a, __b);
594 vec_adds(vector
bool char __a, vector
unsigned char __b) {
595 return __builtin_altivec_vaddubs((vector
unsigned char)__a, __b);
599 vec_adds(vector
unsigned char __a, vector
bool char __b) {
600 return __builtin_altivec_vaddubs(__a, (vector
unsigned char)__b);
605 return __builtin_altivec_vaddshs(__a, __b);
610 return __builtin_altivec_vaddshs((vector
short)__a, __b);
614 vector
bool short __b) {
615 return __builtin_altivec_vaddshs(__a, (vector
short)__b);
619 vec_adds(vector
unsigned short __a, vector
unsigned short __b) {
620 return __builtin_altivec_vadduhs(__a, __b);
624 vec_adds(vector
bool short __a, vector
unsigned short __b) {
625 return __builtin_altivec_vadduhs((vector
unsigned short)__a, __b);
629 vec_adds(vector
unsigned short __a, vector
bool short __b) {
630 return __builtin_altivec_vadduhs(__a, (vector
unsigned short)__b);
635 return __builtin_altivec_vaddsws(__a, __b);
640 return __builtin_altivec_vaddsws((vector
int)__a, __b);
644 vector
bool int __b) {
645 return __builtin_altivec_vaddsws(__a, (vector
int)__b);
649 vec_adds(vector
unsigned int __a, vector
unsigned int __b) {
650 return __builtin_altivec_vadduws(__a, __b);
654 vec_adds(vector
bool int __a, vector
unsigned int __b) {
655 return __builtin_altivec_vadduws((vector
unsigned int)__a, __b);
659 vec_adds(vector
unsigned int __a, vector
bool int __b) {
660 return __builtin_altivec_vadduws(__a, (vector
unsigned int)__b);
667 return __builtin_altivec_vaddsbs(__a, __b);
672 return __builtin_altivec_vaddsbs((vector
signed char)__a, __b);
677 return __builtin_altivec_vaddsbs(__a, (vector
signed char)__b);
684 return __builtin_altivec_vaddubs(__a, __b);
689 return __builtin_altivec_vaddubs((vector
unsigned char)__a, __b);
694 return __builtin_altivec_vaddubs(__a, (vector
unsigned char)__b);
701 return __builtin_altivec_vaddshs(__a, __b);
706 return __builtin_altivec_vaddshs((vector
short)__a, __b);
710 vector
bool short __b) {
711 return __builtin_altivec_vaddshs(__a, (vector
short)__b);
717 vec_vadduhs(vector
unsigned short __a, vector
unsigned short __b) {
718 return __builtin_altivec_vadduhs(__a, __b);
723 return __builtin_altivec_vadduhs((vector
unsigned short)__a, __b);
728 return __builtin_altivec_vadduhs(__a, (vector
unsigned short)__b);
735 return __builtin_altivec_vaddsws(__a, __b);
740 return __builtin_altivec_vaddsws((vector
int)__a, __b);
744 vector
bool int __b) {
745 return __builtin_altivec_vaddsws(__a, (vector
int)__b);
752 return __builtin_altivec_vadduws(__a, __b);
757 return __builtin_altivec_vadduws((vector
unsigned int)__a, __b);
762 return __builtin_altivec_vadduws(__a, (vector
unsigned int)__b);
765 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 769 vec_vadduqm(vector
signed __int128 __a, vector
signed __int128 __b) {
774 vec_vadduqm(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
781 vec_vaddeuqm(vector
signed __int128 __a, vector
signed __int128 __b,
782 vector
signed __int128
__c) {
783 return __builtin_altivec_vaddeuqm(__a, __b, __c);
787 vec_vaddeuqm(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
788 vector
unsigned __int128 __c) {
789 return __builtin_altivec_vaddeuqm(__a, __b, __c);
795 vec_vaddcuq(vector
signed __int128 __a, vector
signed __int128 __b) {
796 return __builtin_altivec_vaddcuq(__a, __b);
800 vec_vaddcuq(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
801 return __builtin_altivec_vaddcuq(__a, __b);
807 vec_vaddecuq(vector
signed __int128 __a, vector
signed __int128 __b,
808 vector
signed __int128 __c) {
809 return __builtin_altivec_vaddecuq(__a, __b, __c);
813 vec_vaddecuq(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
814 vector
unsigned __int128 __c) {
815 return __builtin_altivec_vaddecuq(__a, __b, __c);
817 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 821 #define __builtin_altivec_vand vec_and 824 vec_and(vector
signed char __a, vector
signed char __b) {
829 vec_and(vector
bool char __a, vector
signed char __b) {
830 return (vector
signed char)__a &
__b;
834 vec_and(vector
signed char __a, vector
bool char __b) {
835 return __a & (vector
signed char)__b;
839 vec_and(vector
unsigned char __a, vector
unsigned char __b) {
844 vec_and(vector
bool char __a, vector
unsigned char __b) {
845 return (vector
unsigned char)__a &
__b;
849 vec_and(vector
unsigned char __a, vector
bool char __b) {
850 return __a & (vector
unsigned char)__b;
854 vector
bool char __b) {
865 return (vector
short)__a &
__b;
869 vector
bool short __b) {
870 return __a & (vector short)__b;
874 vec_and(vector
unsigned short __a, vector
unsigned short __b) {
879 vec_and(vector
bool short __a, vector
unsigned short __b) {
880 return (vector
unsigned short)__a &
__b;
884 vec_and(vector
unsigned short __a, vector
bool short __b) {
885 return __a & (vector
unsigned short)__b;
889 vec_and(vector
bool short __a, vector
bool short __b) {
900 return (vector
int)__a &
__b;
904 vector
bool int __b) {
905 return __a & (vector int)__b;
909 vec_and(vector
unsigned int __a, vector
unsigned int __b) {
914 vec_and(vector
bool int __a, vector
unsigned int __b) {
915 return (vector
unsigned int)__a &
__b;
919 vec_and(vector
unsigned int __a, vector
bool int __b) {
920 return __a & (vector
unsigned int)__b;
924 vector
bool int __b) {
930 vector
unsigned int __res =
931 (vector
unsigned int)__a & (vector
unsigned int)
__b;
932 return (vector
float)__res;
937 vector
unsigned int __res =
938 (vector
unsigned int)__a & (vector
unsigned int)
__b;
939 return (vector
float)__res;
943 vector
bool int __b) {
944 vector
unsigned int __res =
945 (vector
unsigned int)__a & (vector
unsigned int)
__b;
946 return (vector
float)__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
double __a, vector
bool long long __b) {
959 vector
unsigned long long __res =
960 (vector
unsigned long long)__a & (vector
unsigned long long)
__b;
961 return (vector
double)__res;
966 vector
unsigned long long __res =
967 (vector
unsigned long long)__a & (vector
unsigned long long)
__b;
968 return (vector
double)__res;
972 vec_and(vector
signed long long __a, vector
signed long long __b) {
977 vec_and(vector
bool long long __a, vector
signed long long __b) {
978 return (vector
signed long long)__a &
__b;
982 vec_and(vector
signed long long __a, vector
bool long long __b) {
983 return __a & (vector
signed long long)__b;
986 static __inline__ vector
unsigned long long __ATTRS_o_ai 987 vec_and(vector
unsigned long long __a, vector
unsigned long long __b) {
991 static __inline__ vector
unsigned long long __ATTRS_o_ai 992 vec_and(vector
bool long long __a, vector
unsigned long long __b) {
993 return (vector
unsigned long long)__a &
__b;
996 static __inline__ vector
unsigned long long __ATTRS_o_ai 997 vec_and(vector
unsigned long long __a, vector
bool long long __b) {
998 return __a & (vector
unsigned long long)__b;
1002 vec_and(vector
bool long long __a, vector
bool long long __b) {
1010 vec_vand(vector
signed char __a, vector
signed char __b) {
1015 vec_vand(vector
bool char __a, vector
signed char __b) {
1016 return (vector
signed char)__a &
__b;
1020 vec_vand(vector
signed char __a, vector
bool char __b) {
1021 return __a & (vector
signed char)__b;
1025 vec_vand(vector
unsigned char __a, vector
unsigned char __b) {
1030 vec_vand(vector
bool char __a, vector
unsigned char __b) {
1031 return (vector
unsigned char)__a &
__b;
1035 vec_vand(vector
unsigned char __a, vector
bool char __b) {
1036 return __a & (vector
unsigned char)__b;
1040 vector
bool char __b) {
1051 return (vector
short)__a &
__b;
1055 vector
bool short __b) {
1056 return __a & (vector short)__b;
1060 vec_vand(vector
unsigned short __a, vector
unsigned short __b) {
1065 vec_vand(vector
bool short __a, vector
unsigned short __b) {
1066 return (vector
unsigned short)__a &
__b;
1070 vec_vand(vector
unsigned short __a, vector
bool short __b) {
1071 return __a & (vector
unsigned short)__b;
1075 vec_vand(vector
bool short __a, vector
bool short __b) {
1086 return (vector
int)__a &
__b;
1090 vector
bool int __b) {
1091 return __a & (vector int)__b;
1095 vec_vand(vector
unsigned int __a, vector
unsigned int __b) {
1100 vec_vand(vector
bool int __a, vector
unsigned int __b) {
1101 return (vector
unsigned int)__a &
__b;
1105 vec_vand(vector
unsigned int __a, vector
bool int __b) {
1106 return __a & (vector
unsigned int)__b;
1110 vector
bool int __b) {
1116 vector
unsigned int __res =
1117 (vector
unsigned int)__a & (vector
unsigned int)
__b;
1118 return (vector
float)__res;
1123 vector
unsigned int __res =
1124 (vector
unsigned int)__a & (vector
unsigned int)
__b;
1125 return (vector
float)__res;
1129 vector
bool int __b) {
1130 vector
unsigned int __res =
1131 (vector
unsigned int)__a & (vector
unsigned int)
__b;
1132 return (vector
float)__res;
1137 vec_vand(vector
signed long long __a, vector
signed long long __b) {
1142 vec_vand(vector
bool long long __a, vector
signed long long __b) {
1143 return (vector
signed long long)__a &
__b;
1147 vec_vand(vector
signed long long __a, vector
bool long long __b) {
1148 return __a & (vector
signed long long)__b;
1151 static __inline__ vector
unsigned long long __ATTRS_o_ai 1152 vec_vand(vector
unsigned long long __a, vector
unsigned long long __b) {
1156 static __inline__ vector
unsigned long long __ATTRS_o_ai 1157 vec_vand(vector
bool long long __a, vector
unsigned long long __b) {
1158 return (vector
unsigned long long)__a &
__b;
1161 static __inline__ vector
unsigned long long __ATTRS_o_ai 1162 vec_vand(vector
unsigned long long __a, vector
bool long long __b) {
1163 return __a & (vector
unsigned long long)__b;
1167 vec_vand(vector
bool long long __a, vector
bool long long __b) {
1174 #define __builtin_altivec_vandc vec_andc 1177 vec_andc(vector
signed char __a, vector
signed char __b) {
1182 vec_andc(vector
bool char __a, vector
signed char __b) {
1183 return (vector
signed char)__a & ~__b;
1187 vec_andc(vector
signed char __a, vector
bool char __b) {
1188 return __a & ~(vector
signed char)__b;
1192 vec_andc(vector
unsigned char __a, vector
unsigned char __b) {
1197 vec_andc(vector
bool char __a, vector
unsigned char __b) {
1198 return (vector
unsigned char)__a & ~__b;
1202 vec_andc(vector
unsigned char __a, vector
bool char __b) {
1203 return __a & ~(vector
unsigned char)__b;
1207 vector
bool char __b) {
1218 return (vector
short)__a & ~__b;
1222 vector
bool short __b) {
1223 return __a & ~(vector short)__b;
1227 vec_andc(vector
unsigned short __a, vector
unsigned short __b) {
1232 vec_andc(vector
bool short __a, vector
unsigned short __b) {
1233 return (vector
unsigned short)__a & ~__b;
1237 vec_andc(vector
unsigned short __a, vector
bool short __b) {
1238 return __a & ~(vector
unsigned short)__b;
1242 vec_andc(vector
bool short __a, vector
bool short __b) {
1253 return (vector
int)__a & ~__b;
1257 vector
bool int __b) {
1258 return __a & ~(vector int)__b;
1262 vec_andc(vector
unsigned int __a, vector
unsigned int __b) {
1267 vec_andc(vector
bool int __a, vector
unsigned int __b) {
1268 return (vector
unsigned int)__a & ~__b;
1272 vec_andc(vector
unsigned int __a, vector
bool int __b) {
1273 return __a & ~(vector
unsigned int)__b;
1277 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
unsigned int __res =
1291 (vector
unsigned int)__a & ~(vector
unsigned int)
__b;
1292 return (vector
float)__res;
1296 vector
bool int __b) {
1297 vector
unsigned int __res =
1298 (vector
unsigned int)__a & ~(vector
unsigned int)
__b;
1299 return (vector
float)__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
double __a, vector
bool long long __b) {
1312 vector
unsigned long long __res =
1313 (vector
unsigned long long)__a & ~(vector
unsigned long long)
__b;
1314 return (vector
double)__res;
1318 vector
double __b) {
1319 vector
unsigned long long __res =
1320 (vector
unsigned long long)__a & ~(vector
unsigned long long)
__b;
1321 return (vector
double)__res;
1325 vec_andc(vector
signed long long __a, vector
signed long long __b) {
1330 vec_andc(vector
bool long long __a, vector
signed long long __b) {
1331 return (vector
signed long long)__a & ~__b;
1335 vec_andc(vector
signed long long __a, vector
bool long long __b) {
1336 return __a & ~(vector
signed long long)__b;
1339 static __inline__ vector
unsigned long long __ATTRS_o_ai 1340 vec_andc(vector
unsigned long long __a, vector
unsigned long long __b) {
1344 static __inline__ vector
unsigned long long __ATTRS_o_ai 1345 vec_andc(vector
bool long long __a, vector
unsigned long long __b) {
1346 return (vector
unsigned long long)__a & ~__b;
1349 static __inline__ vector
unsigned long long __ATTRS_o_ai 1350 vec_andc(vector
unsigned long long __a, vector
bool long long __b) {
1351 return __a & ~(vector
unsigned long long)__b;
1355 vec_andc(vector
bool long long __a, vector
bool long long __b) {
1369 return (vector
signed char)__a & ~__b;
1374 return __a & ~(vector
signed char)__b;
1378 vec_vandc(vector
unsigned char __a, vector
unsigned char __b) {
1384 return (vector
unsigned char)__a & ~__b;
1389 return __a & ~(vector
unsigned char)__b;
1404 return (vector
short)__a & ~__b;
1408 vector
bool short __b) {
1409 return __a & ~(vector short)__b;
1413 vec_vandc(vector
unsigned short __a, vector
unsigned short __b) {
1418 vec_vandc(vector
bool short __a, vector
unsigned short __b) {
1419 return (vector
unsigned short)__a & ~__b;
1423 vec_vandc(vector
unsigned short __a, vector
bool short __b) {
1424 return __a & ~(vector
unsigned short)__b;
1439 return (vector
int)__a & ~__b;
1443 vector
bool int __b) {
1444 return __a & ~(vector int)__b;
1448 vec_vandc(vector
unsigned int __a, vector
unsigned int __b) {
1454 return (vector
unsigned int)__a & ~__b;
1459 return __a & ~(vector
unsigned int)__b;
1463 vector
bool int __b) {
1469 vector
unsigned int __res =
1470 (vector
unsigned int)__a & ~(vector
unsigned int)
__b;
1471 return (vector
float)__res;
1476 vector
unsigned int __res =
1477 (vector
unsigned int)__a & ~(vector
unsigned int)
__b;
1478 return (vector
float)__res;
1482 vector
bool int __b) {
1483 vector
unsigned int __res =
1484 (vector
unsigned int)__a & ~(vector
unsigned int)
__b;
1485 return (vector
float)__res;
1490 vec_vandc(vector
signed long long __a, vector
signed long long __b) {
1495 vec_vandc(vector
bool long long __a, vector
signed long long __b) {
1496 return (vector
signed long long)__a & ~__b;
1500 vec_vandc(vector
signed long long __a, vector
bool long long __b) {
1501 return __a & ~(vector
signed long long)__b;
1504 static __inline__ vector
unsigned long long __ATTRS_o_ai 1505 vec_vandc(vector
unsigned long long __a, vector
unsigned long long __b) {
1509 static __inline__ vector
unsigned long long __ATTRS_o_ai 1510 vec_vandc(vector
bool long long __a, vector
unsigned long long __b) {
1511 return (vector
unsigned long long)__a & ~__b;
1514 static __inline__ vector
unsigned long long __ATTRS_o_ai 1515 vec_vandc(vector
unsigned long long __a, vector
bool long long __b) {
1516 return __a & ~(vector
unsigned long long)__b;
1520 vec_vandc(vector
bool long long __a, vector
bool long long __b) {
1528 vec_avg(vector
signed char __a, vector
signed char __b) {
1529 return __builtin_altivec_vavgsb(__a, __b);
1533 vec_avg(vector
unsigned char __a, vector
unsigned char __b) {
1534 return __builtin_altivec_vavgub(__a, __b);
1539 return __builtin_altivec_vavgsh(__a, __b);
1543 vec_avg(vector
unsigned short __a, vector
unsigned short __b) {
1544 return __builtin_altivec_vavguh(__a, __b);
1549 return __builtin_altivec_vavgsw(__a, __b);
1553 vec_avg(vector
unsigned int __a, vector
unsigned int __b) {
1554 return __builtin_altivec_vavguw(__a, __b);
1559 static __inline__ vector
signed char __attribute__((__always_inline__))
1560 vec_vavgsb(vector
signed char __a, vector
signed char __b) {
1561 return __builtin_altivec_vavgsb(__a, __b);
1566 static __inline__ vector
unsigned char __attribute__((__always_inline__))
1567 vec_vavgub(vector
unsigned char __a, vector
unsigned char __b) {
1568 return __builtin_altivec_vavgub(__a, __b);
1573 static __inline__ vector
short __attribute__((__always_inline__))
1574 vec_vavgsh(vector
short __a, vector
short __b) {
1575 return __builtin_altivec_vavgsh(__a, __b);
1580 static __inline__ vector
unsigned short __attribute__((__always_inline__))
1581 vec_vavguh(vector
unsigned short __a, vector
unsigned short __b) {
1582 return __builtin_altivec_vavguh(__a, __b);
1587 static __inline__ vector
int __attribute__((__always_inline__))
1588 vec_vavgsw(vector
int __a, vector
int __b) {
1589 return __builtin_altivec_vavgsw(__a, __b);
1594 static __inline__ vector
unsigned int __attribute__((__always_inline__))
1595 vec_vavguw(vector
unsigned int __a, vector
unsigned int __b) {
1596 return __builtin_altivec_vavguw(__a, __b);
1603 return __builtin_vsx_xvrspip(__a);
1605 return __builtin_altivec_vrfip(__a);
1611 return __builtin_vsx_xvrdpip(__a);
1618 vec_vrfip(vector
float __a) {
1619 return __builtin_altivec_vrfip(__a);
1624 static __inline__ vector
int __attribute__((__always_inline__))
1625 vec_cmpb(vector
float __a, vector
float __b) {
1626 return __builtin_altivec_vcmpbfp(__a, __b);
1631 static __inline__ vector
int __attribute__((__always_inline__))
1632 vec_vcmpbfp(vector
float __a, vector
float __b) {
1633 return __builtin_altivec_vcmpbfp(__a, __b);
1640 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)__a,
1645 vec_cmpeq(vector
unsigned char __a, vector
unsigned char __b) {
1646 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)__a,
1652 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)__a,
1658 return (vector
bool short)__builtin_altivec_vcmpequh(__a, __b);
1662 vec_cmpeq(vector
unsigned short __a, vector
unsigned short __b) {
1663 return (vector
bool short)__builtin_altivec_vcmpequh((vector
short)__a,
1669 return (vector
bool short)__builtin_altivec_vcmpequh((vector
short)__a,
1675 return (vector
bool int)__builtin_altivec_vcmpequw(__a, __b);
1679 vec_cmpeq(vector
unsigned int __a, vector
unsigned int __b) {
1680 return (vector
bool int)__builtin_altivec_vcmpequw((vector
int)__a,
1685 vector
bool int __b) {
1686 return (vector
bool int)__builtin_altivec_vcmpequw((vector
int)__a,
1690 #ifdef __POWER8_VECTOR__ 1692 vec_cmpeq(vector
signed long long __a, vector
signed long long __b) {
1693 return (vector
bool long long)__builtin_altivec_vcmpequd(__a, __b);
1697 vec_cmpeq(vector
unsigned long long __a, vector
unsigned long long __b) {
1698 return (vector
bool long long)__builtin_altivec_vcmpequd(
1699 (vector
long long)__a, (vector
long long)__b);
1703 vec_cmpeq(vector
bool long long __a, vector
bool long long __b) {
1704 return (vector
bool long long)__builtin_altivec_vcmpequd(
1705 (vector
long long)__a, (vector
long long)__b);
1713 return (vector
bool int)__builtin_vsx_xvcmpeqsp(__a, __b);
1715 return (vector
bool int)__builtin_altivec_vcmpeqfp(__a, __b);
1721 vec_cmpeq(vector
double __a, vector
double __b) {
1722 return (vector
bool long long)__builtin_vsx_xvcmpeqdp(__a, __b);
1726 #ifdef __POWER9_VECTOR__ 1730 vec_cmpne(vector
bool char __a, vector
bool char __b) {
1731 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)__a,
1736 vec_cmpne(vector
signed char __a, vector
signed char __b) {
1737 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)__a,
1742 vec_cmpne(vector
unsigned char __a, vector
unsigned char __b) {
1743 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)__a,
1748 vec_cmpne(vector
bool short __a, vector
bool short __b) {
1749 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)__a,
1754 vec_cmpne(vector
signed short __a, vector
signed short __b) {
1755 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)__a,
1760 vec_cmpne(vector
unsigned short __a, vector
unsigned short __b) {
1761 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)__a,
1766 vec_cmpne(vector
bool int __a, vector
bool int __b) {
1767 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)__a,
1772 vec_cmpne(vector
signed int __a, vector
signed int __b) {
1773 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)__a,
1778 vec_cmpne(vector
unsigned int __a, vector
unsigned int __b) {
1779 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)__a,
1784 vec_cmpne(vector
bool long long __a, vector
bool long long __b) {
1785 return (vector
bool long long)
1786 ~(__builtin_altivec_vcmpequd((vector
long long)__a, (vector
long long)__b));
1790 vec_cmpne(vector
signed long long __a, vector
signed long long __b) {
1791 return (vector
bool long long)
1792 ~(__builtin_altivec_vcmpequd((vector
long long)__a, (vector
long long)__b));
1796 vec_cmpne(vector
unsigned long long __a, vector
unsigned long long __b) {
1797 return (vector
bool long long)
1798 ~(__builtin_altivec_vcmpequd((vector
long long)__a, (vector
long long)__b));
1802 vec_cmpne(vector
float __a, vector
float __b) {
1803 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)__a,
1808 vec_cmpne(vector
double __a, vector
double __b) {
1809 return (vector
bool long long)
1810 ~(__builtin_altivec_vcmpequd((vector
long long)__a, (vector
long long)__b));
1816 vec_cmpnez(vector
signed char __a, vector
signed char __b) {
1817 return (vector
bool char)__builtin_altivec_vcmpnezb((vector
char)__a,
1822 vec_cmpnez(vector
unsigned char __a, vector
unsigned char __b) {
1823 return (vector
bool char)__builtin_altivec_vcmpnezb((vector
char)__a,
1828 vec_cmpnez(vector
signed short __a, vector
signed short __b) {
1829 return (vector
bool short)__builtin_altivec_vcmpnezh((vector
short)__a,
1834 vec_cmpnez(vector
unsigned short __a, vector
unsigned short __b) {
1835 return (vector
bool short)__builtin_altivec_vcmpnezh((vector
short)__a,
1840 vec_cmpnez(vector
signed int __a, vector
signed int __b) {
1841 return (vector
bool int)__builtin_altivec_vcmpnezw((vector
int)__a,
1846 vec_cmpnez(vector
unsigned int __a, vector
unsigned int __b) {
1847 return (vector
bool int)__builtin_altivec_vcmpnezw((vector
int)__a,
1852 vec_cntlz_lsbb(vector
signed char __a) {
1853 #ifdef __LITTLE_ENDIAN__ 1854 return __builtin_altivec_vctzlsbb(__a);
1856 return __builtin_altivec_vclzlsbb(__a);
1861 vec_cntlz_lsbb(vector
unsigned char __a) {
1862 #ifdef __LITTLE_ENDIAN__ 1863 return __builtin_altivec_vctzlsbb(__a);
1865 return __builtin_altivec_vclzlsbb(__a);
1870 vec_cnttz_lsbb(vector
signed char __a) {
1871 #ifdef __LITTLE_ENDIAN__ 1872 return __builtin_altivec_vclzlsbb(__a);
1874 return __builtin_altivec_vctzlsbb(__a);
1879 vec_cnttz_lsbb(vector
unsigned char __a) {
1880 #ifdef __LITTLE_ENDIAN__ 1881 return __builtin_altivec_vclzlsbb(__a);
1883 return __builtin_altivec_vctzlsbb(__a);
1888 vec_parity_lsbb(vector
unsigned int __a) {
1889 return __builtin_altivec_vprtybw(__a);
1893 vec_parity_lsbb(vector
signed int __a) {
1894 return __builtin_altivec_vprtybw(__a);
1897 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 1898 vec_parity_lsbb(vector
unsigned __int128 __a) {
1899 return __builtin_altivec_vprtybq(__a);
1902 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 1903 vec_parity_lsbb(vector
signed __int128 __a) {
1904 return __builtin_altivec_vprtybq(__a);
1907 static __inline__ vector
unsigned long long __ATTRS_o_ai 1908 vec_parity_lsbb(vector
unsigned long long __a) {
1909 return __builtin_altivec_vprtybd(__a);
1912 static __inline__ vector
unsigned long long __ATTRS_o_ai 1913 vec_parity_lsbb(vector
signed long long __a) {
1914 return __builtin_altivec_vprtybd(__a);
1923 return (vector
bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1927 vec_cmpgt(vector
unsigned char __a, vector
unsigned char __b) {
1928 return (vector
bool char)__builtin_altivec_vcmpgtub(__a, __b);
1933 return (vector
bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1937 vec_cmpgt(vector
unsigned short __a, vector
unsigned short __b) {
1938 return (vector
bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1943 return (vector
bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1947 vec_cmpgt(vector
unsigned int __a, vector
unsigned int __b) {
1948 return (vector
bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1951 #ifdef __POWER8_VECTOR__ 1953 vec_cmpgt(vector
signed long long __a, vector
signed long long __b) {
1954 return (vector
bool long long)__builtin_altivec_vcmpgtsd(__a, __b);
1958 vec_cmpgt(vector
unsigned long long __a, vector
unsigned long long __b) {
1959 return (vector
bool long long)__builtin_altivec_vcmpgtud(__a, __b);
1966 return (vector
bool int)__builtin_vsx_xvcmpgtsp(__a, __b);
1968 return (vector
bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1974 vec_cmpgt(vector
double __a, vector
double __b) {
1975 return (vector
bool long long)__builtin_vsx_xvcmpgtdp(__a, __b);
1987 vec_cmpge(vector
unsigned char __a, vector
unsigned char __b) {
1992 vec_cmpge(vector
signed short __a, vector
signed short __b) {
1997 vec_cmpge(vector
unsigned short __a, vector
unsigned short __b) {
2007 vec_cmpge(vector
unsigned int __a, vector
unsigned int __b) {
2014 return (vector
bool int)__builtin_vsx_xvcmpgesp(__a, __b);
2016 return (vector
bool int)__builtin_altivec_vcmpgefp(__a, __b);
2022 vec_cmpge(vector
double __a, vector
double __b) {
2023 return (vector
bool long long)__builtin_vsx_xvcmpgedp(__a, __b);
2027 #ifdef __POWER8_VECTOR__ 2029 vec_cmpge(vector
signed long long __a, vector
signed long long __b) {
2034 vec_cmpge(vector
unsigned long long __a, vector
unsigned long long __b) {
2041 static __inline__ vector
bool int __attribute__((__always_inline__))
2042 vec_vcmpgefp(vector
float __a, vector
float __b) {
2043 return (vector
bool int)__builtin_altivec_vcmpgefp(__a, __b);
2048 static __inline__ vector
bool char __attribute__((__always_inline__))
2049 vec_vcmpgtsb(vector
signed char __a, vector
signed char __b) {
2050 return (vector
bool char)__builtin_altivec_vcmpgtsb(__a, __b);
2055 static __inline__ vector
bool char __attribute__((__always_inline__))
2056 vec_vcmpgtub(vector
unsigned char __a, vector
unsigned char __b) {
2057 return (vector
bool char)__builtin_altivec_vcmpgtub(__a, __b);
2062 static __inline__ vector
bool short __attribute__((__always_inline__))
2063 vec_vcmpgtsh(vector
short __a, vector
short __b) {
2064 return (vector
bool short)__builtin_altivec_vcmpgtsh(__a, __b);
2069 static __inline__ vector
bool short __attribute__((__always_inline__))
2070 vec_vcmpgtuh(vector
unsigned short __a, vector
unsigned short __b) {
2071 return (vector
bool short)__builtin_altivec_vcmpgtuh(__a, __b);
2076 static __inline__ vector
bool int __attribute__((__always_inline__))
2077 vec_vcmpgtsw(vector
int __a, vector
int __b) {
2078 return (vector
bool int)__builtin_altivec_vcmpgtsw(__a, __b);
2083 static __inline__ vector
bool int __attribute__((__always_inline__))
2084 vec_vcmpgtuw(vector
unsigned int __a, vector
unsigned int __b) {
2085 return (vector
bool int)__builtin_altivec_vcmpgtuw(__a, __b);
2090 static __inline__ vector
bool int __attribute__((__always_inline__))
2091 vec_vcmpgtfp(vector
float __a, vector
float __b) {
2092 return (vector
bool int)__builtin_altivec_vcmpgtfp(__a, __b);
2103 vec_cmple(vector
unsigned char __a, vector
unsigned char __b) {
2108 vec_cmple(vector
signed short __a, vector
signed short __b) {
2113 vec_cmple(vector
unsigned short __a, vector
unsigned short __b) {
2123 vec_cmple(vector
unsigned int __a, vector
unsigned int __b) {
2134 vec_cmple(vector
double __a, vector
double __b) {
2139 #ifdef __POWER8_VECTOR__ 2141 vec_cmple(vector
signed long long __a, vector
signed long long __b) {
2146 vec_cmple(vector
unsigned long long __a, vector
unsigned long long __b) {
2159 vec_cmplt(vector
unsigned char __a, vector
unsigned char __b) {
2169 vec_cmplt(vector
unsigned short __a, vector
unsigned short __b) {
2179 vec_cmplt(vector
unsigned int __a, vector
unsigned int __b) {
2190 vec_cmplt(vector
double __a, vector
double __b) {
2195 #ifdef __POWER8_VECTOR__ 2197 vec_cmplt(vector
signed long long __a, vector
signed long long __b) {
2202 vec_cmplt(vector
unsigned long long __a, vector
unsigned long long __b) {
2209 vec_popcnt(vector
signed char __a) {
2210 return __builtin_altivec_vpopcntb(__a);
2213 vec_popcnt(vector
unsigned char __a) {
2214 return __builtin_altivec_vpopcntb(__a);
2217 vec_popcnt(vector
signed short __a) {
2218 return __builtin_altivec_vpopcnth(__a);
2221 vec_popcnt(vector
unsigned short __a) {
2222 return __builtin_altivec_vpopcnth(__a);
2225 vec_popcnt(vector
signed int __a) {
2226 return __builtin_altivec_vpopcntw(__a);
2229 vec_popcnt(vector
unsigned int __a) {
2230 return __builtin_altivec_vpopcntw(__a);
2233 vec_popcnt(vector
signed long long __a) {
2234 return __builtin_altivec_vpopcntd(__a);
2236 static __inline__ vector
unsigned long long __ATTRS_o_ai 2237 vec_popcnt(vector
unsigned long long __a) {
2238 return __builtin_altivec_vpopcntd(__a);
2244 vec_cntlz(vector
signed char __a) {
2245 return __builtin_altivec_vclzb(__a);
2248 vec_cntlz(vector
unsigned char __a) {
2249 return __builtin_altivec_vclzb(__a);
2252 vec_cntlz(vector
signed short __a) {
2253 return __builtin_altivec_vclzh(__a);
2256 vec_cntlz(vector
unsigned short __a) {
2257 return __builtin_altivec_vclzh(__a);
2260 vec_cntlz(vector
signed int __a) {
2261 return __builtin_altivec_vclzw(__a);
2264 vec_cntlz(vector
unsigned int __a) {
2265 return __builtin_altivec_vclzw(__a);
2268 vec_cntlz(vector
signed long long __a) {
2269 return __builtin_altivec_vclzd(__a);
2271 static __inline__ vector
unsigned long long __ATTRS_o_ai 2272 vec_cntlz(vector
unsigned long long __a) {
2273 return __builtin_altivec_vclzd(__a);
2277 #ifdef __POWER9_VECTOR__ 2282 vec_cnttz(vector
signed char __a) {
2283 return __builtin_altivec_vctzb(__a);
2286 vec_cnttz(vector
unsigned char __a) {
2287 return __builtin_altivec_vctzb(__a);
2290 vec_cnttz(vector
signed short __a) {
2291 return __builtin_altivec_vctzh(__a);
2294 vec_cnttz(vector
unsigned short __a) {
2295 return __builtin_altivec_vctzh(__a);
2298 vec_cnttz(vector
signed int __a) {
2299 return __builtin_altivec_vctzw(__a);
2302 vec_cnttz(vector
unsigned int __a) {
2303 return __builtin_altivec_vctzw(__a);
2306 vec_cnttz(vector
signed long long __a) {
2307 return __builtin_altivec_vctzd(__a);
2309 static __inline__ vector
unsigned long long __ATTRS_o_ai 2310 vec_cnttz(vector
unsigned long long __a) {
2311 return __builtin_altivec_vctzd(__a);
2317 vec_first_match_index(vector
signed char __a, vector
signed 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
unsigned char __a, vector
unsigned char __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) >> 3;
2341 return __res[0] >> 3;
2345 vec_first_match_index(vector
signed short __a, vector
signed 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
unsigned short __a, vector
unsigned short __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) >> 4;
2369 return __res[0] >> 4;
2373 vec_first_match_index(vector
signed int __a, vector
signed 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;
2387 vec_first_match_index(vector
unsigned int __a, vector
unsigned int __b) {
2388 vector
unsigned long long __res =
2389 #ifdef __LITTLE_ENDIAN__ 2390 vec_cnttz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2392 vec_cntlz((vector
unsigned long long)
vec_cmpeq(__a, __b));
2394 if (__res[0] == 64) {
2395 return (__res[1] + 64) >> 5;
2397 return __res[0] >> 5;
2403 vec_first_match_or_eos_index(vector
signed char __a, vector
signed char __b) {
2408 vector
bool char __tmp1 =
vec_cmpeq(__a, __b);
2409 vector
bool char __tmp2 = __tmp1 |
2410 vec_cmpeq((vector
signed char)__tmp1, __a) |
2411 vec_cmpeq((vector
signed char)__tmp1, __b);
2413 vector
unsigned long long __res =
2414 #ifdef __LITTLE_ENDIAN__ 2415 vec_cnttz((vector
unsigned long long)__tmp2);
2417 vec_cntlz((vector
unsigned long long)__tmp2);
2419 if (__res[0] == 64) {
2420 return (__res[1] + 64) >> 3;
2422 return __res[0] >> 3;
2426 vec_first_match_or_eos_index(vector
unsigned char __a,
2427 vector
unsigned char __b) {
2428 vector
bool char __tmp1 =
vec_cmpeq(__a, __b);
2429 vector
bool char __tmp2 = __tmp1 |
2430 vec_cmpeq((vector
unsigned char)__tmp1, __a) |
2431 vec_cmpeq((vector
unsigned char)__tmp1, __b);
2433 vector
unsigned long long __res =
2434 #ifdef __LITTLE_ENDIAN__ 2435 vec_cnttz((vector
unsigned long long)__tmp2);
2437 vec_cntlz((vector
unsigned long long)__tmp2);
2439 if (__res[0] == 64) {
2440 return (__res[1] + 64) >> 3;
2442 return __res[0] >> 3;
2446 vec_first_match_or_eos_index(vector
signed short __a, vector
signed short __b) {
2447 vector
bool short __tmp1 =
vec_cmpeq(__a, __b);
2448 vector
bool short __tmp2 = __tmp1 |
2449 vec_cmpeq((vector
signed short)__tmp1, __a) |
2450 vec_cmpeq((vector
signed short)__tmp1, __b);
2452 vector
unsigned long long __res =
2453 #ifdef __LITTLE_ENDIAN__ 2454 vec_cnttz((vector
unsigned long long)__tmp2);
2456 vec_cntlz((vector
unsigned long long)__tmp2);
2458 if (__res[0] == 64) {
2459 return (__res[1] + 64) >> 4;
2461 return __res[0] >> 4;
2465 vec_first_match_or_eos_index(vector
unsigned short __a,
2466 vector
unsigned short __b) {
2467 vector
bool short __tmp1 =
vec_cmpeq(__a, __b);
2468 vector
bool short __tmp2 = __tmp1 |
2469 vec_cmpeq((vector
unsigned short)__tmp1, __a) |
2470 vec_cmpeq((vector
unsigned short)__tmp1, __b);
2472 vector
unsigned long long __res =
2473 #ifdef __LITTLE_ENDIAN__ 2474 vec_cnttz((vector
unsigned long long)__tmp2);
2476 vec_cntlz((vector
unsigned long long)__tmp2);
2478 if (__res[0] == 64) {
2479 return (__res[1] + 64) >> 4;
2481 return __res[0] >> 4;
2485 vec_first_match_or_eos_index(vector
signed int __a, vector
signed int __b) {
2486 vector
bool int __tmp1 =
vec_cmpeq(__a, __b);
2487 vector
bool int __tmp2 = __tmp1 |
vec_cmpeq((vector
signed int)__tmp1, __a) |
2488 vec_cmpeq((vector
signed int)__tmp1, __b);
2490 vector
unsigned long long __res =
2491 #ifdef __LITTLE_ENDIAN__ 2492 vec_cnttz((vector
unsigned long long)__tmp2);
2494 vec_cntlz((vector
unsigned long long)__tmp2);
2496 if (__res[0] == 64) {
2497 return (__res[1] + 64) >> 5;
2499 return __res[0] >> 5;
2503 vec_first_match_or_eos_index(vector
unsigned int __a, vector
unsigned int __b) {
2504 vector
bool int __tmp1 =
vec_cmpeq(__a, __b);
2505 vector
bool int __tmp2 = __tmp1 |
2506 vec_cmpeq((vector
unsigned int)__tmp1, __a) |
2507 vec_cmpeq((vector
unsigned int)__tmp1, __b);
2509 vector
unsigned long long __res =
2510 #ifdef __LITTLE_ENDIAN__ 2511 vec_cnttz((vector
unsigned long long)__tmp2);
2513 vec_cntlz((vector
unsigned long long)__tmp2);
2515 if (__res[0] == 64) {
2516 return (__res[1] + 64) >> 5;
2518 return __res[0] >> 5;
2524 vec_first_mismatch_index(vector
signed char __a, vector
signed 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
unsigned char __a, vector
unsigned char __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) >> 3;
2548 return __res[0] >> 3;
2552 vec_first_mismatch_index(vector
signed short __a, vector
signed 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
unsigned short __a, vector
unsigned short __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) >> 4;
2576 return __res[0] >> 4;
2580 vec_first_mismatch_index(vector
signed int __a, vector
signed 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;
2594 vec_first_mismatch_index(vector
unsigned int __a, vector
unsigned int __b) {
2595 vector
unsigned long long __res =
2596 #ifdef __LITTLE_ENDIAN__ 2597 vec_cnttz((vector
unsigned long long)vec_cmpne(__a, __b));
2599 vec_cntlz((vector
unsigned long long)vec_cmpne(__a, __b));
2601 if (__res[0] == 64) {
2602 return (__res[1] + 64) >> 5;
2604 return __res[0] >> 5;
2610 vec_first_mismatch_or_eos_index(vector
signed char __a,
2611 vector
signed char __b) {
2612 vector
unsigned long long __res =
2613 #ifdef __LITTLE_ENDIAN__ 2614 vec_cnttz((vector
unsigned long long)vec_cmpnez(__a, __b));
2616 vec_cntlz((vector
unsigned long long)vec_cmpnez(__a, __b));
2618 if (__res[0] == 64) {
2619 return (__res[1] + 64) >> 3;
2621 return __res[0] >> 3;
2625 vec_first_mismatch_or_eos_index(vector
unsigned char __a,
2626 vector
unsigned char __b) {
2627 vector
unsigned long long __res =
2628 #ifdef __LITTLE_ENDIAN__ 2629 vec_cnttz((vector
unsigned long long)vec_cmpnez(__a, __b));
2631 vec_cntlz((vector
unsigned long long)vec_cmpnez(__a, __b));
2633 if (__res[0] == 64) {
2634 return (__res[1] + 64) >> 3;
2636 return __res[0] >> 3;
2640 vec_first_mismatch_or_eos_index(vector
signed short __a,
2641 vector
signed short __b) {
2642 vector
unsigned long long __res =
2643 #ifdef __LITTLE_ENDIAN__ 2644 vec_cnttz((vector
unsigned long long)vec_cmpnez(__a, __b));
2646 vec_cntlz((vector
unsigned long long)vec_cmpnez(__a, __b));
2648 if (__res[0] == 64) {
2649 return (__res[1] + 64) >> 4;
2651 return __res[0] >> 4;
2655 vec_first_mismatch_or_eos_index(vector
unsigned short __a,
2656 vector
unsigned short __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) >> 4;
2666 return __res[0] >> 4;
2670 vec_first_mismatch_or_eos_index(vector
signed int __a, vector
signed int __b) {
2671 vector
unsigned long long __res =
2672 #ifdef __LITTLE_ENDIAN__ 2673 vec_cnttz((vector
unsigned long long)vec_cmpnez(__a, __b));
2675 vec_cntlz((vector
unsigned long long)vec_cmpnez(__a, __b));
2677 if (__res[0] == 64) {
2678 return (__res[1] + 64) >> 5;
2680 return __res[0] >> 5;
2684 vec_first_mismatch_or_eos_index(vector
unsigned int __a,
2685 vector
unsigned int __b) {
2686 vector
unsigned long long __res =
2687 #ifdef __LITTLE_ENDIAN__ 2688 vec_cnttz((vector
unsigned long long)vec_cmpnez(__a, __b));
2690 vec_cntlz((vector
unsigned long long)vec_cmpnez(__a, __b));
2692 if (__res[0] == 64) {
2693 return (__res[1] + 64) >> 5;
2695 return __res[0] >> 5;
2699 vec_insert_exp(vector
double __a, vector
unsigned long long __b) {
2700 return __builtin_vsx_xviexpdp((vector
unsigned long long)__a,__b);
2704 vec_insert_exp(vector
unsigned long long __a, vector
unsigned long long __b) {
2705 return __builtin_vsx_xviexpdp(__a,__b);
2709 vec_insert_exp(vector
float __a, vector
unsigned int __b) {
2710 return __builtin_vsx_xviexpsp((vector
unsigned int)__a,__b);
2714 vec_insert_exp(vector
unsigned int __a, vector
unsigned int __b) {
2715 return __builtin_vsx_xviexpsp(__a,__b);
2718 #if defined(__powerpc64__) 2719 static __inline__ vector
signed char __ATTRS_o_ai vec_xl_len(
signed char *__a,
2721 return (vector
signed char)__builtin_vsx_lxvl(__a, (__b << 56));
2725 vec_xl_len(
unsigned char *__a,
size_t __b) {
2726 return (vector
unsigned char)__builtin_vsx_lxvl(__a, (__b << 56));
2729 static __inline__ vector
signed short __ATTRS_o_ai vec_xl_len(
signed short *__a,
2731 return (vector
signed short)__builtin_vsx_lxvl(__a, (__b << 56));
2735 vec_xl_len(
unsigned short *__a,
size_t __b) {
2736 return (vector
unsigned short)__builtin_vsx_lxvl(__a, (__b << 56));
2739 static __inline__ vector
signed int __ATTRS_o_ai vec_xl_len(
signed int *__a,
2741 return (vector
signed int)__builtin_vsx_lxvl(__a, (__b << 56));
2744 static __inline__ vector
unsigned int __ATTRS_o_ai vec_xl_len(
unsigned int *__a,
2746 return (vector
unsigned int)__builtin_vsx_lxvl(__a, (__b << 56));
2749 static __inline__ vector
float __ATTRS_o_ai vec_xl_len(
float *__a,
size_t __b) {
2750 return (vector
float)__builtin_vsx_lxvl(__a, (__b << 56));
2754 vec_xl_len(
signed __int128 *__a,
size_t __b) {
2755 return (vector
signed __int128)__builtin_vsx_lxvl(__a, (__b << 56));
2758 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 2759 vec_xl_len(
unsigned __int128 *__a,
size_t __b) {
2760 return (vector
unsigned __int128)__builtin_vsx_lxvl(__a, (__b << 56));
2764 vec_xl_len(
signed long long *__a,
size_t __b) {
2765 return (vector
signed long long)__builtin_vsx_lxvl(__a, (__b << 56));
2768 static __inline__ vector
unsigned long long __ATTRS_o_ai 2769 vec_xl_len(
unsigned long long *__a,
size_t __b) {
2770 return (vector
unsigned long long)__builtin_vsx_lxvl(__a, (__b << 56));
2773 static __inline__ vector
double __ATTRS_o_ai vec_xl_len(
double *__a,
2775 return (vector
double)__builtin_vsx_lxvl(__a, (__b << 56));
2778 static __inline__ vector
double __ATTRS_o_ai vec_xl_len_r(
unsigned char *__a,
2780 vector
unsigned char __res =
2781 (vector
unsigned char)__builtin_vsx_lxvll(__a, (__b << 56));
2782 #ifdef __LITTLE_ENDIAN__ 2783 vector
unsigned char __mask =
2784 (vector
unsigned char)__builtin_altivec_lvsr(16 - __b, (
int *)
NULL);
2785 __res = (vector
unsigned char)__builtin_altivec_vperm_4si(
2786 (vector
int)__res, (vector int)__res, __mask);
2792 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned char __a,
2795 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2798 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed char __a,
2799 signed char *__b,
size_t __c) {
2800 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2803 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed short __a,
2804 signed short *__b,
size_t __c) {
2805 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2808 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned short __a,
2809 unsigned short *__b,
2811 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2814 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed int __a,
2815 signed int *__b,
size_t __c) {
2816 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2819 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned int __a,
2820 unsigned int *__b,
size_t __c) {
2821 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2824 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
float __a,
float *__b,
2826 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2829 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed __int128 __a,
2830 signed __int128 *__b,
2832 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2835 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned __int128 __a,
2836 unsigned __int128 *__b,
2838 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2841 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed long long __a,
2842 signed long long *__b,
2844 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2847 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned long long __a,
2848 unsigned long long *__b,
2850 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2853 static __inline__
void __ATTRS_o_ai vec_xst_len(vector
double __a,
double *__b,
2855 return __builtin_vsx_stxvl((vector
int)__a, __b, (__c << 56));
2858 static __inline__
void __ATTRS_o_ai vec_xst_len_r(vector
unsigned char __a,
2861 #ifdef __LITTLE_ENDIAN__ 2862 vector
unsigned char __mask =
2863 (vector
unsigned char)__builtin_altivec_lvsl(16 - __c, (
int *)
NULL);
2864 vector
unsigned char __res =
2865 __builtin_altivec_vperm_4si((vector
int)__a, (vector
int)__a, __mask);
2866 return __builtin_vsx_stxvll((vector
int)__res, __b, (__c << 56));
2868 return __builtin_vsx_stxvll((vector
int)__a, __b, (__c << 56));
2877 static __inline__ vector
float __ATTRS_o_ai vec_cpsgn(vector
float __a,
2879 return __builtin_vsx_xvcpsgnsp(__a, __b);
2882 static __inline__ vector
double __ATTRS_o_ai vec_cpsgn(vector
double __a,
2883 vector
double __b) {
2884 return __builtin_vsx_xvcpsgndp(__a, __b);
2891 #define vec_ctf(__a, __b) \ 2892 _Generic((__a), vector int \ 2893 : (vector float)__builtin_altivec_vcfsx((__a), (__b)), \ 2894 vector unsigned int \ 2895 : (vector float)__builtin_altivec_vcfux((vector int)(__a), (__b)), \ 2896 vector unsigned long long \ 2897 : (__builtin_convertvector((vector unsigned long long)(__a), \ 2899 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \ 2901 vector signed long long \ 2902 : (__builtin_convertvector((vector signed long long)(__a), \ 2904 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \ 2907 #define vec_ctf(__a, __b) \ 2908 _Generic((__a), vector int \ 2909 : (vector float)__builtin_altivec_vcfsx((__a), (__b)), \ 2910 vector unsigned int \ 2911 : (vector float)__builtin_altivec_vcfux((vector int)(__a), (__b))) 2916 #define vec_vcfux __builtin_altivec_vcfux 2920 #define vec_vcfsx(__a, __b) __builtin_altivec_vcfsx((vector int)(__a), (__b)) 2925 #define vec_cts(__a, __b) \ 2926 _Generic((__a), vector float \ 2927 : __builtin_altivec_vctsxs((__a), (__b)), vector double \ 2929 vector double __ret = \ 2931 (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \ 2933 __builtin_convertvector(__ret, vector signed long long); \ 2936 #define vec_cts __builtin_altivec_vctsxs 2941 #define vec_vctsxs __builtin_altivec_vctsxs 2946 #define vec_ctu(__a, __b) \ 2947 _Generic((__a), vector float \ 2948 : __builtin_altivec_vctuxs((__a), (__b)), vector double \ 2950 vector double __ret = \ 2952 (vector double)(vector unsigned long long)((0x3ffULL + __b) \ 2954 __builtin_convertvector(__ret, vector unsigned long long); \ 2957 #define vec_ctu __builtin_altivec_vctuxs 2962 #define vec_vctuxs __builtin_altivec_vctuxs 2967 vec_sld(vector
signed int, vector
signed int,
unsigned const int __c);
2971 return __builtin_convertvector(__a, vector
signed int);
2977 return __builtin_convertvector(__a, vector
signed long long);
2980 static __inline__ vector
signed int __attribute__((__always_inline__))
2981 vec_signed2(vector
double __a, vector
double __b) {
2982 return (vector
signed int) { __a[0], __a[1], __b[0], __b[1] };
2986 vec_signede(vector
double __a) {
2987 #ifdef __LITTLE_ENDIAN__ 2988 vector
signed int __ret = __builtin_vsx_xvcvdpsxws(__a);
2989 return vec_sld(__ret, __ret, 12);
2991 return __builtin_vsx_xvcvdpsxws(__a);
2996 vec_signedo(vector
double __a) {
2997 #ifdef __LITTLE_ENDIAN__ 2998 return __builtin_vsx_xvcvdpsxws(__a);
3000 vector
signed int __ret = __builtin_vsx_xvcvdpsxws(__a);
3001 return vec_sld(__ret, __ret, 12);
3009 vec_sld(vector
unsigned int, vector
unsigned int,
unsigned const int __c);
3013 return __builtin_convertvector(__a, vector
unsigned int);
3017 static __inline__ vector
unsigned long long __ATTRS_o_ai 3019 return __builtin_convertvector(__a, vector
unsigned long long);
3022 static __inline__ vector
unsigned int __attribute__((__always_inline__))
3023 vec_unsigned2(vector
double __a, vector
double __b) {
3024 return (vector
unsigned int) { __a[0], __a[1], __b[0], __b[1] };
3028 vec_unsignede(vector
double __a) {
3029 #ifdef __LITTLE_ENDIAN__ 3030 vector
unsigned int __ret = __builtin_vsx_xvcvdpuxws(__a);
3031 return vec_sld(__ret, __ret, 12);
3033 return __builtin_vsx_xvcvdpuxws(__a);
3038 vec_unsignedo(vector
double __a) {
3039 #ifdef __LITTLE_ENDIAN__ 3040 return __builtin_vsx_xvcvdpuxws(__a);
3042 vector
unsigned int __ret = __builtin_vsx_xvcvdpuxws(__a);
3043 return vec_sld(__ret, __ret, 12);
3051 vec_sld(vector
float, vector
float,
unsigned const int __c);
3055 return __builtin_convertvector(__a, vector
float);
3060 return __builtin_convertvector(__a, vector
float);
3065 vec_float2(vector
signed long long __a, vector
signed long long __b) {
3066 return (vector
float) { __a[0], __a[1], __b[0], __b[1] };
3070 vec_float2(vector
unsigned long long __a, vector
unsigned long long __b) {
3071 return (vector
float) { __a[0], __a[1], __b[0], __b[1] };
3075 vec_float2(vector
double __a, vector
double __b) {
3076 return (vector
float) { __a[0], __a[1], __b[0], __b[1] };
3080 vec_floate(vector
signed long long __a) {
3081 #ifdef __LITTLE_ENDIAN__ 3082 vector
float __ret = __builtin_vsx_xvcvsxdsp(__a);
3083 return vec_sld(__ret, __ret, 12);
3085 return __builtin_vsx_xvcvsxdsp(__a);
3090 vec_floate(vector
unsigned long long __a) {
3091 #ifdef __LITTLE_ENDIAN__ 3092 vector
float __ret = __builtin_vsx_xvcvuxdsp(__a);
3093 return vec_sld(__ret, __ret, 12);
3095 return __builtin_vsx_xvcvuxdsp(__a);
3100 vec_floate(vector
double __a) {
3101 #ifdef __LITTLE_ENDIAN__ 3102 vector
float __ret = __builtin_vsx_xvcvdpsp(__a);
3103 return vec_sld(__ret, __ret, 12);
3105 return __builtin_vsx_xvcvdpsp(__a);
3110 vec_floato(vector
signed long long __a) {
3111 #ifdef __LITTLE_ENDIAN__ 3112 return __builtin_vsx_xvcvsxdsp(__a);
3114 vector
float __ret = __builtin_vsx_xvcvsxdsp(__a);
3115 return vec_sld(__ret, __ret, 12);
3120 vec_floato(vector
unsigned long long __a) {
3121 #ifdef __LITTLE_ENDIAN__ 3122 return __builtin_vsx_xvcvuxdsp(__a);
3124 vector
float __ret = __builtin_vsx_xvcvuxdsp(__a);
3125 return vec_sld(__ret, __ret, 12);
3130 vec_floato(vector
double __a) {
3131 #ifdef __LITTLE_ENDIAN__ 3132 return __builtin_vsx_xvcvdpsp(__a);
3134 vector
float __ret = __builtin_vsx_xvcvdpsp(__a);
3135 return vec_sld(__ret, __ret, 12);
3144 vec_double(vector
signed long long __a) {
3145 return __builtin_convertvector(__a, vector
double);
3149 vec_double(vector
unsigned long long __a) {
3150 return __builtin_convertvector(__a, vector
double);
3154 vec_doublee(vector
signed int __a) {
3155 #ifdef __LITTLE_ENDIAN__ 3156 return __builtin_vsx_xvcvsxwdp(
vec_sld(__a, __a, 4));
3158 return __builtin_vsx_xvcvsxwdp(__a);
3163 vec_doublee(vector
unsigned int __a) {
3164 #ifdef __LITTLE_ENDIAN__ 3165 return __builtin_vsx_xvcvuxwdp(
vec_sld(__a, __a, 4));
3167 return __builtin_vsx_xvcvuxwdp(__a);
3172 vec_doublee(vector
float __a) {
3173 #ifdef __LITTLE_ENDIAN__ 3174 return __builtin_vsx_xvcvspdp(
vec_sld(__a, __a, 4));
3176 return __builtin_vsx_xvcvspdp(__a);
3181 vec_doubleh(vector
signed int __a) {
3182 vector
double __ret = {__a[0], __a[1]};
3187 vec_doubleh(vector
unsigned int __a) {
3188 vector
double __ret = {__a[0], __a[1]};
3193 vec_doubleh(vector
float __a) {
3194 vector
double __ret = {__a[0], __a[1]};
3199 vec_doublel(vector
signed int __a) {
3200 vector
double __ret = {__a[2], __a[3]};
3205 vec_doublel(vector
unsigned int __a) {
3206 vector
double __ret = {__a[2], __a[3]};
3211 vec_doublel(vector
float __a) {
3212 vector
double __ret = {__a[2], __a[3]};
3217 vec_doubleo(vector
signed int __a) {
3218 #ifdef __LITTLE_ENDIAN__ 3219 return __builtin_vsx_xvcvsxwdp(__a);
3221 return __builtin_vsx_xvcvsxwdp(
vec_sld(__a, __a, 4));
3226 vec_doubleo(vector
unsigned int __a) {
3227 #ifdef __LITTLE_ENDIAN__ 3228 return __builtin_vsx_xvcvuxwdp(__a);
3230 return __builtin_vsx_xvcvuxwdp(
vec_sld(__a, __a, 4));
3235 vec_doubleo(vector
float __a) {
3236 #ifdef __LITTLE_ENDIAN__ 3237 return __builtin_vsx_xvcvspdp(__a);
3239 return __builtin_vsx_xvcvspdp(
vec_sld(__a, __a, 4));
3250 vec_div(vector
signed char __a, vector
signed char __b) {
3255 vec_div(vector
unsigned char __a, vector
unsigned char __b) {
3260 vec_div(vector
signed short __a, vector
signed short __b) {
3265 vec_div(vector
unsigned short __a, vector
unsigned short __b) {
3270 vec_div(vector
signed int __a, vector
signed int __b) {
3275 vec_div(vector
unsigned int __a, vector
unsigned int __b) {
3281 vec_div(vector
signed long long __a, vector
signed long long __b) {
3285 static __inline__ vector
unsigned long long __ATTRS_o_ai 3286 vec_div(vector
unsigned long long __a, vector
unsigned long long __b) {
3296 vector
double __b) {
3303 static __inline__
void __attribute__((__always_inline__)) vec_dss(
int __a) {
3304 __builtin_altivec_dss(__a);
3309 static __inline__
void __attribute__((__always_inline__)) vec_dssall(
void) {
3310 __builtin_altivec_dssall();
3314 #define vec_dst(__PTR, __CW, __STR) \ 3316 { __builtin_altivec_dst((const void *)(__PTR), (__CW), (__STR)); }) 3319 #define vec_dstst(__PTR, __CW, __STR) \ 3321 { __builtin_altivec_dstst((const void *)(__PTR), (__CW), (__STR)); }) 3324 #define vec_dststt(__PTR, __CW, __STR) \ 3326 { __builtin_altivec_dststt((const void *)(__PTR), (__CW), (__STR)); }) 3329 #define vec_dstt(__PTR, __CW, __STR) \ 3331 { __builtin_altivec_dstt((const void *)(__PTR), (__CW), (__STR)); }) 3335 #ifdef __POWER8_VECTOR__ 3337 vec_eqv(vector
signed char __a, vector
signed char __b) {
3338 return (vector
signed char)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3339 (vector
unsigned int)__b);
3343 vec_eqv(vector
unsigned char __a, vector
unsigned char __b) {
3344 return (vector
unsigned char)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3345 (vector
unsigned int)__b);
3348 static __inline__ vector
bool char __ATTRS_o_ai vec_eqv(vector
bool char __a,
3349 vector
bool char __b) {
3350 return (vector
bool char)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3351 (vector
unsigned int)__b);
3355 vec_eqv(vector
signed short __a, vector
signed short __b) {
3356 return (vector
signed short)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3357 (vector
unsigned int)__b);
3361 vec_eqv(vector
unsigned short __a, vector
unsigned short __b) {
3362 return (vector
unsigned short)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3363 (vector
unsigned int)__b);
3367 vec_eqv(vector
bool short __a, vector
bool short __b) {
3368 return (vector
bool short)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3369 (vector
unsigned int)__b);
3373 vec_eqv(vector
signed int __a, vector
signed int __b) {
3374 return (vector
signed int)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3375 (vector
unsigned int)__b);
3379 vec_eqv(vector
unsigned int __a, vector
unsigned int __b) {
3380 return __builtin_vsx_xxleqv(__a, __b);
3383 static __inline__ vector
bool int __ATTRS_o_ai vec_eqv(vector
bool int __a,
3384 vector
bool int __b) {
3385 return (vector
bool int)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3386 (vector
unsigned int)__b);
3390 vec_eqv(vector
signed long long __a, vector
signed long long __b) {
3391 return (vector
signed long long)__builtin_vsx_xxleqv(
3392 (vector
unsigned int)__a, (vector
unsigned int)__b);
3395 static __inline__ vector
unsigned long long __ATTRS_o_ai 3396 vec_eqv(vector
unsigned long long __a, vector
unsigned long long __b) {
3397 return (vector
unsigned long long)__builtin_vsx_xxleqv(
3398 (vector
unsigned int)__a, (vector
unsigned int)__b);
3402 vec_eqv(vector
bool long long __a, vector
bool long long __b) {
3403 return (vector
bool long long)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3404 (vector
unsigned int)__b);
3407 static __inline__ vector
float __ATTRS_o_ai vec_eqv(vector
float __a,
3409 return (vector
float)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3410 (vector
unsigned int)__b);
3413 static __inline__ vector
double __ATTRS_o_ai vec_eqv(vector
double __a,
3414 vector
double __b) {
3415 return (vector
double)__builtin_vsx_xxleqv((vector
unsigned int)__a,
3416 (vector
unsigned int)__b);
3422 static __inline__ vector
float __attribute__((__always_inline__))
3423 vec_expte(vector
float __a) {
3424 return __builtin_altivec_vexptefp(__a);
3429 static __inline__ vector
float __attribute__((__always_inline__))
3430 vec_vexptefp(vector
float __a) {
3431 return __builtin_altivec_vexptefp(__a);
3438 return __builtin_vsx_xvrspim(__a);
3440 return __builtin_altivec_vrfim(__a);
3446 return __builtin_vsx_xvrdpim(__a);
3452 static __inline__ vector
float __attribute__((__always_inline__))
3453 vec_vrfim(vector
float __a) {
3454 return __builtin_altivec_vrfim(__a);
3460 vec_ld(
int __a,
const vector
signed char *__b) {
3461 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3466 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3470 vec_ld(
int __a,
const vector
unsigned char *__b) {
3471 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3476 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3480 vec_ld(
int __a,
const vector
bool char *__b) {
3481 return (vector
bool char)__builtin_altivec_lvx(__a, __b);
3485 const vector
short *__b) {
3486 return (vector
short)__builtin_altivec_lvx(__a, __b);
3490 return (vector
short)__builtin_altivec_lvx(__a, __b);
3494 vec_ld(
int __a,
const vector
unsigned short *__b) {
3495 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3500 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3504 vec_ld(
int __a,
const vector
bool short *__b) {
3505 return (vector
bool short)__builtin_altivec_lvx(__a, __b);
3509 const vector pixel *__b) {
3510 return (vector pixel)__builtin_altivec_lvx(__a, __b);
3514 const vector
int *__b) {
3515 return (vector
int)__builtin_altivec_lvx(__a, __b);
3519 return (vector
int)__builtin_altivec_lvx(__a, __b);
3523 vec_ld(
int __a,
const vector
unsigned int *__b) {
3524 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3529 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3533 vec_ld(
int __a,
const vector
bool int *__b) {
3534 return (vector
bool int)__builtin_altivec_lvx(__a, __b);
3538 const vector
float *__b) {
3539 return (vector
float)__builtin_altivec_lvx(__a, __b);
3543 return (vector
float)__builtin_altivec_lvx(__a, __b);
3550 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3555 return (vector
signed char)__builtin_altivec_lvx(__a, __b);
3559 vec_lvx(
int __a,
const vector
unsigned char *__b) {
3560 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3565 return (vector
unsigned char)__builtin_altivec_lvx(__a, __b);
3570 return (vector
bool char)__builtin_altivec_lvx(__a, __b);
3574 const vector
short *__b) {
3575 return (vector
short)__builtin_altivec_lvx(__a, __b);
3579 return (vector
short)__builtin_altivec_lvx(__a, __b);
3583 vec_lvx(
int __a,
const vector
unsigned short *__b) {
3584 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3589 return (vector
unsigned short)__builtin_altivec_lvx(__a, __b);
3594 return (vector
bool short)__builtin_altivec_lvx(__a, __b);
3598 const vector pixel *__b) {
3599 return (vector pixel)__builtin_altivec_lvx(__a, __b);
3603 const vector
int *__b) {
3604 return (vector
int)__builtin_altivec_lvx(__a, __b);
3608 return (vector
int)__builtin_altivec_lvx(__a, __b);
3612 vec_lvx(
int __a,
const vector
unsigned int *__b) {
3613 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3618 return (vector
unsigned int)__builtin_altivec_lvx(__a, __b);
3623 return (vector
bool int)__builtin_altivec_lvx(__a, __b);
3627 const vector
float *__b) {
3628 return (vector
float)__builtin_altivec_lvx(__a, __b);
3632 return (vector
float)__builtin_altivec_lvx(__a, __b);
3639 return (vector
signed char)__builtin_altivec_lvebx(__a, __b);
3644 return (vector
unsigned char)__builtin_altivec_lvebx(__a, __b);
3648 return (vector
short)__builtin_altivec_lvehx(__a, __b);
3653 return (vector
unsigned short)__builtin_altivec_lvehx(__a, __b);
3657 return (vector
int)__builtin_altivec_lvewx(__a, __b);
3662 return (vector
unsigned int)__builtin_altivec_lvewx(__a, __b);
3666 return (vector
float)__builtin_altivec_lvewx(__a, __b);
3673 return (vector
signed char)__builtin_altivec_lvebx(__a, __b);
3678 return (vector
unsigned char)__builtin_altivec_lvebx(__a, __b);
3685 return (vector
short)__builtin_altivec_lvehx(__a, __b);
3690 return (vector
unsigned short)__builtin_altivec_lvehx(__a, __b);
3696 return (vector
int)__builtin_altivec_lvewx(__a, __b);
3701 return (vector
unsigned int)__builtin_altivec_lvewx(__a, __b);
3706 return (vector
float)__builtin_altivec_lvewx(__a, __b);
3713 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3718 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3722 vec_ldl(
int __a,
const vector
unsigned char *__b) {
3723 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3728 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3733 return (vector
bool char)__builtin_altivec_lvxl(__a, __b);
3737 const vector
short *__b) {
3738 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3742 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3746 vec_ldl(
int __a,
const vector
unsigned short *__b) {
3747 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3752 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3757 return (vector
bool short)__builtin_altivec_lvxl(__a, __b);
3761 const vector pixel *__b) {
3762 return (vector pixel
short)__builtin_altivec_lvxl(__a, __b);
3766 const vector
int *__b) {
3767 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3771 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3775 vec_ldl(
int __a,
const vector
unsigned int *__b) {
3776 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3781 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3786 return (vector
bool int)__builtin_altivec_lvxl(__a, __b);
3790 const vector
float *__b) {
3791 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3795 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3802 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3807 return (vector
signed char)__builtin_altivec_lvxl(__a, __b);
3812 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3817 return (vector
unsigned char)__builtin_altivec_lvxl(__a, __b);
3822 return (vector
bool char)__builtin_altivec_lvxl(__a, __b);
3826 const vector
short *__b) {
3827 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3832 return (vector
short)__builtin_altivec_lvxl(__a, __b);
3837 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3842 return (vector
unsigned short)__builtin_altivec_lvxl(__a, __b);
3847 return (vector
bool short)__builtin_altivec_lvxl(__a, __b);
3851 const vector pixel *__b) {
3852 return (vector pixel)__builtin_altivec_lvxl(__a, __b);
3856 const vector
int *__b) {
3857 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3861 return (vector
int)__builtin_altivec_lvxl(__a, __b);
3866 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3871 return (vector
unsigned int)__builtin_altivec_lvxl(__a, __b);
3876 return (vector
bool int)__builtin_altivec_lvxl(__a, __b);
3880 const vector
float *__b) {
3881 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3886 return (vector
float)__builtin_altivec_lvxl(__a, __b);
3891 static __inline__ vector
float __attribute__((__always_inline__))
3892 vec_loge(vector
float __a) {
3893 return __builtin_altivec_vlogefp(__a);
3898 static __inline__ vector
float __attribute__((__always_inline__))
3899 vec_vlogefp(vector
float __a) {
3900 return __builtin_altivec_vlogefp(__a);
3905 #ifdef __LITTLE_ENDIAN__ 3907 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3908 loads/stores")))
vec_lvsl(
int __a,
const signed char *__b) {
3909 vector
unsigned char mask =
3910 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3911 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3912 7, 6, 5, 4, 3, 2, 1, 0};
3913 return vec_perm(mask, mask, reverse);
3918 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3922 #ifdef __LITTLE_ENDIAN__ 3924 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3925 loads/stores")))
vec_lvsl(
int __a,
const unsigned char *__b) {
3926 vector
unsigned char mask =
3927 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3928 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3929 7, 6, 5, 4, 3, 2, 1, 0};
3930 return vec_perm(mask, mask, reverse);
3935 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3939 #ifdef __LITTLE_ENDIAN__ 3941 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3942 loads/stores")))
vec_lvsl(
int __a,
const short *__b) {
3943 vector
unsigned char mask =
3944 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3945 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3946 7, 6, 5, 4, 3, 2, 1, 0};
3947 return vec_perm(mask, mask, reverse);
3952 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3956 #ifdef __LITTLE_ENDIAN__ 3958 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3959 loads/stores")))
vec_lvsl(
int __a,
const unsigned short *__b) {
3960 vector
unsigned char mask =
3961 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3962 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3963 7, 6, 5, 4, 3, 2, 1, 0};
3964 return vec_perm(mask, mask, reverse);
3969 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3973 #ifdef __LITTLE_ENDIAN__ 3975 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3976 loads/stores")))
vec_lvsl(
int __a,
const int *__b) {
3977 vector
unsigned char mask =
3978 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3979 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3980 7, 6, 5, 4, 3, 2, 1, 0};
3981 return vec_perm(mask, mask, reverse);
3986 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3990 #ifdef __LITTLE_ENDIAN__ 3992 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 3993 loads/stores")))
vec_lvsl(
int __a,
const unsigned int *__b) {
3994 vector
unsigned char mask =
3995 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
3996 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
3997 7, 6, 5, 4, 3, 2, 1, 0};
3998 return vec_perm(mask, mask, reverse);
4003 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
4007 #ifdef __LITTLE_ENDIAN__ 4009 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4010 loads/stores")))
vec_lvsl(
int __a,
const float *__b) {
4011 vector
unsigned char mask =
4012 (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
4013 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4014 7, 6, 5, 4, 3, 2, 1, 0};
4015 return vec_perm(mask, mask, reverse);
4020 return (vector
unsigned char)__builtin_altivec_lvsl(__a, __b);
4026 #ifdef __LITTLE_ENDIAN__ 4028 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4029 loads/stores")))
vec_lvsr(
int __a,
const signed char *__b) {
4030 vector
unsigned char mask =
4031 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4032 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4033 7, 6, 5, 4, 3, 2, 1, 0};
4034 return vec_perm(mask, mask, reverse);
4039 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4043 #ifdef __LITTLE_ENDIAN__ 4045 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4046 loads/stores")))
vec_lvsr(
int __a,
const unsigned char *__b) {
4047 vector
unsigned char mask =
4048 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4049 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4050 7, 6, 5, 4, 3, 2, 1, 0};
4051 return vec_perm(mask, mask, reverse);
4056 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4060 #ifdef __LITTLE_ENDIAN__ 4062 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4063 loads/stores")))
vec_lvsr(
int __a,
const short *__b) {
4064 vector
unsigned char mask =
4065 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4066 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4067 7, 6, 5, 4, 3, 2, 1, 0};
4068 return vec_perm(mask, mask, reverse);
4073 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4077 #ifdef __LITTLE_ENDIAN__ 4079 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4080 loads/stores")))
vec_lvsr(
int __a,
const unsigned short *__b) {
4081 vector
unsigned char mask =
4082 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4083 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4084 7, 6, 5, 4, 3, 2, 1, 0};
4085 return vec_perm(mask, mask, reverse);
4090 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4094 #ifdef __LITTLE_ENDIAN__ 4096 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4097 loads/stores")))
vec_lvsr(
int __a,
const int *__b) {
4098 vector
unsigned char mask =
4099 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4100 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4101 7, 6, 5, 4, 3, 2, 1, 0};
4102 return vec_perm(mask, mask, reverse);
4107 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4111 #ifdef __LITTLE_ENDIAN__ 4113 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4114 loads/stores")))
vec_lvsr(
int __a,
const unsigned int *__b) {
4115 vector
unsigned char mask =
4116 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4117 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4118 7, 6, 5, 4, 3, 2, 1, 0};
4119 return vec_perm(mask, mask, reverse);
4124 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4128 #ifdef __LITTLE_ENDIAN__ 4130 __attribute__((__deprecated__(
"use assignment for unaligned little endian \ 4131 loads/stores")))
vec_lvsr(
int __a,
const float *__b) {
4132 vector
unsigned char mask =
4133 (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4134 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4135 7, 6, 5, 4, 3, 2, 1, 0};
4136 return vec_perm(mask, mask, reverse);
4141 return (vector
unsigned char)__builtin_altivec_lvsr(__a, __b);
4147 vec_mladd(vector
signed short, vector
signed short, vector
signed short);
4149 vec_mladd(vector
signed short, vector
unsigned short, vector
unsigned short);
4151 vec_mladd(vector
unsigned short, vector
signed short, vector
signed short);
4153 vec_mladd(vector
unsigned short, vector
unsigned short, vector
unsigned short);
4156 vector
signed short __a, vector
signed short __b, vector
signed short __c) {
4161 vec_madd(vector
signed short __a, vector
unsigned short __b,
4162 vector
unsigned short __c) {
4167 vec_madd(vector
unsigned short __a, vector
signed short __b,
4168 vector
signed short __c) {
4173 vec_madd(vector
unsigned short __a, vector
unsigned short __b,
4174 vector
unsigned short __c) {
4182 return __builtin_vsx_xvmaddasp(__a, __b, __c);
4184 return __builtin_altivec_vmaddfp(__a, __b, __c);
4191 vector
double __c) {
4192 return __builtin_vsx_xvmaddadp(__a, __b, __c);
4198 static __inline__ vector
float __attribute__((__always_inline__))
4199 vec_vmaddfp(vector
float __a, vector
float __b, vector
float __c) {
4200 return __builtin_altivec_vmaddfp(__a, __b, __c);
4205 static __inline__ vector
signed short __attribute__((__always_inline__))
4206 vec_madds(vector
signed short __a, vector
signed short __b,
4207 vector
signed short __c) {
4208 return __builtin_altivec_vmhaddshs(__a, __b, __c);
4212 static __inline__ vector
signed short __attribute__((__always_inline__))
4213 vec_vmhaddshs(vector
signed short __a, vector
signed short __b,
4214 vector
signed short __c) {
4215 return __builtin_altivec_vmhaddshs(__a, __b, __c);
4221 static __inline__ vector
float __ATTRS_o_ai vec_msub(vector
float __a,
4224 return __builtin_vsx_xvmsubasp(__a, __b, __c);
4227 static __inline__ vector
double __ATTRS_o_ai vec_msub(vector
double __a,
4229 vector
double __c) {
4230 return __builtin_vsx_xvmsubadp(__a, __b, __c);
4237 vec_max(vector
signed char __a, vector
signed char __b) {
4238 return __builtin_altivec_vmaxsb(__a, __b);
4242 vec_max(vector
bool char __a, vector
signed char __b) {
4243 return __builtin_altivec_vmaxsb((vector
signed char)__a, __b);
4247 vec_max(vector
signed char __a, vector
bool char __b) {
4248 return __builtin_altivec_vmaxsb(__a, (vector
signed char)__b);
4252 vec_max(vector
unsigned char __a, vector
unsigned char __b) {
4253 return __builtin_altivec_vmaxub(__a, __b);
4257 vec_max(vector
bool char __a, vector
unsigned char __b) {
4258 return __builtin_altivec_vmaxub((vector
unsigned char)__a, __b);
4262 vec_max(vector
unsigned char __a, vector
bool char __b) {
4263 return __builtin_altivec_vmaxub(__a, (vector
unsigned char)__b);
4268 return __builtin_altivec_vmaxsh(__a, __b);
4273 return __builtin_altivec_vmaxsh((vector
short)__a, __b);
4277 vector
bool short __b) {
4278 return __builtin_altivec_vmaxsh(__a, (vector
short)__b);
4282 vec_max(vector
unsigned short __a, vector
unsigned short __b) {
4283 return __builtin_altivec_vmaxuh(__a, __b);
4287 vec_max(vector
bool short __a, vector
unsigned short __b) {
4288 return __builtin_altivec_vmaxuh((vector
unsigned short)__a, __b);
4292 vec_max(vector
unsigned short __a, vector
bool short __b) {
4293 return __builtin_altivec_vmaxuh(__a, (vector
unsigned short)__b);
4298 return __builtin_altivec_vmaxsw(__a, __b);
4303 return __builtin_altivec_vmaxsw((vector
int)__a, __b);
4307 vector
bool int __b) {
4308 return __builtin_altivec_vmaxsw(__a, (vector
int)__b);
4312 vec_max(vector
unsigned int __a, vector
unsigned int __b) {
4313 return __builtin_altivec_vmaxuw(__a, __b);
4317 vec_max(vector
bool int __a, vector
unsigned int __b) {
4318 return __builtin_altivec_vmaxuw((vector
unsigned int)__a, __b);
4322 vec_max(vector
unsigned int __a, vector
bool int __b) {
4323 return __builtin_altivec_vmaxuw(__a, (vector
unsigned int)__b);
4326 #ifdef __POWER8_VECTOR__ 4328 vec_max(vector
signed long long __a, vector
signed long long __b) {
4329 return __builtin_altivec_vmaxsd(__a, __b);
4333 vec_max(vector
bool long long __a, vector
signed long long __b) {
4334 return __builtin_altivec_vmaxsd((vector
signed long long)__a, __b);
4338 vec_max(vector
signed long long __a, vector
bool long long __b) {
4339 return __builtin_altivec_vmaxsd(__a, (vector
signed long long)__b);
4342 static __inline__ vector
unsigned long long __ATTRS_o_ai 4343 vec_max(vector
unsigned long long __a, vector
unsigned long long __b) {
4344 return __builtin_altivec_vmaxud(__a, __b);
4347 static __inline__ vector
unsigned long long __ATTRS_o_ai 4348 vec_max(vector
bool long long __a, vector
unsigned long long __b) {
4349 return __builtin_altivec_vmaxud((vector
unsigned long long)__a, __b);
4352 static __inline__ vector
unsigned long long __ATTRS_o_ai 4353 vec_max(vector
unsigned long long __a, vector
bool long long __b) {
4354 return __builtin_altivec_vmaxud(__a, (vector
unsigned long long)__b);
4361 return __builtin_vsx_xvmaxsp(__a, __b);
4363 return __builtin_altivec_vmaxfp(__a, __b);
4369 vector
double __b) {
4370 return __builtin_vsx_xvmaxdp(__a, __b);
4378 return __builtin_altivec_vmaxsb(__a, __b);
4383 return __builtin_altivec_vmaxsb((vector
signed char)__a, __b);
4388 return __builtin_altivec_vmaxsb(__a, (vector
signed char)__b);
4395 return __builtin_altivec_vmaxub(__a, __b);
4400 return __builtin_altivec_vmaxub((vector
unsigned char)__a, __b);
4405 return __builtin_altivec_vmaxub(__a, (vector
unsigned char)__b);
4412 return __builtin_altivec_vmaxsh(__a, __b);
4417 return __builtin_altivec_vmaxsh((vector
short)__a, __b);
4421 vector
bool short __b) {
4422 return __builtin_altivec_vmaxsh(__a, (vector
short)__b);
4428 vec_vmaxuh(vector
unsigned short __a, vector
unsigned short __b) {
4429 return __builtin_altivec_vmaxuh(__a, __b);
4434 return __builtin_altivec_vmaxuh((vector
unsigned short)__a, __b);
4439 return __builtin_altivec_vmaxuh(__a, (vector
unsigned short)__b);
4446 return __builtin_altivec_vmaxsw(__a, __b);
4451 return __builtin_altivec_vmaxsw((vector
int)__a, __b);
4455 vector
bool int __b) {
4456 return __builtin_altivec_vmaxsw(__a, (vector
int)__b);
4463 return __builtin_altivec_vmaxuw(__a, __b);
4468 return __builtin_altivec_vmaxuw((vector
unsigned int)__a, __b);
4473 return __builtin_altivec_vmaxuw(__a, (vector
unsigned int)__b);
4478 static __inline__ vector
float __attribute__((__always_inline__))
4479 vec_vmaxfp(vector
float __a, vector
float __b) {
4481 return __builtin_vsx_xvmaxsp(__a, __b);
4483 return __builtin_altivec_vmaxfp(__a, __b);
4492 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4493 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4494 0x06, 0x16, 0x07, 0x17));
4500 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4501 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4502 0x06, 0x16, 0x07, 0x17));
4508 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4509 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4510 0x06, 0x16, 0x07, 0x17));
4516 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4517 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4518 0x06, 0x07, 0x16, 0x17));
4522 vec_mergeh(vector
unsigned short __a, vector
unsigned short __b) {
4524 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4525 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4526 0x06, 0x07, 0x16, 0x17));
4532 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4533 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4534 0x06, 0x07, 0x16, 0x17));
4540 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4541 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4542 0x06, 0x07, 0x16, 0x17));
4548 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4549 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4550 0x14, 0x15, 0x16, 0x17));
4556 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4557 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4558 0x14, 0x15, 0x16, 0x17));
4562 vector
bool int __b) {
4564 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4565 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4566 0x14, 0x15, 0x16, 0x17));
4572 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4573 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4574 0x14, 0x15, 0x16, 0x17));
4579 vec_mergeh(vector
signed long long __a, vector
signed long long __b) {
4581 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4582 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4583 0x14, 0x15, 0x16, 0x17));
4587 vec_mergeh(vector
signed long long __a, vector
bool long long __b) {
4588 return vec_perm(__a, (vector
signed long long)__b,
4589 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4590 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4591 0x14, 0x15, 0x16, 0x17));
4595 vec_mergeh(vector
bool long long __a, vector
signed long long __b) {
4596 return vec_perm((vector
signed long long)__a, __b,
4597 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4598 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4599 0x14, 0x15, 0x16, 0x17));
4602 static __inline__ vector
unsigned long long __ATTRS_o_ai 4603 vec_mergeh(vector
unsigned long long __a, vector
unsigned long long __b) {
4605 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4606 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4607 0x14, 0x15, 0x16, 0x17));
4610 static __inline__ vector
unsigned long long __ATTRS_o_ai 4611 vec_mergeh(vector
unsigned long long __a, vector
bool long long __b) {
4612 return vec_perm(__a, (vector
unsigned long long)__b,
4613 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4614 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4615 0x14, 0x15, 0x16, 0x17));
4618 static __inline__ vector
unsigned long long __ATTRS_o_ai 4619 vec_mergeh(vector
bool long long __a, vector
unsigned long long __b) {
4620 return vec_perm((vector
unsigned long long)__a, __b,
4621 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4622 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4623 0x14, 0x15, 0x16, 0x17));
4627 vec_mergeh(vector
bool long long __a, vector
bool long long __b) {
4629 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4630 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4631 0x14, 0x15, 0x16, 0x17));
4635 vector
double __b) {
4637 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4638 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4639 0x14, 0x15, 0x16, 0x17));
4642 vec_mergeh(vector
double __a, vector
bool long long __b) {
4643 return vec_perm(__a, (vector
double)__b,
4644 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4645 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4646 0x14, 0x15, 0x16, 0x17));
4649 vec_mergeh(vector
bool long long __a, vector
double __b) {
4650 return vec_perm((vector
double)__a, __b,
4651 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
4652 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
4653 0x14, 0x15, 0x16, 0x17));
4659 #define __builtin_altivec_vmrghb vec_vmrghb 4664 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4665 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4666 0x06, 0x16, 0x07, 0x17));
4672 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4673 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4674 0x06, 0x16, 0x07, 0x17));
4680 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
4681 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
4682 0x06, 0x16, 0x07, 0x17));
4687 #define __builtin_altivec_vmrghh vec_vmrghh 4692 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4693 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4694 0x06, 0x07, 0x16, 0x17));
4698 vec_vmrghh(vector
unsigned short __a, vector
unsigned short __b) {
4700 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4701 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4702 0x06, 0x07, 0x16, 0x17));
4708 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4709 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4710 0x06, 0x07, 0x16, 0x17));
4716 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
4717 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
4718 0x06, 0x07, 0x16, 0x17));
4723 #define __builtin_altivec_vmrghw vec_vmrghw 4728 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4729 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4730 0x14, 0x15, 0x16, 0x17));
4736 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4737 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4738 0x14, 0x15, 0x16, 0x17));
4742 vector
bool int __b) {
4744 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4745 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4746 0x14, 0x15, 0x16, 0x17));
4752 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
4753 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
4754 0x14, 0x15, 0x16, 0x17));
4762 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4763 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4764 0x0E, 0x1E, 0x0F, 0x1F));
4770 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4771 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4772 0x0E, 0x1E, 0x0F, 0x1F));
4778 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4779 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4780 0x0E, 0x1E, 0x0F, 0x1F));
4786 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4787 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4788 0x0E, 0x0F, 0x1E, 0x1F));
4792 vec_mergel(vector
unsigned short __a, vector
unsigned short __b) {
4794 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4795 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4796 0x0E, 0x0F, 0x1E, 0x1F));
4802 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4803 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4804 0x0E, 0x0F, 0x1E, 0x1F));
4810 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4811 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4812 0x0E, 0x0F, 0x1E, 0x1F));
4818 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4819 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4820 0x1C, 0x1D, 0x1E, 0x1F));
4826 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4827 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4828 0x1C, 0x1D, 0x1E, 0x1F));
4832 vector
bool int __b) {
4834 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4835 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4836 0x1C, 0x1D, 0x1E, 0x1F));
4842 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4843 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4844 0x1C, 0x1D, 0x1E, 0x1F));
4849 vec_mergel(vector
signed long long __a, vector
signed long long __b) {
4851 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4852 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4853 0x1C, 0x1D, 0x1E, 0x1F));
4856 vec_mergel(vector
signed long long __a, vector
bool long long __b) {
4857 return vec_perm(__a, (vector
signed 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));
4863 vec_mergel(vector
bool long long __a, vector
signed long long __b) {
4864 return vec_perm((vector
signed long long)__a, __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
unsigned long long __a, vector
unsigned long long __b) {
4872 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4873 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4874 0x1C, 0x1D, 0x1E, 0x1F));
4876 static __inline__ vector
unsigned long long __ATTRS_o_ai 4877 vec_mergel(vector
unsigned long long __a, vector
bool long long __b) {
4878 return vec_perm(__a, (vector
unsigned 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));
4883 static __inline__ vector
unsigned long long __ATTRS_o_ai 4884 vec_mergel(vector
bool long long __a, vector
unsigned long long __b) {
4885 return vec_perm((vector
unsigned long long)__a, __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
bool long long __a, vector
bool long long __b) {
4893 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4894 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4895 0x1C, 0x1D, 0x1E, 0x1F));
4898 vector
double __b) {
4900 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4901 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4902 0x1C, 0x1D, 0x1E, 0x1F));
4905 vec_mergel(vector
double __a, vector
bool long long __b) {
4906 return vec_perm(__a, (vector
double)__b,
4907 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4908 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4909 0x1C, 0x1D, 0x1E, 0x1F));
4912 vec_mergel(vector
bool long long __a, vector
double __b) {
4913 return vec_perm((vector
double)__a, __b,
4914 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
4915 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
4916 0x1C, 0x1D, 0x1E, 0x1F));
4922 #define __builtin_altivec_vmrglb vec_vmrglb 4927 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4928 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4929 0x0E, 0x1E, 0x0F, 0x1F));
4935 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4936 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4937 0x0E, 0x1E, 0x0F, 0x1F));
4943 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
4944 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
4945 0x0E, 0x1E, 0x0F, 0x1F));
4950 #define __builtin_altivec_vmrglh vec_vmrglh 4955 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4956 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4957 0x0E, 0x0F, 0x1E, 0x1F));
4961 vec_vmrglh(vector
unsigned short __a, vector
unsigned short __b) {
4963 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4964 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4965 0x0E, 0x0F, 0x1E, 0x1F));
4971 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4972 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4973 0x0E, 0x0F, 0x1E, 0x1F));
4979 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
4980 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
4981 0x0E, 0x0F, 0x1E, 0x1F));
4986 #define __builtin_altivec_vmrglw vec_vmrglw 4991 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
4992 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
4993 0x1C, 0x1D, 0x1E, 0x1F));
4999 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5000 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5001 0x1C, 0x1D, 0x1E, 0x1F));
5005 vector
bool int __b) {
5007 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5008 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5009 0x1C, 0x1D, 0x1E, 0x1F));
5015 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5016 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5017 0x1C, 0x1D, 0x1E, 0x1F));
5020 #ifdef __POWER8_VECTOR__ 5023 static __inline__ vector
bool int __ATTRS_o_ai vec_mergee(vector
bool int __a,
5024 vector
bool int __b) {
5026 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5027 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5028 0x18, 0x19, 0x1A, 0x1B));
5032 vec_mergee(vector
signed int __a, vector
signed int __b) {
5034 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5035 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5036 0x18, 0x19, 0x1A, 0x1B));
5040 vec_mergee(vector
unsigned int __a, vector
unsigned int __b) {
5042 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5043 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5044 0x18, 0x19, 0x1A, 0x1B));
5048 vec_mergee(vector
bool long long __a, vector
bool long long __b) {
5053 vec_mergee(vector
signed long long __a, vector
signed long long __b) {
5057 static __inline__ vector
unsigned long long __ATTRS_o_ai 5058 vec_mergee(vector
unsigned long long __a, vector
unsigned long long __b) {
5063 vec_mergee(vector
float __a, vector
float __b) {
5065 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5066 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5067 0x18, 0x19, 0x1A, 0x1B));
5071 vec_mergee(vector
double __a, vector
double __b) {
5077 static __inline__ vector
bool int __ATTRS_o_ai vec_mergeo(vector
bool int __a,
5078 vector
bool int __b) {
5080 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5081 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5082 0x1C, 0x1D, 0x1E, 0x1F));
5086 vec_mergeo(vector
signed int __a, vector
signed int __b) {
5088 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5089 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5090 0x1C, 0x1D, 0x1E, 0x1F));
5094 vec_mergeo(vector
unsigned int __a, vector
unsigned int __b) {
5096 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5097 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5098 0x1C, 0x1D, 0x1E, 0x1F));
5102 vec_mergeo(vector
bool long long __a, vector
bool long long __b) {
5107 vec_mergeo(vector
signed long long __a, vector
signed long long __b) {
5111 static __inline__ vector
unsigned long long __ATTRS_o_ai 5112 vec_mergeo(vector
unsigned long long __a, vector
unsigned long long __b) {
5117 vec_mergeo(vector
float __a, vector
float __b) {
5119 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5120 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5121 0x1C, 0x1D, 0x1E, 0x1F));
5125 vec_mergeo(vector
double __a, vector
double __b) {
5133 static __inline__ vector
unsigned short __attribute__((__always_inline__))
5135 return __builtin_altivec_mfvscr();
5141 vec_min(vector
signed char __a, vector
signed char __b) {
5142 return __builtin_altivec_vminsb(__a, __b);
5146 vec_min(vector
bool char __a, vector
signed char __b) {
5147 return __builtin_altivec_vminsb((vector
signed char)__a, __b);
5151 vec_min(vector
signed char __a, vector
bool char __b) {
5152 return __builtin_altivec_vminsb(__a, (vector
signed char)__b);
5156 vec_min(vector
unsigned char __a, vector
unsigned char __b) {
5157 return __builtin_altivec_vminub(__a, __b);
5161 vec_min(vector
bool char __a, vector
unsigned char __b) {
5162 return __builtin_altivec_vminub((vector
unsigned char)__a, __b);
5166 vec_min(vector
unsigned char __a, vector
bool char __b) {
5167 return __builtin_altivec_vminub(__a, (vector
unsigned char)__b);
5172 return __builtin_altivec_vminsh(__a, __b);
5177 return __builtin_altivec_vminsh((vector
short)__a, __b);
5181 vector
bool short __b) {
5182 return __builtin_altivec_vminsh(__a, (vector
short)__b);
5186 vec_min(vector
unsigned short __a, vector
unsigned short __b) {
5187 return __builtin_altivec_vminuh(__a, __b);
5191 vec_min(vector
bool short __a, vector
unsigned short __b) {
5192 return __builtin_altivec_vminuh((vector
unsigned short)__a, __b);
5196 vec_min(vector
unsigned short __a, vector
bool short __b) {
5197 return __builtin_altivec_vminuh(__a, (vector
unsigned short)__b);
5202 return __builtin_altivec_vminsw(__a, __b);
5207 return __builtin_altivec_vminsw((vector
int)__a, __b);
5211 vector
bool int __b) {
5212 return __builtin_altivec_vminsw(__a, (vector
int)__b);
5216 vec_min(vector
unsigned int __a, vector
unsigned int __b) {
5217 return __builtin_altivec_vminuw(__a, __b);
5221 vec_min(vector
bool int __a, vector
unsigned int __b) {
5222 return __builtin_altivec_vminuw((vector
unsigned int)__a, __b);
5226 vec_min(vector
unsigned int __a, vector
bool int __b) {
5227 return __builtin_altivec_vminuw(__a, (vector
unsigned int)__b);
5230 #ifdef __POWER8_VECTOR__ 5232 vec_min(vector
signed long long __a, vector
signed long long __b) {
5233 return __builtin_altivec_vminsd(__a, __b);
5237 vec_min(vector
bool long long __a, vector
signed long long __b) {
5238 return __builtin_altivec_vminsd((vector
signed long long)__a, __b);
5242 vec_min(vector
signed long long __a, vector
bool long long __b) {
5243 return __builtin_altivec_vminsd(__a, (vector
signed long long)__b);
5246 static __inline__ vector
unsigned long long __ATTRS_o_ai 5247 vec_min(vector
unsigned long long __a, vector
unsigned long long __b) {
5248 return __builtin_altivec_vminud(__a, __b);
5251 static __inline__ vector
unsigned long long __ATTRS_o_ai 5252 vec_min(vector
bool long long __a, vector
unsigned long long __b) {
5253 return __builtin_altivec_vminud((vector
unsigned long long)__a, __b);
5256 static __inline__ vector
unsigned long long __ATTRS_o_ai 5257 vec_min(vector
unsigned long long __a, vector
bool long long __b) {
5258 return __builtin_altivec_vminud(__a, (vector
unsigned long long)__b);
5265 return __builtin_vsx_xvminsp(__a, __b);
5267 return __builtin_altivec_vminfp(__a, __b);
5273 vector
double __b) {
5274 return __builtin_vsx_xvmindp(__a, __b);
5282 return __builtin_altivec_vminsb(__a, __b);
5287 return __builtin_altivec_vminsb((vector
signed char)__a, __b);
5292 return __builtin_altivec_vminsb(__a, (vector
signed char)__b);
5299 return __builtin_altivec_vminub(__a, __b);
5304 return __builtin_altivec_vminub((vector
unsigned char)__a, __b);
5309 return __builtin_altivec_vminub(__a, (vector
unsigned char)__b);
5316 return __builtin_altivec_vminsh(__a, __b);
5321 return __builtin_altivec_vminsh((vector
short)__a, __b);
5325 vector
bool short __b) {
5326 return __builtin_altivec_vminsh(__a, (vector
short)__b);
5332 vec_vminuh(vector
unsigned short __a, vector
unsigned short __b) {
5333 return __builtin_altivec_vminuh(__a, __b);
5338 return __builtin_altivec_vminuh((vector
unsigned short)__a, __b);
5343 return __builtin_altivec_vminuh(__a, (vector
unsigned short)__b);
5350 return __builtin_altivec_vminsw(__a, __b);
5355 return __builtin_altivec_vminsw((vector
int)__a, __b);
5359 vector
bool int __b) {
5360 return __builtin_altivec_vminsw(__a, (vector
int)__b);
5367 return __builtin_altivec_vminuw(__a, __b);
5372 return __builtin_altivec_vminuw((vector
unsigned int)__a, __b);
5377 return __builtin_altivec_vminuw(__a, (vector
unsigned int)__b);
5382 static __inline__ vector
float __attribute__((__always_inline__))
5383 vec_vminfp(vector
float __a, vector
float __b) {
5385 return __builtin_vsx_xvminsp(__a, __b);
5387 return __builtin_altivec_vminfp(__a, __b);
5393 #define __builtin_altivec_vmladduhm vec_mladd 5398 return __a * __b +
__c;
5402 vector
short __a, vector
unsigned short __b, vector
unsigned short __c) {
5403 return __a * (vector short)__b + (vector
short)
__c;
5409 return (vector
short)__a * __b +
__c;
5413 vec_mladd(vector
unsigned short __a, vector
unsigned short __b,
5414 vector
unsigned short __c) {
5415 return __a * __b +
__c;
5423 return __a * __b +
__c;
5427 vector
short __a, vector
unsigned short __b, vector
unsigned short __c) {
5428 return __a * (vector short)__b + (vector
short)
__c;
5433 return (vector
short)__a * __b +
__c;
5438 vector
unsigned short __c) {
5439 return __a * __b +
__c;
5444 static __inline__ vector
short __attribute__((__always_inline__))
5445 vec_mradds(vector
short __a, vector
short __b, vector
short __c) {
5446 return __builtin_altivec_vmhraddshs(__a, __b, __c);
5451 static __inline__ vector
short __attribute__((__always_inline__))
5452 vec_vmhraddshs(vector
short __a, vector
short __b, vector
short __c) {
5453 return __builtin_altivec_vmhraddshs(__a, __b, __c);
5459 vector
unsigned char __b,
5461 return __builtin_altivec_vmsummbm(__a, __b, __c);
5465 vec_msum(vector
unsigned char __a, vector
unsigned char __b,
5466 vector
unsigned int __c) {
5467 return __builtin_altivec_vmsumubm(__a, __b, __c);
5473 return __builtin_altivec_vmsumshm(__a, __b, __c);
5477 vec_msum(vector
unsigned short __a, vector
unsigned short __b,
5478 vector
unsigned int __c) {
5479 return __builtin_altivec_vmsumuhm(__a, __b, __c);
5484 static __inline__ vector
int __attribute__((__always_inline__))
5485 vec_vmsummbm(vector
signed char __a, vector
unsigned char __b, vector
int __c) {
5486 return __builtin_altivec_vmsummbm(__a, __b, __c);
5491 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5492 vec_vmsumubm(vector
unsigned char __a, vector
unsigned char __b,
5493 vector
unsigned int __c) {
5494 return __builtin_altivec_vmsumubm(__a, __b, __c);
5499 static __inline__ vector
int __attribute__((__always_inline__))
5500 vec_vmsumshm(vector
short __a, vector
short __b, vector
int __c) {
5501 return __builtin_altivec_vmsumshm(__a, __b, __c);
5506 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5507 vec_vmsumuhm(vector
unsigned short __a, vector
unsigned short __b,
5508 vector
unsigned int __c) {
5509 return __builtin_altivec_vmsumuhm(__a, __b, __c);
5517 return __builtin_altivec_vmsumshs(__a, __b, __c);
5521 vec_msums(vector
unsigned short __a, vector
unsigned short __b,
5522 vector
unsigned int __c) {
5523 return __builtin_altivec_vmsumuhs(__a, __b, __c);
5528 static __inline__ vector
int __attribute__((__always_inline__))
5529 vec_vmsumshs(vector
short __a, vector
short __b, vector
int __c) {
5530 return __builtin_altivec_vmsumshs(__a, __b, __c);
5535 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5536 vec_vmsumuhs(vector
unsigned short __a, vector
unsigned short __b,
5537 vector
unsigned int __c) {
5538 return __builtin_altivec_vmsumuhs(__a, __b, __c);
5544 __builtin_altivec_mtvscr((vector
int)__a);
5548 __builtin_altivec_mtvscr((vector
int)__a);
5552 __builtin_altivec_mtvscr((vector
int)__a);
5556 __builtin_altivec_mtvscr((vector
int)__a);
5560 __builtin_altivec_mtvscr((vector
int)__a);
5564 __builtin_altivec_mtvscr((vector
int)__a);
5568 __builtin_altivec_mtvscr((vector
int)__a);
5572 __builtin_altivec_mtvscr((vector
int)__a);
5576 __builtin_altivec_mtvscr((vector
int)__a);
5580 __builtin_altivec_mtvscr((vector
int)__a);
5584 __builtin_altivec_mtvscr((vector
int)__a);
5594 vec_mul(vector
signed char __a, vector
signed char __b) {
5599 vec_mul(vector
unsigned char __a, vector
unsigned char __b) {
5604 vec_mul(vector
signed short __a, vector
signed short __b) {
5609 vec_mul(vector
unsigned short __a, vector
unsigned short __b) {
5614 vec_mul(vector
signed int __a, vector
signed int __b) {
5619 vec_mul(vector
unsigned int __a, vector
unsigned int __b) {
5625 vec_mul(vector
signed long long __a, vector
signed long long __b) {
5629 static __inline__ vector
unsigned long long __ATTRS_o_ai 5630 vec_mul(vector
unsigned long long __a, vector
unsigned long long __b) {
5642 vector
double __b) {
5653 vector
signed char __b) {
5654 #ifdef __LITTLE_ENDIAN__ 5655 return __builtin_altivec_vmulosb(__a, __b);
5657 return __builtin_altivec_vmulesb(__a, __b);
5662 vec_mule(vector
unsigned char __a, vector
unsigned char __b) {
5663 #ifdef __LITTLE_ENDIAN__ 5664 return __builtin_altivec_vmuloub(__a, __b);
5666 return __builtin_altivec_vmuleub(__a, __b);
5672 #ifdef __LITTLE_ENDIAN__ 5673 return __builtin_altivec_vmulosh(__a, __b);
5675 return __builtin_altivec_vmulesh(__a, __b);
5680 vec_mule(vector
unsigned short __a, vector
unsigned short __b) {
5681 #ifdef __LITTLE_ENDIAN__ 5682 return __builtin_altivec_vmulouh(__a, __b);
5684 return __builtin_altivec_vmuleuh(__a, __b);
5688 #ifdef __POWER8_VECTOR__ 5690 vec_mule(vector
signed int __a, vector
signed int __b) {
5691 #ifdef __LITTLE_ENDIAN__ 5692 return __builtin_altivec_vmulosw(__a, __b);
5694 return __builtin_altivec_vmulesw(__a, __b);
5698 static __inline__ vector
unsigned long long __ATTRS_o_ai 5699 vec_mule(vector
unsigned int __a, vector
unsigned int __b) {
5700 #ifdef __LITTLE_ENDIAN__ 5701 return __builtin_altivec_vmulouw(__a, __b);
5703 return __builtin_altivec_vmuleuw(__a, __b);
5710 static __inline__ vector
short __attribute__((__always_inline__))
5711 vec_vmulesb(vector
signed char __a, vector
signed char __b) {
5712 #ifdef __LITTLE_ENDIAN__ 5713 return __builtin_altivec_vmulosb(__a, __b);
5715 return __builtin_altivec_vmulesb(__a, __b);
5721 static __inline__ vector
unsigned short __attribute__((__always_inline__))
5722 vec_vmuleub(vector
unsigned char __a, vector
unsigned char __b) {
5723 #ifdef __LITTLE_ENDIAN__ 5724 return __builtin_altivec_vmuloub(__a, __b);
5726 return __builtin_altivec_vmuleub(__a, __b);
5732 static __inline__ vector
int __attribute__((__always_inline__))
5733 vec_vmulesh(vector
short __a, vector
short __b) {
5734 #ifdef __LITTLE_ENDIAN__ 5735 return __builtin_altivec_vmulosh(__a, __b);
5737 return __builtin_altivec_vmulesh(__a, __b);
5743 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5744 vec_vmuleuh(vector
unsigned short __a, vector
unsigned short __b) {
5745 #ifdef __LITTLE_ENDIAN__ 5746 return __builtin_altivec_vmulouh(__a, __b);
5748 return __builtin_altivec_vmuleuh(__a, __b);
5755 vector
signed char __b) {
5756 #ifdef __LITTLE_ENDIAN__ 5757 return __builtin_altivec_vmulesb(__a, __b);
5759 return __builtin_altivec_vmulosb(__a, __b);
5764 vec_mulo(vector
unsigned char __a, vector
unsigned char __b) {
5765 #ifdef __LITTLE_ENDIAN__ 5766 return __builtin_altivec_vmuleub(__a, __b);
5768 return __builtin_altivec_vmuloub(__a, __b);
5774 #ifdef __LITTLE_ENDIAN__ 5775 return __builtin_altivec_vmulesh(__a, __b);
5777 return __builtin_altivec_vmulosh(__a, __b);
5782 vec_mulo(vector
unsigned short __a, vector
unsigned short __b) {
5783 #ifdef __LITTLE_ENDIAN__ 5784 return __builtin_altivec_vmuleuh(__a, __b);
5786 return __builtin_altivec_vmulouh(__a, __b);
5790 #ifdef __POWER8_VECTOR__ 5792 vec_mulo(vector
signed int __a, vector
signed int __b) {
5793 #ifdef __LITTLE_ENDIAN__ 5794 return __builtin_altivec_vmulesw(__a, __b);
5796 return __builtin_altivec_vmulosw(__a, __b);
5800 static __inline__ vector
unsigned long long __ATTRS_o_ai 5801 vec_mulo(vector
unsigned int __a, vector
unsigned int __b) {
5802 #ifdef __LITTLE_ENDIAN__ 5803 return __builtin_altivec_vmuleuw(__a, __b);
5805 return __builtin_altivec_vmulouw(__a, __b);
5812 static __inline__ vector
short __attribute__((__always_inline__))
5813 vec_vmulosb(vector
signed char __a, vector
signed char __b) {
5814 #ifdef __LITTLE_ENDIAN__ 5815 return __builtin_altivec_vmulesb(__a, __b);
5817 return __builtin_altivec_vmulosb(__a, __b);
5823 static __inline__ vector
unsigned short __attribute__((__always_inline__))
5824 vec_vmuloub(vector
unsigned char __a, vector
unsigned char __b) {
5825 #ifdef __LITTLE_ENDIAN__ 5826 return __builtin_altivec_vmuleub(__a, __b);
5828 return __builtin_altivec_vmuloub(__a, __b);
5834 static __inline__ vector
int __attribute__((__always_inline__))
5835 vec_vmulosh(vector
short __a, vector
short __b) {
5836 #ifdef __LITTLE_ENDIAN__ 5837 return __builtin_altivec_vmulesh(__a, __b);
5839 return __builtin_altivec_vmulosh(__a, __b);
5845 static __inline__ vector
unsigned int __attribute__((__always_inline__))
5846 vec_vmulouh(vector
unsigned short __a, vector
unsigned short __b) {
5847 #ifdef __LITTLE_ENDIAN__ 5848 return __builtin_altivec_vmuleuh(__a, __b);
5850 return __builtin_altivec_vmulouh(__a, __b);
5856 #ifdef __POWER8_VECTOR__ 5858 vec_nand(vector
signed char __a, vector
signed char __b) {
5859 return ~(__a &
__b);
5863 vec_nand(vector
signed char __a, vector
bool char __b) {
5864 return ~(__a &
__b);
5868 vec_nand(vector
bool char __a, vector
signed char __b) {
5869 return ~(__a &
__b);
5873 vec_nand(vector
unsigned char __a, vector
unsigned char __b) {
5874 return ~(__a &
__b);
5878 vec_nand(vector
unsigned char __a, vector
bool char __b) {
5879 return ~(__a &
__b);
5883 vec_nand(vector
bool char __a, vector
unsigned char __b) {
5884 return ~(__a &
__b);
5887 static __inline__ vector
bool char __ATTRS_o_ai vec_nand(vector
bool char __a,
5888 vector
bool char __b) {
5889 return ~(__a &
__b);
5893 vec_nand(vector
signed short __a, vector
signed short __b) {
5894 return ~(__a &
__b);
5898 vec_nand(vector
signed short __a, vector
bool short __b) {
5899 return ~(__a &
__b);
5903 vec_nand(vector
bool short __a, vector
signed short __b) {
5904 return ~(__a &
__b);
5908 vec_nand(vector
unsigned short __a, vector
unsigned short __b) {
5909 return ~(__a &
__b);
5913 vec_nand(vector
unsigned short __a, vector
bool short __b) {
5914 return ~(__a &
__b);
5918 vec_nand(vector
bool short __a, vector
bool short __b) {
5919 return ~(__a &
__b);
5923 vec_nand(vector
signed int __a, vector
signed int __b) {
5924 return ~(__a &
__b);
5927 static __inline__ vector
signed int __ATTRS_o_ai vec_nand(vector
signed int __a,
5928 vector
bool int __b) {
5929 return ~(__a &
__b);
5933 vec_nand(vector
bool int __a, vector
signed int __b) {
5934 return ~(__a &
__b);
5938 vec_nand(vector
unsigned int __a, vector
unsigned int __b) {
5939 return ~(__a &
__b);
5943 vec_nand(vector
unsigned int __a, vector
bool int __b) {
5944 return ~(__a &
__b);
5948 vec_nand(vector
bool int __a, vector
unsigned int __b) {
5949 return ~(__a &
__b);
5952 static __inline__ vector
bool int __ATTRS_o_ai vec_nand(vector
bool int __a,
5953 vector
bool int __b) {
5954 return ~(__a &
__b);
5958 vec_nand(vector
float __a, vector
float __b) {
5959 return (vector
float)(~((vector
unsigned int)__a &
5960 (vector
unsigned int)
__b));
5964 vec_nand(vector
signed long long __a, vector
signed long long __b) {
5965 return ~(__a &
__b);
5969 vec_nand(vector
signed long long __a, vector
bool long long __b) {
5970 return ~(__a &
__b);
5974 vec_nand(vector
bool long long __a, vector
signed long long __b) {
5975 return ~(__a &
__b);
5978 static __inline__ vector
unsigned long long __ATTRS_o_ai 5979 vec_nand(vector
unsigned long long __a, vector
unsigned long long __b) {
5980 return ~(__a &
__b);
5983 static __inline__ vector
unsigned long long __ATTRS_o_ai 5984 vec_nand(vector
unsigned long long __a, vector
bool long long __b) {
5985 return ~(__a &
__b);
5988 static __inline__ vector
unsigned long long __ATTRS_o_ai 5989 vec_nand(vector
bool long long __a, vector
unsigned long long __b) {
5990 return ~(__a &
__b);
5994 vec_nand(vector
bool long long __a, vector
bool long long __b) {
5995 return ~(__a &
__b);
5999 vec_nand(vector
double __a, vector
double __b) {
6000 return (vector
double)(~((vector
unsigned long long)__a &
6001 (vector
unsigned long long)
__b));
6009 static __inline__ vector
float __ATTRS_o_ai vec_nmadd(vector
float __a,
6012 return __builtin_vsx_xvnmaddasp(__a, __b, __c);
6015 static __inline__ vector
double __ATTRS_o_ai vec_nmadd(vector
double __a,
6017 vector
double __c) {
6018 return __builtin_vsx_xvnmaddadp(__a, __b, __c);
6028 return __builtin_vsx_xvnmsubasp(__a, __b, __c);
6030 return __builtin_altivec_vnmsubfp(__a, __b, __c);
6037 vector
double __c) {
6038 return __builtin_vsx_xvnmsubadp(__a, __b, __c);
6044 static __inline__ vector
float __attribute__((__always_inline__))
6045 vec_vnmsubfp(vector
float __a, vector
float __b, vector
float __c) {
6046 return __builtin_altivec_vnmsubfp(__a, __b, __c);
6051 #define __builtin_altivec_vnor vec_nor 6054 vec_nor(vector
signed char __a, vector
signed char __b) {
6055 return ~(__a |
__b);
6059 vec_nor(vector
unsigned char __a, vector
unsigned char __b) {
6060 return ~(__a |
__b);
6064 vector
bool char __b) {
6065 return ~(__a |
__b);
6070 return ~(__a |
__b);
6074 vec_nor(vector
unsigned short __a, vector
unsigned short __b) {
6075 return ~(__a |
__b);
6079 vec_nor(vector
bool short __a, vector
bool short __b) {
6080 return ~(__a |
__b);
6085 return ~(__a |
__b);
6089 vec_nor(vector
unsigned int __a, vector
unsigned int __b) {
6090 return ~(__a |
__b);
6094 vector
bool int __b) {
6095 return ~(__a |
__b);
6100 vector
unsigned int __res =
6101 ~((vector
unsigned int)__a | (vector
unsigned int)
__b);
6102 return (vector
float)__res;
6107 vector
double __b) {
6108 vector
unsigned long long __res =
6109 ~((vector
unsigned long long)__a | (vector
unsigned long long)
__b);
6110 return (vector
double)__res;
6117 vec_vnor(vector
signed char __a, vector
signed char __b) {
6118 return ~(__a |
__b);
6122 vec_vnor(vector
unsigned char __a, vector
unsigned char __b) {
6123 return ~(__a |
__b);
6127 vector
bool char __b) {
6128 return ~(__a |
__b);
6133 return ~(__a |
__b);
6137 vec_vnor(vector
unsigned short __a, vector
unsigned short __b) {
6138 return ~(__a |
__b);
6142 vec_vnor(vector
bool short __a, vector
bool short __b) {
6143 return ~(__a |
__b);
6148 return ~(__a |
__b);
6152 vec_vnor(vector
unsigned int __a, vector
unsigned int __b) {
6153 return ~(__a |
__b);
6157 vector
bool int __b) {
6158 return ~(__a |
__b);
6163 vector
unsigned int __res =
6164 ~((vector
unsigned int)__a | (vector
unsigned int)
__b);
6165 return (vector
float)__res;
6170 vec_nor(vector
signed long long __a, vector
signed long long __b) {
6171 return ~(__a |
__b);
6174 static __inline__ vector
unsigned long long __ATTRS_o_ai 6175 vec_nor(vector
unsigned long long __a, vector
unsigned long long __b) {
6176 return ~(__a |
__b);
6180 vec_nor(vector
bool long long __a, vector
bool long long __b) {
6181 return ~(__a |
__b);
6187 #define __builtin_altivec_vor vec_or 6190 vec_or(vector
signed char __a, vector
signed char __b) {
6195 vec_or(vector
bool char __a, vector
signed char __b) {
6196 return (vector
signed char)__a |
__b;
6200 vector
bool char __b) {
6201 return __a | (vector
signed char)__b;
6205 vec_or(vector
unsigned char __a, vector
unsigned char __b) {
6210 vec_or(vector
bool char __a, vector
unsigned char __b) {
6211 return (vector
unsigned char)__a |
__b;
6215 vec_or(vector
unsigned char __a, vector
bool char __b) {
6216 return __a | (vector
unsigned char)__b;
6220 vector
bool char __b) {
6231 return (vector
short)__a |
__b;
6235 vector
bool short __b) {
6236 return __a | (vector short)__b;
6240 vec_or(vector
unsigned short __a, vector
unsigned short __b) {
6245 vec_or(vector
bool short __a, vector
unsigned short __b) {
6246 return (vector
unsigned short)__a |
__b;
6250 vec_or(vector
unsigned short __a, vector
bool short __b) {
6251 return __a | (vector
unsigned short)__b;
6255 vector
bool short __b) {
6266 return (vector
int)__a |
__b;
6270 vector
bool int __b) {
6271 return __a | (vector int)__b;
6275 vec_or(vector
unsigned int __a, vector
unsigned int __b) {
6280 vec_or(vector
bool int __a, vector
unsigned int __b) {
6281 return (vector
unsigned int)__a |
__b;
6285 vec_or(vector
unsigned int __a, vector
bool int __b) {
6286 return __a | (vector
unsigned int)__b;
6290 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
unsigned int __res =
6304 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6305 return (vector
float)__res;
6309 vector
bool int __b) {
6310 vector
unsigned int __res =
6311 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6312 return (vector
float)__res;
6317 vector
double __b) {
6318 return (vector
unsigned long long)__a | (vector
unsigned long long)__b;
6322 vector
bool long long __b) {
6323 return (vector
unsigned long long)__a | (vector
unsigned long long)__b;
6327 vector
double __b) {
6328 vector
unsigned long long __res =
6329 (vector
unsigned long long)__a | (vector
unsigned long long)
__b;
6330 return (vector
double)__res;
6334 vec_or(vector
signed long long __a, vector
signed long long __b) {
6339 vec_or(vector
bool long long __a, vector
signed long long __b) {
6340 return (vector
signed long long)__a |
__b;
6344 vec_or(vector
signed long long __a, vector
bool long long __b) {
6345 return __a | (vector
signed long long)__b;
6348 static __inline__ vector
unsigned long long __ATTRS_o_ai 6349 vec_or(vector
unsigned long long __a, vector
unsigned long long __b) {
6353 static __inline__ vector
unsigned long long __ATTRS_o_ai 6354 vec_or(vector
bool long long __a, vector
unsigned long long __b) {
6355 return (vector
unsigned long long)__a |
__b;
6358 static __inline__ vector
unsigned long long __ATTRS_o_ai 6359 vec_or(vector
unsigned long long __a, vector
bool long long __b) {
6360 return __a | (vector
unsigned long long)__b;
6364 vec_or(vector
bool long long __a, vector
bool long long __b) {
6369 #ifdef __POWER8_VECTOR__ 6371 vec_orc(vector
signed char __a, vector
signed char __b) {
6376 vec_orc(vector
signed char __a, vector
bool char __b) {
6381 vec_orc(vector
bool char __a, vector
signed char __b) {
6386 vec_orc(vector
unsigned char __a, vector
unsigned char __b) {
6391 vec_orc(vector
unsigned char __a, vector
bool char __b) {
6396 vec_orc(vector
bool char __a, vector
unsigned char __b) {
6400 static __inline__ vector
bool char __ATTRS_o_ai vec_orc(vector
bool char __a,
6401 vector
bool char __b) {
6406 vec_orc(vector
signed short __a, vector
signed short __b) {
6411 vec_orc(vector
signed short __a, vector
bool short __b) {
6416 vec_orc(vector
bool short __a, vector
signed short __b) {
6421 vec_orc(vector
unsigned short __a, vector
unsigned short __b) {
6426 vec_orc(vector
unsigned short __a, vector
bool short __b) {
6431 vec_orc(vector
bool short __a, vector
unsigned short __b) {
6436 vec_orc(vector
bool short __a, vector
bool short __b) {
6441 vec_orc(vector
signed int __a, vector
signed int __b) {
6445 static __inline__ vector
signed int __ATTRS_o_ai vec_orc(vector
signed int __a,
6446 vector
bool int __b) {
6451 vec_orc(vector
bool int __a, vector
signed int __b) {
6456 vec_orc(vector
unsigned int __a, vector
unsigned int __b) {
6461 vec_orc(vector
unsigned int __a, vector
bool int __b) {
6466 vec_orc(vector
bool int __a, vector
unsigned int __b) {
6470 static __inline__ vector
bool int __ATTRS_o_ai vec_orc(vector
bool int __a,
6471 vector
bool int __b) {
6476 vec_orc(vector
bool int __a, vector
float __b) {
6477 return (vector
float)(__a | ~(vector
unsigned int)__b);
6481 vec_orc(vector
float __a, vector
bool int __b) {
6482 return (vector
float)((vector
unsigned int)__a | ~__b);
6486 vec_orc(vector
signed long long __a, vector
signed long long __b) {
6491 vec_orc(vector
signed long long __a, vector
bool long long __b) {
6496 vec_orc(vector
bool long long __a, vector
signed long long __b) {
6500 static __inline__ vector
unsigned long long __ATTRS_o_ai 6501 vec_orc(vector
unsigned long long __a, vector
unsigned long long __b) {
6505 static __inline__ vector
unsigned long long __ATTRS_o_ai 6506 vec_orc(vector
unsigned long long __a, vector
bool long long __b) {
6510 static __inline__ vector
unsigned long long __ATTRS_o_ai 6511 vec_orc(vector
bool long long __a, vector
unsigned long long __b) {
6516 vec_orc(vector
bool long long __a, vector
bool long long __b) {
6521 vec_orc(vector
double __a, vector
bool long long __b) {
6522 return (vector
double)((vector
unsigned long long)__a | ~__b);
6526 vec_orc(vector
bool long long __a, vector
double __b) {
6527 return (vector
double)(__a | ~(vector
unsigned long long)__b);
6534 vec_vor(vector
signed char __a, vector
signed char __b) {
6539 vec_vor(vector
bool char __a, vector
signed char __b) {
6540 return (vector
signed char)__a |
__b;
6544 vec_vor(vector
signed char __a, vector
bool char __b) {
6545 return __a | (vector
signed char)__b;
6549 vec_vor(vector
unsigned char __a, vector
unsigned char __b) {
6554 vec_vor(vector
bool char __a, vector
unsigned char __b) {
6555 return (vector
unsigned char)__a |
__b;
6559 vec_vor(vector
unsigned char __a, vector
bool char __b) {
6560 return __a | (vector
unsigned char)__b;
6564 vector
bool char __b) {
6575 return (vector
short)__a |
__b;
6579 vector
bool short __b) {
6580 return __a | (vector short)__b;
6584 vec_vor(vector
unsigned short __a, vector
unsigned short __b) {
6589 vec_vor(vector
bool short __a, vector
unsigned short __b) {
6590 return (vector
unsigned short)__a |
__b;
6594 vec_vor(vector
unsigned short __a, vector
bool short __b) {
6595 return __a | (vector
unsigned short)__b;
6599 vec_vor(vector
bool short __a, vector
bool short __b) {
6610 return (vector
int)__a |
__b;
6614 vector
bool int __b) {
6615 return __a | (vector int)__b;
6619 vec_vor(vector
unsigned int __a, vector
unsigned int __b) {
6624 vec_vor(vector
bool int __a, vector
unsigned int __b) {
6625 return (vector
unsigned int)__a |
__b;
6629 vec_vor(vector
unsigned int __a, vector
bool int __b) {
6630 return __a | (vector
unsigned int)__b;
6634 vector
bool int __b) {
6640 vector
unsigned int __res =
6641 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6642 return (vector
float)__res;
6647 vector
unsigned int __res =
6648 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6649 return (vector
float)__res;
6653 vector
bool int __b) {
6654 vector
unsigned int __res =
6655 (vector
unsigned int)__a | (vector
unsigned int)
__b;
6656 return (vector
float)__res;
6661 vec_vor(vector
signed long long __a, vector
signed long long __b) {
6666 vec_vor(vector
bool long long __a, vector
signed long long __b) {
6667 return (vector
signed long long)__a |
__b;
6671 vec_vor(vector
signed long long __a, vector
bool long long __b) {
6672 return __a | (vector
signed long long)__b;
6675 static __inline__ vector
unsigned long long __ATTRS_o_ai 6676 vec_vor(vector
unsigned long long __a, vector
unsigned long long __b) {
6680 static __inline__ vector
unsigned long long __ATTRS_o_ai 6681 vec_vor(vector
bool long long __a, vector
unsigned long long __b) {
6682 return (vector
unsigned long long)__a |
__b;
6685 static __inline__ vector
unsigned long long __ATTRS_o_ai 6686 vec_vor(vector
unsigned long long __a, vector
bool long long __b) {
6687 return __a | (vector
unsigned long long)__b;
6691 vec_vor(vector
bool long long __a, vector
bool long long __b) {
6702 vec_pack(vector
signed short __a, vector
signed short __b) {
6703 #ifdef __LITTLE_ENDIAN__ 6704 return (vector
signed char)
vec_perm(
6706 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6707 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6709 return (vector
signed char)
vec_perm(
6711 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6712 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6717 vec_pack(vector
unsigned short __a, vector
unsigned short __b) {
6718 #ifdef __LITTLE_ENDIAN__ 6719 return (vector
unsigned char)
vec_perm(
6721 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6722 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6724 return (vector
unsigned char)
vec_perm(
6726 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6727 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6732 vec_pack(vector
bool short __a, vector
bool short __b) {
6733 #ifdef __LITTLE_ENDIAN__ 6736 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6737 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6741 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6742 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6748 #ifdef __LITTLE_ENDIAN__ 6751 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6752 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6756 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6757 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6762 vec_pack(vector
unsigned int __a, vector
unsigned int __b) {
6763 #ifdef __LITTLE_ENDIAN__ 6764 return (vector
unsigned short)
vec_perm(
6766 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6767 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6769 return (vector
unsigned short)
vec_perm(
6771 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6772 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6777 vector
bool int __b) {
6778 #ifdef __LITTLE_ENDIAN__ 6779 return (vector
bool short)
vec_perm(
6781 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6782 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6784 return (vector
bool short)
vec_perm(
6786 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6787 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6793 vec_pack(vector
signed long long __a, vector
signed long long __b) {
6794 #ifdef __LITTLE_ENDIAN__ 6795 return (vector
signed 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
signed int)
vec_perm(
6802 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6803 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6807 vec_pack(vector
unsigned long long __a, vector
unsigned long long __b) {
6808 #ifdef __LITTLE_ENDIAN__ 6809 return (vector
unsigned int)
vec_perm(
6811 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6812 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6814 return (vector
unsigned int)
vec_perm(
6816 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6817 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6822 vec_pack(vector
bool long long __a, vector
bool long long __b) {
6823 #ifdef __LITTLE_ENDIAN__ 6826 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6827 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6831 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6832 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6837 vec_pack(vector
double __a, vector
double __b) {
6838 return (vector
float) (__a[0], __a[1], __b[0], __b[1]);
6842 #ifdef __POWER9_VECTOR__ 6844 vec_pack_to_short_fp32(vector
float __a, vector
float __b) {
6845 vector
float __resa = __builtin_vsx_xvcvsphp(__a);
6846 vector
float __resb = __builtin_vsx_xvcvsphp(__b);
6847 #ifdef __LITTLE_ENDIAN__ 6848 return (vector
unsigned short)vec_mergee(__resa, __resb);
6850 return (vector
unsigned short)vec_mergeo(__resa, __resb);
6857 #define __builtin_altivec_vpkuhum vec_vpkuhum 6861 #ifdef __LITTLE_ENDIAN__ 6862 return (vector
signed char)
vec_perm(
6864 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6865 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6867 return (vector
signed char)
vec_perm(
6869 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6870 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6876 #ifdef __LITTLE_ENDIAN__ 6877 return (vector
unsigned char)
vec_perm(
6879 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6880 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6882 return (vector
unsigned char)
vec_perm(
6884 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6885 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6891 #ifdef __LITTLE_ENDIAN__ 6894 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
6895 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
6899 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
6900 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
6906 #define __builtin_altivec_vpkuwum vec_vpkuwum 6910 #ifdef __LITTLE_ENDIAN__ 6913 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6914 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6918 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6919 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6925 #ifdef __LITTLE_ENDIAN__ 6926 return (vector
unsigned short)
vec_perm(
6928 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6929 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6931 return (vector
unsigned short)
vec_perm(
6933 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6934 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6940 #ifdef __LITTLE_ENDIAN__ 6941 return (vector
bool short)
vec_perm(
6943 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
6944 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
6946 return (vector
bool short)
vec_perm(
6948 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
6949 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
6955 #ifdef __POWER8_VECTOR__ 6956 #define __builtin_altivec_vpkudum vec_vpkudum 6958 static __inline__ vector
int __ATTRS_o_ai vec_vpkudum(vector
long long __a,
6959 vector
long long __b) {
6960 #ifdef __LITTLE_ENDIAN__ 6963 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6964 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6968 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6969 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6974 vec_vpkudum(vector
unsigned long long __a, vector
unsigned long long __b) {
6975 #ifdef __LITTLE_ENDIAN__ 6976 return (vector
unsigned int)
vec_perm(
6978 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6979 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6981 return (vector
unsigned int)
vec_perm(
6983 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6984 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
6989 vec_vpkudum(vector
bool long long __a, vector
bool long long __b) {
6990 #ifdef __LITTLE_ENDIAN__ 6992 (vector
long long)__a, (vector
long long)__b,
6993 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
6994 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
6997 (vector
long long)__a, (vector
long long)__b,
6998 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
6999 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7006 static __inline__ vector pixel
__attribute__((__always_inline__))
7007 vec_packpx(vector
unsigned int __a, vector
unsigned int __b) {
7008 #ifdef __LITTLE_ENDIAN__ 7009 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
7011 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
7017 static __inline__ vector pixel
__attribute__((__always_inline__))
7018 vec_vpkpx(vector
unsigned int __a, vector
unsigned int __b) {
7019 #ifdef __LITTLE_ENDIAN__ 7020 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
7022 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
7030 #ifdef __LITTLE_ENDIAN__ 7031 return __builtin_altivec_vpkshss(__b, __a);
7033 return __builtin_altivec_vpkshss(__a, __b);
7038 vec_packs(vector
unsigned short __a, vector
unsigned short __b) {
7039 #ifdef __LITTLE_ENDIAN__ 7040 return __builtin_altivec_vpkuhus(__b, __a);
7042 return __builtin_altivec_vpkuhus(__a, __b);
7048 #ifdef __LITTLE_ENDIAN__ 7049 return __builtin_altivec_vpkswss(__b, __a);
7051 return __builtin_altivec_vpkswss(__a, __b);
7056 vec_packs(vector
unsigned int __a, vector
unsigned int __b) {
7057 #ifdef __LITTLE_ENDIAN__ 7058 return __builtin_altivec_vpkuwus(__b, __a);
7060 return __builtin_altivec_vpkuwus(__a, __b);
7064 #ifdef __POWER8_VECTOR__ 7066 vector
long long __b) {
7067 #ifdef __LITTLE_ENDIAN__ 7068 return __builtin_altivec_vpksdss(__b, __a);
7070 return __builtin_altivec_vpksdss(__a, __b);
7075 vec_packs(vector
unsigned long long __a, vector
unsigned long long __b) {
7076 #ifdef __LITTLE_ENDIAN__ 7077 return __builtin_altivec_vpkudus(__b, __a);
7079 return __builtin_altivec_vpkudus(__a, __b);
7086 static __inline__ vector
signed char __attribute__((__always_inline__))
7087 vec_vpkshss(vector
short __a, vector
short __b) {
7088 #ifdef __LITTLE_ENDIAN__ 7089 return __builtin_altivec_vpkshss(__b, __a);
7091 return __builtin_altivec_vpkshss(__a, __b);
7097 #ifdef __POWER8_VECTOR__ 7098 static __inline__ vector
int __ATTRS_o_ai vec_vpksdss(vector
long long __a,
7099 vector
long long __b) {
7100 #ifdef __LITTLE_ENDIAN__ 7101 return __builtin_altivec_vpksdss(__b, __a);
7103 return __builtin_altivec_vpksdss(__a, __b);
7110 static __inline__ vector
unsigned char __attribute__((__always_inline__))
7111 vec_vpkuhus(vector
unsigned short __a, vector
unsigned short __b) {
7112 #ifdef __LITTLE_ENDIAN__ 7113 return __builtin_altivec_vpkuhus(__b, __a);
7115 return __builtin_altivec_vpkuhus(__a, __b);
7121 #ifdef __POWER8_VECTOR__ 7122 static __inline__ vector
unsigned int __attribute__((__always_inline__))
7123 vec_vpkudus(vector
unsigned long long __a, vector
unsigned long long __b) {
7124 #ifdef __LITTLE_ENDIAN__ 7125 return __builtin_altivec_vpkudus(__b, __a);
7127 return __builtin_altivec_vpkudus(__a, __b);
7134 static __inline__ vector
signed short __attribute__((__always_inline__))
7135 vec_vpkswss(vector
int __a, vector
int __b) {
7136 #ifdef __LITTLE_ENDIAN__ 7137 return __builtin_altivec_vpkswss(__b, __a);
7139 return __builtin_altivec_vpkswss(__a, __b);
7145 static __inline__ vector
unsigned short __attribute__((__always_inline__))
7146 vec_vpkuwus(vector
unsigned int __a, vector
unsigned int __b) {
7147 #ifdef __LITTLE_ENDIAN__ 7148 return __builtin_altivec_vpkuwus(__b, __a);
7150 return __builtin_altivec_vpkuwus(__a, __b);
7158 #ifdef __LITTLE_ENDIAN__ 7159 return __builtin_altivec_vpkshus(__b, __a);
7161 return __builtin_altivec_vpkshus(__a, __b);
7166 vec_packsu(vector
unsigned short __a, vector
unsigned short __b) {
7167 #ifdef __LITTLE_ENDIAN__ 7168 return __builtin_altivec_vpkuhus(__b, __a);
7170 return __builtin_altivec_vpkuhus(__a, __b);
7176 #ifdef __LITTLE_ENDIAN__ 7177 return __builtin_altivec_vpkswus(__b, __a);
7179 return __builtin_altivec_vpkswus(__a, __b);
7185 #ifdef __LITTLE_ENDIAN__ 7186 return __builtin_altivec_vpkuwus(__b, __a);
7188 return __builtin_altivec_vpkuwus(__a, __b);
7192 #ifdef __POWER8_VECTOR__ 7194 vec_packsu(vector
long long __a, vector
long long __b) {
7195 #ifdef __LITTLE_ENDIAN__ 7196 return __builtin_altivec_vpksdus(__b, __a);
7198 return __builtin_altivec_vpksdus(__a, __b);
7203 vec_packsu(vector
unsigned long long __a, vector
unsigned long long __b) {
7204 #ifdef __LITTLE_ENDIAN__ 7205 return __builtin_altivec_vpkudus(__b, __a);
7207 return __builtin_altivec_vpkudus(__a, __b);
7216 #ifdef __LITTLE_ENDIAN__ 7217 return __builtin_altivec_vpkshus(__b, __a);
7219 return __builtin_altivec_vpkshus(__a, __b);
7225 #ifdef __LITTLE_ENDIAN__ 7226 return __builtin_altivec_vpkuhus(__b, __a);
7228 return __builtin_altivec_vpkuhus(__a, __b);
7236 #ifdef __LITTLE_ENDIAN__ 7237 return __builtin_altivec_vpkswus(__b, __a);
7239 return __builtin_altivec_vpkswus(__a, __b);
7245 #ifdef __LITTLE_ENDIAN__ 7246 return __builtin_altivec_vpkuwus(__b, __a);
7248 return __builtin_altivec_vpkuwus(__a, __b);
7254 #ifdef __POWER8_VECTOR__ 7256 vec_vpksdus(vector
long long __a, vector
long long __b) {
7257 #ifdef __LITTLE_ENDIAN__ 7258 return __builtin_altivec_vpksdus(__b, __a);
7260 return __builtin_altivec_vpksdus(__a, __b);
7276 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7277 #ifdef __LITTLE_ENDIAN__ 7278 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7279 255, 255, 255, 255, 255, 255, 255, 255};
7281 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)__b,
7282 (vector
int)__a, __d);
7284 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)__a,
7285 (vector
int)__b, __c);
7290 vec_perm(vector
unsigned char __a, vector
unsigned char __b,
7291 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
unsigned char)__builtin_altivec_vperm_4si(
7297 (vector
int)__b, (vector
int)__a, __d);
7299 return (vector
unsigned char)__builtin_altivec_vperm_4si(
7300 (vector
int)__a, (vector
int)__b, __c);
7305 vec_perm(vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7306 #ifdef __LITTLE_ENDIAN__ 7307 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7308 255, 255, 255, 255, 255, 255, 255, 255};
7310 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)__b,
7311 (vector
int)__a, __d);
7313 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)__a,
7314 (vector
int)__b, __c);
7319 vector
signed short __b,
7320 vector
unsigned char __c) {
7321 #ifdef __LITTLE_ENDIAN__ 7322 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7323 255, 255, 255, 255, 255, 255, 255, 255};
7325 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)__b,
7326 (vector
int)__a, __d);
7328 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)__a,
7329 (vector
int)__b, __c);
7334 vec_perm(vector
unsigned short __a, vector
unsigned short __b,
7335 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
unsigned short)__builtin_altivec_vperm_4si(
7341 (vector
int)__b, (vector
int)__a, __d);
7343 return (vector
unsigned short)__builtin_altivec_vperm_4si(
7344 (vector
int)__a, (vector
int)__b, __c);
7349 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
7350 #ifdef __LITTLE_ENDIAN__ 7351 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7352 255, 255, 255, 255, 255, 255, 255, 255};
7354 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)__b,
7355 (vector
int)__a, __d);
7357 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)__a,
7358 (vector
int)__b, __c);
7364 vector
unsigned char __c) {
7365 #ifdef __LITTLE_ENDIAN__ 7366 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7367 255, 255, 255, 255, 255, 255, 255, 255};
7369 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)__b,
7370 (vector
int)__a, __d);
7372 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)__a,
7373 (vector
int)__b, __c);
7378 vector
signed int __b,
7379 vector
unsigned char __c) {
7380 #ifdef __LITTLE_ENDIAN__ 7381 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7382 255, 255, 255, 255, 255, 255, 255, 255};
7384 return (vector
signed int)__builtin_altivec_vperm_4si(__b, __a, __d);
7386 return (vector
signed int)__builtin_altivec_vperm_4si(__a, __b, __c);
7391 vec_perm(vector
unsigned int __a, vector
unsigned int __b,
7392 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
unsigned int)__builtin_altivec_vperm_4si((vector
int)__b,
7398 (vector
int)__a, __d);
7400 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)__a,
7401 (vector
int)__b, __c);
7406 vec_perm(vector
bool int __a, vector
bool int __b, vector
unsigned char __c) {
7407 #ifdef __LITTLE_ENDIAN__ 7408 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7409 255, 255, 255, 255, 255, 255, 255, 255};
7411 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)__b,
7412 (vector
int)__a, __d);
7414 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)__a,
7415 (vector
int)__b, __c);
7421 vector
unsigned char __c) {
7422 #ifdef __LITTLE_ENDIAN__ 7423 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7424 255, 255, 255, 255, 255, 255, 255, 255};
7426 return (vector
float)__builtin_altivec_vperm_4si((vector
int)__b,
7427 (vector
int)__a, __d);
7429 return (vector
float)__builtin_altivec_vperm_4si((vector
int)__a,
7430 (vector
int)__b, __c);
7436 vec_perm(vector
signed long long __a, vector
signed long long __b,
7437 vector
unsigned char __c) {
7438 #ifdef __LITTLE_ENDIAN__ 7439 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7440 255, 255, 255, 255, 255, 255, 255, 255};
7442 return (vector
signed long long)__builtin_altivec_vperm_4si(
7443 (vector
int)__b, (vector
int)__a, __d);
7445 return (vector
signed long long)__builtin_altivec_vperm_4si(
7446 (vector
int)__a, (vector
int)__b, __c);
7450 static __inline__ vector
unsigned long long __ATTRS_o_ai 7451 vec_perm(vector
unsigned long long __a, vector
unsigned long long __b,
7452 vector
unsigned char __c) {
7453 #ifdef __LITTLE_ENDIAN__ 7454 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7455 255, 255, 255, 255, 255, 255, 255, 255};
7457 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
7458 (vector
int)__b, (vector
int)__a, __d);
7460 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
7461 (vector
int)__a, (vector
int)__b, __c);
7466 vec_perm(vector
bool long long __a, vector
bool long long __b,
7467 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
bool long long)__builtin_altivec_vperm_4si(
7473 (vector
int)__b, (vector
int)__a, __d);
7475 return (vector
bool long long)__builtin_altivec_vperm_4si(
7476 (vector
int)__a, (vector
int)__b, __c);
7481 vec_perm(vector
double __a, vector
double __b, vector
unsigned char __c) {
7482 #ifdef __LITTLE_ENDIAN__ 7483 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7484 255, 255, 255, 255, 255, 255, 255, 255};
7486 return (vector
double)__builtin_altivec_vperm_4si((vector
int)__b,
7487 (vector
int)__a, __d);
7489 return (vector
double)__builtin_altivec_vperm_4si((vector
int)__a,
7490 (vector
int)__b, __c);
7498 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7503 vec_vperm(vector
unsigned char __a, vector
unsigned char __b,
7504 vector
unsigned char __c) {
7509 vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7514 vec_vperm(vector
short __a, vector
short __b, vector
unsigned char __c) {
7519 vec_vperm(vector
unsigned short __a, vector
unsigned short __b,
7520 vector
unsigned char __c) {
7525 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
7530 vec_vperm(vector pixel __a, vector pixel __b, vector
unsigned char __c) {
7536 vector
unsigned char __c) {
7542 vector
unsigned char __c) {
7547 vec_vperm(vector
bool int __a, vector
bool int __b, vector
unsigned char __c) {
7552 vec_vperm(vector
float __a, vector
float __b, vector
unsigned char __c) {
7558 vector
long long __a, vector
long long __b, vector
unsigned char __c) {
7562 static __inline__ vector
unsigned long long __ATTRS_o_ai 7563 vec_vperm(vector
unsigned long long __a, vector
unsigned long long __b,
7564 vector
unsigned char __c) {
7569 vec_vperm(vector
double __a, vector
double __b, vector
unsigned char __c) {
7578 return __builtin_vsx_xvresp(__a);
7580 return __builtin_altivec_vrefp(__a);
7586 return __builtin_vsx_xvredp(__a);
7592 static __inline__ vector
float __attribute__((__always_inline__))
7593 vec_vrefp(vector
float __a) {
7594 return __builtin_altivec_vrefp(__a);
7600 vec_rl(vector
signed char __a, vector
unsigned char __b) {
7601 return (vector
signed char)__builtin_altivec_vrlb((vector
char)__a, __b);
7605 vec_rl(vector
unsigned char __a, vector
unsigned char __b) {
7606 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)__a, __b);
7610 vector
unsigned short __b) {
7611 return __builtin_altivec_vrlh(__a, __b);
7615 vec_rl(vector
unsigned short __a, vector
unsigned short __b) {
7616 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)__a, __b);
7620 vector
unsigned int __b) {
7621 return __builtin_altivec_vrlw(__a, __b);
7625 vec_rl(vector
unsigned int __a, vector
unsigned int __b) {
7626 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)__a, __b);
7629 #ifdef __POWER8_VECTOR__ 7631 vec_rl(vector
signed long long __a, vector
unsigned long long __b) {
7632 return __builtin_altivec_vrld(__a, __b);
7635 static __inline__ vector
unsigned long long __ATTRS_o_ai 7636 vec_rl(vector
unsigned long long __a, vector
unsigned long long __b) {
7637 return __builtin_altivec_vrld(__a, __b);
7642 #ifdef __POWER9_VECTOR__ 7644 vec_rlmi(vector
unsigned int __a, vector
unsigned int __b,
7645 vector
unsigned int __c) {
7646 return __builtin_altivec_vrlwmi(__a, __c, __b);
7649 static __inline__ vector
unsigned long long __ATTRS_o_ai 7650 vec_rlmi(vector
unsigned long long __a, vector
unsigned long long __b,
7651 vector
unsigned long long __c) {
7652 return __builtin_altivec_vrldmi(__a, __c, __b);
7657 vec_rlnm(vector
unsigned int __a, vector
unsigned int __b,
7658 vector
unsigned int __c) {
7659 vector
unsigned int OneByte = { 0x8, 0x8, 0x8, 0x8 };
7660 return __builtin_altivec_vrlwnm(__a, ((__c << OneByte) | __b));
7663 static __inline__ vector
unsigned long long __ATTRS_o_ai 7664 vec_rlnm(vector
unsigned long long __a, vector
unsigned long long __b,
7665 vector
unsigned long long __c) {
7666 vector
unsigned long long OneByte = { 0x8, 0x8 };
7667 return __builtin_altivec_vrldnm(__a, ((__c << OneByte) | __b));
7674 vec_vrlb(vector
signed char __a, vector
unsigned char __b) {
7675 return (vector
signed char)__builtin_altivec_vrlb((vector
char)__a, __b);
7679 vec_vrlb(vector
unsigned char __a, vector
unsigned char __b) {
7680 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)__a, __b);
7686 vec_vrlh(vector
short __a, vector
unsigned short __b) {
7687 return __builtin_altivec_vrlh(__a, __b);
7691 vec_vrlh(vector
unsigned short __a, vector
unsigned short __b) {
7692 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)__a, __b);
7698 vector
unsigned int __b) {
7699 return __builtin_altivec_vrlw(__a, __b);
7703 vec_vrlw(vector
unsigned int __a, vector
unsigned int __b) {
7704 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)__a, __b);
7711 return __builtin_vsx_xvrspi(__a);
7713 return __builtin_altivec_vrfin(__a);
7719 return __builtin_vsx_xvrdpi(__a);
7724 static __inline__ vector
float __ATTRS_o_ai vec_rint(vector
float __a) {
7725 return __builtin_vsx_xvrspic(__a);
7728 static __inline__ vector
double __ATTRS_o_ai vec_rint(vector
double __a) {
7729 return __builtin_vsx_xvrdpic(__a);
7734 static __inline__ vector
float __ATTRS_o_ai vec_nearbyint(vector
float __a) {
7735 return __builtin_vsx_xvrspi(__a);
7738 static __inline__ vector
double __ATTRS_o_ai vec_nearbyint(vector
double __a) {
7739 return __builtin_vsx_xvrdpi(__a);
7745 static __inline__ vector
float __attribute__((__always_inline__))
7746 vec_vrfin(vector
float __a) {
7747 return __builtin_altivec_vrfin(__a);
7753 static __inline__ vector
float __ATTRS_o_ai vec_sqrt(vector
float __a) {
7754 return __builtin_vsx_xvsqrtsp(__a);
7757 static __inline__ vector
double __ATTRS_o_ai vec_sqrt(vector
double __a) {
7758 return __builtin_vsx_xvsqrtdp(__a);
7766 return __builtin_vsx_xvrsqrtesp(__a);
7768 return __builtin_altivec_vrsqrtefp(__a);
7774 return __builtin_vsx_xvrsqrtedp(__a);
7780 static __inline__ __vector
float __attribute__((__always_inline__))
7781 vec_vrsqrtefp(vector
float __a) {
7782 return __builtin_altivec_vrsqrtefp(__a);
7787 #define __builtin_altivec_vsel_4si vec_sel 7790 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7791 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7795 vec_sel(vector
signed char __a, vector
signed char __b, vector
bool char __c) {
7796 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7800 vec_sel(vector
unsigned char __a, vector
unsigned char __b,
7801 vector
unsigned char __c) {
7802 return (__a & ~__c) | (__b &
__c);
7806 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
7807 return (__a & ~(vector
unsigned char)__c) | (__b & (vector
unsigned char)__c);
7811 vec_sel(vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7812 return (__a & ~(vector
bool char)__c) | (__b & (vector
bool char)__c);
7816 vector
bool char __b,
7817 vector
bool char __c) {
7818 return (__a & ~__c) | (__b &
__c);
7823 vector
unsigned short __c) {
7824 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7829 vector
bool short __c) {
7830 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7834 vec_sel(vector
unsigned short __a, vector
unsigned short __b,
7835 vector
unsigned short __c) {
7836 return (__a & ~__c) | (__b &
__c);
7840 vec_sel(vector
unsigned short __a, vector
unsigned short __b,
7841 vector
bool short __c) {
7842 return (__a & ~(vector
unsigned short)__c) |
7843 (__b & (vector
unsigned short)__c);
7847 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
7848 return (__a & ~(vector
bool short)__c) | (__b & (vector
bool short)__c);
7852 vec_sel(vector
bool short __a, vector
bool short __b, vector
bool short __c) {
7853 return (__a & ~__c) | (__b &
__c);
7858 vector
unsigned int __c) {
7859 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
7864 vector
bool int __c) {
7865 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
7869 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
7870 return (__a & ~__c) | (__b &
__c);
7874 vec_sel(vector
unsigned int __a, vector
unsigned int __b, vector
bool int __c) {
7875 return (__a & ~(vector
unsigned int)__c) | (__b & (vector
unsigned int)__c);
7879 vec_sel(vector
bool int __a, vector
bool int __b, vector
unsigned int __c) {
7880 return (__a & ~(vector
bool int)__c) | (__b & (vector
bool int)__c);
7884 vector
bool int __b,
7885 vector
bool int __c) {
7886 return (__a & ~__c) | (__b &
__c);
7891 vector
unsigned int __c) {
7892 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
7893 ((vector
int)__b & (vector int)__c);
7894 return (vector
float)__res;
7899 vector
bool int __c) {
7900 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
7901 ((vector
int)__b & (vector int)__c);
7902 return (vector
float)__res;
7907 vec_sel(vector
double __a, vector
double __b, vector
bool long long __c) {
7908 vector
long long __res = ((vector
long long)__a & ~(vector
long long)
__c) |
7909 ((vector
long long)__b & (vector
long long)__c);
7910 return (vector
double)__res;
7914 vec_sel(vector
double __a, vector
double __b, vector
unsigned long long __c) {
7915 vector
long long __res = ((vector
long long)__a & ~(vector
long long)
__c) |
7916 ((vector
long long)__b & (vector
long long)__c);
7917 return (vector
double)__res;
7924 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7925 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7929 vec_vsel(vector
signed char __a, vector
signed char __b, vector
bool char __c) {
7930 return (__a & ~(vector
signed char)__c) | (__b & (vector
signed char)__c);
7934 vec_vsel(vector
unsigned char __a, vector
unsigned char __b,
7935 vector
unsigned char __c) {
7936 return (__a & ~__c) | (__b &
__c);
7940 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
7941 return (__a & ~(vector
unsigned char)__c) | (__b & (vector
unsigned char)__c);
7945 vec_vsel(vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
7946 return (__a & ~(vector
bool char)__c) | (__b & (vector
bool char)__c);
7950 vector
bool char __b,
7951 vector
bool char __c) {
7952 return (__a & ~__c) | (__b &
__c);
7956 vec_vsel(vector
short __a, vector
short __b, vector
unsigned short __c) {
7957 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7962 vector
bool short __c) {
7963 return (__a & ~(vector
short)__c) | (__b & (vector short)__c);
7967 vec_vsel(vector
unsigned short __a, vector
unsigned short __b,
7968 vector
unsigned short __c) {
7969 return (__a & ~__c) | (__b &
__c);
7973 vec_vsel(vector
unsigned short __a, vector
unsigned short __b,
7974 vector
bool short __c) {
7975 return (__a & ~(vector
unsigned short)__c) |
7976 (__b & (vector
unsigned short)__c);
7980 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
7981 return (__a & ~(vector
bool short)__c) | (__b & (vector
bool short)__c);
7985 vec_vsel(vector
bool short __a, vector
bool short __b, vector
bool short __c) {
7986 return (__a & ~__c) | (__b &
__c);
7991 vector
unsigned int __c) {
7992 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
7997 vector
bool int __c) {
7998 return (__a & ~(vector
int)__c) | (__b & (vector int)__c);
8002 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
8003 return (__a & ~__c) | (__b &
__c);
8007 vector
unsigned int __a, vector
unsigned int __b, vector
bool int __c) {
8008 return (__a & ~(vector
unsigned int)__c) | (__b & (vector
unsigned int)__c);
8012 vec_vsel(vector
bool int __a, vector
bool int __b, vector
unsigned int __c) {
8013 return (__a & ~(vector
bool int)__c) | (__b & (vector
bool int)__c);
8017 vector
bool int __b,
8018 vector
bool int __c) {
8019 return (__a & ~__c) | (__b &
__c);
8024 vector
unsigned int __c) {
8025 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
8026 ((vector
int)__b & (vector int)__c);
8027 return (vector
float)__res;
8032 vector
bool int __c) {
8033 vector
int __res = ((vector int)__a & ~(vector
int)
__c) |
8034 ((vector
int)__b & (vector int)__c);
8035 return (vector
float)__res;
8043 vec_sl(vector
unsigned char __a, vector
unsigned char __b) {
8044 return __a << (__b %
8045 (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
8049 vec_sl(vector
signed char __a, vector
unsigned char __b) {
8050 return (vector
signed char)
vec_sl((vector
unsigned char)__a, __b);
8054 vec_sl(vector
unsigned short __a, vector
unsigned short __b) {
8055 return __a << (__b % (vector
unsigned short)(
sizeof(
unsigned short) *
8060 vector
unsigned short __b) {
8061 return (vector
short)
vec_sl((vector
unsigned short)__a, __b);
8065 vec_sl(vector
unsigned int __a, vector
unsigned int __b) {
8066 return __a << (__b %
8067 (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
8071 vector
unsigned int __b) {
8072 return (vector
int)
vec_sl((vector
unsigned int)__a, __b);
8075 #ifdef __POWER8_VECTOR__ 8076 static __inline__ vector
unsigned long long __ATTRS_o_ai 8077 vec_sl(vector
unsigned long long __a, vector
unsigned long long __b) {
8078 return __a << (__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
8083 vec_sl(vector
long long __a, vector
unsigned long long __b) {
8084 return (vector
long long)
vec_sl((vector
unsigned long long)__a, __b);
8090 #define __builtin_altivec_vslb vec_vslb 8093 vec_vslb(vector
signed char __a, vector
unsigned char __b) {
8098 vec_vslb(vector
unsigned char __a, vector
unsigned char __b) {
8104 #define __builtin_altivec_vslh vec_vslh 8107 vec_vslh(vector
short __a, vector
unsigned short __b) {
8112 vec_vslh(vector
unsigned short __a, vector
unsigned short __b) {
8118 #define __builtin_altivec_vslw vec_vslw 8121 vector
unsigned int __b) {
8126 vec_vslw(vector
unsigned int __a, vector
unsigned int __b) {
8132 #define __builtin_altivec_vsldoi_4si vec_sld 8135 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
8136 unsigned char __d = __c & 0x0F;
8137 #ifdef __LITTLE_ENDIAN__ 8139 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8140 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8141 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8142 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8146 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8147 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8148 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8153 vec_sld(vector
unsigned char __a, vector
unsigned char __b,
8154 unsigned const int __c) {
8155 unsigned char __d = __c & 0x0F;
8156 #ifdef __LITTLE_ENDIAN__ 8158 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8159 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8160 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8161 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8165 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8166 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8167 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8172 vec_sld(vector
bool char __a, vector
bool char __b,
unsigned const int __c) {
8173 unsigned char __d = __c & 0x0F;
8174 #ifdef __LITTLE_ENDIAN__ 8176 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8177 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8178 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8179 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8183 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8184 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8185 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8190 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
8191 unsigned char __d = __c & 0x0F;
8192 #ifdef __LITTLE_ENDIAN__ 8194 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8195 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8196 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8197 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8201 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8202 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8203 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8208 vec_sld(vector
unsigned short __a, vector
unsigned short __b,
8209 unsigned const int __c) {
8210 unsigned char __d = __c & 0x0F;
8211 #ifdef __LITTLE_ENDIAN__ 8213 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8214 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8215 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8216 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8220 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8221 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8222 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8227 vec_sld(vector
bool short __a, vector
bool short __b,
unsigned const int __c) {
8228 unsigned char __d = __c & 0x0F;
8229 #ifdef __LITTLE_ENDIAN__ 8231 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8232 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8233 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8234 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8238 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8239 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8240 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8246 unsigned const int __c) {
8247 unsigned char __d = __c & 0x0F;
8248 #ifdef __LITTLE_ENDIAN__ 8250 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8251 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8252 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8253 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8257 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8258 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8259 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8264 vec_sld(vector
signed int __a, vector
signed int __b,
unsigned const int __c) {
8265 unsigned char __d = __c & 0x0F;
8266 #ifdef __LITTLE_ENDIAN__ 8268 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8269 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8270 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8271 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8275 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8276 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8277 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8282 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
8283 unsigned char __d = __c & 0x0F;
8284 #ifdef __LITTLE_ENDIAN__ 8286 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8287 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8288 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8289 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8293 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8294 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8295 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8300 vector
bool int __b,
8301 unsigned const int __c) {
8302 unsigned char __d = __c & 0x0F;
8303 #ifdef __LITTLE_ENDIAN__ 8305 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8306 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8307 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8308 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8312 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8313 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8314 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8320 unsigned const int __c) {
8321 unsigned char __d = __c & 0x0F;
8322 #ifdef __LITTLE_ENDIAN__ 8324 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8325 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8326 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8327 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8331 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8332 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8333 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8339 vec_sld(vector
bool long long __a, vector
bool long long __b,
8340 unsigned const int __c) {
8341 unsigned char __d = __c & 0x0F;
8342 #ifdef __LITTLE_ENDIAN__ 8344 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8345 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8346 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8347 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8351 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8352 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8353 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8358 vec_sld(vector
signed long long __a, vector
signed long long __b,
8359 unsigned const int __c) {
8360 unsigned char __d = __c & 0x0F;
8361 #ifdef __LITTLE_ENDIAN__ 8363 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8364 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8365 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8366 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8370 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8371 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8372 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8376 static __inline__ vector
unsigned long long __ATTRS_o_ai 8377 vec_sld(vector
unsigned long long __a, vector
unsigned long long __b,
8378 unsigned const int __c) {
8379 unsigned char __d = __c & 0x0F;
8380 #ifdef __LITTLE_ENDIAN__ 8382 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8383 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8384 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8385 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8389 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8390 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8391 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8397 unsigned const int __c) {
8398 unsigned char __d = __c & 0x0F;
8399 #ifdef __LITTLE_ENDIAN__ 8401 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8402 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8403 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8404 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8408 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8409 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8410 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8417 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
8418 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8422 vec_sldw(vector
unsigned char __a, vector
unsigned char __b,
8423 unsigned const int __c) {
8424 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8428 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
8429 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8433 vec_sldw(vector
unsigned short __a, vector
unsigned short __b,
8434 unsigned const int __c) {
8435 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8439 vec_sldw(vector
signed int __a, vector
signed int __b,
unsigned const int __c) {
8440 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8444 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
8445 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8450 vec_sldw(vector
signed long long __a, vector
signed long long __b,
8451 unsigned const int __c) {
8452 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8455 static __inline__ vector
unsigned long long __ATTRS_o_ai 8456 vec_sldw(vector
unsigned long long __a, vector
unsigned long long __b,
8457 unsigned const int __c) {
8458 return vec_sld(__a, __b, ((__c << 2) & 0x0F));
8462 #ifdef __POWER9_VECTOR__ 8465 vec_slv(vector
unsigned char __a, vector
unsigned char __b) {
8466 return __builtin_altivec_vslv(__a, __b);
8471 vec_srv(vector
unsigned char __a, vector
unsigned char __b) {
8472 return __builtin_altivec_vsrv(__a, __b);
8479 vec_vsldoi(vector
signed char __a, vector
signed char __b,
unsigned char __c) {
8480 unsigned char __d = __c & 0x0F;
8481 #ifdef __LITTLE_ENDIAN__ 8483 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8484 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8485 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8486 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8490 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8491 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8492 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8497 vector
unsigned char __a, vector
unsigned char __b,
unsigned char __c) {
8498 unsigned char __d = __c & 0x0F;
8499 #ifdef __LITTLE_ENDIAN__ 8501 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8502 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8503 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8504 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8508 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8509 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8510 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8516 unsigned char __c) {
8517 unsigned char __d = __c & 0x0F;
8518 #ifdef __LITTLE_ENDIAN__ 8520 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8521 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8522 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8523 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8527 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8528 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8529 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8534 vector
unsigned short __a, vector
unsigned short __b,
unsigned char __c) {
8535 unsigned char __d = __c & 0x0F;
8536 #ifdef __LITTLE_ENDIAN__ 8538 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8539 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8540 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8541 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8545 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8546 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8547 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8553 unsigned char __c) {
8554 unsigned char __d = __c & 0x0F;
8555 #ifdef __LITTLE_ENDIAN__ 8557 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8558 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8559 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8560 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8564 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8565 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8566 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8572 unsigned char __c) {
8573 unsigned char __d = __c & 0x0F;
8574 #ifdef __LITTLE_ENDIAN__ 8576 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8577 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8578 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8579 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8583 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8584 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8585 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8590 vector
unsigned int __a, vector
unsigned int __b,
unsigned char __c) {
8591 unsigned char __d = __c & 0x0F;
8592 #ifdef __LITTLE_ENDIAN__ 8594 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8595 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8596 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8597 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8601 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8602 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8603 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8609 unsigned char __c) {
8610 unsigned char __d = __c & 0x0F;
8611 #ifdef __LITTLE_ENDIAN__ 8613 __b, __a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
8614 20 - __d, 21 - __d, 22 - __d, 23 - __d,
8615 24 - __d, 25 - __d, 26 - __d, 27 - __d,
8616 28 - __d, 29 - __d, 30 - __d, 31 - __d));
8620 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
8621 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
8622 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
8629 vec_sll(vector
signed char __a, vector
unsigned char __b) {
8630 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8635 vec_sll(vector
signed char __a, vector
unsigned short __b) {
8636 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8641 vec_sll(vector
signed char __a, vector
unsigned int __b) {
8642 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8647 vec_sll(vector
unsigned char __a, vector
unsigned char __b) {
8648 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8653 vec_sll(vector
unsigned char __a, vector
unsigned short __b) {
8654 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8659 vec_sll(vector
unsigned char __a, vector
unsigned int __b) {
8660 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8665 vec_sll(vector
bool char __a, vector
unsigned char __b) {
8666 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8671 vec_sll(vector
bool char __a, vector
unsigned short __b) {
8672 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8677 vec_sll(vector
bool char __a, vector
unsigned int __b) {
8678 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8683 vector
unsigned char __b) {
8684 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8688 vector
unsigned short __b) {
8689 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8693 vector
unsigned int __b) {
8694 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8698 vec_sll(vector
unsigned short __a, vector
unsigned char __b) {
8699 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8704 vec_sll(vector
unsigned short __a, vector
unsigned short __b) {
8705 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8710 vec_sll(vector
unsigned short __a, vector
unsigned int __b) {
8711 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8716 vec_sll(vector
bool short __a, vector
unsigned char __b) {
8717 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8722 vec_sll(vector
bool short __a, vector
unsigned short __b) {
8723 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8728 vec_sll(vector
bool short __a, vector
unsigned int __b) {
8729 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8734 vector
unsigned char __b) {
8735 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8739 vector
unsigned short __b) {
8740 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8744 vector
unsigned int __b) {
8745 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8749 vector
unsigned char __b) {
8750 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8754 vector
unsigned short __b) {
8755 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8759 vector
unsigned int __b) {
8760 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8764 vec_sll(vector
unsigned int __a, vector
unsigned char __b) {
8765 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8770 vec_sll(vector
unsigned int __a, vector
unsigned short __b) {
8771 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8776 vec_sll(vector
unsigned int __a, vector
unsigned int __b) {
8777 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8782 vec_sll(vector
bool int __a, vector
unsigned char __b) {
8783 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8788 vec_sll(vector
bool int __a, vector
unsigned short __b) {
8789 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8794 vec_sll(vector
bool int __a, vector
unsigned int __b) {
8795 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8801 vec_sll(vector
signed long long __a, vector
unsigned char __b) {
8802 return (vector
signed long long)__builtin_altivec_vsl((vector
int)__a,
8806 static __inline__ vector
unsigned long long __ATTRS_o_ai 8807 vec_sll(vector
unsigned long long __a, vector
unsigned char __b) {
8808 return (vector
unsigned long long)__builtin_altivec_vsl((vector
int)__a,
8816 vec_vsl(vector
signed char __a, vector
unsigned char __b) {
8817 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8822 vec_vsl(vector
signed char __a, vector
unsigned short __b) {
8823 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8828 vec_vsl(vector
signed char __a, vector
unsigned int __b) {
8829 return (vector
signed char)__builtin_altivec_vsl((vector
int)__a,
8834 vec_vsl(vector
unsigned char __a, vector
unsigned char __b) {
8835 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8840 vec_vsl(vector
unsigned char __a, vector
unsigned short __b) {
8841 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8846 vec_vsl(vector
unsigned char __a, vector
unsigned int __b) {
8847 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)__a,
8852 vec_vsl(vector
bool char __a, vector
unsigned char __b) {
8853 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8858 vec_vsl(vector
bool char __a, vector
unsigned short __b) {
8859 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8864 vec_vsl(vector
bool char __a, vector
unsigned int __b) {
8865 return (vector
bool char)__builtin_altivec_vsl((vector
int)__a,
8870 vector
unsigned char __b) {
8871 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8875 vector
unsigned short __b) {
8876 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8880 vector
unsigned int __b) {
8881 return (vector
short)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8885 vec_vsl(vector
unsigned short __a, vector
unsigned char __b) {
8886 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8891 vec_vsl(vector
unsigned short __a, vector
unsigned short __b) {
8892 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8897 vec_vsl(vector
unsigned short __a, vector
unsigned int __b) {
8898 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)__a,
8903 vec_vsl(vector
bool short __a, vector
unsigned char __b) {
8904 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8909 vec_vsl(vector
bool short __a, vector
unsigned short __b) {
8910 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8915 vec_vsl(vector
bool short __a, vector
unsigned int __b) {
8916 return (vector
bool short)__builtin_altivec_vsl((vector
int)__a,
8921 vector
unsigned char __b) {
8922 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8926 vector
unsigned short __b) {
8927 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8931 vector
unsigned int __b) {
8932 return (vector pixel)__builtin_altivec_vsl((vector
int)__a, (vector
int)__b);
8936 vector
unsigned char __b) {
8937 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8941 vector
unsigned short __b) {
8942 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8946 vector
unsigned int __b) {
8947 return (vector
int)__builtin_altivec_vsl(__a, (vector
int)__b);
8951 vec_vsl(vector
unsigned int __a, vector
unsigned char __b) {
8952 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8957 vec_vsl(vector
unsigned int __a, vector
unsigned short __b) {
8958 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8963 vec_vsl(vector
unsigned int __a, vector
unsigned int __b) {
8964 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)__a,
8969 vec_vsl(vector
bool int __a, vector
unsigned char __b) {
8970 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8975 vec_vsl(vector
bool int __a, vector
unsigned short __b) {
8976 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8981 vec_vsl(vector
bool int __a, vector
unsigned int __b) {
8982 return (vector
bool int)__builtin_altivec_vsl((vector
int)__a,
8989 vec_slo(vector
signed char __a, vector
signed char __b) {
8990 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
8995 vec_slo(vector
signed char __a, vector
unsigned char __b) {
8996 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
9001 vec_slo(vector
unsigned char __a, vector
signed char __b) {
9002 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
9007 vec_slo(vector
unsigned char __a, vector
unsigned char __b) {
9008 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
9013 vector
signed char __b) {
9014 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9018 vector
unsigned char __b) {
9019 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9023 vec_slo(vector
unsigned short __a, vector
signed char __b) {
9024 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9029 vec_slo(vector
unsigned short __a, vector
unsigned char __b) {
9030 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9035 vector
signed char __b) {
9036 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9040 vector
unsigned char __b) {
9041 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9045 vector
signed char __b) {
9046 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9050 vector
unsigned char __b) {
9051 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9055 vec_slo(vector
unsigned int __a, vector
signed char __b) {
9056 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9061 vec_slo(vector
unsigned int __a, vector
unsigned char __b) {
9062 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9067 vector
signed char __b) {
9068 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9072 vector
unsigned char __b) {
9073 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9078 vec_slo(vector
signed long long __a, vector
signed char __b) {
9079 return (vector
signed long long)__builtin_altivec_vslo((vector
int)__a,
9084 vec_slo(vector
signed long long __a, vector
unsigned char __b) {
9085 return (vector
signed long long)__builtin_altivec_vslo((vector
int)__a,
9089 static __inline__ vector
unsigned long long __ATTRS_o_ai 9090 vec_slo(vector
unsigned long long __a, vector
signed char __b) {
9091 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)__a,
9095 static __inline__ vector
unsigned long long __ATTRS_o_ai 9096 vec_slo(vector
unsigned long long __a, vector
unsigned char __b) {
9097 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)__a,
9105 vec_vslo(vector
signed char __a, vector
signed char __b) {
9106 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
9111 vec_vslo(vector
signed char __a, vector
unsigned char __b) {
9112 return (vector
signed char)__builtin_altivec_vslo((vector
int)__a,
9117 vec_vslo(vector
unsigned char __a, vector
signed char __b) {
9118 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
9123 vec_vslo(vector
unsigned char __a, vector
unsigned char __b) {
9124 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)__a,
9129 vector
signed char __b) {
9130 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9134 vector
unsigned char __b) {
9135 return (vector
short)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9139 vec_vslo(vector
unsigned short __a, vector
signed char __b) {
9140 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9145 vec_vslo(vector
unsigned short __a, vector
unsigned char __b) {
9146 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)__a,
9151 vector
signed char __b) {
9152 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9156 vector
unsigned char __b) {
9157 return (vector pixel)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9161 vector
signed char __b) {
9162 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9166 vector
unsigned char __b) {
9167 return (vector
int)__builtin_altivec_vslo(__a, (vector
int)__b);
9171 vec_vslo(vector
unsigned int __a, vector
signed char __b) {
9172 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9177 vec_vslo(vector
unsigned int __a, vector
unsigned char __b) {
9178 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)__a,
9183 vector
signed char __b) {
9184 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9188 vector
unsigned char __b) {
9189 return (vector
float)__builtin_altivec_vslo((vector
int)__a, (vector
int)__b);
9196 return vec_perm(__a, __a, (vector
unsigned char)(__b & 0x0F));
9200 vec_splat(vector
unsigned char __a,
unsigned const int __b) {
9201 return vec_perm(__a, __a, (vector
unsigned char)(__b & 0x0F));
9206 return vec_perm(__a, __a, (vector
unsigned char)(__b & 0x0F));
9210 vec_splat(vector
signed short __a,
unsigned const int __b) {
9211 unsigned char b0 = (__b & 0x07) * 2;
9212 unsigned char b1 = b0 + 1;
9214 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9215 b0, b1, b0, b1, b0, b1));
9219 vec_splat(vector
unsigned short __a,
unsigned const int __b) {
9220 unsigned char b0 = (__b & 0x07) * 2;
9221 unsigned char b1 = b0 + 1;
9223 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9224 b0, b1, b0, b1, b0, b1));
9229 unsigned char b0 = (__b & 0x07) * 2;
9230 unsigned char b1 = b0 + 1;
9232 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9233 b0, b1, b0, b1, b0, b1));
9237 unsigned const int __b) {
9238 unsigned char b0 = (__b & 0x07) * 2;
9239 unsigned char b1 = b0 + 1;
9241 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
9242 b0, b1, b0, b1, b0, b1));
9247 unsigned char b0 = (__b & 0x03) * 4;
9248 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9250 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9251 b2, b3, b0, b1, b2, b3));
9255 vec_splat(vector
unsigned int __a,
unsigned const int __b) {
9256 unsigned char b0 = (__b & 0x03) * 4;
9257 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9259 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9260 b2, b3, b0, b1, b2, b3));
9265 unsigned char b0 = (__b & 0x03) * 4;
9266 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9268 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9269 b2, b3, b0, b1, b2, b3));
9273 unsigned const int __b) {
9274 unsigned char b0 = (__b & 0x03) * 4;
9275 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
9277 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
9278 b2, b3, b0, b1, b2, b3));
9283 unsigned const int __b) {
9284 unsigned char b0 = (__b & 0x01) * 8;
9285 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9286 b6 = b0 + 6, b7 = b0 + 7;
9288 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9289 b2, b3, b4, b5, b6, b7));
9292 vec_splat(vector
bool long long __a,
unsigned const int __b) {
9293 unsigned char b0 = (__b & 0x01) * 8;
9294 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9295 b6 = b0 + 6, b7 = b0 + 7;
9297 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9298 b2, b3, b4, b5, b6, b7));
9301 vec_splat(vector
signed long long __a,
unsigned const int __b) {
9302 unsigned char b0 = (__b & 0x01) * 8;
9303 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9304 b6 = b0 + 6, b7 = b0 + 7;
9306 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9307 b2, b3, b4, b5, b6, b7));
9309 static __inline__ vector
unsigned long long __ATTRS_o_ai 9310 vec_splat(vector
unsigned long long __a,
unsigned const int __b) {
9311 unsigned char b0 = (__b & 0x01) * 8;
9312 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
9313 b6 = b0 + 6, b7 = b0 + 7;
9315 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
9316 b2, b3, b4, b5, b6, b7));
9322 #define __builtin_altivec_vspltb vec_vspltb 9326 return vec_perm(__a, __a, (vector
unsigned char)(__b));
9331 return vec_perm(__a, __a, (vector
unsigned char)(__b));
9335 unsigned char __b) {
9336 return vec_perm(__a, __a, (vector
unsigned char)(__b));
9341 #define __builtin_altivec_vsplth vec_vsplth 9344 unsigned char __b) {
9346 unsigned char b1 = __b + 1;
9348 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9349 __b, b1, __b, b1, __b, b1, __b, b1));
9355 unsigned char b1 = __b + 1;
9357 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9358 __b, b1, __b, b1, __b, b1, __b, b1));
9364 unsigned char b1 = __b + 1;
9366 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9367 __b, b1, __b, b1, __b, b1, __b, b1));
9371 unsigned char __b) {
9373 unsigned char b1 = __b + 1;
9375 (vector
unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
9376 __b, b1, __b, b1, __b, b1, __b, b1));
9381 #define __builtin_altivec_vspltw vec_vspltw 9384 unsigned char __b) {
9386 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9388 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9389 b1, b2, b3, __b, b1, b2, b3));
9395 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9397 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9398 b1, b2, b3, __b, b1, b2, b3));
9402 unsigned char __b) {
9404 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9406 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9407 b1, b2, b3, __b, b1, b2, b3));
9411 unsigned char __b) {
9413 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
9415 (vector
unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
9416 b1, b2, b3, __b, b1, b2, b3));
9421 #define __builtin_altivec_vspltisb vec_splat_s8 9426 return (vector
signed char)(
__a);
9434 return (vector
signed char)(
__a);
9439 #define __builtin_altivec_vspltish vec_splat_s16 9443 return (vector
short)(
__a);
9450 return (vector
short)(
__a);
9455 #define __builtin_altivec_vspltisw vec_splat_s32 9459 return (vector
int)(
__a);
9466 return (vector
int)(
__a);
9474 return (vector
unsigned char)(
__a);
9482 return (vector
unsigned short)(
__a);
9490 return (vector
unsigned int)(
__a);
9496 vec_sr(vector
signed char __a, vector
unsigned char __b) {
9497 vector
unsigned char __res = (vector
unsigned char)__a >> __b;
9498 return (vector
signed char)__res;
9502 vec_sr(vector
unsigned char __a, vector
unsigned char __b) {
9507 vec_sr(vector
signed short __a, vector
unsigned short __b) {
9508 vector
unsigned short __res = (vector
unsigned short)__a >> __b;
9509 return (vector
signed short)__res;
9513 vec_sr(vector
unsigned short __a, vector
unsigned short __b) {
9518 vec_sr(vector
signed int __a, vector
unsigned int __b) {
9519 vector
unsigned int __res = (vector
unsigned int)__a >> __b;
9520 return (vector
signed int)__res;
9524 vec_sr(vector
unsigned int __a, vector
unsigned int __b) {
9528 #ifdef __POWER8_VECTOR__ 9530 vec_sr(vector
signed long long __a, vector
unsigned long long __b) {
9531 vector
unsigned long long __res = (vector
unsigned long long)__a >> __b;
9532 return (vector
signed long long)__res;
9535 static __inline__ vector
unsigned long long __ATTRS_o_ai 9536 vec_sr(vector
unsigned long long __a, vector
unsigned long long __b) {
9543 #define __builtin_altivec_vsrb vec_vsrb 9546 vec_vsrb(vector
signed char __a, vector
unsigned char __b) {
9547 return __a >> (vector
signed char)__b;
9551 vec_vsrb(vector
unsigned char __a, vector
unsigned char __b) {
9557 #define __builtin_altivec_vsrh vec_vsrh 9560 vec_vsrh(vector
short __a, vector
unsigned short __b) {
9561 return __a >> (vector short)__b;
9565 vec_vsrh(vector
unsigned short __a, vector
unsigned short __b) {
9571 #define __builtin_altivec_vsrw vec_vsrw 9574 vector
unsigned int __b) {
9575 return __a >> (vector int)__b;
9579 vec_vsrw(vector
unsigned int __a, vector
unsigned int __b) {
9586 vec_sra(vector
signed char __a, vector
unsigned char __b) {
9587 return (vector
signed char)__builtin_altivec_vsrab((vector
char)__a, __b);
9591 vec_sra(vector
unsigned char __a, vector
unsigned char __b) {
9592 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)__a, __b);
9596 vector
unsigned short __b) {
9597 return __builtin_altivec_vsrah(__a, (vector
unsigned short)__b);
9601 vec_sra(vector
unsigned short __a, vector
unsigned short __b) {
9602 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)__a, __b);
9606 vector
unsigned int __b) {
9607 return __builtin_altivec_vsraw(__a, __b);
9611 vec_sra(vector
unsigned int __a, vector
unsigned int __b) {
9612 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)__a, __b);
9615 #ifdef __POWER8_VECTOR__ 9617 vec_sra(vector
signed long long __a, vector
unsigned long long __b) {
9621 static __inline__ vector
unsigned long long __ATTRS_o_ai 9622 vec_sra(vector
unsigned long long __a, vector
unsigned long long __b) {
9623 return (vector
unsigned long long)((vector
signed long long)__a >> __b);
9630 vec_vsrab(vector
signed char __a, vector
unsigned char __b) {
9631 return (vector
signed char)__builtin_altivec_vsrab((vector
char)__a, __b);
9635 vec_vsrab(vector
unsigned char __a, vector
unsigned char __b) {
9636 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)__a, __b);
9643 return __builtin_altivec_vsrah(__a, (vector
unsigned short)__b);
9647 vec_vsrah(vector
unsigned short __a, vector
unsigned short __b) {
9648 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)__a, __b);
9654 vector
unsigned int __b) {
9655 return __builtin_altivec_vsraw(__a, __b);
9659 vec_vsraw(vector
unsigned int __a, vector
unsigned int __b) {
9660 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)__a, __b);
9666 vec_srl(vector
signed char __a, vector
unsigned char __b) {
9667 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9672 vec_srl(vector
signed char __a, vector
unsigned short __b) {
9673 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9678 vec_srl(vector
signed char __a, vector
unsigned int __b) {
9679 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9684 vec_srl(vector
unsigned char __a, vector
unsigned char __b) {
9685 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9690 vec_srl(vector
unsigned char __a, vector
unsigned short __b) {
9691 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9696 vec_srl(vector
unsigned char __a, vector
unsigned int __b) {
9697 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9702 vec_srl(vector
bool char __a, vector
unsigned char __b) {
9703 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9708 vec_srl(vector
bool char __a, vector
unsigned short __b) {
9709 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9714 vec_srl(vector
bool char __a, vector
unsigned int __b) {
9715 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9720 vector
unsigned char __b) {
9721 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9725 vector
unsigned short __b) {
9726 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9730 vector
unsigned int __b) {
9731 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9735 vec_srl(vector
unsigned short __a, vector
unsigned char __b) {
9736 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9741 vec_srl(vector
unsigned short __a, vector
unsigned short __b) {
9742 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9747 vec_srl(vector
unsigned short __a, vector
unsigned int __b) {
9748 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9753 vec_srl(vector
bool short __a, vector
unsigned char __b) {
9754 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9759 vec_srl(vector
bool short __a, vector
unsigned short __b) {
9760 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9765 vec_srl(vector
bool short __a, vector
unsigned int __b) {
9766 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9771 vector
unsigned char __b) {
9772 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9776 vector
unsigned short __b) {
9777 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9781 vector
unsigned int __b) {
9782 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9786 vector
unsigned char __b) {
9787 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9791 vector
unsigned short __b) {
9792 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9796 vector
unsigned int __b) {
9797 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9801 vec_srl(vector
unsigned int __a, vector
unsigned char __b) {
9802 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9807 vec_srl(vector
unsigned int __a, vector
unsigned short __b) {
9808 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9813 vec_srl(vector
unsigned int __a, vector
unsigned int __b) {
9814 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9819 vec_srl(vector
bool int __a, vector
unsigned char __b) {
9820 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
9825 vec_srl(vector
bool int __a, vector
unsigned short __b) {
9826 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
9831 vec_srl(vector
bool int __a, vector
unsigned int __b) {
9832 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
9838 vec_srl(vector
signed long long __a, vector
unsigned char __b) {
9839 return (vector
signed long long)__builtin_altivec_vsr((vector
int)__a,
9843 static __inline__ vector
unsigned long long __ATTRS_o_ai 9844 vec_srl(vector
unsigned long long __a, vector
unsigned char __b) {
9845 return (vector
unsigned long long)__builtin_altivec_vsr((vector
int)__a,
9853 vec_vsr(vector
signed char __a, vector
unsigned char __b) {
9854 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9859 vec_vsr(vector
signed char __a, vector
unsigned short __b) {
9860 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9865 vec_vsr(vector
signed char __a, vector
unsigned int __b) {
9866 return (vector
signed char)__builtin_altivec_vsr((vector
int)__a,
9871 vec_vsr(vector
unsigned char __a, vector
unsigned char __b) {
9872 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9877 vec_vsr(vector
unsigned char __a, vector
unsigned short __b) {
9878 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9883 vec_vsr(vector
unsigned char __a, vector
unsigned int __b) {
9884 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)__a,
9889 vec_vsr(vector
bool char __a, vector
unsigned char __b) {
9890 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9895 vec_vsr(vector
bool char __a, vector
unsigned short __b) {
9896 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9901 vec_vsr(vector
bool char __a, vector
unsigned int __b) {
9902 return (vector
bool char)__builtin_altivec_vsr((vector
int)__a,
9907 vector
unsigned char __b) {
9908 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9912 vector
unsigned short __b) {
9913 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9917 vector
unsigned int __b) {
9918 return (vector
short)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9922 vec_vsr(vector
unsigned short __a, vector
unsigned char __b) {
9923 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9928 vec_vsr(vector
unsigned short __a, vector
unsigned short __b) {
9929 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9934 vec_vsr(vector
unsigned short __a, vector
unsigned int __b) {
9935 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)__a,
9940 vec_vsr(vector
bool short __a, vector
unsigned char __b) {
9941 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9946 vec_vsr(vector
bool short __a, vector
unsigned short __b) {
9947 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9952 vec_vsr(vector
bool short __a, vector
unsigned int __b) {
9953 return (vector
bool short)__builtin_altivec_vsr((vector
int)__a,
9958 vector
unsigned char __b) {
9959 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9963 vector
unsigned short __b) {
9964 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9968 vector
unsigned int __b) {
9969 return (vector pixel)__builtin_altivec_vsr((vector
int)__a, (vector
int)__b);
9973 vector
unsigned char __b) {
9974 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9978 vector
unsigned short __b) {
9979 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9983 vector
unsigned int __b) {
9984 return (vector
int)__builtin_altivec_vsr(__a, (vector
int)__b);
9988 vec_vsr(vector
unsigned int __a, vector
unsigned char __b) {
9989 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
9994 vec_vsr(vector
unsigned int __a, vector
unsigned short __b) {
9995 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
10000 vec_vsr(vector
unsigned int __a, vector
unsigned int __b) {
10001 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)__a,
10006 vec_vsr(vector
bool int __a, vector
unsigned char __b) {
10007 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
10012 vec_vsr(vector
bool int __a, vector
unsigned short __b) {
10013 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
10018 vec_vsr(vector
bool int __a, vector
unsigned int __b) {
10019 return (vector
bool int)__builtin_altivec_vsr((vector
int)__a,
10026 vec_sro(vector
signed char __a, vector
signed char __b) {
10027 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10032 vec_sro(vector
signed char __a, vector
unsigned char __b) {
10033 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10038 vec_sro(vector
unsigned char __a, vector
signed char __b) {
10039 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10044 vec_sro(vector
unsigned char __a, vector
unsigned char __b) {
10045 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10050 vector
signed char __b) {
10051 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10055 vector
unsigned char __b) {
10056 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10060 vec_sro(vector
unsigned short __a, vector
signed char __b) {
10061 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10066 vec_sro(vector
unsigned short __a, vector
unsigned char __b) {
10067 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10072 vector
signed char __b) {
10073 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10077 vector
unsigned char __b) {
10078 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10082 vector
signed char __b) {
10083 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10087 vector
unsigned char __b) {
10088 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10092 vec_sro(vector
unsigned int __a, vector
signed char __b) {
10093 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10098 vec_sro(vector
unsigned int __a, vector
unsigned char __b) {
10099 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10104 vector
signed char __b) {
10105 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10109 vector
unsigned char __b) {
10110 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10114 static __inline__ vector
signed long long __ATTRS_o_ai 10115 vec_sro(vector
signed long long __a, vector
signed char __b) {
10116 return (vector
signed long long)__builtin_altivec_vsro((vector
int)__a,
10120 static __inline__ vector
signed long long __ATTRS_o_ai 10121 vec_sro(vector
signed long long __a, vector
unsigned char __b) {
10122 return (vector
signed long long)__builtin_altivec_vsro((vector
int)__a,
10126 static __inline__ vector
unsigned long long __ATTRS_o_ai 10127 vec_sro(vector
unsigned long long __a, vector
signed char __b) {
10128 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)__a,
10132 static __inline__ vector
unsigned long long __ATTRS_o_ai 10133 vec_sro(vector
unsigned long long __a, vector
unsigned char __b) {
10134 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)__a,
10143 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10148 vec_vsro(vector
signed char __a, vector
unsigned char __b) {
10149 return (vector
signed char)__builtin_altivec_vsro((vector
int)__a,
10154 vec_vsro(vector
unsigned char __a, vector
signed char __b) {
10155 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10160 vec_vsro(vector
unsigned char __a, vector
unsigned char __b) {
10161 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)__a,
10166 vector
signed char __b) {
10167 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10171 vector
unsigned char __b) {
10172 return (vector
short)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10176 vec_vsro(vector
unsigned short __a, vector
signed char __b) {
10177 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10182 vec_vsro(vector
unsigned short __a, vector
unsigned char __b) {
10183 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)__a,
10188 vector
signed char __b) {
10189 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10193 vector
unsigned char __b) {
10194 return (vector pixel)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10198 vector
signed char __b) {
10199 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10203 vector
unsigned char __b) {
10204 return (vector
int)__builtin_altivec_vsro(__a, (vector
int)__b);
10208 vec_vsro(vector
unsigned int __a, vector
signed char __b) {
10209 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10214 vec_vsro(vector
unsigned int __a, vector
unsigned char __b) {
10215 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)__a,
10220 vector
signed char __b) {
10221 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10225 vector
unsigned char __b) {
10226 return (vector
float)__builtin_altivec_vsro((vector
int)__a, (vector
int)__b);
10232 vector
signed char *__c) {
10233 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10237 signed char *__c) {
10238 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10242 vector
unsigned char *__c) {
10243 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10247 unsigned char *__c) {
10248 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10252 signed char *__c) {
10253 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10257 unsigned char *__c) {
10258 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10262 vector
bool char *__c) {
10263 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10267 vector
short *__c) {
10268 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10273 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10277 vector
unsigned short *__c) {
10278 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10282 unsigned short *__c) {
10283 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10288 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10292 unsigned short *__c) {
10293 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10297 vector
bool short *__c) {
10298 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10303 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10307 unsigned short *__c) {
10308 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10312 vector pixel *__c) {
10313 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10318 __builtin_altivec_stvx(__a, __b, __c);
10322 __builtin_altivec_stvx(__a, __b, __c);
10326 vector
unsigned int *__c) {
10327 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10331 unsigned int *__c) {
10332 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10337 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10341 unsigned int *__c) {
10342 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10346 vector
bool int *__c) {
10347 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10351 vector
float *__c) {
10352 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10357 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10363 vector
signed char *__c) {
10364 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10368 signed char *__c) {
10369 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10373 vector
unsigned char *__c) {
10374 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10378 unsigned char *__c) {
10379 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10383 signed char *__c) {
10384 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10388 unsigned char *__c) {
10389 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10393 vector
bool char *__c) {
10394 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10398 vector
short *__c) {
10399 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10404 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10408 vector
unsigned short *__c) {
10409 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10413 unsigned short *__c) {
10414 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10419 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10423 unsigned short *__c) {
10424 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10428 vector
bool short *__c) {
10429 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10434 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10438 unsigned short *__c) {
10439 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10443 vector pixel *__c) {
10444 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10449 __builtin_altivec_stvx(__a, __b, __c);
10454 __builtin_altivec_stvx(__a, __b, __c);
10458 vector
unsigned int *__c) {
10459 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10463 unsigned int *__c) {
10464 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10469 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10473 unsigned int *__c) {
10474 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10478 vector
bool int *__c) {
10479 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10483 vector
float *__c) {
10484 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10489 __builtin_altivec_stvx((vector
int)__a, __b, __c);
10495 signed char *__c) {
10496 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10500 unsigned char *__c) {
10501 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10505 signed char *__c) {
10506 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10510 unsigned char *__c) {
10511 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10516 __builtin_altivec_stvehx(__a, __b, __c);
10520 unsigned short *__c) {
10521 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10526 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10530 unsigned short *__c) {
10531 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10536 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10540 unsigned short *__c) {
10541 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10545 __builtin_altivec_stvewx(__a, __b, __c);
10549 unsigned int *__c) {
10550 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10555 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10559 unsigned int *__c) {
10560 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10565 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10571 signed char *__c) {
10572 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10576 int __b,
unsigned char *__c) {
10577 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10581 signed char *__c) {
10582 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10586 unsigned char *__c) {
10587 __builtin_altivec_stvebx((vector
char)__a, __b, __c);
10594 __builtin_altivec_stvehx(__a, __b, __c);
10598 int __b,
unsigned short *__c) {
10599 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10604 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10608 unsigned short *__c) {
10609 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10614 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10618 unsigned short *__c) {
10619 __builtin_altivec_stvehx((vector
short)__a, __b, __c);
10626 __builtin_altivec_stvewx(__a, __b, __c);
10630 unsigned int *__c) {
10631 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10636 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10640 unsigned int *__c) {
10641 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10646 __builtin_altivec_stvewx((vector
int)__a, __b, __c);
10652 vector
signed char *__c) {
10653 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10657 signed char *__c) {
10658 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10662 vector
unsigned char *__c) {
10663 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10667 unsigned char *__c) {
10668 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10672 signed char *__c) {
10673 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10677 unsigned char *__c) {
10678 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10682 vector
bool char *__c) {
10683 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10687 vector
short *__c) {
10688 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10693 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10697 vector
unsigned short *__c) {
10698 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10702 unsigned short *__c) {
10703 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10708 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10712 unsigned short *__c) {
10713 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10717 vector
bool short *__c) {
10718 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10723 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10727 unsigned short *__c) {
10728 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10732 vector pixel *__c) {
10733 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10738 __builtin_altivec_stvxl(__a, __b, __c);
10742 __builtin_altivec_stvxl(__a, __b, __c);
10746 vector
unsigned int *__c) {
10747 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10751 unsigned int *__c) {
10752 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10757 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10761 unsigned int *__c) {
10762 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10766 vector
bool int *__c) {
10767 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10771 vector
float *__c) {
10772 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10777 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10783 vector
signed char *__c) {
10784 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10788 signed char *__c) {
10789 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10793 vector
unsigned char *__c) {
10794 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10798 unsigned char *__c) {
10799 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10803 signed char *__c) {
10804 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10808 unsigned char *__c) {
10809 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10813 vector
bool char *__c) {
10814 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10818 vector
short *__c) {
10819 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10824 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10829 vector
unsigned short *__c) {
10830 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10834 int __b,
unsigned short *__c) {
10835 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10840 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10844 unsigned short *__c) {
10845 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10849 vector
bool short *__c) {
10850 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10855 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10859 unsigned short *__c) {
10860 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10864 vector pixel *__c) {
10865 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10870 __builtin_altivec_stvxl(__a, __b, __c);
10875 __builtin_altivec_stvxl(__a, __b, __c);
10879 vector
unsigned int *__c) {
10880 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10884 unsigned int *__c) {
10885 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10890 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10894 unsigned int *__c) {
10895 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10899 vector
bool int *__c) {
10900 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10904 vector
float *__c) {
10905 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10910 __builtin_altivec_stvxl((vector
int)__a, __b, __c);
10916 vec_sub(vector
signed char __a, vector
signed char __b) {
10921 vec_sub(vector
bool char __a, vector
signed char __b) {
10922 return (vector
signed char)__a -
__b;
10926 vec_sub(vector
signed char __a, vector
bool char __b) {
10927 return __a - (vector
signed char)__b;
10931 vec_sub(vector
unsigned char __a, vector
unsigned char __b) {
10936 vec_sub(vector
bool char __a, vector
unsigned char __b) {
10937 return (vector
unsigned char)__a -
__b;
10941 vec_sub(vector
unsigned char __a, vector
bool char __b) {
10942 return __a - (vector
unsigned char)__b;
10946 vector
short __b) {
10951 vector
short __b) {
10952 return (vector
short)__a -
__b;
10956 vector
bool short __b) {
10957 return __a - (vector short)__b;
10961 vec_sub(vector
unsigned short __a, vector
unsigned short __b) {
10966 vec_sub(vector
bool short __a, vector
unsigned short __b) {
10967 return (vector
unsigned short)__a -
__b;
10971 vec_sub(vector
unsigned short __a, vector
bool short __b) {
10972 return __a - (vector
unsigned short)__b;
10982 return (vector
int)__a -
__b;
10986 vector
bool int __b) {
10987 return __a - (vector int)__b;
10991 vec_sub(vector
unsigned int __a, vector
unsigned int __b) {
10996 vec_sub(vector
bool int __a, vector
unsigned int __b) {
10997 return (vector
unsigned int)__a -
__b;
11001 vec_sub(vector
unsigned int __a, vector
bool int __b) {
11002 return __a - (vector
unsigned int)__b;
11005 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11007 vec_sub(vector
signed __int128 __a, vector
signed __int128 __b) {
11011 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11012 vec_sub(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11015 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11018 static __inline__ vector
signed long long __ATTRS_o_ai 11019 vec_sub(vector
signed long long __a, vector
signed long long __b) {
11023 static __inline__ vector
unsigned long long __ATTRS_o_ai 11024 vec_sub(vector
unsigned long long __a, vector
unsigned long long __b) {
11029 vector
double __b) {
11035 vector
float __b) {
11041 #define __builtin_altivec_vsububm vec_vsububm 11050 return (vector
signed char)__a -
__b;
11055 return __a - (vector
signed char)__b;
11065 return (vector
unsigned char)__a -
__b;
11070 return __a - (vector
unsigned char)__b;
11075 #define __builtin_altivec_vsubuhm vec_vsubuhm 11078 vector
short __b) {
11083 vector
short __b) {
11084 return (vector
short)__a -
__b;
11088 vector
bool short __b) {
11089 return __a - (vector short)__b;
11099 return (vector
unsigned short)__a -
__b;
11104 return __a - (vector
unsigned short)__b;
11109 #define __builtin_altivec_vsubuwm vec_vsubuwm 11118 return (vector
int)__a -
__b;
11122 vector
bool int __b) {
11123 return __a - (vector int)__b;
11133 return (vector
unsigned int)__a -
__b;
11138 return __a - (vector
unsigned int)__b;
11143 #define __builtin_altivec_vsubfp vec_vsubfp 11145 static __inline__ vector
float __attribute__((__always_inline__))
11146 vec_vsubfp(vector
float __a, vector
float __b) {
11154 return (vector
signed int)__builtin_altivec_vsubcuw((vector
unsigned int)__a,
11155 (vector
unsigned int) __b);
11159 vec_subc(vector
unsigned int __a, vector
unsigned int __b) {
11160 return __builtin_altivec_vsubcuw(__a, __b);
11163 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11164 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11165 vec_subc(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11166 return __builtin_altivec_vsubcuq(__a, __b);
11170 vec_subc(vector
signed __int128 __a, vector
signed __int128 __b) {
11171 return __builtin_altivec_vsubcuq(__a, __b);
11173 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11177 static __inline__ vector
unsigned int __attribute__((__always_inline__))
11178 vec_vsubcuw(vector
unsigned int __a, vector
unsigned int __b) {
11179 return __builtin_altivec_vsubcuw(__a, __b);
11186 return __builtin_altivec_vsubsbs(__a, __b);
11191 return __builtin_altivec_vsubsbs((vector
signed char)__a, __b);
11196 return __builtin_altivec_vsubsbs(__a, (vector
signed char)__b);
11200 vec_subs(vector
unsigned char __a, vector
unsigned char __b) {
11201 return __builtin_altivec_vsububs(__a, __b);
11206 return __builtin_altivec_vsububs((vector
unsigned char)__a, __b);
11211 return __builtin_altivec_vsububs(__a, (vector
unsigned char)__b);
11215 vector
short __b) {
11216 return __builtin_altivec_vsubshs(__a, __b);
11220 vector
short __b) {
11221 return __builtin_altivec_vsubshs((vector
short)__a, __b);
11225 vector
bool short __b) {
11226 return __builtin_altivec_vsubshs(__a, (vector
short)__b);
11230 vec_subs(vector
unsigned short __a, vector
unsigned short __b) {
11231 return __builtin_altivec_vsubuhs(__a, __b);
11235 vec_subs(vector
bool short __a, vector
unsigned short __b) {
11236 return __builtin_altivec_vsubuhs((vector
unsigned short)__a, __b);
11240 vec_subs(vector
unsigned short __a, vector
bool short __b) {
11241 return __builtin_altivec_vsubuhs(__a, (vector
unsigned short)__b);
11246 return __builtin_altivec_vsubsws(__a, __b);
11251 return __builtin_altivec_vsubsws((vector
int)__a, __b);
11255 vector
bool int __b) {
11256 return __builtin_altivec_vsubsws(__a, (vector
int)__b);
11260 vec_subs(vector
unsigned int __a, vector
unsigned int __b) {
11261 return __builtin_altivec_vsubuws(__a, __b);
11266 return __builtin_altivec_vsubuws((vector
unsigned int)__a, __b);
11271 return __builtin_altivec_vsubuws(__a, (vector
unsigned int)__b);
11278 return __builtin_altivec_vsubsbs(__a, __b);
11283 return __builtin_altivec_vsubsbs((vector
signed char)__a, __b);
11288 return __builtin_altivec_vsubsbs(__a, (vector
signed char)__b);
11295 return __builtin_altivec_vsububs(__a, __b);
11300 return __builtin_altivec_vsububs((vector
unsigned char)__a, __b);
11305 return __builtin_altivec_vsububs(__a, (vector
unsigned char)__b);
11311 vector
short __b) {
11312 return __builtin_altivec_vsubshs(__a, __b);
11316 vector
short __b) {
11317 return __builtin_altivec_vsubshs((vector
short)__a, __b);
11321 vector
bool short __b) {
11322 return __builtin_altivec_vsubshs(__a, (vector
short)__b);
11329 return __builtin_altivec_vsubuhs(__a, __b);
11334 return __builtin_altivec_vsubuhs((vector
unsigned short)__a, __b);
11339 return __builtin_altivec_vsubuhs(__a, (vector
unsigned short)__b);
11346 return __builtin_altivec_vsubsws(__a, __b);
11351 return __builtin_altivec_vsubsws((vector
int)__a, __b);
11355 vector
bool int __b) {
11356 return __builtin_altivec_vsubsws(__a, (vector
int)__b);
11363 return __builtin_altivec_vsubuws(__a, __b);
11368 return __builtin_altivec_vsubuws((vector
unsigned int)__a, __b);
11373 return __builtin_altivec_vsubuws(__a, (vector
unsigned int)__b);
11376 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11380 vec_vsubuqm(vector
signed __int128 __a, vector
signed __int128 __b) {
11384 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11385 vec_vsubuqm(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11393 vec_vsubeuqm(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_vsubeuqm(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11400 vector
unsigned __int128 __c) {
11401 return __builtin_altivec_vsubeuqm(__a, __b, __c);
11405 vec_sube(vector
signed __int128 __a, vector
signed __int128 __b,
11406 vector
signed __int128 __c) {
11407 return __builtin_altivec_vsubeuqm(__a, __b, __c);
11410 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11411 vec_sube(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11412 vector
unsigned __int128 __c) {
11413 return __builtin_altivec_vsubeuqm(__a, __b, __c);
11419 vec_vsubcuq(vector
signed __int128 __a, vector
signed __int128 __b) {
11420 return __builtin_altivec_vsubcuq(__a, __b);
11423 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11424 vec_vsubcuq(vector
unsigned __int128 __a, vector
unsigned __int128 __b) {
11425 return __builtin_altivec_vsubcuq(__a, __b);
11431 vec_vsubecuq(vector
signed __int128 __a, vector
signed __int128 __b,
11432 vector
signed __int128 __c) {
11433 return __builtin_altivec_vsubecuq(__a, __b, __c);
11436 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11437 vec_vsubecuq(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11438 vector
unsigned __int128 __c) {
11439 return __builtin_altivec_vsubecuq(__a, __b, __c);
11443 vec_subec(vector
signed int __a, vector
signed int __b,
11444 vector
signed int __c) {
11445 return vec_addec(__a, ~__b, __c);
11449 vec_subec(vector
unsigned int __a, vector
unsigned int __b,
11450 vector
unsigned int __c) {
11451 return vec_addec(__a, ~__b, __c);
11455 vec_subec(vector
signed __int128 __a, vector
signed __int128 __b,
11456 vector
signed __int128 __c) {
11457 return __builtin_altivec_vsubecuq(__a, __b, __c);
11460 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 11461 vec_subec(vector
unsigned __int128 __a, vector
unsigned __int128 __b,
11462 vector
unsigned __int128 __c) {
11463 return __builtin_altivec_vsubecuq(__a, __b, __c);
11465 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__) 11469 vector
signed int __c) {
11470 vector
signed int __mask = {1, 1, 1, 1};
11471 vector
signed int __carry = __c & __mask;
11472 return vec_adde(__a, ~__b, __carry);
11477 vector
unsigned int __c) {
11478 vector
unsigned int __mask = {1, 1, 1, 1};
11479 vector
unsigned int __carry = __c & __mask;
11480 return vec_adde(__a, ~__b, __carry);
11486 return __builtin_altivec_vsum4sbs(__a, __b);
11491 return __builtin_altivec_vsum4ubs(__a, __b);
11496 return __builtin_altivec_vsum4shs(__a, __b);
11501 static __inline__ vector
int __attribute__((__always_inline__))
11502 vec_vsum4sbs(vector
signed char __a, vector
int __b) {
11503 return __builtin_altivec_vsum4sbs(__a, __b);
11508 static __inline__ vector
unsigned int __attribute__((__always_inline__))
11509 vec_vsum4ubs(vector
unsigned char __a, vector
unsigned int __b) {
11510 return __builtin_altivec_vsum4ubs(__a, __b);
11515 static __inline__ vector
int __attribute__((__always_inline__))
11516 vec_vsum4shs(vector
signed short __a, vector
int __b) {
11517 return __builtin_altivec_vsum4shs(__a, __b);
11528 static __inline__ vector
signed int __attribute__((__always_inline__))
11529 vec_sum2s(vector
int __a, vector
int __b) {
11530 #ifdef __LITTLE_ENDIAN__ 11531 vector
int __c = (vector
signed int)
vec_perm(
11532 __b, __b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11534 __c = __builtin_altivec_vsum2sws(__a, __c);
11535 return (vector
signed int)
vec_perm(
11536 __c, __c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11539 return __builtin_altivec_vsum2sws(__a, __b);
11545 static __inline__ vector
signed int __attribute__((__always_inline__))
11546 vec_vsum2sws(vector
int __a, vector
int __b) {
11547 #ifdef __LITTLE_ENDIAN__ 11548 vector
int __c = (vector
signed int)
vec_perm(
11549 __b, __b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11551 __c = __builtin_altivec_vsum2sws(__a, __c);
11552 return (vector
signed int)
vec_perm(
11553 __c, __c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
11556 return __builtin_altivec_vsum2sws(__a, __b);
11568 static __inline__ vector
signed int __attribute__((__always_inline__))
11569 vec_sums(vector
signed int __a, vector
signed int __b) {
11570 #ifdef __LITTLE_ENDIAN__ 11571 __b = (vector
signed int)
vec_splat(__b, 3);
11572 __b = __builtin_altivec_vsumsws(__a, __b);
11573 return (vector
signed int)(0, 0, 0, __b[0]);
11575 return __builtin_altivec_vsumsws(__a, __b);
11581 static __inline__ vector
signed int __attribute__((__always_inline__))
11582 vec_vsumsws(vector
signed int __a, vector
signed int __b) {
11583 #ifdef __LITTLE_ENDIAN__ 11584 __b = (vector
signed int)
vec_splat(__b, 3);
11585 __b = __builtin_altivec_vsumsws(__a, __b);
11586 return (vector
signed int)(0, 0, 0, __b[0]);
11588 return __builtin_altivec_vsumsws(__a, __b);
11596 return __builtin_vsx_xvrspiz(__a);
11598 return __builtin_altivec_vrfiz(__a);
11604 return __builtin_vsx_xvrdpiz(__a);
11610 static __inline__ vector
float __attribute__((__always_inline__))
11611 vec_vrfiz(vector
float __a) {
11612 return __builtin_altivec_vrfiz(__a);
11622 #ifdef __LITTLE_ENDIAN__ 11623 return __builtin_altivec_vupklsb((vector
char)__a);
11625 return __builtin_altivec_vupkhsb((vector
char)__a);
11631 #ifdef __LITTLE_ENDIAN__ 11632 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11634 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11639 #ifdef __LITTLE_ENDIAN__ 11640 return __builtin_altivec_vupklsh(__a);
11642 return __builtin_altivec_vupkhsh(__a);
11648 #ifdef __LITTLE_ENDIAN__ 11649 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11651 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11657 #ifdef __LITTLE_ENDIAN__ 11658 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11660 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11664 #ifdef __POWER8_VECTOR__ 11666 #ifdef __LITTLE_ENDIAN__ 11667 return __builtin_altivec_vupklsw(__a);
11669 return __builtin_altivec_vupkhsw(__a);
11675 #ifdef __LITTLE_ENDIAN__ 11676 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11678 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11684 return (vector
double)(__a[0], __a[1]);
11692 #ifdef __LITTLE_ENDIAN__ 11693 return __builtin_altivec_vupklsb((vector
char)__a);
11695 return __builtin_altivec_vupkhsb((vector
char)__a);
11701 #ifdef __LITTLE_ENDIAN__ 11702 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11704 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11711 #ifdef __LITTLE_ENDIAN__ 11712 return __builtin_altivec_vupklsh(__a);
11714 return __builtin_altivec_vupkhsh(__a);
11720 #ifdef __LITTLE_ENDIAN__ 11721 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11723 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11729 #ifdef __LITTLE_ENDIAN__ 11730 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11732 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11738 #ifdef __POWER8_VECTOR__ 11739 static __inline__ vector
long long __ATTRS_o_ai vec_vupkhsw(vector
int __a) {
11740 #ifdef __LITTLE_ENDIAN__ 11741 return __builtin_altivec_vupklsw(__a);
11743 return __builtin_altivec_vupkhsw(__a);
11748 vec_vupkhsw(vector
bool int __a) {
11749 #ifdef __LITTLE_ENDIAN__ 11750 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11752 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11761 #ifdef __LITTLE_ENDIAN__ 11762 return __builtin_altivec_vupkhsb((vector
char)__a);
11764 return __builtin_altivec_vupklsb((vector
char)__a);
11770 #ifdef __LITTLE_ENDIAN__ 11771 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11773 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11778 #ifdef __LITTLE_ENDIAN__ 11779 return __builtin_altivec_vupkhsh(__a);
11781 return __builtin_altivec_vupklsh(__a);
11787 #ifdef __LITTLE_ENDIAN__ 11788 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11790 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11796 #ifdef __LITTLE_ENDIAN__ 11797 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11799 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11803 #ifdef __POWER8_VECTOR__ 11805 #ifdef __LITTLE_ENDIAN__ 11806 return __builtin_altivec_vupkhsw(__a);
11808 return __builtin_altivec_vupklsw(__a);
11814 #ifdef __LITTLE_ENDIAN__ 11815 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11817 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11823 return (vector
double)(__a[2], __a[3]);
11831 #ifdef __LITTLE_ENDIAN__ 11832 return __builtin_altivec_vupkhsb((vector
char)__a);
11834 return __builtin_altivec_vupklsb((vector
char)__a);
11840 #ifdef __LITTLE_ENDIAN__ 11841 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)__a);
11843 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)__a);
11850 #ifdef __LITTLE_ENDIAN__ 11851 return __builtin_altivec_vupkhsh(__a);
11853 return __builtin_altivec_vupklsh(__a);
11859 #ifdef __LITTLE_ENDIAN__ 11860 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)__a);
11862 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)__a);
11868 #ifdef __LITTLE_ENDIAN__ 11869 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)__a);
11871 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)__a);
11877 #ifdef __POWER8_VECTOR__ 11878 static __inline__ vector
long long __ATTRS_o_ai vec_vupklsw(vector
int __a) {
11879 #ifdef __LITTLE_ENDIAN__ 11880 return __builtin_altivec_vupkhsw(__a);
11882 return __builtin_altivec_vupklsw(__a);
11887 vec_vupklsw(vector
bool int __a) {
11888 #ifdef __LITTLE_ENDIAN__ 11889 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)__a);
11891 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)__a);
11901 vec_vsx_ld(
int __a,
const vector
bool int *__b) {
11902 return (vector
bool int)__builtin_vsx_lxvw4x(__a, __b);
11906 vec_vsx_ld(
int __a,
const vector
signed int *__b) {
11907 return (vector
signed int)__builtin_vsx_lxvw4x(__a, __b);
11911 vec_vsx_ld(
int __a,
const signed int *__b) {
11912 return (vector
signed int)__builtin_vsx_lxvw4x(__a, __b);
11916 vec_vsx_ld(
int __a,
const vector
unsigned int *__b) {
11917 return (vector
unsigned int)__builtin_vsx_lxvw4x(__a, __b);
11921 vec_vsx_ld(
int __a,
const unsigned int *__b) {
11922 return (vector
unsigned int)__builtin_vsx_lxvw4x(__a, __b);
11926 vec_vsx_ld(
int __a,
const vector
float *__b) {
11927 return (vector
float)__builtin_vsx_lxvw4x(__a, __b);
11930 static __inline__ vector
float __ATTRS_o_ai vec_vsx_ld(
int __a,
11931 const float *__b) {
11932 return (vector
float)__builtin_vsx_lxvw4x(__a, __b);
11935 static __inline__ vector
signed long long __ATTRS_o_ai 11936 vec_vsx_ld(
int __a,
const vector
signed long long *__b) {
11937 return (vector
signed long long)__builtin_vsx_lxvd2x(__a, __b);
11940 static __inline__ vector
unsigned long long __ATTRS_o_ai 11941 vec_vsx_ld(
int __a,
const vector
unsigned long long *__b) {
11942 return (vector
unsigned long long)__builtin_vsx_lxvd2x(__a, __b);
11946 vec_vsx_ld(
int __a,
const vector
double *__b) {
11947 return (vector
double)__builtin_vsx_lxvd2x(__a, __b);
11951 vec_vsx_ld(
int __a,
const double *__b) {
11952 return (vector
double)__builtin_vsx_lxvd2x(__a, __b);
11956 vec_vsx_ld(
int __a,
const vector
bool short *__b) {
11957 return (vector
bool short)__builtin_vsx_lxvw4x(__a, __b);
11961 vec_vsx_ld(
int __a,
const vector
signed short *__b) {
11962 return (vector
signed short)__builtin_vsx_lxvw4x(__a, __b);
11966 vec_vsx_ld(
int __a,
const signed short *__b) {
11967 return (vector
signed short)__builtin_vsx_lxvw4x(__a, __b);
11971 vec_vsx_ld(
int __a,
const vector
unsigned short *__b) {
11972 return (vector
unsigned short)__builtin_vsx_lxvw4x(__a, __b);
11976 vec_vsx_ld(
int __a,
const unsigned short *__b) {
11977 return (vector
unsigned short)__builtin_vsx_lxvw4x(__a, __b);
11981 vec_vsx_ld(
int __a,
const vector
bool char *__b) {
11982 return (vector
bool char)__builtin_vsx_lxvw4x(__a, __b);
11986 vec_vsx_ld(
int __a,
const vector
signed char *__b) {
11987 return (vector
signed char)__builtin_vsx_lxvw4x(__a, __b);
11991 vec_vsx_ld(
int __a,
const signed char *__b) {
11992 return (vector
signed char)__builtin_vsx_lxvw4x(__a, __b);
11996 vec_vsx_ld(
int __a,
const vector
unsigned char *__b) {
11997 return (vector
unsigned char)__builtin_vsx_lxvw4x(__a, __b);
12001 vec_vsx_ld(
int __a,
const unsigned char *__b) {
12002 return (vector
unsigned char)__builtin_vsx_lxvw4x(__a, __b);
12011 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool int __a,
int __b,
12012 vector
bool int *__c) {
12013 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12016 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool int __a,
int __b,
12018 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12021 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool int __a,
int __b,
12022 unsigned int *__c) {
12023 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12026 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed int __a,
int __b,
12027 vector
signed int *__c) {
12028 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12031 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed int __a,
int __b,
12033 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12036 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned int __a,
int __b,
12037 vector
unsigned int *__c) {
12038 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12041 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned int __a,
int __b,
12042 unsigned int *__c) {
12043 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12046 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
float __a,
int __b,
12047 vector
float *__c) {
12048 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12051 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
float __a,
int __b,
12053 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12056 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed long long __a,
12058 vector
signed long long *__c) {
12059 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12062 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned long long __a,
12064 vector
unsigned long long *__c) {
12065 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12068 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
double __a,
int __b,
12069 vector
double *__c) {
12070 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12073 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
double __a,
int __b,
12075 __builtin_vsx_stxvd2x((vector
double)__a, __b, __c);
12078 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool short __a,
int __b,
12079 vector
bool short *__c) {
12080 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12083 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool short __a,
int __b,
12084 signed short *__c) {
12085 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12088 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool short __a,
int __b,
12089 unsigned short *__c) {
12090 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12092 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed short __a,
int __b,
12093 vector
signed short *__c) {
12094 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12097 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed short __a,
int __b,
12098 signed short *__c) {
12099 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12102 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
12104 vector
unsigned short *__c) {
12105 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12108 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
12109 int __b,
unsigned short *__c) {
12110 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12113 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool char __a,
int __b,
12114 vector
bool char *__c) {
12115 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12118 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool char __a,
int __b,
12119 signed char *__c) {
12120 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12123 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
bool char __a,
int __b,
12124 unsigned char *__c) {
12125 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12128 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed char __a,
int __b,
12129 vector
signed char *__c) {
12130 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12133 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed char __a,
int __b,
12134 signed char *__c) {
12135 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12138 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
12140 vector
unsigned char *__c) {
12141 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12144 static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
12145 int __b,
unsigned char *__c) {
12146 __builtin_vsx_stxvw4x((vector
int)__a, __b, __c);
12152 #define vec_xxpermdi __builtin_vsx_xxpermdi 12153 #define vec_xxsldwi __builtin_vsx_xxsldwi 12158 #define __builtin_altivec_vxor vec_xor 12161 vec_xor(vector
signed char __a, vector
signed char __b) {
12166 vec_xor(vector
bool char __a, vector
signed char __b) {
12167 return (vector
signed char)__a ^
__b;
12171 vec_xor(vector
signed char __a, vector
bool char __b) {
12172 return __a ^ (vector
signed char)__b;
12176 vec_xor(vector
unsigned char __a, vector
unsigned char __b) {
12181 vec_xor(vector
bool char __a, vector
unsigned char __b) {
12182 return (vector
unsigned char)__a ^
__b;
12186 vec_xor(vector
unsigned char __a, vector
bool char __b) {
12187 return __a ^ (vector
unsigned char)__b;
12191 vector
bool char __b) {
12196 vector
short __b) {
12201 vector
short __b) {
12202 return (vector
short)__a ^
__b;
12206 vector
bool short __b) {
12207 return __a ^ (vector short)__b;
12211 vec_xor(vector
unsigned short __a, vector
unsigned short __b) {
12216 vec_xor(vector
bool short __a, vector
unsigned short __b) {
12217 return (vector
unsigned short)__a ^
__b;
12221 vec_xor(vector
unsigned short __a, vector
bool short __b) {
12222 return __a ^ (vector
unsigned short)__b;
12226 vec_xor(vector
bool short __a, vector
bool short __b) {
12237 return (vector
int)__a ^
__b;
12241 vector
bool int __b) {
12242 return __a ^ (vector int)__b;
12246 vec_xor(vector
unsigned int __a, vector
unsigned int __b) {
12251 vec_xor(vector
bool int __a, vector
unsigned int __b) {
12252 return (vector
unsigned int)__a ^
__b;
12256 vec_xor(vector
unsigned int __a, vector
bool int __b) {
12257 return __a ^ (vector
unsigned int)__b;
12261 vector
bool int __b) {
12266 vector
float __b) {
12267 vector
unsigned int __res =
12268 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12269 return (vector
float)__res;
12273 vector
float __b) {
12274 vector
unsigned int __res =
12275 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12276 return (vector
float)__res;
12280 vector
bool int __b) {
12281 vector
unsigned int __res =
12282 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12283 return (vector
float)__res;
12287 static __inline__ vector
signed long long __ATTRS_o_ai 12288 vec_xor(vector
signed long long __a, vector
signed long long __b) {
12292 static __inline__ vector
signed long long __ATTRS_o_ai 12293 vec_xor(vector
bool long long __a, vector
signed long long __b) {
12294 return (vector
signed long long)__a ^
__b;
12297 static __inline__ vector
signed long long __ATTRS_o_ai 12298 vec_xor(vector
signed long long __a, vector
bool long long __b) {
12299 return __a ^ (vector
signed long long)__b;
12302 static __inline__ vector
unsigned long long __ATTRS_o_ai 12303 vec_xor(vector
unsigned long long __a, vector
unsigned long long __b) {
12307 static __inline__ vector
unsigned long long __ATTRS_o_ai 12308 vec_xor(vector
bool long long __a, vector
unsigned long long __b) {
12309 return (vector
unsigned long long)__a ^
__b;
12312 static __inline__ vector
unsigned long long __ATTRS_o_ai 12313 vec_xor(vector
unsigned long long __a, vector
bool long long __b) {
12314 return __a ^ (vector
unsigned long long)__b;
12318 vec_xor(vector
bool long long __a, vector
bool long long __b) {
12323 vector
double __b) {
12324 return (vector
double)((vector
unsigned long long)__a ^
12325 (vector
unsigned long long)
__b);
12329 vec_xor(vector
double __a, vector
bool long long __b) {
12330 return (vector
double)((vector
unsigned long long)__a ^
12331 (vector
unsigned long long)
__b);
12335 vector
double __b) {
12336 return (vector
double)((vector
unsigned long long)__a ^
12337 (vector
unsigned long long)
__b);
12350 return (vector
signed char)__a ^
__b;
12355 return __a ^ (vector
signed char)__b;
12359 vec_vxor(vector
unsigned char __a, vector
unsigned char __b) {
12365 return (vector
unsigned char)__a ^
__b;
12370 return __a ^ (vector
unsigned char)__b;
12374 vector
bool char __b) {
12379 vector
short __b) {
12384 vector
short __b) {
12385 return (vector
short)__a ^
__b;
12389 vector
bool short __b) {
12390 return __a ^ (vector short)__b;
12394 vec_vxor(vector
unsigned short __a, vector
unsigned short __b) {
12399 vec_vxor(vector
bool short __a, vector
unsigned short __b) {
12400 return (vector
unsigned short)__a ^
__b;
12404 vec_vxor(vector
unsigned short __a, vector
bool short __b) {
12405 return __a ^ (vector
unsigned short)__b;
12420 return (vector
int)__a ^
__b;
12424 vector
bool int __b) {
12425 return __a ^ (vector int)__b;
12429 vec_vxor(vector
unsigned int __a, vector
unsigned int __b) {
12435 return (vector
unsigned int)__a ^
__b;
12440 return __a ^ (vector
unsigned int)__b;
12444 vector
bool int __b) {
12449 vector
float __b) {
12450 vector
unsigned int __res =
12451 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12452 return (vector
float)__res;
12456 vector
float __b) {
12457 vector
unsigned int __res =
12458 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12459 return (vector
float)__res;
12463 vector
bool int __b) {
12464 vector
unsigned int __res =
12465 (vector
unsigned int)__a ^ (vector
unsigned int)
__b;
12466 return (vector
float)__res;
12470 static __inline__ vector
signed long long __ATTRS_o_ai 12471 vec_vxor(vector
signed long long __a, vector
signed long long __b) {
12475 static __inline__ vector
signed long long __ATTRS_o_ai 12476 vec_vxor(vector
bool long long __a, vector
signed long long __b) {
12477 return (vector
signed long long)__a ^
__b;
12480 static __inline__ vector
signed long long __ATTRS_o_ai 12481 vec_vxor(vector
signed long long __a, vector
bool long long __b) {
12482 return __a ^ (vector
signed long long)__b;
12485 static __inline__ vector
unsigned long long __ATTRS_o_ai 12486 vec_vxor(vector
unsigned long long __a, vector
unsigned long long __b) {
12490 static __inline__ vector
unsigned long long __ATTRS_o_ai 12491 vec_vxor(vector
bool long long __a, vector
unsigned long long __b) {
12492 return (vector
unsigned long long)__a ^
__b;
12495 static __inline__ vector
unsigned long long __ATTRS_o_ai 12496 vec_vxor(vector
unsigned long long __a, vector
bool long long __b) {
12497 return __a ^ (vector
unsigned long long)__b;
12501 vec_vxor(vector
bool long long __a, vector
bool long long __b) {
12557 vec_extract(vector
signed long long __a,
int __b) {
12562 vec_extract(vector
unsigned long long __a,
int __b) {
12567 vec_extract(vector
bool long long __a,
int __b) {
12580 #ifdef __POWER9_VECTOR__ 12582 #define vec_insert4b __builtin_vsx_insertword 12583 #define vec_extract4b __builtin_vsx_extractuword 12588 vec_extract_exp(vector
float __a) {
12589 return __builtin_vsx_xvxexpsp(__a);
12592 static __inline__ vector
unsigned long long __ATTRS_o_ai 12593 vec_extract_exp(vector
double __a) {
12594 return __builtin_vsx_xvxexpdp(__a);
12600 vec_extract_sig(vector
float __a) {
12601 return __builtin_vsx_xvxsigsp(__a);
12604 static __inline__ vector
unsigned long long __ATTRS_o_ai 12605 vec_extract_sig (vector
double __a) {
12606 return __builtin_vsx_xvxsigdp(__a);
12610 vec_extract_fp32_from_shorth(vector
unsigned short __a) {
12611 vector
unsigned short __b =
12612 #ifdef __LITTLE_ENDIAN__ 12613 __builtin_shufflevector(__a, __a, 0, -1, 1, -1, 2, -1, 3, -1);
12615 __builtin_shufflevector(__a, __a, -1, 0, -1, 1, -1, 2, -1, 3);
12617 return __builtin_vsx_xvcvhpsp(__b);
12621 vec_extract_fp32_from_shortl(vector
unsigned short __a) {
12622 vector
unsigned short __b =
12623 #ifdef __LITTLE_ENDIAN__ 12624 __builtin_shufflevector(__a, __a, 4, -1, 5, -1, 6, -1, 7, -1);
12626 __builtin_shufflevector(__a, __a, -1, 4, -1, 5, -1, 6, -1, 7);
12628 return __builtin_vsx_xvcvhpsp(__b);
12647 vector
bool char __b,
12684 vector
bool int __b,
12691 static __inline__ vector
signed long long __ATTRS_o_ai 12692 vec_insert(
signed long long __a, vector
signed long long __b,
int __c) {
12697 static __inline__ vector
unsigned long long __ATTRS_o_ai 12698 vec_insert(
unsigned long long __a, vector
unsigned long long __b,
int __c) {
12704 vec_insert(
unsigned long long __a, vector
bool long long __b,
int __c) {
12734 vec_lvsl(__a, (
unsigned char *)__b));
12746 vec_lvsl(__a, (
unsigned char *)__b));
12752 vec_lvsl(__a, (
unsigned char *)__b));
12756 const short *__b) {
12761 const vector
short *__b) {
12763 vec_lvsl(__a, (
unsigned char *)__b));
12775 vec_lvsl(__a, (
unsigned char *)__b));
12781 vec_lvsl(__a, (
unsigned char *)__b));
12785 const vector pixel *__b) {
12787 vec_lvsl(__a, (
unsigned char *)__b));
12795 const vector
int *__b) {
12797 vec_lvsl(__a, (
unsigned char *)__b));
12809 vec_lvsl(__a, (
unsigned char *)__b));
12815 vec_lvsl(__a, (
unsigned char *)__b));
12819 const float *__b) {
12824 const vector
float *__b) {
12826 vec_lvsl(__a, (
unsigned char *)__b));
12840 vec_lvsl(__a, (
unsigned char *)__b));
12852 vec_lvsl(__a, (
unsigned char *)__b));
12858 vec_lvsl(__a, (
unsigned char *)__b));
12862 const short *__b) {
12867 const vector
short *__b) {
12869 vec_lvsl(__a, (
unsigned char *)__b));
12881 vec_lvsl(__a, (
unsigned char *)__b));
12887 vec_lvsl(__a, (
unsigned char *)__b));
12891 const vector pixel *__b) {
12893 vec_lvsl(__a, (
unsigned char *)__b));
12901 const vector
int *__b) {
12903 vec_lvsl(__a, (
unsigned char *)__b));
12915 vec_lvsl(__a, (
unsigned char *)__b));
12921 vec_lvsl(__a, (
unsigned char *)__b));
12925 const float *__b) {
12930 vector
float *__b) {
12932 vec_lvsl(__a, (
unsigned char *)__b));
12946 vec_lvsl(__a, (
unsigned char *)__b));
12958 vec_lvsl(__a, (
unsigned char *)__b));
12964 vec_lvsl(__a, (
unsigned char *)__b));
12968 const short *__b) {
12973 const vector
short *__b) {
12975 vec_lvsl(__a, (
unsigned char *)__b));
12987 vec_lvsl(__a, (
unsigned char *)__b));
12993 vec_lvsl(__a, (
unsigned char *)__b));
12997 const vector pixel *__b) {
12999 vec_lvsl(__a, (
unsigned char *)__b));
13007 const vector
int *__b) {
13009 vec_lvsl(__a, (
unsigned char *)__b));
13021 vec_lvsl(__a, (
unsigned char *)__b));
13027 vec_lvsl(__a, (
unsigned char *)__b));
13031 const float *__b) {
13036 const vector
float *__b) {
13038 vec_lvsl(__a, (
unsigned char *)__b));
13052 vec_lvsl(__a, (
unsigned char *)__b));
13064 vec_lvsl(__a, (
unsigned char *)__b));
13070 vec_lvsl(__a, (
unsigned char *)__b));
13074 const short *__b) {
13079 const vector
short *__b) {
13081 vec_lvsl(__a, (
unsigned char *)__b));
13093 vec_lvsl(__a, (
unsigned char *)__b));
13099 vec_lvsl(__a, (
unsigned char *)__b));
13103 const vector pixel *__b) {
13105 vec_lvsl(__a, (
unsigned char *)__b));
13113 const vector
int *__b) {
13115 vec_lvsl(__a, (
unsigned char *)__b));
13127 vec_lvsl(__a, (
unsigned char *)__b));
13133 vec_lvsl(__a, (
unsigned char *)__b));
13137 const float *__b) {
13142 const vector
float *__b) {
13144 vec_lvsl(__a, (
unsigned char *)__b));
13150 signed char *__c) {
13156 vector
signed char *__c) {
13163 unsigned char *__c) {
13169 vector
unsigned char *__c) {
13176 vector
bool char *__c) {
13189 vector
short *__c) {
13196 int __b,
unsigned short *__c) {
13203 vector
unsigned short *__c) {
13210 vector
bool short *__c) {
13217 vector pixel *__c) {
13237 unsigned int *__c) {
13243 vector
unsigned int *__c) {
13250 vector
bool int *__c) {
13257 vector
float *__c) {
13266 signed char *__c) {
13272 vector
signed char *__c) {
13279 int __b,
unsigned char *__c) {
13286 vector
unsigned char *__c) {
13293 vector
bool char *__c) {
13306 vector
short *__c) {
13313 int __b,
unsigned short *__c) {
13320 vector
unsigned short *__c) {
13327 vector
bool short *__c) {
13334 vector pixel *__c) {
13354 unsigned int *__c) {
13360 vector
unsigned int *__c) {
13367 vector
bool int *__c) {
13374 vector
float *__c) {
13383 signed char *__c) {
13389 vector
signed char *__c) {
13396 unsigned char *__c) {
13402 vector
unsigned char *__c) {
13409 vector
bool char *__c) {
13422 vector
short *__c) {
13429 int __b,
unsigned short *__c) {
13436 vector
unsigned short *__c) {
13443 vector
bool short *__c) {
13450 vector pixel *__c) {
13470 unsigned int *__c) {
13476 vector
unsigned int *__c) {
13483 vector
bool int *__c) {
13490 vector
float *__c) {
13499 signed char *__c) {
13505 vector
signed char *__c) {
13512 int __b,
unsigned char *__c) {
13519 vector
unsigned char *__c) {
13526 vector
bool char *__c) {
13539 vector
short *__c) {
13546 int __b,
unsigned short *__c) {
13553 vector
unsigned short *__c) {
13560 vector
bool short *__c) {
13567 vector pixel *__c) {
13587 unsigned int *__c) {
13593 vector
unsigned int *__c) {
13600 vector
bool int *__c) {
13607 vector
float *__c) {
13617 vector
signed char __res = (vector
signed char)(0);
13624 vector
unsigned char __res = (vector
unsigned char)(0);
13630 vector
short __res = (vector short)(0);
13637 vector
unsigned short __res = (vector
unsigned short)(0);
13643 vector
int __res = (vector int)(0);
13650 vector
unsigned int __res = (vector
unsigned int)(0);
13656 vector
float __res = (vector float)(0);
13664 return (vector
signed char)(
__a);
13669 return (vector
unsigned char)(
__a);
13673 return (vector
short)(
__a);
13678 return (vector
unsigned short)(
__a);
13682 return (vector
int)(
__a);
13687 return (vector
unsigned int)(
__a);
13691 static __inline__ vector
signed long long __ATTRS_o_ai 13693 return (vector
signed long long)(
__a);
13696 static __inline__ vector
unsigned long long __ATTRS_o_ai 13698 return (vector
unsigned long long)(
__a);
13701 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 13704 return (vector
signed __int128)(
__a);
13707 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 13709 return (vector
unsigned __int128)(
__a);
13715 return (vector
double)(
__a);
13720 return (vector
float)(
__a);
13728 vector
signed 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
unsigned char __b) {
13741 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13746 vector
bool char __b) {
13747 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13752 vector
signed char __b) {
13753 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13758 vector
unsigned char __b) {
13759 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13764 vector
bool char __b) {
13765 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)__a,
13770 vector
short __b) {
13771 return __builtin_altivec_vcmpequh_p(
__CR6_LT, __a, __b);
13775 vector
bool short __b) {
13776 return __builtin_altivec_vcmpequh_p(
__CR6_LT, __a, (vector
short)__b);
13780 vector
unsigned short __b) {
13781 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13782 (vector
short)__b);
13786 vector
bool short __b) {
13787 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13788 (vector
short)__b);
13792 vector
short __b) {
13793 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13794 (vector
short)__b);
13798 vector
unsigned short __b) {
13799 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13800 (vector
short)__b);
13804 vector
bool short __b) {
13805 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13806 (vector
short)__b);
13810 vector pixel __b) {
13811 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)__a,
13812 (vector
short)__b);
13816 return __builtin_altivec_vcmpequw_p(
__CR6_LT, __a, __b);
13820 vector
bool int __b) {
13821 return __builtin_altivec_vcmpequw_p(
__CR6_LT, __a, (vector
int)__b);
13825 vector
unsigned int __b) {
13826 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13831 vector
bool int __b) {
13832 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13838 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13843 vector
unsigned int __b) {
13844 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13849 vector
bool int __b) {
13850 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)__a,
13854 #ifdef __POWER8_VECTOR__ 13856 vector
signed long long __b) {
13857 return __builtin_altivec_vcmpequd_p(
__CR6_LT, __a, __b);
13861 vector
bool long long __b) {
13862 return __builtin_altivec_vcmpequd_p(
__CR6_LT, __a, (vector
long long)__b);
13866 vector
unsigned long long __b) {
13867 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13868 (vector
long long)__b);
13872 vector
bool long long __b) {
13873 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13874 (vector
long long)__b);
13878 vector
long long __b) {
13879 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13880 (vector
long long)__b);
13884 vector
unsigned long long __b) {
13885 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13886 (vector
long long)__b);
13890 vector
bool long long __b) {
13891 return __builtin_altivec_vcmpequd_p(
__CR6_LT, (vector
long long)__a,
13892 (vector
long long)__b);
13897 vector
float __b) {
13899 return __builtin_vsx_xvcmpeqsp_p(
__CR6_LT, __a, __b);
13901 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT, __a, __b);
13907 vector
double __b) {
13908 return __builtin_vsx_xvcmpeqdp_p(
__CR6_LT, __a, __b);
13915 vector
signed char __b) {
13916 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, __b, __a);
13920 vector
bool char __b) {
13921 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, (vector
signed char)__b, __a);
13925 vector
unsigned char __b) {
13926 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __b, __a);
13930 vector
bool char __b) {
13931 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__b, __a);
13935 vector
signed char __b) {
13936 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__b,
13937 (vector
unsigned char)__a);
13941 vector
unsigned char __b) {
13942 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __b, (vector
unsigned char)__a);
13946 vector
bool char __b) {
13947 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__b,
13948 (vector
unsigned char)__a);
13952 vector
short __b) {
13953 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, __b, __a);
13957 vector
bool short __b) {
13958 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, (vector
short)__b, __a);
13962 vector
unsigned short __b) {
13963 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __b, __a);
13967 vector
bool short __b) {
13968 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__b,
13973 vector
short __b) {
13974 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__b,
13975 (vector
unsigned short)__a);
13979 vector
unsigned short __b) {
13980 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __b,
13981 (vector
unsigned short)__a);
13985 vector
bool short __b) {
13986 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__b,
13987 (vector
unsigned short)__a);
13991 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, __b, __a);
13995 vector
bool int __b) {
13996 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, (vector
int)__b, __a);
14000 vector
unsigned int __b) {
14001 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __b, __a);
14005 vector
bool int __b) {
14006 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__b, __a);
14011 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__b,
14012 (vector
unsigned int)__a);
14016 vector
unsigned int __b) {
14017 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __b, (vector
unsigned int)__a);
14021 vector
bool int __b) {
14022 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__b,
14023 (vector
unsigned int)__a);
14026 #ifdef __POWER8_VECTOR__ 14028 vector
signed long long __b) {
14029 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, __b, __a);
14032 vector
bool long long __b) {
14033 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, (vector
signed long long)__b,
14038 vector
unsigned long long __b) {
14039 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __b, __a);
14043 vector
bool long long __b) {
14044 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__b,
14049 vector
signed long long __b) {
14050 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__b,
14051 (vector
unsigned long long)__a);
14055 vector
unsigned long long __b) {
14056 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __b,
14057 (vector
unsigned long long)__a);
14061 vector
bool long long __b) {
14062 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__b,
14063 (vector
unsigned long long)__a);
14068 vector
float __b) {
14070 return __builtin_vsx_xvcmpgesp_p(
__CR6_LT, __a, __b);
14072 return __builtin_altivec_vcmpgefp_p(
__CR6_LT, __a, __b);
14078 vector
double __b) {
14079 return __builtin_vsx_xvcmpgedp_p(
__CR6_LT, __a, __b);
14086 vector
signed char __b) {
14087 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, __a, __b);
14091 vector
bool char __b) {
14092 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, __a, (vector
signed char)__b);
14096 vector
unsigned char __b) {
14097 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __a, __b);
14101 vector
bool char __b) {
14102 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __a, (vector
unsigned char)__b);
14106 vector
signed char __b) {
14107 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__a,
14108 (vector
unsigned char)__b);
14112 vector
unsigned char __b) {
14113 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__a, __b);
14117 vector
bool char __b) {
14118 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__a,
14119 (vector
unsigned char)__b);
14123 vector
short __b) {
14124 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, __a, __b);
14128 vector
bool short __b) {
14129 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, __a, (vector
short)__b);
14133 vector
unsigned short __b) {
14134 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __a, __b);
14138 vector
bool short __b) {
14139 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __a,
14140 (vector
unsigned short)__b);
14144 vector
short __b) {
14145 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__a,
14146 (vector
unsigned short)__b);
14150 vector
unsigned short __b) {
14151 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__a,
14156 vector
bool short __b) {
14157 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__a,
14158 (vector
unsigned short)__b);
14162 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, __a, __b);
14166 vector
bool int __b) {
14167 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, __a, (vector
int)__b);
14171 vector
unsigned int __b) {
14172 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __a, __b);
14176 vector
bool int __b) {
14177 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __a, (vector
unsigned int)__b);
14182 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__a,
14183 (vector
unsigned int)__b);
14187 vector
unsigned int __b) {
14188 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__a, __b);
14192 vector
bool int __b) {
14193 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__a,
14194 (vector
unsigned int)__b);
14197 #ifdef __POWER8_VECTOR__ 14199 vector
signed long long __b) {
14200 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, __a, __b);
14203 vector
bool long long __b) {
14204 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, __a,
14205 (vector
signed long long)__b);
14209 vector
unsigned long long __b) {
14210 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __a, __b);
14214 vector
bool long long __b) {
14215 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __a,
14216 (vector
unsigned long long)__b);
14220 vector
signed long long __b) {
14221 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__a,
14222 (vector
unsigned long long)__b);
14226 vector
unsigned long long __b) {
14227 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__a,
14232 vector
bool long long __b) {
14233 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__a,
14234 (vector
unsigned long long)__b);
14239 vector
float __b) {
14241 return __builtin_vsx_xvcmpgtsp_p(
__CR6_LT, __a, __b);
14243 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT, __a, __b);
14249 vector
double __b) {
14250 return __builtin_vsx_xvcmpgtdp_p(
__CR6_LT, __a, __b);
14257 vec_all_in(vector
float __a, vector
float __b) {
14258 return __builtin_altivec_vcmpbfp_p(
__CR6_EQ, __a, __b);
14264 vector
signed char __b) {
14265 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, __a, __b);
14269 vector
bool char __b) {
14270 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, __a, (vector
signed char)__b);
14274 vector
unsigned char __b) {
14275 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __a, __b);
14279 vector
bool char __b) {
14280 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, __a, (vector
unsigned char)__b);
14284 vector
signed char __b) {
14285 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__a,
14286 (vector
unsigned char)__b);
14290 vector
unsigned char __b) {
14291 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__a, __b);
14295 vector
bool char __b) {
14296 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)__a,
14297 (vector
unsigned char)__b);
14301 vector
short __b) {
14302 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, __a, __b);
14306 vector
bool short __b) {
14307 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, __a, (vector
short)__b);
14311 vector
unsigned short __b) {
14312 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __a, __b);
14316 vector
bool short __b) {
14317 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, __a,
14318 (vector
unsigned short)__b);
14322 vector
short __b) {
14323 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__a,
14324 (vector
unsigned short)__b);
14328 vector
unsigned short __b) {
14329 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__a,
14334 vector
bool short __b) {
14335 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)__a,
14336 (vector
unsigned short)__b);
14340 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, __a, __b);
14344 vector
bool int __b) {
14345 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, __a, (vector
int)__b);
14349 vector
unsigned int __b) {
14350 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __a, __b);
14354 vector
bool int __b) {
14355 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, __a, (vector
unsigned int)__b);
14360 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__a,
14361 (vector
unsigned int)__b);
14365 vector
unsigned int __b) {
14366 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__a, __b);
14370 vector
bool int __b) {
14371 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)__a,
14372 (vector
unsigned int)__b);
14375 #ifdef __POWER8_VECTOR__ 14377 vector
signed long long __b) {
14378 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, __a, __b);
14382 vector
unsigned long long __b) {
14383 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __a, __b);
14387 vector
bool long long __b) {
14388 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, __a,
14389 (vector
signed long long)__b);
14393 vector
bool long long __b) {
14394 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, __a,
14395 (vector
unsigned long long)__b);
14399 vector
signed long long __b) {
14400 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__a,
14401 (vector
unsigned long long)__b);
14405 vector
unsigned long long __b) {
14406 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__a,
14411 vector
bool long long __b) {
14412 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)__a,
14413 (vector
unsigned long long)__b);
14418 vector
float __b) {
14420 return __builtin_vsx_xvcmpgesp_p(
__CR6_LT, __b, __a);
14422 return __builtin_altivec_vcmpgefp_p(
__CR6_LT, __b, __a);
14428 vector
double __b) {
14429 return __builtin_vsx_xvcmpgedp_p(
__CR6_LT, __b, __a);
14436 vector
signed char __b) {
14437 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, __b, __a);
14441 vector
bool char __b) {
14442 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, (vector
signed char)__b, __a);
14446 vector
unsigned char __b) {
14447 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __b, __a);
14451 vector
bool char __b) {
14452 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__b, __a);
14456 vector
signed char __b) {
14457 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__b,
14458 (vector
unsigned char)__a);
14462 vector
unsigned char __b) {
14463 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, __b, (vector
unsigned char)__a);
14467 vector
bool char __b) {
14468 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)__b,
14469 (vector
unsigned char)__a);
14473 vector
short __b) {
14474 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, __b, __a);
14478 vector
bool short __b) {
14479 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, (vector
short)__b, __a);
14483 vector
unsigned short __b) {
14484 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __b, __a);
14488 vector
bool short __b) {
14489 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__b,
14494 vector
short __b) {
14495 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__b,
14496 (vector
unsigned short)__a);
14500 vector
unsigned short __b) {
14501 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, __b,
14502 (vector
unsigned short)__a);
14506 vector
bool short __b) {
14507 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)__b,
14508 (vector
unsigned short)__a);
14512 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, __b, __a);
14516 vector
bool int __b) {
14517 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, (vector
int)__b, __a);
14521 vector
unsigned int __b) {
14522 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __b, __a);
14526 vector
bool int __b) {
14527 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__b, __a);
14532 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__b,
14533 (vector
unsigned int)__a);
14537 vector
unsigned int __b) {
14538 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, __b, (vector
unsigned int)__a);
14542 vector
bool int __b) {
14543 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)__b,
14544 (vector
unsigned int)__a);
14547 #ifdef __POWER8_VECTOR__ 14549 vector
signed long long __b) {
14550 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, __b, __a);
14554 vector
unsigned long long __b) {
14555 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __b, __a);
14559 vector
bool long long __b) {
14560 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, (vector
signed long long)__b,
14565 vector
bool long long __b) {
14566 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__b,
14571 vector
signed long long __b) {
14572 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__b,
14573 (vector
unsigned long long)__a);
14577 vector
unsigned long long __b) {
14578 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, __b,
14579 (vector
unsigned long long)__a);
14583 vector
bool long long __b) {
14584 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)__b,
14585 (vector
unsigned long long)__a);
14590 vector
float __b) {
14592 return __builtin_vsx_xvcmpgtsp_p(
__CR6_LT, __b, __a);
14594 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT, __b, __a);
14600 vector
double __b) {
14601 return __builtin_vsx_xvcmpgtdp_p(
__CR6_LT, __b, __a);
14609 return __builtin_vsx_xvcmpeqsp_p(
__CR6_EQ, __a, __a);
14611 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ, __a, __a);
14617 return __builtin_vsx_xvcmpeqdp_p(
__CR6_EQ, __a, __a);
14624 vector
signed 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
unsigned char __b) {
14637 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14642 vector
bool char __b) {
14643 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14648 vector
signed char __b) {
14649 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14654 vector
unsigned char __b) {
14655 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14660 vector
bool char __b) {
14661 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)__a,
14666 vector
short __b) {
14667 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, __a, __b);
14671 vector
bool short __b) {
14672 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, __a, (vector
short)__b);
14676 vector
unsigned short __b) {
14677 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14678 (vector
short)__b);
14682 vector
bool short __b) {
14683 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14684 (vector
short)__b);
14688 vector
short __b) {
14689 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14690 (vector
short)__b);
14694 vector
unsigned short __b) {
14695 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14696 (vector
short)__b);
14700 vector
bool short __b) {
14701 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14702 (vector
short)__b);
14706 vector pixel __b) {
14707 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)__a,
14708 (vector
short)__b);
14712 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, __a, __b);
14716 vector
bool int __b) {
14717 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, __a, (vector
int)__b);
14721 vector
unsigned int __b) {
14722 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14727 vector
bool int __b) {
14728 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14734 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14739 vector
unsigned int __b) {
14740 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14745 vector
bool int __b) {
14746 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)__a,
14750 #ifdef __POWER8_VECTOR__ 14752 vector
signed long long __b) {
14753 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, __a, __b);
14757 vector
unsigned long long __b) {
14758 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
long long)__a,
14759 (vector
long long)__b);
14763 vector
bool long long __b) {
14764 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, __a,
14765 (vector
signed long long)__b);
14769 vector
bool long long __b) {
14770 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14771 (vector
signed long long)__b);
14775 vector
signed long long __b) {
14776 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14777 (vector
signed long long)__b);
14781 vector
unsigned long long __b) {
14782 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14783 (vector
signed long long)__b);
14787 vector
bool long long __b) {
14788 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)__a,
14789 (vector
signed long long)__b);
14794 vector
float __b) {
14796 return __builtin_vsx_xvcmpeqdp_p(
__CR6_EQ, __a, __b);
14798 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ, __a, __b);
14804 vector
double __b) {
14805 return __builtin_vsx_xvcmpeqdp_p(
__CR6_EQ, __a, __b);
14812 vector
float __b) {
14814 return __builtin_vsx_xvcmpgesp_p(
__CR6_EQ, __a, __b);
14816 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ, __a, __b);
14822 vector
double __b) {
14823 return __builtin_vsx_xvcmpgedp_p(
__CR6_EQ, __a, __b);
14830 vector
float __b) {
14832 return __builtin_vsx_xvcmpgtsp_p(
__CR6_EQ, __a, __b);
14834 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ, __a, __b);
14840 vector
double __b) {
14841 return __builtin_vsx_xvcmpgtdp_p(
__CR6_EQ, __a, __b);
14848 vec_all_nle(vector
float __a, vector
float __b) {
14849 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ, __b, __a);
14855 vec_all_nlt(vector
float __a, vector
float __b) {
14856 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ, __b, __a);
14862 vec_all_numeric(vector
float __a) {
14863 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT, __a, __a);
14869 vector
signed 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
unsigned char __b) {
14882 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14887 vector
bool char __b) {
14888 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14893 vector
signed char __b) {
14894 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14899 vector
unsigned char __b) {
14900 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14905 vector
bool char __b) {
14906 return __builtin_altivec_vcmpequb_p(
__CR6_EQ_REV, (vector
char)__a,
14911 vector
short __b) {
14912 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, __a, __b);
14916 vector
bool short __b) {
14917 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, __a, (vector
short)__b);
14921 vector
unsigned short __b) {
14922 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14923 (vector
short)__b);
14927 vector
bool short __b) {
14928 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14929 (vector
short)__b);
14933 vector
short __b) {
14934 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14935 (vector
short)__b);
14939 vector
unsigned short __b) {
14940 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14941 (vector
short)__b);
14945 vector
bool short __b) {
14946 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14947 (vector
short)__b);
14951 vector pixel __b) {
14952 return __builtin_altivec_vcmpequh_p(
__CR6_EQ_REV, (vector
short)__a,
14953 (vector
short)__b);
14957 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, __a, __b);
14961 vector
bool int __b) {
14962 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, __a, (vector
int)__b);
14966 vector
unsigned int __b) {
14967 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14972 vector
bool int __b) {
14973 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14979 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14984 vector
unsigned int __b) {
14985 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14990 vector
bool int __b) {
14991 return __builtin_altivec_vcmpequw_p(
__CR6_EQ_REV, (vector
int)__a,
14995 #ifdef __POWER8_VECTOR__ 14997 vector
signed long long __b) {
14998 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, __a, __b);
15002 vector
unsigned long long __b) {
15003 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, (vector
long long)__a,
15004 (vector
long long)__b);
15008 vector
bool long long __b) {
15009 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, __a,
15010 (vector
signed long long)__b);
15014 vector
bool 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
signed long long __b) {
15021 return __builtin_altivec_vcmpequd_p(
15022 __CR6_EQ_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15026 vector
unsigned long long __b) {
15027 return __builtin_altivec_vcmpequd_p(
15028 __CR6_EQ_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15032 vector
bool long long __b) {
15033 return __builtin_altivec_vcmpequd_p(
15034 __CR6_EQ_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15039 vector
float __b) {
15041 return __builtin_vsx_xvcmpeqsp_p(
__CR6_EQ_REV, __a, __b);
15043 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ_REV, __a, __b);
15049 vector
double __b) {
15050 return __builtin_vsx_xvcmpeqdp_p(
__CR6_EQ_REV, __a, __b);
15057 vector
signed char __b) {
15058 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, __b, __a);
15062 vector
bool char __b) {
15063 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, (vector
signed char)__b,
15068 vector
unsigned char __b) {
15069 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __b, __a);
15073 vector
bool char __b) {
15074 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__b,
15079 vector
signed char __b) {
15080 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__b,
15081 (vector
unsigned char)__a);
15085 vector
unsigned char __b) {
15086 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __b,
15087 (vector
unsigned char)__a);
15091 vector
bool char __b) {
15092 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__b,
15093 (vector
unsigned char)__a);
15097 vector
short __b) {
15098 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, __b, __a);
15102 vector
bool short __b) {
15103 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, (vector
short)__b, __a);
15107 vector
unsigned short __b) {
15108 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __b, __a);
15112 vector
bool short __b) {
15113 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__b,
15118 vector
short __b) {
15119 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__b,
15120 (vector
unsigned short)__a);
15124 vector
unsigned short __b) {
15125 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __b,
15126 (vector
unsigned short)__a);
15130 vector
bool short __b) {
15131 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__b,
15132 (vector
unsigned short)__a);
15136 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, __b, __a);
15140 vector
bool int __b) {
15141 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, (vector
int)__b, __a);
15145 vector
unsigned int __b) {
15146 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __b, __a);
15150 vector
bool int __b) {
15151 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__b,
15157 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__b,
15158 (vector
unsigned int)__a);
15162 vector
unsigned int __b) {
15163 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __b,
15164 (vector
unsigned int)__a);
15168 vector
bool int __b) {
15169 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__b,
15170 (vector
unsigned int)__a);
15173 #ifdef __POWER8_VECTOR__ 15175 vector
signed long long __b) {
15176 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT_REV, __b, __a);
15180 vector
unsigned long long __b) {
15181 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __b, __a);
15185 vector
bool long long __b) {
15187 (vector
signed long long)__b, __a);
15191 vector
bool long long __b) {
15193 (vector
unsigned long long)__b, __a);
15197 vector
signed long long __b) {
15199 (vector
unsigned long long)__b,
15200 (vector
unsigned long long)__a);
15204 vector
unsigned long long __b) {
15205 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __b,
15206 (vector
unsigned long long)__a);
15210 vector
bool long long __b) {
15212 (vector
unsigned long long)__b,
15213 (vector
unsigned long long)__a);
15218 vector
float __b) {
15220 return __builtin_vsx_xvcmpgesp_p(
__CR6_EQ_REV, __a, __b);
15222 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ_REV, __a, __b);
15228 vector
double __b) {
15229 return __builtin_vsx_xvcmpgedp_p(
__CR6_EQ_REV, __a, __b);
15236 vector
signed char __b) {
15237 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, __a, __b);
15241 vector
bool char __b) {
15242 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, __a,
15243 (vector
signed char)__b);
15247 vector
unsigned char __b) {
15248 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __a, __b);
15252 vector
bool char __b) {
15253 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __a,
15254 (vector
unsigned char)__b);
15258 vector
signed char __b) {
15259 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__a,
15260 (vector
unsigned char)__b);
15264 vector
unsigned char __b) {
15265 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__a,
15270 vector
bool char __b) {
15271 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__a,
15272 (vector
unsigned char)__b);
15276 vector
short __b) {
15277 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, __a, __b);
15281 vector
bool short __b) {
15282 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, __a, (vector
short)__b);
15286 vector
unsigned short __b) {
15287 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __a, __b);
15291 vector
bool short __b) {
15292 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __a,
15293 (vector
unsigned short)__b);
15297 vector
short __b) {
15298 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__a,
15299 (vector
unsigned short)__b);
15303 vector
unsigned short __b) {
15304 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__a,
15309 vector
bool short __b) {
15310 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__a,
15311 (vector
unsigned short)__b);
15315 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, __a, __b);
15319 vector
bool int __b) {
15320 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, __a, (vector
int)__b);
15324 vector
unsigned int __b) {
15325 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __a, __b);
15329 vector
bool int __b) {
15330 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __a,
15331 (vector
unsigned int)__b);
15336 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__a,
15337 (vector
unsigned int)__b);
15341 vector
unsigned int __b) {
15342 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__a,
15347 vector
bool int __b) {
15348 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__a,
15349 (vector
unsigned int)__b);
15352 #ifdef __POWER8_VECTOR__ 15354 vector
signed long long __b) {
15355 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ_REV, __a, __b);
15359 vector
unsigned long long __b) {
15360 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __a, __b);
15364 vector
bool long long __b) {
15365 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ_REV, __a,
15366 (vector
signed long long)__b);
15370 vector
bool long long __b) {
15371 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __a,
15372 (vector
unsigned long long)__b);
15376 vector
signed long long __b) {
15378 (vector
unsigned long long)__a,
15379 (vector
unsigned long long)__b);
15383 vector
unsigned long long __b) {
15385 (vector
unsigned long long)__a, __b);
15389 vector
bool long long __b) {
15391 (vector
unsigned long long)__a,
15392 (vector
unsigned long long)__b);
15397 vector
float __b) {
15399 return __builtin_vsx_xvcmpgtsp_p(
__CR6_EQ_REV, __a, __b);
15401 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ_REV, __a, __b);
15407 vector
double __b) {
15408 return __builtin_vsx_xvcmpgtdp_p(
__CR6_EQ_REV, __a, __b);
15415 vector
signed char __b) {
15416 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, __a, __b);
15420 vector
bool char __b) {
15421 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, __a,
15422 (vector
signed char)__b);
15426 vector
unsigned char __b) {
15427 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __a, __b);
15431 vector
bool char __b) {
15432 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, __a,
15433 (vector
unsigned char)__b);
15437 vector
signed char __b) {
15438 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__a,
15439 (vector
unsigned char)__b);
15443 vector
unsigned char __b) {
15444 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__a,
15449 vector
bool char __b) {
15450 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)__a,
15451 (vector
unsigned char)__b);
15455 vector
short __b) {
15456 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, __a, __b);
15460 vector
bool short __b) {
15461 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, __a, (vector
short)__b);
15465 vector
unsigned short __b) {
15466 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __a, __b);
15470 vector
bool short __b) {
15471 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, __a,
15472 (vector
unsigned short)__b);
15476 vector
short __b) {
15477 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__a,
15478 (vector
unsigned short)__b);
15482 vector
unsigned short __b) {
15483 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__a,
15488 vector
bool short __b) {
15489 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)__a,
15490 (vector
unsigned short)__b);
15494 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, __a, __b);
15498 vector
bool int __b) {
15499 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, __a, (vector
int)__b);
15503 vector
unsigned int __b) {
15504 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __a, __b);
15508 vector
bool int __b) {
15509 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, __a,
15510 (vector
unsigned int)__b);
15515 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__a,
15516 (vector
unsigned int)__b);
15520 vector
unsigned int __b) {
15521 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__a,
15526 vector
bool int __b) {
15527 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)__a,
15528 (vector
unsigned int)__b);
15531 #ifdef __POWER8_VECTOR__ 15533 vector
signed long long __b) {
15534 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT_REV, __a, __b);
15538 vector
unsigned long long __b) {
15539 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __a, __b);
15543 vector
bool long long __b) {
15544 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT_REV, __a,
15545 (vector
signed long long)__b);
15549 vector
bool long long __b) {
15550 return __builtin_altivec_vcmpgtud_p(
__CR6_LT_REV, __a,
15551 (vector
unsigned long long)__b);
15555 vector
signed long long __b) {
15557 (vector
unsigned long long)__a,
15558 (vector
unsigned long long)__b);
15562 vector
unsigned long long __b) {
15564 (vector
unsigned long long)__a, __b);
15568 vector
bool long long __b) {
15570 (vector
unsigned long long)__a,
15571 (vector
unsigned long long)__b);
15576 vector
float __b) {
15578 return __builtin_vsx_xvcmpgesp_p(
__CR6_EQ_REV, __b, __a);
15580 return __builtin_altivec_vcmpgefp_p(
__CR6_EQ_REV, __b, __a);
15586 vector
double __b) {
15587 return __builtin_vsx_xvcmpgedp_p(
__CR6_EQ_REV, __b, __a);
15594 vector
signed char __b) {
15595 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, __b, __a);
15599 vector
bool char __b) {
15600 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, (vector
signed char)__b,
15605 vector
unsigned char __b) {
15606 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __b, __a);
15610 vector
bool char __b) {
15611 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__b,
15616 vector
signed char __b) {
15617 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__b,
15618 (vector
unsigned char)__a);
15622 vector
unsigned char __b) {
15623 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, __b,
15624 (vector
unsigned char)__a);
15628 vector
bool char __b) {
15629 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)__b,
15630 (vector
unsigned char)__a);
15634 vector
short __b) {
15635 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, __b, __a);
15639 vector
bool short __b) {
15640 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, (vector
short)__b, __a);
15644 vector
unsigned short __b) {
15645 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __b, __a);
15649 vector
bool short __b) {
15650 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__b,
15655 vector
short __b) {
15656 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__b,
15657 (vector
unsigned short)__a);
15661 vector
unsigned short __b) {
15662 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, __b,
15663 (vector
unsigned short)__a);
15667 vector
bool short __b) {
15668 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)__b,
15669 (vector
unsigned short)__a);
15673 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, __b, __a);
15677 vector
bool int __b) {
15678 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, (vector
int)__b, __a);
15682 vector
unsigned int __b) {
15683 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __b, __a);
15687 vector
bool int __b) {
15688 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__b,
15694 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__b,
15695 (vector
unsigned int)__a);
15699 vector
unsigned int __b) {
15700 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, __b,
15701 (vector
unsigned int)__a);
15705 vector
bool int __b) {
15706 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)__b,
15707 (vector
unsigned int)__a);
15710 #ifdef __POWER8_VECTOR__ 15712 vector
signed long long __b) {
15713 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ_REV, __b, __a);
15717 vector
unsigned long long __b) {
15718 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __b, __a);
15722 vector
bool long long __b) {
15724 (vector
signed long long)__b, __a);
15728 vector
bool long long __b) {
15730 (vector
unsigned long long)__b, __a);
15734 vector
signed long long __b) {
15736 (vector
unsigned long long)__b,
15737 (vector
unsigned long long)__a);
15741 vector
unsigned long long __b) {
15742 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ_REV, __b,
15743 (vector
unsigned long long)__a);
15747 vector
bool long long __b) {
15749 (vector
unsigned long long)__b,
15750 (vector
unsigned long long)__a);
15755 vector
float __b) {
15757 return __builtin_vsx_xvcmpgtsp_p(
__CR6_EQ_REV, __b, __a);
15759 return __builtin_altivec_vcmpgtfp_p(
__CR6_EQ_REV, __b, __a);
15765 vector
double __b) {
15766 return __builtin_vsx_xvcmpgtdp_p(
__CR6_EQ_REV, __b, __a);
15773 vec_any_nan(vector
float __a) {
15774 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT_REV, __a, __a);
15780 vector
signed 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
unsigned char __b) {
15793 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15798 vector
bool char __b) {
15799 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15804 vector
signed char __b) {
15805 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15810 vector
unsigned char __b) {
15811 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15816 vector
bool char __b) {
15817 return __builtin_altivec_vcmpequb_p(
__CR6_LT_REV, (vector
char)__a,
15822 vector
short __b) {
15823 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, __a, __b);
15827 vector
bool short __b) {
15828 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, __a, (vector
short)__b);
15832 vector
unsigned short __b) {
15833 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15834 (vector
short)__b);
15838 vector
bool short __b) {
15839 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15840 (vector
short)__b);
15844 vector
short __b) {
15845 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15846 (vector
short)__b);
15850 vector
unsigned short __b) {
15851 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15852 (vector
short)__b);
15856 vector
bool short __b) {
15857 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15858 (vector
short)__b);
15862 vector pixel __b) {
15863 return __builtin_altivec_vcmpequh_p(
__CR6_LT_REV, (vector
short)__a,
15864 (vector
short)__b);
15868 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, __a, __b);
15872 vector
bool int __b) {
15873 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, __a, (vector
int)__b);
15877 vector
unsigned int __b) {
15878 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15883 vector
bool int __b) {
15884 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15890 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15895 vector
unsigned int __b) {
15896 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15901 vector
bool int __b) {
15902 return __builtin_altivec_vcmpequw_p(
__CR6_LT_REV, (vector
int)__a,
15906 #ifdef __POWER8_VECTOR__ 15908 vector
signed long long __b) {
15909 return __builtin_altivec_vcmpequd_p(
__CR6_LT_REV, __a, __b);
15913 vector
unsigned long long __b) {
15914 return __builtin_altivec_vcmpequd_p(
__CR6_LT_REV, (vector
long long)__a,
15915 (vector
long long)__b);
15919 vector
bool long long __b) {
15920 return __builtin_altivec_vcmpequd_p(
__CR6_LT_REV, __a,
15921 (vector
signed long long)__b);
15925 vector
bool 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
signed long long __b) {
15932 return __builtin_altivec_vcmpequd_p(
15933 __CR6_LT_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15937 vector
unsigned long long __b) {
15938 return __builtin_altivec_vcmpequd_p(
15939 __CR6_LT_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15943 vector
bool long long __b) {
15944 return __builtin_altivec_vcmpequd_p(
15945 __CR6_LT_REV, (vector
signed long long)__a, (vector
signed long long)__b);
15950 vector
float __b) {
15952 return __builtin_vsx_xvcmpeqsp_p(
__CR6_LT_REV, __a, __b);
15954 return __builtin_altivec_vcmpeqfp_p(
__CR6_LT_REV, __a, __b);
15960 vector
double __b) {
15961 return __builtin_vsx_xvcmpeqdp_p(
__CR6_LT_REV, __a, __b);
15968 vec_any_nge(vector
float __a, vector
float __b) {
15969 return __builtin_altivec_vcmpgefp_p(
__CR6_LT_REV, __a, __b);
15975 vec_any_ngt(vector
float __a, vector
float __b) {
15976 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT_REV, __a, __b);
15982 vec_any_nle(vector
float __a, vector
float __b) {
15983 return __builtin_altivec_vcmpgefp_p(
__CR6_LT_REV, __b, __a);
15989 vec_any_nlt(vector
float __a, vector
float __b) {
15990 return __builtin_altivec_vcmpgtfp_p(
__CR6_LT_REV, __b, __a);
15996 vec_any_numeric(vector
float __a) {
15997 return __builtin_altivec_vcmpeqfp_p(
__CR6_EQ_REV, __a, __a);
16003 vec_any_out(vector
float __a, vector
float __b) {
16004 return __builtin_altivec_vcmpbfp_p(
__CR6_EQ_REV, __a, __b);
16021 #define vec_sbox_be __builtin_altivec_crypto_vsbox 16022 #define vec_cipher_be __builtin_altivec_crypto_vcipher 16023 #define vec_cipherlast_be __builtin_altivec_crypto_vcipherlast 16024 #define vec_ncipher_be __builtin_altivec_crypto_vncipher 16025 #define vec_ncipherlast_be __builtin_altivec_crypto_vncipherlast 16027 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16028 __builtin_crypto_vsbox(vector
unsigned long long __a) {
16029 return __builtin_altivec_crypto_vsbox(__a);
16032 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16033 __builtin_crypto_vcipher(vector
unsigned long long __a,
16034 vector
unsigned long long __b) {
16035 return __builtin_altivec_crypto_vcipher(__a, __b);
16038 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16039 __builtin_crypto_vcipherlast(vector
unsigned long long __a,
16040 vector
unsigned long long __b) {
16041 return __builtin_altivec_crypto_vcipherlast(__a, __b);
16044 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16045 __builtin_crypto_vncipher(vector
unsigned long long __a,
16046 vector
unsigned long long __b) {
16047 return __builtin_altivec_crypto_vncipher(__a, __b);
16050 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16051 __builtin_crypto_vncipherlast(vector
unsigned long long __a,
16052 vector
unsigned long long __b) {
16053 return __builtin_altivec_crypto_vncipherlast(__a, __b);
16056 #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad 16057 #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw 16059 #define vec_shasigma_be(X, Y, Z) \ 16060 _Generic((X), vector unsigned int \ 16061 : __builtin_crypto_vshasigmaw, vector unsigned long long \ 16062 : __builtin_crypto_vshasigmad)((X), (Y), (Z)) 16065 #ifdef __POWER8_VECTOR__ 16067 vec_permxor(vector
bool char __a, vector
bool char __b,
16068 vector
bool char __c) {
16069 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16073 vec_permxor(vector
signed char __a, vector
signed char __b,
16074 vector
signed char __c) {
16075 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16079 vec_permxor(vector
unsigned char __a, vector
unsigned char __b,
16080 vector
unsigned char __c) {
16081 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16085 __builtin_crypto_vpermxor(vector
unsigned char __a, vector
unsigned char __b,
16086 vector
unsigned char __c) {
16087 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
16091 __builtin_crypto_vpermxor(vector
unsigned short __a, vector
unsigned short __b,
16092 vector
unsigned short __c) {
16093 return (vector
unsigned short)__builtin_altivec_crypto_vpermxor(
16094 (vector
unsigned char)__a, (vector
unsigned char)__b,
16095 (vector
unsigned char)__c);
16098 static __inline__ vector
unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
16099 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
16100 return (vector
unsigned int)__builtin_altivec_crypto_vpermxor(
16101 (vector
unsigned char)__a, (vector
unsigned char)__b,
16102 (vector
unsigned char)__c);
16105 static __inline__ vector
unsigned long long __ATTRS_o_ai 16106 __builtin_crypto_vpermxor(vector
unsigned long long __a,
16107 vector
unsigned long long __b,
16108 vector
unsigned long long __c) {
16109 return (vector
unsigned long long)__builtin_altivec_crypto_vpermxor(
16110 (vector
unsigned char)__a, (vector
unsigned char)__b,
16111 (vector
unsigned char)__c);
16115 __builtin_crypto_vpmsumb(vector
unsigned char __a, vector
unsigned char __b) {
16116 return __builtin_altivec_crypto_vpmsumb(__a, __b);
16120 __builtin_crypto_vpmsumb(vector
unsigned short __a, vector
unsigned short __b) {
16121 return __builtin_altivec_crypto_vpmsumh(__a, __b);
16125 __builtin_crypto_vpmsumb(vector
unsigned int __a, vector
unsigned int __b) {
16126 return __builtin_altivec_crypto_vpmsumw(__a, __b);
16129 static __inline__ vector
unsigned long long __ATTRS_o_ai 16130 __builtin_crypto_vpmsumb(vector
unsigned long long __a,
16131 vector
unsigned long long __b) {
16132 return __builtin_altivec_crypto_vpmsumd(__a, __b);
16136 vec_vgbbd(vector
signed char __a) {
16137 return __builtin_altivec_vgbbd((vector
unsigned char)__a);
16140 #define vec_pmsum_be __builtin_crypto_vpmsumb 16141 #define vec_gb __builtin_altivec_vgbbd 16144 vec_vgbbd(vector
unsigned char __a) {
16145 return __builtin_altivec_vgbbd(__a);
16149 vec_vbpermq(vector
signed char __a, vector
signed char __b) {
16150 return __builtin_altivec_vbpermq((vector
unsigned char)__a,
16151 (vector
unsigned char)__b);
16155 vec_vbpermq(vector
unsigned char __a, vector
unsigned char __b) {
16156 return __builtin_altivec_vbpermq(__a, __b);
16159 #ifdef __powerpc64__ 16160 static __inline__ vector
unsigned long long __attribute__((__always_inline__))
16161 vec_bperm(vector
unsigned __int128 __a, vector
unsigned char __b) {
16162 return __builtin_altivec_vbpermq((vector
unsigned char)__a,
16163 (vector
unsigned char)__b);
16172 return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
16177 return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
16183 return __builtin_shufflevector(__a, __a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
16188 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16192 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16197 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16201 return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0);
16206 return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0);
16211 return __builtin_shufflevector(__a, __a, 7, 6, 5, 4, 3, 2, 1, 0);
16215 return __builtin_shufflevector(__a, __a, 3, 2, 1, 0);
16220 vec_reve(vector
bool long long __a) {
16221 return __builtin_shufflevector(__a, __a, 1, 0);
16225 vec_reve(vector
signed long long __a) {
16226 return __builtin_shufflevector(__a, __a, 1, 0);
16230 vec_reve(vector
unsigned long long __a) {
16231 return __builtin_shufflevector(__a, __a, 1, 0);
16235 return __builtin_shufflevector(__a, __a, 1, 0);
16257 vector
unsigned char __indices =
16258 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
16259 return vec_perm(__a, __a, __indices);
16264 vector
unsigned char __indices =
16265 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
16266 return vec_perm(__a, __a, __indices);
16271 vector
unsigned char __indices =
16272 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
16273 return vec_perm(__a, __a, __indices);
16278 vector
unsigned char __indices =
16279 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16280 return vec_perm(__a, __a, __indices);
16285 vector
unsigned char __indices =
16286 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16287 return vec_perm(__a, __a, __indices);
16292 vector
unsigned char __indices =
16293 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16294 return vec_perm(__a, __a, __indices);
16299 vector
unsigned char __indices =
16300 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
16301 return vec_perm(__a, __a, __indices);
16306 vec_revb(vector
bool long long __a) {
16307 vector
unsigned char __indices =
16308 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16309 return vec_perm(__a, __a, __indices);
16312 static __inline__ vector
signed long long __ATTRS_o_ai 16313 vec_revb(vector
signed long long __a) {
16314 vector
unsigned char __indices =
16315 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16316 return vec_perm(__a, __a, __indices);
16319 static __inline__ vector
unsigned long long __ATTRS_o_ai 16320 vec_revb(vector
unsigned long long __a) {
16321 vector
unsigned char __indices =
16322 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16323 return vec_perm(__a, __a, __indices);
16328 vector
unsigned char __indices =
16329 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
16330 return vec_perm(__a, __a, __indices);
16334 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16336 vec_revb(vector
signed __int128 __a) {
16337 vector
unsigned char __indices =
16338 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
16339 return (vector
signed __int128)
vec_perm((vector
signed int)__a,
16340 (vector
signed int)__a,
16344 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 16345 vec_revb(vector
unsigned __int128 __a) {
16346 vector
unsigned char __indices =
16347 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
16348 return (vector
unsigned __int128)
vec_perm((vector
signed int)__a,
16349 (vector
signed int)__a,
16357 signed char *__ptr) {
16358 return *(vector
signed char *)(__ptr + __offset);
16362 vec_xl(
signed long long __offset,
unsigned char *__ptr) {
16363 return *(vector
unsigned char *)(__ptr + __offset);
16367 signed short *__ptr) {
16368 return *(vector
signed short *)(__ptr + __offset);
16372 vec_xl(
signed long long __offset,
unsigned short *__ptr) {
16373 return *(vector
unsigned short *)(__ptr + __offset);
16377 signed int *__ptr) {
16378 return *(vector
signed int *)(__ptr + __offset);
16382 unsigned int *__ptr) {
16383 return *(vector
unsigned int *)(__ptr + __offset);
16388 return *(vector
float *)(__ptr + __offset);
16393 vec_xl(
signed long long __offset,
signed long long *__ptr) {
16394 return *(vector
signed long long *)(__ptr + __offset);
16398 vec_xl(
signed long long __offset,
unsigned long long *__ptr) {
16399 return *(vector
unsigned long long *)(__ptr + __offset);
16404 return *(vector
double *)(__ptr + __offset);
16408 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16410 vec_xl(
signed long long __offset,
signed __int128 *__ptr) {
16411 return *(vector
signed __int128 *)(__ptr + __offset);
16415 vec_xl(
signed long long __offset,
unsigned __int128 *__ptr) {
16416 return *(vector
unsigned __int128 *)(__ptr + __offset);
16422 #ifdef __LITTLE_ENDIAN__ 16424 vec_xl_be(
signed long long __offset,
signed char *__ptr) {
16425 vector
signed char __vec = __builtin_vsx_lxvd2x_be(__offset, __ptr);
16426 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16427 13, 12, 11, 10, 9, 8);
16431 vec_xl_be(
signed long long __offset,
unsigned char *__ptr) {
16432 vector
unsigned char __vec = __builtin_vsx_lxvd2x_be(__offset, __ptr);
16433 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16434 13, 12, 11, 10, 9, 8);
16438 vec_xl_be(
signed long long __offset,
signed short *__ptr) {
16439 vector
signed short __vec = __builtin_vsx_lxvd2x_be(__offset, __ptr);
16440 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16444 vec_xl_be(
signed long long __offset,
unsigned short *__ptr) {
16445 vector
unsigned short __vec = __builtin_vsx_lxvd2x_be(__offset, __ptr);
16446 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16450 vec_xl_be(
signed long long __offset,
signed int *__ptr) {
16451 return (vector
signed int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
16455 vec_xl_be(
signed long long __offset,
unsigned int *__ptr) {
16456 return (vector
unsigned int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
16460 vec_xl_be(
signed long long __offset,
float *__ptr) {
16461 return (vector
float)__builtin_vsx_lxvw4x_be(__offset, __ptr);
16465 static __inline__ vector
signed long long __ATTRS_o_ai 16466 vec_xl_be(
signed long long __offset,
signed long long *__ptr) {
16467 return (vector
signed long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16470 static __inline__ vector
unsigned long long __ATTRS_o_ai 16471 vec_xl_be(
signed long long __offset,
unsigned long long *__ptr) {
16472 return (vector
unsigned long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16476 vec_xl_be(
signed long long __offset,
double *__ptr) {
16477 return (vector
double)__builtin_vsx_lxvd2x_be(__offset, __ptr);
16481 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16483 vec_xl_be(
signed long long __offset,
signed __int128 *__ptr) {
16484 return vec_xl(__offset, __ptr);
16487 static __inline__ vector
unsigned __int128
__ATTRS_o_ai 16488 vec_xl_be(
signed long long __offset,
unsigned __int128 *__ptr) {
16489 return vec_xl(__offset, __ptr);
16493 #define vec_xl_be vec_xl 16499 signed long long __offset,
16500 signed char *__ptr) {
16501 *(vector
signed char *)(__ptr + __offset) = __vec;
16505 signed long long __offset,
16506 unsigned char *__ptr) {
16507 *(vector
unsigned char *)(__ptr + __offset) = __vec;
16511 signed long long __offset,
16512 signed short *__ptr) {
16513 *(vector
signed short *)(__ptr + __offset) = __vec;
16517 signed long long __offset,
16518 unsigned short *__ptr) {
16519 *(vector
unsigned short *)(__ptr + __offset) = __vec;
16523 signed long long __offset,
16524 signed int *__ptr) {
16525 *(vector
signed int *)(__ptr + __offset) = __vec;
16529 signed long long __offset,
16530 unsigned int *__ptr) {
16531 *(vector
unsigned int *)(__ptr + __offset) = __vec;
16535 signed long long __offset,
16537 *(vector
float *)(__ptr + __offset) = __vec;
16542 signed long long __offset,
16543 signed long long *__ptr) {
16544 *(vector
signed long long *)(__ptr + __offset) = __vec;
16548 signed long long __offset,
16549 unsigned long long *__ptr) {
16550 *(vector
unsigned long long *)(__ptr + __offset) = __vec;
16554 signed long long __offset,
16556 *(vector
double *)(__ptr + __offset) = __vec;
16560 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16562 signed long long __offset,
16563 signed __int128 *__ptr) {
16564 *(vector
signed __int128 *)(__ptr + __offset) = __vec;
16568 signed long long __offset,
16569 unsigned __int128 *__ptr) {
16570 *(vector
unsigned __int128 *)(__ptr + __offset) = __vec;
16576 #ifdef __LITTLE_ENDIAN__ 16578 signed long long __offset,
16579 signed char *__ptr) {
16580 vector
signed char __tmp =
16581 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16582 13, 12, 11, 10, 9, 8);
16583 __builtin_vsx_stxvd2x_be(__tmp, __offset, __ptr);
16587 signed long long __offset,
16588 unsigned char *__ptr) {
16589 vector
unsigned char __tmp =
16590 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
16591 13, 12, 11, 10, 9, 8);
16592 __builtin_vsx_stxvd2x_be(__tmp, __offset, __ptr);
16596 signed long long __offset,
16597 signed short *__ptr) {
16598 vector
signed short __tmp =
16599 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16600 __builtin_vsx_stxvd2x_be(__tmp, __offset, __ptr);
16604 signed long long __offset,
16605 unsigned short *__ptr) {
16606 vector
unsigned short __tmp =
16607 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
16608 __builtin_vsx_stxvd2x_be(__tmp, __offset, __ptr);
16612 signed long long __offset,
16613 signed int *__ptr) {
16614 __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr);
16618 signed long long __offset,
16619 unsigned int *__ptr) {
16620 __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr);
16624 signed long long __offset,
16626 __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr);
16631 signed long long __offset,
16632 signed long long *__ptr) {
16633 __builtin_vsx_stxvd2x_be(__vec, __offset, __ptr);
16637 signed long long __offset,
16638 unsigned long long *__ptr) {
16639 __builtin_vsx_stxvd2x_be(__vec, __offset, __ptr);
16643 signed long long __offset,
16645 __builtin_vsx_stxvd2x_be(__vec, __offset, __ptr);
16649 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16651 signed long long __offset,
16652 signed __int128 *__ptr) {
16653 vec_xst(__vec, __offset, __ptr);
16657 signed long long __offset,
16658 unsigned __int128 *__ptr) {
16659 vec_xst(__vec, __offset, __ptr);
16663 #define vec_xst_be vec_xst 16666 #ifdef __POWER9_VECTOR__ 16667 #define vec_test_data_class(__a, __b) \ 16670 (vector bool int)__builtin_vsx_xvtstdcsp((__a), (__b)), \ 16672 (vector bool long long)__builtin_vsx_xvtstdcdp((__a), (__b)) \ 16688 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16717 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__) 16719 return __builtin_altivec_vminsd(__a, -__a);
16724 return __builtin_altivec_vminsw(__a, -__a);
16728 return __builtin_altivec_vminsh(__a, -__a);
16732 return __builtin_altivec_vminsb(__a, -__a);
16734 #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)
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_sr(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vnor(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_and(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_add(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_msum(vector signed char __a, vector unsigned char __b, vector int __c)
static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vmrglh(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed char __a, vector signed char __b)
static __inline__ vector signed short __ATTRS_o_ai vec_mladd(vector signed short, vector signed short, vector signed short)
static __inline__ void __ATTRS_o_ai vec_stvewx(vector int __a, int __b, int *__c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sro(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vsplth(vector short __a, unsigned char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a, vector signed char __b)
static __inline__ void int __a
static vector float __ATTRS_o_ai vec_nabs(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_insert(signed char __a, vector signed char __b, int __c)
static __inline__ vector signed char __ATTRS_o_ai vec_lvrxl(int __a, const signed char *__b)
static __ATTRS_o_ai vector signed char vec_xl(signed long long __offset, signed char *__ptr)
static __inline__ vector signed char __ATTRS_o_ai vec_vpkuhum(vector signed short __a, vector signed short __b)
static __inline__ vector float __ATTRS_o_ai vec_rsqrte(vector float __a)
static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_sl(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed short __ATTRS_o_ai vec_madd(vector signed short __a, vector signed short __b, vector signed short __c)
static __inline__ int __ATTRS_o_ai vec_all_nge(vector float __a, vector float __b)
static __inline__ vector float __ATTRS_o_ai vec_float(vector signed int __a)
static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_subs(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_mul(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector int __b)
static __inline__ vector float __ATTRS_o_ai vec_floor(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_or(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_andc(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vaddshs(vector short __a, vector short __b)
static __inline__ vector signed int __ATTRS_o_ai vec_signed(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_slo(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vpkswus(vector int __a, vector int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a, vector unsigned char __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_splats(signed char __a)
static __inline__ void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_sub(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sra(vector signed char __a, vector unsigned char __b)
static __inline__ void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b, vector signed char *__c)
static __inline__ vector int __ATTRS_o_ai vec_vmrghw(vector int __a, vector int __b)
static __inline__ vector int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b)
static __inline__ vector signed int __ATTRS_o_ai vec_subc(vector signed int __a, vector signed int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_max(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vor(vector signed char __a, vector signed char __b)
static __inline__ vector signed int __ATTRS_o_ai vec_sld(vector signed int, vector signed int, unsigned const int __c)
static __inline__ vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector int __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector short __ATTRS_o_ai vec_vslh(vector short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmrglb(vector signed char __a, vector signed char __b)
static __inline__ vector float vector float __b
static __inline__ vector signed char __ATTRS_o_ai vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b, signed char *__c)
static __inline__ vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpge(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_unpackh(vector signed char __a)
static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vsraw(vector int __a, vector unsigned int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvrx(int __a, const signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmrghb(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vmladduhm(vector short __a, vector short __b, vector short __c)
static __ATTRS_o_ai void vec_xst(vector signed char __vec, signed long long __offset, signed char *__ptr)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vminuh(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvlxl(int __a, const signed char *__b)
static __inline__ vector short __ATTRS_o_ai vec_lvehx(int __a, const short *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vsrah(vector short __a, vector unsigned short __b)
static __inline__ vector int __ATTRS_o_ai vec_splat_s32(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vslb(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvxl(int __a, const vector signed char *__b)
static __inline__ vector signed int __ATTRS_o_ai vec_addc(vector signed int __a, vector signed int __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vspltb(vector signed char __a, unsigned char __b)
static __inline__ vector float __ATTRS_o_ai vec_nmsub(vector float __a, vector float __b, vector float __c)
static __inline__ vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a)
static __inline__ vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a)
static __inline__ void __ATTRS_o_ai vec_stl(vector signed char __a, int __b, vector signed char *__c)
static __inline__ void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b)
static __inline__ void __ATTRS_o_ai vec_st(vector signed char __a, int __b, vector signed char *__c)
static __inline__ void __ATTRS_o_ai vec_ste(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_avg(vector signed char __a, vector signed char __b)
static vector float __ATTRS_o_ai vec_neg(vector float __a)
static __inline__ vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a)
static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvlx(int __a, const signed char *__b)
static __inline__ vector short __ATTRS_o_ai vec_vminsh(vector short __a, vector short __b)
static __inline__ vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b)
static __inline__ vector short __ATTRS_o_ai vec_vmaxsh(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_pack(vector signed short __a, vector signed short __b)
static __inline__ vector float __ATTRS_o_ai vec_re(vector float __a)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector short __ATTRS_o_ai vec_mule(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vspltish(signed char __a)
static __inline__ vector int __ATTRS_o_ai vec_vspltisw(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_ldl(int __a, const vector signed char *__b)
static __inline__ signed char __ATTRS_o_ai vec_extract(vector signed char __a, int __b)
static __inline__ vector float __attribute__((__always_inline__)) vec_vaddfp(vector float __a
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__ 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)