13#error "AltiVec support not enabled"
28#define __VEC_CLASS_FP_SUBNORMAL_N (1 << 0)
29#define __VEC_CLASS_FP_SUBNORMAL_P (1 << 1)
30#define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \
31 __VEC_CLASS_FP_SUBNORMAL_N)
32#define __VEC_CLASS_FP_ZERO_N (1<<2)
33#define __VEC_CLASS_FP_ZERO_P (1<<3)
34#define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | \
35 __VEC_CLASS_FP_ZERO_N)
36#define __VEC_CLASS_FP_INFINITY_N (1<<4)
37#define __VEC_CLASS_FP_INFINITY_P (1<<5)
38#define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \
39 __VEC_CLASS_FP_INFINITY_N)
40#define __VEC_CLASS_FP_NAN (1<<6)
41#define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \
42 __VEC_CLASS_FP_SUBNORMAL | \
43 __VEC_CLASS_FP_ZERO | \
44 __VEC_CLASS_FP_INFINITY)
46#define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
51 vector
signed char __a, vector
signed char __b, vector
unsigned char __c);
55 vector
unsigned char __c);
61 vector
signed short __b,
62 vector
unsigned char __c);
66 vector
unsigned char __c);
69 vector
bool short __a, vector
bool short __b, vector
unsigned char __c);
73 vector
unsigned char __c);
76 vector
signed int __b,
77 vector
unsigned char __c);
80 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned char __c);
87 vector
unsigned char __c);
92 vector
unsigned char __c);
95vec_perm(vector
unsigned long long __a, vector
unsigned long long __b,
96 vector
unsigned char __c);
100 vector
unsigned char __c);
104 vector
unsigned char __c);
112#define __builtin_altivec_abs_v16qi vec_abs
113#define __builtin_altivec_abs_v8hi vec_abs
114#define __builtin_altivec_abs_v4si vec_abs
118 return __builtin_altivec_vmaxsb(
__a, -
__a);
123 return __builtin_altivec_vmaxsh(
__a, -
__a);
128 return __builtin_altivec_vmaxsw(
__a, -
__a);
131#ifdef __POWER8_VECTOR__
134 return __builtin_altivec_vmaxsd(
__a, -
__a);
140 return __builtin_vsx_xvabssp(
__a);
142 vector
unsigned int __res =
143 (vector
unsigned int)
__a & (vector
unsigned int)(0x7FFFFFFF);
144 return (vector
float)__res;
150 return __builtin_vsx_xvabsdp(
__a);
155#define __builtin_altivec_abss_v16qi vec_abss
156#define __builtin_altivec_abss_v8hi vec_abss
157#define __builtin_altivec_abss_v4si vec_abss
161 return __builtin_altivec_vmaxsb(
162 __a, __builtin_altivec_vsubsbs((vector
signed char)(0),
__a));
167 return __builtin_altivec_vmaxsh(
168 __a, __builtin_altivec_vsubshs((vector
signed short)(0),
__a));
173 return __builtin_altivec_vmaxsw(
174 __a, __builtin_altivec_vsubsws((vector
signed int)(0),
__a));
178#if defined(__POWER9_VECTOR__)
181vec_absd(vector
unsigned char __a, vector
unsigned char __b) {
182 return __builtin_altivec_vabsdub(
__a,
__b);
186vec_absd(vector
unsigned short __a, vector
unsigned short __b) {
187 return __builtin_altivec_vabsduh(
__a,
__b);
191vec_absd(vector
unsigned int __a, vector
unsigned int __b) {
192 return __builtin_altivec_vabsduw(
__a,
__b);
206 return (vector
signed char)
__a +
__b;
211 return __a + (vector
signed char)
__b;
221 return (vector
unsigned char)
__a +
__b;
226 return __a + (vector
unsigned char)
__b;
236 return (vector
short)
__a +
__b;
240 vector
bool short __b) {
241 return __a + (vector short)
__b;
251 return (vector
unsigned short)
__a +
__b;
256 return __a + (vector
unsigned short)
__b;
266 return (vector
int)
__a +
__b;
270 vector
bool int __b) {
281 return (vector
unsigned int)
__a +
__b;
289#ifdef __POWER8_VECTOR__
291vec_add(vector
signed long long __a, vector
signed long long __b) {
296vec_add(vector
unsigned long long __a, vector
unsigned long long __b) {
300#ifdef __SIZEOF_INT128__
302vec_add(vector
signed __int128
__a, vector
signed __int128
__b) {
307vec_add(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
312static __inline__ vector
unsigned char __attribute__((__always_inline__))
313vec_add_u128(vector
unsigned char __a, vector
unsigned char __b) {
314 return (vector
unsigned char)__builtin_altivec_vadduqm(
__a,
__b);
316#elif defined(__VSX__)
318vec_add(vector
signed long long __a, vector
signed long long __b) {
319#ifdef __LITTLE_ENDIAN__
324 vector
unsigned int __res =
325 (vector
unsigned int)
__a + (vector
unsigned int)
__b;
326 vector
unsigned int __carry = __builtin_altivec_vaddcuw(
327 (vector
unsigned int)
__a, (vector
unsigned int)
__b);
328 __carry = (vector
unsigned int)__builtin_shufflevector(
329 (vector
unsigned char)__carry, (vector
unsigned char)__carry, 0, 0, 0, 7,
330 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0);
331 return (vector
signed long long)(__res + __carry);
336vec_add(vector
unsigned long long __a, vector
unsigned long long __b) {
337 return (vector
unsigned long long)
vec_add((vector
signed long long)
__a,
338 (vector
signed long long)
__b);
356#ifdef __POWER8_VECTOR__
357#ifdef __SIZEOF_INT128__
360 vector
signed __int128
__c) {
361 return (vector
signed __int128)__builtin_altivec_vaddeuqm(
362 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
363 (vector
unsigned __int128)
__c);
367vec_adde(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
368 vector
unsigned __int128
__c) {
369 return __builtin_altivec_vaddeuqm(
__a,
__b,
__c);
373static __inline__ vector
unsigned char __attribute__((__always_inline__))
374vec_adde_u128(vector
unsigned char __a, vector
unsigned char __b,
375 vector
unsigned char __c) {
376 return (vector
unsigned char)__builtin_altivec_vaddeuqm_c(
377 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
378 (vector
unsigned char)
__c);
384 vector
signed int __c) {
385 vector
signed int __mask = {1, 1, 1, 1};
386 vector
signed int __carry =
__c & __mask;
392 vector
unsigned int __c) {
393 vector
unsigned int __mask = {1, 1, 1, 1};
394 vector
unsigned int __carry =
__c & __mask;
400#ifdef __POWER8_VECTOR__
401#ifdef __SIZEOF_INT128__
403vec_addec(vector
signed __int128
__a, vector
signed __int128
__b,
404 vector
signed __int128
__c) {
405 return (vector
signed __int128)__builtin_altivec_vaddecuq(
406 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
407 (vector
unsigned __int128)
__c);
411vec_addec(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
412 vector
unsigned __int128
__c) {
413 return __builtin_altivec_vaddecuq(
__a,
__b,
__c);
417static __inline__ vector
unsigned char __attribute__((__always_inline__))
418vec_addec_u128(vector
unsigned char __a, vector
unsigned char __b,
419 vector
unsigned char __c) {
420 return (vector
unsigned char)__builtin_altivec_vaddecuq_c(
421 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
422 (vector
unsigned char)
__c);
427vec_addec(vector
signed int __a, vector
signed int __b,
428 vector
signed int __c) {
430 signed int __result[4];
431 for (
int i = 0; i < 4; i++) {
432 unsigned int __tempa = (
unsigned int)
__a[i];
433 unsigned int __tempb = (
unsigned int)
__b[i];
434 unsigned int __tempc = (
unsigned int)
__c[i];
435 __tempc = __tempc & 0x00000001;
436 unsigned long long __longa = (
unsigned long long) __tempa;
437 unsigned long long __longb = (
unsigned long long) __tempb;
438 unsigned long long __longc = (
unsigned long long) __tempc;
439 unsigned long long __sum = __longa + __longb + __longc;
440 unsigned long long __res = (__sum >> 32) & 0x01;
441 unsigned long long __tempres = (
unsigned int) __res;
442 __result[i] = (
signed int) __tempres;
445 vector
signed int ret = { __result[0], __result[1], __result[2], __result[3] };
450vec_addec(vector
unsigned int __a, vector
unsigned int __b,
451 vector
unsigned int __c) {
453 unsigned int __result[4];
454 for (
int i = 0; i < 4; i++) {
455 unsigned int __tempc =
__c[i] & 1;
456 unsigned long long __longa = (
unsigned long long)
__a[i];
457 unsigned long long __longb = (
unsigned long long)
__b[i];
458 unsigned long long __longc = (
unsigned long long) __tempc;
459 unsigned long long __sum = __longa + __longb + __longc;
460 unsigned long long __res = (__sum >> 32) & 0x01;
461 unsigned long long __tempres = (
unsigned int) __res;
462 __result[i] = (
signed int) __tempres;
465 vector
unsigned int ret = { __result[0], __result[1], __result[2], __result[3] };
473#define __builtin_altivec_vaddubm vec_vaddubm
482 return (vector
signed char)
__a +
__b;
487 return __a + (vector
signed char)
__b;
497 return (vector
unsigned char)
__a +
__b;
502 return __a + (vector
unsigned char)
__b;
507#define __builtin_altivec_vadduhm vec_vadduhm
516 return (vector
short)
__a +
__b;
520 vector
bool short __b) {
521 return __a + (vector short)
__b;
531 return (vector
unsigned short)
__a +
__b;
536 return __a + (vector
unsigned short)
__b;
541#define __builtin_altivec_vadduwm vec_vadduwm
550 return (vector
int)
__a +
__b;
554 vector
bool int __b) {
565 return (vector
unsigned int)
__a +
__b;
575#define __builtin_altivec_vaddfp vec_vaddfp
577static __inline__ vector
float __attribute__((__always_inline__))
578vec_vaddfp(vector
float __a, vector
float __b) {
586 return (vector
signed int)__builtin_altivec_vaddcuw((vector
unsigned int)
__a,
587 (vector
unsigned int)
__b);
592 return __builtin_altivec_vaddcuw(
__a,
__b);
595#ifdef __POWER8_VECTOR__
596#ifdef __SIZEOF_INT128__
599 return (vector
signed __int128)__builtin_altivec_vaddcuq(
600 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
604vec_addc(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
605 return __builtin_altivec_vaddcuq(
__a,
__b);
609static __inline__ vector
unsigned char __attribute__((__always_inline__))
610vec_addc_u128(vector
unsigned char __a, vector
unsigned char __b) {
611 return (vector
unsigned char)__builtin_altivec_vaddcuq_c(
612 (vector
unsigned char)
__a, (vector
unsigned char)
__b);
618static __inline__ vector
unsigned int __attribute__((__always_inline__))
619vec_vaddcuw(vector
unsigned int __a, vector
unsigned int __b) {
620 return __builtin_altivec_vaddcuw(
__a,
__b);
627 return __builtin_altivec_vaddsbs(
__a,
__b);
632 return __builtin_altivec_vaddsbs((vector
signed char)
__a,
__b);
637 return __builtin_altivec_vaddsbs(
__a, (vector
signed char)
__b);
642 return __builtin_altivec_vaddubs(
__a,
__b);
647 return __builtin_altivec_vaddubs((vector
unsigned char)
__a,
__b);
652 return __builtin_altivec_vaddubs(
__a, (vector
unsigned char)
__b);
657 return __builtin_altivec_vaddshs(
__a,
__b);
662 return __builtin_altivec_vaddshs((vector
short)
__a,
__b);
666 vector
bool short __b) {
667 return __builtin_altivec_vaddshs(
__a, (vector
short)
__b);
672 return __builtin_altivec_vadduhs(
__a,
__b);
677 return __builtin_altivec_vadduhs((vector
unsigned short)
__a,
__b);
682 return __builtin_altivec_vadduhs(
__a, (vector
unsigned short)
__b);
687 return __builtin_altivec_vaddsws(
__a,
__b);
692 return __builtin_altivec_vaddsws((vector
int)
__a,
__b);
696 vector
bool int __b) {
697 return __builtin_altivec_vaddsws(
__a, (vector
int)
__b);
702 return __builtin_altivec_vadduws(
__a,
__b);
707 return __builtin_altivec_vadduws((vector
unsigned int)
__a,
__b);
712 return __builtin_altivec_vadduws(
__a, (vector
unsigned int)
__b);
719 return __builtin_altivec_vaddsbs(
__a,
__b);
724 return __builtin_altivec_vaddsbs((vector
signed char)
__a,
__b);
729 return __builtin_altivec_vaddsbs(
__a, (vector
signed char)
__b);
736 return __builtin_altivec_vaddubs(
__a,
__b);
741 return __builtin_altivec_vaddubs((vector
unsigned char)
__a,
__b);
746 return __builtin_altivec_vaddubs(
__a, (vector
unsigned char)
__b);
753 return __builtin_altivec_vaddshs(
__a,
__b);
758 return __builtin_altivec_vaddshs((vector
short)
__a,
__b);
762 vector
bool short __b) {
763 return __builtin_altivec_vaddshs(
__a, (vector
short)
__b);
770 return __builtin_altivec_vadduhs(
__a,
__b);
775 return __builtin_altivec_vadduhs((vector
unsigned short)
__a,
__b);
780 return __builtin_altivec_vadduhs(
__a, (vector
unsigned short)
__b);
787 return __builtin_altivec_vaddsws(
__a,
__b);
792 return __builtin_altivec_vaddsws((vector
int)
__a,
__b);
796 vector
bool int __b) {
797 return __builtin_altivec_vaddsws(
__a, (vector
int)
__b);
804 return __builtin_altivec_vadduws(
__a,
__b);
809 return __builtin_altivec_vadduws((vector
unsigned int)
__a,
__b);
814 return __builtin_altivec_vadduws(
__a, (vector
unsigned int)
__b);
817#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
818 defined(__SIZEOF_INT128__)
822vec_vadduqm(vector
signed __int128
__a, vector
signed __int128
__b) {
827vec_vadduqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
834vec_vaddeuqm(vector
signed __int128
__a, vector
signed __int128
__b,
835 vector
signed __int128
__c) {
836 return (vector
signed __int128)__builtin_altivec_vaddeuqm(
837 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
838 (vector
unsigned __int128)
__c);
842vec_vaddeuqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
843 vector
unsigned __int128
__c) {
844 return __builtin_altivec_vaddeuqm(
__a,
__b,
__c);
850vec_vaddcuq(vector
signed __int128
__a, vector
signed __int128
__b) {
851 return (vector
signed __int128)__builtin_altivec_vaddcuq(
852 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
856vec_vaddcuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
857 return __builtin_altivec_vaddcuq(
__a,
__b);
863vec_vaddecuq(vector
signed __int128
__a, vector
signed __int128
__b,
864 vector
signed __int128
__c) {
865 return (vector
signed __int128)__builtin_altivec_vaddecuq(
866 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
867 (vector
unsigned __int128)
__c);
871vec_vaddecuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
872 vector
unsigned __int128
__c) {
873 return __builtin_altivec_vaddecuq(
__a,
__b,
__c);
879#define __builtin_altivec_vand vec_and
888 return (vector
signed char)
__a &
__b;
893 return __a & (vector
signed char)
__b;
903 return (vector
unsigned char)
__a &
__b;
908 return __a & (vector
unsigned char)
__b;
912 vector
bool char __b) {
923 return (vector
short)
__a &
__b;
927 vector
bool short __b) {
928 return __a & (vector short)
__b;
938 return (vector
unsigned short)
__a &
__b;
943 return __a & (vector
unsigned short)
__b;
958 return (vector
int)
__a &
__b;
962 vector
bool int __b) {
973 return (vector
unsigned int)
__a &
__b;
982 vector
bool int __b) {
988 vector
unsigned int __res =
989 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
990 return (vector
float)__res;
995 vector
unsigned int __res =
996 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
997 return (vector
float)__res;
1001 vector
bool int __b) {
1002 vector
unsigned int __res =
1003 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
1004 return (vector
float)__res;
1009 vector
double __b) {
1010 vector
unsigned long long __res =
1011 (vector
unsigned long long)
__a & (vector
unsigned long long)
__b;
1012 return (vector
double)__res;
1017 vector
unsigned long long __res =
1018 (vector
unsigned long long)
__a & (vector
unsigned long long)
__b;
1019 return (vector
double)__res;
1023 vector
double __b) {
1024 vector
unsigned long long __res =
1025 (vector
unsigned long long)
__a & (vector
unsigned long long)
__b;
1026 return (vector
double)__res;
1030vec_and(vector
signed long long __a, vector
signed long long __b) {
1035vec_and(vector
bool long long __a, vector
signed long long __b) {
1036 return (vector
signed long long)
__a &
__b;
1040vec_and(vector
signed long long __a, vector
bool long long __b) {
1041 return __a & (vector
signed long long)
__b;
1044static __inline__ vector
unsigned long long __ATTRS_o_ai
1045vec_and(vector
unsigned long long __a, vector
unsigned long long __b) {
1049static __inline__ vector
unsigned long long __ATTRS_o_ai
1050vec_and(vector
bool long long __a, vector
unsigned long long __b) {
1051 return (vector
unsigned long long)
__a &
__b;
1054static __inline__ vector
unsigned long long __ATTRS_o_ai
1055vec_and(vector
unsigned long long __a, vector
bool long long __b) {
1056 return __a & (vector
unsigned long long)
__b;
1060vec_and(vector
bool long long __a, vector
bool long long __b) {
1074 return (vector
signed char)
__a &
__b;
1079 return __a & (vector
signed char)
__b;
1089 return (vector
unsigned char)
__a &
__b;
1094 return __a & (vector
unsigned char)
__b;
1098 vector
bool char __b) {
1109 return (vector
short)
__a &
__b;
1113 vector
bool short __b) {
1114 return __a & (vector short)
__b;
1124 return (vector
unsigned short)
__a &
__b;
1129 return __a & (vector
unsigned short)
__b;
1144 return (vector
int)
__a &
__b;
1148 vector
bool int __b) {
1159 return (vector
unsigned int)
__a &
__b;
1168 vector
bool int __b) {
1174 vector
unsigned int __res =
1175 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
1176 return (vector
float)__res;
1181 vector
unsigned int __res =
1182 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
1183 return (vector
float)__res;
1187 vector
bool int __b) {
1188 vector
unsigned int __res =
1189 (vector
unsigned int)
__a & (vector
unsigned int)
__b;
1190 return (vector
float)__res;
1195vec_vand(vector
signed long long __a, vector
signed long long __b) {
1200vec_vand(vector
bool long long __a, vector
signed long long __b) {
1201 return (vector
signed long long)
__a &
__b;
1205vec_vand(vector
signed long long __a, vector
bool long long __b) {
1206 return __a & (vector
signed long long)
__b;
1209static __inline__ vector
unsigned long long __ATTRS_o_ai
1210vec_vand(vector
unsigned long long __a, vector
unsigned long long __b) {
1214static __inline__ vector
unsigned long long __ATTRS_o_ai
1215vec_vand(vector
bool long long __a, vector
unsigned long long __b) {
1216 return (vector
unsigned long long)
__a &
__b;
1219static __inline__ vector
unsigned long long __ATTRS_o_ai
1220vec_vand(vector
unsigned long long __a, vector
bool long long __b) {
1221 return __a & (vector
unsigned long long)
__b;
1232#define __builtin_altivec_vandc vec_andc
1241 return (vector
signed char)
__a & ~__b;
1246 return __a & ~(vector
signed char)
__b;
1256 return (vector
unsigned char)
__a & ~__b;
1261 return __a & ~(vector
unsigned char)
__b;
1265 vector
bool char __b) {
1276 return (vector
short)
__a & ~__b;
1280 vector
bool short __b) {
1281 return __a & ~(vector short)
__b;
1291 return (vector
unsigned short)
__a & ~__b;
1296 return __a & ~(vector
unsigned short)
__b;
1311 return (vector
int)
__a & ~__b;
1315 vector
bool int __b) {
1326 return (vector
unsigned int)
__a & ~__b;
1335 vector
bool int __b) {
1341 vector
unsigned int __res =
1342 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1343 return (vector
float)__res;
1348 vector
unsigned int __res =
1349 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1350 return (vector
float)__res;
1354 vector
bool int __b) {
1355 vector
unsigned int __res =
1356 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1357 return (vector
float)__res;
1362 vector
double __b) {
1363 vector
unsigned long long __res =
1364 (vector
unsigned long long)
__a & ~(vector
unsigned long long)
__b;
1365 return (vector
double)__res;
1370 vector
unsigned long long __res =
1371 (vector
unsigned long long)
__a & ~(vector
unsigned long long)
__b;
1372 return (vector
double)__res;
1376 vector
double __b) {
1377 vector
unsigned long long __res =
1378 (vector
unsigned long long)
__a & ~(vector
unsigned long long)
__b;
1379 return (vector
double)__res;
1383vec_andc(vector
signed long long __a, vector
signed long long __b) {
1388vec_andc(vector
bool long long __a, vector
signed long long __b) {
1389 return (vector
signed long long)
__a & ~__b;
1393vec_andc(vector
signed long long __a, vector
bool long long __b) {
1394 return __a & ~(vector
signed long long)
__b;
1397static __inline__ vector
unsigned long long __ATTRS_o_ai
1398vec_andc(vector
unsigned long long __a, vector
unsigned long long __b) {
1402static __inline__ vector
unsigned long long __ATTRS_o_ai
1403vec_andc(vector
bool long long __a, vector
unsigned long long __b) {
1404 return (vector
unsigned long long)
__a & ~__b;
1407static __inline__ vector
unsigned long long __ATTRS_o_ai
1408vec_andc(vector
unsigned long long __a, vector
bool long long __b) {
1409 return __a & ~(vector
unsigned long long)
__b;
1427 return (vector
signed char)
__a & ~__b;
1432 return __a & ~(vector
signed char)
__b;
1442 return (vector
unsigned char)
__a & ~__b;
1447 return __a & ~(vector
unsigned char)
__b;
1462 return (vector
short)
__a & ~__b;
1466 vector
bool short __b) {
1467 return __a & ~(vector short)
__b;
1477 return (vector
unsigned short)
__a & ~__b;
1482 return __a & ~(vector
unsigned short)
__b;
1497 return (vector
int)
__a & ~__b;
1501 vector
bool int __b) {
1512 return (vector
unsigned int)
__a & ~__b;
1521 vector
bool int __b) {
1527 vector
unsigned int __res =
1528 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1529 return (vector
float)__res;
1534 vector
unsigned int __res =
1535 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1536 return (vector
float)__res;
1540 vector
bool int __b) {
1541 vector
unsigned int __res =
1542 (vector
unsigned int)
__a & ~(vector
unsigned int)
__b;
1543 return (vector
float)__res;
1554 return (vector
signed long long)
__a & ~__b;
1559 return __a & ~(vector
signed long long)
__b;
1562static __inline__ vector
unsigned long long __ATTRS_o_ai
1563vec_vandc(vector
unsigned long long __a, vector
unsigned long long __b) {
1567static __inline__ vector
unsigned long long __ATTRS_o_ai
1569 return (vector
unsigned long long)
__a & ~__b;
1572static __inline__ vector
unsigned long long __ATTRS_o_ai
1574 return __a & ~(vector
unsigned long long)
__b;
1587 return __builtin_altivec_vavgsb(
__a,
__b);
1592 return __builtin_altivec_vavgub(
__a,
__b);
1597 return __builtin_altivec_vavgsh(
__a,
__b);
1602 return __builtin_altivec_vavguh(
__a,
__b);
1607 return __builtin_altivec_vavgsw(
__a,
__b);
1612 return __builtin_altivec_vavguw(
__a,
__b);
1617static __inline__ vector
signed char __attribute__((__always_inline__))
1618vec_vavgsb(vector
signed char __a, vector
signed char __b) {
1619 return __builtin_altivec_vavgsb(
__a,
__b);
1624static __inline__ vector
unsigned char __attribute__((__always_inline__))
1625vec_vavgub(vector
unsigned char __a, vector
unsigned char __b) {
1626 return __builtin_altivec_vavgub(
__a,
__b);
1631static __inline__ vector
short __attribute__((__always_inline__))
1632vec_vavgsh(vector
short __a, vector
short __b) {
1633 return __builtin_altivec_vavgsh(
__a,
__b);
1638static __inline__ vector
unsigned short __attribute__((__always_inline__))
1639vec_vavguh(vector
unsigned short __a, vector
unsigned short __b) {
1640 return __builtin_altivec_vavguh(
__a,
__b);
1645static __inline__ vector
int __attribute__((__always_inline__))
1646vec_vavgsw(vector
int __a, vector
int __b) {
1647 return __builtin_altivec_vavgsw(
__a,
__b);
1652static __inline__ vector
unsigned int __attribute__((__always_inline__))
1653vec_vavguw(vector
unsigned int __a, vector
unsigned int __b) {
1654 return __builtin_altivec_vavguw(
__a,
__b);
1661 return __builtin_vsx_xvrspip(
__a);
1663 return __builtin_altivec_vrfip(
__a);
1669 return __builtin_vsx_xvrdpip(
__a);
1687vec_vrfip(vector
float __a) {
1688 return __builtin_altivec_vrfip(
__a);
1693static __inline__ vector
int __attribute__((__always_inline__))
1694vec_cmpb(vector
float __a, vector
float __b) {
1695 return __builtin_altivec_vcmpbfp(
__a,
__b);
1700static __inline__ vector
int __attribute__((__always_inline__))
1701vec_vcmpbfp(vector
float __a, vector
float __b) {
1702 return __builtin_altivec_vcmpbfp(
__a,
__b);
1709 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)
__a,
1715 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)
__a,
1721 return (vector
bool char)__builtin_altivec_vcmpequb((vector
char)
__a,
1727 return (vector
bool short)__builtin_altivec_vcmpequh(
__a,
__b);
1732 return (vector
bool short)__builtin_altivec_vcmpequh((vector
short)
__a,
1738 return (vector
bool short)__builtin_altivec_vcmpequh((vector
short)
__a,
1744 return (vector
bool int)__builtin_altivec_vcmpequw(
__a,
__b);
1749 return (vector
bool int)__builtin_altivec_vcmpequw((vector
int)
__a,
1754 vector
bool int __b) {
1755 return (vector
bool int)__builtin_altivec_vcmpequw((vector
int)
__a,
1759#ifdef __POWER8_VECTOR__
1762 return (vector
bool long long)__builtin_altivec_vcmpequd(
__a,
__b);
1766vec_cmpeq(vector
unsigned long long __a, vector
unsigned long long __b) {
1767 return (vector
bool long long)__builtin_altivec_vcmpequd(
1768 (vector
long long)
__a, (vector
long long)
__b);
1773 return (vector
bool long long)__builtin_altivec_vcmpequd(
1774 (vector
long long)
__a, (vector
long long)
__b);
1776#elif defined(__VSX__)
1779 vector
bool int __wordcmp =
1781#ifdef __LITTLE_ENDIAN__
1782 __wordcmp &= __builtin_shufflevector(__wordcmp, __wordcmp, 3, 0, 1, 2);
1783 return (vector
bool long long)__builtin_shufflevector(__wordcmp, __wordcmp, 1,
1786 __wordcmp &= __builtin_shufflevector(__wordcmp, __wordcmp, 1, 2, 3, 0);
1787 return (vector
bool long long)__builtin_shufflevector(__wordcmp, __wordcmp, 0,
1793vec_cmpeq(vector
unsigned long long __a, vector
unsigned long long __b) {
1794 return vec_cmpeq((vector
signed long long)
__a, (vector
signed long long)
__b);
1799 return vec_cmpeq((vector
signed long long)
__a, (vector
signed long long)
__b);
1806 return (vector
bool int)__builtin_vsx_xvcmpeqsp(
__a,
__b);
1808 return (vector
bool int)__builtin_altivec_vcmpeqfp(
__a,
__b);
1815 return (vector
bool long long)__builtin_vsx_xvcmpeqdp(
__a,
__b);
1819#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
1822 return (vector
bool __int128)__builtin_altivec_vcmpequq(
1823 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
1827vec_cmpeq(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
1828 return (vector
bool __int128)__builtin_altivec_vcmpequq(
1829 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
1834 return (vector
bool __int128)__builtin_altivec_vcmpequq(
1835 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
1839#ifdef __POWER9_VECTOR__
1844 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)
__a,
1850 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)
__a,
1856 return (vector
bool char)__builtin_altivec_vcmpneb((vector
char)
__a,
1862 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)
__a,
1868 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)
__a,
1874 return (vector
bool short)__builtin_altivec_vcmpneh((vector
short)
__a,
1880 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)
__a,
1886 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)
__a,
1892 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)
__a,
1898 return (vector
bool int)__builtin_altivec_vcmpnew((vector
int)
__a,
1902#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
1904vec_cmpne(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
1905 return (vector
bool __int128)~(__builtin_altivec_vcmpequq(
1906 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b));
1911 return (vector
bool __int128)~(__builtin_altivec_vcmpequq(
1912 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b));
1917 return (vector
bool __int128)~(__builtin_altivec_vcmpequq(
1918 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b));
1925vec_cmpnez(vector
signed char __a, vector
signed char __b) {
1926 return (vector
bool char)__builtin_altivec_vcmpnezb((vector
char)
__a,
1931vec_cmpnez(vector
unsigned char __a, vector
unsigned char __b) {
1932 return (vector
bool char)__builtin_altivec_vcmpnezb((vector
char)
__a,
1937vec_cmpnez(vector
signed short __a, vector
signed short __b) {
1938 return (vector
bool short)__builtin_altivec_vcmpnezh((vector
short)
__a,
1943vec_cmpnez(vector
unsigned short __a, vector
unsigned short __b) {
1944 return (vector
bool short)__builtin_altivec_vcmpnezh((vector
short)
__a,
1949vec_cmpnez(vector
signed int __a, vector
signed int __b) {
1950 return (vector
bool int)__builtin_altivec_vcmpnezw((vector
int)
__a,
1955vec_cmpnez(vector
unsigned int __a, vector
unsigned int __b) {
1956 return (vector
bool int)__builtin_altivec_vcmpnezw((vector
int)
__a,
1961vec_cntlz_lsbb(vector
signed char __a) {
1962#ifdef __LITTLE_ENDIAN__
1963 return __builtin_altivec_vctzlsbb((vector
unsigned char)
__a);
1965 return __builtin_altivec_vclzlsbb((vector
unsigned char)
__a);
1970vec_cntlz_lsbb(vector
unsigned char __a) {
1971#ifdef __LITTLE_ENDIAN__
1972 return __builtin_altivec_vctzlsbb((vector
unsigned char)
__a);
1974 return __builtin_altivec_vclzlsbb(
__a);
1979vec_cnttz_lsbb(vector
signed char __a) {
1980#ifdef __LITTLE_ENDIAN__
1981 return __builtin_altivec_vclzlsbb((vector
unsigned char)
__a);
1983 return __builtin_altivec_vctzlsbb((vector
unsigned char)
__a);
1988vec_cnttz_lsbb(vector
unsigned char __a) {
1989#ifdef __LITTLE_ENDIAN__
1990 return __builtin_altivec_vclzlsbb(
__a);
1992 return __builtin_altivec_vctzlsbb(
__a);
1997vec_parity_lsbb(vector
unsigned int __a) {
1998 return __builtin_altivec_vprtybw(
__a);
2002vec_parity_lsbb(vector
signed int __a) {
2003 return __builtin_altivec_vprtybw((vector
unsigned int)
__a);
2006#ifdef __SIZEOF_INT128__
2008vec_parity_lsbb(vector
unsigned __int128
__a) {
2009 return __builtin_altivec_vprtybq(
__a);
2013vec_parity_lsbb(vector
signed __int128
__a) {
2014 return __builtin_altivec_vprtybq((vector
unsigned __int128)
__a);
2018static __inline__ vector
unsigned long long __ATTRS_o_ai
2019vec_parity_lsbb(vector
unsigned long long __a) {
2020 return __builtin_altivec_vprtybd(
__a);
2023static __inline__ vector
unsigned long long __ATTRS_o_ai
2024vec_parity_lsbb(vector
signed long long __a) {
2025 return __builtin_altivec_vprtybd((vector
unsigned long long)
__a);
2082#ifdef __POWER8_VECTOR__
2085 return (vector
bool long long)
2086 ~(__builtin_altivec_vcmpequd((vector
long long)
__a, (vector
long long)
__b));
2091 return (vector
bool long long)
2092 ~(__builtin_altivec_vcmpequd((vector
long long)
__a, (vector
long long)
__b));
2096vec_cmpne(vector
unsigned long long __a, vector
unsigned long long __b) {
2097 return (vector
bool long long)
2098 ~(__builtin_altivec_vcmpequd((vector
long long)
__a, (vector
long long)
__b));
2100#elif defined(__VSX__)
2103 return (vector
bool long long)~(
2104 vec_cmpeq((vector
signed long long)
__a, (vector
signed long long)
__b));
2109 return (vector
bool long long)~(
2110 vec_cmpeq((vector
signed long long)
__a, (vector
signed long long)
__b));
2114vec_cmpne(vector
unsigned long long __a, vector
unsigned long long __b) {
2115 return (vector
bool long long)~(
2116 vec_cmpeq((vector
signed long long)
__a, (vector
signed long long)
__b));
2123 return (vector
bool long long)
2124 ~(__builtin_altivec_vcmpequd((vector
long long)
__a, (vector
long long)
__b));
2132 return (vector
bool char)__builtin_altivec_vcmpgtsb(
__a,
__b);
2137 return (vector
bool char)__builtin_altivec_vcmpgtub(
__a,
__b);
2142 return (vector
bool short)__builtin_altivec_vcmpgtsh(
__a,
__b);
2147 return (vector
bool short)__builtin_altivec_vcmpgtuh(
__a,
__b);
2152 return (vector
bool int)__builtin_altivec_vcmpgtsw(
__a,
__b);
2157 return (vector
bool int)__builtin_altivec_vcmpgtuw(
__a,
__b);
2160#ifdef __POWER8_VECTOR__
2163 return (vector
bool long long)__builtin_altivec_vcmpgtsd(
__a,
__b);
2167vec_cmpgt(vector
unsigned long long __a, vector
unsigned long long __b) {
2168 return (vector
bool long long)__builtin_altivec_vcmpgtud(
__a,
__b);
2170#elif defined(__VSX__)
2173 vector
signed int __sgtw = (vector
signed int)
vec_cmpgt(
2174 (vector
signed int)
__a, (vector
signed int)
__b);
2175 vector
unsigned int __ugtw = (vector
unsigned int)
vec_cmpgt(
2176 (vector
unsigned int)
__a, (vector
unsigned int)
__b);
2177 vector
unsigned int __eqw = (vector
unsigned int)
vec_cmpeq(
2178 (vector
signed int)
__a, (vector
signed int)
__b);
2179#ifdef __LITTLE_ENDIAN__
2180 __ugtw = __builtin_shufflevector(__ugtw, __ugtw, 3, 0, 1, 2) & __eqw;
2181 __sgtw |= (vector
signed int)__ugtw;
2182 return (vector
bool long long)__builtin_shufflevector(__sgtw, __sgtw, 1, 1, 3,
2185 __ugtw = __builtin_shufflevector(__ugtw, __ugtw, 1, 2, 3, 0) & __eqw;
2186 __sgtw |= (vector
signed int)__ugtw;
2187 return (vector
bool long long)__builtin_shufflevector(__sgtw, __sgtw, 0, 0, 2,
2193vec_cmpgt(vector
unsigned long long __a, vector
unsigned long long __b) {
2194 vector
unsigned int __ugtw = (vector
unsigned int)
vec_cmpgt(
2195 (vector
unsigned int)
__a, (vector
unsigned int)
__b);
2196 vector
unsigned int __eqw = (vector
unsigned int)
vec_cmpeq(
2197 (vector
signed int)
__a, (vector
signed int)
__b);
2198#ifdef __LITTLE_ENDIAN__
2199 __eqw = __builtin_shufflevector(__ugtw, __ugtw, 3, 0, 1, 2) & __eqw;
2201 return (vector
bool long long)__builtin_shufflevector(__ugtw, __ugtw, 1, 1, 3,
2204 __eqw = __builtin_shufflevector(__ugtw, __ugtw, 1, 2, 3, 0) & __eqw;
2206 return (vector
bool long long)__builtin_shufflevector(__ugtw, __ugtw, 0, 0, 2,
2215 return (vector
bool int)__builtin_vsx_xvcmpgtsp(
__a,
__b);
2217 return (vector
bool int)__builtin_altivec_vcmpgtfp(
__a,
__b);
2224 return (vector
bool long long)__builtin_vsx_xvcmpgtdp(
__a,
__b);
2228#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2231 return (vector
bool __int128)__builtin_altivec_vcmpgtsq(
__a,
__b);
2235vec_cmpgt(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
2236 return (vector
bool __int128)__builtin_altivec_vcmpgtuq(
__a,
__b);
2275 return (vector
bool int)__builtin_vsx_xvcmpgesp(
__a,
__b);
2277 return (vector
bool int)__builtin_altivec_vcmpgefp(
__a,
__b);
2284 return (vector
bool long long)__builtin_vsx_xvcmpgedp(
__a,
__b);
2293vec_cmpge(vector
unsigned long long __a, vector
unsigned long long __b) {
2298#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2305vec_cmpge(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
2312static __inline__ vector
bool int __attribute__((__always_inline__))
2313vec_vcmpgefp(vector
float __a, vector
float __b) {
2314 return (vector
bool int)__builtin_altivec_vcmpgefp(
__a,
__b);
2319static __inline__ vector
bool char __attribute__((__always_inline__))
2320vec_vcmpgtsb(vector
signed char __a, vector
signed char __b) {
2321 return (vector
bool char)__builtin_altivec_vcmpgtsb(
__a,
__b);
2326static __inline__ vector
bool char __attribute__((__always_inline__))
2327vec_vcmpgtub(vector
unsigned char __a, vector
unsigned char __b) {
2328 return (vector
bool char)__builtin_altivec_vcmpgtub(
__a,
__b);
2333static __inline__ vector
bool short __attribute__((__always_inline__))
2334vec_vcmpgtsh(vector
short __a, vector
short __b) {
2335 return (vector
bool short)__builtin_altivec_vcmpgtsh(
__a,
__b);
2340static __inline__ vector
bool short __attribute__((__always_inline__))
2341vec_vcmpgtuh(vector
unsigned short __a, vector
unsigned short __b) {
2342 return (vector
bool short)__builtin_altivec_vcmpgtuh(
__a,
__b);
2347static __inline__ vector
bool int __attribute__((__always_inline__))
2348vec_vcmpgtsw(vector
int __a, vector
int __b) {
2349 return (vector
bool int)__builtin_altivec_vcmpgtsw(
__a,
__b);
2354static __inline__ vector
bool int __attribute__((__always_inline__))
2355vec_vcmpgtuw(vector
unsigned int __a, vector
unsigned int __b) {
2356 return (vector
bool int)__builtin_altivec_vcmpgtuw(
__a,
__b);
2361static __inline__ vector
bool int __attribute__((__always_inline__))
2362vec_vcmpgtfp(vector
float __a, vector
float __b) {
2363 return (vector
bool int)__builtin_altivec_vcmpgtfp(
__a,
__b);
2415vec_cmple(vector
unsigned long long __a, vector
unsigned long long __b) {
2420#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2427vec_cmple(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
2476#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
2483vec_cmplt(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
2495vec_cmplt(vector
unsigned long long __a, vector
unsigned long long __b) {
2500#ifdef __POWER8_VECTOR__
2504vec_popcnt(vector
signed char __a) {
2505 return (vector
unsigned char)__builtin_altivec_vpopcntb(
2506 (vector
unsigned char)
__a);
2509vec_popcnt(vector
unsigned char __a) {
2510 return __builtin_altivec_vpopcntb(
__a);
2513vec_popcnt(vector
signed short __a) {
2514 return (vector
unsigned short)__builtin_altivec_vpopcnth(
2515 (vector
unsigned short)
__a);
2518vec_popcnt(vector
unsigned short __a) {
2519 return __builtin_altivec_vpopcnth(
__a);
2522vec_popcnt(vector
signed int __a) {
2523 return __builtin_altivec_vpopcntw((vector
unsigned int)
__a);
2526vec_popcnt(vector
unsigned int __a) {
2527 return __builtin_altivec_vpopcntw(
__a);
2529static __inline__ vector
unsigned long long __ATTRS_o_ai
2530vec_popcnt(vector
signed long long __a) {
2531 return __builtin_altivec_vpopcntd((vector
unsigned long long)
__a);
2533static __inline__ vector
unsigned long long __ATTRS_o_ai
2534vec_popcnt(vector
unsigned long long __a) {
2535 return __builtin_altivec_vpopcntd(
__a);
2538#define vec_vclz vec_cntlz
2542vec_cntlz(vector
signed char __a) {
2543 return (vector
signed char)__builtin_altivec_vclzb((vector
unsigned char)
__a);
2546vec_cntlz(vector
unsigned char __a) {
2547 return __builtin_altivec_vclzb(
__a);
2550vec_cntlz(vector
signed short __a) {
2551 return (vector
signed short)__builtin_altivec_vclzh(
2552 (vector
unsigned short)
__a);
2555vec_cntlz(vector
unsigned short __a) {
2556 return __builtin_altivec_vclzh(
__a);
2559vec_cntlz(vector
signed int __a) {
2560 return (vector
signed int)__builtin_altivec_vclzw((vector
unsigned int)
__a);
2563vec_cntlz(vector
unsigned int __a) {
2564 return __builtin_altivec_vclzw(
__a);
2567vec_cntlz(vector
signed long long __a) {
2568 return (vector
signed long long)__builtin_altivec_vclzd(
2569 (vector
unsigned long long)
__a);
2571static __inline__ vector
unsigned long long __ATTRS_o_ai
2572vec_cntlz(vector
unsigned long long __a) {
2573 return __builtin_altivec_vclzd(
__a);
2577#ifdef __POWER9_VECTOR__
2582vec_cnttz(vector
signed char __a) {
2583 return (vector
signed char)__builtin_altivec_vctzb((vector
unsigned char)
__a);
2586vec_cnttz(vector
unsigned char __a) {
2587 return __builtin_altivec_vctzb(
__a);
2590vec_cnttz(vector
signed short __a) {
2591 return (vector
signed short)__builtin_altivec_vctzh(
2592 (vector
unsigned short)
__a);
2595vec_cnttz(vector
unsigned short __a) {
2596 return __builtin_altivec_vctzh(
__a);
2599vec_cnttz(vector
signed int __a) {
2600 return (vector
signed int)__builtin_altivec_vctzw((vector
unsigned int)
__a);
2603vec_cnttz(vector
unsigned int __a) {
2604 return __builtin_altivec_vctzw(
__a);
2607vec_cnttz(vector
signed long long __a) {
2608 return (vector
signed long long)__builtin_altivec_vctzd(
2609 (vector
unsigned long long)
__a);
2611static __inline__ vector
unsigned long long __ATTRS_o_ai
2612vec_cnttz(vector
unsigned long long __a) {
2613 return __builtin_altivec_vctzd(
__a);
2619vec_first_match_index(vector
signed char __a, vector
signed char __b) {
2620 vector
unsigned long long __res =
2621#ifdef __LITTLE_ENDIAN__
2626 if (__res[0] == 64) {
2627 return (__res[1] + 64) >> 3;
2629 return __res[0] >> 3;
2633vec_first_match_index(vector
unsigned char __a, vector
unsigned char __b) {
2634 vector
unsigned long long __res =
2635#ifdef __LITTLE_ENDIAN__
2640 if (__res[0] == 64) {
2641 return (__res[1] + 64) >> 3;
2643 return __res[0] >> 3;
2647vec_first_match_index(vector
signed short __a, vector
signed short __b) {
2648 vector
unsigned long long __res =
2649#ifdef __LITTLE_ENDIAN__
2654 if (__res[0] == 64) {
2655 return (__res[1] + 64) >> 4;
2657 return __res[0] >> 4;
2661vec_first_match_index(vector
unsigned short __a, vector
unsigned short __b) {
2662 vector
unsigned long long __res =
2663#ifdef __LITTLE_ENDIAN__
2668 if (__res[0] == 64) {
2669 return (__res[1] + 64) >> 4;
2671 return __res[0] >> 4;
2675vec_first_match_index(vector
signed int __a, vector
signed int __b) {
2676 vector
unsigned long long __res =
2677#ifdef __LITTLE_ENDIAN__
2682 if (__res[0] == 64) {
2683 return (__res[1] + 64) >> 5;
2685 return __res[0] >> 5;
2689vec_first_match_index(vector
unsigned int __a, vector
unsigned int __b) {
2690 vector
unsigned long long __res =
2691#ifdef __LITTLE_ENDIAN__
2696 if (__res[0] == 64) {
2697 return (__res[1] + 64) >> 5;
2699 return __res[0] >> 5;
2705vec_first_match_or_eos_index(vector
signed char __a, vector
signed char __b) {
2711 vector
bool char __tmp2 = __tmp1 |
2715 vector
unsigned long long __res =
2716#ifdef __LITTLE_ENDIAN__
2717 vec_cnttz((vector
unsigned long long)__tmp2);
2719 vec_cntlz((vector
unsigned long long)__tmp2);
2721 if (__res[0] == 64) {
2722 return (__res[1] + 64) >> 3;
2724 return __res[0] >> 3;
2728vec_first_match_or_eos_index(vector
unsigned char __a,
2729 vector
unsigned char __b) {
2731 vector
bool char __tmp2 = __tmp1 |
2735 vector
unsigned long long __res =
2736#ifdef __LITTLE_ENDIAN__
2737 vec_cnttz((vector
unsigned long long)__tmp2);
2739 vec_cntlz((vector
unsigned long long)__tmp2);
2741 if (__res[0] == 64) {
2742 return (__res[1] + 64) >> 3;
2744 return __res[0] >> 3;
2748vec_first_match_or_eos_index(vector
signed short __a, vector
signed short __b) {
2750 vector
bool short __tmp2 = __tmp1 |
2754 vector
unsigned long long __res =
2755#ifdef __LITTLE_ENDIAN__
2756 vec_cnttz((vector
unsigned long long)__tmp2);
2758 vec_cntlz((vector
unsigned long long)__tmp2);
2760 if (__res[0] == 64) {
2761 return (__res[1] + 64) >> 4;
2763 return __res[0] >> 4;
2767vec_first_match_or_eos_index(vector
unsigned short __a,
2768 vector
unsigned short __b) {
2770 vector
bool short __tmp2 = __tmp1 |
2774 vector
unsigned long long __res =
2775#ifdef __LITTLE_ENDIAN__
2776 vec_cnttz((vector
unsigned long long)__tmp2);
2778 vec_cntlz((vector
unsigned long long)__tmp2);
2780 if (__res[0] == 64) {
2781 return (__res[1] + 64) >> 4;
2783 return __res[0] >> 4;
2787vec_first_match_or_eos_index(vector
signed int __a, vector
signed int __b) {
2789 vector
bool int __tmp2 = __tmp1 |
vec_cmpeq((vector
signed int)__tmp1,
__a) |
2792 vector
unsigned long long __res =
2793#ifdef __LITTLE_ENDIAN__
2794 vec_cnttz((vector
unsigned long long)__tmp2);
2796 vec_cntlz((vector
unsigned long long)__tmp2);
2798 if (__res[0] == 64) {
2799 return (__res[1] + 64) >> 5;
2801 return __res[0] >> 5;
2805vec_first_match_or_eos_index(vector
unsigned int __a, vector
unsigned int __b) {
2807 vector
bool int __tmp2 = __tmp1 |
2811 vector
unsigned long long __res =
2812#ifdef __LITTLE_ENDIAN__
2813 vec_cnttz((vector
unsigned long long)__tmp2);
2815 vec_cntlz((vector
unsigned long long)__tmp2);
2817 if (__res[0] == 64) {
2818 return (__res[1] + 64) >> 5;
2820 return __res[0] >> 5;
2826vec_first_mismatch_index(vector
signed char __a, vector
signed char __b) {
2827 vector
unsigned long long __res =
2828#ifdef __LITTLE_ENDIAN__
2833 if (__res[0] == 64) {
2834 return (__res[1] + 64) >> 3;
2836 return __res[0] >> 3;
2840vec_first_mismatch_index(vector
unsigned char __a, vector
unsigned char __b) {
2841 vector
unsigned long long __res =
2842#ifdef __LITTLE_ENDIAN__
2847 if (__res[0] == 64) {
2848 return (__res[1] + 64) >> 3;
2850 return __res[0] >> 3;
2854vec_first_mismatch_index(vector
signed short __a, vector
signed short __b) {
2855 vector
unsigned long long __res =
2856#ifdef __LITTLE_ENDIAN__
2861 if (__res[0] == 64) {
2862 return (__res[1] + 64) >> 4;
2864 return __res[0] >> 4;
2868vec_first_mismatch_index(vector
unsigned short __a, vector
unsigned short __b) {
2869 vector
unsigned long long __res =
2870#ifdef __LITTLE_ENDIAN__
2875 if (__res[0] == 64) {
2876 return (__res[1] + 64) >> 4;
2878 return __res[0] >> 4;
2882vec_first_mismatch_index(vector
signed int __a, vector
signed int __b) {
2883 vector
unsigned long long __res =
2884#ifdef __LITTLE_ENDIAN__
2889 if (__res[0] == 64) {
2890 return (__res[1] + 64) >> 5;
2892 return __res[0] >> 5;
2896vec_first_mismatch_index(vector
unsigned int __a, vector
unsigned int __b) {
2897 vector
unsigned long long __res =
2898#ifdef __LITTLE_ENDIAN__
2903 if (__res[0] == 64) {
2904 return (__res[1] + 64) >> 5;
2906 return __res[0] >> 5;
2912vec_first_mismatch_or_eos_index(vector
signed char __a,
2913 vector
signed char __b) {
2914 vector
unsigned long long __res =
2915#ifdef __LITTLE_ENDIAN__
2916 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2918 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2920 if (__res[0] == 64) {
2921 return (__res[1] + 64) >> 3;
2923 return __res[0] >> 3;
2927vec_first_mismatch_or_eos_index(vector
unsigned char __a,
2928 vector
unsigned char __b) {
2929 vector
unsigned long long __res =
2930#ifdef __LITTLE_ENDIAN__
2931 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2933 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2935 if (__res[0] == 64) {
2936 return (__res[1] + 64) >> 3;
2938 return __res[0] >> 3;
2942vec_first_mismatch_or_eos_index(vector
signed short __a,
2943 vector
signed short __b) {
2944 vector
unsigned long long __res =
2945#ifdef __LITTLE_ENDIAN__
2946 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2948 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2950 if (__res[0] == 64) {
2951 return (__res[1] + 64) >> 4;
2953 return __res[0] >> 4;
2957vec_first_mismatch_or_eos_index(vector
unsigned short __a,
2958 vector
unsigned short __b) {
2959 vector
unsigned long long __res =
2960#ifdef __LITTLE_ENDIAN__
2961 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2963 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2965 if (__res[0] == 64) {
2966 return (__res[1] + 64) >> 4;
2968 return __res[0] >> 4;
2972vec_first_mismatch_or_eos_index(vector
signed int __a, vector
signed int __b) {
2973 vector
unsigned long long __res =
2974#ifdef __LITTLE_ENDIAN__
2975 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2977 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2979 if (__res[0] == 64) {
2980 return (__res[1] + 64) >> 5;
2982 return __res[0] >> 5;
2986vec_first_mismatch_or_eos_index(vector
unsigned int __a,
2987 vector
unsigned int __b) {
2988 vector
unsigned long long __res =
2989#ifdef __LITTLE_ENDIAN__
2990 vec_cnttz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2992 vec_cntlz((vector
unsigned long long)vec_cmpnez(
__a,
__b));
2994 if (__res[0] == 64) {
2995 return (__res[1] + 64) >> 5;
2997 return __res[0] >> 5;
3001vec_insert_exp(vector
double __a, vector
unsigned long long __b) {
3002 return __builtin_vsx_xviexpdp((vector
unsigned long long)
__a,
__b);
3006vec_insert_exp(vector
unsigned long long __a, vector
unsigned long long __b) {
3007 return __builtin_vsx_xviexpdp(
__a,
__b);
3011vec_insert_exp(vector
float __a, vector
unsigned int __b) {
3012 return __builtin_vsx_xviexpsp((vector
unsigned int)
__a,
__b);
3016vec_insert_exp(vector
unsigned int __a, vector
unsigned int __b) {
3017 return __builtin_vsx_xviexpsp(
__a,
__b);
3020#if defined(__powerpc64__)
3021static __inline__ vector
signed char __ATTRS_o_ai vec_xl_len(
const signed char *
__a,
3023 return (vector
signed char)__builtin_vsx_lxvl(
__a, (
__b << 56));
3027vec_xl_len(
const unsigned char *
__a,
size_t __b) {
3028 return (vector
unsigned char)__builtin_vsx_lxvl(
__a, (
__b << 56));
3031static __inline__ vector
signed short __ATTRS_o_ai vec_xl_len(
const signed short *
__a,
3033 return (vector
signed short)__builtin_vsx_lxvl(
__a, (
__b << 56));
3037vec_xl_len(
const unsigned short *
__a,
size_t __b) {
3038 return (vector
unsigned short)__builtin_vsx_lxvl(
__a, (
__b << 56));
3041static __inline__ vector
signed int __ATTRS_o_ai vec_xl_len(
const signed int *
__a,
3043 return (vector
signed int)__builtin_vsx_lxvl(
__a, (
__b << 56));
3046static __inline__ vector
unsigned int __ATTRS_o_ai vec_xl_len(
const unsigned int *
__a,
3048 return (vector
unsigned int)__builtin_vsx_lxvl(
__a, (
__b << 56));
3051static __inline__ vector
float __ATTRS_o_ai vec_xl_len(
const float *
__a,
size_t __b) {
3052 return (vector
float)__builtin_vsx_lxvl(
__a, (
__b << 56));
3055#ifdef __SIZEOF_INT128__
3057vec_xl_len(
const signed __int128 *
__a,
size_t __b) {
3058 return (vector
signed __int128)__builtin_vsx_lxvl(
__a, (
__b << 56));
3062vec_xl_len(
const unsigned __int128 *
__a,
size_t __b) {
3063 return (vector
unsigned __int128)__builtin_vsx_lxvl(
__a, (
__b << 56));
3068vec_xl_len(
const signed long long *
__a,
size_t __b) {
3069 return (vector
signed long long)__builtin_vsx_lxvl(
__a, (
__b << 56));
3072static __inline__ vector
unsigned long long __ATTRS_o_ai
3073vec_xl_len(
const unsigned long long *
__a,
size_t __b) {
3074 return (vector
unsigned long long)__builtin_vsx_lxvl(
__a, (
__b << 56));
3077static __inline__ vector
double __ATTRS_o_ai vec_xl_len(
const double *
__a,
3079 return (vector
double)__builtin_vsx_lxvl(
__a, (
__b << 56));
3083vec_xl_len_r(
const unsigned char *
__a,
size_t __b) {
3084 vector
unsigned char __res =
3085 (vector
unsigned char)__builtin_vsx_lxvll(
__a, (
__b << 56));
3086 vector
unsigned char __mask =
3087 (vector
unsigned char)__builtin_altivec_lvsr(16 -
__b, (
int *)
NULL);
3088 return (vector
unsigned char)__builtin_altivec_vperm_4si(
3089 (vector
int)__res, (vector
int)__res, __mask);
3093static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned char __a,
3096 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3099static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed char __a,
3100 signed char *
__b,
size_t __c) {
3101 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3104static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed short __a,
3105 signed short *
__b,
size_t __c) {
3106 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3109static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned short __a,
3110 unsigned short *
__b,
3112 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3116 signed int *
__b,
size_t __c) {
3117 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3120static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned int __a,
3121 unsigned int *
__b,
size_t __c) {
3122 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3127 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3130#ifdef __SIZEOF_INT128__
3131static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed __int128
__a,
3132 signed __int128 *
__b,
3134 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3137static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned __int128
__a,
3138 unsigned __int128 *
__b,
3140 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3144static __inline__
void __ATTRS_o_ai vec_xst_len(vector
signed long long __a,
3145 signed long long *
__b,
3147 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3150static __inline__
void __ATTRS_o_ai vec_xst_len(vector
unsigned long long __a,
3151 unsigned long long *
__b,
3153 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3158 return __builtin_vsx_stxvl((vector
int)
__a,
__b, (
__c << 56));
3161static __inline__
void __ATTRS_o_ai vec_xst_len_r(vector
unsigned char __a,
3164 vector
unsigned char __mask =
3165 (vector
unsigned char)__builtin_altivec_lvsl(16 -
__c, (
int *)
NULL);
3166 vector
unsigned char __res =
3167 (vector
unsigned char)__builtin_altivec_vperm_4si(
3168 (vector
int)
__a, (vector
int)
__a, __mask);
3169 return __builtin_vsx_stxvll((vector
int)__res,
__b, (
__c << 56));
3174#if defined(__POWER9_VECTOR__) && defined(__powerpc64__)
3175#define __vec_ldrmb(PTR, CNT) vec_xl_len_r((const unsigned char *)(PTR), (CNT))
3176#define __vec_strmb(PTR, CNT, VAL) \
3177 vec_xst_len_r((VAL), (unsigned char *)(PTR), (CNT))
3179#define __vec_ldrmb __builtin_vsx_ldrmb
3180#define __vec_strmb __builtin_vsx_strmb
3186static __inline__ vector
float __ATTRS_o_ai vec_cpsgn(vector
float __a,
3188 return __builtin_vsx_xvcpsgnsp(
__b,
__a);
3191static __inline__ vector
double __ATTRS_o_ai vec_cpsgn(vector
double __a,
3192 vector
double __b) {
3193 return __builtin_vsx_xvcpsgndp(
__b,
__a);
3203#ifdef __XL_COMPAT_ALTIVEC__
3204#define vec_ctf(__a, __b) \
3206 vector int: (vector float)__builtin_altivec_vcfsx((vector int)(__a), \
3208 vector unsigned int: (vector float)__builtin_altivec_vcfux( \
3209 (vector unsigned int)(__a), ((__b)&0x1F)), \
3210 vector unsigned long long: ( \
3211 vector float)(__builtin_vsx_xvcvuxdsp( \
3212 (vector unsigned long long)(__a)) * \
3213 (vector float)(vector unsigned)((0x7f - \
3216 vector signed long long: ( \
3217 vector float)(__builtin_vsx_xvcvsxdsp( \
3218 (vector signed long long)(__a)) * \
3219 (vector float)(vector unsigned)((0x7f - \
3223#define vec_ctf(__a, __b) \
3226 vector int: (vector float)__builtin_altivec_vcfsx((vector int)(__a), \
3228 vector unsigned int: (vector float)__builtin_altivec_vcfux( \
3229 (vector unsigned int)(__a), ((__b)&0x1F)), \
3230 vector unsigned long long: ( \
3231 vector float)(__builtin_convertvector( \
3232 (vector unsigned long long)(__a), vector double) * \
3233 (vector double)(vector unsigned long long)((0x3ffULL - \
3236 vector signed long long: ( \
3237 vector float)(__builtin_convertvector( \
3238 (vector signed long long)(__a), vector double) * \
3239 (vector double)(vector unsigned long long)((0x3ffULL - \
3244#define vec_ctf(__a, __b) \
3246 vector int: (vector float)__builtin_altivec_vcfsx((vector int)(__a), \
3248 vector unsigned int: (vector float)__builtin_altivec_vcfux( \
3249 (vector unsigned int)(__a), ((__b)&0x1F)))
3254#define vec_ctd(__a, __b) \
3256 vector signed int: ( \
3257 vec_doublee((vector signed int)(__a)) * \
3258 (vector double)(vector unsigned long long)((0x3ffULL - \
3261 vector unsigned int: ( \
3262 vec_doublee((vector unsigned int)(__a)) * \
3263 (vector double)(vector unsigned long long)((0x3ffULL - \
3266 vector unsigned long long: ( \
3267 __builtin_convertvector((vector unsigned long long)(__a), \
3269 (vector double)(vector unsigned long long)((0x3ffULL - \
3272 vector signed long long: ( \
3273 __builtin_convertvector((vector signed long long)(__a), \
3275 (vector double)(vector unsigned long long)((0x3ffULL - \
3282#define vec_vcfux __builtin_altivec_vcfux
3285#define vec_vcfsx(__a, __b) __builtin_altivec_vcfsx((vector int)(__a), (__b))
3290#ifdef __XL_COMPAT_ALTIVEC__
3291#define vec_cts(__a, __b) \
3293 vector float: (vector signed int)__builtin_altivec_vctsxs( \
3294 (vector float)(__a), ((__b)&0x1F)), \
3295 vector double: __extension__({ \
3296 vector double __ret = \
3297 (vector double)(__a) * \
3298 (vector double)(vector unsigned long long)((0x3ffULL + \
3301 (vector signed long long)__builtin_vsx_xvcvdpsxws(__ret); \
3304#define vec_cts(__a, __b) \
3306 vector float: (vector signed int)__builtin_altivec_vctsxs( \
3307 (vector float)(__a), ((__b)&0x1F)), \
3308 vector double: __extension__({ \
3309 vector double __ret = \
3310 (vector double)(__a) * \
3311 (vector double)(vector unsigned long long)((0x3ffULL + \
3314 (vector signed long long)__builtin_convertvector( \
3315 __ret, vector signed long long); \
3319#define vec_cts __builtin_altivec_vctsxs
3324#define vec_vctsxs __builtin_altivec_vctsxs
3329#ifdef __XL_COMPAT_ALTIVEC__
3330#define vec_ctu(__a, __b) \
3332 vector float: (vector unsigned int)__builtin_altivec_vctuxs( \
3333 (vector float)(__a), ((__b)&0x1F)), \
3334 vector double: __extension__({ \
3335 vector double __ret = \
3336 (vector double)(__a) * \
3337 (vector double)(vector unsigned long long)((0x3ffULL + \
3340 (vector unsigned long long)__builtin_vsx_xvcvdpuxws(__ret); \
3343#define vec_ctu(__a, __b) \
3345 vector float: (vector unsigned int)__builtin_altivec_vctuxs( \
3346 (vector float)(__a), ((__b)&0x1F)), \
3347 vector double: __extension__({ \
3348 vector double __ret = \
3349 (vector double)(__a) * \
3350 (vector double)(vector unsigned long long)((0x3ffULL + \
3353 (vector unsigned long long)__builtin_convertvector( \
3354 __ret, vector unsigned long long); \
3358#define vec_ctu __builtin_altivec_vctuxs
3361#ifdef __LITTLE_ENDIAN__
3365#define vec_ctsl(__a, __b) \
3367 (__a), vector float \
3369 vector float __ret = \
3370 (vector float)(__a) * \
3371 (vector float)(vector unsigned)((0x7f + ((__b)&0x1F)) << 23); \
3372 __builtin_vsx_xvcvspsxds(__builtin_vsx_xxsldwi(__ret, __ret, 1)); \
3376 vector double __ret = \
3377 (vector double)(__a) * \
3378 (vector double)(vector unsigned long long)((0x3ffULL + \
3381 __builtin_convertvector(__ret, vector signed long long); \
3386#define vec_ctul(__a, __b) \
3388 (__a), vector float \
3390 vector float __ret = \
3391 (vector float)(__a) * \
3392 (vector float)(vector unsigned)((0x7f + ((__b)&0x1F)) << 23); \
3393 __builtin_vsx_xvcvspuxds(__builtin_vsx_xxsldwi(__ret, __ret, 1)); \
3397 vector double __ret = \
3398 (vector double)(__a) * \
3399 (vector double)(vector unsigned long long)((0x3ffULL + \
3402 __builtin_convertvector(__ret, vector unsigned long long); \
3409#define vec_ctsl(__a, __b) \
3411 vector float: __extension__({ \
3412 vector float __ret = \
3413 (vector float)(__a) * \
3414 (vector float)(vector unsigned)((0x7f + ((__b)&0x1F)) << 23); \
3415 __builtin_vsx_xvcvspsxds(__ret); \
3417 vector double: __extension__({ \
3418 vector double __ret = \
3419 (vector double)(__a) * \
3420 (vector double)(vector unsigned long long)((0x3ffULL + \
3423 __builtin_convertvector(__ret, vector signed long long); \
3428#define vec_ctul(__a, __b) \
3429 _Generic((__a), vector float \
3431 vector float __ret = \
3432 (vector float)(__a) * \
3433 (vector float)(vector unsigned)((0x7f + ((__b)&0x1F)) \
3435 __builtin_vsx_xvcvspuxds(__ret); \
3439 vector double __ret = \
3440 (vector double)(__a) * \
3441 (vector double)(vector unsigned long long)((0x3ffULL + \
3444 __builtin_convertvector(__ret, vector unsigned long long); \
3451#define vec_vctuxs __builtin_altivec_vctuxs
3455#ifdef __POWER9_VECTOR__
3457vec_signexti(vector
signed char __a) {
3458 return __builtin_altivec_vextsb2w(
__a);
3462vec_signexti(vector
signed short __a) {
3463 return __builtin_altivec_vextsh2w(
__a);
3467vec_signextll(vector
signed char __a) {
3468 return __builtin_altivec_vextsb2d(
__a);
3472vec_signextll(vector
signed short __a) {
3473 return __builtin_altivec_vextsh2d(
__a);
3477vec_signextll(vector
signed int __a) {
3478 return __builtin_altivec_vextsw2d(
__a);
3482#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
3484vec_signextq(vector
signed long long __a) {
3485 return __builtin_altivec_vextsd2q(
__a);
3492vec_sld(vector
signed int, vector
signed int,
unsigned const int __c);
3496 return __builtin_convertvector(
__a, vector
signed int);
3502 return __builtin_convertvector(
__a, vector
signed long long);
3505static __inline__ vector
signed int __attribute__((__always_inline__))
3506vec_signed2(vector
double __a, vector
double __b) {
3507 return (vector
signed int) {
__a[0],
__a[1],
__b[0],
__b[1] };
3511vec_signede(vector
double __a) {
3512#ifdef __LITTLE_ENDIAN__
3513 vector
signed int __ret = __builtin_vsx_xvcvdpsxws(
__a);
3514 return vec_sld(__ret, __ret, 12);
3516 return __builtin_vsx_xvcvdpsxws(
__a);
3521vec_signedo(vector
double __a) {
3522#ifdef __LITTLE_ENDIAN__
3523 return __builtin_vsx_xvcvdpsxws(
__a);
3525 vector
signed int __ret = __builtin_vsx_xvcvdpsxws(
__a);
3526 return vec_sld(__ret, __ret, 12);
3534vec_sld(vector
unsigned int, vector
unsigned int,
unsigned const int __c);
3538 return __builtin_convertvector(
__a, vector
unsigned int);
3542static __inline__ vector
unsigned long long __ATTRS_o_ai
3544 return __builtin_convertvector(
__a, vector
unsigned long long);
3547static __inline__ vector
unsigned int __attribute__((__always_inline__))
3548vec_unsigned2(vector
double __a, vector
double __b) {
3549 return (vector
unsigned int) {
__a[0],
__a[1],
__b[0],
__b[1] };
3553vec_unsignede(vector
double __a) {
3554#ifdef __LITTLE_ENDIAN__
3555 vector
unsigned int __ret = __builtin_vsx_xvcvdpuxws(
__a);
3556 return vec_sld(__ret, __ret, 12);
3558 return __builtin_vsx_xvcvdpuxws(
__a);
3563vec_unsignedo(vector
double __a) {
3564#ifdef __LITTLE_ENDIAN__
3565 return __builtin_vsx_xvcvdpuxws(
__a);
3567 vector
unsigned int __ret = __builtin_vsx_xvcvdpuxws(
__a);
3568 return vec_sld(__ret, __ret, 12);
3576vec_sld(vector
float, vector
float,
unsigned const int __c);
3580 return __builtin_convertvector(
__a, vector
float);
3585 return __builtin_convertvector(
__a, vector
float);
3590vec_float2(vector
signed long long __a, vector
signed long long __b) {
3591 return (vector
float) {
__a[0],
__a[1],
__b[0],
__b[1] };
3595vec_float2(vector
unsigned long long __a, vector
unsigned long long __b) {
3596 return (vector
float) {
__a[0],
__a[1],
__b[0],
__b[1] };
3600vec_float2(vector
double __a, vector
double __b) {
3601 return (vector
float) {
__a[0],
__a[1],
__b[0],
__b[1] };
3605vec_floate(vector
signed long long __a) {
3606#ifdef __LITTLE_ENDIAN__
3607 vector
float __ret = __builtin_vsx_xvcvsxdsp(
__a);
3608 return vec_sld(__ret, __ret, 12);
3610 return __builtin_vsx_xvcvsxdsp(
__a);
3615vec_floate(vector
unsigned long long __a) {
3616#ifdef __LITTLE_ENDIAN__
3617 vector
float __ret = __builtin_vsx_xvcvuxdsp(
__a);
3618 return vec_sld(__ret, __ret, 12);
3620 return __builtin_vsx_xvcvuxdsp(
__a);
3625vec_floate(vector
double __a) {
3626#ifdef __LITTLE_ENDIAN__
3627 vector
float __ret = __builtin_vsx_xvcvdpsp(
__a);
3628 return vec_sld(__ret, __ret, 12);
3630 return __builtin_vsx_xvcvdpsp(
__a);
3635vec_floato(vector
signed long long __a) {
3636#ifdef __LITTLE_ENDIAN__
3637 return __builtin_vsx_xvcvsxdsp(
__a);
3639 vector
float __ret = __builtin_vsx_xvcvsxdsp(
__a);
3640 return vec_sld(__ret, __ret, 12);
3645vec_floato(vector
unsigned long long __a) {
3646#ifdef __LITTLE_ENDIAN__
3647 return __builtin_vsx_xvcvuxdsp(
__a);
3649 vector
float __ret = __builtin_vsx_xvcvuxdsp(
__a);
3650 return vec_sld(__ret, __ret, 12);
3655vec_floato(vector
double __a) {
3656#ifdef __LITTLE_ENDIAN__
3657 return __builtin_vsx_xvcvdpsp(
__a);
3659 vector
float __ret = __builtin_vsx_xvcvdpsp(
__a);
3660 return vec_sld(__ret, __ret, 12);
3669vec_double(vector
signed long long __a) {
3670 return __builtin_convertvector(
__a, vector
double);
3674vec_double(vector
unsigned long long __a) {
3675 return __builtin_convertvector(
__a, vector
double);
3679vec_doublee(vector
signed int __a) {
3680#ifdef __LITTLE_ENDIAN__
3683 return __builtin_vsx_xvcvsxwdp(
__a);
3688vec_doublee(vector
unsigned int __a) {
3689#ifdef __LITTLE_ENDIAN__
3692 return __builtin_vsx_xvcvuxwdp(
__a);
3697vec_doublee(vector
float __a) {
3698#ifdef __LITTLE_ENDIAN__
3701 return __builtin_vsx_xvcvspdp(
__a);
3706vec_doubleh(vector
signed int __a) {
3707 vector
double __ret = {
__a[0],
__a[1]};
3712vec_doubleh(vector
unsigned int __a) {
3713 vector
double __ret = {
__a[0],
__a[1]};
3718vec_doubleh(vector
float __a) {
3719 vector
double __ret = {
__a[0],
__a[1]};
3724vec_doublel(vector
signed int __a) {
3725 vector
double __ret = {
__a[2],
__a[3]};
3730vec_doublel(vector
unsigned int __a) {
3731 vector
double __ret = {
__a[2],
__a[3]};
3736vec_doublel(vector
float __a) {
3737 vector
double __ret = {
__a[2],
__a[3]};
3742vec_doubleo(vector
signed int __a) {
3743#ifdef __LITTLE_ENDIAN__
3744 return __builtin_vsx_xvcvsxwdp(
__a);
3751vec_doubleo(vector
unsigned int __a) {
3752#ifdef __LITTLE_ENDIAN__
3753 return __builtin_vsx_xvcvuxwdp(
__a);
3760vec_doubleo(vector
float __a) {
3761#ifdef __LITTLE_ENDIAN__
3762 return __builtin_vsx_xvcvspdp(
__a);
3769static __inline__ vector
double __ATTRS_o_ai vec_cvf(vector
float __a) {
3770 return vec_doublee(
__a);
3773static __inline__ vector
float __ATTRS_o_ai vec_cvf(vector
double __a) {
3774 return vec_floate(
__a);
3815vec_div(vector
signed long long __a, vector
signed long long __b) {
3819static __inline__ vector
unsigned long long __ATTRS_o_ai
3820vec_div(vector
unsigned long long __a, vector
unsigned long long __b) {
3830 vector
double __b) {
3837#ifdef __POWER10_VECTOR__
3839vec_dive(vector
signed int __a, vector
signed int __b) {
3840 return __builtin_altivec_vdivesw(
__a,
__b);
3844vec_dive(vector
unsigned int __a, vector
unsigned int __b) {
3845 return __builtin_altivec_vdiveuw(
__a,
__b);
3849vec_dive(vector
signed long long __a, vector
signed long long __b) {
3850 return __builtin_altivec_vdivesd(
__a,
__b);
3853static __inline__ vector
unsigned long long __ATTRS_o_ai
3854vec_dive(vector
unsigned long long __a, vector
unsigned long long __b) {
3855 return __builtin_altivec_vdiveud(
__a,
__b);
3858#ifdef __SIZEOF_INT128__
3860vec_dive(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
3861 return __builtin_altivec_vdiveuq(
__a,
__b);
3865vec_dive(vector
signed __int128
__a, vector
signed __int128
__b) {
3866 return __builtin_altivec_vdivesq(
__a,
__b);
3871#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
3873vec_div(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
3878vec_div(vector
signed __int128
__a, vector
signed __int128
__b) {
3887 vector
double __b) {
3888 return __builtin_vsx_xvtdivdp(
__a,
__b);
3893 return __builtin_vsx_xvtdivsp(
__a,
__b);
3899#define vec_dss __builtin_altivec_dss
3903static __inline__
void __attribute__((__always_inline__)) vec_dssall(
void) {
3904 __builtin_altivec_dssall();
3908#define vec_dst(__PTR, __CW, __STR) \
3909 __builtin_altivec_dst((const void *)(__PTR), (__CW), (__STR))
3912#define vec_dstst(__PTR, __CW, __STR) \
3913 __builtin_altivec_dstst((const void *)(__PTR), (__CW), (__STR))
3916#define vec_dststt(__PTR, __CW, __STR) \
3917 __builtin_altivec_dststt((const void *)(__PTR), (__CW), (__STR))
3920#define vec_dstt(__PTR, __CW, __STR) \
3921 __builtin_altivec_dstt((const void *)(__PTR), (__CW), (__STR))
3925#ifdef __POWER8_VECTOR__
3927vec_eqv(vector
signed char __a, vector
signed char __b) {
3928 return (vector
signed char)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3929 (vector
unsigned int)
__b);
3933vec_eqv(vector
unsigned char __a, vector
unsigned char __b) {
3934 return (vector
unsigned char)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3935 (vector
unsigned int)
__b);
3938static __inline__ vector
bool char __ATTRS_o_ai vec_eqv(vector
bool char __a,
3939 vector
bool char __b) {
3940 return (vector
bool char)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3941 (vector
unsigned int)
__b);
3945vec_eqv(vector
signed short __a, vector
signed short __b) {
3946 return (vector
signed short)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3947 (vector
unsigned int)
__b);
3951vec_eqv(vector
unsigned short __a, vector
unsigned short __b) {
3952 return (vector
unsigned short)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3953 (vector
unsigned int)
__b);
3957vec_eqv(vector
bool short __a, vector
bool short __b) {
3958 return (vector
bool short)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3959 (vector
unsigned int)
__b);
3963vec_eqv(vector
signed int __a, vector
signed int __b) {
3964 return (vector
signed int)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3965 (vector
unsigned int)
__b);
3969vec_eqv(vector
unsigned int __a, vector
unsigned int __b) {
3970 return __builtin_vsx_xxleqv(
__a,
__b);
3973static __inline__ vector
bool int __ATTRS_o_ai vec_eqv(vector
bool int __a,
3974 vector
bool int __b) {
3975 return (vector
bool int)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3976 (vector
unsigned int)
__b);
3980vec_eqv(vector
signed long long __a, vector
signed long long __b) {
3981 return (vector
signed long long)__builtin_vsx_xxleqv(
3982 (vector
unsigned int)
__a, (vector
unsigned int)
__b);
3985static __inline__ vector
unsigned long long __ATTRS_o_ai
3986vec_eqv(vector
unsigned long long __a, vector
unsigned long long __b) {
3987 return (vector
unsigned long long)__builtin_vsx_xxleqv(
3988 (vector
unsigned int)
__a, (vector
unsigned int)
__b);
3992vec_eqv(vector
bool long long __a, vector
bool long long __b) {
3993 return (vector
bool long long)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
3994 (vector
unsigned int)
__b);
3999 return (vector
float)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
4000 (vector
unsigned int)
__b);
4003static __inline__ vector
double __ATTRS_o_ai vec_eqv(vector
double __a,
4004 vector
double __b) {
4005 return (vector
double)__builtin_vsx_xxleqv((vector
unsigned int)
__a,
4006 (vector
unsigned int)
__b);
4012static __inline__ vector
float __attribute__((__always_inline__))
4013vec_expte(vector
float __a) {
4014 return __builtin_altivec_vexptefp(
__a);
4019static __inline__ vector
float __attribute__((__always_inline__))
4020vec_vexptefp(vector
float __a) {
4021 return __builtin_altivec_vexptefp(
__a);
4028 return __builtin_vsx_xvrspim(
__a);
4030 return __builtin_altivec_vrfim(
__a);
4036 return __builtin_vsx_xvrdpim(
__a);
4053static __inline__ vector
float __attribute__((__always_inline__))
4054vec_vrfim(vector
float __a) {
4055 return __builtin_altivec_vrfim(
__a);
4062 return (vector
signed char)__builtin_altivec_lvx(
__a,
__b);
4067 return (vector
signed char)__builtin_altivec_lvx(
__a,
__b);
4072 return (vector
unsigned char)__builtin_altivec_lvx(
__a,
__b);
4077 return (vector
unsigned char)__builtin_altivec_lvx(
__a,
__b);
4082 return (vector
bool char)__builtin_altivec_lvx(
__a,
__b);
4086 const vector
short *
__b) {
4087 return (vector
short)__builtin_altivec_lvx(
__a,
__b);
4091 return (vector
short)__builtin_altivec_lvx(
__a,
__b);
4096 return (vector
unsigned short)__builtin_altivec_lvx(
__a,
__b);
4101 return (vector
unsigned short)__builtin_altivec_lvx(
__a,
__b);
4106 return (vector
bool short)__builtin_altivec_lvx(
__a,
__b);
4110 const vector pixel *
__b) {
4111 return (vector pixel)__builtin_altivec_lvx(
__a,
__b);
4115 const vector
int *
__b) {
4116 return (vector
int)__builtin_altivec_lvx(
__a,
__b);
4120 return (vector
int)__builtin_altivec_lvx(
__a,
__b);
4125 return (vector
unsigned int)__builtin_altivec_lvx(
__a,
__b);
4130 return (vector
unsigned int)__builtin_altivec_lvx(
__a,
__b);
4135 return (vector
bool int)__builtin_altivec_lvx(
__a,
__b);
4139 const vector
float *
__b) {
4140 return (vector
float)__builtin_altivec_lvx(
__a,
__b);
4144 return (vector
float)__builtin_altivec_lvx(
__a,
__b);
4151 return (vector
signed char)__builtin_altivec_lvx(
__a,
__b);
4156 return (vector
signed char)__builtin_altivec_lvx(
__a,
__b);
4161 return (vector
unsigned char)__builtin_altivec_lvx(
__a,
__b);
4166 return (vector
unsigned char)__builtin_altivec_lvx(
__a,
__b);
4171 return (vector
bool char)__builtin_altivec_lvx(
__a,
__b);
4175 const vector
short *
__b) {
4176 return (vector
short)__builtin_altivec_lvx(
__a,
__b);
4180 return (vector
short)__builtin_altivec_lvx(
__a,
__b);
4185 return (vector
unsigned short)__builtin_altivec_lvx(
__a,
__b);
4190 return (vector
unsigned short)__builtin_altivec_lvx(
__a,
__b);
4195 return (vector
bool short)__builtin_altivec_lvx(
__a,
__b);
4199 const vector pixel *
__b) {
4200 return (vector pixel)__builtin_altivec_lvx(
__a,
__b);
4204 const vector
int *
__b) {
4205 return (vector
int)__builtin_altivec_lvx(
__a,
__b);
4209 return (vector
int)__builtin_altivec_lvx(
__a,
__b);
4214 return (vector
unsigned int)__builtin_altivec_lvx(
__a,
__b);
4219 return (vector
unsigned int)__builtin_altivec_lvx(
__a,
__b);
4224 return (vector
bool int)__builtin_altivec_lvx(
__a,
__b);
4228 const vector
float *
__b) {
4229 return (vector
float)__builtin_altivec_lvx(
__a,
__b);
4233 return (vector
float)__builtin_altivec_lvx(
__a,
__b);
4240 return (vector
signed char)__builtin_altivec_lvebx(
__a,
__b);
4245 return (vector
unsigned char)__builtin_altivec_lvebx(
__a,
__b);
4249 return (vector
short)__builtin_altivec_lvehx(
__a,
__b);
4254 return (vector
unsigned short)__builtin_altivec_lvehx(
__a,
__b);
4258 return (vector
int)__builtin_altivec_lvewx(
__a,
__b);
4263 return (vector
unsigned int)__builtin_altivec_lvewx(
__a,
__b);
4267 return (vector
float)__builtin_altivec_lvewx(
__a,
__b);
4274 return (vector
signed char)__builtin_altivec_lvebx(
__a,
__b);
4279 return (vector
unsigned char)__builtin_altivec_lvebx(
__a,
__b);
4286 return (vector
short)__builtin_altivec_lvehx(
__a,
__b);
4291 return (vector
unsigned short)__builtin_altivec_lvehx(
__a,
__b);
4297 return (vector
int)__builtin_altivec_lvewx(
__a,
__b);
4302 return (vector
unsigned int)__builtin_altivec_lvewx(
__a,
__b);
4307 return (vector
float)__builtin_altivec_lvewx(
__a,
__b);
4314 return (vector
signed char)__builtin_altivec_lvxl(
__a,
__b);
4319 return (vector
signed char)__builtin_altivec_lvxl(
__a,
__b);
4324 return (vector
unsigned char)__builtin_altivec_lvxl(
__a,
__b);
4329 return (vector
unsigned char)__builtin_altivec_lvxl(
__a,
__b);
4334 return (vector
bool char)__builtin_altivec_lvxl(
__a,
__b);
4338 const vector
short *
__b) {
4339 return (vector
short)__builtin_altivec_lvxl(
__a,
__b);
4343 return (vector
short)__builtin_altivec_lvxl(
__a,
__b);
4348 return (vector
unsigned short)__builtin_altivec_lvxl(
__a,
__b);
4353 return (vector
unsigned short)__builtin_altivec_lvxl(
__a,
__b);
4358 return (vector
bool short)__builtin_altivec_lvxl(
__a,
__b);
4362 const vector pixel *
__b) {
4363 return (vector pixel
short)__builtin_altivec_lvxl(
__a,
__b);
4367 const vector
int *
__b) {
4368 return (vector
int)__builtin_altivec_lvxl(
__a,
__b);
4372 return (vector
int)__builtin_altivec_lvxl(
__a,
__b);
4377 return (vector
unsigned int)__builtin_altivec_lvxl(
__a,
__b);
4382 return (vector
unsigned int)__builtin_altivec_lvxl(
__a,
__b);
4387 return (vector
bool int)__builtin_altivec_lvxl(
__a,
__b);
4391 const vector
float *
__b) {
4392 return (vector
float)__builtin_altivec_lvxl(
__a,
__b);
4396 return (vector
float)__builtin_altivec_lvxl(
__a,
__b);
4403 return (vector
signed char)__builtin_altivec_lvxl(
__a,
__b);
4408 return (vector
signed char)__builtin_altivec_lvxl(
__a,
__b);
4413 return (vector
unsigned char)__builtin_altivec_lvxl(
__a,
__b);
4418 return (vector
unsigned char)__builtin_altivec_lvxl(
__a,
__b);
4423 return (vector
bool char)__builtin_altivec_lvxl(
__a,
__b);
4427 const vector
short *
__b) {
4428 return (vector
short)__builtin_altivec_lvxl(
__a,
__b);
4433 return (vector
short)__builtin_altivec_lvxl(
__a,
__b);
4438 return (vector
unsigned short)__builtin_altivec_lvxl(
__a,
__b);
4443 return (vector
unsigned short)__builtin_altivec_lvxl(
__a,
__b);
4448 return (vector
bool short)__builtin_altivec_lvxl(
__a,
__b);
4452 const vector pixel *
__b) {
4453 return (vector pixel)__builtin_altivec_lvxl(
__a,
__b);
4457 const vector
int *
__b) {
4458 return (vector
int)__builtin_altivec_lvxl(
__a,
__b);
4462 return (vector
int)__builtin_altivec_lvxl(
__a,
__b);
4467 return (vector
unsigned int)__builtin_altivec_lvxl(
__a,
__b);
4472 return (vector
unsigned int)__builtin_altivec_lvxl(
__a,
__b);
4477 return (vector
bool int)__builtin_altivec_lvxl(
__a,
__b);
4481 const vector
float *
__b) {
4482 return (vector
float)__builtin_altivec_lvxl(
__a,
__b);
4487 return (vector
float)__builtin_altivec_lvxl(
__a,
__b);
4492static __inline__ vector
float __attribute__((__always_inline__))
4493vec_loge(vector
float __a) {
4494 return __builtin_altivec_vlogefp(
__a);
4499static __inline__ vector
float __attribute__((__always_inline__))
4500vec_vlogefp(vector
float __a) {
4501 return __builtin_altivec_vlogefp(
__a);
4506#ifdef __LITTLE_ENDIAN__
4508 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4510 vector
unsigned char mask =
4511 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4512 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4513 7, 6, 5, 4, 3, 2, 1, 0};
4514 return vec_perm(mask, mask, reverse);
4519 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4523#ifdef __LITTLE_ENDIAN__
4525 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4527 vector
unsigned char mask =
4528 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4529 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4530 7, 6, 5, 4, 3, 2, 1, 0};
4531 return vec_perm(mask, mask, reverse);
4536 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4540#ifdef __LITTLE_ENDIAN__
4542 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4544 vector
unsigned char mask =
4545 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4546 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4547 7, 6, 5, 4, 3, 2, 1, 0};
4548 return vec_perm(mask, mask, reverse);
4553 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4557#ifdef __LITTLE_ENDIAN__
4559 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4561 vector
unsigned char mask =
4562 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4563 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4564 7, 6, 5, 4, 3, 2, 1, 0};
4565 return vec_perm(mask, mask, reverse);
4570 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4574#ifdef __LITTLE_ENDIAN__
4576 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4578 vector
unsigned char mask =
4579 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4580 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4581 7, 6, 5, 4, 3, 2, 1, 0};
4582 return vec_perm(mask, mask, reverse);
4587 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4591#ifdef __LITTLE_ENDIAN__
4593 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4595 vector
unsigned char mask =
4596 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4597 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4598 7, 6, 5, 4, 3, 2, 1, 0};
4599 return vec_perm(mask, mask, reverse);
4604 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4608#ifdef __LITTLE_ENDIAN__
4610 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4612 vector
unsigned char mask =
4613 (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4614 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4615 7, 6, 5, 4, 3, 2, 1, 0};
4616 return vec_perm(mask, mask, reverse);
4621 return (vector
unsigned char)__builtin_altivec_lvsl(
__a,
__b);
4627#ifdef __LITTLE_ENDIAN__
4629 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4631 vector
unsigned char mask =
4632 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4633 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4634 7, 6, 5, 4, 3, 2, 1, 0};
4635 return vec_perm(mask, mask, reverse);
4640 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4644#ifdef __LITTLE_ENDIAN__
4646 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4648 vector
unsigned char mask =
4649 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4650 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4651 7, 6, 5, 4, 3, 2, 1, 0};
4652 return vec_perm(mask, mask, reverse);
4657 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4661#ifdef __LITTLE_ENDIAN__
4663 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4665 vector
unsigned char mask =
4666 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4667 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4668 7, 6, 5, 4, 3, 2, 1, 0};
4669 return vec_perm(mask, mask, reverse);
4674 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4678#ifdef __LITTLE_ENDIAN__
4680 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4682 vector
unsigned char mask =
4683 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4684 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4685 7, 6, 5, 4, 3, 2, 1, 0};
4686 return vec_perm(mask, mask, reverse);
4691 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4695#ifdef __LITTLE_ENDIAN__
4697 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4699 vector
unsigned char mask =
4700 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4701 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4702 7, 6, 5, 4, 3, 2, 1, 0};
4703 return vec_perm(mask, mask, reverse);
4708 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4712#ifdef __LITTLE_ENDIAN__
4714 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4716 vector
unsigned char mask =
4717 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4718 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4719 7, 6, 5, 4, 3, 2, 1, 0};
4720 return vec_perm(mask, mask, reverse);
4725 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4729#ifdef __LITTLE_ENDIAN__
4731 __attribute__((__deprecated__(
"use assignment for unaligned little endian \
4733 vector
unsigned char mask =
4734 (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4735 vector
unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
4736 7, 6, 5, 4, 3, 2, 1, 0};
4737 return vec_perm(mask, mask, reverse);
4742 return (vector
unsigned char)__builtin_altivec_lvsr(
__a,
__b);
4748vec_mladd(vector
signed short, vector
signed short, vector
signed short);
4750vec_mladd(vector
signed short, vector
unsigned short, vector
unsigned short);
4752vec_mladd(vector
unsigned short, vector
signed short, vector
signed short);
4754vec_mladd(vector
unsigned short, vector
unsigned short, vector
unsigned short);
4757 vector
signed short __a, vector
signed short __b, vector
signed short __c) {
4763 vector
unsigned short __c) {
4769 vector
signed short __c) {
4775 vector
unsigned short __c) {
4783 return __builtin_vsx_xvmaddasp(
__a,
__b,
__c);
4785 return __builtin_altivec_vmaddfp(
__a,
__b,
__c);
4792 vector
double __c) {
4793 return __builtin_vsx_xvmaddadp(
__a,
__b,
__c);
4799static __inline__ vector
float __attribute__((__always_inline__))
4800vec_vmaddfp(vector
float __a, vector
float __b, vector
float __c) {
4801 return __builtin_altivec_vmaddfp(
__a,
__b,
__c);
4806static __inline__ vector
signed short __attribute__((__always_inline__))
4807vec_madds(vector
signed short __a, vector
signed short __b,
4808 vector
signed short __c) {
4809 return __builtin_altivec_vmhaddshs(
__a,
__b,
__c);
4813static __inline__ vector
signed short __attribute__((__always_inline__))
4814vec_vmhaddshs(vector
signed short __a, vector
signed short __b,
4815 vector
signed short __c) {
4816 return __builtin_altivec_vmhaddshs(
__a,
__b,
__c);
4825 return __builtin_vsx_xvmsubasp(
__a,
__b,
__c);
4828static __inline__ vector
double __ATTRS_o_ai vec_msub(vector
double __a,
4830 vector
double __c) {
4831 return __builtin_vsx_xvmsubadp(
__a,
__b,
__c);
4839 return __builtin_altivec_vmaxsb(
__a,
__b);
4844 return __builtin_altivec_vmaxsb((vector
signed char)
__a,
__b);
4849 return __builtin_altivec_vmaxsb(
__a, (vector
signed char)
__b);
4854 return __builtin_altivec_vmaxub(
__a,
__b);
4859 return __builtin_altivec_vmaxub((vector
unsigned char)
__a,
__b);
4864 return __builtin_altivec_vmaxub(
__a, (vector
unsigned char)
__b);
4869 return __builtin_altivec_vmaxsh(
__a,
__b);
4874 return __builtin_altivec_vmaxsh((vector
short)
__a,
__b);
4878 vector
bool short __b) {
4879 return __builtin_altivec_vmaxsh(
__a, (vector
short)
__b);
4884 return __builtin_altivec_vmaxuh(
__a,
__b);
4889 return __builtin_altivec_vmaxuh((vector
unsigned short)
__a,
__b);
4894 return __builtin_altivec_vmaxuh(
__a, (vector
unsigned short)
__b);
4899 return __builtin_altivec_vmaxsw(
__a,
__b);
4904 return __builtin_altivec_vmaxsw((vector
int)
__a,
__b);
4908 vector
bool int __b) {
4909 return __builtin_altivec_vmaxsw(
__a, (vector
int)
__b);
4914 return __builtin_altivec_vmaxuw(
__a,
__b);
4919 return __builtin_altivec_vmaxuw((vector
unsigned int)
__a,
__b);
4924 return __builtin_altivec_vmaxuw(
__a, (vector
unsigned int)
__b);
4927#ifdef __POWER8_VECTOR__
4929vec_max(vector
signed long long __a, vector
signed long long __b) {
4930 return __builtin_altivec_vmaxsd(
__a,
__b);
4934vec_max(vector
bool long long __a, vector
signed long long __b) {
4935 return __builtin_altivec_vmaxsd((vector
signed long long)
__a,
__b);
4939vec_max(vector
signed long long __a, vector
bool long long __b) {
4940 return __builtin_altivec_vmaxsd(
__a, (vector
signed long long)
__b);
4943static __inline__ vector
unsigned long long __ATTRS_o_ai
4944vec_max(vector
unsigned long long __a, vector
unsigned long long __b) {
4945 return __builtin_altivec_vmaxud(
__a,
__b);
4948static __inline__ vector
unsigned long long __ATTRS_o_ai
4949vec_max(vector
bool long long __a, vector
unsigned long long __b) {
4950 return __builtin_altivec_vmaxud((vector
unsigned long long)
__a,
__b);
4953static __inline__ vector
unsigned long long __ATTRS_o_ai
4954vec_max(vector
unsigned long long __a, vector
bool long long __b) {
4955 return __builtin_altivec_vmaxud(
__a, (vector
unsigned long long)
__b);
4962 return __builtin_vsx_xvmaxsp(
__a,
__b);
4964 return __builtin_altivec_vmaxfp(
__a,
__b);
4970 vector
double __b) {
4971 return __builtin_vsx_xvmaxdp(
__a,
__b);
4979 return __builtin_altivec_vmaxsb(
__a,
__b);
4984 return __builtin_altivec_vmaxsb((vector
signed char)
__a,
__b);
4989 return __builtin_altivec_vmaxsb(
__a, (vector
signed char)
__b);
4996 return __builtin_altivec_vmaxub(
__a,
__b);
5001 return __builtin_altivec_vmaxub((vector
unsigned char)
__a,
__b);
5006 return __builtin_altivec_vmaxub(
__a, (vector
unsigned char)
__b);
5013 return __builtin_altivec_vmaxsh(
__a,
__b);
5018 return __builtin_altivec_vmaxsh((vector
short)
__a,
__b);
5022 vector
bool short __b) {
5023 return __builtin_altivec_vmaxsh(
__a, (vector
short)
__b);
5030 return __builtin_altivec_vmaxuh(
__a,
__b);
5035 return __builtin_altivec_vmaxuh((vector
unsigned short)
__a,
__b);
5040 return __builtin_altivec_vmaxuh(
__a, (vector
unsigned short)
__b);
5047 return __builtin_altivec_vmaxsw(
__a,
__b);
5052 return __builtin_altivec_vmaxsw((vector
int)
__a,
__b);
5056 vector
bool int __b) {
5057 return __builtin_altivec_vmaxsw(
__a, (vector
int)
__b);
5064 return __builtin_altivec_vmaxuw(
__a,
__b);
5069 return __builtin_altivec_vmaxuw((vector
unsigned int)
__a,
__b);
5074 return __builtin_altivec_vmaxuw(
__a, (vector
unsigned int)
__b);
5079static __inline__ vector
float __attribute__((__always_inline__))
5080vec_vmaxfp(vector
float __a, vector
float __b) {
5082 return __builtin_vsx_xvmaxsp(
__a,
__b);
5084 return __builtin_altivec_vmaxfp(
__a,
__b);
5093 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5094 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5095 0x06, 0x16, 0x07, 0x17));
5101 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5102 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5103 0x06, 0x16, 0x07, 0x17));
5109 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5110 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5111 0x06, 0x16, 0x07, 0x17));
5117 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5118 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5119 0x06, 0x07, 0x16, 0x17));
5125 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5126 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5127 0x06, 0x07, 0x16, 0x17));
5133 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5134 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5135 0x06, 0x07, 0x16, 0x17));
5141 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5142 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5143 0x06, 0x07, 0x16, 0x17));
5149 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5150 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5151 0x14, 0x15, 0x16, 0x17));
5157 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5158 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5159 0x14, 0x15, 0x16, 0x17));
5163 vector
bool int __b) {
5165 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5166 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5167 0x14, 0x15, 0x16, 0x17));
5173 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5174 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5175 0x14, 0x15, 0x16, 0x17));
5182 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5183 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5184 0x14, 0x15, 0x16, 0x17));
5190 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5191 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5192 0x14, 0x15, 0x16, 0x17));
5198 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5199 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5200 0x14, 0x15, 0x16, 0x17));
5203static __inline__ vector
unsigned long long __ATTRS_o_ai
5206 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5207 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5208 0x14, 0x15, 0x16, 0x17));
5211static __inline__ vector
unsigned long long __ATTRS_o_ai
5214 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5215 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5216 0x14, 0x15, 0x16, 0x17));
5219static __inline__ vector
unsigned long long __ATTRS_o_ai
5222 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5223 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5224 0x14, 0x15, 0x16, 0x17));
5230 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5231 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5232 0x14, 0x15, 0x16, 0x17));
5236 vector
double __b) {
5238 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5239 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5240 0x14, 0x15, 0x16, 0x17));
5245 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5246 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5247 0x14, 0x15, 0x16, 0x17));
5252 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
5253 0x06, 0x07, 0x10, 0x11, 0x12, 0x13,
5254 0x14, 0x15, 0x16, 0x17));
5260#define __builtin_altivec_vmrghb vec_vmrghb
5265 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5266 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5267 0x06, 0x16, 0x07, 0x17));
5273 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5274 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5275 0x06, 0x16, 0x07, 0x17));
5281 (vector
unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
5282 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
5283 0x06, 0x16, 0x07, 0x17));
5288#define __builtin_altivec_vmrghh vec_vmrghh
5293 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5294 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5295 0x06, 0x07, 0x16, 0x17));
5301 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5302 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5303 0x06, 0x07, 0x16, 0x17));
5309 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5310 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5311 0x06, 0x07, 0x16, 0x17));
5317 (vector
unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
5318 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
5319 0x06, 0x07, 0x16, 0x17));
5324#define __builtin_altivec_vmrghw vec_vmrghw
5329 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5330 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5331 0x14, 0x15, 0x16, 0x17));
5337 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5338 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5339 0x14, 0x15, 0x16, 0x17));
5343 vector
bool int __b) {
5345 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5346 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5347 0x14, 0x15, 0x16, 0x17));
5353 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5354 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
5355 0x14, 0x15, 0x16, 0x17));
5363 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5364 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5365 0x0E, 0x1E, 0x0F, 0x1F));
5371 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5372 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5373 0x0E, 0x1E, 0x0F, 0x1F));
5379 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5380 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5381 0x0E, 0x1E, 0x0F, 0x1F));
5387 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5388 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5389 0x0E, 0x0F, 0x1E, 0x1F));
5395 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5396 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5397 0x0E, 0x0F, 0x1E, 0x1F));
5403 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5404 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5405 0x0E, 0x0F, 0x1E, 0x1F));
5411 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5412 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5413 0x0E, 0x0F, 0x1E, 0x1F));
5419 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5420 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5421 0x1C, 0x1D, 0x1E, 0x1F));
5427 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5428 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5429 0x1C, 0x1D, 0x1E, 0x1F));
5433 vector
bool int __b) {
5435 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5436 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5437 0x1C, 0x1D, 0x1E, 0x1F));
5443 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5444 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5445 0x1C, 0x1D, 0x1E, 0x1F));
5452 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5453 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5454 0x1C, 0x1D, 0x1E, 0x1F));
5459 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5460 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5461 0x1C, 0x1D, 0x1E, 0x1F));
5466 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5467 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5468 0x1C, 0x1D, 0x1E, 0x1F));
5470static __inline__ vector
unsigned long long __ATTRS_o_ai
5473 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5474 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5475 0x1C, 0x1D, 0x1E, 0x1F));
5477static __inline__ vector
unsigned long long __ATTRS_o_ai
5480 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5481 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5482 0x1C, 0x1D, 0x1E, 0x1F));
5484static __inline__ vector
unsigned long long __ATTRS_o_ai
5487 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5488 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5489 0x1C, 0x1D, 0x1E, 0x1F));
5494 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5495 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5496 0x1C, 0x1D, 0x1E, 0x1F));
5499 vector
double __b) {
5501 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5502 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5503 0x1C, 0x1D, 0x1E, 0x1F));
5508 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5509 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5510 0x1C, 0x1D, 0x1E, 0x1F));
5515 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
5516 0x0E, 0x0F, 0x18, 0X19, 0x1A, 0x1B,
5517 0x1C, 0x1D, 0x1E, 0x1F));
5523#define __builtin_altivec_vmrglb vec_vmrglb
5528 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5529 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5530 0x0E, 0x1E, 0x0F, 0x1F));
5536 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5537 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5538 0x0E, 0x1E, 0x0F, 0x1F));
5544 (vector
unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
5545 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
5546 0x0E, 0x1E, 0x0F, 0x1F));
5551#define __builtin_altivec_vmrglh vec_vmrglh
5556 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5557 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5558 0x0E, 0x0F, 0x1E, 0x1F));
5564 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5565 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5566 0x0E, 0x0F, 0x1E, 0x1F));
5572 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5573 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5574 0x0E, 0x0F, 0x1E, 0x1F));
5580 (vector
unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
5581 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
5582 0x0E, 0x0F, 0x1E, 0x1F));
5587#define __builtin_altivec_vmrglw vec_vmrglw
5592 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5593 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5594 0x1C, 0x1D, 0x1E, 0x1F));
5600 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5601 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5602 0x1C, 0x1D, 0x1E, 0x1F));
5606 vector
bool int __b) {
5608 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5609 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5610 0x1C, 0x1D, 0x1E, 0x1F));
5616 (vector
unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
5617 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
5618 0x1C, 0x1D, 0x1E, 0x1F));
5621#ifdef __POWER8_VECTOR__
5624static __inline__ vector
bool int __ATTRS_o_ai vec_mergee(vector
bool int __a,
5625 vector
bool int __b) {
5627 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5628 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5629 0x18, 0x19, 0x1A, 0x1B));
5633vec_mergee(vector
signed int __a, vector
signed int __b) {
5635 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5636 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5637 0x18, 0x19, 0x1A, 0x1B));
5641vec_mergee(vector
unsigned int __a, vector
unsigned int __b) {
5643 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5644 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5645 0x18, 0x19, 0x1A, 0x1B));
5649vec_mergee(vector
bool long long __a, vector
bool long long __b) {
5654vec_mergee(vector
signed long long __a, vector
signed long long __b) {
5658static __inline__ vector
unsigned long long __ATTRS_o_ai
5659vec_mergee(vector
unsigned long long __a, vector
unsigned long long __b) {
5664vec_mergee(vector
float __a, vector
float __b) {
5666 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
5667 0x12, 0x13, 0x08, 0x09, 0x0A, 0x0B,
5668 0x18, 0x19, 0x1A, 0x1B));
5672vec_mergee(vector
double __a, vector
double __b) {
5678static __inline__ vector
bool int __ATTRS_o_ai vec_mergeo(vector
bool int __a,
5679 vector
bool int __b) {
5681 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5682 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5683 0x1C, 0x1D, 0x1E, 0x1F));
5687vec_mergeo(vector
signed int __a, vector
signed int __b) {
5689 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5690 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5691 0x1C, 0x1D, 0x1E, 0x1F));
5695vec_mergeo(vector
unsigned int __a, vector
unsigned int __b) {
5697 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5698 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5699 0x1C, 0x1D, 0x1E, 0x1F));
5703vec_mergeo(vector
bool long long __a, vector
bool long long __b) {
5708vec_mergeo(vector
signed long long __a, vector
signed long long __b) {
5712static __inline__ vector
unsigned long long __ATTRS_o_ai
5713vec_mergeo(vector
unsigned long long __a, vector
unsigned long long __b) {
5718vec_mergeo(vector
float __a, vector
float __b) {
5720 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x14, 0x15,
5721 0x16, 0x17, 0x0C, 0x0D, 0x0E, 0x0F,
5722 0x1C, 0x1D, 0x1E, 0x1F));
5726vec_mergeo(vector
double __a, vector
double __b) {
5734static __inline__ vector
unsigned short __attribute__((__always_inline__))
5736 return __builtin_altivec_mfvscr();
5743 return __builtin_altivec_vminsb(
__a,
__b);
5748 return __builtin_altivec_vminsb((vector
signed char)
__a,
__b);
5753 return __builtin_altivec_vminsb(
__a, (vector
signed char)
__b);
5758 return __builtin_altivec_vminub(
__a,
__b);
5763 return __builtin_altivec_vminub((vector
unsigned char)
__a,
__b);
5768 return __builtin_altivec_vminub(
__a, (vector
unsigned char)
__b);
5773 return __builtin_altivec_vminsh(
__a,
__b);
5778 return __builtin_altivec_vminsh((vector
short)
__a,
__b);
5782 vector
bool short __b) {
5783 return __builtin_altivec_vminsh(
__a, (vector
short)
__b);
5788 return __builtin_altivec_vminuh(
__a,
__b);
5793 return __builtin_altivec_vminuh((vector
unsigned short)
__a,
__b);
5798 return __builtin_altivec_vminuh(
__a, (vector
unsigned short)
__b);
5803 return __builtin_altivec_vminsw(
__a,
__b);
5808 return __builtin_altivec_vminsw((vector
int)
__a,
__b);
5812 vector
bool int __b) {
5813 return __builtin_altivec_vminsw(
__a, (vector
int)
__b);
5818 return __builtin_altivec_vminuw(
__a,
__b);
5823 return __builtin_altivec_vminuw((vector
unsigned int)
__a,
__b);
5828 return __builtin_altivec_vminuw(
__a, (vector
unsigned int)
__b);
5831#ifdef __POWER8_VECTOR__
5833vec_min(vector
signed long long __a, vector
signed long long __b) {
5834 return __builtin_altivec_vminsd(
__a,
__b);
5838vec_min(vector
bool long long __a, vector
signed long long __b) {
5839 return __builtin_altivec_vminsd((vector
signed long long)
__a,
__b);
5843vec_min(vector
signed long long __a, vector
bool long long __b) {
5844 return __builtin_altivec_vminsd(
__a, (vector
signed long long)
__b);
5847static __inline__ vector
unsigned long long __ATTRS_o_ai
5848vec_min(vector
unsigned long long __a, vector
unsigned long long __b) {
5849 return __builtin_altivec_vminud(
__a,
__b);
5852static __inline__ vector
unsigned long long __ATTRS_o_ai
5853vec_min(vector
bool long long __a, vector
unsigned long long __b) {
5854 return __builtin_altivec_vminud((vector
unsigned long long)
__a,
__b);
5857static __inline__ vector
unsigned long long __ATTRS_o_ai
5858vec_min(vector
unsigned long long __a, vector
bool long long __b) {
5859 return __builtin_altivec_vminud(
__a, (vector
unsigned long long)
__b);
5866 return __builtin_vsx_xvminsp(
__a,
__b);
5868 return __builtin_altivec_vminfp(
__a,
__b);
5874 vector
double __b) {
5875 return __builtin_vsx_xvmindp(
__a,
__b);
5883 return __builtin_altivec_vminsb(
__a,
__b);
5888 return __builtin_altivec_vminsb((vector
signed char)
__a,
__b);
5893 return __builtin_altivec_vminsb(
__a, (vector
signed char)
__b);
5900 return __builtin_altivec_vminub(
__a,
__b);
5905 return __builtin_altivec_vminub((vector
unsigned char)
__a,
__b);
5910 return __builtin_altivec_vminub(
__a, (vector
unsigned char)
__b);
5917 return __builtin_altivec_vminsh(
__a,
__b);
5922 return __builtin_altivec_vminsh((vector
short)
__a,
__b);
5926 vector
bool short __b) {
5927 return __builtin_altivec_vminsh(
__a, (vector
short)
__b);
5934 return __builtin_altivec_vminuh(
__a,
__b);
5939 return __builtin_altivec_vminuh((vector
unsigned short)
__a,
__b);
5944 return __builtin_altivec_vminuh(
__a, (vector
unsigned short)
__b);
5951 return __builtin_altivec_vminsw(
__a,
__b);
5956 return __builtin_altivec_vminsw((vector
int)
__a,
__b);
5960 vector
bool int __b) {
5961 return __builtin_altivec_vminsw(
__a, (vector
int)
__b);
5968 return __builtin_altivec_vminuw(
__a,
__b);
5973 return __builtin_altivec_vminuw((vector
unsigned int)
__a,
__b);
5978 return __builtin_altivec_vminuw(
__a, (vector
unsigned int)
__b);
5983static __inline__ vector
float __attribute__((__always_inline__))
5984vec_vminfp(vector
float __a, vector
float __b) {
5986 return __builtin_vsx_xvminsp(
__a,
__b);
5988 return __builtin_altivec_vminfp(
__a,
__b);
5994#define __builtin_altivec_vmladduhm vec_mladd
6003 vector
short __a, vector
unsigned short __b, vector
unsigned short __c) {
6004 return __a * (vector short)
__b + (vector
short)
__c;
6015 vector
unsigned short __c) {
6028 vector
short __a, vector
unsigned short __b, vector
unsigned short __c) {
6029 return __a * (vector short)
__b + (vector
short)
__c;
6039 vector
unsigned short __c) {
6045static __inline__ vector
short __attribute__((__always_inline__))
6046vec_mradds(vector
short __a, vector
short __b, vector
short __c) {
6047 return __builtin_altivec_vmhraddshs(
__a,
__b,
__c);
6052static __inline__ vector
short __attribute__((__always_inline__))
6053vec_vmhraddshs(vector
short __a, vector
short __b, vector
short __c) {
6054 return __builtin_altivec_vmhraddshs(
__a,
__b,
__c);
6060 vector
unsigned char __b,
6062 return __builtin_altivec_vmsummbm(
__a,
__b,
__c);
6067 vector
unsigned int __c) {
6068 return __builtin_altivec_vmsumubm(
__a,
__b,
__c);
6074 return __builtin_altivec_vmsumshm(
__a,
__b,
__c);
6079 vector
unsigned int __c) {
6080 return __builtin_altivec_vmsumuhm(
__a,
__b,
__c);
6085#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
6087vec_msumc(vector
unsigned long long __a, vector
unsigned long long __b,
6088 vector
unsigned __int128
__c) {
6089 return __builtin_altivec_vmsumcud(
__a,
__b,
__c);
6095static __inline__ vector
int __attribute__((__always_inline__))
6096vec_vmsummbm(vector
signed char __a, vector
unsigned char __b, vector
int __c) {
6097 return __builtin_altivec_vmsummbm(
__a,
__b,
__c);
6102static __inline__ vector
unsigned int __attribute__((__always_inline__))
6103vec_vmsumubm(vector
unsigned char __a, vector
unsigned char __b,
6104 vector
unsigned int __c) {
6105 return __builtin_altivec_vmsumubm(
__a,
__b,
__c);
6110static __inline__ vector
int __attribute__((__always_inline__))
6111vec_vmsumshm(vector
short __a, vector
short __b, vector
int __c) {
6112 return __builtin_altivec_vmsumshm(
__a,
__b,
__c);
6117static __inline__ vector
unsigned int __attribute__((__always_inline__))
6118vec_vmsumuhm(vector
unsigned short __a, vector
unsigned short __b,
6119 vector
unsigned int __c) {
6120 return __builtin_altivec_vmsumuhm(
__a,
__b,
__c);
6128 return __builtin_altivec_vmsumshs(
__a,
__b,
__c);
6133 vector
unsigned int __c) {
6134 return __builtin_altivec_vmsumuhs(
__a,
__b,
__c);
6139static __inline__ vector
int __attribute__((__always_inline__))
6140vec_vmsumshs(vector
short __a, vector
short __b, vector
int __c) {
6141 return __builtin_altivec_vmsumshs(
__a,
__b,
__c);
6146static __inline__ vector
unsigned int __attribute__((__always_inline__))
6147vec_vmsumuhs(vector
unsigned short __a, vector
unsigned short __b,
6148 vector
unsigned int __c) {
6149 return __builtin_altivec_vmsumuhs(
__a,
__b,
__c);
6155 __builtin_altivec_mtvscr((vector
int)
__a);
6159 __builtin_altivec_mtvscr((vector
int)
__a);
6163 __builtin_altivec_mtvscr((vector
int)
__a);
6167 __builtin_altivec_mtvscr((vector
int)
__a);
6171 __builtin_altivec_mtvscr((vector
int)
__a);
6175 __builtin_altivec_mtvscr((vector
int)
__a);
6179 __builtin_altivec_mtvscr((vector
int)
__a);
6183 __builtin_altivec_mtvscr((vector
int)
__a);
6187 __builtin_altivec_mtvscr((vector
int)
__a);
6191 __builtin_altivec_mtvscr((vector
int)
__a);
6195 __builtin_altivec_mtvscr((vector
int)
__a);
6236vec_mul(vector
signed long long __a, vector
signed long long __b) {
6240static __inline__ vector
unsigned long long __ATTRS_o_ai
6241vec_mul(vector
unsigned long long __a, vector
unsigned long long __b) {
6253 vector
double __b) {
6264 vector
signed char __b) {
6265#ifdef __LITTLE_ENDIAN__
6266 return __builtin_altivec_vmulosb(
__a,
__b);
6268 return __builtin_altivec_vmulesb(
__a,
__b);
6274#ifdef __LITTLE_ENDIAN__
6275 return __builtin_altivec_vmuloub(
__a,
__b);
6277 return __builtin_altivec_vmuleub(
__a,
__b);
6283#ifdef __LITTLE_ENDIAN__
6284 return __builtin_altivec_vmulosh(
__a,
__b);
6286 return __builtin_altivec_vmulesh(
__a,
__b);
6292#ifdef __LITTLE_ENDIAN__
6293 return __builtin_altivec_vmulouh(
__a,
__b);
6295 return __builtin_altivec_vmuleuh(
__a,
__b);
6299#ifdef __POWER8_VECTOR__
6302#ifdef __LITTLE_ENDIAN__
6303 return __builtin_altivec_vmulosw(
__a,
__b);
6305 return __builtin_altivec_vmulesw(
__a,
__b);
6309static __inline__ vector
unsigned long long __ATTRS_o_ai
6311#ifdef __LITTLE_ENDIAN__
6312 return __builtin_altivec_vmulouw(
__a,
__b);
6314 return __builtin_altivec_vmuleuw(
__a,
__b);
6319#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
6321vec_mule(vector
signed long long __a, vector
signed long long __b) {
6322#ifdef __LITTLE_ENDIAN__
6323 return __builtin_altivec_vmulosd(
__a,
__b);
6325 return __builtin_altivec_vmulesd(
__a,
__b);
6330vec_mule(vector
unsigned long long __a, vector
unsigned long long __b) {
6331#ifdef __LITTLE_ENDIAN__
6332 return __builtin_altivec_vmuloud(
__a,
__b);
6334 return __builtin_altivec_vmuleud(
__a,
__b);
6341static __inline__ vector
short __attribute__((__always_inline__))
6342vec_vmulesb(vector
signed char __a, vector
signed char __b) {
6343#ifdef __LITTLE_ENDIAN__
6344 return __builtin_altivec_vmulosb(
__a,
__b);
6346 return __builtin_altivec_vmulesb(
__a,
__b);
6352static __inline__ vector
unsigned short __attribute__((__always_inline__))
6353vec_vmuleub(vector
unsigned char __a, vector
unsigned char __b) {
6354#ifdef __LITTLE_ENDIAN__
6355 return __builtin_altivec_vmuloub(
__a,
__b);
6357 return __builtin_altivec_vmuleub(
__a,
__b);
6363static __inline__ vector
int __attribute__((__always_inline__))
6364vec_vmulesh(vector
short __a, vector
short __b) {
6365#ifdef __LITTLE_ENDIAN__
6366 return __builtin_altivec_vmulosh(
__a,
__b);
6368 return __builtin_altivec_vmulesh(
__a,
__b);
6374static __inline__ vector
unsigned int __attribute__((__always_inline__))
6375vec_vmuleuh(vector
unsigned short __a, vector
unsigned short __b) {
6376#ifdef __LITTLE_ENDIAN__
6377 return __builtin_altivec_vmulouh(
__a,
__b);
6379 return __builtin_altivec_vmuleuh(
__a,
__b);
6385#ifdef __POWER10_VECTOR__
6387vec_mulh(vector
signed int __a, vector
signed int __b) {
6388 return __builtin_altivec_vmulhsw(
__a,
__b);
6392vec_mulh(vector
unsigned int __a, vector
unsigned int __b) {
6393 return __builtin_altivec_vmulhuw(
__a,
__b);
6397vec_mulh(vector
signed long long __a, vector
signed long long __b) {
6398 return __builtin_altivec_vmulhsd(
__a,
__b);
6401static __inline__ vector
unsigned long long __ATTRS_o_ai
6402vec_mulh(vector
unsigned long long __a, vector
unsigned long long __b) {
6403 return __builtin_altivec_vmulhud(
__a,
__b);
6410 vector
signed char __b) {
6411#ifdef __LITTLE_ENDIAN__
6412 return __builtin_altivec_vmulesb(
__a,
__b);
6414 return __builtin_altivec_vmulosb(
__a,
__b);
6420#ifdef __LITTLE_ENDIAN__
6421 return __builtin_altivec_vmuleub(
__a,
__b);
6423 return __builtin_altivec_vmuloub(
__a,
__b);
6429#ifdef __LITTLE_ENDIAN__
6430 return __builtin_altivec_vmulesh(
__a,
__b);
6432 return __builtin_altivec_vmulosh(
__a,
__b);
6438#ifdef __LITTLE_ENDIAN__
6439 return __builtin_altivec_vmuleuh(
__a,
__b);
6441 return __builtin_altivec_vmulouh(
__a,
__b);
6445#ifdef __POWER8_VECTOR__
6448#ifdef __LITTLE_ENDIAN__
6449 return __builtin_altivec_vmulesw(
__a,
__b);
6451 return __builtin_altivec_vmulosw(
__a,
__b);
6455static __inline__ vector
unsigned long long __ATTRS_o_ai
6457#ifdef __LITTLE_ENDIAN__
6458 return __builtin_altivec_vmuleuw(
__a,
__b);
6460 return __builtin_altivec_vmulouw(
__a,
__b);
6465#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
6467vec_mulo(vector
signed long long __a, vector
signed long long __b) {
6468#ifdef __LITTLE_ENDIAN__
6469 return __builtin_altivec_vmulesd(
__a,
__b);
6471 return __builtin_altivec_vmulosd(
__a,
__b);
6476vec_mulo(vector
unsigned long long __a, vector
unsigned long long __b) {
6477#ifdef __LITTLE_ENDIAN__
6478 return __builtin_altivec_vmuleud(
__a,
__b);
6480 return __builtin_altivec_vmuloud(
__a,
__b);
6487static __inline__ vector
short __attribute__((__always_inline__))
6488vec_vmulosb(vector
signed char __a, vector
signed char __b) {
6489#ifdef __LITTLE_ENDIAN__
6490 return __builtin_altivec_vmulesb(
__a,
__b);
6492 return __builtin_altivec_vmulosb(
__a,
__b);
6498static __inline__ vector
unsigned short __attribute__((__always_inline__))
6499vec_vmuloub(vector
unsigned char __a, vector
unsigned char __b) {
6500#ifdef __LITTLE_ENDIAN__
6501 return __builtin_altivec_vmuleub(
__a,
__b);
6503 return __builtin_altivec_vmuloub(
__a,
__b);
6509static __inline__ vector
int __attribute__((__always_inline__))
6510vec_vmulosh(vector
short __a, vector
short __b) {
6511#ifdef __LITTLE_ENDIAN__
6512 return __builtin_altivec_vmulesh(
__a,
__b);
6514 return __builtin_altivec_vmulosh(
__a,
__b);
6520static __inline__ vector
unsigned int __attribute__((__always_inline__))
6521vec_vmulouh(vector
unsigned short __a, vector
unsigned short __b) {
6522#ifdef __LITTLE_ENDIAN__
6523 return __builtin_altivec_vmuleuh(
__a,
__b);
6525 return __builtin_altivec_vmulouh(
__a,
__b);
6531#ifdef __POWER8_VECTOR__
6533vec_nand(vector
signed char __a, vector
signed char __b) {
6538vec_nand(vector
signed char __a, vector
bool char __b) {
6539 return ~(
__a & (vector
signed char)
__b);
6543vec_nand(vector
bool char __a, vector
signed char __b) {
6544 return (vector
signed char)~(
__a & (vector
bool char)
__b);
6548vec_nand(vector
unsigned char __a, vector
unsigned char __b) {
6553vec_nand(vector
unsigned char __a, vector
bool char __b) {
6554 return ~(
__a & (vector
unsigned char)
__b);
6558vec_nand(vector
bool char __a, vector
unsigned char __b) {
6559 return (vector
unsigned char)~(
__a & (vector
bool char)
__b);
6562static __inline__ vector
bool char __ATTRS_o_ai vec_nand(vector
bool char __a,
6563 vector
bool char __b) {
6568vec_nand(vector
signed short __a, vector
signed short __b) {
6573vec_nand(vector
signed short __a, vector
bool short __b) {
6574 return ~(
__a & (vector
signed short)
__b);
6578vec_nand(vector
bool short __a, vector
signed short __b) {
6579 return (vector
signed short)~(
__a & (vector
bool short)
__b);
6583vec_nand(vector
unsigned short __a, vector
unsigned short __b) {
6588vec_nand(vector
unsigned short __a, vector
bool short __b) {
6589 return ~(
__a & (vector
unsigned short)
__b);
6593vec_nand(vector
bool short __a, vector
bool short __b) {
6598vec_nand(vector
signed int __a, vector
signed int __b) {
6602static __inline__ vector
signed int __ATTRS_o_ai vec_nand(vector
signed int __a,
6603 vector
bool int __b) {
6608vec_nand(vector
bool int __a, vector
signed int __b) {
6609 return (vector
signed int)~(
__a & (vector
bool int)
__b);
6613vec_nand(vector
unsigned int __a, vector
unsigned int __b) {
6618vec_nand(vector
unsigned int __a, vector
bool int __b) {
6619 return ~(
__a & (vector
unsigned int)
__b);
6623vec_nand(vector
bool int __a, vector
unsigned int __b) {
6624 return (vector
unsigned int)~(
__a & (vector
bool int)
__b);
6627static __inline__ vector
bool int __ATTRS_o_ai vec_nand(vector
bool int __a,
6628 vector
bool int __b) {
6633vec_nand(vector
float __a, vector
float __b) {
6634 return (vector
float)(~((vector
unsigned int)
__a &
6635 (vector
unsigned int)
__b));
6639vec_nand(vector
signed long long __a, vector
signed long long __b) {
6644vec_nand(vector
signed long long __a, vector
bool long long __b) {
6645 return ~(
__a & (vector
signed long long)
__b);
6649vec_nand(vector
bool long long __a, vector
signed long long __b) {
6650 return (vector
signed long long)~(
__a & (vector
bool long long)
__b);
6653static __inline__ vector
unsigned long long __ATTRS_o_ai
6654vec_nand(vector
unsigned long long __a, vector
unsigned long long __b) {
6658static __inline__ vector
unsigned long long __ATTRS_o_ai
6659vec_nand(vector
unsigned long long __a, vector
bool long long __b) {
6660 return ~(
__a & (vector
unsigned long long)
__b);
6663static __inline__ vector
unsigned long long __ATTRS_o_ai
6664vec_nand(vector
bool long long __a, vector
unsigned long long __b) {
6665 return (vector
unsigned long long)~(
__a & (vector
bool long long)
__b);
6669vec_nand(vector
bool long long __a, vector
bool long long __b) {
6674vec_nand(vector
double __a, vector
double __b) {
6675 return (vector
double)(~((vector
unsigned long long)
__a &
6676 (vector
unsigned long long)
__b));
6684static __inline__ vector
float __ATTRS_o_ai vec_nmadd(vector
float __a,
6687 return __builtin_vsx_xvnmaddasp(
__a,
__b,
__c);
6690static __inline__ vector
double __ATTRS_o_ai vec_nmadd(vector
double __a,
6692 vector
double __c) {
6693 return __builtin_vsx_xvnmaddadp(
__a,
__b,
__c);
6703 return __builtin_vsx_xvnmsubasp(
__a,
__b,
__c);
6705 return __builtin_altivec_vnmsubfp(
__a,
__b,
__c);
6712 vector
double __c) {
6713 return __builtin_vsx_xvnmsubadp(
__a,
__b,
__c);
6719static __inline__ vector
float __attribute__((__always_inline__))
6720vec_vnmsubfp(vector
float __a, vector
float __b, vector
float __c) {
6721 return __builtin_altivec_vnmsubfp(
__a,
__b,
__c);
6726#define __builtin_altivec_vnor vec_nor
6739 vector
bool char __b) {
6769 vector
bool int __b) {
6775 vector
unsigned int __res =
6776 ~((vector
unsigned int)
__a | (vector
unsigned int)
__b);
6777 return (vector
float)__res;
6782 vector
double __b) {
6783 vector
unsigned long long __res =
6784 ~((vector
unsigned long long)
__a | (vector
unsigned long long)
__b);
6785 return (vector
double)__res;
6802 vector
bool char __b) {
6832 vector
bool int __b) {
6838 vector
unsigned int __res =
6839 ~((vector
unsigned int)
__a | (vector
unsigned int)
__b);
6840 return (vector
float)__res;
6845vec_nor(vector
signed long long __a, vector
signed long long __b) {
6849static __inline__ vector
unsigned long long __ATTRS_o_ai
6850vec_nor(vector
unsigned long long __a, vector
unsigned long long __b) {
6855vec_nor(vector
bool long long __a, vector
bool long long __b) {
6862#define __builtin_altivec_vor vec_or
6871 return (vector
signed char)
__a |
__b;
6875 vector
bool char __b) {
6876 return __a | (vector
signed char)
__b;
6886 return (vector
unsigned char)
__a |
__b;
6891 return __a | (vector
unsigned char)
__b;
6895 vector
bool char __b) {
6906 return (vector
short)
__a |
__b;
6910 vector
bool short __b) {
6911 return __a | (vector short)
__b;
6921 return (vector
unsigned short)
__a |
__b;
6926 return __a | (vector
unsigned short)
__b;
6930 vector
bool short __b) {
6941 return (vector
int)
__a |
__b;
6945 vector
bool int __b) {
6956 return (vector
unsigned int)
__a |
__b;
6965 vector
bool int __b) {
6971 vector
unsigned int __res =
6972 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
6973 return (vector
float)__res;
6978 vector
unsigned int __res =
6979 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
6980 return (vector
float)__res;
6984 vector
bool int __b) {
6985 vector
unsigned int __res =
6986 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
6987 return (vector
float)__res;
6992 vector
double __b) {
6993 return (vector
double)((vector
unsigned long long)
__a |
6994 (vector
unsigned long long)
__b);
6998 vector
bool long long __b) {
6999 return (vector
double)((vector
unsigned long long)
__a |
7000 (vector
unsigned long long)
__b);
7004 vector
double __b) {
7005 return (vector
double)((vector
unsigned long long)
__a |
7006 (vector
unsigned long long)
__b);
7010vec_or(vector
signed long long __a, vector
signed long long __b) {
7015vec_or(vector
bool long long __a, vector
signed long long __b) {
7016 return (vector
signed long long)
__a |
__b;
7020vec_or(vector
signed long long __a, vector
bool long long __b) {
7021 return __a | (vector
signed long long)
__b;
7024static __inline__ vector
unsigned long long __ATTRS_o_ai
7025vec_or(vector
unsigned long long __a, vector
unsigned long long __b) {
7029static __inline__ vector
unsigned long long __ATTRS_o_ai
7030vec_or(vector
bool long long __a, vector
unsigned long long __b) {
7031 return (vector
unsigned long long)
__a |
__b;
7034static __inline__ vector
unsigned long long __ATTRS_o_ai
7035vec_or(vector
unsigned long long __a, vector
bool long long __b) {
7036 return __a | (vector
unsigned long long)
__b;
7040vec_or(vector
bool long long __a, vector
bool long long __b) {
7045#ifdef __POWER8_VECTOR__
7047vec_orc(vector
signed char __a, vector
signed char __b) {
7052vec_orc(vector
signed char __a, vector
bool char __b) {
7053 return __a | (vector
signed char)~
__b;
7057vec_orc(vector
bool char __a, vector
signed char __b) {
7058 return (vector
signed char)(
__a | (vector
bool char)~
__b);
7062vec_orc(vector
unsigned char __a, vector
unsigned char __b) {
7067vec_orc(vector
unsigned char __a, vector
bool char __b) {
7068 return __a | (vector
unsigned char)~
__b;
7072vec_orc(vector
bool char __a, vector
unsigned char __b) {
7073 return (vector
unsigned char)(
__a | (vector
bool char)~
__b);
7076static __inline__ vector
bool char __ATTRS_o_ai vec_orc(vector
bool char __a,
7077 vector
bool char __b) {
7082vec_orc(vector
signed short __a, vector
signed short __b) {
7087vec_orc(vector
signed short __a, vector
bool short __b) {
7088 return __a | (vector
signed short)~
__b;
7092vec_orc(vector
bool short __a, vector
signed short __b) {
7093 return (vector
signed short)(
__a | (vector
bool short)~
__b);
7097vec_orc(vector
unsigned short __a, vector
unsigned short __b) {
7102vec_orc(vector
unsigned short __a, vector
bool short __b) {
7103 return __a | (vector
unsigned short)~
__b;
7107vec_orc(vector
bool short __a, vector
unsigned short __b) {
7108 return (vector
unsigned short)(
__a | (vector
bool short)~
__b);
7112vec_orc(vector
bool short __a, vector
bool short __b) {
7117vec_orc(vector
signed int __a, vector
signed int __b) {
7121static __inline__ vector
signed int __ATTRS_o_ai vec_orc(vector
signed int __a,
7122 vector
bool int __b) {
7127vec_orc(vector
bool int __a, vector
signed int __b) {
7128 return (vector
signed int)(
__a | (vector
bool int)~
__b);
7132vec_orc(vector
unsigned int __a, vector
unsigned int __b) {
7137vec_orc(vector
unsigned int __a, vector
bool int __b) {
7142vec_orc(vector
bool int __a, vector
unsigned int __b) {
7143 return (vector
unsigned int)(
__a | (vector
bool int)~
__b);
7146static __inline__ vector
bool int __ATTRS_o_ai vec_orc(vector
bool int __a,
7147 vector
bool int __b) {
7152vec_orc(vector
bool int __a, vector
float __b) {
7153 return (vector
float)(
__a | ~(vector
bool int)
__b);
7157vec_orc(vector
float __a, vector
bool int __b) {
7158 return (vector
float)((vector
bool int)
__a | ~
__b);
7163 return (vector
float)((vector
unsigned int)
__a | ~(vector
unsigned int)
__b);
7167vec_orc(vector
signed long long __a, vector
signed long long __b) {
7172vec_orc(vector
signed long long __a, vector
bool long long __b) {
7173 return __a | (vector
signed long long)~
__b;
7177vec_orc(vector
bool long long __a, vector
signed long long __b) {
7178 return (vector
signed long long)(
__a | (vector
bool long long)~
__b);
7181static __inline__ vector
unsigned long long __ATTRS_o_ai
7182vec_orc(vector
unsigned long long __a, vector
unsigned long long __b) {
7186static __inline__ vector
unsigned long long __ATTRS_o_ai
7187vec_orc(vector
unsigned long long __a, vector
bool long long __b) {
7188 return __a | (vector
unsigned long long)~
__b;
7191static __inline__ vector
unsigned long long __ATTRS_o_ai
7192vec_orc(vector
bool long long __a, vector
unsigned long long __b) {
7193 return (vector
unsigned long long)(
__a | (vector
bool long long)~
__b);
7197vec_orc(vector
bool long long __a, vector
bool long long __b) {
7202vec_orc(vector
double __a, vector
bool long long __b) {
7203 return (vector
double)((vector
bool long long)
__a | ~
__b);
7207vec_orc(vector
bool long long __a, vector
double __b) {
7208 return (vector
double)(
__a | ~(vector
bool long long)
__b);
7211static __inline__ vector
double __ATTRS_o_ai vec_orc(vector
double __a,
7212 vector
double __b) {
7213 return (vector
double)((vector
unsigned long long)
__a |
7214 ~(vector
unsigned long long)
__b);
7227 return (vector
signed char)
__a |
__b;
7232 return __a | (vector
signed char)
__b;
7242 return (vector
unsigned char)
__a |
__b;
7247 return __a | (vector
unsigned char)
__b;
7251 vector
bool char __b) {
7262 return (vector
short)
__a |
__b;
7266 vector
bool short __b) {
7267 return __a | (vector short)
__b;
7277 return (vector
unsigned short)
__a |
__b;
7282 return __a | (vector
unsigned short)
__b;
7297 return (vector
int)
__a |
__b;
7301 vector
bool int __b) {
7312 return (vector
unsigned int)
__a |
__b;
7321 vector
bool int __b) {
7327 vector
unsigned int __res =
7328 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7329 return (vector
float)__res;
7334 vector
unsigned int __res =
7335 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7336 return (vector
float)__res;
7340 vector
bool int __b) {
7341 vector
unsigned int __res =
7342 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7343 return (vector
float)__res;
7348vec_vor(vector
signed long long __a, vector
signed long long __b) {
7353vec_vor(vector
bool long long __a, vector
signed long long __b) {
7354 return (vector
signed long long)
__a |
__b;
7358vec_vor(vector
signed long long __a, vector
bool long long __b) {
7359 return __a | (vector
signed long long)
__b;
7362static __inline__ vector
unsigned long long __ATTRS_o_ai
7363vec_vor(vector
unsigned long long __a, vector
unsigned long long __b) {
7367static __inline__ vector
unsigned long long __ATTRS_o_ai
7368vec_vor(vector
bool long long __a, vector
unsigned long long __b) {
7369 return (vector
unsigned long long)
__a |
__b;
7372static __inline__ vector
unsigned long long __ATTRS_o_ai
7373vec_vor(vector
unsigned long long __a, vector
bool long long __b) {
7374 return __a | (vector
unsigned long long)
__b;
7378vec_vor(vector
bool long long __a, vector
bool long long __b) {
7390#ifdef __LITTLE_ENDIAN__
7391 return (vector
signed char)
vec_perm(
7393 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7394 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7396 return (vector
signed char)
vec_perm(
7398 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7399 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7405#ifdef __LITTLE_ENDIAN__
7406 return (vector
unsigned char)
vec_perm(
7408 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7409 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7411 return (vector
unsigned char)
vec_perm(
7413 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7414 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7420#ifdef __LITTLE_ENDIAN__
7423 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7424 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7428 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7429 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7435#ifdef __LITTLE_ENDIAN__
7438 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7439 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7443 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7444 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7450#ifdef __LITTLE_ENDIAN__
7451 return (vector
unsigned short)
vec_perm(
7453 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7454 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7456 return (vector
unsigned short)
vec_perm(
7458 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7459 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7464 vector
bool int __b) {
7465#ifdef __LITTLE_ENDIAN__
7466 return (vector
bool short)
vec_perm(
7468 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7469 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7471 return (vector
bool short)
vec_perm(
7473 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7474 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7480vec_pack(vector
signed long long __a, vector
signed long long __b) {
7481#ifdef __LITTLE_ENDIAN__
7482 return (vector
signed int)
vec_perm(
7484 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7485 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7487 return (vector
signed int)
vec_perm(
7489 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7490 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7494vec_pack(vector
unsigned long long __a, vector
unsigned long long __b) {
7495#ifdef __LITTLE_ENDIAN__
7496 return (vector
unsigned int)
vec_perm(
7498 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7499 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7501 return (vector
unsigned int)
vec_perm(
7503 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7504 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7510#ifdef __LITTLE_ENDIAN__
7513 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7514 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7518 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7519 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7525 return (vector
float) (
__a[0],
__a[1],
__b[0],
__b[1]);
7529#ifdef __POWER9_VECTOR__
7531vec_pack_to_short_fp32(vector
float __a, vector
float __b) {
7532 vector
float __resa = __builtin_vsx_xvcvsphp(
__a);
7533 vector
float __resb = __builtin_vsx_xvcvsphp(
__b);
7534#ifdef __LITTLE_ENDIAN__
7535 return (vector
unsigned short)vec_mergee(__resa, __resb);
7537 return (vector
unsigned short)vec_mergeo(__resa, __resb);
7544#define __builtin_altivec_vpkuhum vec_vpkuhum
7548#ifdef __LITTLE_ENDIAN__
7549 return (vector
signed char)
vec_perm(
7551 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7552 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7554 return (vector
signed char)
vec_perm(
7556 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7557 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7563#ifdef __LITTLE_ENDIAN__
7564 return (vector
unsigned char)
vec_perm(
7566 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7567 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7569 return (vector
unsigned char)
vec_perm(
7571 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7572 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7578#ifdef __LITTLE_ENDIAN__
7581 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7582 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7586 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7587 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7593#define __builtin_altivec_vpkuwum vec_vpkuwum
7597#ifdef __LITTLE_ENDIAN__
7600 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7601 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7605 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7606 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7612#ifdef __LITTLE_ENDIAN__
7613 return (vector
unsigned short)
vec_perm(
7615 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7616 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7618 return (vector
unsigned short)
vec_perm(
7620 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7621 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7627#ifdef __LITTLE_ENDIAN__
7628 return (vector
bool short)
vec_perm(
7630 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7631 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7633 return (vector
bool short)
vec_perm(
7635 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7636 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7642#ifdef __POWER8_VECTOR__
7643#define __builtin_altivec_vpkudum vec_vpkudum
7645static __inline__ vector
int __ATTRS_o_ai vec_vpkudum(vector
long long __a,
7646 vector
long long __b) {
7647#ifdef __LITTLE_ENDIAN__
7650 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7651 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7655 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7656 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7661vec_vpkudum(vector
unsigned long long __a, vector
unsigned long long __b) {
7662#ifdef __LITTLE_ENDIAN__
7663 return (vector
unsigned int)
vec_perm(
7665 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7666 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7668 return (vector
unsigned int)
vec_perm(
7670 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7671 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7676vec_vpkudum(vector
bool long long __a, vector
bool long long __b) {
7677#ifdef __LITTLE_ENDIAN__
7679 (vector
long long)
__a, (vector
long long)
__b,
7680 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7681 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7684 (vector
long long)
__a, (vector
long long)
__b,
7685 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7686 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7693static __inline__ vector pixel
__attribute__((__always_inline__))
7694vec_packpx(vector
unsigned int __a, vector
unsigned int __b) {
7695#ifdef __LITTLE_ENDIAN__
7696 return (vector pixel)__builtin_altivec_vpkpx(
__b,
__a);
7698 return (vector pixel)__builtin_altivec_vpkpx(
__a,
__b);
7704static __inline__ vector pixel
__attribute__((__always_inline__))
7705vec_vpkpx(vector
unsigned int __a, vector
unsigned int __b) {
7706#ifdef __LITTLE_ENDIAN__
7707 return (vector pixel)__builtin_altivec_vpkpx(
__b,
__a);
7709 return (vector pixel)__builtin_altivec_vpkpx(
__a,
__b);
7717#ifdef __LITTLE_ENDIAN__
7718 return __builtin_altivec_vpkshss(
__b,
__a);
7720 return __builtin_altivec_vpkshss(
__a,
__b);
7726#ifdef __LITTLE_ENDIAN__
7727 return __builtin_altivec_vpkuhus(
__b,
__a);
7729 return __builtin_altivec_vpkuhus(
__a,
__b);
7735#ifdef __LITTLE_ENDIAN__
7736 return __builtin_altivec_vpkswss(
__b,
__a);
7738 return __builtin_altivec_vpkswss(
__a,
__b);
7744#ifdef __LITTLE_ENDIAN__
7745 return __builtin_altivec_vpkuwus(
__b,
__a);
7747 return __builtin_altivec_vpkuwus(
__a,
__b);
7751#ifdef __POWER8_VECTOR__
7753 vector
long long __b) {
7754#ifdef __LITTLE_ENDIAN__
7755 return __builtin_altivec_vpksdss(
__b,
__a);
7757 return __builtin_altivec_vpksdss(
__a,
__b);
7762vec_packs(vector
unsigned long long __a, vector
unsigned long long __b) {
7763#ifdef __LITTLE_ENDIAN__
7764 return __builtin_altivec_vpkudus(
__b,
__a);
7766 return __builtin_altivec_vpkudus(
__a,
__b);
7773static __inline__ vector
signed char __attribute__((__always_inline__))
7774vec_vpkshss(vector
short __a, vector
short __b) {
7775#ifdef __LITTLE_ENDIAN__
7776 return __builtin_altivec_vpkshss(
__b,
__a);
7778 return __builtin_altivec_vpkshss(
__a,
__b);
7784#ifdef __POWER8_VECTOR__
7785static __inline__ vector
int __ATTRS_o_ai vec_vpksdss(vector
long long __a,
7786 vector
long long __b) {
7787#ifdef __LITTLE_ENDIAN__
7788 return __builtin_altivec_vpksdss(
__b,
__a);
7790 return __builtin_altivec_vpksdss(
__a,
__b);
7797static __inline__ vector
unsigned char __attribute__((__always_inline__))
7798vec_vpkuhus(vector
unsigned short __a, vector
unsigned short __b) {
7799#ifdef __LITTLE_ENDIAN__
7800 return __builtin_altivec_vpkuhus(
__b,
__a);
7802 return __builtin_altivec_vpkuhus(
__a,
__b);
7808#ifdef __POWER8_VECTOR__
7809static __inline__ vector
unsigned int __attribute__((__always_inline__))
7810vec_vpkudus(vector
unsigned long long __a, vector
unsigned long long __b) {
7811#ifdef __LITTLE_ENDIAN__
7812 return __builtin_altivec_vpkudus(
__b,
__a);
7814 return __builtin_altivec_vpkudus(
__a,
__b);
7821static __inline__ vector
signed short __attribute__((__always_inline__))
7822vec_vpkswss(vector
int __a, vector
int __b) {
7823#ifdef __LITTLE_ENDIAN__
7824 return __builtin_altivec_vpkswss(
__b,
__a);
7826 return __builtin_altivec_vpkswss(
__a,
__b);
7832static __inline__ vector
unsigned short __attribute__((__always_inline__))
7833vec_vpkuwus(vector
unsigned int __a, vector
unsigned int __b) {
7834#ifdef __LITTLE_ENDIAN__
7835 return __builtin_altivec_vpkuwus(
__b,
__a);
7837 return __builtin_altivec_vpkuwus(
__a,
__b);
7845#ifdef __LITTLE_ENDIAN__
7846 return __builtin_altivec_vpkshus(
__b,
__a);
7848 return __builtin_altivec_vpkshus(
__a,
__b);
7854#ifdef __LITTLE_ENDIAN__
7855 return __builtin_altivec_vpkuhus(
__b,
__a);
7857 return __builtin_altivec_vpkuhus(
__a,
__b);
7863#ifdef __LITTLE_ENDIAN__
7864 return __builtin_altivec_vpkswus(
__b,
__a);
7866 return __builtin_altivec_vpkswus(
__a,
__b);
7872#ifdef __LITTLE_ENDIAN__
7873 return __builtin_altivec_vpkuwus(
__b,
__a);
7875 return __builtin_altivec_vpkuwus(
__a,
__b);
7879#ifdef __POWER8_VECTOR__
7882#ifdef __LITTLE_ENDIAN__
7883 return __builtin_altivec_vpksdus(
__b,
__a);
7885 return __builtin_altivec_vpksdus(
__a,
__b);
7891#ifdef __LITTLE_ENDIAN__
7892 return __builtin_altivec_vpkudus(
__b,
__a);
7894 return __builtin_altivec_vpkudus(
__a,
__b);
7903#ifdef __LITTLE_ENDIAN__
7904 return __builtin_altivec_vpkshus(
__b,
__a);
7906 return __builtin_altivec_vpkshus(
__a,
__b);
7912#ifdef __LITTLE_ENDIAN__
7913 return __builtin_altivec_vpkuhus(
__b,
__a);
7915 return __builtin_altivec_vpkuhus(
__a,
__b);
7923#ifdef __LITTLE_ENDIAN__
7924 return __builtin_altivec_vpkswus(
__b,
__a);
7926 return __builtin_altivec_vpkswus(
__a,
__b);
7932#ifdef __LITTLE_ENDIAN__
7933 return __builtin_altivec_vpkuwus(
__b,
__a);
7935 return __builtin_altivec_vpkuwus(
__a,
__b);
7941#ifdef __POWER8_VECTOR__
7943vec_vpksdus(vector
long long __a, vector
long long __b) {
7944#ifdef __LITTLE_ENDIAN__
7945 return __builtin_altivec_vpksdus(
__b,
__a);
7947 return __builtin_altivec_vpksdus(
__a,
__b);
7963 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7964#ifdef __LITTLE_ENDIAN__
7965 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7966 255, 255, 255, 255, 255, 255, 255, 255};
7968 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)
__b,
7969 (vector
int)
__a, __d);
7971 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)
__a,
7978 vector
unsigned char __c) {
7979#ifdef __LITTLE_ENDIAN__
7980 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7981 255, 255, 255, 255, 255, 255, 255, 255};
7983 return (vector
unsigned char)__builtin_altivec_vperm_4si(
7984 (vector
int)
__b, (vector
int)
__a, __d);
7986 return (vector
unsigned char)__builtin_altivec_vperm_4si(
7993#ifdef __LITTLE_ENDIAN__
7994 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7995 255, 255, 255, 255, 255, 255, 255, 255};
7997 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)
__b,
7998 (vector
int)
__a, __d);
8000 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)
__a,
8006 vector
signed short __b,
8007 vector
unsigned char __c) {
8008#ifdef __LITTLE_ENDIAN__
8009 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8010 255, 255, 255, 255, 255, 255, 255, 255};
8012 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)
__b,
8013 (vector
int)
__a, __d);
8015 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)
__a,
8022 vector
unsigned char __c) {
8023#ifdef __LITTLE_ENDIAN__
8024 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8025 255, 255, 255, 255, 255, 255, 255, 255};
8027 return (vector
unsigned short)__builtin_altivec_vperm_4si(
8028 (vector
int)
__b, (vector
int)
__a, __d);
8030 return (vector
unsigned short)__builtin_altivec_vperm_4si(
8036 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
8037#ifdef __LITTLE_ENDIAN__
8038 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8039 255, 255, 255, 255, 255, 255, 255, 255};
8041 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)
__b,
8042 (vector
int)
__a, __d);
8044 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)
__a,
8051 vector
unsigned char __c) {
8052#ifdef __LITTLE_ENDIAN__
8053 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8054 255, 255, 255, 255, 255, 255, 255, 255};
8056 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)
__b,
8057 (vector
int)
__a, __d);
8059 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)
__a,
8065 vector
signed int __b,
8066 vector
unsigned char __c) {
8067#ifdef __LITTLE_ENDIAN__
8068 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8069 255, 255, 255, 255, 255, 255, 255, 255};
8071 return (vector
signed int)__builtin_altivec_vperm_4si(
__b,
__a, __d);
8073 return (vector
signed int)__builtin_altivec_vperm_4si(
__a,
__b,
__c);
8079 vector
unsigned char __c) {
8080#ifdef __LITTLE_ENDIAN__
8081 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8082 255, 255, 255, 255, 255, 255, 255, 255};
8084 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)
__b,
8085 (vector
int)
__a, __d);
8087 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)
__a,
8094#ifdef __LITTLE_ENDIAN__
8095 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8096 255, 255, 255, 255, 255, 255, 255, 255};
8098 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)
__b,
8099 (vector
int)
__a, __d);
8101 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)
__a,
8108 vector
unsigned char __c) {
8109#ifdef __LITTLE_ENDIAN__
8110 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8111 255, 255, 255, 255, 255, 255, 255, 255};
8113 return (vector
float)__builtin_altivec_vperm_4si((vector
int)
__b,
8114 (vector
int)
__a, __d);
8116 return (vector
float)__builtin_altivec_vperm_4si((vector
int)
__a,
8123vec_perm(vector
signed long long __a, vector
signed long long __b,
8124 vector
unsigned char __c) {
8125#ifdef __LITTLE_ENDIAN__
8126 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8127 255, 255, 255, 255, 255, 255, 255, 255};
8129 return (vector
signed long long)__builtin_altivec_vperm_4si(
8130 (vector
int)
__b, (vector
int)
__a, __d);
8132 return (vector
signed long long)__builtin_altivec_vperm_4si(
8137static __inline__ vector
unsigned long long __ATTRS_o_ai
8138vec_perm(vector
unsigned long long __a, vector
unsigned long long __b,
8139 vector
unsigned char __c) {
8140#ifdef __LITTLE_ENDIAN__
8141 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8142 255, 255, 255, 255, 255, 255, 255, 255};
8144 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
8145 (vector
int)
__b, (vector
int)
__a, __d);
8147 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
8154 vector
unsigned char __c) {
8155#ifdef __LITTLE_ENDIAN__
8156 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8157 255, 255, 255, 255, 255, 255, 255, 255};
8159 return (vector
bool long long)__builtin_altivec_vperm_4si(
8160 (vector
int)
__b, (vector
int)
__a, __d);
8162 return (vector
bool long long)__builtin_altivec_vperm_4si(
8169#ifdef __LITTLE_ENDIAN__
8170 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8171 255, 255, 255, 255, 255, 255, 255, 255};
8173 return (vector
double)__builtin_altivec_vperm_4si((vector
int)
__b,
8174 (vector
int)
__a, __d);
8176 return (vector
double)__builtin_altivec_vperm_4si((vector
int)
__a,
8185 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8191 vector
unsigned char __c) {
8196 vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
8207 vector
unsigned char __c) {
8212 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
8223 vector
unsigned char __c) {
8229 vector
unsigned char __c) {
8245 vector
long long __a, vector
long long __b, vector
unsigned char __c) {
8249static __inline__ vector
unsigned long long __ATTRS_o_ai
8250vec_vperm(vector
unsigned long long __a, vector
unsigned long long __b,
8251 vector
unsigned char __c) {
8265 return __builtin_vsx_xvresp(
__a);
8267 return __builtin_altivec_vrefp(
__a);
8273 return __builtin_vsx_xvredp(
__a);
8279static __inline__ vector
float __attribute__((__always_inline__))
8280vec_vrefp(vector
float __a) {
8281 return __builtin_altivec_vrefp(
__a);
8288 return (vector
signed char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8293 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8297 vector
unsigned short __b) {
8298 return __builtin_altivec_vrlh(
__a,
__b);
8303 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)
__a,
__b);
8307 vector
unsigned int __b) {
8308 return __builtin_altivec_vrlw(
__a,
__b);
8313 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)
__a,
__b);
8316#ifdef __POWER8_VECTOR__
8318vec_rl(vector
signed long long __a, vector
unsigned long long __b) {
8319 return __builtin_altivec_vrld(
__a,
__b);
8322static __inline__ vector
unsigned long long __ATTRS_o_ai
8323vec_rl(vector
unsigned long long __a, vector
unsigned long long __b) {
8324 return (vector
unsigned long long)__builtin_altivec_vrld(
8325 (vector
long long)
__a,
__b);
8329#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8331vec_rl(vector
signed __int128
__a, vector
unsigned __int128
__b) {
8332 return (vector
signed __int128)(((vector
unsigned __int128)
__b
8333 << (vector
unsigned __int128)
__a) |
8334 ((vector
unsigned __int128)
__b >>
8336 sizeof(vector
unsigned __int128)) -
8337 (vector
unsigned __int128)
__a)));
8341vec_rl(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
8342 return (
__b <<
__a)|(
__b >> ((__CHAR_BIT__ *
sizeof(vector
unsigned __int128)) -
__a));
8347#ifdef __POWER9_VECTOR__
8349vec_rlmi(vector
unsigned int __a, vector
unsigned int __b,
8350 vector
unsigned int __c) {
8351 return __builtin_altivec_vrlwmi(
__a,
__c,
__b);
8354static __inline__ vector
unsigned long long __ATTRS_o_ai
8355vec_rlmi(vector
unsigned long long __a, vector
unsigned long long __b,
8356 vector
unsigned long long __c) {
8357 return __builtin_altivec_vrldmi(
__a,
__c,
__b);
8361#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8363vec_rlmi(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
8364 vector
unsigned __int128
__c) {
8365 return __builtin_altivec_vrlqmi(
__a,
__c,
__b);
8369vec_rlmi(vector
signed __int128
__a, vector
signed __int128
__b,
8370 vector
signed __int128
__c) {
8371 return (vector
signed __int128)__builtin_altivec_vrlqmi(
8372 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__c,
8373 (vector
unsigned __int128)
__b);
8378#ifdef __POWER9_VECTOR__
8380vec_rlnm(vector
unsigned int __a, vector
unsigned int __b,
8381 vector
unsigned int __c) {
8382 vector
unsigned int OneByte = { 0x8, 0x8, 0x8, 0x8 };
8383 return __builtin_altivec_vrlwnm(
__a, ((
__c << OneByte) |
__b));
8386static __inline__ vector
unsigned long long __ATTRS_o_ai
8387vec_rlnm(vector
unsigned long long __a, vector
unsigned long long __b,
8388 vector
unsigned long long __c) {
8389 vector
unsigned long long OneByte = { 0x8, 0x8 };
8390 return __builtin_altivec_vrldnm(
__a, ((
__c << OneByte) |
__b));
8394#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8396vec_rlnm(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
8397 vector
unsigned __int128
__c) {
8399 vector
unsigned char TmpB = (vector
unsigned char)
__b;
8400 vector
unsigned char TmpC = (vector
unsigned char)
__c;
8401 vector
unsigned char MaskAndShift =
8402#ifdef __LITTLE_ENDIAN__
8403 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, -1, -1, -1, 16, 0,
8404 1, -1, -1, -1, -1, -1);
8406 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1,
8407 -1, -1, -1, -1, -1, -1, -1);
8409 return __builtin_altivec_vrlqnm(
__a, (vector
unsigned __int128) MaskAndShift);
8413vec_rlnm(vector
signed __int128
__a, vector
signed __int128
__b,
8414 vector
signed __int128
__c) {
8416 vector
unsigned char TmpB = (vector
unsigned char)
__b;
8417 vector
unsigned char TmpC = (vector
unsigned char)
__c;
8418 vector
unsigned char MaskAndShift =
8419#ifdef __LITTLE_ENDIAN__
8420 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, -1, -1, -1, 16, 0,
8421 1, -1, -1, -1, -1, -1);
8423 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1,
8424 -1, -1, -1, -1, -1, -1, -1);
8426 return (vector
signed __int128)__builtin_altivec_vrlqnm(
8427 (vector
unsigned __int128)
__a, (vector
unsigned __int128)MaskAndShift);
8435 return (vector
signed char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8440 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8447 return __builtin_altivec_vrlh(
__a,
__b);
8452 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)
__a,
__b);
8458 vector
unsigned int __b) {
8459 return __builtin_altivec_vrlw(
__a,
__b);
8464 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)
__a,
__b);
8470 return __builtin_altivec_vrfin(
__a);
8474#ifdef __XL_COMPAT_ALTIVEC__
8475static __inline__ vector
double __ATTRS_o_ai vec_rint(vector
double __a);
8477 double __fpscr = __builtin_readflm();
8478 __builtin_setrnd(0);
8479 vector
double __rounded = vec_rint(
__a);
8480 __builtin_setflm(__fpscr);
8485 return __builtin_vsx_xvrdpi(
__a);
8491static __inline__ vector
float __ATTRS_o_ai vec_rint(vector
float __a) {
8492 return __builtin_vsx_xvrspic(
__a);
8495static __inline__ vector
double __ATTRS_o_ai vec_rint(vector
double __a) {
8496 return __builtin_vsx_xvrdpic(
__a);
8501static __inline__ vector
float __ATTRS_o_ai vec_roundc(vector
float __a) {
8502 return __builtin_vsx_xvrspic(
__a);
8505static __inline__ vector
double __ATTRS_o_ai vec_roundc(vector
double __a) {
8506 return __builtin_vsx_xvrdpic(
__a);
8511static __inline__ vector
float __ATTRS_o_ai vec_nearbyint(vector
float __a) {
8512 return __builtin_vsx_xvrspi(
__a);
8515static __inline__ vector
double __ATTRS_o_ai vec_nearbyint(vector
double __a) {
8516 return __builtin_vsx_xvrdpi(
__a);
8522static __inline__ vector
float __attribute__((__always_inline__))
8523vec_vrfin(vector
float __a) {
8524 return __builtin_altivec_vrfin(
__a);
8530static __inline__ vector
float __ATTRS_o_ai vec_sqrt(vector
float __a) {
8531 return __builtin_vsx_xvsqrtsp(
__a);
8534static __inline__ vector
double __ATTRS_o_ai vec_sqrt(vector
double __a) {
8535 return __builtin_vsx_xvsqrtdp(
__a);
8543 return __builtin_vsx_xvrsqrtesp(
__a);
8545 return __builtin_altivec_vrsqrtefp(
__a);
8551 return __builtin_vsx_xvrsqrtedp(
__a);
8556 return __builtin_ppc_rsqrtf(
__a);
8561 return __builtin_ppc_rsqrtd(
__a);
8567static __inline__ __vector
float __attribute__((__always_inline__))
8568vec_vrsqrtefp(vector
float __a) {
8569 return __builtin_altivec_vrsqrtefp(
__a);
8575static __inline__
int __ATTRS_o_ai vec_test_swsqrt(vector
double __a) {
8576 return __builtin_vsx_xvtsqrtdp(
__a);
8579static __inline__
int __ATTRS_o_ai vec_test_swsqrts(vector
float __a) {
8580 return __builtin_vsx_xvtsqrtsp(
__a);
8586#define __builtin_altivec_vsel_4si vec_sel
8589 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8590 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8595 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8600 vector
unsigned char __c) {
8605 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
8606 return (
__a & ~(vector
unsigned char)
__c) | (
__b & (vector
unsigned char)
__c);
8611 return (
__a & ~(vector
bool char)
__c) | (
__b & (vector
bool char)
__c);
8615 vector
bool char __b,
8616 vector
bool char __c) {
8622 vector
unsigned short __c) {
8623 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8628 vector
bool short __c) {
8629 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8634 vector
unsigned short __c) {
8640 vector
bool short __c) {
8641 return (
__a & ~(vector
unsigned short)
__c) |
8642 (
__b & (vector
unsigned short)
__c);
8646 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
8647 return (
__a & ~(vector
bool short)
__c) | (
__b & (vector
bool short)
__c);
8657 vector
unsigned int __c) {
8663 vector
bool int __c) {
8668 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
8674 return (
__a & ~(vector
unsigned int)
__c) | (
__b & (vector
unsigned int)
__c);
8683 vector
bool int __b,
8684 vector
bool int __c) {
8690 vector
unsigned int __c) {
8691 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8693 return (vector
float)__res;
8698 vector
bool int __c) {
8699 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8701 return (vector
float)__res;
8707 vector
long long __res = ((vector
long long)
__a & ~(vector
long long)
__c) |
8708 ((vector
long long)
__b & (vector
long long)
__c);
8709 return (vector
double)__res;
8713vec_sel(vector
double __a, vector
double __b, vector
unsigned long long __c) {
8714 vector
long long __res = ((vector
long long)
__a & ~(vector
long long)
__c) |
8715 ((vector
long long)
__b & (vector
long long)
__c);
8716 return (vector
double)__res;
8720vec_sel(vector
bool long long __a, vector
bool long long __b,
8721 vector
bool long long __c) {
8726vec_sel(vector
bool long long __a, vector
bool long long __b,
8727 vector
unsigned long long __c) {
8728 return (
__a & ~(vector
bool long long)
__c) |
8729 (
__b & (vector
bool long long)
__c);
8733vec_sel(vector
signed long long __a, vector
signed long long __b,
8734 vector
bool long long __c) {
8735 return (
__a & ~(vector
signed long long)
__c) |
8736 (
__b & (vector
signed long long)
__c);
8740vec_sel(vector
signed long long __a, vector
signed long long __b,
8741 vector
unsigned long long __c) {
8742 return (
__a & ~(vector
signed long long)
__c) |
8743 (
__b & (vector
signed long long)
__c);
8746static __inline__ vector
unsigned long long __ATTRS_o_ai
8747vec_sel(vector
unsigned long long __a, vector
unsigned long long __b,
8748 vector
bool long long __c) {
8749 return (
__a & ~(vector
unsigned long long)
__c) |
8750 (
__b & (vector
unsigned long long)
__c);
8753static __inline__ vector
unsigned long long __ATTRS_o_ai
8754vec_sel(vector
unsigned long long __a, vector
unsigned long long __b,
8755 vector
unsigned long long __c) {
8763 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8764 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8769 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8774 vector
unsigned char __c) {
8779 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
8780 return (
__a & ~(vector
unsigned char)
__c) | (
__b & (vector
unsigned char)
__c);
8785 return (
__a & ~(vector
bool char)
__c) | (
__b & (vector
bool char)
__c);
8789 vector
bool char __b,
8790 vector
bool char __c) {
8796 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8801 vector
bool short __c) {
8802 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8807 vector
unsigned short __c) {
8813 vector
bool short __c) {
8814 return (
__a & ~(vector
unsigned short)
__c) |
8815 (
__b & (vector
unsigned short)
__c);
8819 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
8820 return (
__a & ~(vector
bool short)
__c) | (
__b & (vector
bool short)
__c);
8830 vector
unsigned int __c) {
8836 vector
bool int __c) {
8841 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
8846 vector
unsigned int __a, vector
unsigned int __b, vector
bool int __c) {
8847 return (
__a & ~(vector
unsigned int)
__c) | (
__b & (vector
unsigned int)
__c);
8856 vector
bool int __b,
8857 vector
bool int __c) {
8863 vector
unsigned int __c) {
8864 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8866 return (vector
float)__res;
8871 vector
bool int __c) {
8872 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8874 return (vector
float)__res;
8884 (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
8889 return (vector
signed char)
vec_sl((vector
unsigned char)
__a,
__b);
8894 return __a << (
__b % (vector
unsigned short)(
sizeof(
unsigned short) *
8899 vector
unsigned short __b) {
8900 return (vector
short)
vec_sl((vector
unsigned short)
__a,
__b);
8906 (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
8910 vector
unsigned int __b) {
8911 return (vector
int)
vec_sl((vector
unsigned int)
__a,
__b);
8914#ifdef __POWER8_VECTOR__
8915static __inline__ vector
unsigned long long __ATTRS_o_ai
8916vec_sl(vector
unsigned long long __a, vector
unsigned long long __b) {
8917 return __a << (
__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
8922vec_sl(vector
long long __a, vector
unsigned long long __b) {
8923 return (vector
long long)
vec_sl((vector
unsigned long long)
__a,
__b);
8925#elif defined(__VSX__)
8928static __inline__ vector
unsigned long long __ATTRS_o_ai
8929vec_sl(vector
unsigned long long __a, vector
unsigned long long __b) {
8930 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
8935 vector
signed long long __rightelt =
8936 (vector
signed long long)__builtin_altivec_vslo((vector
signed int)
__a,
8938#ifdef __LITTLE_ENDIAN__
8939 __rightelt = (vector
signed long long)__builtin_altivec_vsl(
8940 (vector
signed int)__rightelt,
8943 __rightelt = (vector
signed long long)__builtin_altivec_vsl(
8944 (vector
signed int)__rightelt,
8947 __a = __builtin_shufflevector(
__a,
__a, 1, 0);
8948 __b = __builtin_shufflevector(
__b,
__b, 1, 0);
8949 vector
signed long long __leftelt =
8950 (vector
signed long long)__builtin_altivec_vslo((vector
signed int)
__a,
8952#ifdef __LITTLE_ENDIAN__
8953 __leftelt = (vector
signed long long)__builtin_altivec_vsl(
8954 (vector
signed int)__leftelt,
8956 return (vector
unsigned long long)__builtin_shufflevector(__rightelt,
8959 __leftelt = (vector
signed long long)__builtin_altivec_vsl(
8960 (vector
signed int)__leftelt,
8962 return (vector
unsigned long long)__builtin_shufflevector(__leftelt,
8968vec_sl(vector
long long __a, vector
unsigned long long __b) {
8969 return (vector
long long)
vec_sl((vector
unsigned long long)
__a,
__b);
8975#define __builtin_altivec_vslb vec_vslb
8989#define __builtin_altivec_vslh vec_vslh
9003#define __builtin_altivec_vslw vec_vslw
9006 vector
unsigned int __b) {
9017#define __builtin_altivec_vsldoi_4si vec_sld
9020 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
9021 unsigned char __d =
__c & 0x0F;
9022#ifdef __LITTLE_ENDIAN__
9024 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9025 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9026 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9027 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9031 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9032 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9033 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9039 unsigned const int __c) {
9040 unsigned char __d =
__c & 0x0F;
9041#ifdef __LITTLE_ENDIAN__
9043 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9044 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9045 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9046 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9050 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9051 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9052 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9058 unsigned char __d =
__c & 0x0F;
9059#ifdef __LITTLE_ENDIAN__
9061 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9062 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9063 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9064 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9068 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9069 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9070 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9075 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
9076 unsigned char __d =
__c & 0x0F;
9077#ifdef __LITTLE_ENDIAN__
9079 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9080 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9081 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9082 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9086 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9087 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9088 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9094 unsigned const int __c) {
9095 unsigned char __d =
__c & 0x0F;
9096#ifdef __LITTLE_ENDIAN__
9098 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9099 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9100 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9101 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9105 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9106 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9107 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9113 unsigned char __d =
__c & 0x0F;
9114#ifdef __LITTLE_ENDIAN__
9116 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9117 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9118 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9119 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9123 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9124 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9125 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9131 unsigned const int __c) {
9132 unsigned char __d =
__c & 0x0F;
9133#ifdef __LITTLE_ENDIAN__
9135 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9136 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9137 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9138 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9142 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9143 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9144 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9150 unsigned char __d =
__c & 0x0F;
9151#ifdef __LITTLE_ENDIAN__
9153 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9154 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9155 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9156 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9160 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9161 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9162 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9167 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
9168 unsigned char __d =
__c & 0x0F;
9169#ifdef __LITTLE_ENDIAN__
9171 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9172 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9173 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9174 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9178 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9179 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9180 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9185 vector
bool int __b,
9186 unsigned const int __c) {
9187 unsigned char __d =
__c & 0x0F;
9188#ifdef __LITTLE_ENDIAN__
9190 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9191 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9192 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9193 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9197 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9198 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9199 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9205 unsigned const int __c) {
9206 unsigned char __d =
__c & 0x0F;
9207#ifdef __LITTLE_ENDIAN__
9209 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9210 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9211 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9212 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9216 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9217 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9218 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9224vec_sld(vector
bool long long __a, vector
bool long long __b,
9225 unsigned const int __c) {
9226 unsigned char __d =
__c & 0x0F;
9227#ifdef __LITTLE_ENDIAN__
9229 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9230 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9231 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9232 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9236 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9237 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9238 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9243vec_sld(vector
signed long long __a, vector
signed long long __b,
9244 unsigned const int __c) {
9245 unsigned char __d =
__c & 0x0F;
9246#ifdef __LITTLE_ENDIAN__
9248 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9249 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9250 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9251 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9255 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9256 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9257 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9261static __inline__ vector
unsigned long long __ATTRS_o_ai
9262vec_sld(vector
unsigned long long __a, vector
unsigned long long __b,
9263 unsigned const int __c) {
9264 unsigned char __d =
__c & 0x0F;
9265#ifdef __LITTLE_ENDIAN__
9267 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9268 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9269 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9270 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9274 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9275 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9276 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9282 unsigned const int __c) {
9283 unsigned char __d =
__c & 0x0F;
9284#ifdef __LITTLE_ENDIAN__
9286 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9287 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9288 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9289 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9293 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9294 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9295 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9302 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
9308 unsigned const int __c) {
9313 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
9319 unsigned const int __c) {
9329 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
9334 vector
float __a, vector
float __b,
unsigned const int __c) {
9340vec_sldw(vector
signed long long __a, vector
signed long long __b,
9341 unsigned const int __c) {
9345static __inline__ vector
unsigned long long __ATTRS_o_ai
9346vec_sldw(vector
unsigned long long __a, vector
unsigned long long __b,
9347 unsigned const int __c) {
9352 vector
double __a, vector
double __b,
unsigned const int __c) {
9357#ifdef __POWER9_VECTOR__
9360vec_slv(vector
unsigned char __a, vector
unsigned char __b) {
9361 return __builtin_altivec_vslv(
__a,
__b);
9366vec_srv(vector
unsigned char __a, vector
unsigned char __b) {
9367 return __builtin_altivec_vsrv(
__a,
__b);
9375 unsigned char __d =
__c & 0x0F;
9376#ifdef __LITTLE_ENDIAN__
9378 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9379 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9380 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9381 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9385 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9386 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9387 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9392 vector
unsigned char __a, vector
unsigned char __b,
unsigned char __c) {
9393 unsigned char __d =
__c & 0x0F;
9394#ifdef __LITTLE_ENDIAN__
9396 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9397 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9398 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9399 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9403 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9404 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9405 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9411 unsigned char __c) {
9412 unsigned char __d =
__c & 0x0F;
9413#ifdef __LITTLE_ENDIAN__
9415 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9416 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9417 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9418 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9422 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9423 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9424 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9429 vector
unsigned short __a, vector
unsigned short __b,
unsigned char __c) {
9430 unsigned char __d =
__c & 0x0F;
9431#ifdef __LITTLE_ENDIAN__
9433 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9434 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9435 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9436 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9440 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9441 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9442 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9448 unsigned char __c) {
9449 unsigned char __d =
__c & 0x0F;
9450#ifdef __LITTLE_ENDIAN__
9452 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9453 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9454 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9455 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9459 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9460 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9461 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9467 unsigned char __c) {
9468 unsigned char __d =
__c & 0x0F;
9469#ifdef __LITTLE_ENDIAN__
9471 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9472 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9473 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9474 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9478 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9479 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9480 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9485 vector
unsigned int __a, vector
unsigned int __b,
unsigned char __c) {
9486 unsigned char __d =
__c & 0x0F;
9487#ifdef __LITTLE_ENDIAN__
9489 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9490 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9491 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9492 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9496 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9497 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9498 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9504 unsigned char __c) {
9505 unsigned char __d =
__c & 0x0F;
9506#ifdef __LITTLE_ENDIAN__
9508 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9509 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9510 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9511 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9515 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9516 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9517 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9525 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9531 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9537 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9543 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9549 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9555 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9561 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9567 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9573 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9578 vector
unsigned char __b) {
9579 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9583 vector
unsigned short __b) {
9584 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9588 vector
unsigned int __b) {
9589 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9594 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9600 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9606 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9612 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9618 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9624 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9629 vector
unsigned char __b) {
9630 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9634 vector
unsigned short __b) {
9635 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9639 vector
unsigned int __b) {
9640 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9644 vector
unsigned char __b) {
9645 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9649 vector
unsigned short __b) {
9650 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9654 vector
unsigned int __b) {
9655 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9660 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9666 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9672 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9678 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9684 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9690 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9696vec_sll(vector
signed long long __a, vector
unsigned char __b) {
9697 return (vector
signed long long)__builtin_altivec_vsl((vector
int)
__a,
9701static __inline__ vector
unsigned long long __ATTRS_o_ai
9702vec_sll(vector
unsigned long long __a, vector
unsigned char __b) {
9703 return (vector
unsigned long long)__builtin_altivec_vsl((vector
int)
__a,
9712 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9718 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9724 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9730 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9736 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9742 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9748 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9754 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9760 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9765 vector
unsigned char __b) {
9766 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9770 vector
unsigned short __b) {
9771 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9775 vector
unsigned int __b) {
9776 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9781 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9787 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9793 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9799 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9805 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9811 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9816 vector
unsigned char __b) {
9817 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9821 vector
unsigned short __b) {
9822 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9826 vector
unsigned int __b) {
9827 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9831 vector
unsigned char __b) {
9832 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9836 vector
unsigned short __b) {
9837 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9841 vector
unsigned int __b) {
9842 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9847 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9853 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9859 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9865 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9871 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9877 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9885 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
9891 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
9897 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
9903 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
9908 vector
signed char __b) {
9909 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9913 vector
unsigned char __b) {
9914 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9919 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
9925 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
9930 vector
signed char __b) {
9931 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9935 vector
unsigned char __b) {
9936 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9940 vector
signed char __b) {
9941 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
9945 vector
unsigned char __b) {
9946 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
9951 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
9957 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
9962 vector
signed char __b) {
9963 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9967 vector
unsigned char __b) {
9968 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9973vec_slo(vector
signed long long __a, vector
signed char __b) {
9974 return (vector
signed long long)__builtin_altivec_vslo((vector
int)
__a,
9979vec_slo(vector
signed long long __a, vector
unsigned char __b) {
9980 return (vector
signed long long)__builtin_altivec_vslo((vector
int)
__a,
9984static __inline__ vector
unsigned long long __ATTRS_o_ai
9985vec_slo(vector
unsigned long long __a, vector
signed char __b) {
9986 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)
__a,
9990static __inline__ vector
unsigned long long __ATTRS_o_ai
9991vec_slo(vector
unsigned long long __a, vector
unsigned char __b) {
9992 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)
__a,
10001 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
10007 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
10013 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
10019 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
10024 vector
signed char __b) {
10025 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10029 vector
unsigned char __b) {
10030 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10035 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
10041 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
10046 vector
signed char __b) {
10047 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10051 vector
unsigned char __b) {
10052 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10056 vector
signed char __b) {
10057 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
10061 vector
unsigned char __b) {
10062 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
10067 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
10073 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
10078 vector
signed char __b) {
10079 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10083 vector
unsigned char __b) {
10084 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10106 unsigned char b0 = (
__b & 0x07) * 2;
10107 unsigned char b1 = b0 + 1;
10109 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10110 b0, b1, b0, b1, b0, b1));
10115 unsigned char b0 = (
__b & 0x07) * 2;
10116 unsigned char b1 = b0 + 1;
10118 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10119 b0, b1, b0, b1, b0, b1));
10124 unsigned char b0 = (
__b & 0x07) * 2;
10125 unsigned char b1 = b0 + 1;
10127 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10128 b0, b1, b0, b1, b0, b1));
10132 unsigned const int __b) {
10133 unsigned char b0 = (
__b & 0x07) * 2;
10134 unsigned char b1 = b0 + 1;
10136 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10137 b0, b1, b0, b1, b0, b1));
10142 unsigned char b0 = (
__b & 0x03) * 4;
10143 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10145 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10146 b2, b3, b0, b1, b2, b3));
10151 unsigned char b0 = (
__b & 0x03) * 4;
10152 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10154 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10155 b2, b3, b0, b1, b2, b3));
10160 unsigned char b0 = (
__b & 0x03) * 4;
10161 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10163 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10164 b2, b3, b0, b1, b2, b3));
10168 unsigned const int __b) {
10169 unsigned char b0 = (
__b & 0x03) * 4;
10170 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10172 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10173 b2, b3, b0, b1, b2, b3));
10178 unsigned const int __b) {
10179 unsigned char b0 = (
__b & 0x01) * 8;
10180 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10181 b6 = b0 + 6, b7 = b0 + 7;
10183 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10184 b2, b3, b4, b5, b6, b7));
10188 unsigned char b0 = (
__b & 0x01) * 8;
10189 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10190 b6 = b0 + 6, b7 = b0 + 7;
10192 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10193 b2, b3, b4, b5, b6, b7));
10197 unsigned char b0 = (
__b & 0x01) * 8;
10198 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10199 b6 = b0 + 6, b7 = b0 + 7;
10201 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10202 b2, b3, b4, b5, b6, b7));
10204static __inline__ vector
unsigned long long __ATTRS_o_ai
10206 unsigned char b0 = (
__b & 0x01) * 8;
10207 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10208 b6 = b0 + 6, b7 = b0 + 7;
10210 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10211 b2, b3, b4, b5, b6, b7));
10217#define __builtin_altivec_vspltb vec_vspltb
10230 unsigned char __b) {
10236#define __builtin_altivec_vsplth vec_vsplth
10239 unsigned char __b) {
10241 unsigned char b1 =
__b + 1;
10243 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10250 unsigned char b1 =
__b + 1;
10252 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10259 unsigned char b1 =
__b + 1;
10261 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10266 unsigned char __b) {
10268 unsigned char b1 =
__b + 1;
10270 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10276#define __builtin_altivec_vspltw vec_vspltw
10279 unsigned char __b) {
10281 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10283 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10284 b1, b2, b3,
__b, b1, b2, b3));
10290 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10292 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10293 b1, b2, b3,
__b, b1, b2, b3));
10297 unsigned char __b) {
10299 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10301 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10302 b1, b2, b3,
__b, b1, b2, b3));
10306 unsigned char __b) {
10308 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10310 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10311 b1, b2, b3,
__b, b1, b2, b3));
10316#define __builtin_altivec_vspltisb vec_splat_s8
10321 return (vector
signed char)(
__a);
10329 return (vector
signed char)(
__a);
10334#define __builtin_altivec_vspltish vec_splat_s16
10338 return (vector
short)(
__a);
10345 return (vector
short)(
__a);
10350#define __builtin_altivec_vspltisw vec_splat_s32
10354 return (vector
int)(
__a);
10361 return (vector
int)(
__a);
10369 return (vector
unsigned char)(
__a);
10377 return (vector
unsigned short)(
__a);
10385 return (vector
unsigned int)(
__a);
10395 (
__b % (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
10400 return (vector
signed char)
vec_sr((vector
unsigned char)
__a,
__b);
10406 (
__b % (vector
unsigned short)(
sizeof(
unsigned short) * __CHAR_BIT__));
10410 vector
unsigned short __b) {
10411 return (vector
short)
vec_sr((vector
unsigned short)
__a,
__b);
10417 (
__b % (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
10421 vector
unsigned int __b) {
10422 return (vector
int)
vec_sr((vector
unsigned int)
__a,
__b);
10425#ifdef __POWER8_VECTOR__
10426static __inline__ vector
unsigned long long __ATTRS_o_ai
10427vec_sr(vector
unsigned long long __a, vector
unsigned long long __b) {
10428 return __a >> (
__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
10433vec_sr(vector
long long __a, vector
unsigned long long __b) {
10434 return (vector
long long)
vec_sr((vector
unsigned long long)
__a,
__b);
10436#elif defined(__VSX__)
10437static __inline__ vector
unsigned long long __ATTRS_o_ai
10438vec_sr(vector
unsigned long long __a, vector
unsigned long long __b) {
10439 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10445 vector
unsigned long long __swapshift =
10446 __builtin_shufflevector(
__b,
__b, 1, 0);
10447 vector
unsigned long long __leftelt =
10448 (vector
unsigned long long)__builtin_altivec_vsro(
10449 (vector
signed int)
__a, (vector
signed int)__swapshift);
10450#ifdef __LITTLE_ENDIAN__
10451 __leftelt = (vector
unsigned long long)__builtin_altivec_vsr(
10452 (vector
signed int)__leftelt,
10453 (vector
signed int)
vec_vspltb((vector
unsigned char)__swapshift, 0));
10455 __leftelt = (vector
unsigned long long)__builtin_altivec_vsr(
10456 (vector
signed int)__leftelt,
10457 (vector
signed int)
vec_vspltb((vector
unsigned char)__swapshift, 15));
10459 __a = __builtin_shufflevector(
__a,
__a, 1, 0);
10460 vector
unsigned long long __rightelt =
10461 (vector
unsigned long long)__builtin_altivec_vsro((vector
signed int)
__a,
10462 (vector
signed int)
__b);
10463#ifdef __LITTLE_ENDIAN__
10464 __rightelt = (vector
unsigned long long)__builtin_altivec_vsr(
10465 (vector
signed int)__rightelt,
10467 return __builtin_shufflevector(__rightelt, __leftelt, 1, 3);
10469 __rightelt = (vector
unsigned long long)__builtin_altivec_vsr(
10470 (vector
signed int)__rightelt,
10472 return __builtin_shufflevector(__leftelt, __rightelt, 0, 2);
10477vec_sr(vector
long long __a, vector
unsigned long long __b) {
10478 return (vector
long long)
vec_sr((vector
unsigned long long)
__a,
__b);
10484#define __builtin_altivec_vsrb vec_vsrb
10498#define __builtin_altivec_vsrh vec_vsrh
10512#define __builtin_altivec_vsrw vec_vsrw
10515 vector
unsigned int __b) {
10528 return (vector
signed char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10533 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10537 vector
unsigned short __b) {
10538 return __builtin_altivec_vsrah(
__a, (vector
unsigned short)
__b);
10543 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)
__a,
__b);
10547 vector
unsigned int __b) {
10548 return __builtin_altivec_vsraw(
__a,
__b);
10553 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)
__a,
__b);
10556#ifdef __POWER8_VECTOR__
10558vec_sra(vector
signed long long __a, vector
unsigned long long __b) {
10562static __inline__ vector
unsigned long long __ATTRS_o_ai
10563vec_sra(vector
unsigned long long __a, vector
unsigned long long __b) {
10564 return (vector
unsigned long long)((vector
signed long long)
__a >>
__b);
10566#elif defined(__VSX__)
10568vec_sra(vector
signed long long __a, vector
unsigned long long __b) {
10569 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10573static __inline__ vector
unsigned long long __ATTRS_o_ai
10574vec_sra(vector
unsigned long long __a, vector
unsigned long long __b) {
10575 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10576 return (vector
unsigned long long)((vector
signed long long)
__a >>
__b);
10584 return (vector
signed char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10589 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10596 return __builtin_altivec_vsrah(
__a, (vector
unsigned short)
__b);
10601 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)
__a,
__b);
10607 vector
unsigned int __b) {
10608 return __builtin_altivec_vsraw(
__a,
__b);
10613 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)
__a,
__b);
10620 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10626 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10632 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10638 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10644 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10650 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10656 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10662 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10668 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10673 vector
unsigned char __b) {
10674 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10678 vector
unsigned short __b) {
10679 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10683 vector
unsigned int __b) {
10684 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10689 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10695 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10701 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10707 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10713 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10719 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10724 vector
unsigned char __b) {
10725 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10729 vector
unsigned short __b) {
10730 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10734 vector
unsigned int __b) {
10735 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10739 vector
unsigned char __b) {
10740 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10744 vector
unsigned short __b) {
10745 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10749 vector
unsigned int __b) {
10750 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10755 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10761 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10767 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10773 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10779 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10785 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10791vec_srl(vector
signed long long __a, vector
unsigned char __b) {
10792 return (vector
signed long long)__builtin_altivec_vsr((vector
int)
__a,
10796static __inline__ vector
unsigned long long __ATTRS_o_ai
10797vec_srl(vector
unsigned long long __a, vector
unsigned char __b) {
10798 return (vector
unsigned long long)__builtin_altivec_vsr((vector
int)
__a,
10807 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10813 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10819 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10825 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10831 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10837 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10843 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10849 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10855 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10860 vector
unsigned char __b) {
10861 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10865 vector
unsigned short __b) {
10866 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10870 vector
unsigned int __b) {
10871 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10876 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10882 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10888 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10894 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10900 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10906 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10911 vector
unsigned char __b) {
10912 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10916 vector
unsigned short __b) {
10917 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10921 vector
unsigned int __b) {
10922 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10926 vector
unsigned char __b) {
10927 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10931 vector
unsigned short __b) {
10932 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10936 vector
unsigned int __b) {
10937 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10942 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10948 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10954 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10960 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10966 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10972 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10980 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
10986 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
10992 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
10998 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11003 vector
signed char __b) {
11004 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11008 vector
unsigned char __b) {
11009 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11014 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11020 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11025 vector
signed char __b) {
11026 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11030 vector
unsigned char __b) {
11031 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11035 vector
signed char __b) {
11036 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11040 vector
unsigned char __b) {
11041 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11046 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11052 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11057 vector
signed char __b) {
11058 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11062 vector
unsigned char __b) {
11063 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11068vec_sro(vector
signed long long __a, vector
signed char __b) {
11069 return (vector
signed long long)__builtin_altivec_vsro((vector
int)
__a,
11074vec_sro(vector
signed long long __a, vector
unsigned char __b) {
11075 return (vector
signed long long)__builtin_altivec_vsro((vector
int)
__a,
11079static __inline__ vector
unsigned long long __ATTRS_o_ai
11080vec_sro(vector
unsigned long long __a, vector
signed char __b) {
11081 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)
__a,
11085static __inline__ vector
unsigned long long __ATTRS_o_ai
11086vec_sro(vector
unsigned long long __a, vector
unsigned char __b) {
11087 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)
__a,
11096 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
11102 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
11108 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11114 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11119 vector
signed char __b) {
11120 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11124 vector
unsigned char __b) {
11125 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11130 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11136 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11141 vector
signed char __b) {
11142 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11146 vector
unsigned char __b) {
11147 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11151 vector
signed char __b) {
11152 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11156 vector
unsigned char __b) {
11157 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11162 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11168 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11173 vector
signed char __b) {
11174 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11178 vector
unsigned char __b) {
11179 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11185 vector
signed char *
__c) {
11186 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11190 signed char *
__c) {
11191 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11195 vector
unsigned char *
__c) {
11196 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11200 unsigned char *
__c) {
11201 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11205 signed char *
__c) {
11206 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11210 unsigned char *
__c) {
11211 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11215 vector
bool char *
__c) {
11216 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11220 vector
short *
__c) {
11221 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11226 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11230 vector
unsigned short *
__c) {
11231 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11235 unsigned short *
__c) {
11236 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11241 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11245 unsigned short *
__c) {
11246 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11250 vector
bool short *
__c) {
11251 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11256 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11260 unsigned short *
__c) {
11261 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11265 vector pixel *
__c) {
11266 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11279 vector
unsigned int *
__c) {
11280 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11284 unsigned int *
__c) {
11285 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11290 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11294 unsigned int *
__c) {
11295 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11299 vector
bool int *
__c) {
11300 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11304 vector
float *
__c) {
11305 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11310 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11316 vector
signed char *
__c) {
11317 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11321 signed char *
__c) {
11322 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11326 vector
unsigned char *
__c) {
11327 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11331 unsigned char *
__c) {
11332 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11336 signed char *
__c) {
11337 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11341 unsigned char *
__c) {
11342 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11346 vector
bool char *
__c) {
11347 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11351 vector
short *
__c) {
11352 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11357 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11361 vector
unsigned short *
__c) {
11362 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11366 unsigned short *
__c) {
11367 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11372 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11376 unsigned short *
__c) {
11377 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11381 vector
bool short *
__c) {
11382 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11387 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11391 unsigned short *
__c) {
11392 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11396 vector pixel *
__c) {
11397 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11411 vector
unsigned int *
__c) {
11412 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11416 unsigned int *
__c) {
11417 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11422 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11426 unsigned int *
__c) {
11427 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11431 vector
bool int *
__c) {
11432 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11436 vector
float *
__c) {
11437 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11442 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11448 signed char *
__c) {
11449 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11453 unsigned char *
__c) {
11454 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11458 signed char *
__c) {
11459 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11463 unsigned char *
__c) {
11464 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11469 __builtin_altivec_stvehx(
__a,
__b,
__c);
11473 unsigned short *
__c) {
11474 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11479 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11483 unsigned short *
__c) {
11484 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11489 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11493 unsigned short *
__c) {
11494 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11498 __builtin_altivec_stvewx(
__a,
__b,
__c);
11502 unsigned int *
__c) {
11503 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11508 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11512 unsigned int *
__c) {
11513 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11518 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11524 signed char *
__c) {
11525 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11529 long __b,
unsigned char *
__c) {
11530 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11534 signed char *
__c) {
11535 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11539 unsigned char *
__c) {
11540 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11547 __builtin_altivec_stvehx(
__a,
__b,
__c);
11551 long __b,
unsigned short *
__c) {
11552 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11557 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11561 unsigned short *
__c) {
11562 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11567 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11571 unsigned short *
__c) {
11572 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11579 __builtin_altivec_stvewx(
__a,
__b,
__c);
11583 unsigned int *
__c) {
11584 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11589 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11593 unsigned int *
__c) {
11594 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11599 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11605 vector
signed char *
__c) {
11606 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11610 signed char *
__c) {
11611 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11615 vector
unsigned char *
__c) {
11616 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11620 unsigned char *
__c) {
11621 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11625 signed char *
__c) {
11626 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11630 unsigned char *
__c) {
11631 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11635 vector
bool char *
__c) {
11636 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11640 vector
short *
__c) {
11641 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11646 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11650 vector
unsigned short *
__c) {
11651 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11655 unsigned short *
__c) {
11656 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11661 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11665 unsigned short *
__c) {
11666 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11670 vector
bool short *
__c) {
11671 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11676 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11680 unsigned short *
__c) {
11681 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11685 vector pixel *
__c) {
11686 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11691 __builtin_altivec_stvxl(
__a,
__b,
__c);
11695 __builtin_altivec_stvxl(
__a,
__b,
__c);
11699 vector
unsigned int *
__c) {
11700 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11704 unsigned int *
__c) {
11705 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11710 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11714 unsigned int *
__c) {
11715 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11719 vector
bool int *
__c) {
11720 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11724 vector
float *
__c) {
11725 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11730 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11736 vector
signed char *
__c) {
11737 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11741 signed char *
__c) {
11742 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11746 vector
unsigned char *
__c) {
11747 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11751 unsigned char *
__c) {
11752 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11756 signed char *
__c) {
11757 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11761 unsigned char *
__c) {
11762 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11766 vector
bool char *
__c) {
11767 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11771 vector
short *
__c) {
11772 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11777 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11782 vector
unsigned short *
__c) {
11783 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11787 int __b,
unsigned short *
__c) {
11788 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11793 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11797 unsigned short *
__c) {
11798 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11802 vector
bool short *
__c) {
11803 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11808 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11812 unsigned short *
__c) {
11813 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11817 vector pixel *
__c) {
11818 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11823 __builtin_altivec_stvxl(
__a,
__b,
__c);
11828 __builtin_altivec_stvxl(
__a,
__b,
__c);
11832 vector
unsigned int *
__c) {
11833 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11837 unsigned int *
__c) {
11838 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11843 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11847 unsigned int *
__c) {
11848 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11852 vector
bool int *
__c) {
11853 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11857 vector
float *
__c) {
11858 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11863 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11875 return (vector
signed char)
__a -
__b;
11880 return __a - (vector
signed char)
__b;
11890 return (vector
unsigned char)
__a -
__b;
11895 return __a - (vector
unsigned char)
__b;
11899 vector
short __b) {
11904 vector
short __b) {
11905 return (vector
short)
__a -
__b;
11909 vector
bool short __b) {
11910 return __a - (vector short)
__b;
11920 return (vector
unsigned short)
__a -
__b;
11925 return __a - (vector
unsigned short)
__b;
11935 return (vector
int)
__a -
__b;
11939 vector
bool int __b) {
11950 return (vector
unsigned int)
__a -
__b;
11958#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
11959 defined(__SIZEOF_INT128__)
11961vec_sub(vector
signed __int128
__a, vector
signed __int128
__b) {
11965static __inline__ vector
unsigned __int128
__ATTRS_o_ai
11966vec_sub(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
11974vec_sub(vector
signed long long __a, vector
signed long long __b) {
11978static __inline__ vector
unsigned long long __ATTRS_o_ai
11979vec_sub(vector
unsigned long long __a, vector
unsigned long long __b) {
11984 vector
double __b) {
11990 vector
float __b) {
11996#define __builtin_altivec_vsububm vec_vsububm
12005 return (vector
signed char)
__a -
__b;
12010 return __a - (vector
signed char)
__b;
12020 return (vector
unsigned char)
__a -
__b;
12025 return __a - (vector
unsigned char)
__b;
12030#define __builtin_altivec_vsubuhm vec_vsubuhm
12033 vector
short __b) {
12038 vector
short __b) {
12039 return (vector
short)
__a -
__b;
12043 vector
bool short __b) {
12044 return __a - (vector short)
__b;
12054 return (vector
unsigned short)
__a -
__b;
12059 return __a - (vector
unsigned short)
__b;
12064#define __builtin_altivec_vsubuwm vec_vsubuwm
12073 return (vector
int)
__a -
__b;
12077 vector
bool int __b) {
12088 return (vector
unsigned int)
__a -
__b;
12098#define __builtin_altivec_vsubfp vec_vsubfp
12100static __inline__ vector
float __attribute__((__always_inline__))
12101vec_vsubfp(vector
float __a, vector
float __b) {
12109 return (vector
signed int)__builtin_altivec_vsubcuw((vector
unsigned int)
__a,
12110 (vector
unsigned int)
__b);
12115 return __builtin_altivec_vsubcuw(
__a,
__b);
12118#ifdef __POWER8_VECTOR__
12119#ifdef __SIZEOF_INT128__
12120static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12121vec_subc(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12122 return __builtin_altivec_vsubcuq(
__a,
__b);
12126vec_subc(vector
signed __int128
__a, vector
signed __int128
__b) {
12127 return (vector
signed __int128)__builtin_altivec_vsubcuq(
12128 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
12132static __inline__ vector
unsigned char __attribute__((__always_inline__))
12133vec_subc_u128(vector
unsigned char __a, vector
unsigned char __b) {
12134 return (vector
unsigned char)__builtin_altivec_vsubcuq_c(
12135 (vector
unsigned char)
__a, (vector
unsigned char)
__b);
12141static __inline__ vector
unsigned int __attribute__((__always_inline__))
12142vec_vsubcuw(vector
unsigned int __a, vector
unsigned int __b) {
12143 return __builtin_altivec_vsubcuw(
__a,
__b);
12150 return __builtin_altivec_vsubsbs(
__a,
__b);
12155 return __builtin_altivec_vsubsbs((vector
signed char)
__a,
__b);
12160 return __builtin_altivec_vsubsbs(
__a, (vector
signed char)
__b);
12165 return __builtin_altivec_vsububs(
__a,
__b);
12170 return __builtin_altivec_vsububs((vector
unsigned char)
__a,
__b);
12175 return __builtin_altivec_vsububs(
__a, (vector
unsigned char)
__b);
12179 vector
short __b) {
12180 return __builtin_altivec_vsubshs(
__a,
__b);
12184 vector
short __b) {
12185 return __builtin_altivec_vsubshs((vector
short)
__a,
__b);
12189 vector
bool short __b) {
12190 return __builtin_altivec_vsubshs(
__a, (vector
short)
__b);
12195 return __builtin_altivec_vsubuhs(
__a,
__b);
12200 return __builtin_altivec_vsubuhs((vector
unsigned short)
__a,
__b);
12205 return __builtin_altivec_vsubuhs(
__a, (vector
unsigned short)
__b);
12210 return __builtin_altivec_vsubsws(
__a,
__b);
12215 return __builtin_altivec_vsubsws((vector
int)
__a,
__b);
12219 vector
bool int __b) {
12220 return __builtin_altivec_vsubsws(
__a, (vector
int)
__b);
12225 return __builtin_altivec_vsubuws(
__a,
__b);
12230 return __builtin_altivec_vsubuws((vector
unsigned int)
__a,
__b);
12235 return __builtin_altivec_vsubuws(
__a, (vector
unsigned int)
__b);
12242 return __builtin_altivec_vsubsbs(
__a,
__b);
12247 return __builtin_altivec_vsubsbs((vector
signed char)
__a,
__b);
12252 return __builtin_altivec_vsubsbs(
__a, (vector
signed char)
__b);
12259 return __builtin_altivec_vsububs(
__a,
__b);
12264 return __builtin_altivec_vsububs((vector
unsigned char)
__a,
__b);
12269 return __builtin_altivec_vsububs(
__a, (vector
unsigned char)
__b);
12275 vector
short __b) {
12276 return __builtin_altivec_vsubshs(
__a,
__b);
12280 vector
short __b) {
12281 return __builtin_altivec_vsubshs((vector
short)
__a,
__b);
12285 vector
bool short __b) {
12286 return __builtin_altivec_vsubshs(
__a, (vector
short)
__b);
12293 return __builtin_altivec_vsubuhs(
__a,
__b);
12298 return __builtin_altivec_vsubuhs((vector
unsigned short)
__a,
__b);
12303 return __builtin_altivec_vsubuhs(
__a, (vector
unsigned short)
__b);
12310 return __builtin_altivec_vsubsws(
__a,
__b);
12315 return __builtin_altivec_vsubsws((vector
int)
__a,
__b);
12319 vector
bool int __b) {
12320 return __builtin_altivec_vsubsws(
__a, (vector
int)
__b);
12327 return __builtin_altivec_vsubuws(
__a,
__b);
12332 return __builtin_altivec_vsubuws((vector
unsigned int)
__a,
__b);
12337 return __builtin_altivec_vsubuws(
__a, (vector
unsigned int)
__b);
12340#ifdef __POWER8_VECTOR__
12343#ifdef __SIZEOF_INT128__
12345vec_vsubuqm(vector
signed __int128
__a, vector
signed __int128
__b) {
12349static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12350vec_vsubuqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12355static __inline__ vector
unsigned char __attribute__((__always_inline__))
12356vec_sub_u128(vector
unsigned char __a, vector
unsigned char __b) {
12357 return (vector
unsigned char)__builtin_altivec_vsubuqm(
__a,
__b);
12362#ifdef __SIZEOF_INT128__
12364vec_vsubeuqm(vector
signed __int128
__a, vector
signed __int128
__b,
12365 vector
signed __int128
__c) {
12366 return (vector
signed __int128)__builtin_altivec_vsubeuqm(
12367 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12368 (vector
unsigned __int128)
__c);
12371static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12372vec_vsubeuqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12373 vector
unsigned __int128
__c) {
12374 return __builtin_altivec_vsubeuqm(
__a,
__b,
__c);
12379 vector
signed __int128
__c) {
12380 return (vector
signed __int128)__builtin_altivec_vsubeuqm(
12381 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12382 (vector
unsigned __int128)
__c);
12385static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12386vec_sube(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12387 vector
unsigned __int128
__c) {
12388 return __builtin_altivec_vsubeuqm(
__a,
__b,
__c);
12392static __inline__ vector
unsigned char __attribute__((__always_inline__))
12393vec_sube_u128(vector
unsigned char __a, vector
unsigned char __b,
12394 vector
unsigned char __c) {
12395 return (vector
unsigned char)__builtin_altivec_vsubeuqm_c(
12396 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
12397 (vector
unsigned char)
__c);
12402#ifdef __SIZEOF_INT128__
12404vec_vsubcuq(vector
signed __int128
__a, vector
signed __int128
__b) {
12405 return (vector
signed __int128)__builtin_altivec_vsubcuq(
12406 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
12409static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12410vec_vsubcuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12411 return __builtin_altivec_vsubcuq(
__a,
__b);
12417vec_vsubecuq(vector
signed __int128
__a, vector
signed __int128
__b,
12418 vector
signed __int128
__c) {
12419 return (vector
signed __int128)__builtin_altivec_vsubecuq(
12420 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12421 (vector
unsigned __int128)
__c);
12424static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12425vec_vsubecuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12426 vector
unsigned __int128
__c) {
12427 return __builtin_altivec_vsubecuq(
__a,
__b,
__c);
12431#ifdef __powerpc64__
12433vec_subec(vector
signed int __a, vector
signed int __b,
12434 vector
signed int __c) {
12439vec_subec(vector
unsigned int __a, vector
unsigned int __b,
12440 vector
unsigned int __c) {
12445#ifdef __SIZEOF_INT128__
12447vec_subec(vector
signed __int128
__a, vector
signed __int128
__b,
12448 vector
signed __int128
__c) {
12449 return (vector
signed __int128)__builtin_altivec_vsubecuq(
12450 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12451 (vector
unsigned __int128)
__c);
12454static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12455vec_subec(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12456 vector
unsigned __int128
__c) {
12457 return __builtin_altivec_vsubecuq(
__a,
__b,
__c);
12461static __inline__ vector
unsigned char __attribute__((__always_inline__))
12462vec_subec_u128(vector
unsigned char __a, vector
unsigned char __b,
12463 vector
unsigned char __c) {
12464 return (vector
unsigned char)__builtin_altivec_vsubecuq_c(
12465 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
12466 (vector
unsigned char)
__c);
12472 vector
signed int __c) {
12473 vector
signed int __mask = {1, 1, 1, 1};
12474 vector
signed int __carry =
__c & __mask;
12480 vector
unsigned int __c) {
12481 vector
unsigned int __mask = {1, 1, 1, 1};
12482 vector
unsigned int __carry =
__c & __mask;
12489 return __builtin_altivec_vsum4sbs(
__a,
__b);
12494 return __builtin_altivec_vsum4ubs(
__a,
__b);
12499 return __builtin_altivec_vsum4shs(
__a,
__b);
12504static __inline__ vector
int __attribute__((__always_inline__))
12505vec_vsum4sbs(vector
signed char __a, vector
int __b) {
12506 return __builtin_altivec_vsum4sbs(
__a,
__b);
12511static __inline__ vector
unsigned int __attribute__((__always_inline__))
12512vec_vsum4ubs(vector
unsigned char __a, vector
unsigned int __b) {
12513 return __builtin_altivec_vsum4ubs(
__a,
__b);
12518static __inline__ vector
int __attribute__((__always_inline__))
12519vec_vsum4shs(vector
signed short __a, vector
int __b) {
12520 return __builtin_altivec_vsum4shs(
__a,
__b);
12531static __inline__ vector
signed int __attribute__((__always_inline__))
12532vec_sum2s(vector
int __a, vector
int __b) {
12533#ifdef __LITTLE_ENDIAN__
12535 __b,
__b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12537 __c = __builtin_altivec_vsum2sws(
__a,
__c);
12538 return (vector
signed int)
vec_perm(
12539 __c,
__c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12542 return __builtin_altivec_vsum2sws(
__a,
__b);
12548static __inline__ vector
signed int __attribute__((__always_inline__))
12549vec_vsum2sws(vector
int __a, vector
int __b) {
12550#ifdef __LITTLE_ENDIAN__
12552 __b,
__b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12554 __c = __builtin_altivec_vsum2sws(
__a,
__c);
12555 return (vector
signed int)
vec_perm(
12556 __c,
__c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12559 return __builtin_altivec_vsum2sws(
__a,
__b);
12571static __inline__ vector
signed int __attribute__((__always_inline__))
12572vec_sums(vector
signed int __a, vector
signed int __b) {
12573#ifdef __LITTLE_ENDIAN__
12575 __b = __builtin_altivec_vsumsws(
__a,
__b);
12576 return (vector
signed int)(0, 0, 0,
__b[0]);
12578 return __builtin_altivec_vsumsws(
__a,
__b);
12584static __inline__ vector
signed int __attribute__((__always_inline__))
12585vec_vsumsws(vector
signed int __a, vector
signed int __b) {
12586#ifdef __LITTLE_ENDIAN__
12588 __b = __builtin_altivec_vsumsws(
__a,
__b);
12589 return (vector
signed int)(0, 0, 0,
__b[0]);
12591 return __builtin_altivec_vsumsws(
__a,
__b);
12599 return __builtin_vsx_xvrspiz(
__a);
12601 return __builtin_altivec_vrfiz(
__a);
12607 return __builtin_vsx_xvrdpiz(
__a);
12624static __inline__ vector
float __attribute__((__always_inline__))
12625vec_vrfiz(vector
float __a) {
12626 return __builtin_altivec_vrfiz(
__a);
12633#ifdef __LITTLE_ENDIAN__
12634#define vec_vupkhpx(__a) __builtin_altivec_vupklpx((vector short)(__a))
12635#define vec_vupklpx(__a) __builtin_altivec_vupkhpx((vector short)(__a))
12637#define vec_vupkhpx(__a) __builtin_altivec_vupkhpx((vector short)(__a))
12638#define vec_vupklpx(__a) __builtin_altivec_vupklpx((vector short)(__a))
12643#ifdef __LITTLE_ENDIAN__
12644 return __builtin_altivec_vupklsb((vector
char)
__a);
12646 return __builtin_altivec_vupkhsb((vector
char)
__a);
12652#ifdef __LITTLE_ENDIAN__
12653 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12655 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12660#ifdef __LITTLE_ENDIAN__
12661 return __builtin_altivec_vupklsh(
__a);
12663 return __builtin_altivec_vupkhsh(
__a);
12669#ifdef __LITTLE_ENDIAN__
12670 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12672 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12678#ifdef __LITTLE_ENDIAN__
12679 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12681 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12685#ifdef __POWER8_VECTOR__
12687#ifdef __LITTLE_ENDIAN__
12688 return __builtin_altivec_vupklsw(
__a);
12690 return __builtin_altivec_vupkhsw(
__a);
12696#ifdef __LITTLE_ENDIAN__
12697 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12699 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12705 return (vector
double)(
__a[0],
__a[1]);
12713#ifdef __LITTLE_ENDIAN__
12714 return __builtin_altivec_vupklsb((vector
char)
__a);
12716 return __builtin_altivec_vupkhsb((vector
char)
__a);
12722#ifdef __LITTLE_ENDIAN__
12723 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12725 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12732#ifdef __LITTLE_ENDIAN__
12733 return __builtin_altivec_vupklsh(
__a);
12735 return __builtin_altivec_vupkhsh(
__a);
12741#ifdef __LITTLE_ENDIAN__
12742 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12744 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12750#ifdef __LITTLE_ENDIAN__
12751 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12753 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12759#ifdef __POWER8_VECTOR__
12760static __inline__ vector
long long __ATTRS_o_ai vec_vupkhsw(vector
int __a) {
12761#ifdef __LITTLE_ENDIAN__
12762 return __builtin_altivec_vupklsw(
__a);
12764 return __builtin_altivec_vupkhsw(
__a);
12769vec_vupkhsw(vector
bool int __a) {
12770#ifdef __LITTLE_ENDIAN__
12771 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12773 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12782#ifdef __LITTLE_ENDIAN__
12783 return __builtin_altivec_vupkhsb((vector
char)
__a);
12785 return __builtin_altivec_vupklsb((vector
char)
__a);
12791#ifdef __LITTLE_ENDIAN__
12792 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12794 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12799#ifdef __LITTLE_ENDIAN__
12800 return __builtin_altivec_vupkhsh(
__a);
12802 return __builtin_altivec_vupklsh(
__a);
12808#ifdef __LITTLE_ENDIAN__
12809 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12811 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12817#ifdef __LITTLE_ENDIAN__
12818 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12820 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12824#ifdef __POWER8_VECTOR__
12826#ifdef __LITTLE_ENDIAN__
12827 return __builtin_altivec_vupkhsw(
__a);
12829 return __builtin_altivec_vupklsw(
__a);
12835#ifdef __LITTLE_ENDIAN__
12836 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12838 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12844 return (vector
double)(
__a[2],
__a[3]);
12852#ifdef __LITTLE_ENDIAN__
12853 return __builtin_altivec_vupkhsb((vector
char)
__a);
12855 return __builtin_altivec_vupklsb((vector
char)
__a);
12861#ifdef __LITTLE_ENDIAN__
12862 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12864 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12871#ifdef __LITTLE_ENDIAN__
12872 return __builtin_altivec_vupkhsh(
__a);
12874 return __builtin_altivec_vupklsh(
__a);
12880#ifdef __LITTLE_ENDIAN__
12881 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12883 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12889#ifdef __LITTLE_ENDIAN__
12890 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12892 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12898#ifdef __POWER8_VECTOR__
12899static __inline__ vector
long long __ATTRS_o_ai vec_vupklsw(vector
int __a) {
12900#ifdef __LITTLE_ENDIAN__
12901 return __builtin_altivec_vupkhsw(
__a);
12903 return __builtin_altivec_vupklsw(
__a);
12908vec_vupklsw(vector
bool int __a) {
12909#ifdef __LITTLE_ENDIAN__
12910 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12912 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12922vec_vsx_ld(
int __a,
const vector
bool int *
__b) {
12923 return (vector
bool int)__builtin_vsx_lxvw4x(
__a,
__b);
12927vec_vsx_ld(
int __a,
const vector
signed int *
__b) {
12928 return (vector
signed int)__builtin_vsx_lxvw4x(
__a,
__b);
12932vec_vsx_ld(
int __a,
const signed int *
__b) {
12933 return (vector
signed int)__builtin_vsx_lxvw4x(
__a,
__b);
12937vec_vsx_ld(
int __a,
const vector
unsigned int *
__b) {
12938 return (vector
unsigned int)__builtin_vsx_lxvw4x(
__a,
__b);
12942vec_vsx_ld(
int __a,
const unsigned int *
__b) {
12943 return (vector
unsigned int)__builtin_vsx_lxvw4x(
__a,
__b);
12947vec_vsx_ld(
int __a,
const vector
float *
__b) {
12948 return (vector
float)__builtin_vsx_lxvw4x(
__a,
__b);
12952 const float *
__b) {
12953 return (vector
float)__builtin_vsx_lxvw4x(
__a,
__b);
12957vec_vsx_ld(
int __a,
const vector
signed long long *
__b) {
12958 return (vector
signed long long)__builtin_vsx_lxvd2x(
__a,
__b);
12961static __inline__ vector
unsigned long long __ATTRS_o_ai
12962vec_vsx_ld(
int __a,
const vector
unsigned long long *
__b) {
12963 return (vector
unsigned long long)__builtin_vsx_lxvd2x(
__a,
__b);
12967vec_vsx_ld(
int __a,
const vector
double *
__b) {
12968 return (vector
double)__builtin_vsx_lxvd2x(
__a,
__b);
12972vec_vsx_ld(
int __a,
const double *
__b) {
12973 return (vector
double)__builtin_vsx_lxvd2x(
__a,
__b);
12977vec_vsx_ld(
int __a,
const vector
bool short *
__b) {
12978 return (vector
bool short)__builtin_vsx_lxvw4x(
__a,
__b);
12982vec_vsx_ld(
int __a,
const vector
signed short *
__b) {
12983 return (vector
signed short)__builtin_vsx_lxvw4x(
__a,
__b);
12987vec_vsx_ld(
int __a,
const signed short *
__b) {
12988 return (vector
signed short)__builtin_vsx_lxvw4x(
__a,
__b);
12992vec_vsx_ld(
int __a,
const vector
unsigned short *
__b) {
12993 return (vector
unsigned short)__builtin_vsx_lxvw4x(
__a,
__b);
12997vec_vsx_ld(
int __a,
const unsigned short *
__b) {
12998 return (vector
unsigned short)__builtin_vsx_lxvw4x(
__a,
__b);
13002vec_vsx_ld(
int __a,
const vector
bool char *
__b) {
13003 return (vector
bool char)__builtin_vsx_lxvw4x(
__a,
__b);
13007vec_vsx_ld(
int __a,
const vector
signed char *
__b) {
13008 return (vector
signed char)__builtin_vsx_lxvw4x(
__a,
__b);
13012vec_vsx_ld(
int __a,
const signed char *
__b) {
13013 return (vector
signed char)__builtin_vsx_lxvw4x(
__a,
__b);
13017vec_vsx_ld(
int __a,
const vector
unsigned char *
__b) {
13018 return (vector
unsigned char)__builtin_vsx_lxvw4x(
__a,
__b);
13022vec_vsx_ld(
int __a,
const unsigned char *
__b) {
13023 return (vector
unsigned char)__builtin_vsx_lxvw4x(
__a,
__b);
13033 vector
bool int *
__c) {
13034 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13039 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13043 unsigned int *
__c) {
13044 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13048 vector
signed int *
__c) {
13049 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13054 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13058 vector
unsigned int *
__c) {
13059 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13063 unsigned int *
__c) {
13064 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13068 vector
float *
__c) {
13069 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13074 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13077static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed long long __a,
13079 vector
signed long long *
__c) {
13080 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13083static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned long long __a,
13085 vector
unsigned long long *
__c) {
13086 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13090 vector
double *
__c) {
13091 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13096 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13100 vector
bool short *
__c) {
13101 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13105 signed short *
__c) {
13106 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13110 unsigned short *
__c) {
13111 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13114 vector
signed short *
__c) {
13115 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13119 signed short *
__c) {
13120 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13123static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
13125 vector
unsigned short *
__c) {
13126 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13129static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
13130 int __b,
unsigned short *
__c) {
13131 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13135 vector
bool char *
__c) {
13136 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13140 signed char *
__c) {
13141 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13145 unsigned char *
__c) {
13146 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13150 vector
signed char *
__c) {
13151 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13155 signed char *
__c) {
13156 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13159static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
13161 vector
unsigned char *
__c) {
13162 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13165static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
13166 int __b,
unsigned char *
__c) {
13167 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13173#define vec_xxpermdi __builtin_vsx_xxpermdi
13174#define vec_xxsldwi __builtin_vsx_xxsldwi
13175#define vec_permi(__a, __b, __c) \
13176 _Generic((__a), vector signed long long \
13177 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13178 (((__c)&0x1) + 2)), \
13179 vector unsigned long long \
13180 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13181 (((__c)&0x1) + 2)), \
13183 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13184 (((__c)&0x1) + 2)))
13189#define __builtin_altivec_vxor vec_xor
13198 return (vector
signed char)
__a ^
__b;
13203 return __a ^ (vector
signed char)
__b;
13213 return (vector
unsigned char)
__a ^
__b;
13218 return __a ^ (vector
unsigned char)
__b;
13222 vector
bool char __b) {
13227 vector
short __b) {
13232 vector
short __b) {
13233 return (vector
short)
__a ^
__b;
13237 vector
bool short __b) {
13238 return __a ^ (vector short)
__b;
13248 return (vector
unsigned short)
__a ^
__b;
13253 return __a ^ (vector
unsigned short)
__b;
13268 return (vector
int)
__a ^
__b;
13272 vector
bool int __b) {
13283 return (vector
unsigned int)
__a ^
__b;
13292 vector
bool int __b) {
13297 vector
float __b) {
13298 vector
unsigned int __res =
13299 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13300 return (vector
float)__res;
13304 vector
float __b) {
13305 vector
unsigned int __res =
13306 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13307 return (vector
float)__res;
13311 vector
bool int __b) {
13312 vector
unsigned int __res =
13313 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13314 return (vector
float)__res;
13319vec_xor(vector
signed long long __a, vector
signed long long __b) {
13324vec_xor(vector
bool long long __a, vector
signed long long __b) {
13325 return (vector
signed long long)
__a ^
__b;
13329vec_xor(vector
signed long long __a, vector
bool long long __b) {
13330 return __a ^ (vector
signed long long)
__b;
13333static __inline__ vector
unsigned long long __ATTRS_o_ai
13334vec_xor(vector
unsigned long long __a, vector
unsigned long long __b) {
13338static __inline__ vector
unsigned long long __ATTRS_o_ai
13339vec_xor(vector
bool long long __a, vector
unsigned long long __b) {
13340 return (vector
unsigned long long)
__a ^
__b;
13343static __inline__ vector
unsigned long long __ATTRS_o_ai
13344vec_xor(vector
unsigned long long __a, vector
bool long long __b) {
13345 return __a ^ (vector
unsigned long long)
__b;
13349vec_xor(vector
bool long long __a, vector
bool long long __b) {
13354 vector
double __b) {
13355 return (vector
double)((vector
unsigned long long)
__a ^
13356 (vector
unsigned long long)
__b);
13361 return (vector
double)((vector
unsigned long long)
__a ^
13362 (vector
unsigned long long)
__b);
13366 vector
double __b) {
13367 return (vector
double)((vector
unsigned long long)
__a ^
13368 (vector
unsigned long long)
__b);
13381 return (vector
signed char)
__a ^
__b;
13386 return __a ^ (vector
signed char)
__b;
13396 return (vector
unsigned char)
__a ^
__b;
13401 return __a ^ (vector
unsigned char)
__b;
13405 vector
bool char __b) {
13410 vector
short __b) {
13415 vector
short __b) {
13416 return (vector
short)
__a ^
__b;
13420 vector
bool short __b) {
13421 return __a ^ (vector short)
__b;
13431 return (vector
unsigned short)
__a ^
__b;
13436 return __a ^ (vector
unsigned short)
__b;
13451 return (vector
int)
__a ^
__b;
13455 vector
bool int __b) {
13466 return (vector
unsigned int)
__a ^
__b;
13475 vector
bool int __b) {
13480 vector
float __b) {
13481 vector
unsigned int __res =
13482 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13483 return (vector
float)__res;
13487 vector
float __b) {
13488 vector
unsigned int __res =
13489 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13490 return (vector
float)__res;
13494 vector
bool int __b) {
13495 vector
unsigned int __res =
13496 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13497 return (vector
float)__res;
13502vec_vxor(vector
signed long long __a, vector
signed long long __b) {
13507vec_vxor(vector
bool long long __a, vector
signed long long __b) {
13508 return (vector
signed long long)
__a ^
__b;
13512vec_vxor(vector
signed long long __a, vector
bool long long __b) {
13513 return __a ^ (vector
signed long long)
__b;
13516static __inline__ vector
unsigned long long __ATTRS_o_ai
13517vec_vxor(vector
unsigned long long __a, vector
unsigned long long __b) {
13521static __inline__ vector
unsigned long long __ATTRS_o_ai
13522vec_vxor(vector
bool long long __a, vector
unsigned long long __b) {
13523 return (vector
unsigned long long)
__a ^
__b;
13526static __inline__ vector
unsigned long long __ATTRS_o_ai
13527vec_vxor(vector
unsigned long long __a, vector
bool long long __b) {
13528 return __a ^ (vector
unsigned long long)
__b;
13613#ifdef __POWER9_VECTOR__
13615#define vec_insert4b __builtin_vsx_insertword
13616#define vec_extract4b __builtin_vsx_extractuword
13621vec_extract_exp(vector
float __a) {
13622 return __builtin_vsx_xvxexpsp(
__a);
13625static __inline__ vector
unsigned long long __ATTRS_o_ai
13626vec_extract_exp(vector
double __a) {
13627 return __builtin_vsx_xvxexpdp(
__a);
13633vec_extract_sig(vector
float __a) {
13634 return __builtin_vsx_xvxsigsp(
__a);
13637static __inline__ vector
unsigned long long __ATTRS_o_ai
13638vec_extract_sig (vector
double __a) {
13639 return __builtin_vsx_xvxsigdp(
__a);
13643vec_extract_fp32_from_shorth(vector
unsigned short __a) {
13644 vector
unsigned short __b =
13645#ifdef __LITTLE_ENDIAN__
13646 __builtin_shufflevector(
__a,
__a, 0, -1, 1, -1, 2, -1, 3, -1);
13648 __builtin_shufflevector(
__a,
__a, -1, 0, -1, 1, -1, 2, -1, 3);
13650 return __builtin_vsx_xvcvhpsp(
__b);
13654vec_extract_fp32_from_shortl(vector
unsigned short __a) {
13655 vector
unsigned short __b =
13656#ifdef __LITTLE_ENDIAN__
13657 __builtin_shufflevector(
__a,
__a, 4, -1, 5, -1, 6, -1, 7, -1);
13659 __builtin_shufflevector(
__a,
__a, -1, 4, -1, 5, -1, 6, -1, 7);
13661 return __builtin_vsx_xvcvhpsp(
__b);
13680 vector
bool char __b,
13717 vector
bool int __b,
13730static __inline__ vector
unsigned long long __ATTRS_o_ai
13789 const short *
__b) {
13794 const vector
short *
__b) {
13818 const vector pixel *
__b) {
13828 const vector
int *
__b) {
13852 const float *
__b) {
13857 const vector
float *
__b) {
13895 const short *
__b) {
13900 const vector
short *
__b) {
13924 const vector pixel *
__b) {
13934 const vector
int *
__b) {
13958 const float *
__b) {
13963 vector
float *
__b) {
14001 const short *
__b) {
14006 const vector
short *
__b) {
14030 const vector pixel *
__b) {
14040 const vector
int *
__b) {
14064 const float *
__b) {
14069 const vector
float *
__b) {
14107 const short *
__b) {
14112 const vector
short *
__b) {
14136 const vector pixel *
__b) {
14146 const vector
int *
__b) {
14170 const float *
__b) {
14175 const vector
float *
__b) {
14183 signed char *
__c) {
14189 vector
signed char *
__c) {
14196 unsigned char *
__c) {
14202 vector
unsigned char *
__c) {
14209 vector
bool char *
__c) {
14222 vector
short *
__c) {
14229 int __b,
unsigned short *
__c) {
14236 vector
unsigned short *
__c) {
14243 vector
bool short *
__c) {
14250 vector pixel *
__c) {
14270 unsigned int *
__c) {
14276 vector
unsigned int *
__c) {
14283 vector
bool int *
__c) {
14290 vector
float *
__c) {
14299 signed char *
__c) {
14305 vector
signed char *
__c) {
14312 int __b,
unsigned char *
__c) {
14319 vector
unsigned char *
__c) {
14326 vector
bool char *
__c) {
14339 vector
short *
__c) {
14346 int __b,
unsigned short *
__c) {
14353 vector
unsigned short *
__c) {
14360 vector
bool short *
__c) {
14367 vector pixel *
__c) {
14387 unsigned int *
__c) {
14393 vector
unsigned int *
__c) {
14400 vector
bool int *
__c) {
14407 vector
float *
__c) {
14416 signed char *
__c) {
14422 vector
signed char *
__c) {
14429 unsigned char *
__c) {
14435 vector
unsigned char *
__c) {
14442 vector
bool char *
__c) {
14455 vector
short *
__c) {
14462 int __b,
unsigned short *
__c) {
14469 vector
unsigned short *
__c) {
14476 vector
bool short *
__c) {
14483 vector pixel *
__c) {
14503 unsigned int *
__c) {
14509 vector
unsigned int *
__c) {
14516 vector
bool int *
__c) {
14523 vector
float *
__c) {
14532 signed char *
__c) {
14538 vector
signed char *
__c) {
14545 int __b,
unsigned char *
__c) {
14552 vector
unsigned char *
__c) {
14559 vector
bool char *
__c) {
14572 vector
short *
__c) {
14579 int __b,
unsigned short *
__c) {
14586 vector
unsigned short *
__c) {
14593 vector
bool short *
__c) {
14600 vector pixel *
__c) {
14620 unsigned int *
__c) {
14626 vector
unsigned int *
__c) {
14633 vector
bool int *
__c) {
14640 vector
float *
__c) {
14650 const vector
signed char __zero = (vector
signed char)0;
14651 vector
signed char __res =
14652 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1,
14653 -1, -1, -1, -1, -1, -1, -1, -1);
14660 const vector
unsigned char __zero = (vector
unsigned char)(0);
14661 vector
unsigned char __res =
14662 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1,
14663 -1, -1, -1, -1, -1, -1, -1, -1);
14669 const vector
short __zero = (vector short)(0);
14670 vector
short __res =
14671 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1);
14678 const vector
unsigned short __zero = (vector
unsigned short)(0);
14679 vector
unsigned short __res =
14680 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1);
14686 const vector
int __zero = (vector
int)(0);
14687 vector
int __res = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14694 const vector
unsigned int __zero = (vector
unsigned int)(0);
14695 vector
unsigned int __res =
14696 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14702 const vector
float __zero = (vector
float)(0);
14703 vector
float __res = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14710 const vector
double __zero = (vector
double)(0);
14711 vector
double __res = __builtin_shufflevector(__zero, __zero, -1, -1);
14718 const vector
signed long long __zero = (vector
signed long long)(0);
14719 vector
signed long long __res =
14720 __builtin_shufflevector(__zero, __zero, -1, -1);
14725static __inline__ vector
unsigned long long __ATTRS_o_ai
14727 const vector
unsigned long long __zero = (vector
unsigned long long)(0);
14728 vector
unsigned long long __res =
14729 __builtin_shufflevector(__zero, __zero, -1, -1);
14738 return (vector
signed char)(
__a);
14743 return (vector
unsigned char)(
__a);
14747 return (vector
short)(
__a);
14752 return (vector
unsigned short)(
__a);
14756 return (vector
int)(
__a);
14761 return (vector
unsigned int)(
__a);
14767 return (vector
signed long long)(
__a);
14770static __inline__ vector
unsigned long long __ATTRS_o_ai
14772 return (vector
unsigned long long)(
__a);
14775#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
14776 defined(__SIZEOF_INT128__)
14779 return (vector
signed __int128)(
__a);
14782static __inline__ vector
unsigned __int128
__ATTRS_o_ai
14784 return (vector
unsigned __int128)(
__a);
14790 return (vector
double)(
__a);
14795 return (vector
float)(
__a);
14803 vector
signed char __b) {
14804 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14809 vector
bool char __b) {
14810 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14815 vector
unsigned char __b) {
14816 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14821 vector
bool char __b) {
14822 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14827 vector
signed char __b) {
14828 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14833 vector
unsigned char __b) {
14834 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14839 vector
bool char __b) {
14840 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14845 vector
short __b) {
14850 vector
bool short __b) {
14851 return __builtin_altivec_vcmpequh_p(
__CR6_LT,
__a, (vector
short)
__b);
14855 vector
unsigned short __b) {
14856 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14857 (vector
short)
__b);
14861 vector
bool short __b) {
14862 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14863 (vector
short)
__b);
14867 vector
short __b) {
14868 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14869 (vector
short)
__b);
14873 vector
unsigned short __b) {
14874 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14875 (vector
short)
__b);
14879 vector
bool short __b) {
14880 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14881 (vector
short)
__b);
14885 vector pixel
__b) {
14886 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14887 (vector
short)
__b);
14895 vector
bool int __b) {
14896 return __builtin_altivec_vcmpequw_p(
__CR6_LT,
__a, (vector
int)
__b);
14900 vector
unsigned int __b) {
14901 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14906 vector
bool int __b) {
14907 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14913 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14918 vector
unsigned int __b) {
14919 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14924 vector
bool int __b) {
14925 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14931 vector
signed long long __b) {
14932#ifdef __POWER8_VECTOR__
14942 vector
bool long long __b) {
14943 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14947 vector
unsigned long long __b) {
14948 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14952 vector
bool long long __b) {
14953 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14957 vector
long long __b) {
14958 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14962 vector
unsigned long long __b) {
14963 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14967 vector
bool long long __b) {
14968 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14973 vector
float __b) {
14983 vector
double __b) {
14988#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
14990 vector
signed __int128
__b) {
14991 return __builtin_altivec_vcmpequq_p(
__CR6_LT, (vector
unsigned __int128)
__a,
14992 (vector
signed __int128)
__b);
14996 vector
unsigned __int128
__b) {
14997 return __builtin_altivec_vcmpequq_p(
__CR6_LT,
__a,
14998 (vector
signed __int128)
__b);
15002 vector
bool __int128
__b) {
15003 return __builtin_altivec_vcmpequq_p(
__CR6_LT, (vector
unsigned __int128)
__a,
15004 (vector
signed __int128)
__b);
15011 vector
signed char __b) {
15016 vector
bool char __b) {
15017 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, (vector
signed char)
__b,
__a);
15021 vector
unsigned char __b) {
15026 vector
bool char __b) {
15027 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__b,
__a);
15031 vector
signed char __b) {
15032 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ,
__b, (vector
signed char)
__a);
15036 vector
unsigned char __b) {
15037 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ,
__b, (vector
unsigned char)
__a);
15041 vector
bool char __b) {
15042 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__b,
15043 (vector
unsigned char)
__a);
15047 vector
short __b) {
15052 vector
bool short __b) {
15053 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, (vector
short)
__b,
__a);
15057 vector
unsigned short __b) {
15062 vector
bool short __b) {
15063 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__b,
15068 vector
short __b) {
15069 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ,
__b, (vector
signed short)
__a);
15073 vector
unsigned short __b) {
15074 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ,
__b,
15075 (vector
unsigned short)
__a);
15079 vector
bool short __b) {
15080 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__b,
15081 (vector
unsigned short)
__a);
15089 vector
bool int __b) {
15090 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, (vector
int)
__b,
__a);
15094 vector
unsigned int __b) {
15099 vector
bool int __b) {
15100 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__b,
__a);
15105 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ,
__b, (vector
signed int)
__a);
15109 vector
unsigned int __b) {
15110 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ,
__b, (vector
unsigned int)
__a);
15114 vector
bool int __b) {
15115 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__b,
15116 (vector
unsigned int)
__a);
15121 vector
signed long long __b) {
15125 vector
bool long long __b) {
15126 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, (vector
signed long long)
__b,
15131 vector
unsigned long long __b) {
15136 vector
bool long long __b) {
15137 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__b,
15142 vector
signed long long __b) {
15143 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ,
__b,
15144 (vector
signed long long)
__a);
15148 vector
unsigned long long __b) {
15149 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ,
__b,
15150 (vector
unsigned long long)
__a);
15154 vector
bool long long __b) {
15155 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__b,
15156 (vector
unsigned long long)
__a);
15161 vector
float __b) {
15171 vector
double __b) {
15176#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15178 vector
signed __int128
__b) {
15183 vector
unsigned __int128
__b) {
15191 vector
signed char __b) {
15196 vector
bool char __b) {
15197 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT,
__a, (vector
signed char)
__b);
15201 vector
unsigned char __b) {
15206 vector
bool char __b) {
15207 return __builtin_altivec_vcmpgtub_p(
__CR6_LT,
__a, (vector
unsigned char)
__b);
15211 vector
signed char __b) {
15212 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, (vector
signed char)
__a,
__b);
15216 vector
unsigned char __b) {
15217 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__a,
__b);
15221 vector
bool char __b) {
15222 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__a,
15223 (vector
unsigned char)
__b);
15227 vector
short __b) {
15232 vector
bool short __b) {
15233 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT,
__a, (vector
short)
__b);
15237 vector
unsigned short __b) {
15242 vector
bool short __b) {
15243 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT,
__a,
15244 (vector
unsigned short)
__b);
15248 vector
short __b) {
15249 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, (vector
signed short)
__a,
__b);
15253 vector
unsigned short __b) {
15254 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__a,
15259 vector
bool short __b) {
15260 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__a,
15261 (vector
unsigned short)
__b);
15269 vector
bool int __b) {
15270 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT,
__a, (vector
int)
__b);
15274 vector
unsigned int __b) {
15279 vector
bool int __b) {
15280 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT,
__a, (vector
unsigned int)
__b);
15285 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, (vector
signed int)
__a,
__b);
15289 vector
unsigned int __b) {
15290 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__a,
__b);
15294 vector
bool int __b) {
15295 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__a,
15296 (vector
unsigned int)
__b);
15301 vector
signed long long __b) {
15305 vector
bool long long __b) {
15306 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT,
__a,
15307 (vector
signed long long)
__b);
15311 vector
unsigned long long __b) {
15316 vector
bool long long __b) {
15317 return __builtin_altivec_vcmpgtud_p(
__CR6_LT,
__a,
15318 (vector
unsigned long long)
__b);
15322 vector
signed long long __b) {
15323 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, (vector
signed long long)
__a,
15328 vector
unsigned long long __b) {
15329 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__a,
15334 vector
bool long long __b) {
15335 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__a,
15336 (vector
unsigned long long)
__b);
15341 vector
float __b) {
15351 vector
double __b) {
15356#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15358 vector
signed __int128
__b) {
15363 vector
unsigned __int128
__b) {
15371vec_all_in(vector
float __a, vector
float __b) {
15378 vector
signed char __b) {
15383 vector
bool char __b) {
15384 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ,
__a, (vector
signed char)
__b);
15388 vector
unsigned char __b) {
15393 vector
bool char __b) {
15394 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ,
__a, (vector
unsigned char)
__b);
15398 vector
signed char __b) {
15399 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, (vector
signed char)
__a,
__b);
15403 vector
unsigned char __b) {
15404 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__a,
__b);
15408 vector
bool char __b) {
15409 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__a,
15410 (vector
unsigned char)
__b);
15414 vector
short __b) {
15419 vector
bool short __b) {
15420 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ,
__a, (vector
short)
__b);
15424 vector
unsigned short __b) {
15429 vector
bool short __b) {
15430 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ,
__a,
15431 (vector
unsigned short)
__b);
15435 vector
short __b) {
15436 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, (vector
signed short)
__a,
__b);
15440 vector
unsigned short __b) {
15441 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__a,
15446 vector
bool short __b) {
15447 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__a,
15448 (vector
unsigned short)
__b);
15456 vector
bool int __b) {
15457 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ,
__a, (vector
int)
__b);
15461 vector
unsigned int __b) {
15466 vector
bool int __b) {
15467 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ,
__a, (vector
unsigned int)
__b);
15472 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, (vector
signed int)
__a,
__b);
15476 vector
unsigned int __b) {
15477 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__a,
__b);
15481 vector
bool int __b) {
15482 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__a,
15483 (vector
unsigned int)
__b);
15488 vector
signed long long __b) {
15493 vector
unsigned long long __b) {
15498 vector
bool long long __b) {
15499 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ,
__a,
15500 (vector
signed long long)
__b);
15504 vector
bool long long __b) {
15505 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ,
__a,
15506 (vector
unsigned long long)
__b);
15510 vector
signed long long __b) {
15511 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, (vector
signed long long)
__a,
15516 vector
unsigned long long __b) {
15517 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__a,
15522 vector
bool long long __b) {
15523 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__a,
15524 (vector
unsigned long long)
__b);
15529 vector
float __b) {
15539 vector
double __b) {
15544#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15546 vector
signed __int128
__b) {
15551 vector
unsigned __int128
__b) {
15559 vector
signed char __b) {
15564 vector
bool char __b) {
15565 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, (vector
signed char)
__b,
__a);
15569 vector
unsigned char __b) {
15574 vector
bool char __b) {
15575 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__b,
__a);
15579 vector
signed char __b) {
15580 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT,
__b, (vector
signed char)
__a);
15584 vector
unsigned char __b) {
15585 return __builtin_altivec_vcmpgtub_p(
__CR6_LT,
__b, (vector
unsigned char)
__a);
15589 vector
bool char __b) {
15590 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__b,
15591 (vector
unsigned char)
__a);
15595 vector
short __b) {
15600 vector
bool short __b) {
15601 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, (vector
short)
__b,
__a);
15605 vector
unsigned short __b) {
15610 vector
bool short __b) {
15611 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__b,
15616 vector
short __b) {
15617 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT,
__b, (vector
signed short)
__a);
15621 vector
unsigned short __b) {
15622 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT,
__b,
15623 (vector
unsigned short)
__a);
15627 vector
bool short __b) {
15628 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__b,
15629 (vector
unsigned short)
__a);
15637 vector
bool int __b) {
15638 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, (vector
int)
__b,
__a);
15642 vector
unsigned int __b) {
15647 vector
bool int __b) {
15648 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__b,
__a);
15653 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT,
__b, (vector
signed int)
__a);
15657 vector
unsigned int __b) {
15658 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT,
__b, (vector
unsigned int)
__a);
15662 vector
bool int __b) {
15663 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__b,
15664 (vector
unsigned int)
__a);
15669 vector
signed long long __b) {
15674 vector
unsigned long long __b) {
15679 vector
bool long long __b) {
15680 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, (vector
signed long long)
__b,
15685 vector
bool long long __b) {
15686 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__b,
15691 vector
signed long long __b) {
15692 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT,
__b,
15693 (vector
signed long long)
__a);
15697 vector
unsigned long long __b) {
15698 return __builtin_altivec_vcmpgtud_p(
__CR6_LT,
__b,
15699 (vector
unsigned long long)
__a);
15703 vector
bool long long __b) {
15704 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__b,
15705 (vector
unsigned long long)
__a);
15710 vector
float __b) {
15720 vector
double __b) {
15725#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15727 vector
signed __int128
__b) {
15732 vector
unsigned __int128
__b) {
15756 vector
signed char __b) {
15757 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15762 vector
bool char __b) {
15763 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15768 vector
unsigned char __b) {
15769 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15774 vector
bool char __b) {
15775 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15780 vector
signed char __b) {
15781 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15786 vector
unsigned char __b) {
15787 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15792 vector
bool char __b) {
15793 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15798 vector
short __b) {
15803 vector
bool short __b) {
15804 return __builtin_altivec_vcmpequh_p(
__CR6_EQ,
__a, (vector
short)
__b);
15808 vector
unsigned short __b) {
15809 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15810 (vector
short)
__b);
15814 vector
bool short __b) {
15815 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15816 (vector
short)
__b);
15820 vector
short __b) {
15821 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15822 (vector
short)
__b);
15826 vector
unsigned short __b) {
15827 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15828 (vector
short)
__b);
15832 vector
bool short __b) {
15833 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15834 (vector
short)
__b);
15838 vector pixel
__b) {
15839 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15840 (vector
short)
__b);
15848 vector
bool int __b) {
15849 return __builtin_altivec_vcmpequw_p(
__CR6_EQ,
__a, (vector
int)
__b);
15853 vector
unsigned int __b) {
15854 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15859 vector
bool int __b) {
15860 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15866 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15871 vector
unsigned int __b) {
15872 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15877 vector
bool int __b) {
15878 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15884 vector
signed long long __b) {
15889 vector
unsigned long long __b) {
15890 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
long long)
__a,
15891 (vector
long long)
__b);
15895 vector
bool long long __b) {
15896 return __builtin_altivec_vcmpequd_p(
__CR6_EQ,
__a,
15897 (vector
signed long long)
__b);
15901 vector
bool long long __b) {
15902 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15903 (vector
signed long long)
__b);
15907 vector
signed long long __b) {
15908 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15909 (vector
signed long long)
__b);
15913 vector
unsigned long long __b) {
15914 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15915 (vector
signed long long)
__b);
15919 vector
bool long long __b) {
15920 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15921 (vector
signed long long)
__b);
15926 vector
float __b) {
15936 vector
double __b) {
15941#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15943 vector
signed __int128
__b) {
15944 return __builtin_altivec_vcmpequq_p(
__CR6_EQ, (vector
unsigned __int128)
__a,
15949 vector
unsigned __int128
__b) {
15950 return __builtin_altivec_vcmpequq_p(
__CR6_EQ,
__a,
15951 (vector
signed __int128)
__b);
15955 vector
bool __int128
__b) {
15956 return __builtin_altivec_vcmpequq_p(
__CR6_EQ, (vector
unsigned __int128)
__a,
15957 (vector
signed __int128)
__b);
15964 vector
float __b) {
15974 vector
double __b) {
15982 vector
float __b) {
15992 vector
double __b) {
16010 vector
double __b) {
16028 vector
double __b) {
16053 vector
signed char __b) {
16059 vector
bool char __b) {
16065 vector
unsigned char __b) {
16071 vector
bool char __b) {
16077 vector
signed char __b) {
16083 vector
unsigned char __b) {
16089 vector
bool char __b) {
16095 vector
short __b) {
16100 vector
bool short __b) {
16105 vector
unsigned short __b) {
16107 (vector
short)
__b);
16111 vector
bool short __b) {
16113 (vector
short)
__b);
16117 vector
short __b) {
16119 (vector
short)
__b);
16123 vector
unsigned short __b) {
16125 (vector
short)
__b);
16129 vector
bool short __b) {
16131 (vector
short)
__b);
16135 vector pixel
__b) {
16137 (vector
short)
__b);
16145 vector
bool int __b) {
16150 vector
unsigned int __b) {
16156 vector
bool int __b) {
16168 vector
unsigned int __b) {
16174 vector
bool int __b) {
16181 vector
signed long long __b) {
16186 vector
unsigned long long __b) {
16187 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, (vector
long long)
__a,
16188 (vector
long long)
__b);
16192 vector
bool long long __b) {
16194 (vector
signed long long)
__b);
16198 vector
bool long long __b) {
16199 return __builtin_altivec_vcmpequd_p(
16204 vector
signed long long __b) {
16205 return __builtin_altivec_vcmpequd_p(
16210 vector
unsigned long long __b) {
16211 return __builtin_altivec_vcmpequd_p(
16216 vector
bool long long __b) {
16217 return __builtin_altivec_vcmpequd_p(
16223 vector
float __b) {
16233 vector
double __b) {
16238#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16240 vector
signed __int128
__b) {
16242 (vector
unsigned __int128)
__a,
__b);
16246 vector
unsigned __int128
__b) {
16248 (vector
signed __int128)
__b);
16252 vector
bool __int128
__b) {
16253 return __builtin_altivec_vcmpequq_p(
16261 vector
signed char __b) {
16266 vector
bool char __b) {
16267 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, (vector
signed char)
__b,
16272 vector
unsigned char __b) {
16277 vector
bool char __b) {
16278 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__b,
16283 vector
signed char __b) {
16285 (vector
signed char)
__a);
16289 vector
unsigned char __b) {
16291 (vector
unsigned char)
__a);
16295 vector
bool char __b) {
16296 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__b,
16297 (vector
unsigned char)
__a);
16301 vector
short __b) {
16306 vector
bool short __b) {
16311 vector
unsigned short __b) {
16316 vector
bool short __b) {
16317 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__b,
16322 vector
short __b) {
16324 (vector
signed short)
__a);
16328 vector
unsigned short __b) {
16330 (vector
unsigned short)
__a);
16334 vector
bool short __b) {
16335 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__b,
16336 (vector
unsigned short)
__a);
16344 vector
bool int __b) {
16349 vector
unsigned int __b) {
16354 vector
bool int __b) {
16355 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__b,
16362 (vector
signed int)
__a);
16366 vector
unsigned int __b) {
16368 (vector
unsigned int)
__a);
16372 vector
bool int __b) {
16373 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__b,
16374 (vector
unsigned int)
__a);
16379 vector
signed long long __b) {
16384 vector
unsigned long long __b) {
16389 vector
bool long long __b) {
16391 (vector
signed long long)
__b,
__a);
16395 vector
bool long long __b) {
16397 (vector
unsigned long long)
__b,
__a);
16401 vector
signed long long __b) {
16403 (vector
signed long long)
__a);
16407 vector
unsigned long long __b) {
16409 (vector
unsigned long long)
__a);
16413 vector
bool long long __b) {
16415 (vector
unsigned long long)
__b,
16416 (vector
unsigned long long)
__a);
16421 vector
float __b) {
16431 vector
double __b) {
16436#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16438 vector
signed __int128
__b) {
16443 vector
unsigned __int128
__b) {
16451 vector
signed char __b) {
16456 vector
bool char __b) {
16458 (vector
signed char)
__b);
16462 vector
unsigned char __b) {
16467 vector
bool char __b) {
16469 (vector
unsigned char)
__b);
16473 vector
signed char __b) {
16474 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, (vector
signed char)
__a,
16479 vector
unsigned char __b) {
16480 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__a,
16485 vector
bool char __b) {
16486 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__a,
16487 (vector
unsigned char)
__b);
16491 vector
short __b) {
16496 vector
bool short __b) {
16501 vector
unsigned short __b) {
16506 vector
bool short __b) {
16508 (vector
unsigned short)
__b);
16512 vector
short __b) {
16513 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, (vector
signed short)
__a,
16518 vector
unsigned short __b) {
16519 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__a,
16524 vector
bool short __b) {
16525 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__a,
16526 (vector
unsigned short)
__b);
16534 vector
bool int __b) {
16539 vector
unsigned int __b) {
16544 vector
bool int __b) {
16546 (vector
unsigned int)
__b);
16551 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, (vector
signed int)
__a,
16556 vector
unsigned int __b) {
16557 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__a,
16562 vector
bool int __b) {
16563 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__a,
16564 (vector
unsigned int)
__b);
16569 vector
signed long long __b) {
16574 vector
unsigned long long __b) {
16579 vector
bool long long __b) {
16581 (vector
signed long long)
__b);
16585 vector
bool long long __b) {
16587 (vector
unsigned long long)
__b);
16591 vector
signed long long __b) {
16593 (vector
signed long long)
__a,
__b);
16597 vector
unsigned long long __b) {
16599 (vector
unsigned long long)
__a,
__b);
16603 vector
bool long long __b) {
16605 (vector
unsigned long long)
__a,
16606 (vector
unsigned long long)
__b);
16611 vector
float __b) {
16621 vector
double __b) {
16626#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16628 vector
signed __int128
__b) {
16633 vector
unsigned __int128
__b) {
16641 vector
signed char __b) {
16646 vector
bool char __b) {
16648 (vector
signed char)
__b);
16652 vector
unsigned char __b) {
16657 vector
bool char __b) {
16659 (vector
unsigned char)
__b);
16663 vector
signed char __b) {
16664 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, (vector
signed char)
__a,
16669 vector
unsigned char __b) {
16670 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__a,
16675 vector
bool char __b) {
16676 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__a,
16677 (vector
unsigned char)
__b);
16681 vector
short __b) {
16686 vector
bool short __b) {
16691 vector
unsigned short __b) {
16696 vector
bool short __b) {
16698 (vector
unsigned short)
__b);
16702 vector
short __b) {
16703 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, (vector
signed short)
__a,
16708 vector
unsigned short __b) {
16709 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__a,
16714 vector
bool short __b) {
16715 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__a,
16716 (vector
unsigned short)
__b);
16724 vector
bool int __b) {
16729 vector
unsigned int __b) {
16734 vector
bool int __b) {
16736 (vector
unsigned int)
__b);
16741 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, (vector
signed int)
__a,
16746 vector
unsigned int __b) {
16747 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__a,
16752 vector
bool int __b) {
16753 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__a,
16754 (vector
unsigned int)
__b);
16759 vector
signed long long __b) {
16764 vector
unsigned long long __b) {
16769 vector
bool long long __b) {
16771 (vector
signed long long)
__b);
16775 vector
bool long long __b) {
16777 (vector
unsigned long long)
__b);
16781 vector
signed long long __b) {
16783 (vector
signed long long)
__a,
__b);
16787 vector
unsigned long long __b) {
16789 (vector
unsigned long long)
__a,
__b);
16793 vector
bool long long __b) {
16795 (vector
unsigned long long)
__a,
16796 (vector
unsigned long long)
__b);
16801 vector
float __b) {
16811 vector
double __b) {
16816#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16818 vector
signed __int128
__b) {
16823 vector
unsigned __int128
__b) {
16831 vector
signed char __b) {
16836 vector
bool char __b) {
16837 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, (vector
signed char)
__b,
16842 vector
unsigned char __b) {
16847 vector
bool char __b) {
16848 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__b,
16853 vector
signed char __b) {
16855 (vector
signed char)
__a);
16859 vector
unsigned char __b) {
16861 (vector
unsigned char)
__a);
16865 vector
bool char __b) {
16866 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__b,
16867 (vector
unsigned char)
__a);
16871 vector
short __b) {
16876 vector
bool short __b) {
16881 vector
unsigned short __b) {
16886 vector
bool short __b) {
16887 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__b,
16892 vector
short __b) {
16894 (vector
signed short)
__a);
16898 vector
unsigned short __b) {
16900 (vector
unsigned short)
__a);
16904 vector
bool short __b) {
16905 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__b,
16906 (vector
unsigned short)
__a);
16914 vector
bool int __b) {
16919 vector
unsigned int __b) {
16924 vector
bool int __b) {
16925 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__b,
16932 (vector
signed int)
__a);
16936 vector
unsigned int __b) {
16938 (vector
unsigned int)
__a);
16942 vector
bool int __b) {
16943 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__b,
16944 (vector
unsigned int)
__a);
16949 vector
signed long long __b) {
16954 vector
unsigned long long __b) {
16959 vector
bool long long __b) {
16961 (vector
signed long long)
__b,
__a);
16965 vector
bool long long __b) {
16967 (vector
unsigned long long)
__b,
__a);
16971 vector
signed long long __b) {
16973 (vector
signed long long)
__a);
16977 vector
unsigned long long __b) {
16979 (vector
unsigned long long)
__a);
16983 vector
bool long long __b) {
16985 (vector
unsigned long long)
__b,
16986 (vector
unsigned long long)
__a);
16991 vector
float __b) {
17001 vector
double __b) {
17006#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
17008 vector
signed __int128
__b) {
17013 vector
unsigned __int128
__b) {
17036 vector
signed char __b) {
17042 vector
bool char __b) {
17048 vector
unsigned char __b) {
17054 vector
bool char __b) {
17060 vector
signed char __b) {
17066 vector
unsigned char __b) {
17072 vector
bool char __b) {
17078 vector
short __b) {
17083 vector
bool short __b) {
17088 vector
unsigned short __b) {
17090 (vector
short)
__b);
17094 vector
bool short __b) {
17096 (vector
short)
__b);
17100 vector
short __b) {
17102 (vector
short)
__b);
17106 vector
unsigned short __b) {
17108 (vector
short)
__b);
17112 vector
bool short __b) {
17114 (vector
short)
__b);
17118 vector pixel
__b) {
17120 (vector
short)
__b);
17128 vector
bool int __b) {
17133 vector
unsigned int __b) {
17139 vector
bool int __b) {
17151 vector
unsigned int __b) {
17157 vector
bool int __b) {
17164 vector
signed long long __b) {
17165#ifdef __POWER8_VECTOR__
17175 vector
unsigned long long __b) {
17176 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17180 vector
bool long long __b) {
17181 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17185 vector
bool long long __b) {
17186 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17190 vector
signed long long __b) {
17191 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17195 vector
unsigned long long __b) {
17196 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17200 vector
bool long long __b) {
17201 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17206 vector
float __b) {
17216 vector
double __b) {
17221#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
17223 vector
signed __int128
__b) {
17225 (vector
unsigned __int128)
__a,
__b);
17229 vector
unsigned __int128
__b) {
17231 (vector
signed __int128)
__b);
17235 vector
bool __int128
__b) {
17236 return __builtin_altivec_vcmpequq_p(
17244 vector
float __b) {
17254 vector
double __b) {
17262 vector
float __b) {
17272 vector
double __b) {
17280 vector
float __b) {
17290 vector
double __b) {
17298 vector
float __b) {
17308 vector
double __b) {
17332vec_any_out(vector
float __a, vector
float __b) {
17350#define vec_sbox_be __builtin_altivec_crypto_vsbox
17351#define vec_cipher_be __builtin_altivec_crypto_vcipher
17352#define vec_cipherlast_be __builtin_altivec_crypto_vcipherlast
17353#define vec_ncipher_be __builtin_altivec_crypto_vncipher
17354#define vec_ncipherlast_be __builtin_altivec_crypto_vncipherlast
17357static __inline__ vector
unsigned char __attribute__((__always_inline__))
17358__builtin_crypto_vsbox(vector
unsigned char __a) {
17359 return __builtin_altivec_crypto_vsbox(
__a);
17362static __inline__ vector
unsigned char __attribute__((__always_inline__))
17363__builtin_crypto_vcipher(vector
unsigned char __a,
17364 vector
unsigned char __b) {
17365 return __builtin_altivec_crypto_vcipher(
__a,
__b);
17368static __inline__ vector
unsigned char __attribute__((__always_inline__))
17369__builtin_crypto_vcipherlast(vector
unsigned char __a,
17370 vector
unsigned char __b) {
17371 return __builtin_altivec_crypto_vcipherlast(
__a,
__b);
17374static __inline__ vector
unsigned char __attribute__((__always_inline__))
17375__builtin_crypto_vncipher(vector
unsigned char __a,
17376 vector
unsigned char __b) {
17377 return __builtin_altivec_crypto_vncipher(
__a,
__b);
17380static __inline__ vector
unsigned char __attribute__((__always_inline__))
17381__builtin_crypto_vncipherlast(vector
unsigned char __a,
17382 vector
unsigned char __b) {
17383 return __builtin_altivec_crypto_vncipherlast(
__a,
__b);
17387#define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad
17388#define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw
17390#define vec_shasigma_be(X, Y, Z) \
17391 _Generic((X), vector unsigned int \
17392 : __builtin_crypto_vshasigmaw, vector unsigned long long \
17393 : __builtin_crypto_vshasigmad)((X), (Y), (Z))
17396#ifdef __POWER8_VECTOR__
17398vec_permxor(vector
bool char __a, vector
bool char __b,
17399 vector
bool char __c) {
17400 return (vector
bool char)__builtin_altivec_crypto_vpermxor(
17401 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17402 (vector
unsigned char)
__c);
17406vec_permxor(vector
signed char __a, vector
signed char __b,
17407 vector
signed char __c) {
17408 return (vector
signed char)__builtin_altivec_crypto_vpermxor(
17409 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17410 (vector
unsigned char)
__c);
17414vec_permxor(vector
unsigned char __a, vector
unsigned char __b,
17415 vector
unsigned char __c) {
17416 return __builtin_altivec_crypto_vpermxor(
__a,
__b,
__c);
17420__builtin_crypto_vpermxor(vector
unsigned char __a, vector
unsigned char __b,
17421 vector
unsigned char __c) {
17422 return __builtin_altivec_crypto_vpermxor(
__a,
__b,
__c);
17426__builtin_crypto_vpermxor(vector
unsigned short __a, vector
unsigned short __b,
17427 vector
unsigned short __c) {
17428 return (vector
unsigned short)__builtin_altivec_crypto_vpermxor(
17429 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17430 (vector
unsigned char)
__c);
17433static __inline__ vector
unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
17434 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
17435 return (vector
unsigned int)__builtin_altivec_crypto_vpermxor(
17436 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17437 (vector
unsigned char)
__c);
17440static __inline__ vector
unsigned long long __ATTRS_o_ai
17441__builtin_crypto_vpermxor(vector
unsigned long long __a,
17442 vector
unsigned long long __b,
17443 vector
unsigned long long __c) {
17444 return (vector
unsigned long long)__builtin_altivec_crypto_vpermxor(
17445 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17446 (vector
unsigned char)
__c);
17450__builtin_crypto_vpmsumb(vector
unsigned char __a, vector
unsigned char __b) {
17451 return __builtin_altivec_crypto_vpmsumb(
__a,
__b);
17455__builtin_crypto_vpmsumb(vector
unsigned short __a, vector
unsigned short __b) {
17456 return __builtin_altivec_crypto_vpmsumh(
__a,
__b);
17460__builtin_crypto_vpmsumb(vector
unsigned int __a, vector
unsigned int __b) {
17461 return __builtin_altivec_crypto_vpmsumw(
__a,
__b);
17464static __inline__ vector
unsigned long long __ATTRS_o_ai
17465__builtin_crypto_vpmsumb(vector
unsigned long long __a,
17466 vector
unsigned long long __b) {
17467 return __builtin_altivec_crypto_vpmsumd(
__a,
__b);
17471vec_vgbbd(vector
signed char __a) {
17472 return (vector
signed char)__builtin_altivec_vgbbd((vector
unsigned char)
__a);
17475#define vec_pmsum_be __builtin_crypto_vpmsumb
17476#define vec_gb __builtin_altivec_vgbbd
17479vec_vgbbd(vector
unsigned char __a) {
17480 return __builtin_altivec_vgbbd(
__a);
17484vec_gbb(vector
signed long long __a) {
17485 return (vector
signed long long)__builtin_altivec_vgbbd(
17486 (vector
unsigned char)
__a);
17489static __inline__ vector
unsigned long long __ATTRS_o_ai
17490vec_gbb(vector
unsigned long long __a) {
17491 return (vector
unsigned long long)__builtin_altivec_vgbbd(
17492 (vector
unsigned char)
__a);
17496vec_vbpermq(vector
signed char __a, vector
signed char __b) {
17497 return (vector
long long)__builtin_altivec_vbpermq((vector
unsigned char)
__a,
17498 (vector
unsigned char)
__b);
17502vec_vbpermq(vector
unsigned char __a, vector
unsigned char __b) {
17503 return (vector
long long)__builtin_altivec_vbpermq(
__a,
__b);
17506#if defined(__powerpc64__) && defined(__SIZEOF_INT128__)
17507static __inline__ vector
unsigned long long __ATTRS_o_ai
17508vec_bperm(vector
unsigned __int128
__a, vector
unsigned char __b) {
17509 return __builtin_altivec_vbpermq((vector
unsigned char)
__a,
17510 (vector
unsigned char)
__b);
17514vec_bperm(vector
unsigned char __a, vector
unsigned char __b) {
17515 return (vector
unsigned char)__builtin_altivec_vbpermq(
__a,
__b);
17518#ifdef __POWER9_VECTOR__
17519static __inline__ vector
unsigned long long __ATTRS_o_ai
17520vec_bperm(vector
unsigned long long __a, vector
unsigned char __b) {
17521 return __builtin_altivec_vbpermd(
__a,
__b);
17529 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17534 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17540 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17545 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17549 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17554 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17558 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17563 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17568 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17572 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17578 return __builtin_shufflevector(
__a,
__a, 1, 0);
17583 return __builtin_shufflevector(
__a,
__a, 1, 0);
17588 return __builtin_shufflevector(
__a,
__a, 1, 0);
17592 return __builtin_shufflevector(
__a,
__a, 1, 0);
17614 vector
unsigned char __indices =
17615 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17621 vector
unsigned char __indices =
17622 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17628 vector
unsigned char __indices =
17629 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17635 vector
unsigned char __indices =
17636 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17642 vector
unsigned char __indices =
17643 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17649 vector
unsigned char __indices =
17650 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17656 vector
unsigned char __indices =
17657 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17664 vector
unsigned char __indices =
17665 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17671 vector
unsigned char __indices =
17672 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17676static __inline__ vector
unsigned long long __ATTRS_o_ai
17678 vector
unsigned char __indices =
17679 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17685 vector
unsigned char __indices =
17686 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17691#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17692 defined(__SIZEOF_INT128__)
17695 vector
unsigned char __indices =
17696 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
17697 return (vector
signed __int128)
vec_perm((vector
signed int)
__a,
17698 (vector
signed int)
__a,
17702static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17704 vector
unsigned char __indices =
17705 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
17706 return (vector
unsigned __int128)
vec_perm((vector
signed int)
__a,
17707 (vector
signed int)
__a,
17714#define vec_xld2 vec_xl
17715#define vec_xlw4 vec_xl
17717typedef vector
unsigned char unaligned_vec_uchar
__attribute__((aligned(1)));
17718typedef vector
signed short unaligned_vec_sshort
__attribute__((aligned(1)));
17719typedef vector
unsigned short unaligned_vec_ushort
__attribute__((aligned(1)));
17720typedef vector
signed int unaligned_vec_sint
__attribute__((aligned(1)));
17721typedef vector
unsigned int unaligned_vec_uint
__attribute__((aligned(1)));
17722typedef vector
float unaligned_vec_float
__attribute__((aligned(1)));
17725 const signed char *__ptr) {
17726 return *(unaligned_vec_schar *)(__ptr + __offset);
17731 return *(unaligned_vec_uchar*)(__ptr + __offset);
17736 signed char *__addr = (
signed char *)__ptr + __offset;
17737 return *(unaligned_vec_sshort *)__addr;
17742 signed char *__addr = (
signed char *)__ptr + __offset;
17743 return *(unaligned_vec_ushort *)__addr;
17747 const signed int *__ptr) {
17748 signed char *__addr = (
signed char *)__ptr + __offset;
17749 return *(unaligned_vec_sint *)__addr;
17754 signed char *__addr = (
signed char *)__ptr + __offset;
17755 return *(unaligned_vec_uint *)__addr;
17759 const float *__ptr) {
17760 signed char *__addr = (
signed char *)__ptr + __offset;
17761 return *(unaligned_vec_float *)__addr;
17771 signed char *__addr = (
signed char *)__ptr + __offset;
17772 return *(unaligned_vec_sll *)__addr;
17777 signed char *__addr = (
signed char *)__ptr + __offset;
17778 return *(unaligned_vec_ull *)__addr;
17782 const double *__ptr) {
17783 signed char *__addr = (
signed char *)__ptr + __offset;
17784 return *(unaligned_vec_double *)__addr;
17788#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17789 defined(__SIZEOF_INT128__)
17791typedef vector
unsigned __int128 unaligned_vec_ui128
17795 signed char *__addr = (
signed char *)__ptr + __offset;
17796 return *(unaligned_vec_si128 *)__addr;
17801 signed char *__addr = (
signed char *)__ptr + __offset;
17802 return *(unaligned_vec_ui128 *)__addr;
17808#ifdef __LITTLE_ENDIAN__
17811 vector
signed char __vec = (vector
signed char)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17812 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
17813 13, 12, 11, 10, 9, 8);
17818 vector
unsigned char __vec = (vector
unsigned char)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17819 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
17820 13, 12, 11, 10, 9, 8);
17825 vector
signed short __vec = (vector
signed short)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17826 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
17831 vector
unsigned short __vec = (vector
unsigned short)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17832 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
17836vec_xl_be(
signed long long __offset,
const signed int *__ptr) {
17837 return (vector
signed int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17841vec_xl_be(
signed long long __offset,
const unsigned int *__ptr) {
17842 return (vector
unsigned int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17846vec_xl_be(
signed long long __offset,
const float *__ptr) {
17847 return (vector
float)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17852vec_xl_be(
signed long long __offset,
const signed long long *__ptr) {
17853 return (vector
signed long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17856static __inline__ vector
unsigned long long __ATTRS_o_ai
17857vec_xl_be(
signed long long __offset,
const unsigned long long *__ptr) {
17858 return (vector
unsigned long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17862vec_xl_be(
signed long long __offset,
const double *__ptr) {
17863 return (vector
double)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17867#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17868 defined(__SIZEOF_INT128__)
17870vec_xl_be(
signed long long __offset,
const signed __int128 *__ptr) {
17871 return vec_xl(__offset, __ptr);
17874static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17875vec_xl_be(
signed long long __offset,
const unsigned __int128 *__ptr) {
17876 return vec_xl(__offset, __ptr);
17880 #define vec_xl_be vec_xl
17883#if defined(__POWER10_VECTOR__) && defined(__VSX__) && \
17884 defined(__SIZEOF_INT128__)
17889vec_xl_sext(
ptrdiff_t __offset,
const signed char *__pointer) {
17890 return (vector
signed __int128)*(__pointer + __offset);
17894vec_xl_sext(
ptrdiff_t __offset,
const signed short *__pointer) {
17895 return (vector
signed __int128)*(__pointer + __offset);
17899vec_xl_sext(
ptrdiff_t __offset,
const signed int *__pointer) {
17900 return (vector
signed __int128)*(__pointer + __offset);
17904vec_xl_sext(
ptrdiff_t __offset,
const signed long long *__pointer) {
17905 return (vector
signed __int128)*(__pointer + __offset);
17910static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17911vec_xl_zext(
ptrdiff_t __offset,
const unsigned char *__pointer) {
17912 return (vector
unsigned __int128)*(__pointer + __offset);
17915static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17916vec_xl_zext(
ptrdiff_t __offset,
const unsigned short *__pointer) {
17917 return (vector
unsigned __int128)*(__pointer + __offset);
17920static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17921vec_xl_zext(
ptrdiff_t __offset,
const unsigned int *__pointer) {
17922 return (vector
unsigned __int128)*(__pointer + __offset);
17925static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17926vec_xl_zext(
ptrdiff_t __offset,
const unsigned long long *__pointer) {
17927 return (vector
unsigned __int128)*(__pointer + __offset);
17935vec_xlds(
ptrdiff_t __offset,
const signed long long *__ptr) {
17936 signed long long *__addr = (
signed long long*)((
signed char *)__ptr + __offset);
17937 return (vector
signed long long) *__addr;
17940static __inline__ vector
unsigned long long __ATTRS_o_ai
17941vec_xlds(
ptrdiff_t __offset,
const unsigned long long *__ptr) {
17942 unsigned long long *__addr = (
unsigned long long *)((
signed char *)__ptr + __offset);
17943 return (unaligned_vec_ull) *__addr;
17947 const double *__ptr) {
17948 double *__addr = (
double*)((
signed char *)__ptr + __offset);
17949 return (unaligned_vec_double) *__addr;
17954vec_load_splats(
signed long long __offset,
const signed int *__ptr) {
17955 signed int *__addr = (
signed int*)((
signed char *)__ptr + __offset);
17956 return (vector
signed int)*__addr;
17960vec_load_splats(
unsigned long long __offset,
const signed int *__ptr) {
17961 signed int *__addr = (
signed int*)((
signed char *)__ptr + __offset);
17962 return (vector
signed int)*__addr;
17966vec_load_splats(
signed long long __offset,
const unsigned int *__ptr) {
17967 unsigned int *__addr = (
unsigned int*)((
signed char *)__ptr + __offset);
17968 return (vector
unsigned int)*__addr;
17972vec_load_splats(
unsigned long long __offset,
const unsigned int *__ptr) {
17973 unsigned int *__addr = (
unsigned int*)((
signed char *)__ptr + __offset);
17974 return (vector
unsigned int)*__addr;
17978vec_load_splats(
signed long long __offset,
const float *__ptr) {
17979 float *__addr = (
float*)((
signed char *)__ptr + __offset);
17980 return (vector
float)*__addr;
17984vec_load_splats(
unsigned long long __offset,
const float *__ptr) {
17985 float *__addr = (
float*)((
signed char *)__ptr + __offset);
17986 return (vector
float)*__addr;
17992#define vec_xstd2 vec_xst
17993#define vec_xstw4 vec_xst
17996 *(unaligned_vec_schar *)(__ptr + __offset) = __vec;
18001 *(unaligned_vec_uchar *)(__ptr + __offset) = __vec;
18006 signed char *__addr = (
signed char *)__ptr + __offset;
18007 *(unaligned_vec_sshort *)__addr = __vec;
18012 unsigned short *__ptr) {
18013 signed char *__addr = (
signed char *)__ptr + __offset;
18014 *(unaligned_vec_ushort *)__addr = __vec;
18018 ptrdiff_t __offset,
signed int *__ptr) {
18019 signed char *__addr = (
signed char *)__ptr + __offset;
18020 *(unaligned_vec_sint *)__addr = __vec;
18025 signed char *__addr = (
signed char *)__ptr + __offset;
18026 *(unaligned_vec_uint *)__addr = __vec;
18031 signed char *__addr = (
signed char *)__ptr + __offset;
18032 *(unaligned_vec_float *)__addr = __vec;
18038 signed long long *__ptr) {
18039 signed char *__addr = (
signed char *)__ptr + __offset;
18040 *(unaligned_vec_sll *)__addr = __vec;
18045 unsigned long long *__ptr) {
18046 signed char *__addr = (
signed char *)__ptr + __offset;
18047 *(unaligned_vec_ull *)__addr = __vec;
18052 signed char *__addr = (
signed char *)__ptr + __offset;
18053 *(unaligned_vec_double *)__addr = __vec;
18057#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
18058 defined(__SIZEOF_INT128__)
18061 signed __int128 *__ptr) {
18062 signed char *__addr = (
signed char *)__ptr + __offset;
18063 *(unaligned_vec_si128 *)__addr = __vec;
18068 unsigned __int128 *__ptr) {
18069 signed char *__addr = (
signed char *)__ptr + __offset;
18070 *(unaligned_vec_ui128 *)__addr = __vec;
18076#if defined(__POWER10_VECTOR__) && defined(__VSX__) && \
18077 defined(__SIZEOF_INT128__)
18078static inline __ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18080 signed char *__ptr) {
18081 *(__ptr + __offset) = (
signed char)__vec[0];
18084static inline __ATTRS_o_ai void vec_xst_trunc(vector
unsigned __int128 __vec,
18086 unsigned char *__ptr) {
18087 *(__ptr + __offset) = (
unsigned char)__vec[0];
18090static inline __ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18092 signed short *__ptr) {
18093 *(__ptr + __offset) = (
signed short)__vec[0];
18096static inline __ATTRS_o_ai void vec_xst_trunc(vector
unsigned __int128 __vec,
18098 unsigned short *__ptr) {
18099 *(__ptr + __offset) = (
unsigned short)__vec[0];
18102static inline __ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18104 signed int *__ptr) {
18105 *(__ptr + __offset) = (
signed int)__vec[0];
18108static inline __ATTRS_o_ai void vec_xst_trunc(vector
unsigned __int128 __vec,
18110 unsigned int *__ptr) {
18111 *(__ptr + __offset) = (
unsigned int)__vec[0];
18114static inline __ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18116 signed long long *__ptr) {
18117 *(__ptr + __offset) = (
signed long long)__vec[0];
18120static inline __ATTRS_o_ai void vec_xst_trunc(vector
unsigned __int128 __vec,
18122 unsigned long long *__ptr) {
18123 *(__ptr + __offset) = (
unsigned long long)__vec[0];
18129#ifdef __LITTLE_ENDIAN__
18131 signed long long __offset,
18132 signed char *__ptr) {
18133 vector
signed char __tmp =
18134 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
18135 13, 12, 11, 10, 9, 8);
18136 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18137 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18141 signed long long __offset,
18142 unsigned char *__ptr) {
18143 vector
unsigned char __tmp =
18144 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
18145 13, 12, 11, 10, 9, 8);
18146 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18147 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18151 signed long long __offset,
18152 signed short *__ptr) {
18153 vector
signed short __tmp =
18154 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
18155 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18156 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18160 signed long long __offset,
18161 unsigned short *__ptr) {
18162 vector
unsigned short __tmp =
18163 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
18164 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18165 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18169 signed long long __offset,
18170 signed int *__ptr) {
18171 __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr);
18175 signed long long __offset,
18176 unsigned int *__ptr) {
18177 __builtin_vsx_stxvw4x_be((vector
int)__vec, __offset, __ptr);
18181 signed long long __offset,
18183 __builtin_vsx_stxvw4x_be((vector
int)__vec, __offset, __ptr);
18188 signed long long __offset,
18189 signed long long *__ptr) {
18190 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18194 signed long long __offset,
18195 unsigned long long *__ptr) {
18196 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18200 signed long long __offset,
18202 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18206#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
18207 defined(__SIZEOF_INT128__)
18209 signed long long __offset,
18210 signed __int128 *__ptr) {
18211 vec_xst(__vec, __offset, __ptr);
18215 signed long long __offset,
18216 unsigned __int128 *__ptr) {
18217 vec_xst(__vec, __offset, __ptr);
18221 #define vec_xst_be vec_xst
18224#ifdef __POWER9_VECTOR__
18225#define vec_test_data_class(__a, __b) \
18227 (__a), vector float \
18228 : (vector bool int)__builtin_vsx_xvtstdcsp((vector float)(__a), (__b)), \
18230 : (vector bool long long)__builtin_vsx_xvtstdcdp((vector double)(__a), \
18275#ifdef __POWER8_VECTOR__
18277 return __builtin_altivec_vminsd(
__a, -
__a);
18282 return __builtin_altivec_vminsw(
__a, -
__a);
18286 return __builtin_altivec_vminsh(
__a, -
__a);
18290 return __builtin_altivec_vminsb(
__a, -
__a);
18294 vector
float __b) {
18295 return __builtin_ppc_recipdivf(
__a,
__b);
18300 vector
double __b) {
18301 return __builtin_ppc_recipdivd(
__a,
__b);
18305#ifdef __POWER10_VECTOR__
18310vec_extractm(vector
unsigned char __a) {
18311 return __builtin_altivec_vextractbm(
__a);
18315vec_extractm(vector
unsigned short __a) {
18316 return __builtin_altivec_vextracthm(
__a);
18320vec_extractm(vector
unsigned int __a) {
18321 return __builtin_altivec_vextractwm(
__a);
18325vec_extractm(vector
unsigned long long __a) {
18326 return __builtin_altivec_vextractdm(
__a);
18329#ifdef __SIZEOF_INT128__
18331vec_extractm(vector
unsigned __int128
__a) {
18332 return __builtin_altivec_vextractqm(
__a);
18339vec_expandm(vector
unsigned char __a) {
18340 return __builtin_altivec_vexpandbm(
__a);
18344vec_expandm(vector
unsigned short __a) {
18345 return __builtin_altivec_vexpandhm(
__a);
18349vec_expandm(vector
unsigned int __a) {
18350 return __builtin_altivec_vexpandwm(
__a);
18353static __inline__ vector
unsigned long long __ATTRS_o_ai
18354vec_expandm(vector
unsigned long long __a) {
18355 return __builtin_altivec_vexpanddm(
__a);
18358#ifdef __SIZEOF_INT128__
18359static __inline__ vector
unsigned __int128
__ATTRS_o_ai
18360vec_expandm(vector
unsigned __int128
__a) {
18361 return __builtin_altivec_vexpandqm(
__a);
18367#define vec_cntm(__a, __mp) \
18368 _Generic((__a), vector unsigned char \
18369 : __builtin_altivec_vcntmbb((vector unsigned char)(__a), \
18370 (unsigned char)(__mp)), \
18371 vector unsigned short \
18372 : __builtin_altivec_vcntmbh((vector unsigned short)(__a), \
18373 (unsigned char)(__mp)), \
18374 vector unsigned int \
18375 : __builtin_altivec_vcntmbw((vector unsigned int)(__a), \
18376 (unsigned char)(__mp)), \
18377 vector unsigned long long \
18378 : __builtin_altivec_vcntmbd((vector unsigned long long)(__a), \
18379 (unsigned char)(__mp)))
18384vec_genbm(
unsigned long long __bm) {
18385 return __builtin_altivec_mtvsrbm(__bm);
18389vec_genhm(
unsigned long long __bm) {
18390 return __builtin_altivec_mtvsrhm(__bm);
18394vec_genwm(
unsigned long long __bm) {
18395 return __builtin_altivec_mtvsrwm(__bm);
18398static __inline__ vector
unsigned long long __ATTRS_o_ai
18399vec_gendm(
unsigned long long __bm) {
18400 return __builtin_altivec_mtvsrdm(__bm);
18403#ifdef __SIZEOF_INT128__
18404static __inline__ vector
unsigned __int128
__ATTRS_o_ai
18405vec_genqm(
unsigned long long __bm) {
18406 return __builtin_altivec_mtvsrqm(__bm);
18412static __inline__ vector
unsigned long long __ATTRS_o_ai
18413vec_pdep(vector
unsigned long long __a, vector
unsigned long long __b) {
18414 return __builtin_altivec_vpdepd(
__a,
__b);
18419static __inline__ vector
unsigned long long __ATTRS_o_ai
18420vec_pext(vector
unsigned long long __a, vector
unsigned long long __b) {
18421 return __builtin_altivec_vpextd(
__a,
__b);
18426static __inline__ vector
unsigned long long __ATTRS_o_ai
18427vec_cfuge(vector
unsigned long long __a, vector
unsigned long long __b) {
18428 return __builtin_altivec_vcfuged(
__a,
__b);
18433#define vec_gnb(__a, __b) __builtin_altivec_vgnb(__a, __b)
18437#ifdef __SIZEOF_INT128__
18438#define vec_ternarylogic(__a, __b, __c, __imm) \
18439 _Generic((__a), vector unsigned char \
18440 : (vector unsigned char)__builtin_vsx_xxeval( \
18441 (vector unsigned long long)(__a), \
18442 (vector unsigned long long)(__b), \
18443 (vector unsigned long long)(__c), (__imm)), \
18444 vector unsigned short \
18445 : (vector unsigned short)__builtin_vsx_xxeval( \
18446 (vector unsigned long long)(__a), \
18447 (vector unsigned long long)(__b), \
18448 (vector unsigned long long)(__c), (__imm)), \
18449 vector unsigned int \
18450 : (vector unsigned int)__builtin_vsx_xxeval( \
18451 (vector unsigned long long)(__a), \
18452 (vector unsigned long long)(__b), \
18453 (vector unsigned long long)(__c), (__imm)), \
18454 vector unsigned long long \
18455 : (vector unsigned long long)__builtin_vsx_xxeval( \
18456 (vector unsigned long long)(__a), \
18457 (vector unsigned long long)(__b), \
18458 (vector unsigned long long)(__c), (__imm)), \
18459 vector unsigned __int128 \
18460 : (vector unsigned __int128)__builtin_vsx_xxeval( \
18461 (vector unsigned long long)(__a), \
18462 (vector unsigned long long)(__b), \
18463 (vector unsigned long long)(__c), (__imm)))
18465#define vec_ternarylogic(__a, __b, __c, __imm) \
18466 _Generic((__a), vector unsigned char \
18467 : (vector unsigned char)__builtin_vsx_xxeval( \
18468 (vector unsigned long long)(__a), \
18469 (vector unsigned long long)(__b), \
18470 (vector unsigned long long)(__c), (__imm)), \
18471 vector unsigned short \
18472 : (vector unsigned short)__builtin_vsx_xxeval( \
18473 (vector unsigned long long)(__a), \
18474 (vector unsigned long long)(__b), \
18475 (vector unsigned long long)(__c), (__imm)), \
18476 vector unsigned int \
18477 : (vector unsigned int)__builtin_vsx_xxeval( \
18478 (vector unsigned long long)(__a), \
18479 (vector unsigned long long)(__b), \
18480 (vector unsigned long long)(__c), (__imm)), \
18481 vector unsigned long long \
18482 : (vector unsigned long long)__builtin_vsx_xxeval( \
18483 (vector unsigned long long)(__a), \
18484 (vector unsigned long long)(__b), \
18485 (vector unsigned long long)(__c), (__imm)))
18492#define vec_genpcvm(__a, __imm) \
18494 (__a), vector unsigned char \
18495 : __builtin_vsx_xxgenpcvbm((vector unsigned char)(__a), (int)(__imm)), \
18496 vector unsigned short \
18497 : __builtin_vsx_xxgenpcvhm((vector unsigned short)(__a), (int)(__imm)), \
18498 vector unsigned int \
18499 : __builtin_vsx_xxgenpcvwm((vector unsigned int)(__a), (int)(__imm)), \
18500 vector unsigned long long \
18501 : __builtin_vsx_xxgenpcvdm((vector unsigned long long)(__a), \
18508vec_clr_first(vector
signed char __a,
unsigned int __n) {
18509#ifdef __LITTLE_ENDIAN__
18510 return (vector
signed char)__builtin_altivec_vclrrb((vector
unsigned char)
__a,
18513 return (vector
signed char)__builtin_altivec_vclrlb((vector
unsigned char)
__a,
18519vec_clr_first(vector
unsigned char __a,
unsigned int __n) {
18520#ifdef __LITTLE_ENDIAN__
18521 return (vector
unsigned char)__builtin_altivec_vclrrb(
18522 (vector
unsigned char)
__a, __n);
18524 return (vector
unsigned char)__builtin_altivec_vclrlb(
18525 (vector
unsigned char)
__a, __n);
18532vec_clr_last(vector
signed char __a,
unsigned int __n) {
18533#ifdef __LITTLE_ENDIAN__
18534 return (vector
signed char)__builtin_altivec_vclrlb((vector
unsigned char)
__a,
18537 return (vector
signed char)__builtin_altivec_vclrrb((vector
unsigned char)
__a,
18543vec_clr_last(vector
unsigned char __a,
unsigned int __n) {
18544#ifdef __LITTLE_ENDIAN__
18545 return (vector
unsigned char)__builtin_altivec_vclrlb(
18546 (vector
unsigned char)
__a, __n);
18548 return (vector
unsigned char)__builtin_altivec_vclrrb(
18549 (vector
unsigned char)
__a, __n);
18555static __inline__ vector
unsigned long long __ATTRS_o_ai
18556vec_cntlzm(vector
unsigned long long __a, vector
unsigned long long __b) {
18557 return __builtin_altivec_vclzdm(
__a,
__b);
18562static __inline__ vector
unsigned long long __ATTRS_o_ai
18563vec_cnttzm(vector
unsigned long long __a, vector
unsigned long long __b) {
18564 return __builtin_altivec_vctzdm(
__a,
__b);
18570vec_mod(vector
signed int __a, vector
signed int __b) {
18575vec_mod(vector
unsigned int __a, vector
unsigned int __b) {
18580vec_mod(vector
signed long long __a, vector
signed long long __b) {
18584static __inline__ vector
unsigned long long __ATTRS_o_ai
18585vec_mod(vector
unsigned long long __a, vector
unsigned long long __b) {
18589#ifdef __SIZEOF_INT128__
18591vec_mod(vector
signed __int128
__a, vector
signed __int128
__b) {
18595static __inline__ vector
unsigned __int128
__ATTRS_o_ai
18596vec_mod(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
18602#define vec_sldb(__a, __b, __c) \
18604 (__a), vector unsigned char \
18605 : (vector unsigned char)__builtin_altivec_vsldbi( \
18606 (vector unsigned char)__a, (vector unsigned char)__b, \
18608 vector signed char \
18609 : (vector signed char)__builtin_altivec_vsldbi( \
18610 (vector unsigned char)__a, (vector unsigned char)__b, \
18612 vector unsigned short \
18613 : (vector unsigned short)__builtin_altivec_vsldbi( \
18614 (vector unsigned char)__a, (vector unsigned char)__b, \
18616 vector signed short \
18617 : (vector signed short)__builtin_altivec_vsldbi( \
18618 (vector unsigned char)__a, (vector unsigned char)__b, \
18620 vector unsigned int \
18621 : (vector unsigned int)__builtin_altivec_vsldbi( \
18622 (vector unsigned char)__a, (vector unsigned char)__b, \
18624 vector signed int \
18625 : (vector signed int)__builtin_altivec_vsldbi((vector unsigned char)__a, \
18626 (vector unsigned char)__b, \
18628 vector unsigned long long \
18629 : (vector unsigned long long)__builtin_altivec_vsldbi( \
18630 (vector unsigned char)__a, (vector unsigned char)__b, \
18632 vector signed long long \
18633 : (vector signed long long)__builtin_altivec_vsldbi( \
18634 (vector unsigned char)__a, (vector unsigned char)__b, (__c & 0x7)))
18637#define vec_srdb(__a, __b, __c) \
18639 (__a), vector unsigned char \
18640 : (vector unsigned char)__builtin_altivec_vsrdbi( \
18641 (vector unsigned char)__a, (vector unsigned char)__b, \
18643 vector signed char \
18644 : (vector signed char)__builtin_altivec_vsrdbi( \
18645 (vector unsigned char)__a, (vector unsigned char)__b, \
18647 vector unsigned short \
18648 : (vector unsigned short)__builtin_altivec_vsrdbi( \
18649 (vector unsigned char)__a, (vector unsigned char)__b, \
18651 vector signed short \
18652 : (vector signed short)__builtin_altivec_vsrdbi( \
18653 (vector unsigned char)__a, (vector unsigned char)__b, \
18655 vector unsigned int \
18656 : (vector unsigned int)__builtin_altivec_vsrdbi( \
18657 (vector unsigned char)__a, (vector unsigned char)__b, \
18659 vector signed int \
18660 : (vector signed int)__builtin_altivec_vsrdbi((vector unsigned char)__a, \
18661 (vector unsigned char)__b, \
18663 vector unsigned long long \
18664 : (vector unsigned long long)__builtin_altivec_vsrdbi( \
18665 (vector unsigned char)__a, (vector unsigned char)__b, \
18667 vector signed long long \
18668 : (vector signed long long)__builtin_altivec_vsrdbi( \
18669 (vector unsigned char)__a, (vector unsigned char)__b, (__c & 0x7)))
18674vec_insertl(
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18675#ifdef __LITTLE_ENDIAN__
18676 return __builtin_altivec_vinsbrx(
__b,
__c,
__a);
18678 return __builtin_altivec_vinsblx(
__b,
__c,
__a);
18683vec_insertl(
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18684#ifdef __LITTLE_ENDIAN__
18685 return __builtin_altivec_vinshrx(
__b,
__c,
__a);
18687 return __builtin_altivec_vinshlx(
__b,
__c,
__a);
18692vec_insertl(
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18693#ifdef __LITTLE_ENDIAN__
18694 return __builtin_altivec_vinswrx(
__b,
__c,
__a);
18696 return __builtin_altivec_vinswlx(
__b,
__c,
__a);
18700static __inline__ vector
unsigned long long __ATTRS_o_ai
18701vec_insertl(
unsigned long long __a, vector
unsigned long long __b,
18702 unsigned int __c) {
18703#ifdef __LITTLE_ENDIAN__
18704 return __builtin_altivec_vinsdrx(
__b,
__c,
__a);
18706 return __builtin_altivec_vinsdlx(
__b,
__c,
__a);
18711vec_insertl(vector
unsigned char __a, vector
unsigned char __b,
18712 unsigned int __c) {
18713#ifdef __LITTLE_ENDIAN__
18714 return __builtin_altivec_vinsbvrx(
__b,
__c,
__a);
18716 return __builtin_altivec_vinsbvlx(
__b,
__c,
__a);
18721vec_insertl(vector
unsigned short __a, vector
unsigned short __b,
18722 unsigned int __c) {
18723#ifdef __LITTLE_ENDIAN__
18724 return __builtin_altivec_vinshvrx(
__b,
__c,
__a);
18726 return __builtin_altivec_vinshvlx(
__b,
__c,
__a);
18731vec_insertl(vector
unsigned int __a, vector
unsigned int __b,
18732 unsigned int __c) {
18733#ifdef __LITTLE_ENDIAN__
18734 return __builtin_altivec_vinswvrx(
__b,
__c,
__a);
18736 return __builtin_altivec_vinswvlx(
__b,
__c,
__a);
18743vec_inserth(
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18744#ifdef __LITTLE_ENDIAN__
18745 return __builtin_altivec_vinsblx(
__b,
__c,
__a);
18747 return __builtin_altivec_vinsbrx(
__b,
__c,
__a);
18752vec_inserth(
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18753#ifdef __LITTLE_ENDIAN__
18754 return __builtin_altivec_vinshlx(
__b,
__c,
__a);
18756 return __builtin_altivec_vinshrx(
__b,
__c,
__a);
18761vec_inserth(
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18762#ifdef __LITTLE_ENDIAN__
18763 return __builtin_altivec_vinswlx(
__b,
__c,
__a);
18765 return __builtin_altivec_vinswrx(
__b,
__c,
__a);
18769static __inline__ vector
unsigned long long __ATTRS_o_ai
18770vec_inserth(
unsigned long long __a, vector
unsigned long long __b,
18771 unsigned int __c) {
18772#ifdef __LITTLE_ENDIAN__
18773 return __builtin_altivec_vinsdlx(
__b,
__c,
__a);
18775 return __builtin_altivec_vinsdrx(
__b,
__c,
__a);
18780vec_inserth(vector
unsigned char __a, vector
unsigned char __b,
18781 unsigned int __c) {
18782#ifdef __LITTLE_ENDIAN__
18783 return __builtin_altivec_vinsbvlx(
__b,
__c,
__a);
18785 return __builtin_altivec_vinsbvrx(
__b,
__c,
__a);
18790vec_inserth(vector
unsigned short __a, vector
unsigned short __b,
18791 unsigned int __c) {
18792#ifdef __LITTLE_ENDIAN__
18793 return __builtin_altivec_vinshvlx(
__b,
__c,
__a);
18795 return __builtin_altivec_vinshvrx(
__b,
__c,
__a);
18800vec_inserth(vector
unsigned int __a, vector
unsigned int __b,
18801 unsigned int __c) {
18802#ifdef __LITTLE_ENDIAN__
18803 return __builtin_altivec_vinswvlx(
__b,
__c,
__a);
18805 return __builtin_altivec_vinswvrx(
__b,
__c,
__a);
18811static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extractl(
18812 vector
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18813#ifdef __LITTLE_ENDIAN__
18814 return __builtin_altivec_vextdubvrx(
__a,
__b,
__c);
18816 vector
unsigned long long __ret = __builtin_altivec_vextdubvlx(
__a,
__b,
__c);
18817 return vec_sld(__ret, __ret, 8);
18821static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extractl(
18822 vector
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18823#ifdef __LITTLE_ENDIAN__
18824 return __builtin_altivec_vextduhvrx(
__a,
__b,
__c);
18826 vector
unsigned long long __ret = __builtin_altivec_vextduhvlx(
__a,
__b,
__c);
18827 return vec_sld(__ret, __ret, 8);
18831static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extractl(
18832 vector
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18833#ifdef __LITTLE_ENDIAN__
18834 return __builtin_altivec_vextduwvrx(
__a,
__b,
__c);
18836 vector
unsigned long long __ret = __builtin_altivec_vextduwvlx(
__a,
__b,
__c);
18837 return vec_sld(__ret, __ret, 8);
18841static __inline__ vector
unsigned long long __ATTRS_o_ai
18842vec_extractl(vector
unsigned long long __a, vector
unsigned long long __b,
18843 unsigned int __c) {
18844#ifdef __LITTLE_ENDIAN__
18845 return __builtin_altivec_vextddvrx(
__a,
__b,
__c);
18847 vector
unsigned long long __ret = __builtin_altivec_vextddvlx(
__a,
__b,
__c);
18848 return vec_sld(__ret, __ret, 8);
18854static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extracth(
18855 vector
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18856#ifdef __LITTLE_ENDIAN__
18857 return __builtin_altivec_vextdubvlx(
__a,
__b,
__c);
18859 vector
unsigned long long __ret = __builtin_altivec_vextdubvrx(
__a,
__b,
__c);
18860 return vec_sld(__ret, __ret, 8);
18864static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extracth(
18865 vector
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18866#ifdef __LITTLE_ENDIAN__
18867 return __builtin_altivec_vextduhvlx(
__a,
__b,
__c);
18869 vector
unsigned long long __ret = __builtin_altivec_vextduhvrx(
__a,
__b,
__c);
18870 return vec_sld(__ret, __ret, 8);
18874static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extracth(
18875 vector
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18876#ifdef __LITTLE_ENDIAN__
18877 return __builtin_altivec_vextduwvlx(
__a,
__b,
__c);
18879 vector
unsigned long long __ret = __builtin_altivec_vextduwvrx(
__a,
__b,
__c);
18880 return vec_sld(__ret, __ret, 8);
18884static __inline__ vector
unsigned long long __ATTRS_o_ai
18885vec_extracth(vector
unsigned long long __a, vector
unsigned long long __b,
18886 unsigned int __c) {
18887#ifdef __LITTLE_ENDIAN__
18888 return __builtin_altivec_vextddvlx(
__a,
__b,
__c);
18890 vector
unsigned long long __ret = __builtin_altivec_vextddvrx(
__a,
__b,
__c);
18891 return vec_sld(__ret, __ret, 8);
18898#define vec_permx(__a, __b, __c, __d) \
18900 (__a), vector unsigned char \
18901 : (vector unsigned char)__builtin_vsx_xxpermx( \
18902 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18903 vector signed char \
18904 : (vector signed char)__builtin_vsx_xxpermx( \
18905 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18906 vector unsigned short \
18907 : (vector unsigned short)__builtin_vsx_xxpermx( \
18908 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18909 vector signed short \
18910 : (vector signed short)__builtin_vsx_xxpermx( \
18911 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18912 vector unsigned int \
18913 : (vector unsigned int)__builtin_vsx_xxpermx( \
18914 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18915 vector signed int \
18916 : (vector signed int)__builtin_vsx_xxpermx( \
18917 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18918 vector unsigned long long \
18919 : (vector unsigned long long)__builtin_vsx_xxpermx( \
18920 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18921 vector signed long long \
18922 : (vector signed long long)__builtin_vsx_xxpermx( \
18923 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18925 : (vector float)__builtin_vsx_xxpermx( \
18926 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18928 : (vector double)__builtin_vsx_xxpermx( \
18929 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d))
18934vec_blendv(vector
signed char __a, vector
signed char __b,
18935 vector
unsigned char __c) {
18936 return (vector
signed char)__builtin_vsx_xxblendvb(
18937 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
__c);
18941vec_blendv(vector
unsigned char __a, vector
unsigned char __b,
18942 vector
unsigned char __c) {
18943 return __builtin_vsx_xxblendvb(
__a,
__b,
__c);
18947vec_blendv(vector
signed short __a, vector
signed short __b,
18948 vector
unsigned short __c) {
18949 return (vector
signed short)__builtin_vsx_xxblendvh(
18950 (vector
unsigned short)
__a, (vector
unsigned short)
__b,
__c);
18954vec_blendv(vector
unsigned short __a, vector
unsigned short __b,
18955 vector
unsigned short __c) {
18956 return __builtin_vsx_xxblendvh(
__a,
__b,
__c);
18960vec_blendv(vector
signed int __a, vector
signed int __b,
18961 vector
unsigned int __c) {
18962 return (vector
signed int)__builtin_vsx_xxblendvw(
18963 (vector
unsigned int)
__a, (vector
unsigned int)
__b,
__c);
18967vec_blendv(vector
unsigned int __a, vector
unsigned int __b,
18968 vector
unsigned int __c) {
18969 return __builtin_vsx_xxblendvw(
__a,
__b,
__c);
18973vec_blendv(vector
signed long long __a, vector
signed long long __b,
18974 vector
unsigned long long __c) {
18975 return (vector
signed long long)__builtin_vsx_xxblendvd(
18976 (vector
unsigned long long)
__a, (vector
unsigned long long)
__b,
__c);
18979static __inline__ vector
unsigned long long __ATTRS_o_ai
18980vec_blendv(vector
unsigned long long __a, vector
unsigned long long __b,
18981 vector
unsigned long long __c) {
18982 return (vector
unsigned long long)__builtin_vsx_xxblendvd(
__a,
__b,
__c);
18986vec_blendv(vector
float __a, vector
float __b, vector
unsigned int __c) {
18987 return (vector
float)__builtin_vsx_xxblendvw((vector
unsigned int)
__a,
18988 (vector
unsigned int)
__b,
__c);
18992vec_blendv(vector
double __a, vector
double __b,
18993 vector
unsigned long long __c) {
18994 return (vector
double)__builtin_vsx_xxblendvd(
18995 (vector
unsigned long long)
__a, (vector
unsigned long long)
__b,
__c);
18998#define vec_replace_unaligned(__a, __b, __c) \
18999 _Generic((__a), vector signed int \
19000 : __builtin_altivec_vinsw((vector unsigned char)__a, \
19001 (unsigned int)__b, __c), \
19002 vector unsigned int \
19003 : __builtin_altivec_vinsw((vector unsigned char)__a, \
19004 (unsigned int)__b, __c), \
19005 vector unsigned long long \
19006 : __builtin_altivec_vinsd((vector unsigned char)__a, \
19007 (unsigned long long)__b, __c), \
19008 vector signed long long \
19009 : __builtin_altivec_vinsd((vector unsigned char)__a, \
19010 (unsigned long long)__b, __c), \
19012 : __builtin_altivec_vinsw((vector unsigned char)__a, \
19013 (unsigned int)__b, __c), \
19015 : __builtin_altivec_vinsd((vector unsigned char)__a, \
19016 (unsigned long long)__b, __c))
19018#define vec_replace_elt(__a, __b, __c) \
19019 _Generic((__a), vector signed int \
19020 : (vector signed int)__builtin_altivec_vinsw_elt( \
19021 (vector unsigned char)__a, (unsigned int)__b, __c), \
19022 vector unsigned int \
19023 : (vector unsigned int)__builtin_altivec_vinsw_elt( \
19024 (vector unsigned char)__a, (unsigned int)__b, __c), \
19025 vector unsigned long long \
19026 : (vector unsigned long long)__builtin_altivec_vinsd_elt( \
19027 (vector unsigned char)__a, (unsigned long long)__b, __c), \
19028 vector signed long long \
19029 : (vector signed long long)__builtin_altivec_vinsd_elt( \
19030 (vector unsigned char)__a, (unsigned long long)__b, __c), \
19032 : (vector float)__builtin_altivec_vinsw_elt( \
19033 (vector unsigned char)__a, (unsigned int)__b, __c), \
19035 : (vector double)__builtin_altivec_vinsd_elt( \
19036 (vector unsigned char)__a, (unsigned long long)__b, __c))
19040#define vec_splati(__a) \
19041 _Generic((__a), signed int \
19042 : ((vector signed int)__a), unsigned int \
19043 : ((vector unsigned int)__a), float \
19044 : ((vector float)__a))
19048static __inline__ vector
double __ATTRS_o_ai vec_splatid(
const float __a) {
19049 return ((vector
double)((
double)
__a));
19054static __inline__ vector
signed int __ATTRS_o_ai vec_splati_ins(
19055 vector
signed int __a,
const unsigned int __b,
const signed int __c) {
19056 const unsigned int __d =
__b & 0x01;
19057#ifdef __LITTLE_ENDIAN__
19067static __inline__ vector
unsigned int __ATTRS_o_ai vec_splati_ins(
19068 vector
unsigned int __a,
const unsigned int __b,
const unsigned int __c) {
19069 const unsigned int __d =
__b & 0x01;
19070#ifdef __LITTLE_ENDIAN__
19081vec_splati_ins(vector
float __a,
const unsigned int __b,
const float __c) {
19082 const unsigned int __d =
__b & 0x01;
19083#ifdef __LITTLE_ENDIAN__
19096vec_test_lsbb_all_ones(vector
unsigned char __a) {
19097 return __builtin_vsx_xvtlsbb(
__a, 1);
19103vec_test_lsbb_all_zeros(vector
unsigned char __a) {
19104 return __builtin_vsx_xvtlsbb(
__a, 0);
19111vec_stril(vector
unsigned char __a) {
19112#ifdef __LITTLE_ENDIAN__
19113 return (vector
unsigned char)__builtin_altivec_vstribr(
19114 (vector
unsigned char)
__a);
19116 return (vector
unsigned char)__builtin_altivec_vstribl(
19117 (vector
unsigned char)
__a);
19122vec_stril(vector
signed char __a) {
19123#ifdef __LITTLE_ENDIAN__
19124 return (vector
signed char)__builtin_altivec_vstribr(
19125 (vector
unsigned char)
__a);
19127 return (vector
signed char)__builtin_altivec_vstribl(
19128 (vector
unsigned char)
__a);
19133vec_stril(vector
unsigned short __a) {
19134#ifdef __LITTLE_ENDIAN__
19135 return (vector
unsigned short)__builtin_altivec_vstrihr(
19136 (vector
signed short)
__a);
19138 return (vector
unsigned short)__builtin_altivec_vstrihl(
19139 (vector
signed short)
__a);
19144vec_stril(vector
signed short __a) {
19145#ifdef __LITTLE_ENDIAN__
19146 return __builtin_altivec_vstrihr(
__a);
19148 return __builtin_altivec_vstrihl(
__a);
19154static __inline__
int __ATTRS_o_ai vec_stril_p(vector
unsigned char __a) {
19155#ifdef __LITTLE_ENDIAN__
19156 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19158 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19162static __inline__
int __ATTRS_o_ai vec_stril_p(vector
signed char __a) {
19163#ifdef __LITTLE_ENDIAN__
19164 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19166 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19170static __inline__
int __ATTRS_o_ai vec_stril_p(vector
unsigned short __a) {
19171#ifdef __LITTLE_ENDIAN__
19172 return __builtin_altivec_vstrihr_p(
__CR6_EQ, (vector
signed short)
__a);
19174 return __builtin_altivec_vstrihl_p(
__CR6_EQ, (vector
signed short)
__a);
19178static __inline__
int __ATTRS_o_ai vec_stril_p(vector
signed short __a) {
19179#ifdef __LITTLE_ENDIAN__
19180 return __builtin_altivec_vstrihr_p(
__CR6_EQ,
__a);
19182 return __builtin_altivec_vstrihl_p(
__CR6_EQ,
__a);
19189vec_strir(vector
unsigned char __a) {
19190#ifdef __LITTLE_ENDIAN__
19191 return (vector
unsigned char)__builtin_altivec_vstribl(
19192 (vector
unsigned char)
__a);
19194 return (vector
unsigned char)__builtin_altivec_vstribr(
19195 (vector
unsigned char)
__a);
19200vec_strir(vector
signed char __a) {
19201#ifdef __LITTLE_ENDIAN__
19202 return (vector
signed char)__builtin_altivec_vstribl(
19203 (vector
unsigned char)
__a);
19205 return (vector
signed char)__builtin_altivec_vstribr(
19206 (vector
unsigned char)
__a);
19211vec_strir(vector
unsigned short __a) {
19212#ifdef __LITTLE_ENDIAN__
19213 return (vector
unsigned short)__builtin_altivec_vstrihl(
19214 (vector
signed short)
__a);
19216 return (vector
unsigned short)__builtin_altivec_vstrihr(
19217 (vector
signed short)
__a);
19222vec_strir(vector
signed short __a) {
19223#ifdef __LITTLE_ENDIAN__
19224 return __builtin_altivec_vstrihl(
__a);
19226 return __builtin_altivec_vstrihr(
__a);
19232static __inline__
int __ATTRS_o_ai vec_strir_p(vector
unsigned char __a) {
19233#ifdef __LITTLE_ENDIAN__
19234 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19236 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19240static __inline__
int __ATTRS_o_ai vec_strir_p(vector
signed char __a) {
19241#ifdef __LITTLE_ENDIAN__
19242 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19244 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19248static __inline__
int __ATTRS_o_ai vec_strir_p(vector
unsigned short __a) {
19249#ifdef __LITTLE_ENDIAN__
19250 return __builtin_altivec_vstrihl_p(
__CR6_EQ, (vector
signed short)
__a);
19252 return __builtin_altivec_vstrihr_p(
__CR6_EQ, (vector
signed short)
__a);
19256static __inline__
int __ATTRS_o_ai vec_strir_p(vector
signed short __a) {
19257#ifdef __LITTLE_ENDIAN__
19258 return __builtin_altivec_vstrihl_p(
__CR6_EQ,
__a);
19260 return __builtin_altivec_vstrihr_p(
__CR6_EQ,
__a);
19266#ifdef __SIZEOF_INT128__
19267static __inline__ vector
unsigned __int128
__ATTRS_o_ai
19268vec_sl(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
19269 return __a << (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19274vec_sl(vector
signed __int128
__a, vector
unsigned __int128
__b) {
19275 return __a << (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19279static __inline__ vector
unsigned __int128
__ATTRS_o_ai
19280vec_sr(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
19281 return __a >> (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19286vec_sr(vector
signed __int128
__a, vector
unsigned __int128
__b) {
19288 vector
signed __int128)(((vector
unsigned __int128)
__a) >>
19290 (vector
unsigned __int128)(
sizeof(
19291 unsigned __int128) *
19295static __inline__ vector
unsigned __int128
__ATTRS_o_ai
19296vec_sra(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
19298 vector
unsigned __int128)(((vector
signed __int128)
__a) >>
19300 (vector
unsigned __int128)(
sizeof(
19301 unsigned __int128) *
19306vec_sra(vector
signed __int128
__a, vector
unsigned __int128
__b) {
19307 return __a >> (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19314#ifdef __POWER8_VECTOR__
19315#define __bcdadd(__a, __b, __ps) __builtin_ppc_bcdadd((__a), (__b), (__ps))
19316#define __bcdsub(__a, __b, __ps) __builtin_ppc_bcdsub((__a), (__b), (__ps))
19318static __inline__
long __bcdadd_ofl(vector
unsigned char __a,
19319 vector
unsigned char __b) {
19323static __inline__
long __bcdsub_ofl(vector
unsigned char __a,
19324 vector
unsigned char __b) {
19328static __inline__
long __bcd_invalid(vector
unsigned char __a) {
19332static __inline__
long __bcdcmpeq(vector
unsigned char __a,
19333 vector
unsigned char __b) {
19337static __inline__
long __bcdcmplt(vector
unsigned char __a,
19338 vector
unsigned char __b) {
19342static __inline__
long __bcdcmpgt(vector
unsigned char __a,
19343 vector
unsigned char __b) {
19347static __inline__
long __bcdcmple(vector
unsigned char __a,
19348 vector
unsigned char __b) {
19352static __inline__
long __bcdcmpge(vector
unsigned char __a,
19353 vector
unsigned char __b) {
__PTRDIFF_TYPE__ ptrdiff_t
static __inline__ vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector int __b)
static __inline__ vector int __ATTRS_o_ai vec_lvewx(long __a, const int *__b)
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 unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vadduhs(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a, vector signed char __b)
static __inline__ void __ATTRS_o_ai vec_stvx(vector signed char __a, long __b, vector signed char *__c)
static __inline__ vector short __ATTRS_o_ai vec_vmaxsh(vector short __a, vector short __b)
static __inline__ signed char __ATTRS_o_ai vec_extract(vector signed char __a, signed int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sra(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvx(long __a, const vector signed char *__b)
static __inline__ vector int __ATTRS_o_ai vec_vmrghw(vector int __a, vector int __b)
static __inline__ vector short __ATTRS_o_ai vec_vsubshs(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sro(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvrx(int __a, const signed char *__b)
static __inline__ void __ATTRS_o_ai vec_stvehx(vector short __a, long __b, short *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_abss(vector signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector float __ATTRS_o_ai vec_ceil(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vslb(vector signed char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vsplth(vector short __a, unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vmladduhm(vector short __a, vector short __b, vector short __c)
static __inline__ vector int __ATTRS_o_ai vec_vupkhsh(vector short __a)
static __inline__ int __ATTRS_o_ai vec_any_ngt(vector float __a, vector float __b)
static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lde(long __a, const signed char *__b)
static __inline__ void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b, signed char *__c)
static __ATTRS_o_ai vector signed char vec_xl(ptrdiff_t __offset, const signed char *__ptr)
static __inline__ vector int __ATTRS_o_ai vec_vsraw(vector int __a, vector unsigned int __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpne(vector bool char __a, vector bool char __b)
static __inline__ int __ATTRS_o_ai vec_any_nge(vector float __a, vector float __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sldw(vector signed char __a, vector signed char __b, unsigned const int __c)
vector signed char unaligned_vec_schar __attribute__((aligned(1)))
static __inline__ vector short __ATTRS_o_ai vec_vslh(vector short __a, vector unsigned short __b)
static __inline__ vector float vector float vector float __c
static __inline__ vector short __ATTRS_o_ai vec_vaddshs(vector short __a, vector short __b)
static __inline__ vector int __ATTRS_o_ai vec_msum(vector signed char __a, vector unsigned char __b, vector int __c)
static __inline__ vector short __ATTRS_o_ai vec_mule(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_le(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vspltish(signed char __a)
static __inline__ vector float vector float __b
static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const signed char *__b)
static vector float __ATTRS_o_ai vec_recipdiv(vector float __a, vector float __b)
static __inline__ vector short __ATTRS_o_ai vec_vsubuhm(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_ld(long __a, const vector signed char *__b)
static __inline__ vector float __ATTRS_o_ai vec_round(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vrlb(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed int __ATTRS_o_ai vec_subc(vector signed int __a, vector signed int __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vpkuhum(vector signed short __a, vector signed short __b)
static __inline__ vector signed int __ATTRS_o_ai vec_addc(vector signed int __a, vector signed int __b)
static __inline__ int __ATTRS_o_ai vec_all_le(vector signed char __a, vector signed char __b)
static __ATTRS_o_ai vector bool char vec_reve(vector bool char __a)
static __inline__ vector short __ATTRS_o_ai vec_vminsh(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_splats(signed char __a)
static __inline__ vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a)
static __inline__ vector bool char __ATTRS_o_ai vec_revb(vector bool char __a)
static __inline__ int __ATTRS_o_ai vec_any_nan(vector float __a)
static __inline__ int __ATTRS_o_ai vec_all_eq(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__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const signed char *__b)
static __inline__ void __ATTRS_o_ai vec_st(vector signed char __a, long __b, vector signed char *__c)
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_vsrw(vector int __a, vector unsigned int __b)
static __inline__ vector short __ATTRS_o_ai vec_unpackl(vector signed char __a)
static __inline__ int __ATTRS_o_ai vec_all_ne(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__ void __ATTRS_o_ai vec_mtvscr(vector signed char __a)
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_mul(vector signed char __a, vector signed char __b)
static __inline__ void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b, vector signed char *__c)
static __inline__ vector signed int __ATTRS_o_ai vec_signed(vector float __a)
static __inline__ void __ATTRS_o_ai vec_stl(vector signed char __a, int __b, vector signed char *__c)
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_avg(vector signed char __a, vector signed char __b)
static __ATTRS_o_ai void vec_xst(vector signed char __vec, ptrdiff_t __offset, signed char *__ptr)
static __inline__ vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a)
static __inline__ int __ATTRS_o_ai vec_all_nan(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vspltisw(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_subs(vector signed char __a, vector signed 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_vxor(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__ int __ATTRS_o_ai vec_all_ngt(vector float __a, vector float __b)
static __inline__ vector float __ATTRS_o_ai vec_floor(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_lvlx(int __a, const signed char *__b)
static __inline__ vector short __ATTRS_o_ai vec_vrlh(vector short __a, vector unsigned short __b)
static __inline__ vector int __ATTRS_o_ai vec_vrlw(vector int __a, vector unsigned int __b)
static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_splat_s32(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vmrglb(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 unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a, vector unsigned short __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__ vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsububm(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_stvlx(vector signed char __a, int __b, signed char *__c)
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 signed char __ATTRS_o_ai vec_lvxl(long __a, const vector signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_numeric(vector float __a)
static __inline__ vector float __ATTRS_o_ai vec_float(vector signed int __a)
static __inline__ vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_mergeh(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vupklsh(vector short __a)
static __inline__ vector signed char __ATTRS_o_ai vec_lvebx(long __a, const signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsldoi(vector signed char __a, vector signed char __b, unsigned char __c)
static __inline__ vector signed char __ATTRS_o_ai vec_rl(vector signed char __a, vector unsigned char __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_unsigned(vector float __a)
static __inline__ vector int __ATTRS_o_ai vec_vslw(vector int __a, vector unsigned int __b)
static __inline__ void __ATTRS_o_ai vec_ste(vector signed char __a, long __b, signed char *__c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vpkswus(vector int __a, vector int __b)
static __inline__ vector short __ATTRS_o_ai vec_vsrh(vector short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmrghb(vector signed char __a, vector signed char __b)
static __inline__ vector float __ATTRS_o_ai vec_roundp(vector float __a)
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_max(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__ int __ATTRS_o_ai vec_any_ge(vector signed char __a, vector signed char __b)
static __inline__ void __ATTRS_o_ai vec_stvewx(vector int __a, long __b, int *__c)
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 int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_slo(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_all_numeric(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_nor(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vpkuwum(vector int __a, vector int __b)
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_lvlxl(int __a, const signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_pack(vector signed short __a, vector signed short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_ldl(long __a, const vector signed char *__b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_packsu(vector short __a, vector short __b)
static __inline__ vector short __ATTRS_o_ai vec_mulo(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_all_nge(vector float __a, vector float __b)
static __inline__ vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_srl(vector signed char __a, vector unsigned char __b)
static vector float __ATTRS_o_ai vec_rsqrt(vector float __a)
static __inline__ vector float __ATTRS_o_ai vec_re(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_min(vector signed char __a, vector signed char __b)
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_splat(vector signed char __a, unsigned const int __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_vminuw(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvrxl(int __a, const signed char *__b)
static vector float __ATTRS_o_ai vec_neg(vector float __a)
static vector float __ATTRS_o_ai vec_nabs(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_or(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_unpackh(vector signed char __a)
static __inline__ vector short __ATTRS_o_ai vec_vmrghh(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_sl(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vadduhm(vector short __a, vector short __b)
static __inline__ vector short __ATTRS_o_ai vec_splat_s16(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vminsb(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 signed char __ATTRS_o_ai vec_vperm(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ vector short __ATTRS_o_ai vec_lvehx(long __a, const short *__b)
static __inline__ void __ATTRS_o_ai vec_stvebx(vector signed char __a, long __b, signed char *__c)
static __inline__ vector int __ATTRS_o_ai vec_vaddsws(vector int __a, vector int __b)
static __inline__ int __ATTRS_o_ai vec_any_nlt(vector float __a, vector float __b)
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_abs(vector signed char __a)
static __inline__ void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed short __ATTRS_o_ai vec_madd(vector signed short __a, vector signed short __b, vector signed short __c)
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_lt(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector int __b)
static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed char __a, vector signed char __b)
static __inline__ vector float __ATTRS_o_ai vec_roundm(vector float __a)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector int __b)
static __inline__ vector float __ATTRS_o_ai vec_rsqrte(vector float __a)
static __inline__ int __ATTRS_o_ai vec_all_nle(vector float __a, vector float __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a, vector unsigned char __b)
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_vspltb(vector signed char __a, unsigned char __b)
static __inline__ vector float __ATTRS_o_ai vec_trunc(vector float __a)
static __inline__ vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a)
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_insert(signed char __a, vector signed char __b, int __c)
static __inline__ vector signed char __ATTRS_o_ai vec_sll(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsrb(vector signed char __a, vector unsigned char __b)
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_vsro(vector signed char __a, vector signed char __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmple(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 unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a)
static __inline__ vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector int __b)
static __inline__ int __ATTRS_o_ai vec_all_nlt(vector float __a, vector float __b)
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_vspltisb(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_div(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_msums(vector short __a, vector short __b, vector int __c)
static __inline__ vector signed char __ATTRS_o_ai vec_vor(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 float __ATTRS_o_ai vec_roundz(vector float __a)
static __inline__ int __ATTRS_o_ai vec_any_nle(vector float __a, vector float __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sub(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vsrah(vector short __a, vector unsigned short __b)
static __inline__ vector float __ATTRS_o_ai vec_nmsub(vector float __a, vector float __b, vector float __c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a, vector unsigned int __b)
static __inline__ void int __a
constexpr bool aligned(uintptr_t Value)