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));
2120#ifdef __POWER8_VECTOR__
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_elementwise_popcount(
2506 (vector
unsigned char)
__a);
2509vec_popcnt(vector
unsigned char __a) {
2510 return __builtin_elementwise_popcount(
__a);
2513vec_popcnt(vector
signed short __a) {
2514 return (vector
unsigned short)__builtin_elementwise_popcount(
2515 (vector
unsigned short)
__a);
2518vec_popcnt(vector
unsigned short __a) {
2519 return __builtin_elementwise_popcount(
__a);
2522vec_popcnt(vector
signed int __a) {
2523 return __builtin_elementwise_popcount((vector
unsigned int)
__a);
2526vec_popcnt(vector
unsigned int __a) {
2527 return __builtin_elementwise_popcount(
__a);
2529static __inline__ vector
unsigned long long __ATTRS_o_ai
2530vec_popcnt(vector
signed long long __a) {
2531 return __builtin_elementwise_popcount((vector
unsigned long long)
__a);
2533static __inline__ vector
unsigned long long __ATTRS_o_ai
2534vec_popcnt(vector
unsigned long long __a) {
2535 return __builtin_elementwise_popcount(
__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);
6407#ifdef __FUTURE_VECTOR__
6408static __inline__ vector
signed short
6410 return __builtin_altivec_vmulhsh(
__a,
__b);
6414vec_mulh(vector
unsigned short __a, vector
unsigned short __b) {
6415 return __builtin_altivec_vmulhuh(
__a,
__b);
6422 vector
signed char __b) {
6423#ifdef __LITTLE_ENDIAN__
6424 return __builtin_altivec_vmulesb(
__a,
__b);
6426 return __builtin_altivec_vmulosb(
__a,
__b);
6432#ifdef __LITTLE_ENDIAN__
6433 return __builtin_altivec_vmuleub(
__a,
__b);
6435 return __builtin_altivec_vmuloub(
__a,
__b);
6441#ifdef __LITTLE_ENDIAN__
6442 return __builtin_altivec_vmulesh(
__a,
__b);
6444 return __builtin_altivec_vmulosh(
__a,
__b);
6450#ifdef __LITTLE_ENDIAN__
6451 return __builtin_altivec_vmuleuh(
__a,
__b);
6453 return __builtin_altivec_vmulouh(
__a,
__b);
6457#ifdef __POWER8_VECTOR__
6460#ifdef __LITTLE_ENDIAN__
6461 return __builtin_altivec_vmulesw(
__a,
__b);
6463 return __builtin_altivec_vmulosw(
__a,
__b);
6467static __inline__ vector
unsigned long long __ATTRS_o_ai
6469#ifdef __LITTLE_ENDIAN__
6470 return __builtin_altivec_vmuleuw(
__a,
__b);
6472 return __builtin_altivec_vmulouw(
__a,
__b);
6477#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
6479vec_mulo(vector
signed long long __a, vector
signed long long __b) {
6480#ifdef __LITTLE_ENDIAN__
6481 return __builtin_altivec_vmulesd(
__a,
__b);
6483 return __builtin_altivec_vmulosd(
__a,
__b);
6488vec_mulo(vector
unsigned long long __a, vector
unsigned long long __b) {
6489#ifdef __LITTLE_ENDIAN__
6490 return __builtin_altivec_vmuleud(
__a,
__b);
6492 return __builtin_altivec_vmuloud(
__a,
__b);
6499static __inline__ vector
short __attribute__((__always_inline__))
6500vec_vmulosb(vector
signed char __a, vector
signed char __b) {
6501#ifdef __LITTLE_ENDIAN__
6502 return __builtin_altivec_vmulesb(
__a,
__b);
6504 return __builtin_altivec_vmulosb(
__a,
__b);
6510static __inline__ vector
unsigned short __attribute__((__always_inline__))
6511vec_vmuloub(vector
unsigned char __a, vector
unsigned char __b) {
6512#ifdef __LITTLE_ENDIAN__
6513 return __builtin_altivec_vmuleub(
__a,
__b);
6515 return __builtin_altivec_vmuloub(
__a,
__b);
6521static __inline__ vector
int __attribute__((__always_inline__))
6522vec_vmulosh(vector
short __a, vector
short __b) {
6523#ifdef __LITTLE_ENDIAN__
6524 return __builtin_altivec_vmulesh(
__a,
__b);
6526 return __builtin_altivec_vmulosh(
__a,
__b);
6532static __inline__ vector
unsigned int __attribute__((__always_inline__))
6533vec_vmulouh(vector
unsigned short __a, vector
unsigned short __b) {
6534#ifdef __LITTLE_ENDIAN__
6535 return __builtin_altivec_vmuleuh(
__a,
__b);
6537 return __builtin_altivec_vmulouh(
__a,
__b);
6543#ifdef __POWER8_VECTOR__
6545vec_nand(vector
signed char __a, vector
signed char __b) {
6550vec_nand(vector
signed char __a, vector
bool char __b) {
6551 return ~(
__a & (vector
signed char)
__b);
6555vec_nand(vector
bool char __a, vector
signed char __b) {
6556 return (vector
signed char)~(
__a & (vector
bool char)
__b);
6560vec_nand(vector
unsigned char __a, vector
unsigned char __b) {
6565vec_nand(vector
unsigned char __a, vector
bool char __b) {
6566 return ~(
__a & (vector
unsigned char)
__b);
6570vec_nand(vector
bool char __a, vector
unsigned char __b) {
6571 return (vector
unsigned char)~(
__a & (vector
bool char)
__b);
6574static __inline__ vector
bool char __ATTRS_o_ai vec_nand(vector
bool char __a,
6575 vector
bool char __b) {
6580vec_nand(vector
signed short __a, vector
signed short __b) {
6585vec_nand(vector
signed short __a, vector
bool short __b) {
6586 return ~(
__a & (vector
signed short)
__b);
6590vec_nand(vector
bool short __a, vector
signed short __b) {
6591 return (vector
signed short)~(
__a & (vector
bool short)
__b);
6595vec_nand(vector
unsigned short __a, vector
unsigned short __b) {
6600vec_nand(vector
unsigned short __a, vector
bool short __b) {
6601 return ~(
__a & (vector
unsigned short)
__b);
6605vec_nand(vector
bool short __a, vector
bool short __b) {
6610vec_nand(vector
signed int __a, vector
signed int __b) {
6614static __inline__ vector
signed int __ATTRS_o_ai vec_nand(vector
signed int __a,
6615 vector
bool int __b) {
6620vec_nand(vector
bool int __a, vector
signed int __b) {
6621 return (vector
signed int)~(
__a & (vector
bool int)
__b);
6625vec_nand(vector
unsigned int __a, vector
unsigned int __b) {
6630vec_nand(vector
unsigned int __a, vector
bool int __b) {
6631 return ~(
__a & (vector
unsigned int)
__b);
6635vec_nand(vector
bool int __a, vector
unsigned int __b) {
6636 return (vector
unsigned int)~(
__a & (vector
bool int)
__b);
6639static __inline__ vector
bool int __ATTRS_o_ai vec_nand(vector
bool int __a,
6640 vector
bool int __b) {
6645vec_nand(vector
float __a, vector
float __b) {
6646 return (vector
float)(~((vector
unsigned int)
__a &
6647 (vector
unsigned int)
__b));
6651vec_nand(vector
signed long long __a, vector
signed long long __b) {
6656vec_nand(vector
signed long long __a, vector
bool long long __b) {
6657 return ~(
__a & (vector
signed long long)
__b);
6661vec_nand(vector
bool long long __a, vector
signed long long __b) {
6662 return (vector
signed long long)~(
__a & (vector
bool long long)
__b);
6665static __inline__ vector
unsigned long long __ATTRS_o_ai
6666vec_nand(vector
unsigned long long __a, vector
unsigned long long __b) {
6670static __inline__ vector
unsigned long long __ATTRS_o_ai
6671vec_nand(vector
unsigned long long __a, vector
bool long long __b) {
6672 return ~(
__a & (vector
unsigned long long)
__b);
6675static __inline__ vector
unsigned long long __ATTRS_o_ai
6676vec_nand(vector
bool long long __a, vector
unsigned long long __b) {
6677 return (vector
unsigned long long)~(
__a & (vector
bool long long)
__b);
6681vec_nand(vector
bool long long __a, vector
bool long long __b) {
6686vec_nand(vector
double __a, vector
double __b) {
6687 return (vector
double)(~((vector
unsigned long long)
__a &
6688 (vector
unsigned long long)
__b));
6696static __inline__ vector
float __ATTRS_o_ai vec_nmadd(vector
float __a,
6699 return __builtin_vsx_xvnmaddasp(
__a,
__b,
__c);
6702static __inline__ vector
double __ATTRS_o_ai vec_nmadd(vector
double __a,
6704 vector
double __c) {
6705 return __builtin_vsx_xvnmaddadp(
__a,
__b,
__c);
6715 return __builtin_vsx_xvnmsubasp(
__a,
__b,
__c);
6717 return __builtin_altivec_vnmsubfp(
__a,
__b,
__c);
6724 vector
double __c) {
6725 return __builtin_vsx_xvnmsubadp(
__a,
__b,
__c);
6731static __inline__ vector
float __attribute__((__always_inline__))
6732vec_vnmsubfp(vector
float __a, vector
float __b, vector
float __c) {
6733 return __builtin_altivec_vnmsubfp(
__a,
__b,
__c);
6738#define __builtin_altivec_vnor vec_nor
6751 vector
bool char __b) {
6781 vector
bool int __b) {
6787 vector
unsigned int __res =
6788 ~((vector
unsigned int)
__a | (vector
unsigned int)
__b);
6789 return (vector
float)__res;
6794 vector
double __b) {
6795 vector
unsigned long long __res =
6796 ~((vector
unsigned long long)
__a | (vector
unsigned long long)
__b);
6797 return (vector
double)__res;
6814 vector
bool char __b) {
6844 vector
bool int __b) {
6850 vector
unsigned int __res =
6851 ~((vector
unsigned int)
__a | (vector
unsigned int)
__b);
6852 return (vector
float)__res;
6857vec_nor(vector
signed long long __a, vector
signed long long __b) {
6861static __inline__ vector
unsigned long long __ATTRS_o_ai
6862vec_nor(vector
unsigned long long __a, vector
unsigned long long __b) {
6867vec_nor(vector
bool long long __a, vector
bool long long __b) {
6874#define __builtin_altivec_vor vec_or
6883 return (vector
signed char)
__a |
__b;
6887 vector
bool char __b) {
6888 return __a | (vector
signed char)
__b;
6898 return (vector
unsigned char)
__a |
__b;
6903 return __a | (vector
unsigned char)
__b;
6907 vector
bool char __b) {
6918 return (vector
short)
__a |
__b;
6922 vector
bool short __b) {
6923 return __a | (vector short)
__b;
6933 return (vector
unsigned short)
__a |
__b;
6938 return __a | (vector
unsigned short)
__b;
6942 vector
bool short __b) {
6953 return (vector
int)
__a |
__b;
6957 vector
bool int __b) {
6968 return (vector
unsigned int)
__a |
__b;
6977 vector
bool int __b) {
6983 vector
unsigned int __res =
6984 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
6985 return (vector
float)__res;
6990 vector
unsigned int __res =
6991 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
6992 return (vector
float)__res;
6996 vector
bool int __b) {
6997 vector
unsigned int __res =
6998 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
6999 return (vector
float)__res;
7004 vector
double __b) {
7005 return (vector
double)((vector
unsigned long long)
__a |
7006 (vector
unsigned long long)
__b);
7010 vector
bool long long __b) {
7011 return (vector
double)((vector
unsigned long long)
__a |
7012 (vector
unsigned long long)
__b);
7016 vector
double __b) {
7017 return (vector
double)((vector
unsigned long long)
__a |
7018 (vector
unsigned long long)
__b);
7022vec_or(vector
signed long long __a, vector
signed long long __b) {
7027vec_or(vector
bool long long __a, vector
signed long long __b) {
7028 return (vector
signed long long)
__a |
__b;
7032vec_or(vector
signed long long __a, vector
bool long long __b) {
7033 return __a | (vector
signed long long)
__b;
7036static __inline__ vector
unsigned long long __ATTRS_o_ai
7037vec_or(vector
unsigned long long __a, vector
unsigned long long __b) {
7041static __inline__ vector
unsigned long long __ATTRS_o_ai
7042vec_or(vector
bool long long __a, vector
unsigned long long __b) {
7043 return (vector
unsigned long long)
__a |
__b;
7046static __inline__ vector
unsigned long long __ATTRS_o_ai
7047vec_or(vector
unsigned long long __a, vector
bool long long __b) {
7048 return __a | (vector
unsigned long long)
__b;
7052vec_or(vector
bool long long __a, vector
bool long long __b) {
7057#ifdef __POWER8_VECTOR__
7059vec_orc(vector
signed char __a, vector
signed char __b) {
7064vec_orc(vector
signed char __a, vector
bool char __b) {
7065 return __a | (vector
signed char)~
__b;
7069vec_orc(vector
bool char __a, vector
signed char __b) {
7070 return (vector
signed char)(
__a | (vector
bool char)
~__b);
7074vec_orc(vector
unsigned char __a, vector
unsigned char __b) {
7079vec_orc(vector
unsigned char __a, vector
bool char __b) {
7080 return __a | (vector
unsigned char)~
__b;
7084vec_orc(vector
bool char __a, vector
unsigned char __b) {
7085 return (vector
unsigned char)(
__a | (vector
bool char)
~__b);
7088static __inline__ vector
bool char __ATTRS_o_ai vec_orc(vector
bool char __a,
7089 vector
bool char __b) {
7094vec_orc(vector
signed short __a, vector
signed short __b) {
7099vec_orc(vector
signed short __a, vector
bool short __b) {
7100 return __a | (vector
signed short)~
__b;
7104vec_orc(vector
bool short __a, vector
signed short __b) {
7105 return (vector
signed short)(
__a | (vector
bool short)
~__b);
7109vec_orc(vector
unsigned short __a, vector
unsigned short __b) {
7114vec_orc(vector
unsigned short __a, vector
bool short __b) {
7115 return __a | (vector
unsigned short)~
__b;
7119vec_orc(vector
bool short __a, vector
unsigned short __b) {
7120 return (vector
unsigned short)(
__a | (vector
bool short)
~__b);
7124vec_orc(vector
bool short __a, vector
bool short __b) {
7129vec_orc(vector
signed int __a, vector
signed int __b) {
7133static __inline__ vector
signed int __ATTRS_o_ai vec_orc(vector
signed int __a,
7134 vector
bool int __b) {
7139vec_orc(vector
bool int __a, vector
signed int __b) {
7140 return (vector
signed int)(
__a | (vector
bool int)
~__b);
7144vec_orc(vector
unsigned int __a, vector
unsigned int __b) {
7149vec_orc(vector
unsigned int __a, vector
bool int __b) {
7154vec_orc(vector
bool int __a, vector
unsigned int __b) {
7155 return (vector
unsigned int)(
__a | (vector
bool int)
~__b);
7158static __inline__ vector
bool int __ATTRS_o_ai vec_orc(vector
bool int __a,
7159 vector
bool int __b) {
7164vec_orc(vector
bool int __a, vector
float __b) {
7165 return (vector
float)(
__a | ~(vector
bool int)
__b);
7169vec_orc(vector
float __a, vector
bool int __b) {
7170 return (vector
float)((vector
bool int)
__a |
~__b);
7175 return (vector
float)((vector
unsigned int)
__a | ~(vector
unsigned int)
__b);
7179vec_orc(vector
signed long long __a, vector
signed long long __b) {
7184vec_orc(vector
signed long long __a, vector
bool long long __b) {
7185 return __a | (vector
signed long long)~
__b;
7189vec_orc(vector
bool long long __a, vector
signed long long __b) {
7190 return (vector
signed long long)(
__a | (vector
bool long long)
~__b);
7193static __inline__ vector
unsigned long long __ATTRS_o_ai
7194vec_orc(vector
unsigned long long __a, vector
unsigned long long __b) {
7198static __inline__ vector
unsigned long long __ATTRS_o_ai
7199vec_orc(vector
unsigned long long __a, vector
bool long long __b) {
7200 return __a | (vector
unsigned long long)~
__b;
7203static __inline__ vector
unsigned long long __ATTRS_o_ai
7204vec_orc(vector
bool long long __a, vector
unsigned long long __b) {
7205 return (vector
unsigned long long)(
__a | (vector
bool long long)
~__b);
7209vec_orc(vector
bool long long __a, vector
bool long long __b) {
7214vec_orc(vector
double __a, vector
bool long long __b) {
7215 return (vector
double)((vector
bool long long)
__a |
~__b);
7219vec_orc(vector
bool long long __a, vector
double __b) {
7220 return (vector
double)(
__a | ~(vector
bool long long)
__b);
7223static __inline__ vector
double __ATTRS_o_ai vec_orc(vector
double __a,
7224 vector
double __b) {
7225 return (vector
double)((vector
unsigned long long)
__a |
7226 ~(vector
unsigned long long)
__b);
7239 return (vector
signed char)
__a |
__b;
7244 return __a | (vector
signed char)
__b;
7254 return (vector
unsigned char)
__a |
__b;
7259 return __a | (vector
unsigned char)
__b;
7263 vector
bool char __b) {
7274 return (vector
short)
__a |
__b;
7278 vector
bool short __b) {
7279 return __a | (vector short)
__b;
7289 return (vector
unsigned short)
__a |
__b;
7294 return __a | (vector
unsigned short)
__b;
7309 return (vector
int)
__a |
__b;
7313 vector
bool int __b) {
7324 return (vector
unsigned int)
__a |
__b;
7333 vector
bool int __b) {
7339 vector
unsigned int __res =
7340 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7341 return (vector
float)__res;
7346 vector
unsigned int __res =
7347 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7348 return (vector
float)__res;
7352 vector
bool int __b) {
7353 vector
unsigned int __res =
7354 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7355 return (vector
float)__res;
7360vec_vor(vector
signed long long __a, vector
signed long long __b) {
7365vec_vor(vector
bool long long __a, vector
signed long long __b) {
7366 return (vector
signed long long)
__a |
__b;
7370vec_vor(vector
signed long long __a, vector
bool long long __b) {
7371 return __a | (vector
signed long long)
__b;
7374static __inline__ vector
unsigned long long __ATTRS_o_ai
7375vec_vor(vector
unsigned long long __a, vector
unsigned long long __b) {
7379static __inline__ vector
unsigned long long __ATTRS_o_ai
7380vec_vor(vector
bool long long __a, vector
unsigned long long __b) {
7381 return (vector
unsigned long long)
__a |
__b;
7384static __inline__ vector
unsigned long long __ATTRS_o_ai
7385vec_vor(vector
unsigned long long __a, vector
bool long long __b) {
7386 return __a | (vector
unsigned long long)
__b;
7390vec_vor(vector
bool long long __a, vector
bool long long __b) {
7402#ifdef __LITTLE_ENDIAN__
7403 return (vector
signed char)
vec_perm(
7405 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7406 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7408 return (vector
signed char)
vec_perm(
7410 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7411 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7417#ifdef __LITTLE_ENDIAN__
7418 return (vector
unsigned char)
vec_perm(
7420 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7421 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7423 return (vector
unsigned char)
vec_perm(
7425 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7426 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7432#ifdef __LITTLE_ENDIAN__
7435 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7436 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7440 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7441 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7447#ifdef __LITTLE_ENDIAN__
7450 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7451 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7455 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7456 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7462#ifdef __LITTLE_ENDIAN__
7463 return (vector
unsigned short)
vec_perm(
7465 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7466 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7468 return (vector
unsigned short)
vec_perm(
7470 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7471 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7476 vector
bool int __b) {
7477#ifdef __LITTLE_ENDIAN__
7478 return (vector
bool short)
vec_perm(
7480 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7481 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7483 return (vector
bool short)
vec_perm(
7485 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7486 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7492vec_pack(vector
signed long long __a, vector
signed long long __b) {
7493#ifdef __LITTLE_ENDIAN__
7494 return (vector
signed int)
vec_perm(
7496 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7497 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7499 return (vector
signed int)
vec_perm(
7501 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7502 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7506vec_pack(vector
unsigned long long __a, vector
unsigned long long __b) {
7507#ifdef __LITTLE_ENDIAN__
7508 return (vector
unsigned int)
vec_perm(
7510 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7511 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7513 return (vector
unsigned int)
vec_perm(
7515 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7516 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7522#ifdef __LITTLE_ENDIAN__
7525 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7526 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7530 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7531 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7537 return (vector
float) (
__a[0],
__a[1],
__b[0],
__b[1]);
7541#ifdef __POWER9_VECTOR__
7543vec_pack_to_short_fp32(vector
float __a, vector
float __b) {
7544 vector
float __resa = __builtin_vsx_xvcvsphp(
__a);
7545 vector
float __resb = __builtin_vsx_xvcvsphp(
__b);
7546#ifdef __LITTLE_ENDIAN__
7547 return (vector
unsigned short)vec_mergee(__resa, __resb);
7549 return (vector
unsigned short)vec_mergeo(__resa, __resb);
7556#define __builtin_altivec_vpkuhum vec_vpkuhum
7560#ifdef __LITTLE_ENDIAN__
7561 return (vector
signed char)
vec_perm(
7563 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7564 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7566 return (vector
signed char)
vec_perm(
7568 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7569 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7575#ifdef __LITTLE_ENDIAN__
7576 return (vector
unsigned char)
vec_perm(
7578 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7579 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7581 return (vector
unsigned char)
vec_perm(
7583 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7584 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7590#ifdef __LITTLE_ENDIAN__
7593 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7594 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7598 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7599 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7605#define __builtin_altivec_vpkuwum vec_vpkuwum
7609#ifdef __LITTLE_ENDIAN__
7612 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7613 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7617 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7618 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7624#ifdef __LITTLE_ENDIAN__
7625 return (vector
unsigned short)
vec_perm(
7627 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7628 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7630 return (vector
unsigned short)
vec_perm(
7632 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7633 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7639#ifdef __LITTLE_ENDIAN__
7640 return (vector
bool short)
vec_perm(
7642 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7643 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7645 return (vector
bool short)
vec_perm(
7647 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7648 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7654#ifdef __POWER8_VECTOR__
7655#define __builtin_altivec_vpkudum vec_vpkudum
7657static __inline__ vector
int __ATTRS_o_ai vec_vpkudum(vector
long long __a,
7658 vector
long long __b) {
7659#ifdef __LITTLE_ENDIAN__
7662 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7663 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7667 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7668 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7673vec_vpkudum(vector
unsigned long long __a, vector
unsigned long long __b) {
7674#ifdef __LITTLE_ENDIAN__
7675 return (vector
unsigned int)
vec_perm(
7677 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7678 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7680 return (vector
unsigned int)
vec_perm(
7682 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7683 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7688vec_vpkudum(vector
bool long long __a, vector
bool long long __b) {
7689#ifdef __LITTLE_ENDIAN__
7691 (vector
long long)
__a, (vector
long long)
__b,
7692 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7693 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7696 (vector
long long)
__a, (vector
long long)
__b,
7697 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7698 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7705static __inline__ vector pixel
__attribute__((__always_inline__))
7706vec_packpx(vector
unsigned int __a, vector
unsigned int __b) {
7707#ifdef __LITTLE_ENDIAN__
7708 return (vector pixel)__builtin_altivec_vpkpx(
__b,
__a);
7710 return (vector pixel)__builtin_altivec_vpkpx(
__a,
__b);
7716static __inline__ vector pixel
__attribute__((__always_inline__))
7717vec_vpkpx(vector
unsigned int __a, vector
unsigned int __b) {
7718#ifdef __LITTLE_ENDIAN__
7719 return (vector pixel)__builtin_altivec_vpkpx(
__b,
__a);
7721 return (vector pixel)__builtin_altivec_vpkpx(
__a,
__b);
7729#ifdef __LITTLE_ENDIAN__
7730 return __builtin_altivec_vpkshss(
__b,
__a);
7732 return __builtin_altivec_vpkshss(
__a,
__b);
7738#ifdef __LITTLE_ENDIAN__
7739 return __builtin_altivec_vpkuhus(
__b,
__a);
7741 return __builtin_altivec_vpkuhus(
__a,
__b);
7747#ifdef __LITTLE_ENDIAN__
7748 return __builtin_altivec_vpkswss(
__b,
__a);
7750 return __builtin_altivec_vpkswss(
__a,
__b);
7756#ifdef __LITTLE_ENDIAN__
7757 return __builtin_altivec_vpkuwus(
__b,
__a);
7759 return __builtin_altivec_vpkuwus(
__a,
__b);
7763#ifdef __POWER8_VECTOR__
7765 vector
long long __b) {
7766#ifdef __LITTLE_ENDIAN__
7767 return __builtin_altivec_vpksdss(
__b,
__a);
7769 return __builtin_altivec_vpksdss(
__a,
__b);
7774vec_packs(vector
unsigned long long __a, vector
unsigned long long __b) {
7775#ifdef __LITTLE_ENDIAN__
7776 return __builtin_altivec_vpkudus(
__b,
__a);
7778 return __builtin_altivec_vpkudus(
__a,
__b);
7785static __inline__ vector
signed char __attribute__((__always_inline__))
7786vec_vpkshss(vector
short __a, vector
short __b) {
7787#ifdef __LITTLE_ENDIAN__
7788 return __builtin_altivec_vpkshss(
__b,
__a);
7790 return __builtin_altivec_vpkshss(
__a,
__b);
7796#ifdef __POWER8_VECTOR__
7797static __inline__ vector
int __ATTRS_o_ai vec_vpksdss(vector
long long __a,
7798 vector
long long __b) {
7799#ifdef __LITTLE_ENDIAN__
7800 return __builtin_altivec_vpksdss(
__b,
__a);
7802 return __builtin_altivec_vpksdss(
__a,
__b);
7809static __inline__ vector
unsigned char __attribute__((__always_inline__))
7810vec_vpkuhus(vector
unsigned short __a, vector
unsigned short __b) {
7811#ifdef __LITTLE_ENDIAN__
7812 return __builtin_altivec_vpkuhus(
__b,
__a);
7814 return __builtin_altivec_vpkuhus(
__a,
__b);
7820#ifdef __POWER8_VECTOR__
7821static __inline__ vector
unsigned int __attribute__((__always_inline__))
7822vec_vpkudus(vector
unsigned long long __a, vector
unsigned long long __b) {
7823#ifdef __LITTLE_ENDIAN__
7824 return __builtin_altivec_vpkudus(
__b,
__a);
7826 return __builtin_altivec_vpkudus(
__a,
__b);
7833static __inline__ vector
signed short __attribute__((__always_inline__))
7834vec_vpkswss(vector
int __a, vector
int __b) {
7835#ifdef __LITTLE_ENDIAN__
7836 return __builtin_altivec_vpkswss(
__b,
__a);
7838 return __builtin_altivec_vpkswss(
__a,
__b);
7844static __inline__ vector
unsigned short __attribute__((__always_inline__))
7845vec_vpkuwus(vector
unsigned int __a, vector
unsigned int __b) {
7846#ifdef __LITTLE_ENDIAN__
7847 return __builtin_altivec_vpkuwus(
__b,
__a);
7849 return __builtin_altivec_vpkuwus(
__a,
__b);
7857#ifdef __LITTLE_ENDIAN__
7858 return __builtin_altivec_vpkshus(
__b,
__a);
7860 return __builtin_altivec_vpkshus(
__a,
__b);
7866#ifdef __LITTLE_ENDIAN__
7867 return __builtin_altivec_vpkuhus(
__b,
__a);
7869 return __builtin_altivec_vpkuhus(
__a,
__b);
7875#ifdef __LITTLE_ENDIAN__
7876 return __builtin_altivec_vpkswus(
__b,
__a);
7878 return __builtin_altivec_vpkswus(
__a,
__b);
7884#ifdef __LITTLE_ENDIAN__
7885 return __builtin_altivec_vpkuwus(
__b,
__a);
7887 return __builtin_altivec_vpkuwus(
__a,
__b);
7891#ifdef __POWER8_VECTOR__
7894#ifdef __LITTLE_ENDIAN__
7895 return __builtin_altivec_vpksdus(
__b,
__a);
7897 return __builtin_altivec_vpksdus(
__a,
__b);
7903#ifdef __LITTLE_ENDIAN__
7904 return __builtin_altivec_vpkudus(
__b,
__a);
7906 return __builtin_altivec_vpkudus(
__a,
__b);
7915#ifdef __LITTLE_ENDIAN__
7916 return __builtin_altivec_vpkshus(
__b,
__a);
7918 return __builtin_altivec_vpkshus(
__a,
__b);
7924#ifdef __LITTLE_ENDIAN__
7925 return __builtin_altivec_vpkuhus(
__b,
__a);
7927 return __builtin_altivec_vpkuhus(
__a,
__b);
7935#ifdef __LITTLE_ENDIAN__
7936 return __builtin_altivec_vpkswus(
__b,
__a);
7938 return __builtin_altivec_vpkswus(
__a,
__b);
7944#ifdef __LITTLE_ENDIAN__
7945 return __builtin_altivec_vpkuwus(
__b,
__a);
7947 return __builtin_altivec_vpkuwus(
__a,
__b);
7953#ifdef __POWER8_VECTOR__
7955vec_vpksdus(vector
long long __a, vector
long long __b) {
7956#ifdef __LITTLE_ENDIAN__
7957 return __builtin_altivec_vpksdus(
__b,
__a);
7959 return __builtin_altivec_vpksdus(
__a,
__b);
7975 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7976#ifdef __LITTLE_ENDIAN__
7977 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7978 255, 255, 255, 255, 255, 255, 255, 255};
7980 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)
__b,
7981 (vector
int)
__a, __d);
7983 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)
__a,
7990 vector
unsigned char __c) {
7991#ifdef __LITTLE_ENDIAN__
7992 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7993 255, 255, 255, 255, 255, 255, 255, 255};
7995 return (vector
unsigned char)__builtin_altivec_vperm_4si(
7996 (vector
int)
__b, (vector
int)
__a, __d);
7998 return (vector
unsigned char)__builtin_altivec_vperm_4si(
8005#ifdef __LITTLE_ENDIAN__
8006 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8007 255, 255, 255, 255, 255, 255, 255, 255};
8009 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)
__b,
8010 (vector
int)
__a, __d);
8012 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)
__a,
8018 vector
signed short __b,
8019 vector
unsigned char __c) {
8020#ifdef __LITTLE_ENDIAN__
8021 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8022 255, 255, 255, 255, 255, 255, 255, 255};
8024 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)
__b,
8025 (vector
int)
__a, __d);
8027 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)
__a,
8034 vector
unsigned char __c) {
8035#ifdef __LITTLE_ENDIAN__
8036 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8037 255, 255, 255, 255, 255, 255, 255, 255};
8039 return (vector
unsigned short)__builtin_altivec_vperm_4si(
8040 (vector
int)
__b, (vector
int)
__a, __d);
8042 return (vector
unsigned short)__builtin_altivec_vperm_4si(
8048 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
8049#ifdef __LITTLE_ENDIAN__
8050 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8051 255, 255, 255, 255, 255, 255, 255, 255};
8053 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)
__b,
8054 (vector
int)
__a, __d);
8056 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)
__a,
8063 vector
unsigned char __c) {
8064#ifdef __LITTLE_ENDIAN__
8065 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8066 255, 255, 255, 255, 255, 255, 255, 255};
8068 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)
__b,
8069 (vector
int)
__a, __d);
8071 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)
__a,
8077 vector
signed int __b,
8078 vector
unsigned char __c) {
8079#ifdef __LITTLE_ENDIAN__
8080 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8081 255, 255, 255, 255, 255, 255, 255, 255};
8083 return (vector
signed int)__builtin_altivec_vperm_4si(
__b,
__a, __d);
8085 return (vector
signed int)__builtin_altivec_vperm_4si(
__a,
__b,
__c);
8091 vector
unsigned char __c) {
8092#ifdef __LITTLE_ENDIAN__
8093 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8094 255, 255, 255, 255, 255, 255, 255, 255};
8096 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)
__b,
8097 (vector
int)
__a, __d);
8099 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)
__a,
8106#ifdef __LITTLE_ENDIAN__
8107 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8108 255, 255, 255, 255, 255, 255, 255, 255};
8110 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)
__b,
8111 (vector
int)
__a, __d);
8113 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)
__a,
8120 vector
unsigned char __c) {
8121#ifdef __LITTLE_ENDIAN__
8122 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8123 255, 255, 255, 255, 255, 255, 255, 255};
8125 return (vector
float)__builtin_altivec_vperm_4si((vector
int)
__b,
8126 (vector
int)
__a, __d);
8128 return (vector
float)__builtin_altivec_vperm_4si((vector
int)
__a,
8135vec_perm(vector
signed long long __a, vector
signed long long __b,
8136 vector
unsigned char __c) {
8137#ifdef __LITTLE_ENDIAN__
8138 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8139 255, 255, 255, 255, 255, 255, 255, 255};
8141 return (vector
signed long long)__builtin_altivec_vperm_4si(
8142 (vector
int)
__b, (vector
int)
__a, __d);
8144 return (vector
signed long long)__builtin_altivec_vperm_4si(
8149static __inline__ vector
unsigned long long __ATTRS_o_ai
8150vec_perm(vector
unsigned long long __a, vector
unsigned long long __b,
8151 vector
unsigned char __c) {
8152#ifdef __LITTLE_ENDIAN__
8153 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8154 255, 255, 255, 255, 255, 255, 255, 255};
8156 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
8157 (vector
int)
__b, (vector
int)
__a, __d);
8159 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
8166 vector
unsigned char __c) {
8167#ifdef __LITTLE_ENDIAN__
8168 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8169 255, 255, 255, 255, 255, 255, 255, 255};
8171 return (vector
bool long long)__builtin_altivec_vperm_4si(
8172 (vector
int)
__b, (vector
int)
__a, __d);
8174 return (vector
bool long long)__builtin_altivec_vperm_4si(
8181#ifdef __LITTLE_ENDIAN__
8182 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8183 255, 255, 255, 255, 255, 255, 255, 255};
8185 return (vector
double)__builtin_altivec_vperm_4si((vector
int)
__b,
8186 (vector
int)
__a, __d);
8188 return (vector
double)__builtin_altivec_vperm_4si((vector
int)
__a,
8197 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8203 vector
unsigned char __c) {
8208 vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
8219 vector
unsigned char __c) {
8224 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
8235 vector
unsigned char __c) {
8241 vector
unsigned char __c) {
8257 vector
long long __a, vector
long long __b, vector
unsigned char __c) {
8261static __inline__ vector
unsigned long long __ATTRS_o_ai
8262vec_vperm(vector
unsigned long long __a, vector
unsigned long long __b,
8263 vector
unsigned char __c) {
8277 return __builtin_vsx_xvresp(
__a);
8279 return __builtin_altivec_vrefp(
__a);
8285 return __builtin_vsx_xvredp(
__a);
8291static __inline__ vector
float __attribute__((__always_inline__))
8292vec_vrefp(vector
float __a) {
8293 return __builtin_altivec_vrefp(
__a);
8300 return (vector
signed char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8305 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8309 vector
unsigned short __b) {
8310 return __builtin_altivec_vrlh(
__a,
__b);
8315 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)
__a,
__b);
8319 vector
unsigned int __b) {
8320 return __builtin_altivec_vrlw(
__a,
__b);
8325 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)
__a,
__b);
8328#ifdef __POWER8_VECTOR__
8330vec_rl(vector
signed long long __a, vector
unsigned long long __b) {
8331 return __builtin_altivec_vrld(
__a,
__b);
8334static __inline__ vector
unsigned long long __ATTRS_o_ai
8335vec_rl(vector
unsigned long long __a, vector
unsigned long long __b) {
8336 return (vector
unsigned long long)__builtin_altivec_vrld(
8337 (vector
long long)
__a,
__b);
8341#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8343vec_rl(vector
signed __int128
__a, vector
unsigned __int128
__b) {
8344 return (vector
signed __int128)(((vector
unsigned __int128)
__b
8345 << (vector
unsigned __int128)
__a) |
8346 ((vector
unsigned __int128)
__b >>
8348 sizeof(vector
unsigned __int128)) -
8349 (vector
unsigned __int128)
__a)));
8353vec_rl(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
8354 return (
__b <<
__a)|(
__b >> ((__CHAR_BIT__ *
sizeof(vector
unsigned __int128)) -
__a));
8359#ifdef __POWER9_VECTOR__
8361vec_rlmi(vector
unsigned int __a, vector
unsigned int __b,
8362 vector
unsigned int __c) {
8363 return __builtin_altivec_vrlwmi(
__a,
__c,
__b);
8366static __inline__ vector
unsigned long long __ATTRS_o_ai
8367vec_rlmi(vector
unsigned long long __a, vector
unsigned long long __b,
8368 vector
unsigned long long __c) {
8369 return __builtin_altivec_vrldmi(
__a,
__c,
__b);
8373#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8375vec_rlmi(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
8376 vector
unsigned __int128
__c) {
8377 return __builtin_altivec_vrlqmi(
__a,
__c,
__b);
8381vec_rlmi(vector
signed __int128
__a, vector
signed __int128
__b,
8382 vector
signed __int128
__c) {
8383 return (vector
signed __int128)__builtin_altivec_vrlqmi(
8384 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__c,
8385 (vector
unsigned __int128)
__b);
8390#ifdef __POWER9_VECTOR__
8392vec_rlnm(vector
unsigned int __a, vector
unsigned int __b,
8393 vector
unsigned int __c) {
8394 vector
unsigned int OneByte = { 0x8, 0x8, 0x8, 0x8 };
8395 return __builtin_altivec_vrlwnm(
__a, ((
__c << OneByte) |
__b));
8398static __inline__ vector
unsigned long long __ATTRS_o_ai
8399vec_rlnm(vector
unsigned long long __a, vector
unsigned long long __b,
8400 vector
unsigned long long __c) {
8401 vector
unsigned long long OneByte = { 0x8, 0x8 };
8402 return __builtin_altivec_vrldnm(
__a, ((
__c << OneByte) |
__b));
8406#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8408vec_rlnm(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
8409 vector
unsigned __int128
__c) {
8411 vector
unsigned char TmpB = (vector
unsigned char)
__b;
8412 vector
unsigned char TmpC = (vector
unsigned char)
__c;
8413 vector
unsigned char MaskAndShift =
8414#ifdef __LITTLE_ENDIAN__
8415 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, -1, -1, -1, 16, 0,
8416 1, -1, -1, -1, -1, -1);
8418 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1,
8419 -1, -1, -1, -1, -1, -1, -1);
8421 return __builtin_altivec_vrlqnm(
__a, (vector
unsigned __int128) MaskAndShift);
8425vec_rlnm(vector
signed __int128
__a, vector
signed __int128
__b,
8426 vector
signed __int128
__c) {
8428 vector
unsigned char TmpB = (vector
unsigned char)
__b;
8429 vector
unsigned char TmpC = (vector
unsigned char)
__c;
8430 vector
unsigned char MaskAndShift =
8431#ifdef __LITTLE_ENDIAN__
8432 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, -1, -1, -1, 16, 0,
8433 1, -1, -1, -1, -1, -1);
8435 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1,
8436 -1, -1, -1, -1, -1, -1, -1);
8438 return (vector
signed __int128)__builtin_altivec_vrlqnm(
8439 (vector
unsigned __int128)
__a, (vector
unsigned __int128)MaskAndShift);
8447 return (vector
signed char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8452 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8459 return __builtin_altivec_vrlh(
__a,
__b);
8464 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)
__a,
__b);
8470 vector
unsigned int __b) {
8471 return __builtin_altivec_vrlw(
__a,
__b);
8476 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)
__a,
__b);
8482 return __builtin_altivec_vrfin(
__a);
8486#ifdef __XL_COMPAT_ALTIVEC__
8487static __inline__ vector
double __ATTRS_o_ai vec_rint(vector
double __a);
8489 double __fpscr = __builtin_readflm();
8490 __builtin_setrnd(0);
8491 vector
double __rounded = vec_rint(
__a);
8492 __builtin_setflm(__fpscr);
8497 return __builtin_vsx_xvrdpi(
__a);
8503static __inline__ vector
float __ATTRS_o_ai vec_rint(vector
float __a) {
8504 return __builtin_vsx_xvrspic(
__a);
8507static __inline__ vector
double __ATTRS_o_ai vec_rint(vector
double __a) {
8508 return __builtin_vsx_xvrdpic(
__a);
8513static __inline__ vector
float __ATTRS_o_ai vec_roundc(vector
float __a) {
8514 return __builtin_vsx_xvrspic(
__a);
8517static __inline__ vector
double __ATTRS_o_ai vec_roundc(vector
double __a) {
8518 return __builtin_vsx_xvrdpic(
__a);
8523static __inline__ vector
float __ATTRS_o_ai vec_nearbyint(vector
float __a) {
8524 return __builtin_vsx_xvrspi(
__a);
8527static __inline__ vector
double __ATTRS_o_ai vec_nearbyint(vector
double __a) {
8528 return __builtin_vsx_xvrdpi(
__a);
8534static __inline__ vector
float __attribute__((__always_inline__))
8535vec_vrfin(vector
float __a) {
8536 return __builtin_altivec_vrfin(
__a);
8542static __inline__ vector
float __ATTRS_o_ai vec_sqrt(vector
float __a) {
8543 return __builtin_vsx_xvsqrtsp(
__a);
8546static __inline__ vector
double __ATTRS_o_ai vec_sqrt(vector
double __a) {
8547 return __builtin_vsx_xvsqrtdp(
__a);
8555 return __builtin_vsx_xvrsqrtesp(
__a);
8557 return __builtin_altivec_vrsqrtefp(
__a);
8563 return __builtin_vsx_xvrsqrtedp(
__a);
8568 return __builtin_ppc_rsqrtf(
__a);
8573 return __builtin_ppc_rsqrtd(
__a);
8579static __inline__ __vector
float __attribute__((__always_inline__))
8580vec_vrsqrtefp(vector
float __a) {
8581 return __builtin_altivec_vrsqrtefp(
__a);
8587static __inline__
int __ATTRS_o_ai vec_test_swsqrt(vector
double __a) {
8588 return __builtin_vsx_xvtsqrtdp(
__a);
8591static __inline__
int __ATTRS_o_ai vec_test_swsqrts(vector
float __a) {
8592 return __builtin_vsx_xvtsqrtsp(
__a);
8598#define __builtin_altivec_vsel_4si vec_sel
8601 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8602 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8607 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8612 vector
unsigned char __c) {
8617 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
8618 return (
__a & ~(vector
unsigned char)
__c) | (
__b & (vector
unsigned char)
__c);
8623 return (
__a & ~(vector
bool char)
__c) | (
__b & (vector
bool char)
__c);
8627 vector
bool char __b,
8628 vector
bool char __c) {
8634 vector
unsigned short __c) {
8635 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8640 vector
bool short __c) {
8641 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8646 vector
unsigned short __c) {
8652 vector
bool short __c) {
8653 return (
__a & ~(vector
unsigned short)
__c) |
8654 (
__b & (vector
unsigned short)
__c);
8658 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
8659 return (
__a & ~(vector
bool short)
__c) | (
__b & (vector
bool short)
__c);
8669 vector
unsigned int __c) {
8675 vector
bool int __c) {
8680 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
8686 return (
__a & ~(vector
unsigned int)
__c) | (
__b & (vector
unsigned int)
__c);
8695 vector
bool int __b,
8696 vector
bool int __c) {
8702 vector
unsigned int __c) {
8703 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8704 ((vector
int)
__b & (vector
int)
__c);
8705 return (vector
float)__res;
8710 vector
bool int __c) {
8711 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8712 ((vector
int)
__b & (vector
int)
__c);
8713 return (vector
float)__res;
8719 vector
long long __res = ((vector
long long)
__a & ~(vector
long long)
__c) |
8720 ((vector
long long)
__b & (vector
long long)
__c);
8721 return (vector
double)__res;
8725vec_sel(vector
double __a, vector
double __b, vector
unsigned long long __c) {
8726 vector
long long __res = ((vector
long long)
__a & ~(vector
long long)
__c) |
8727 ((vector
long long)
__b & (vector
long long)
__c);
8728 return (vector
double)__res;
8732vec_sel(vector
bool long long __a, vector
bool long long __b,
8733 vector
bool long long __c) {
8738vec_sel(vector
bool long long __a, vector
bool long long __b,
8739 vector
unsigned long long __c) {
8740 return (
__a & ~(vector
bool long long)
__c) |
8741 (
__b & (vector
bool long long)
__c);
8745vec_sel(vector
signed long long __a, vector
signed long long __b,
8746 vector
bool long long __c) {
8747 return (
__a & ~(vector
signed long long)
__c) |
8748 (
__b & (vector
signed long long)
__c);
8752vec_sel(vector
signed long long __a, vector
signed long long __b,
8753 vector
unsigned long long __c) {
8754 return (
__a & ~(vector
signed long long)
__c) |
8755 (
__b & (vector
signed long long)
__c);
8758static __inline__ vector
unsigned long long __ATTRS_o_ai
8759vec_sel(vector
unsigned long long __a, vector
unsigned long long __b,
8760 vector
bool long long __c) {
8761 return (
__a & ~(vector
unsigned long long)
__c) |
8762 (
__b & (vector
unsigned long long)
__c);
8765static __inline__ vector
unsigned long long __ATTRS_o_ai
8766vec_sel(vector
unsigned long long __a, vector
unsigned long long __b,
8767 vector
unsigned long long __c) {
8775 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8776 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8781 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8786 vector
unsigned char __c) {
8791 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
8792 return (
__a & ~(vector
unsigned char)
__c) | (
__b & (vector
unsigned char)
__c);
8797 return (
__a & ~(vector
bool char)
__c) | (
__b & (vector
bool char)
__c);
8801 vector
bool char __b,
8802 vector
bool char __c) {
8808 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8813 vector
bool short __c) {
8814 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8819 vector
unsigned short __c) {
8825 vector
bool short __c) {
8826 return (
__a & ~(vector
unsigned short)
__c) |
8827 (
__b & (vector
unsigned short)
__c);
8831 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
8832 return (
__a & ~(vector
bool short)
__c) | (
__b & (vector
bool short)
__c);
8842 vector
unsigned int __c) {
8848 vector
bool int __c) {
8853 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
8858 vector
unsigned int __a, vector
unsigned int __b, vector
bool int __c) {
8859 return (
__a & ~(vector
unsigned int)
__c) | (
__b & (vector
unsigned int)
__c);
8868 vector
bool int __b,
8869 vector
bool int __c) {
8875 vector
unsigned int __c) {
8876 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8877 ((vector
int)
__b & (vector
int)
__c);
8878 return (vector
float)__res;
8883 vector
bool int __c) {
8884 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8885 ((vector
int)
__b & (vector
int)
__c);
8886 return (vector
float)__res;
8896 (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
8901 return (vector
signed char)
vec_sl((vector
unsigned char)
__a,
__b);
8906 return __a << (
__b % (vector
unsigned short)(
sizeof(
unsigned short) *
8911 vector
unsigned short __b) {
8912 return (vector
short)
vec_sl((vector
unsigned short)
__a,
__b);
8918 (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
8922 vector
unsigned int __b) {
8923 return (vector
int)
vec_sl((vector
unsigned int)
__a,
__b);
8926#ifdef __POWER8_VECTOR__
8927static __inline__ vector
unsigned long long __ATTRS_o_ai
8928vec_sl(vector
unsigned long long __a, vector
unsigned long long __b) {
8929 return __a << (
__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
8934vec_sl(vector
long long __a, vector
unsigned long long __b) {
8935 return (vector
long long)
vec_sl((vector
unsigned long long)
__a,
__b);
8937#elif defined(__VSX__)
8940static __inline__ vector
unsigned long long __ATTRS_o_ai
8941vec_sl(vector
unsigned long long __a, vector
unsigned long long __b) {
8942 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
8947 vector
signed long long __rightelt =
8948 (vector
signed long long)__builtin_altivec_vslo((vector
signed int)
__a,
8949 (vector
signed int)
__b);
8950#ifdef __LITTLE_ENDIAN__
8951 __rightelt = (vector
signed long long)__builtin_altivec_vsl(
8952 (vector
signed int)__rightelt,
8953 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 0));
8955 __rightelt = (vector
signed long long)__builtin_altivec_vsl(
8956 (vector
signed int)__rightelt,
8957 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 15));
8959 __a = __builtin_shufflevector(
__a,
__a, 1, 0);
8960 __b = __builtin_shufflevector(
__b,
__b, 1, 0);
8961 vector
signed long long __leftelt =
8962 (vector
signed long long)__builtin_altivec_vslo((vector
signed int)
__a,
8963 (vector
signed int)
__b);
8964#ifdef __LITTLE_ENDIAN__
8965 __leftelt = (vector
signed long long)__builtin_altivec_vsl(
8966 (vector
signed int)__leftelt,
8967 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 0));
8968 return (vector
unsigned long long)__builtin_shufflevector(__rightelt,
8971 __leftelt = (vector
signed long long)__builtin_altivec_vsl(
8972 (vector
signed int)__leftelt,
8973 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 15));
8974 return (vector
unsigned long long)__builtin_shufflevector(__leftelt,
8980vec_sl(vector
long long __a, vector
unsigned long long __b) {
8981 return (vector
long long)
vec_sl((vector
unsigned long long)
__a,
__b);
8987#define __builtin_altivec_vslb vec_vslb
9001#define __builtin_altivec_vslh vec_vslh
9015#define __builtin_altivec_vslw vec_vslw
9018 vector
unsigned int __b) {
9029#define __builtin_altivec_vsldoi_4si vec_sld
9032 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
9033 unsigned char __d =
__c & 0x0F;
9034#ifdef __LITTLE_ENDIAN__
9036 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9037 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9038 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9039 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9043 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9044 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9045 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9051 unsigned const int __c) {
9052 unsigned char __d =
__c & 0x0F;
9053#ifdef __LITTLE_ENDIAN__
9055 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9056 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9057 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9058 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9062 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9063 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9064 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9070 unsigned char __d =
__c & 0x0F;
9071#ifdef __LITTLE_ENDIAN__
9073 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9074 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9075 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9076 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9080 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9081 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9082 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9087 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
9088 unsigned char __d =
__c & 0x0F;
9089#ifdef __LITTLE_ENDIAN__
9091 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9092 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9093 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9094 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9098 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9099 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9100 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9106 unsigned const int __c) {
9107 unsigned char __d =
__c & 0x0F;
9108#ifdef __LITTLE_ENDIAN__
9110 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9111 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9112 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9113 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9117 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9118 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9119 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9125 unsigned char __d =
__c & 0x0F;
9126#ifdef __LITTLE_ENDIAN__
9128 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9129 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9130 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9131 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9135 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9136 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9137 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9143 unsigned const int __c) {
9144 unsigned char __d =
__c & 0x0F;
9145#ifdef __LITTLE_ENDIAN__
9147 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9148 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9149 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9150 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9154 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9155 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9156 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9162 unsigned char __d =
__c & 0x0F;
9163#ifdef __LITTLE_ENDIAN__
9165 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9166 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9167 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9168 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9172 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9173 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9174 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9179 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
9180 unsigned char __d =
__c & 0x0F;
9181#ifdef __LITTLE_ENDIAN__
9183 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9184 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9185 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9186 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9190 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9191 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9192 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9197 vector
bool int __b,
9198 unsigned const int __c) {
9199 unsigned char __d =
__c & 0x0F;
9200#ifdef __LITTLE_ENDIAN__
9202 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9203 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9204 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9205 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9209 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9210 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9211 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9217 unsigned const int __c) {
9218 unsigned char __d =
__c & 0x0F;
9219#ifdef __LITTLE_ENDIAN__
9221 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9222 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9223 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9224 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9228 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9229 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9230 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9236vec_sld(vector
bool long long __a, vector
bool long long __b,
9237 unsigned const int __c) {
9238 unsigned char __d =
__c & 0x0F;
9239#ifdef __LITTLE_ENDIAN__
9241 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9242 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9243 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9244 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9248 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9249 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9250 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9255vec_sld(vector
signed long long __a, vector
signed long long __b,
9256 unsigned const int __c) {
9257 unsigned char __d =
__c & 0x0F;
9258#ifdef __LITTLE_ENDIAN__
9260 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9261 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9262 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9263 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9267 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9268 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9269 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9273static __inline__ vector
unsigned long long __ATTRS_o_ai
9274vec_sld(vector
unsigned long long __a, vector
unsigned long long __b,
9275 unsigned const int __c) {
9276 unsigned char __d =
__c & 0x0F;
9277#ifdef __LITTLE_ENDIAN__
9279 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9280 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9281 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9282 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9286 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9287 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9288 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9294 unsigned const int __c) {
9295 unsigned char __d =
__c & 0x0F;
9296#ifdef __LITTLE_ENDIAN__
9298 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9299 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9300 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9301 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9305 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9306 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9307 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9314 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
9320 unsigned const int __c) {
9325 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
9331 unsigned const int __c) {
9341 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
9346 vector
float __a, vector
float __b,
unsigned const int __c) {
9352vec_sldw(vector
signed long long __a, vector
signed long long __b,
9353 unsigned const int __c) {
9357static __inline__ vector
unsigned long long __ATTRS_o_ai
9358vec_sldw(vector
unsigned long long __a, vector
unsigned long long __b,
9359 unsigned const int __c) {
9364 vector
double __a, vector
double __b,
unsigned const int __c) {
9369#ifdef __POWER9_VECTOR__
9372vec_slv(vector
unsigned char __a, vector
unsigned char __b) {
9373 return __builtin_altivec_vslv(
__a,
__b);
9378vec_srv(vector
unsigned char __a, vector
unsigned char __b) {
9379 return __builtin_altivec_vsrv(
__a,
__b);
9387 unsigned char __d =
__c & 0x0F;
9388#ifdef __LITTLE_ENDIAN__
9390 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9391 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9392 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9393 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9397 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9398 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9399 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9404 vector
unsigned char __a, vector
unsigned char __b,
unsigned char __c) {
9405 unsigned char __d =
__c & 0x0F;
9406#ifdef __LITTLE_ENDIAN__
9408 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9409 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9410 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9411 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9415 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9416 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9417 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9423 unsigned char __c) {
9424 unsigned char __d =
__c & 0x0F;
9425#ifdef __LITTLE_ENDIAN__
9427 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9428 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9429 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9430 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9434 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9435 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9436 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9441 vector
unsigned short __a, vector
unsigned short __b,
unsigned char __c) {
9442 unsigned char __d =
__c & 0x0F;
9443#ifdef __LITTLE_ENDIAN__
9445 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9446 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9447 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9448 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9452 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9453 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9454 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9460 unsigned char __c) {
9461 unsigned char __d =
__c & 0x0F;
9462#ifdef __LITTLE_ENDIAN__
9464 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9465 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9466 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9467 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9471 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9472 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9473 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9479 unsigned char __c) {
9480 unsigned char __d =
__c & 0x0F;
9481#ifdef __LITTLE_ENDIAN__
9483 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9484 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9485 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9486 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9490 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9491 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9492 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9497 vector
unsigned int __a, vector
unsigned int __b,
unsigned char __c) {
9498 unsigned char __d =
__c & 0x0F;
9499#ifdef __LITTLE_ENDIAN__
9501 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9502 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9503 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9504 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9508 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9509 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9510 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9516 unsigned char __c) {
9517 unsigned char __d =
__c & 0x0F;
9518#ifdef __LITTLE_ENDIAN__
9520 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9521 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9522 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9523 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9527 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9528 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9529 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9537 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9543 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9549 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9555 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9561 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9567 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9573 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9579 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9585 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9590 vector
unsigned char __b) {
9591 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9595 vector
unsigned short __b) {
9596 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9600 vector
unsigned int __b) {
9601 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9606 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9612 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9618 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9624 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9630 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9636 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9641 vector
unsigned char __b) {
9642 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9646 vector
unsigned short __b) {
9647 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9651 vector
unsigned int __b) {
9652 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9656 vector
unsigned char __b) {
9657 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9661 vector
unsigned short __b) {
9662 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9666 vector
unsigned int __b) {
9667 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9672 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9678 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9684 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9690 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9696 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9702 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9708vec_sll(vector
signed long long __a, vector
unsigned char __b) {
9709 return (vector
signed long long)__builtin_altivec_vsl((vector
int)
__a,
9713static __inline__ vector
unsigned long long __ATTRS_o_ai
9714vec_sll(vector
unsigned long long __a, vector
unsigned char __b) {
9715 return (vector
unsigned long long)__builtin_altivec_vsl((vector
int)
__a,
9724 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9730 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9736 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9742 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9748 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9754 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9760 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9766 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9772 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9777 vector
unsigned char __b) {
9778 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9782 vector
unsigned short __b) {
9783 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9787 vector
unsigned int __b) {
9788 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9793 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9799 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9805 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9811 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9817 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9823 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9828 vector
unsigned char __b) {
9829 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9833 vector
unsigned short __b) {
9834 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9838 vector
unsigned int __b) {
9839 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9843 vector
unsigned char __b) {
9844 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9848 vector
unsigned short __b) {
9849 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9853 vector
unsigned int __b) {
9854 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9859 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9865 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9871 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9877 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9883 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9889 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9897 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
9903 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
9909 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
9915 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
9920 vector
signed char __b) {
9921 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9925 vector
unsigned char __b) {
9926 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9931 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
9937 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
9942 vector
signed char __b) {
9943 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9947 vector
unsigned char __b) {
9948 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9952 vector
signed char __b) {
9953 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
9957 vector
unsigned char __b) {
9958 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
9963 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
9969 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
9974 vector
signed char __b) {
9975 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9979 vector
unsigned char __b) {
9980 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9985vec_slo(vector
signed long long __a, vector
signed char __b) {
9986 return (vector
signed long long)__builtin_altivec_vslo((vector
int)
__a,
9991vec_slo(vector
signed long long __a, vector
unsigned char __b) {
9992 return (vector
signed long long)__builtin_altivec_vslo((vector
int)
__a,
9996static __inline__ vector
unsigned long long __ATTRS_o_ai
9997vec_slo(vector
unsigned long long __a, vector
signed char __b) {
9998 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)
__a,
10002static __inline__ vector
unsigned long long __ATTRS_o_ai
10003vec_slo(vector
unsigned long long __a, vector
unsigned char __b) {
10004 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)
__a,
10013 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
10019 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
10025 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
10031 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
10036 vector
signed char __b) {
10037 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10041 vector
unsigned char __b) {
10042 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10047 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
10053 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
10058 vector
signed char __b) {
10059 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10063 vector
unsigned char __b) {
10064 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10068 vector
signed char __b) {
10069 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
10073 vector
unsigned char __b) {
10074 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
10079 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
10085 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
10090 vector
signed char __b) {
10091 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10095 vector
unsigned char __b) {
10096 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10118 unsigned char b0 = (
__b & 0x07) * 2;
10119 unsigned char b1 = b0 + 1;
10121 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10122 b0, b1, b0, b1, b0, b1));
10127 unsigned char b0 = (
__b & 0x07) * 2;
10128 unsigned char b1 = b0 + 1;
10130 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10131 b0, b1, b0, b1, b0, b1));
10136 unsigned char b0 = (
__b & 0x07) * 2;
10137 unsigned char b1 = b0 + 1;
10139 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10140 b0, b1, b0, b1, b0, b1));
10144 unsigned const int __b) {
10145 unsigned char b0 = (
__b & 0x07) * 2;
10146 unsigned char b1 = b0 + 1;
10148 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10149 b0, b1, b0, b1, b0, b1));
10154 unsigned char b0 = (
__b & 0x03) * 4;
10155 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10157 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10158 b2, b3, b0, b1, b2, b3));
10163 unsigned char b0 = (
__b & 0x03) * 4;
10164 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10166 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10167 b2, b3, b0, b1, b2, b3));
10172 unsigned char b0 = (
__b & 0x03) * 4;
10173 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10175 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10176 b2, b3, b0, b1, b2, b3));
10180 unsigned const int __b) {
10181 unsigned char b0 = (
__b & 0x03) * 4;
10182 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10184 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10185 b2, b3, b0, b1, b2, b3));
10190 unsigned const int __b) {
10191 unsigned char b0 = (
__b & 0x01) * 8;
10192 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10193 b6 = b0 + 6, b7 = b0 + 7;
10195 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10196 b2, b3, b4, b5, b6, b7));
10200 unsigned char b0 = (
__b & 0x01) * 8;
10201 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10202 b6 = b0 + 6, b7 = b0 + 7;
10204 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10205 b2, b3, b4, b5, b6, b7));
10209 unsigned char b0 = (
__b & 0x01) * 8;
10210 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10211 b6 = b0 + 6, b7 = b0 + 7;
10213 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10214 b2, b3, b4, b5, b6, b7));
10216static __inline__ vector
unsigned long long __ATTRS_o_ai
10218 unsigned char b0 = (
__b & 0x01) * 8;
10219 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10220 b6 = b0 + 6, b7 = b0 + 7;
10222 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10223 b2, b3, b4, b5, b6, b7));
10229#define __builtin_altivec_vspltb vec_vspltb
10242 unsigned char __b) {
10248#define __builtin_altivec_vsplth vec_vsplth
10251 unsigned char __b) {
10253 unsigned char b1 =
__b + 1;
10255 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10262 unsigned char b1 =
__b + 1;
10264 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10271 unsigned char b1 =
__b + 1;
10273 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10278 unsigned char __b) {
10280 unsigned char b1 =
__b + 1;
10282 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10288#define __builtin_altivec_vspltw vec_vspltw
10291 unsigned char __b) {
10293 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10295 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10296 b1, b2, b3,
__b, b1, b2, b3));
10302 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10304 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10305 b1, b2, b3,
__b, b1, b2, b3));
10309 unsigned char __b) {
10311 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10313 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10314 b1, b2, b3,
__b, b1, b2, b3));
10318 unsigned char __b) {
10320 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10322 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10323 b1, b2, b3,
__b, b1, b2, b3));
10328#define __builtin_altivec_vspltisb vec_splat_s8
10333 return (vector
signed char)(
__a);
10341 return (vector
signed char)(
__a);
10346#define __builtin_altivec_vspltish vec_splat_s16
10350 return (vector
short)(
__a);
10357 return (vector
short)(
__a);
10362#define __builtin_altivec_vspltisw vec_splat_s32
10366 return (vector
int)(
__a);
10373 return (vector
int)(
__a);
10381 return (vector
unsigned char)(
__a);
10389 return (vector
unsigned short)(
__a);
10397 return (vector
unsigned int)(
__a);
10407 (
__b % (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
10412 return (vector
signed char)
vec_sr((vector
unsigned char)
__a,
__b);
10418 (
__b % (vector
unsigned short)(
sizeof(
unsigned short) * __CHAR_BIT__));
10422 vector
unsigned short __b) {
10423 return (vector
short)
vec_sr((vector
unsigned short)
__a,
__b);
10429 (
__b % (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
10433 vector
unsigned int __b) {
10434 return (vector
int)
vec_sr((vector
unsigned int)
__a,
__b);
10437#ifdef __POWER8_VECTOR__
10438static __inline__ vector
unsigned long long __ATTRS_o_ai
10439vec_sr(vector
unsigned long long __a, vector
unsigned long long __b) {
10440 return __a >> (
__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
10445vec_sr(vector
long long __a, vector
unsigned long long __b) {
10446 return (vector
long long)
vec_sr((vector
unsigned long long)
__a,
__b);
10448#elif defined(__VSX__)
10449static __inline__ vector
unsigned long long __ATTRS_o_ai
10450vec_sr(vector
unsigned long long __a, vector
unsigned long long __b) {
10451 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10457 vector
unsigned long long __swapshift =
10458 __builtin_shufflevector(
__b,
__b, 1, 0);
10459 vector
unsigned long long __leftelt =
10460 (vector
unsigned long long)__builtin_altivec_vsro(
10461 (vector
signed int)
__a, (vector
signed int)__swapshift);
10462#ifdef __LITTLE_ENDIAN__
10463 __leftelt = (vector
unsigned long long)__builtin_altivec_vsr(
10464 (vector
signed int)__leftelt,
10465 (vector
signed int)
vec_vspltb((vector
unsigned char)__swapshift, 0));
10467 __leftelt = (vector
unsigned long long)__builtin_altivec_vsr(
10468 (vector
signed int)__leftelt,
10469 (vector
signed int)
vec_vspltb((vector
unsigned char)__swapshift, 15));
10471 __a = __builtin_shufflevector(
__a,
__a, 1, 0);
10472 vector
unsigned long long __rightelt =
10473 (vector
unsigned long long)__builtin_altivec_vsro((vector
signed int)
__a,
10474 (vector
signed int)
__b);
10475#ifdef __LITTLE_ENDIAN__
10476 __rightelt = (vector
unsigned long long)__builtin_altivec_vsr(
10477 (vector
signed int)__rightelt,
10478 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 0));
10479 return __builtin_shufflevector(__rightelt, __leftelt, 1, 3);
10481 __rightelt = (vector
unsigned long long)__builtin_altivec_vsr(
10482 (vector
signed int)__rightelt,
10483 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 15));
10484 return __builtin_shufflevector(__leftelt, __rightelt, 0, 2);
10489vec_sr(vector
long long __a, vector
unsigned long long __b) {
10490 return (vector
long long)
vec_sr((vector
unsigned long long)
__a,
__b);
10496#define __builtin_altivec_vsrb vec_vsrb
10510#define __builtin_altivec_vsrh vec_vsrh
10524#define __builtin_altivec_vsrw vec_vsrw
10527 vector
unsigned int __b) {
10540 return (vector
signed char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10545 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10549 vector
unsigned short __b) {
10550 return __builtin_altivec_vsrah(
__a, (vector
unsigned short)
__b);
10555 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)
__a,
__b);
10559 vector
unsigned int __b) {
10560 return __builtin_altivec_vsraw(
__a,
__b);
10565 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)
__a,
__b);
10568#ifdef __POWER8_VECTOR__
10570vec_sra(vector
signed long long __a, vector
unsigned long long __b) {
10574static __inline__ vector
unsigned long long __ATTRS_o_ai
10575vec_sra(vector
unsigned long long __a, vector
unsigned long long __b) {
10576 return (vector
unsigned long long)((vector
signed long long)
__a >>
__b);
10578#elif defined(__VSX__)
10580vec_sra(vector
signed long long __a, vector
unsigned long long __b) {
10581 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10585static __inline__ vector
unsigned long long __ATTRS_o_ai
10586vec_sra(vector
unsigned long long __a, vector
unsigned long long __b) {
10587 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10588 return (vector
unsigned long long)((vector
signed long long)
__a >>
__b);
10596 return (vector
signed char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10601 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10608 return __builtin_altivec_vsrah(
__a, (vector
unsigned short)
__b);
10613 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)
__a,
__b);
10619 vector
unsigned int __b) {
10620 return __builtin_altivec_vsraw(
__a,
__b);
10625 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)
__a,
__b);
10632 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10638 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10644 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10650 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10656 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10662 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10668 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10674 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10680 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10685 vector
unsigned char __b) {
10686 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10690 vector
unsigned short __b) {
10691 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10695 vector
unsigned int __b) {
10696 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10701 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10707 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10713 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10719 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10725 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10731 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10736 vector
unsigned char __b) {
10737 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10741 vector
unsigned short __b) {
10742 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10746 vector
unsigned int __b) {
10747 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10751 vector
unsigned char __b) {
10752 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10756 vector
unsigned short __b) {
10757 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10761 vector
unsigned int __b) {
10762 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10767 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10773 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10779 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10785 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10791 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10797 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10803vec_srl(vector
signed long long __a, vector
unsigned char __b) {
10804 return (vector
signed long long)__builtin_altivec_vsr((vector
int)
__a,
10808static __inline__ vector
unsigned long long __ATTRS_o_ai
10809vec_srl(vector
unsigned long long __a, vector
unsigned char __b) {
10810 return (vector
unsigned long long)__builtin_altivec_vsr((vector
int)
__a,
10819 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10825 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10831 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10837 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10843 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10849 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10855 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10861 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10867 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10872 vector
unsigned char __b) {
10873 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10877 vector
unsigned short __b) {
10878 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10882 vector
unsigned int __b) {
10883 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10888 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10894 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10900 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10906 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10912 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10918 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10923 vector
unsigned char __b) {
10924 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10928 vector
unsigned short __b) {
10929 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10933 vector
unsigned int __b) {
10934 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10938 vector
unsigned char __b) {
10939 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10943 vector
unsigned short __b) {
10944 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10948 vector
unsigned int __b) {
10949 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10954 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10960 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10966 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10972 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10978 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10984 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10992 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
10998 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
11004 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11010 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11015 vector
signed char __b) {
11016 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11020 vector
unsigned char __b) {
11021 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11026 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11032 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11037 vector
signed char __b) {
11038 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11042 vector
unsigned char __b) {
11043 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11047 vector
signed char __b) {
11048 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11052 vector
unsigned char __b) {
11053 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11058 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11064 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11069 vector
signed char __b) {
11070 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11074 vector
unsigned char __b) {
11075 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11080vec_sro(vector
signed long long __a, vector
signed char __b) {
11081 return (vector
signed long long)__builtin_altivec_vsro((vector
int)
__a,
11086vec_sro(vector
signed long long __a, vector
unsigned char __b) {
11087 return (vector
signed long long)__builtin_altivec_vsro((vector
int)
__a,
11091static __inline__ vector
unsigned long long __ATTRS_o_ai
11092vec_sro(vector
unsigned long long __a, vector
signed char __b) {
11093 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)
__a,
11097static __inline__ vector
unsigned long long __ATTRS_o_ai
11098vec_sro(vector
unsigned long long __a, vector
unsigned char __b) {
11099 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)
__a,
11108 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
11114 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
11120 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11126 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11131 vector
signed char __b) {
11132 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11136 vector
unsigned char __b) {
11137 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11142 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11148 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11153 vector
signed char __b) {
11154 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11158 vector
unsigned char __b) {
11159 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11163 vector
signed char __b) {
11164 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11168 vector
unsigned char __b) {
11169 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11174 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11180 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11185 vector
signed char __b) {
11186 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11190 vector
unsigned char __b) {
11191 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11197 vector
signed char *
__c) {
11198 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11202 signed char *
__c) {
11203 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11207 vector
unsigned char *
__c) {
11208 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11212 unsigned char *
__c) {
11213 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11217 signed char *
__c) {
11218 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11222 unsigned char *
__c) {
11223 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11227 vector
bool char *
__c) {
11228 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11232 vector
short *
__c) {
11233 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11238 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11242 vector
unsigned short *
__c) {
11243 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11247 unsigned short *
__c) {
11248 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11253 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11257 unsigned short *
__c) {
11258 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11262 vector
bool short *
__c) {
11263 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11268 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11272 unsigned short *
__c) {
11273 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11277 vector pixel *
__c) {
11278 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11291 vector
unsigned int *
__c) {
11292 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11296 unsigned int *
__c) {
11297 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11302 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11306 unsigned int *
__c) {
11307 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11311 vector
bool int *
__c) {
11312 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11316 vector
float *
__c) {
11317 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11322 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11328 vector
signed char *
__c) {
11329 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11333 signed char *
__c) {
11334 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11338 vector
unsigned char *
__c) {
11339 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11343 unsigned char *
__c) {
11344 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11348 signed char *
__c) {
11349 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11353 unsigned char *
__c) {
11354 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11358 vector
bool char *
__c) {
11359 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11363 vector
short *
__c) {
11364 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11369 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11373 vector
unsigned short *
__c) {
11374 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11378 unsigned short *
__c) {
11379 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11384 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11388 unsigned short *
__c) {
11389 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11393 vector
bool short *
__c) {
11394 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11399 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11403 unsigned short *
__c) {
11404 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11408 vector pixel *
__c) {
11409 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11423 vector
unsigned int *
__c) {
11424 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11428 unsigned int *
__c) {
11429 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11434 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11438 unsigned int *
__c) {
11439 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11443 vector
bool int *
__c) {
11444 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11448 vector
float *
__c) {
11449 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11454 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11460 signed char *
__c) {
11461 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11465 unsigned char *
__c) {
11466 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11470 signed char *
__c) {
11471 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11475 unsigned char *
__c) {
11476 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11481 __builtin_altivec_stvehx(
__a,
__b,
__c);
11485 unsigned short *
__c) {
11486 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11491 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11495 unsigned short *
__c) {
11496 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11501 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11505 unsigned short *
__c) {
11506 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11510 __builtin_altivec_stvewx(
__a,
__b,
__c);
11514 unsigned int *
__c) {
11515 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11520 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11524 unsigned int *
__c) {
11525 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11530 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11536 signed char *
__c) {
11537 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11541 long __b,
unsigned char *
__c) {
11542 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11546 signed char *
__c) {
11547 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11551 unsigned char *
__c) {
11552 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11559 __builtin_altivec_stvehx(
__a,
__b,
__c);
11563 long __b,
unsigned short *
__c) {
11564 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11569 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11573 unsigned short *
__c) {
11574 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11579 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11583 unsigned short *
__c) {
11584 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11591 __builtin_altivec_stvewx(
__a,
__b,
__c);
11595 unsigned int *
__c) {
11596 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11601 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11605 unsigned int *
__c) {
11606 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11611 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11617 vector
signed char *
__c) {
11618 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11622 signed char *
__c) {
11623 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11627 vector
unsigned char *
__c) {
11628 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11632 unsigned char *
__c) {
11633 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11637 signed char *
__c) {
11638 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11642 unsigned char *
__c) {
11643 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11647 vector
bool char *
__c) {
11648 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11652 vector
short *
__c) {
11653 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11658 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11662 vector
unsigned short *
__c) {
11663 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11667 unsigned short *
__c) {
11668 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11673 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11677 unsigned short *
__c) {
11678 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11682 vector
bool short *
__c) {
11683 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11688 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11692 unsigned short *
__c) {
11693 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11697 vector pixel *
__c) {
11698 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11703 __builtin_altivec_stvxl(
__a,
__b,
__c);
11707 __builtin_altivec_stvxl(
__a,
__b,
__c);
11711 vector
unsigned int *
__c) {
11712 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11716 unsigned int *
__c) {
11717 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11722 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11726 unsigned int *
__c) {
11727 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11731 vector
bool int *
__c) {
11732 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11736 vector
float *
__c) {
11737 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11742 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11748 vector
signed char *
__c) {
11749 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11753 signed char *
__c) {
11754 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11758 vector
unsigned char *
__c) {
11759 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11763 unsigned char *
__c) {
11764 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11768 signed char *
__c) {
11769 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11773 unsigned char *
__c) {
11774 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11778 vector
bool char *
__c) {
11779 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11783 vector
short *
__c) {
11784 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11789 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11794 vector
unsigned short *
__c) {
11795 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11799 int __b,
unsigned short *
__c) {
11800 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11805 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11809 unsigned short *
__c) {
11810 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11814 vector
bool short *
__c) {
11815 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11820 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11824 unsigned short *
__c) {
11825 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11829 vector pixel *
__c) {
11830 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11835 __builtin_altivec_stvxl(
__a,
__b,
__c);
11840 __builtin_altivec_stvxl(
__a,
__b,
__c);
11844 vector
unsigned int *
__c) {
11845 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11849 unsigned int *
__c) {
11850 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11855 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11859 unsigned int *
__c) {
11860 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11864 vector
bool int *
__c) {
11865 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11869 vector
float *
__c) {
11870 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11875 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11887 return (vector
signed char)
__a -
__b;
11892 return __a - (vector
signed char)
__b;
11902 return (vector
unsigned char)
__a -
__b;
11907 return __a - (vector
unsigned char)
__b;
11911 vector
short __b) {
11916 vector
short __b) {
11917 return (vector
short)
__a -
__b;
11921 vector
bool short __b) {
11922 return __a - (vector short)
__b;
11932 return (vector
unsigned short)
__a -
__b;
11937 return __a - (vector
unsigned short)
__b;
11947 return (vector
int)
__a -
__b;
11951 vector
bool int __b) {
11962 return (vector
unsigned int)
__a -
__b;
11970#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
11971 defined(__SIZEOF_INT128__)
11973vec_sub(vector
signed __int128
__a, vector
signed __int128
__b) {
11977static __inline__ vector
unsigned __int128
__ATTRS_o_ai
11978vec_sub(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
11986vec_sub(vector
signed long long __a, vector
signed long long __b) {
11990static __inline__ vector
unsigned long long __ATTRS_o_ai
11991vec_sub(vector
unsigned long long __a, vector
unsigned long long __b) {
11996 vector
double __b) {
12002 vector
float __b) {
12008#define __builtin_altivec_vsububm vec_vsububm
12017 return (vector
signed char)
__a -
__b;
12022 return __a - (vector
signed char)
__b;
12032 return (vector
unsigned char)
__a -
__b;
12037 return __a - (vector
unsigned char)
__b;
12042#define __builtin_altivec_vsubuhm vec_vsubuhm
12045 vector
short __b) {
12050 vector
short __b) {
12051 return (vector
short)
__a -
__b;
12055 vector
bool short __b) {
12056 return __a - (vector short)
__b;
12066 return (vector
unsigned short)
__a -
__b;
12071 return __a - (vector
unsigned short)
__b;
12076#define __builtin_altivec_vsubuwm vec_vsubuwm
12085 return (vector
int)
__a -
__b;
12089 vector
bool int __b) {
12100 return (vector
unsigned int)
__a -
__b;
12110#define __builtin_altivec_vsubfp vec_vsubfp
12112static __inline__ vector
float __attribute__((__always_inline__))
12113vec_vsubfp(vector
float __a, vector
float __b) {
12121 return (vector
signed int)__builtin_altivec_vsubcuw((vector
unsigned int)
__a,
12122 (vector
unsigned int)
__b);
12127 return __builtin_altivec_vsubcuw(
__a,
__b);
12130#ifdef __POWER8_VECTOR__
12131#ifdef __SIZEOF_INT128__
12132static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12133vec_subc(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12134 return __builtin_altivec_vsubcuq(
__a,
__b);
12138vec_subc(vector
signed __int128
__a, vector
signed __int128
__b) {
12139 return (vector
signed __int128)__builtin_altivec_vsubcuq(
12140 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
12144static __inline__ vector
unsigned char __attribute__((__always_inline__))
12145vec_subc_u128(vector
unsigned char __a, vector
unsigned char __b) {
12146 return (vector
unsigned char)__builtin_altivec_vsubcuq_c(
12147 (vector
unsigned char)
__a, (vector
unsigned char)
__b);
12153static __inline__ vector
unsigned int __attribute__((__always_inline__))
12154vec_vsubcuw(vector
unsigned int __a, vector
unsigned int __b) {
12155 return __builtin_altivec_vsubcuw(
__a,
__b);
12162 return __builtin_altivec_vsubsbs(
__a,
__b);
12167 return __builtin_altivec_vsubsbs((vector
signed char)
__a,
__b);
12172 return __builtin_altivec_vsubsbs(
__a, (vector
signed char)
__b);
12177 return __builtin_altivec_vsububs(
__a,
__b);
12182 return __builtin_altivec_vsububs((vector
unsigned char)
__a,
__b);
12187 return __builtin_altivec_vsububs(
__a, (vector
unsigned char)
__b);
12191 vector
short __b) {
12192 return __builtin_altivec_vsubshs(
__a,
__b);
12196 vector
short __b) {
12197 return __builtin_altivec_vsubshs((vector
short)
__a,
__b);
12201 vector
bool short __b) {
12202 return __builtin_altivec_vsubshs(
__a, (vector
short)
__b);
12207 return __builtin_altivec_vsubuhs(
__a,
__b);
12212 return __builtin_altivec_vsubuhs((vector
unsigned short)
__a,
__b);
12217 return __builtin_altivec_vsubuhs(
__a, (vector
unsigned short)
__b);
12222 return __builtin_altivec_vsubsws(
__a,
__b);
12227 return __builtin_altivec_vsubsws((vector
int)
__a,
__b);
12231 vector
bool int __b) {
12232 return __builtin_altivec_vsubsws(
__a, (vector
int)
__b);
12237 return __builtin_altivec_vsubuws(
__a,
__b);
12242 return __builtin_altivec_vsubuws((vector
unsigned int)
__a,
__b);
12247 return __builtin_altivec_vsubuws(
__a, (vector
unsigned int)
__b);
12254 return __builtin_altivec_vsubsbs(
__a,
__b);
12259 return __builtin_altivec_vsubsbs((vector
signed char)
__a,
__b);
12264 return __builtin_altivec_vsubsbs(
__a, (vector
signed char)
__b);
12271 return __builtin_altivec_vsububs(
__a,
__b);
12276 return __builtin_altivec_vsububs((vector
unsigned char)
__a,
__b);
12281 return __builtin_altivec_vsububs(
__a, (vector
unsigned char)
__b);
12287 vector
short __b) {
12288 return __builtin_altivec_vsubshs(
__a,
__b);
12292 vector
short __b) {
12293 return __builtin_altivec_vsubshs((vector
short)
__a,
__b);
12297 vector
bool short __b) {
12298 return __builtin_altivec_vsubshs(
__a, (vector
short)
__b);
12305 return __builtin_altivec_vsubuhs(
__a,
__b);
12310 return __builtin_altivec_vsubuhs((vector
unsigned short)
__a,
__b);
12315 return __builtin_altivec_vsubuhs(
__a, (vector
unsigned short)
__b);
12322 return __builtin_altivec_vsubsws(
__a,
__b);
12327 return __builtin_altivec_vsubsws((vector
int)
__a,
__b);
12331 vector
bool int __b) {
12332 return __builtin_altivec_vsubsws(
__a, (vector
int)
__b);
12339 return __builtin_altivec_vsubuws(
__a,
__b);
12344 return __builtin_altivec_vsubuws((vector
unsigned int)
__a,
__b);
12349 return __builtin_altivec_vsubuws(
__a, (vector
unsigned int)
__b);
12352#ifdef __POWER8_VECTOR__
12355#ifdef __SIZEOF_INT128__
12357vec_vsubuqm(vector
signed __int128
__a, vector
signed __int128
__b) {
12361static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12362vec_vsubuqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12367static __inline__ vector
unsigned char __attribute__((__always_inline__))
12368vec_sub_u128(vector
unsigned char __a, vector
unsigned char __b) {
12369 return (vector
unsigned char)__builtin_altivec_vsubuqm(
__a,
__b);
12374#ifdef __SIZEOF_INT128__
12376vec_vsubeuqm(vector
signed __int128
__a, vector
signed __int128
__b,
12377 vector
signed __int128
__c) {
12378 return (vector
signed __int128)__builtin_altivec_vsubeuqm(
12379 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12380 (vector
unsigned __int128)
__c);
12383static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12384vec_vsubeuqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12385 vector
unsigned __int128
__c) {
12386 return __builtin_altivec_vsubeuqm(
__a,
__b,
__c);
12391 vector
signed __int128
__c) {
12392 return (vector
signed __int128)__builtin_altivec_vsubeuqm(
12393 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12394 (vector
unsigned __int128)
__c);
12397static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12398vec_sube(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12399 vector
unsigned __int128
__c) {
12400 return __builtin_altivec_vsubeuqm(
__a,
__b,
__c);
12404static __inline__ vector
unsigned char __attribute__((__always_inline__))
12405vec_sube_u128(vector
unsigned char __a, vector
unsigned char __b,
12406 vector
unsigned char __c) {
12407 return (vector
unsigned char)__builtin_altivec_vsubeuqm_c(
12408 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
12409 (vector
unsigned char)
__c);
12414#ifdef __SIZEOF_INT128__
12416vec_vsubcuq(vector
signed __int128
__a, vector
signed __int128
__b) {
12417 return (vector
signed __int128)__builtin_altivec_vsubcuq(
12418 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
12421static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12422vec_vsubcuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12423 return __builtin_altivec_vsubcuq(
__a,
__b);
12429vec_vsubecuq(vector
signed __int128
__a, vector
signed __int128
__b,
12430 vector
signed __int128
__c) {
12431 return (vector
signed __int128)__builtin_altivec_vsubecuq(
12432 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12433 (vector
unsigned __int128)
__c);
12436static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12437vec_vsubecuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12438 vector
unsigned __int128
__c) {
12439 return __builtin_altivec_vsubecuq(
__a,
__b,
__c);
12443#ifdef __powerpc64__
12445vec_subec(vector
signed int __a, vector
signed int __b,
12446 vector
signed int __c) {
12451vec_subec(vector
unsigned int __a, vector
unsigned int __b,
12452 vector
unsigned int __c) {
12457#ifdef __SIZEOF_INT128__
12459vec_subec(vector
signed __int128
__a, vector
signed __int128
__b,
12460 vector
signed __int128
__c) {
12461 return (vector
signed __int128)__builtin_altivec_vsubecuq(
12462 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12463 (vector
unsigned __int128)
__c);
12466static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12467vec_subec(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12468 vector
unsigned __int128
__c) {
12469 return __builtin_altivec_vsubecuq(
__a,
__b,
__c);
12473static __inline__ vector
unsigned char __attribute__((__always_inline__))
12474vec_subec_u128(vector
unsigned char __a, vector
unsigned char __b,
12475 vector
unsigned char __c) {
12476 return (vector
unsigned char)__builtin_altivec_vsubecuq_c(
12477 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
12478 (vector
unsigned char)
__c);
12484 vector
signed int __c) {
12485 vector
signed int __mask = {1, 1, 1, 1};
12486 vector
signed int __carry =
__c & __mask;
12492 vector
unsigned int __c) {
12493 vector
unsigned int __mask = {1, 1, 1, 1};
12494 vector
unsigned int __carry =
__c & __mask;
12501 return __builtin_altivec_vsum4sbs(
__a,
__b);
12506 return __builtin_altivec_vsum4ubs(
__a,
__b);
12511 return __builtin_altivec_vsum4shs(
__a,
__b);
12516static __inline__ vector
int __attribute__((__always_inline__))
12517vec_vsum4sbs(vector
signed char __a, vector
int __b) {
12518 return __builtin_altivec_vsum4sbs(
__a,
__b);
12523static __inline__ vector
unsigned int __attribute__((__always_inline__))
12524vec_vsum4ubs(vector
unsigned char __a, vector
unsigned int __b) {
12525 return __builtin_altivec_vsum4ubs(
__a,
__b);
12530static __inline__ vector
int __attribute__((__always_inline__))
12531vec_vsum4shs(vector
signed short __a, vector
int __b) {
12532 return __builtin_altivec_vsum4shs(
__a,
__b);
12543static __inline__ vector
signed int __attribute__((__always_inline__))
12544vec_sum2s(vector
int __a, vector
int __b) {
12545#ifdef __LITTLE_ENDIAN__
12547 __b,
__b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12549 __c = __builtin_altivec_vsum2sws(
__a,
__c);
12550 return (vector
signed int)
vec_perm(
12551 __c,
__c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12554 return __builtin_altivec_vsum2sws(
__a,
__b);
12560static __inline__ vector
signed int __attribute__((__always_inline__))
12561vec_vsum2sws(vector
int __a, vector
int __b) {
12562#ifdef __LITTLE_ENDIAN__
12564 __b,
__b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12566 __c = __builtin_altivec_vsum2sws(
__a,
__c);
12567 return (vector
signed int)
vec_perm(
12568 __c,
__c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12571 return __builtin_altivec_vsum2sws(
__a,
__b);
12583static __inline__ vector
signed int __attribute__((__always_inline__))
12584vec_sums(vector
signed int __a, vector
signed int __b) {
12585#ifdef __LITTLE_ENDIAN__
12587 __b = __builtin_altivec_vsumsws(
__a,
__b);
12588 return (vector
signed int)(0, 0, 0,
__b[0]);
12590 return __builtin_altivec_vsumsws(
__a,
__b);
12596static __inline__ vector
signed int __attribute__((__always_inline__))
12597vec_vsumsws(vector
signed int __a, vector
signed int __b) {
12598#ifdef __LITTLE_ENDIAN__
12600 __b = __builtin_altivec_vsumsws(
__a,
__b);
12601 return (vector
signed int)(0, 0, 0,
__b[0]);
12603 return __builtin_altivec_vsumsws(
__a,
__b);
12611 return __builtin_vsx_xvrspiz(
__a);
12613 return __builtin_altivec_vrfiz(
__a);
12619 return __builtin_vsx_xvrdpiz(
__a);
12636static __inline__ vector
float __attribute__((__always_inline__))
12637vec_vrfiz(vector
float __a) {
12638 return __builtin_altivec_vrfiz(
__a);
12645#ifdef __LITTLE_ENDIAN__
12646#define vec_vupkhpx(__a) __builtin_altivec_vupklpx((vector short)(__a))
12647#define vec_vupklpx(__a) __builtin_altivec_vupkhpx((vector short)(__a))
12649#define vec_vupkhpx(__a) __builtin_altivec_vupkhpx((vector short)(__a))
12650#define vec_vupklpx(__a) __builtin_altivec_vupklpx((vector short)(__a))
12655#ifdef __LITTLE_ENDIAN__
12656 return __builtin_altivec_vupklsb((vector
char)
__a);
12658 return __builtin_altivec_vupkhsb((vector
char)
__a);
12664#ifdef __LITTLE_ENDIAN__
12665 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12667 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12672#ifdef __LITTLE_ENDIAN__
12673 return __builtin_altivec_vupklsh(
__a);
12675 return __builtin_altivec_vupkhsh(
__a);
12681#ifdef __LITTLE_ENDIAN__
12682 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12684 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12690#ifdef __LITTLE_ENDIAN__
12691 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12693 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12697#ifdef __POWER8_VECTOR__
12699#ifdef __LITTLE_ENDIAN__
12700 return __builtin_altivec_vupklsw(
__a);
12702 return __builtin_altivec_vupkhsw(
__a);
12708#ifdef __LITTLE_ENDIAN__
12709 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12711 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12717 return (vector
double)(
__a[0],
__a[1]);
12725#ifdef __LITTLE_ENDIAN__
12726 return __builtin_altivec_vupklsb((vector
char)
__a);
12728 return __builtin_altivec_vupkhsb((vector
char)
__a);
12734#ifdef __LITTLE_ENDIAN__
12735 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12737 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12744#ifdef __LITTLE_ENDIAN__
12745 return __builtin_altivec_vupklsh(
__a);
12747 return __builtin_altivec_vupkhsh(
__a);
12753#ifdef __LITTLE_ENDIAN__
12754 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12756 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12762#ifdef __LITTLE_ENDIAN__
12763 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12765 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12771#ifdef __POWER8_VECTOR__
12772static __inline__ vector
long long __ATTRS_o_ai vec_vupkhsw(vector
int __a) {
12773#ifdef __LITTLE_ENDIAN__
12774 return __builtin_altivec_vupklsw(
__a);
12776 return __builtin_altivec_vupkhsw(
__a);
12781vec_vupkhsw(vector
bool int __a) {
12782#ifdef __LITTLE_ENDIAN__
12783 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12785 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12794#ifdef __LITTLE_ENDIAN__
12795 return __builtin_altivec_vupkhsb((vector
char)
__a);
12797 return __builtin_altivec_vupklsb((vector
char)
__a);
12803#ifdef __LITTLE_ENDIAN__
12804 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12806 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12811#ifdef __LITTLE_ENDIAN__
12812 return __builtin_altivec_vupkhsh(
__a);
12814 return __builtin_altivec_vupklsh(
__a);
12820#ifdef __LITTLE_ENDIAN__
12821 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12823 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12829#ifdef __LITTLE_ENDIAN__
12830 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12832 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12836#ifdef __POWER8_VECTOR__
12838#ifdef __LITTLE_ENDIAN__
12839 return __builtin_altivec_vupkhsw(
__a);
12841 return __builtin_altivec_vupklsw(
__a);
12847#ifdef __LITTLE_ENDIAN__
12848 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12850 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12856 return (vector
double)(
__a[2],
__a[3]);
12864#ifdef __LITTLE_ENDIAN__
12865 return __builtin_altivec_vupkhsb((vector
char)
__a);
12867 return __builtin_altivec_vupklsb((vector
char)
__a);
12873#ifdef __LITTLE_ENDIAN__
12874 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12876 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12883#ifdef __LITTLE_ENDIAN__
12884 return __builtin_altivec_vupkhsh(
__a);
12886 return __builtin_altivec_vupklsh(
__a);
12892#ifdef __LITTLE_ENDIAN__
12893 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12895 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12901#ifdef __LITTLE_ENDIAN__
12902 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12904 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12910#ifdef __POWER8_VECTOR__
12911static __inline__ vector
long long __ATTRS_o_ai vec_vupklsw(vector
int __a) {
12912#ifdef __LITTLE_ENDIAN__
12913 return __builtin_altivec_vupkhsw(
__a);
12915 return __builtin_altivec_vupklsw(
__a);
12920vec_vupklsw(vector
bool int __a) {
12921#ifdef __LITTLE_ENDIAN__
12922 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12924 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12934vec_vsx_ld(
int __a,
const vector
bool int *
__b) {
12935 return (vector
bool int)__builtin_vsx_lxvw4x(
__a,
__b);
12939vec_vsx_ld(
int __a,
const vector
signed int *
__b) {
12940 return (vector
signed int)__builtin_vsx_lxvw4x(
__a,
__b);
12944vec_vsx_ld(
int __a,
const signed int *
__b) {
12945 return (vector
signed int)__builtin_vsx_lxvw4x(
__a,
__b);
12949vec_vsx_ld(
int __a,
const vector
unsigned int *
__b) {
12950 return (vector
unsigned int)__builtin_vsx_lxvw4x(
__a,
__b);
12954vec_vsx_ld(
int __a,
const unsigned int *
__b) {
12955 return (vector
unsigned int)__builtin_vsx_lxvw4x(
__a,
__b);
12959vec_vsx_ld(
int __a,
const vector
float *
__b) {
12960 return (vector
float)__builtin_vsx_lxvw4x(
__a,
__b);
12964 const float *
__b) {
12965 return (vector
float)__builtin_vsx_lxvw4x(
__a,
__b);
12969vec_vsx_ld(
int __a,
const vector
signed long long *
__b) {
12970 return (vector
signed long long)__builtin_vsx_lxvd2x(
__a,
__b);
12973static __inline__ vector
unsigned long long __ATTRS_o_ai
12974vec_vsx_ld(
int __a,
const vector
unsigned long long *
__b) {
12975 return (vector
unsigned long long)__builtin_vsx_lxvd2x(
__a,
__b);
12979vec_vsx_ld(
int __a,
const vector
double *
__b) {
12980 return (vector
double)__builtin_vsx_lxvd2x(
__a,
__b);
12984vec_vsx_ld(
int __a,
const double *
__b) {
12985 return (vector
double)__builtin_vsx_lxvd2x(
__a,
__b);
12989vec_vsx_ld(
int __a,
const vector
bool short *
__b) {
12990 return (vector
bool short)__builtin_vsx_lxvw4x(
__a,
__b);
12994vec_vsx_ld(
int __a,
const vector
signed short *
__b) {
12995 return (vector
signed short)__builtin_vsx_lxvw4x(
__a,
__b);
12999vec_vsx_ld(
int __a,
const signed short *
__b) {
13000 return (vector
signed short)__builtin_vsx_lxvw4x(
__a,
__b);
13004vec_vsx_ld(
int __a,
const vector
unsigned short *
__b) {
13005 return (vector
unsigned short)__builtin_vsx_lxvw4x(
__a,
__b);
13009vec_vsx_ld(
int __a,
const unsigned short *
__b) {
13010 return (vector
unsigned short)__builtin_vsx_lxvw4x(
__a,
__b);
13014vec_vsx_ld(
int __a,
const vector
bool char *
__b) {
13015 return (vector
bool char)__builtin_vsx_lxvw4x(
__a,
__b);
13019vec_vsx_ld(
int __a,
const vector
signed char *
__b) {
13020 return (vector
signed char)__builtin_vsx_lxvw4x(
__a,
__b);
13024vec_vsx_ld(
int __a,
const signed char *
__b) {
13025 return (vector
signed char)__builtin_vsx_lxvw4x(
__a,
__b);
13029vec_vsx_ld(
int __a,
const vector
unsigned char *
__b) {
13030 return (vector
unsigned char)__builtin_vsx_lxvw4x(
__a,
__b);
13034vec_vsx_ld(
int __a,
const unsigned char *
__b) {
13035 return (vector
unsigned char)__builtin_vsx_lxvw4x(
__a,
__b);
13045 vector
bool int *
__c) {
13046 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13051 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13055 unsigned int *
__c) {
13056 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13060 vector
signed int *
__c) {
13061 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13066 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13070 vector
unsigned int *
__c) {
13071 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13075 unsigned int *
__c) {
13076 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13080 vector
float *
__c) {
13081 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13086 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13089static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed long long __a,
13091 vector
signed long long *
__c) {
13092 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13095static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned long long __a,
13097 vector
unsigned long long *
__c) {
13098 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13102 vector
double *
__c) {
13103 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13108 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13112 vector
bool short *
__c) {
13113 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13117 signed short *
__c) {
13118 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13122 unsigned short *
__c) {
13123 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13126 vector
signed short *
__c) {
13127 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13131 signed short *
__c) {
13132 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13135static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
13137 vector
unsigned short *
__c) {
13138 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13141static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
13142 int __b,
unsigned short *
__c) {
13143 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13147 vector
bool char *
__c) {
13148 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13152 signed char *
__c) {
13153 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13157 unsigned char *
__c) {
13158 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13162 vector
signed char *
__c) {
13163 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13167 signed char *
__c) {
13168 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13171static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
13173 vector
unsigned char *
__c) {
13174 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13177static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
13178 int __b,
unsigned char *
__c) {
13179 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13185#define vec_xxpermdi __builtin_vsx_xxpermdi
13186#define vec_xxsldwi __builtin_vsx_xxsldwi
13187#define vec_permi(__a, __b, __c) \
13188 _Generic((__a), vector signed long long \
13189 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13190 (((__c)&0x1) + 2)), \
13191 vector unsigned long long \
13192 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13193 (((__c)&0x1) + 2)), \
13195 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13196 (((__c)&0x1) + 2)))
13201#define __builtin_altivec_vxor vec_xor
13210 return (vector
signed char)
__a ^
__b;
13215 return __a ^ (vector
signed char)
__b;
13225 return (vector
unsigned char)
__a ^
__b;
13230 return __a ^ (vector
unsigned char)
__b;
13234 vector
bool char __b) {
13239 vector
short __b) {
13244 vector
short __b) {
13245 return (vector
short)
__a ^
__b;
13249 vector
bool short __b) {
13250 return __a ^ (vector short)
__b;
13260 return (vector
unsigned short)
__a ^
__b;
13265 return __a ^ (vector
unsigned short)
__b;
13280 return (vector
int)
__a ^
__b;
13284 vector
bool int __b) {
13295 return (vector
unsigned int)
__a ^
__b;
13304 vector
bool int __b) {
13309 vector
float __b) {
13310 vector
unsigned int __res =
13311 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13312 return (vector
float)__res;
13316 vector
float __b) {
13317 vector
unsigned int __res =
13318 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13319 return (vector
float)__res;
13323 vector
bool int __b) {
13324 vector
unsigned int __res =
13325 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13326 return (vector
float)__res;
13331vec_xor(vector
signed long long __a, vector
signed long long __b) {
13336vec_xor(vector
bool long long __a, vector
signed long long __b) {
13337 return (vector
signed long long)
__a ^
__b;
13341vec_xor(vector
signed long long __a, vector
bool long long __b) {
13342 return __a ^ (vector
signed long long)
__b;
13345static __inline__ vector
unsigned long long __ATTRS_o_ai
13346vec_xor(vector
unsigned long long __a, vector
unsigned long long __b) {
13350static __inline__ vector
unsigned long long __ATTRS_o_ai
13351vec_xor(vector
bool long long __a, vector
unsigned long long __b) {
13352 return (vector
unsigned long long)
__a ^
__b;
13355static __inline__ vector
unsigned long long __ATTRS_o_ai
13356vec_xor(vector
unsigned long long __a, vector
bool long long __b) {
13357 return __a ^ (vector
unsigned long long)
__b;
13361vec_xor(vector
bool long long __a, vector
bool long long __b) {
13366 vector
double __b) {
13367 return (vector
double)((vector
unsigned long long)
__a ^
13368 (vector
unsigned long long)
__b);
13373 return (vector
double)((vector
unsigned long long)
__a ^
13374 (vector
unsigned long long)
__b);
13378 vector
double __b) {
13379 return (vector
double)((vector
unsigned long long)
__a ^
13380 (vector
unsigned long long)
__b);
13393 return (vector
signed char)
__a ^
__b;
13398 return __a ^ (vector
signed char)
__b;
13408 return (vector
unsigned char)
__a ^
__b;
13413 return __a ^ (vector
unsigned char)
__b;
13417 vector
bool char __b) {
13422 vector
short __b) {
13427 vector
short __b) {
13428 return (vector
short)
__a ^
__b;
13432 vector
bool short __b) {
13433 return __a ^ (vector short)
__b;
13443 return (vector
unsigned short)
__a ^
__b;
13448 return __a ^ (vector
unsigned short)
__b;
13463 return (vector
int)
__a ^
__b;
13467 vector
bool int __b) {
13478 return (vector
unsigned int)
__a ^
__b;
13487 vector
bool int __b) {
13492 vector
float __b) {
13493 vector
unsigned int __res =
13494 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13495 return (vector
float)__res;
13499 vector
float __b) {
13500 vector
unsigned int __res =
13501 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13502 return (vector
float)__res;
13506 vector
bool int __b) {
13507 vector
unsigned int __res =
13508 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13509 return (vector
float)__res;
13514vec_vxor(vector
signed long long __a, vector
signed long long __b) {
13519vec_vxor(vector
bool long long __a, vector
signed long long __b) {
13520 return (vector
signed long long)
__a ^
__b;
13524vec_vxor(vector
signed long long __a, vector
bool long long __b) {
13525 return __a ^ (vector
signed long long)
__b;
13528static __inline__ vector
unsigned long long __ATTRS_o_ai
13529vec_vxor(vector
unsigned long long __a, vector
unsigned long long __b) {
13533static __inline__ vector
unsigned long long __ATTRS_o_ai
13534vec_vxor(vector
bool long long __a, vector
unsigned long long __b) {
13535 return (vector
unsigned long long)
__a ^
__b;
13538static __inline__ vector
unsigned long long __ATTRS_o_ai
13539vec_vxor(vector
unsigned long long __a, vector
bool long long __b) {
13540 return __a ^ (vector
unsigned long long)
__b;
13625#ifdef __POWER9_VECTOR__
13627#define vec_insert4b __builtin_vsx_insertword
13628#define vec_extract4b __builtin_vsx_extractuword
13633vec_extract_exp(vector
float __a) {
13634 return __builtin_vsx_xvxexpsp(
__a);
13637static __inline__ vector
unsigned long long __ATTRS_o_ai
13638vec_extract_exp(vector
double __a) {
13639 return __builtin_vsx_xvxexpdp(
__a);
13645vec_extract_sig(vector
float __a) {
13646 return __builtin_vsx_xvxsigsp(
__a);
13649static __inline__ vector
unsigned long long __ATTRS_o_ai
13650vec_extract_sig (vector
double __a) {
13651 return __builtin_vsx_xvxsigdp(
__a);
13655vec_extract_fp32_from_shorth(vector
unsigned short __a) {
13656 vector
unsigned short __b =
13657#ifdef __LITTLE_ENDIAN__
13658 __builtin_shufflevector(
__a,
__a, 0, -1, 1, -1, 2, -1, 3, -1);
13660 __builtin_shufflevector(
__a,
__a, -1, 0, -1, 1, -1, 2, -1, 3);
13662 return __builtin_vsx_xvcvhpsp(
__b);
13666vec_extract_fp32_from_shortl(vector
unsigned short __a) {
13667 vector
unsigned short __b =
13668#ifdef __LITTLE_ENDIAN__
13669 __builtin_shufflevector(
__a,
__a, 4, -1, 5, -1, 6, -1, 7, -1);
13671 __builtin_shufflevector(
__a,
__a, -1, 4, -1, 5, -1, 6, -1, 7);
13673 return __builtin_vsx_xvcvhpsp(
__b);
13692 vector
bool char __b,
13729 vector
bool int __b,
13742static __inline__ vector
unsigned long long __ATTRS_o_ai
13801 const short *
__b) {
13806 const vector
short *
__b) {
13830 const vector pixel *
__b) {
13840 const vector
int *
__b) {
13864 const float *
__b) {
13869 const vector
float *
__b) {
13907 const short *
__b) {
13912 const vector
short *
__b) {
13936 const vector pixel *
__b) {
13946 const vector
int *
__b) {
13970 const float *
__b) {
13975 vector
float *
__b) {
14013 const short *
__b) {
14018 const vector
short *
__b) {
14042 const vector pixel *
__b) {
14052 const vector
int *
__b) {
14076 const float *
__b) {
14081 const vector
float *
__b) {
14119 const short *
__b) {
14124 const vector
short *
__b) {
14148 const vector pixel *
__b) {
14158 const vector
int *
__b) {
14182 const float *
__b) {
14187 const vector
float *
__b) {
14195 signed char *
__c) {
14201 vector
signed char *
__c) {
14208 unsigned char *
__c) {
14214 vector
unsigned char *
__c) {
14221 vector
bool char *
__c) {
14234 vector
short *
__c) {
14241 int __b,
unsigned short *
__c) {
14248 vector
unsigned short *
__c) {
14255 vector
bool short *
__c) {
14262 vector pixel *
__c) {
14282 unsigned int *
__c) {
14288 vector
unsigned int *
__c) {
14295 vector
bool int *
__c) {
14302 vector
float *
__c) {
14311 signed char *
__c) {
14317 vector
signed char *
__c) {
14324 int __b,
unsigned char *
__c) {
14331 vector
unsigned char *
__c) {
14338 vector
bool char *
__c) {
14351 vector
short *
__c) {
14358 int __b,
unsigned short *
__c) {
14365 vector
unsigned short *
__c) {
14372 vector
bool short *
__c) {
14379 vector pixel *
__c) {
14399 unsigned int *
__c) {
14405 vector
unsigned int *
__c) {
14412 vector
bool int *
__c) {
14419 vector
float *
__c) {
14428 signed char *
__c) {
14434 vector
signed char *
__c) {
14441 unsigned char *
__c) {
14447 vector
unsigned char *
__c) {
14454 vector
bool char *
__c) {
14467 vector
short *
__c) {
14474 int __b,
unsigned short *
__c) {
14481 vector
unsigned short *
__c) {
14488 vector
bool short *
__c) {
14495 vector pixel *
__c) {
14515 unsigned int *
__c) {
14521 vector
unsigned int *
__c) {
14528 vector
bool int *
__c) {
14535 vector
float *
__c) {
14544 signed char *
__c) {
14550 vector
signed char *
__c) {
14557 int __b,
unsigned char *
__c) {
14564 vector
unsigned char *
__c) {
14571 vector
bool char *
__c) {
14584 vector
short *
__c) {
14591 int __b,
unsigned short *
__c) {
14598 vector
unsigned short *
__c) {
14605 vector
bool short *
__c) {
14612 vector pixel *
__c) {
14632 unsigned int *
__c) {
14638 vector
unsigned int *
__c) {
14645 vector
bool int *
__c) {
14652 vector
float *
__c) {
14662 const vector
signed char __zero = (vector
signed char)0;
14663 vector
signed char __res =
14664 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1,
14665 -1, -1, -1, -1, -1, -1, -1, -1);
14672 const vector
unsigned char __zero = (vector
unsigned char)(0);
14673 vector
unsigned char __res =
14674 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1,
14675 -1, -1, -1, -1, -1, -1, -1, -1);
14681 const vector
short __zero = (vector short)(0);
14682 vector
short __res =
14683 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1);
14690 const vector
unsigned short __zero = (vector
unsigned short)(0);
14691 vector
unsigned short __res =
14692 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1);
14698 const vector
int __zero = (vector
int)(0);
14699 vector
int __res = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14706 const vector
unsigned int __zero = (vector
unsigned int)(0);
14707 vector
unsigned int __res =
14708 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14714 const vector
float __zero = (vector
float)(0);
14715 vector
float __res = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14722 const vector
double __zero = (vector
double)(0);
14723 vector
double __res = __builtin_shufflevector(__zero, __zero, -1, -1);
14730 const vector
signed long long __zero = (vector
signed long long)(0);
14731 vector
signed long long __res =
14732 __builtin_shufflevector(__zero, __zero, -1, -1);
14737static __inline__ vector
unsigned long long __ATTRS_o_ai
14739 const vector
unsigned long long __zero = (vector
unsigned long long)(0);
14740 vector
unsigned long long __res =
14741 __builtin_shufflevector(__zero, __zero, -1, -1);
14750 return (vector
signed char)(
__a);
14755 return (vector
unsigned char)(
__a);
14759 return (vector
short)(
__a);
14764 return (vector
unsigned short)(
__a);
14768 return (vector
int)(
__a);
14773 return (vector
unsigned int)(
__a);
14779 return (vector
signed long long)(
__a);
14782static __inline__ vector
unsigned long long __ATTRS_o_ai
14784 return (vector
unsigned long long)(
__a);
14787#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
14788 defined(__SIZEOF_INT128__)
14791 return (vector
signed __int128)(
__a);
14794static __inline__ vector
unsigned __int128
__ATTRS_o_ai
14796 return (vector
unsigned __int128)(
__a);
14802 return (vector
double)(
__a);
14807 return (vector
float)(
__a);
14815 vector
signed 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
unsigned char __b) {
14828 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14833 vector
bool char __b) {
14834 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14839 vector
signed char __b) {
14840 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14845 vector
unsigned char __b) {
14846 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14851 vector
bool char __b) {
14852 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14857 vector
short __b) {
14862 vector
bool short __b) {
14863 return __builtin_altivec_vcmpequh_p(
__CR6_LT,
__a, (vector
short)
__b);
14867 vector
unsigned short __b) {
14868 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14869 (vector
short)
__b);
14873 vector
bool short __b) {
14874 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14875 (vector
short)
__b);
14879 vector
short __b) {
14880 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14881 (vector
short)
__b);
14885 vector
unsigned short __b) {
14886 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14887 (vector
short)
__b);
14891 vector
bool short __b) {
14892 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14893 (vector
short)
__b);
14897 vector pixel
__b) {
14898 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14899 (vector
short)
__b);
14907 vector
bool int __b) {
14908 return __builtin_altivec_vcmpequw_p(
__CR6_LT,
__a, (vector
int)
__b);
14912 vector
unsigned int __b) {
14913 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14918 vector
bool int __b) {
14919 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14925 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14930 vector
unsigned int __b) {
14931 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14936 vector
bool int __b) {
14937 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14943 vector
signed long long __b) {
14944#ifdef __POWER8_VECTOR__
14954 vector
bool long long __b) {
14955 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14959 vector
unsigned long long __b) {
14960 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14964 vector
bool long long __b) {
14965 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14969 vector
long long __b) {
14970 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14974 vector
unsigned long long __b) {
14975 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14979 vector
bool long long __b) {
14980 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14985 vector
float __b) {
14995 vector
double __b) {
15000#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15002 vector
signed __int128
__b) {
15003 return __builtin_altivec_vcmpequq_p(
__CR6_LT, (vector
unsigned __int128)
__a,
15004 (vector
signed __int128)
__b);
15008 vector
unsigned __int128
__b) {
15009 return __builtin_altivec_vcmpequq_p(
__CR6_LT,
__a,
15010 (vector
signed __int128)
__b);
15014 vector
bool __int128
__b) {
15015 return __builtin_altivec_vcmpequq_p(
__CR6_LT, (vector
unsigned __int128)
__a,
15016 (vector
signed __int128)
__b);
15023 vector
signed char __b) {
15028 vector
bool char __b) {
15029 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, (vector
signed char)
__b,
__a);
15033 vector
unsigned char __b) {
15038 vector
bool char __b) {
15039 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__b,
__a);
15043 vector
signed char __b) {
15044 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ,
__b, (vector
signed char)
__a);
15048 vector
unsigned char __b) {
15049 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ,
__b, (vector
unsigned char)
__a);
15053 vector
bool char __b) {
15054 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__b,
15055 (vector
unsigned char)
__a);
15059 vector
short __b) {
15064 vector
bool short __b) {
15065 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, (vector
short)
__b,
__a);
15069 vector
unsigned short __b) {
15074 vector
bool short __b) {
15075 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__b,
15080 vector
short __b) {
15081 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ,
__b, (vector
signed short)
__a);
15085 vector
unsigned short __b) {
15086 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ,
__b,
15087 (vector
unsigned short)
__a);
15091 vector
bool short __b) {
15092 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__b,
15093 (vector
unsigned short)
__a);
15101 vector
bool int __b) {
15102 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, (vector
int)
__b,
__a);
15106 vector
unsigned int __b) {
15111 vector
bool int __b) {
15112 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__b,
__a);
15117 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ,
__b, (vector
signed int)
__a);
15121 vector
unsigned int __b) {
15122 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ,
__b, (vector
unsigned int)
__a);
15126 vector
bool int __b) {
15127 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__b,
15128 (vector
unsigned int)
__a);
15133 vector
signed long long __b) {
15137 vector
bool long long __b) {
15138 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, (vector
signed long long)
__b,
15143 vector
unsigned long long __b) {
15148 vector
bool long long __b) {
15149 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__b,
15154 vector
signed long long __b) {
15155 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ,
__b,
15156 (vector
signed long long)
__a);
15160 vector
unsigned long long __b) {
15161 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ,
__b,
15162 (vector
unsigned long long)
__a);
15166 vector
bool long long __b) {
15167 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__b,
15168 (vector
unsigned long long)
__a);
15173 vector
float __b) {
15183 vector
double __b) {
15188#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15190 vector
signed __int128
__b) {
15195 vector
unsigned __int128
__b) {
15203 vector
signed char __b) {
15208 vector
bool char __b) {
15209 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT,
__a, (vector
signed char)
__b);
15213 vector
unsigned char __b) {
15218 vector
bool char __b) {
15219 return __builtin_altivec_vcmpgtub_p(
__CR6_LT,
__a, (vector
unsigned char)
__b);
15223 vector
signed char __b) {
15224 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, (vector
signed char)
__a,
__b);
15228 vector
unsigned char __b) {
15229 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__a,
__b);
15233 vector
bool char __b) {
15234 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__a,
15235 (vector
unsigned char)
__b);
15239 vector
short __b) {
15244 vector
bool short __b) {
15245 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT,
__a, (vector
short)
__b);
15249 vector
unsigned short __b) {
15254 vector
bool short __b) {
15255 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT,
__a,
15256 (vector
unsigned short)
__b);
15260 vector
short __b) {
15261 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, (vector
signed short)
__a,
__b);
15265 vector
unsigned short __b) {
15266 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__a,
15271 vector
bool short __b) {
15272 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__a,
15273 (vector
unsigned short)
__b);
15281 vector
bool int __b) {
15282 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT,
__a, (vector
int)
__b);
15286 vector
unsigned int __b) {
15291 vector
bool int __b) {
15292 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT,
__a, (vector
unsigned int)
__b);
15297 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, (vector
signed int)
__a,
__b);
15301 vector
unsigned int __b) {
15302 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__a,
__b);
15306 vector
bool int __b) {
15307 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__a,
15308 (vector
unsigned int)
__b);
15313 vector
signed long long __b) {
15317 vector
bool long long __b) {
15318 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT,
__a,
15319 (vector
signed long long)
__b);
15323 vector
unsigned long long __b) {
15328 vector
bool long long __b) {
15329 return __builtin_altivec_vcmpgtud_p(
__CR6_LT,
__a,
15330 (vector
unsigned long long)
__b);
15334 vector
signed long long __b) {
15335 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, (vector
signed long long)
__a,
15340 vector
unsigned long long __b) {
15341 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__a,
15346 vector
bool long long __b) {
15347 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__a,
15348 (vector
unsigned long long)
__b);
15353 vector
float __b) {
15363 vector
double __b) {
15368#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15370 vector
signed __int128
__b) {
15375 vector
unsigned __int128
__b) {
15383vec_all_in(vector
float __a, vector
float __b) {
15390 vector
signed char __b) {
15395 vector
bool char __b) {
15396 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ,
__a, (vector
signed char)
__b);
15400 vector
unsigned char __b) {
15405 vector
bool char __b) {
15406 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ,
__a, (vector
unsigned char)
__b);
15410 vector
signed char __b) {
15411 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, (vector
signed char)
__a,
__b);
15415 vector
unsigned char __b) {
15416 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__a,
__b);
15420 vector
bool char __b) {
15421 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__a,
15422 (vector
unsigned char)
__b);
15426 vector
short __b) {
15431 vector
bool short __b) {
15432 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ,
__a, (vector
short)
__b);
15436 vector
unsigned short __b) {
15441 vector
bool short __b) {
15442 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ,
__a,
15443 (vector
unsigned short)
__b);
15447 vector
short __b) {
15448 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, (vector
signed short)
__a,
__b);
15452 vector
unsigned short __b) {
15453 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__a,
15458 vector
bool short __b) {
15459 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__a,
15460 (vector
unsigned short)
__b);
15468 vector
bool int __b) {
15469 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ,
__a, (vector
int)
__b);
15473 vector
unsigned int __b) {
15478 vector
bool int __b) {
15479 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ,
__a, (vector
unsigned int)
__b);
15484 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, (vector
signed int)
__a,
__b);
15488 vector
unsigned int __b) {
15489 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__a,
__b);
15493 vector
bool int __b) {
15494 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__a,
15495 (vector
unsigned int)
__b);
15500 vector
signed long long __b) {
15505 vector
unsigned long long __b) {
15510 vector
bool long long __b) {
15511 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ,
__a,
15512 (vector
signed long long)
__b);
15516 vector
bool long long __b) {
15517 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ,
__a,
15518 (vector
unsigned long long)
__b);
15522 vector
signed long long __b) {
15523 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, (vector
signed long long)
__a,
15528 vector
unsigned long long __b) {
15529 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__a,
15534 vector
bool long long __b) {
15535 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__a,
15536 (vector
unsigned long long)
__b);
15541 vector
float __b) {
15551 vector
double __b) {
15556#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15558 vector
signed __int128
__b) {
15563 vector
unsigned __int128
__b) {
15571 vector
signed char __b) {
15576 vector
bool char __b) {
15577 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, (vector
signed char)
__b,
__a);
15581 vector
unsigned char __b) {
15586 vector
bool char __b) {
15587 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__b,
__a);
15591 vector
signed char __b) {
15592 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT,
__b, (vector
signed char)
__a);
15596 vector
unsigned char __b) {
15597 return __builtin_altivec_vcmpgtub_p(
__CR6_LT,
__b, (vector
unsigned char)
__a);
15601 vector
bool char __b) {
15602 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__b,
15603 (vector
unsigned char)
__a);
15607 vector
short __b) {
15612 vector
bool short __b) {
15613 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, (vector
short)
__b,
__a);
15617 vector
unsigned short __b) {
15622 vector
bool short __b) {
15623 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__b,
15628 vector
short __b) {
15629 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT,
__b, (vector
signed short)
__a);
15633 vector
unsigned short __b) {
15634 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT,
__b,
15635 (vector
unsigned short)
__a);
15639 vector
bool short __b) {
15640 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__b,
15641 (vector
unsigned short)
__a);
15649 vector
bool int __b) {
15650 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, (vector
int)
__b,
__a);
15654 vector
unsigned int __b) {
15659 vector
bool int __b) {
15660 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__b,
__a);
15665 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT,
__b, (vector
signed int)
__a);
15669 vector
unsigned int __b) {
15670 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT,
__b, (vector
unsigned int)
__a);
15674 vector
bool int __b) {
15675 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__b,
15676 (vector
unsigned int)
__a);
15681 vector
signed long long __b) {
15686 vector
unsigned long long __b) {
15691 vector
bool long long __b) {
15692 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, (vector
signed long long)
__b,
15697 vector
bool long long __b) {
15698 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__b,
15703 vector
signed long long __b) {
15704 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT,
__b,
15705 (vector
signed long long)
__a);
15709 vector
unsigned long long __b) {
15710 return __builtin_altivec_vcmpgtud_p(
__CR6_LT,
__b,
15711 (vector
unsigned long long)
__a);
15715 vector
bool long long __b) {
15716 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__b,
15717 (vector
unsigned long long)
__a);
15722 vector
float __b) {
15732 vector
double __b) {
15737#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15739 vector
signed __int128
__b) {
15744 vector
unsigned __int128
__b) {
15768 vector
signed 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
unsigned char __b) {
15781 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15786 vector
bool char __b) {
15787 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15792 vector
signed char __b) {
15793 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15798 vector
unsigned char __b) {
15799 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15804 vector
bool char __b) {
15805 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15810 vector
short __b) {
15815 vector
bool short __b) {
15816 return __builtin_altivec_vcmpequh_p(
__CR6_EQ,
__a, (vector
short)
__b);
15820 vector
unsigned short __b) {
15821 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15822 (vector
short)
__b);
15826 vector
bool short __b) {
15827 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15828 (vector
short)
__b);
15832 vector
short __b) {
15833 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15834 (vector
short)
__b);
15838 vector
unsigned short __b) {
15839 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15840 (vector
short)
__b);
15844 vector
bool short __b) {
15845 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15846 (vector
short)
__b);
15850 vector pixel
__b) {
15851 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15852 (vector
short)
__b);
15860 vector
bool int __b) {
15861 return __builtin_altivec_vcmpequw_p(
__CR6_EQ,
__a, (vector
int)
__b);
15865 vector
unsigned int __b) {
15866 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15871 vector
bool int __b) {
15872 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15878 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15883 vector
unsigned int __b) {
15884 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15889 vector
bool int __b) {
15890 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15896 vector
signed long long __b) {
15901 vector
unsigned long long __b) {
15902 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
long long)
__a,
15903 (vector
long long)
__b);
15907 vector
bool long long __b) {
15908 return __builtin_altivec_vcmpequd_p(
__CR6_EQ,
__a,
15909 (vector
signed long long)
__b);
15913 vector
bool long long __b) {
15914 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15915 (vector
signed long long)
__b);
15919 vector
signed long long __b) {
15920 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15921 (vector
signed long long)
__b);
15925 vector
unsigned long long __b) {
15926 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15927 (vector
signed long long)
__b);
15931 vector
bool long long __b) {
15932 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15933 (vector
signed long long)
__b);
15938 vector
float __b) {
15948 vector
double __b) {
15953#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15955 vector
signed __int128
__b) {
15956 return __builtin_altivec_vcmpequq_p(
__CR6_EQ, (vector
unsigned __int128)
__a,
15961 vector
unsigned __int128
__b) {
15962 return __builtin_altivec_vcmpequq_p(
__CR6_EQ,
__a,
15963 (vector
signed __int128)
__b);
15967 vector
bool __int128
__b) {
15968 return __builtin_altivec_vcmpequq_p(
__CR6_EQ, (vector
unsigned __int128)
__a,
15969 (vector
signed __int128)
__b);
15976 vector
float __b) {
15986 vector
double __b) {
15994 vector
float __b) {
16004 vector
double __b) {
16022 vector
double __b) {
16040 vector
double __b) {
16065 vector
signed char __b) {
16071 vector
bool char __b) {
16077 vector
unsigned char __b) {
16083 vector
bool char __b) {
16089 vector
signed char __b) {
16095 vector
unsigned char __b) {
16101 vector
bool char __b) {
16107 vector
short __b) {
16112 vector
bool short __b) {
16117 vector
unsigned short __b) {
16119 (vector
short)
__b);
16123 vector
bool short __b) {
16125 (vector
short)
__b);
16129 vector
short __b) {
16131 (vector
short)
__b);
16135 vector
unsigned short __b) {
16137 (vector
short)
__b);
16141 vector
bool short __b) {
16143 (vector
short)
__b);
16147 vector pixel
__b) {
16149 (vector
short)
__b);
16157 vector
bool int __b) {
16162 vector
unsigned int __b) {
16168 vector
bool int __b) {
16180 vector
unsigned int __b) {
16186 vector
bool int __b) {
16193 vector
signed long long __b) {
16198 vector
unsigned long long __b) {
16199 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, (vector
long long)
__a,
16200 (vector
long long)
__b);
16204 vector
bool long long __b) {
16206 (vector
signed long long)
__b);
16210 vector
bool long long __b) {
16211 return __builtin_altivec_vcmpequd_p(
16216 vector
signed long long __b) {
16217 return __builtin_altivec_vcmpequd_p(
16222 vector
unsigned long long __b) {
16223 return __builtin_altivec_vcmpequd_p(
16228 vector
bool long long __b) {
16229 return __builtin_altivec_vcmpequd_p(
16235 vector
float __b) {
16245 vector
double __b) {
16250#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16252 vector
signed __int128
__b) {
16254 (vector
unsigned __int128)
__a,
__b);
16258 vector
unsigned __int128
__b) {
16260 (vector
signed __int128)
__b);
16264 vector
bool __int128
__b) {
16265 return __builtin_altivec_vcmpequq_p(
16273 vector
signed char __b) {
16278 vector
bool char __b) {
16279 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, (vector
signed char)
__b,
16284 vector
unsigned char __b) {
16289 vector
bool char __b) {
16290 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__b,
16295 vector
signed char __b) {
16297 (vector
signed char)
__a);
16301 vector
unsigned char __b) {
16303 (vector
unsigned char)
__a);
16307 vector
bool char __b) {
16308 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__b,
16309 (vector
unsigned char)
__a);
16313 vector
short __b) {
16318 vector
bool short __b) {
16323 vector
unsigned short __b) {
16328 vector
bool short __b) {
16329 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__b,
16334 vector
short __b) {
16336 (vector
signed short)
__a);
16340 vector
unsigned short __b) {
16342 (vector
unsigned short)
__a);
16346 vector
bool short __b) {
16347 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__b,
16348 (vector
unsigned short)
__a);
16356 vector
bool int __b) {
16361 vector
unsigned int __b) {
16366 vector
bool int __b) {
16367 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__b,
16374 (vector
signed int)
__a);
16378 vector
unsigned int __b) {
16380 (vector
unsigned int)
__a);
16384 vector
bool int __b) {
16385 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__b,
16386 (vector
unsigned int)
__a);
16391 vector
signed long long __b) {
16396 vector
unsigned long long __b) {
16401 vector
bool long long __b) {
16403 (vector
signed long long)
__b,
__a);
16407 vector
bool long long __b) {
16409 (vector
unsigned long long)
__b,
__a);
16413 vector
signed long long __b) {
16415 (vector
signed long long)
__a);
16419 vector
unsigned long long __b) {
16421 (vector
unsigned long long)
__a);
16425 vector
bool long long __b) {
16427 (vector
unsigned long long)
__b,
16428 (vector
unsigned long long)
__a);
16433 vector
float __b) {
16443 vector
double __b) {
16448#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16450 vector
signed __int128
__b) {
16455 vector
unsigned __int128
__b) {
16463 vector
signed char __b) {
16468 vector
bool char __b) {
16470 (vector
signed char)
__b);
16474 vector
unsigned char __b) {
16479 vector
bool char __b) {
16481 (vector
unsigned char)
__b);
16485 vector
signed char __b) {
16486 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, (vector
signed char)
__a,
16491 vector
unsigned char __b) {
16492 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__a,
16497 vector
bool char __b) {
16498 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__a,
16499 (vector
unsigned char)
__b);
16503 vector
short __b) {
16508 vector
bool short __b) {
16513 vector
unsigned short __b) {
16518 vector
bool short __b) {
16520 (vector
unsigned short)
__b);
16524 vector
short __b) {
16525 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, (vector
signed short)
__a,
16530 vector
unsigned short __b) {
16531 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__a,
16536 vector
bool short __b) {
16537 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__a,
16538 (vector
unsigned short)
__b);
16546 vector
bool int __b) {
16551 vector
unsigned int __b) {
16556 vector
bool int __b) {
16558 (vector
unsigned int)
__b);
16563 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, (vector
signed int)
__a,
16568 vector
unsigned int __b) {
16569 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__a,
16574 vector
bool int __b) {
16575 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__a,
16576 (vector
unsigned int)
__b);
16581 vector
signed long long __b) {
16586 vector
unsigned long long __b) {
16591 vector
bool long long __b) {
16593 (vector
signed long long)
__b);
16597 vector
bool long long __b) {
16599 (vector
unsigned long long)
__b);
16603 vector
signed long long __b) {
16605 (vector
signed long long)
__a,
__b);
16609 vector
unsigned long long __b) {
16611 (vector
unsigned long long)
__a,
__b);
16615 vector
bool long long __b) {
16617 (vector
unsigned long long)
__a,
16618 (vector
unsigned long long)
__b);
16623 vector
float __b) {
16633 vector
double __b) {
16638#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16640 vector
signed __int128
__b) {
16645 vector
unsigned __int128
__b) {
16653 vector
signed char __b) {
16658 vector
bool char __b) {
16660 (vector
signed char)
__b);
16664 vector
unsigned char __b) {
16669 vector
bool char __b) {
16671 (vector
unsigned char)
__b);
16675 vector
signed char __b) {
16676 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, (vector
signed char)
__a,
16681 vector
unsigned char __b) {
16682 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__a,
16687 vector
bool char __b) {
16688 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__a,
16689 (vector
unsigned char)
__b);
16693 vector
short __b) {
16698 vector
bool short __b) {
16703 vector
unsigned short __b) {
16708 vector
bool short __b) {
16710 (vector
unsigned short)
__b);
16714 vector
short __b) {
16715 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, (vector
signed short)
__a,
16720 vector
unsigned short __b) {
16721 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__a,
16726 vector
bool short __b) {
16727 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__a,
16728 (vector
unsigned short)
__b);
16736 vector
bool int __b) {
16741 vector
unsigned int __b) {
16746 vector
bool int __b) {
16748 (vector
unsigned int)
__b);
16753 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, (vector
signed int)
__a,
16758 vector
unsigned int __b) {
16759 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__a,
16764 vector
bool int __b) {
16765 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__a,
16766 (vector
unsigned int)
__b);
16771 vector
signed long long __b) {
16776 vector
unsigned long long __b) {
16781 vector
bool long long __b) {
16783 (vector
signed long long)
__b);
16787 vector
bool long long __b) {
16789 (vector
unsigned long long)
__b);
16793 vector
signed long long __b) {
16795 (vector
signed long long)
__a,
__b);
16799 vector
unsigned long long __b) {
16801 (vector
unsigned long long)
__a,
__b);
16805 vector
bool long long __b) {
16807 (vector
unsigned long long)
__a,
16808 (vector
unsigned long long)
__b);
16813 vector
float __b) {
16823 vector
double __b) {
16828#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16830 vector
signed __int128
__b) {
16835 vector
unsigned __int128
__b) {
16843 vector
signed char __b) {
16848 vector
bool char __b) {
16849 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, (vector
signed char)
__b,
16854 vector
unsigned char __b) {
16859 vector
bool char __b) {
16860 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__b,
16865 vector
signed char __b) {
16867 (vector
signed char)
__a);
16871 vector
unsigned char __b) {
16873 (vector
unsigned char)
__a);
16877 vector
bool char __b) {
16878 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__b,
16879 (vector
unsigned char)
__a);
16883 vector
short __b) {
16888 vector
bool short __b) {
16893 vector
unsigned short __b) {
16898 vector
bool short __b) {
16899 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__b,
16904 vector
short __b) {
16906 (vector
signed short)
__a);
16910 vector
unsigned short __b) {
16912 (vector
unsigned short)
__a);
16916 vector
bool short __b) {
16917 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__b,
16918 (vector
unsigned short)
__a);
16926 vector
bool int __b) {
16931 vector
unsigned int __b) {
16936 vector
bool int __b) {
16937 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__b,
16944 (vector
signed int)
__a);
16948 vector
unsigned int __b) {
16950 (vector
unsigned int)
__a);
16954 vector
bool int __b) {
16955 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__b,
16956 (vector
unsigned int)
__a);
16961 vector
signed long long __b) {
16966 vector
unsigned long long __b) {
16971 vector
bool long long __b) {
16973 (vector
signed long long)
__b,
__a);
16977 vector
bool long long __b) {
16979 (vector
unsigned long long)
__b,
__a);
16983 vector
signed long long __b) {
16985 (vector
signed long long)
__a);
16989 vector
unsigned long long __b) {
16991 (vector
unsigned long long)
__a);
16995 vector
bool long long __b) {
16997 (vector
unsigned long long)
__b,
16998 (vector
unsigned long long)
__a);
17003 vector
float __b) {
17013 vector
double __b) {
17018#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
17020 vector
signed __int128
__b) {
17025 vector
unsigned __int128
__b) {
17048 vector
signed char __b) {
17054 vector
bool char __b) {
17060 vector
unsigned char __b) {
17066 vector
bool char __b) {
17072 vector
signed char __b) {
17078 vector
unsigned char __b) {
17084 vector
bool char __b) {
17090 vector
short __b) {
17095 vector
bool short __b) {
17100 vector
unsigned short __b) {
17102 (vector
short)
__b);
17106 vector
bool short __b) {
17108 (vector
short)
__b);
17112 vector
short __b) {
17114 (vector
short)
__b);
17118 vector
unsigned short __b) {
17120 (vector
short)
__b);
17124 vector
bool short __b) {
17126 (vector
short)
__b);
17130 vector pixel
__b) {
17132 (vector
short)
__b);
17140 vector
bool int __b) {
17145 vector
unsigned int __b) {
17151 vector
bool int __b) {
17163 vector
unsigned int __b) {
17169 vector
bool int __b) {
17176 vector
signed long long __b) {
17177#ifdef __POWER8_VECTOR__
17187 vector
unsigned long long __b) {
17188 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17192 vector
bool long long __b) {
17193 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17197 vector
bool long long __b) {
17198 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17202 vector
signed long long __b) {
17203 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17207 vector
unsigned long long __b) {
17208 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17212 vector
bool long long __b) {
17213 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17218 vector
float __b) {
17228 vector
double __b) {
17233#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
17235 vector
signed __int128
__b) {
17237 (vector
unsigned __int128)
__a,
__b);
17241 vector
unsigned __int128
__b) {
17243 (vector
signed __int128)
__b);
17247 vector
bool __int128
__b) {
17248 return __builtin_altivec_vcmpequq_p(
17256 vector
float __b) {
17266 vector
double __b) {
17274 vector
float __b) {
17284 vector
double __b) {
17292 vector
float __b) {
17302 vector
double __b) {
17310 vector
float __b) {
17320 vector
double __b) {
17344vec_any_out(vector
float __a, vector
float __b) {
17362#define vec_sbox_be __builtin_altivec_crypto_vsbox
17363#define vec_cipher_be __builtin_altivec_crypto_vcipher
17364#define vec_cipherlast_be __builtin_altivec_crypto_vcipherlast
17365#define vec_ncipher_be __builtin_altivec_crypto_vncipher
17366#define vec_ncipherlast_be __builtin_altivec_crypto_vncipherlast
17369static __inline__ vector
unsigned char __attribute__((__always_inline__))
17370__builtin_crypto_vsbox(vector
unsigned char __a) {
17371 return __builtin_altivec_crypto_vsbox(
__a);
17374static __inline__ vector
unsigned char __attribute__((__always_inline__))
17375__builtin_crypto_vcipher(vector
unsigned char __a,
17376 vector
unsigned char __b) {
17377 return __builtin_altivec_crypto_vcipher(
__a,
__b);
17380static __inline__ vector
unsigned char __attribute__((__always_inline__))
17381__builtin_crypto_vcipherlast(vector
unsigned char __a,
17382 vector
unsigned char __b) {
17383 return __builtin_altivec_crypto_vcipherlast(
__a,
__b);
17386static __inline__ vector
unsigned char __attribute__((__always_inline__))
17387__builtin_crypto_vncipher(vector
unsigned char __a,
17388 vector
unsigned char __b) {
17389 return __builtin_altivec_crypto_vncipher(
__a,
__b);
17392static __inline__ vector
unsigned char __attribute__((__always_inline__))
17393__builtin_crypto_vncipherlast(vector
unsigned char __a,
17394 vector
unsigned char __b) {
17395 return __builtin_altivec_crypto_vncipherlast(
__a,
__b);
17399#define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad
17400#define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw
17402#define vec_shasigma_be(X, Y, Z) \
17403 _Generic((X), vector unsigned int \
17404 : __builtin_crypto_vshasigmaw, vector unsigned long long \
17405 : __builtin_crypto_vshasigmad)((X), (Y), (Z))
17408#ifdef __POWER8_VECTOR__
17410vec_permxor(vector
bool char __a, vector
bool char __b,
17411 vector
bool char __c) {
17412 return (vector
bool char)__builtin_altivec_crypto_vpermxor(
17413 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17414 (vector
unsigned char)
__c);
17418vec_permxor(vector
signed char __a, vector
signed char __b,
17419 vector
signed char __c) {
17420 return (vector
signed char)__builtin_altivec_crypto_vpermxor(
17421 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17422 (vector
unsigned char)
__c);
17426vec_permxor(vector
unsigned char __a, vector
unsigned char __b,
17427 vector
unsigned char __c) {
17428 return __builtin_altivec_crypto_vpermxor(
__a,
__b,
__c);
17432__builtin_crypto_vpermxor(vector
unsigned char __a, vector
unsigned char __b,
17433 vector
unsigned char __c) {
17434 return __builtin_altivec_crypto_vpermxor(
__a,
__b,
__c);
17438__builtin_crypto_vpermxor(vector
unsigned short __a, vector
unsigned short __b,
17439 vector
unsigned short __c) {
17440 return (vector
unsigned short)__builtin_altivec_crypto_vpermxor(
17441 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17442 (vector
unsigned char)
__c);
17445static __inline__ vector
unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
17446 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
17447 return (vector
unsigned int)__builtin_altivec_crypto_vpermxor(
17448 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17449 (vector
unsigned char)
__c);
17452static __inline__ vector
unsigned long long __ATTRS_o_ai
17453__builtin_crypto_vpermxor(vector
unsigned long long __a,
17454 vector
unsigned long long __b,
17455 vector
unsigned long long __c) {
17456 return (vector
unsigned long long)__builtin_altivec_crypto_vpermxor(
17457 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17458 (vector
unsigned char)
__c);
17462__builtin_crypto_vpmsumb(vector
unsigned char __a, vector
unsigned char __b) {
17463 return __builtin_altivec_crypto_vpmsumb(
__a,
__b);
17467__builtin_crypto_vpmsumb(vector
unsigned short __a, vector
unsigned short __b) {
17468 return __builtin_altivec_crypto_vpmsumh(
__a,
__b);
17472__builtin_crypto_vpmsumb(vector
unsigned int __a, vector
unsigned int __b) {
17473 return __builtin_altivec_crypto_vpmsumw(
__a,
__b);
17476static __inline__ vector
unsigned long long __ATTRS_o_ai
17477__builtin_crypto_vpmsumb(vector
unsigned long long __a,
17478 vector
unsigned long long __b) {
17479 return __builtin_altivec_crypto_vpmsumd(
__a,
__b);
17483vec_vgbbd(vector
signed char __a) {
17484 return (vector
signed char)__builtin_altivec_vgbbd((vector
unsigned char)
__a);
17487#define vec_pmsum_be __builtin_crypto_vpmsumb
17488#define vec_gb __builtin_altivec_vgbbd
17491vec_vgbbd(vector
unsigned char __a) {
17492 return __builtin_altivec_vgbbd(
__a);
17496vec_gbb(vector
signed long long __a) {
17497 return (vector
signed long long)__builtin_altivec_vgbbd(
17498 (vector
unsigned char)
__a);
17501static __inline__ vector
unsigned long long __ATTRS_o_ai
17502vec_gbb(vector
unsigned long long __a) {
17503 return (vector
unsigned long long)__builtin_altivec_vgbbd(
17504 (vector
unsigned char)
__a);
17508vec_vbpermq(vector
signed char __a, vector
signed char __b) {
17509 return (vector
long long)__builtin_altivec_vbpermq((vector
unsigned char)
__a,
17510 (vector
unsigned char)
__b);
17514vec_vbpermq(vector
unsigned char __a, vector
unsigned char __b) {
17515 return (vector
long long)__builtin_altivec_vbpermq(
__a,
__b);
17518#if defined(__powerpc64__) && defined(__SIZEOF_INT128__)
17519static __inline__ vector
unsigned long long __ATTRS_o_ai
17520vec_bperm(vector
unsigned __int128
__a, vector
unsigned char __b) {
17521 return __builtin_altivec_vbpermq((vector
unsigned char)
__a,
17522 (vector
unsigned char)
__b);
17526vec_bperm(vector
unsigned char __a, vector
unsigned char __b) {
17527 return (vector
unsigned char)__builtin_altivec_vbpermq(
__a,
__b);
17530#ifdef __POWER9_VECTOR__
17531static __inline__ vector
unsigned long long __ATTRS_o_ai
17532vec_bperm(vector
unsigned long long __a, vector
unsigned char __b) {
17533 return __builtin_altivec_vbpermd(
__a,
__b);
17541 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17547 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17553 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17558 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17563 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17568 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17573 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17578 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17583 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17587 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17593 return __builtin_shufflevector(
__a,
__a, 1, 0);
17598 return __builtin_shufflevector(
__a,
__a, 1, 0);
17601static __inline__
__ATTRS_o_ai vector
unsigned long long
17603 return __builtin_shufflevector(
__a,
__a, 1, 0);
17607 return __builtin_shufflevector(
__a,
__a, 1, 0);
17629 vector
unsigned char __indices =
17630 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17636 vector
unsigned char __indices =
17637 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17643 vector
unsigned char __indices =
17644 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17650 vector
unsigned char __indices =
17651 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17657 vector
unsigned char __indices =
17658 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17664 vector
unsigned char __indices =
17665 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17671 vector
unsigned char __indices =
17672 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17679 vector
unsigned char __indices =
17680 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17686 vector
unsigned char __indices =
17687 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17691static __inline__ vector
unsigned long long __ATTRS_o_ai
17693 vector
unsigned char __indices =
17694 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17700 vector
unsigned char __indices =
17701 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17706#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17707 defined(__SIZEOF_INT128__)
17710 vector
unsigned char __indices =
17711 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
17712 return (vector
signed __int128)
vec_perm((vector
signed int)
__a,
17713 (vector
signed int)
__a,
17717static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17719 vector
unsigned char __indices =
17720 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
17721 return (vector
unsigned __int128)
vec_perm((vector
signed int)
__a,
17722 (vector
signed int)
__a,
17729#define vec_xld2 vec_xl
17730#define vec_xlw4 vec_xl
17732typedef vector
unsigned char unaligned_vec_uchar
__attribute__((aligned(1)));
17733typedef vector
signed short unaligned_vec_sshort
__attribute__((aligned(1)));
17734typedef vector
unsigned short unaligned_vec_ushort
__attribute__((aligned(1)));
17735typedef vector
signed int unaligned_vec_sint
__attribute__((aligned(1)));
17736typedef vector
unsigned int unaligned_vec_uint
__attribute__((aligned(1)));
17737typedef vector
float unaligned_vec_float
__attribute__((aligned(1)));
17741 return *(unaligned_vec_schar *)(__ptr + __offset);
17746 return *(unaligned_vec_uchar*)(__ptr + __offset);
17751 signed char *__addr = (
signed char *)__ptr + __offset;
17752 return *(unaligned_vec_sshort *)__addr;
17757 signed char *__addr = (
signed char *)__ptr + __offset;
17758 return *(unaligned_vec_ushort *)__addr;
17763 signed char *__addr = (
signed char *)__ptr + __offset;
17764 return *(unaligned_vec_sint *)__addr;
17769 signed char *__addr = (
signed char *)__ptr + __offset;
17770 return *(unaligned_vec_uint *)__addr;
17774 const float *__ptr) {
17775 signed char *__addr = (
signed char *)__ptr + __offset;
17776 return *(unaligned_vec_float *)__addr;
17786 signed char *__addr = (
signed char *)__ptr + __offset;
17787 return *(unaligned_vec_sll *)__addr;
17790static __inline__
__ATTRS_o_ai vector
unsigned long long
17792 signed char *__addr = (
signed char *)__ptr + __offset;
17793 return *(unaligned_vec_ull *)__addr;
17797 const double *__ptr) {
17798 signed char *__addr = (
signed char *)__ptr + __offset;
17799 return *(unaligned_vec_double *)__addr;
17803#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17804 defined(__SIZEOF_INT128__)
17806typedef vector
unsigned __int128 unaligned_vec_ui128
17810 signed char *__addr = (
signed char *)__ptr + __offset;
17811 return *(unaligned_vec_si128 *)__addr;
17814static __inline__
__ATTRS_o_ai vector
unsigned __int128
17816 signed char *__addr = (
signed char *)__ptr + __offset;
17817 return *(unaligned_vec_ui128 *)__addr;
17823#ifdef __LITTLE_ENDIAN__
17827 vector
signed char __vec = (vector
signed char)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17828 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
17829 13, 12, 11, 10, 9, 8);
17834 vector
unsigned char __vec = (vector
unsigned char)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17835 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
17836 13, 12, 11, 10, 9, 8);
17841 vector
signed short __vec = (vector
signed short)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17842 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
17847 vector
unsigned short __vec = (vector
unsigned short)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17848 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
17852vec_xl_be(
signed long long __offset,
const signed int *__ptr) {
17853 return (vector
signed int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17857vec_xl_be(
signed long long __offset,
const unsigned int *__ptr) {
17858 return (vector
unsigned int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17862vec_xl_be(
signed long long __offset,
const float *__ptr) {
17863 return (vector
float)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17867vec_xl_be(
signed long long __offset,
const signed long long *__ptr) {
17868 return (vector
signed long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17871static __inline__ vector
unsigned long long __ATTRS_o_ai
17872vec_xl_be(
signed long long __offset,
const unsigned long long *__ptr) {
17873 return (vector
unsigned long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17877vec_xl_be(
signed long long __offset,
const double *__ptr) {
17878 return (vector
double)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17881#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17882 defined(__SIZEOF_INT128__)
17884vec_xl_be(
signed long long __offset,
const signed __int128 *__ptr) {
17885 return vec_xl(__offset, __ptr);
17888static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17889vec_xl_be(
signed long long __offset,
const unsigned __int128 *__ptr) {
17890 return vec_xl(__offset, __ptr);
17895#define vec_xl_be vec_xl
17898#if defined(__POWER10_VECTOR__) && defined(__VSX__) && \
17899 defined(__SIZEOF_INT128__)
17904vec_xl_sext(
ptrdiff_t __offset,
const signed char *__pointer) {
17905 return (vector
signed __int128)*(__pointer + __offset);
17909vec_xl_sext(
ptrdiff_t __offset,
const signed short *__pointer) {
17910 return (vector
signed __int128)*(__pointer + __offset);
17914vec_xl_sext(
ptrdiff_t __offset,
const signed int *__pointer) {
17915 return (vector
signed __int128)*(__pointer + __offset);
17919vec_xl_sext(
ptrdiff_t __offset,
const signed long long *__pointer) {
17920 return (vector
signed __int128)*(__pointer + __offset);
17925static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17926vec_xl_zext(
ptrdiff_t __offset,
const unsigned char *__pointer) {
17927 return (vector
unsigned __int128)*(__pointer + __offset);
17930static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17931vec_xl_zext(
ptrdiff_t __offset,
const unsigned short *__pointer) {
17932 return (vector
unsigned __int128)*(__pointer + __offset);
17935static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17936vec_xl_zext(
ptrdiff_t __offset,
const unsigned int *__pointer) {
17937 return (vector
unsigned __int128)*(__pointer + __offset);
17940static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17941vec_xl_zext(
ptrdiff_t __offset,
const unsigned long long *__pointer) {
17942 return (vector
unsigned __int128)*(__pointer + __offset);
17950vec_xlds(
ptrdiff_t __offset,
const signed long long *__ptr) {
17951 signed long long *__addr = (
signed long long*)((
signed char *)__ptr + __offset);
17952 return (vector
signed long long) *__addr;
17955static __inline__ vector
unsigned long long __ATTRS_o_ai
17956vec_xlds(
ptrdiff_t __offset,
const unsigned long long *__ptr) {
17957 unsigned long long *__addr = (
unsigned long long *)((
signed char *)__ptr + __offset);
17958 return (unaligned_vec_ull) *__addr;
17962 const double *__ptr) {
17963 double *__addr = (
double*)((
signed char *)__ptr + __offset);
17964 return (unaligned_vec_double) *__addr;
17969vec_load_splats(
signed long long __offset,
const signed int *__ptr) {
17970 signed int *__addr = (
signed int*)((
signed char *)__ptr + __offset);
17971 return (vector
signed int)*__addr;
17975vec_load_splats(
unsigned long long __offset,
const signed int *__ptr) {
17976 signed int *__addr = (
signed int*)((
signed char *)__ptr + __offset);
17977 return (vector
signed int)*__addr;
17981vec_load_splats(
signed long long __offset,
const unsigned int *__ptr) {
17982 unsigned int *__addr = (
unsigned int*)((
signed char *)__ptr + __offset);
17983 return (vector
unsigned int)*__addr;
17987vec_load_splats(
unsigned long long __offset,
const unsigned int *__ptr) {
17988 unsigned int *__addr = (
unsigned int*)((
signed char *)__ptr + __offset);
17989 return (vector
unsigned int)*__addr;
17993vec_load_splats(
signed long long __offset,
const float *__ptr) {
17994 float *__addr = (
float*)((
signed char *)__ptr + __offset);
17995 return (vector
float)*__addr;
17999vec_load_splats(
unsigned long long __offset,
const float *__ptr) {
18000 float *__addr = (
float*)((
signed char *)__ptr + __offset);
18001 return (vector
float)*__addr;
18007#define vec_xstd2 vec_xst
18008#define vec_xstw4 vec_xst
18011 *(unaligned_vec_schar *)(__ptr + __offset) = __vec;
18016 *(unaligned_vec_uchar *)(__ptr + __offset) = __vec;
18021 signed char *__addr = (
signed char *)__ptr + __offset;
18022 *(unaligned_vec_sshort *)__addr = __vec;
18027 unsigned short *__ptr) {
18028 signed char *__addr = (
signed char *)__ptr + __offset;
18029 *(unaligned_vec_ushort *)__addr = __vec;
18034 signed char *__addr = (
signed char *)__ptr + __offset;
18035 *(unaligned_vec_sint *)__addr = __vec;
18040 signed char *__addr = (
signed char *)__ptr + __offset;
18041 *(unaligned_vec_uint *)__addr = __vec;
18046 signed char *__addr = (
signed char *)__ptr + __offset;
18047 *(unaligned_vec_float *)__addr = __vec;
18053 signed long long *__ptr) {
18054 signed char *__addr = (
signed char *)__ptr + __offset;
18055 *(unaligned_vec_sll *)__addr = __vec;
18060 unsigned long long *__ptr) {
18061 signed char *__addr = (
signed char *)__ptr + __offset;
18062 *(unaligned_vec_ull *)__addr = __vec;
18067 signed char *__addr = (
signed char *)__ptr + __offset;
18068 *(unaligned_vec_double *)__addr = __vec;
18072#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
18073 defined(__SIZEOF_INT128__)
18076 signed __int128 *__ptr) {
18077 signed char *__addr = (
signed char *)__ptr + __offset;
18078 *(unaligned_vec_si128 *)__addr = __vec;
18083 unsigned __int128 *__ptr) {
18084 signed char *__addr = (
signed char *)__ptr + __offset;
18085 *(unaligned_vec_ui128 *)__addr = __vec;
18091#if defined(__POWER10_VECTOR__) && defined(__VSX__) && \
18092 defined(__SIZEOF_INT128__)
18093static __inline__
__ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18095 signed char *__ptr) {
18096 *(__ptr + __offset) = (
signed char)__vec[0];
18100vec_xst_trunc(vector
unsigned __int128 __vec,
ptrdiff_t __offset,
18101 unsigned char *__ptr) {
18102 *(__ptr + __offset) = (
unsigned char)__vec[0];
18105static __inline__
__ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18107 signed short *__ptr) {
18108 *(__ptr + __offset) = (
signed short)__vec[0];
18112vec_xst_trunc(vector
unsigned __int128 __vec,
ptrdiff_t __offset,
18113 unsigned short *__ptr) {
18114 *(__ptr + __offset) = (
unsigned short)__vec[0];
18117static __inline__
__ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18119 signed int *__ptr) {
18120 *(__ptr + __offset) = (
signed int)__vec[0];
18124vec_xst_trunc(vector
unsigned __int128 __vec,
ptrdiff_t __offset,
18125 unsigned int *__ptr) {
18126 *(__ptr + __offset) = (
unsigned int)__vec[0];
18129static __inline__
__ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18131 signed long long *__ptr) {
18132 *(__ptr + __offset) = (
signed long long)__vec[0];
18136vec_xst_trunc(vector
unsigned __int128 __vec,
ptrdiff_t __offset,
18137 unsigned long long *__ptr) {
18138 *(__ptr + __offset) = (
unsigned long long)__vec[0];
18144#ifdef __LITTLE_ENDIAN__
18147 signed long long __offset,
18148 signed char *__ptr) {
18149 vector
signed char __tmp =
18150 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
18151 13, 12, 11, 10, 9, 8);
18152 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18153 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18157 signed long long __offset,
18158 unsigned char *__ptr) {
18159 vector
unsigned char __tmp =
18160 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
18161 13, 12, 11, 10, 9, 8);
18162 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18163 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18167 signed long long __offset,
18168 signed short *__ptr) {
18169 vector
signed short __tmp =
18170 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
18171 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18172 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18176 signed long long __offset,
18177 unsigned short *__ptr) {
18178 vector
unsigned short __tmp =
18179 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
18180 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18181 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18185 signed long long __offset,
18186 signed int *__ptr) {
18187 __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr);
18191 signed long long __offset,
18192 unsigned int *__ptr) {
18193 __builtin_vsx_stxvw4x_be((vector
int)__vec, __offset, __ptr);
18197 signed long long __offset,
18199 __builtin_vsx_stxvw4x_be((vector
int)__vec, __offset, __ptr);
18203 signed long long __offset,
18204 signed long long *__ptr) {
18205 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18209 signed long long __offset,
18210 unsigned long long *__ptr) {
18211 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18215 signed long long __offset,
18217 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18220#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
18221 defined(__SIZEOF_INT128__)
18223 signed long long __offset,
18224 signed __int128 *__ptr) {
18225 vec_xst(__vec, __offset, __ptr);
18229 signed long long __offset,
18230 unsigned __int128 *__ptr) {
18231 vec_xst(__vec, __offset, __ptr);
18236#define vec_xst_be vec_xst
18239#ifdef __POWER9_VECTOR__
18240#define vec_test_data_class(__a, __b) \
18242 (__a), vector float \
18243 : (vector bool int)__builtin_vsx_xvtstdcsp((vector float)(__a), (__b)), \
18245 : (vector bool long long)__builtin_vsx_xvtstdcdp((vector double)(__a), \
18290#ifdef __POWER8_VECTOR__
18292 return __builtin_altivec_vminsd(
__a, -
__a);
18297 return __builtin_altivec_vminsw(
__a, -
__a);
18301 return __builtin_altivec_vminsh(
__a, -
__a);
18305 return __builtin_altivec_vminsb(
__a, -
__a);
18309 vector
float __b) {
18310 return __builtin_ppc_recipdivf(
__a,
__b);
18315 vector
double __b) {
18316 return __builtin_ppc_recipdivd(
__a,
__b);
18320#ifdef __POWER10_VECTOR__
18325vec_extractm(vector
unsigned char __a) {
18326 return __builtin_altivec_vextractbm(
__a);
18330vec_extractm(vector
unsigned short __a) {
18331 return __builtin_altivec_vextracthm(
__a);
18335vec_extractm(vector
unsigned int __a) {
18336 return __builtin_altivec_vextractwm(
__a);
18340vec_extractm(vector
unsigned long long __a) {
18341 return __builtin_altivec_vextractdm(
__a);
18344#ifdef __SIZEOF_INT128__
18346vec_extractm(vector
unsigned __int128
__a) {
18347 return __builtin_altivec_vextractqm(
__a);
18354vec_expandm(vector
unsigned char __a) {
18355 return __builtin_altivec_vexpandbm(
__a);
18359vec_expandm(vector
unsigned short __a) {
18360 return __builtin_altivec_vexpandhm(
__a);
18364vec_expandm(vector
unsigned int __a) {
18365 return __builtin_altivec_vexpandwm(
__a);
18368static __inline__ vector
unsigned long long __ATTRS_o_ai
18369vec_expandm(vector
unsigned long long __a) {
18370 return __builtin_altivec_vexpanddm(
__a);
18373#ifdef __SIZEOF_INT128__
18374static __inline__ vector
unsigned __int128
__ATTRS_o_ai
18375vec_expandm(vector
unsigned __int128
__a) {
18376 return __builtin_altivec_vexpandqm(
__a);
18382#define vec_cntm(__a, __mp) \
18383 _Generic((__a), vector unsigned char \
18384 : __builtin_altivec_vcntmbb((vector unsigned char)(__a), \
18385 (unsigned char)(__mp)), \
18386 vector unsigned short \
18387 : __builtin_altivec_vcntmbh((vector unsigned short)(__a), \
18388 (unsigned char)(__mp)), \
18389 vector unsigned int \
18390 : __builtin_altivec_vcntmbw((vector unsigned int)(__a), \
18391 (unsigned char)(__mp)), \
18392 vector unsigned long long \
18393 : __builtin_altivec_vcntmbd((vector unsigned long long)(__a), \
18394 (unsigned char)(__mp)))
18399vec_genbm(
unsigned long long __bm) {
18400 return __builtin_altivec_mtvsrbm(__bm);
18404vec_genhm(
unsigned long long __bm) {
18405 return __builtin_altivec_mtvsrhm(__bm);
18409vec_genwm(
unsigned long long __bm) {
18410 return __builtin_altivec_mtvsrwm(__bm);
18413static __inline__ vector
unsigned long long __ATTRS_o_ai
18414vec_gendm(
unsigned long long __bm) {
18415 return __builtin_altivec_mtvsrdm(__bm);
18418#ifdef __SIZEOF_INT128__
18419static __inline__ vector
unsigned __int128
__ATTRS_o_ai
18420vec_genqm(
unsigned long long __bm) {
18421 return __builtin_altivec_mtvsrqm(__bm);
18427static __inline__ vector
unsigned long long __ATTRS_o_ai
18428vec_pdep(vector
unsigned long long __a, vector
unsigned long long __b) {
18429 return __builtin_altivec_vpdepd(
__a,
__b);
18434static __inline__ vector
unsigned long long __ATTRS_o_ai
18435vec_pext(vector
unsigned long long __a, vector
unsigned long long __b) {
18436 return __builtin_altivec_vpextd(
__a,
__b);
18441static __inline__ vector
unsigned long long __ATTRS_o_ai
18442vec_cfuge(vector
unsigned long long __a, vector
unsigned long long __b) {
18443 return __builtin_altivec_vcfuged(
__a,
__b);
18448#define vec_gnb(__a, __b) __builtin_altivec_vgnb(__a, __b)
18452#ifdef __SIZEOF_INT128__
18453#define vec_ternarylogic(__a, __b, __c, __imm) \
18454 _Generic((__a), vector unsigned char \
18455 : (vector unsigned char)__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 short \
18460 : (vector unsigned short)__builtin_vsx_xxeval( \
18461 (vector unsigned long long)(__a), \
18462 (vector unsigned long long)(__b), \
18463 (vector unsigned long long)(__c), (__imm)), \
18464 vector unsigned int \
18465 : (vector unsigned int)__builtin_vsx_xxeval( \
18466 (vector unsigned long long)(__a), \
18467 (vector unsigned long long)(__b), \
18468 (vector unsigned long long)(__c), (__imm)), \
18469 vector unsigned long long \
18470 : (vector unsigned long long)__builtin_vsx_xxeval( \
18471 (vector unsigned long long)(__a), \
18472 (vector unsigned long long)(__b), \
18473 (vector unsigned long long)(__c), (__imm)), \
18474 vector unsigned __int128 \
18475 : (vector unsigned __int128)__builtin_vsx_xxeval( \
18476 (vector unsigned long long)(__a), \
18477 (vector unsigned long long)(__b), \
18478 (vector unsigned long long)(__c), (__imm)))
18480#define vec_ternarylogic(__a, __b, __c, __imm) \
18481 _Generic((__a), vector unsigned char \
18482 : (vector unsigned char)__builtin_vsx_xxeval( \
18483 (vector unsigned long long)(__a), \
18484 (vector unsigned long long)(__b), \
18485 (vector unsigned long long)(__c), (__imm)), \
18486 vector unsigned short \
18487 : (vector unsigned short)__builtin_vsx_xxeval( \
18488 (vector unsigned long long)(__a), \
18489 (vector unsigned long long)(__b), \
18490 (vector unsigned long long)(__c), (__imm)), \
18491 vector unsigned int \
18492 : (vector unsigned int)__builtin_vsx_xxeval( \
18493 (vector unsigned long long)(__a), \
18494 (vector unsigned long long)(__b), \
18495 (vector unsigned long long)(__c), (__imm)), \
18496 vector unsigned long long \
18497 : (vector unsigned long long)__builtin_vsx_xxeval( \
18498 (vector unsigned long long)(__a), \
18499 (vector unsigned long long)(__b), \
18500 (vector unsigned long long)(__c), (__imm)))
18507#define vec_genpcvm(__a, __imm) \
18509 (__a), vector unsigned char \
18510 : __builtin_vsx_xxgenpcvbm((vector unsigned char)(__a), (int)(__imm)), \
18511 vector unsigned short \
18512 : __builtin_vsx_xxgenpcvhm((vector unsigned short)(__a), (int)(__imm)), \
18513 vector unsigned int \
18514 : __builtin_vsx_xxgenpcvwm((vector unsigned int)(__a), (int)(__imm)), \
18515 vector unsigned long long \
18516 : __builtin_vsx_xxgenpcvdm((vector unsigned long long)(__a), \
18523vec_clr_first(vector
signed char __a,
unsigned int __n) {
18524#ifdef __LITTLE_ENDIAN__
18525 return (vector
signed char)__builtin_altivec_vclrrb((vector
unsigned char)
__a,
18528 return (vector
signed char)__builtin_altivec_vclrlb((vector
unsigned char)
__a,
18534vec_clr_first(vector
unsigned char __a,
unsigned int __n) {
18535#ifdef __LITTLE_ENDIAN__
18536 return (vector
unsigned char)__builtin_altivec_vclrrb(
18537 (vector
unsigned char)
__a, __n);
18539 return (vector
unsigned char)__builtin_altivec_vclrlb(
18540 (vector
unsigned char)
__a, __n);
18547vec_clr_last(vector
signed char __a,
unsigned int __n) {
18548#ifdef __LITTLE_ENDIAN__
18549 return (vector
signed char)__builtin_altivec_vclrlb((vector
unsigned char)
__a,
18552 return (vector
signed char)__builtin_altivec_vclrrb((vector
unsigned char)
__a,
18558vec_clr_last(vector
unsigned char __a,
unsigned int __n) {
18559#ifdef __LITTLE_ENDIAN__
18560 return (vector
unsigned char)__builtin_altivec_vclrlb(
18561 (vector
unsigned char)
__a, __n);
18563 return (vector
unsigned char)__builtin_altivec_vclrrb(
18564 (vector
unsigned char)
__a, __n);
18570static __inline__ vector
unsigned long long __ATTRS_o_ai
18571vec_cntlzm(vector
unsigned long long __a, vector
unsigned long long __b) {
18572 return __builtin_altivec_vclzdm(
__a,
__b);
18577static __inline__ vector
unsigned long long __ATTRS_o_ai
18578vec_cnttzm(vector
unsigned long long __a, vector
unsigned long long __b) {
18579 return __builtin_altivec_vctzdm(
__a,
__b);
18585vec_mod(vector
signed int __a, vector