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);
6083#if defined(__POWER9_VECTOR__) && defined(__SIZEOF_INT128__)
6084static __inline__ vector
unsigned __int128
6086 vector
unsigned long long __b,
6087 vector
unsigned __int128
__c) {
6088 return __builtin_altivec_vmsumudm(
__a,
__b,
__c);
6094#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
6096vec_msumc(vector
unsigned long long __a, vector
unsigned long long __b,
6097 vector
unsigned __int128
__c) {
6098 return __builtin_altivec_vmsumcud(
__a,
__b,
__c);
6104static __inline__ vector
int __attribute__((__always_inline__))
6105vec_vmsummbm(vector
signed char __a, vector
unsigned char __b, vector
int __c) {
6106 return __builtin_altivec_vmsummbm(
__a,
__b,
__c);
6111static __inline__ vector
unsigned int __attribute__((__always_inline__))
6112vec_vmsumubm(vector
unsigned char __a, vector
unsigned char __b,
6113 vector
unsigned int __c) {
6114 return __builtin_altivec_vmsumubm(
__a,
__b,
__c);
6119static __inline__ vector
int __attribute__((__always_inline__))
6120vec_vmsumshm(vector
short __a, vector
short __b, vector
int __c) {
6121 return __builtin_altivec_vmsumshm(
__a,
__b,
__c);
6126static __inline__ vector
unsigned int __attribute__((__always_inline__))
6127vec_vmsumuhm(vector
unsigned short __a, vector
unsigned short __b,
6128 vector
unsigned int __c) {
6129 return __builtin_altivec_vmsumuhm(
__a,
__b,
__c);
6137 return __builtin_altivec_vmsumshs(
__a,
__b,
__c);
6142 vector
unsigned int __c) {
6143 return __builtin_altivec_vmsumuhs(
__a,
__b,
__c);
6148static __inline__ vector
int __attribute__((__always_inline__))
6149vec_vmsumshs(vector
short __a, vector
short __b, vector
int __c) {
6150 return __builtin_altivec_vmsumshs(
__a,
__b,
__c);
6155static __inline__ vector
unsigned int __attribute__((__always_inline__))
6156vec_vmsumuhs(vector
unsigned short __a, vector
unsigned short __b,
6157 vector
unsigned int __c) {
6158 return __builtin_altivec_vmsumuhs(
__a,
__b,
__c);
6161#if defined(__POWER9_VECTOR__) && defined(__SIZEOF_INT128__)
6164static __inline__ vector
unsigned __int128
__attribute__((__always_inline__))
6165vec_vmsumudm(vector
unsigned long long __a, vector
unsigned long long __b,
6166 vector
unsigned __int128
__c) {
6167 return __builtin_altivec_vmsumudm(
__a,
__b,
__c);
6174 __builtin_altivec_mtvscr((vector
int)
__a);
6178 __builtin_altivec_mtvscr((vector
int)
__a);
6182 __builtin_altivec_mtvscr((vector
int)
__a);
6186 __builtin_altivec_mtvscr((vector
int)
__a);
6190 __builtin_altivec_mtvscr((vector
int)
__a);
6194 __builtin_altivec_mtvscr((vector
int)
__a);
6198 __builtin_altivec_mtvscr((vector
int)
__a);
6202 __builtin_altivec_mtvscr((vector
int)
__a);
6206 __builtin_altivec_mtvscr((vector
int)
__a);
6210 __builtin_altivec_mtvscr((vector
int)
__a);
6214 __builtin_altivec_mtvscr((vector
int)
__a);
6255vec_mul(vector
signed long long __a, vector
signed long long __b) {
6259static __inline__ vector
unsigned long long __ATTRS_o_ai
6260vec_mul(vector
unsigned long long __a, vector
unsigned long long __b) {
6272 vector
double __b) {
6283 vector
signed char __b) {
6284#ifdef __LITTLE_ENDIAN__
6285 return __builtin_altivec_vmulosb(
__a,
__b);
6287 return __builtin_altivec_vmulesb(
__a,
__b);
6293#ifdef __LITTLE_ENDIAN__
6294 return __builtin_altivec_vmuloub(
__a,
__b);
6296 return __builtin_altivec_vmuleub(
__a,
__b);
6302#ifdef __LITTLE_ENDIAN__
6303 return __builtin_altivec_vmulosh(
__a,
__b);
6305 return __builtin_altivec_vmulesh(
__a,
__b);
6311#ifdef __LITTLE_ENDIAN__
6312 return __builtin_altivec_vmulouh(
__a,
__b);
6314 return __builtin_altivec_vmuleuh(
__a,
__b);
6318#ifdef __POWER8_VECTOR__
6321#ifdef __LITTLE_ENDIAN__
6322 return __builtin_altivec_vmulosw(
__a,
__b);
6324 return __builtin_altivec_vmulesw(
__a,
__b);
6328static __inline__ vector
unsigned long long __ATTRS_o_ai
6330#ifdef __LITTLE_ENDIAN__
6331 return __builtin_altivec_vmulouw(
__a,
__b);
6333 return __builtin_altivec_vmuleuw(
__a,
__b);
6338#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
6340vec_mule(vector
signed long long __a, vector
signed long long __b) {
6341#ifdef __LITTLE_ENDIAN__
6342 return __builtin_altivec_vmulosd(
__a,
__b);
6344 return __builtin_altivec_vmulesd(
__a,
__b);
6349vec_mule(vector
unsigned long long __a, vector
unsigned long long __b) {
6350#ifdef __LITTLE_ENDIAN__
6351 return __builtin_altivec_vmuloud(
__a,
__b);
6353 return __builtin_altivec_vmuleud(
__a,
__b);
6360static __inline__ vector
short __attribute__((__always_inline__))
6361vec_vmulesb(vector
signed char __a, vector
signed char __b) {
6362#ifdef __LITTLE_ENDIAN__
6363 return __builtin_altivec_vmulosb(
__a,
__b);
6365 return __builtin_altivec_vmulesb(
__a,
__b);
6371static __inline__ vector
unsigned short __attribute__((__always_inline__))
6372vec_vmuleub(vector
unsigned char __a, vector
unsigned char __b) {
6373#ifdef __LITTLE_ENDIAN__
6374 return __builtin_altivec_vmuloub(
__a,
__b);
6376 return __builtin_altivec_vmuleub(
__a,
__b);
6382static __inline__ vector
int __attribute__((__always_inline__))
6383vec_vmulesh(vector
short __a, vector
short __b) {
6384#ifdef __LITTLE_ENDIAN__
6385 return __builtin_altivec_vmulosh(
__a,
__b);
6387 return __builtin_altivec_vmulesh(
__a,
__b);
6393static __inline__ vector
unsigned int __attribute__((__always_inline__))
6394vec_vmuleuh(vector
unsigned short __a, vector
unsigned short __b) {
6395#ifdef __LITTLE_ENDIAN__
6396 return __builtin_altivec_vmulouh(
__a,
__b);
6398 return __builtin_altivec_vmuleuh(
__a,
__b);
6404#ifdef __POWER10_VECTOR__
6406vec_mulh(vector
signed int __a, vector
signed int __b) {
6407 return __builtin_altivec_vmulhsw(
__a,
__b);
6411vec_mulh(vector
unsigned int __a, vector
unsigned int __b) {
6412 return __builtin_altivec_vmulhuw(
__a,
__b);
6416vec_mulh(vector
signed long long __a, vector
signed long long __b) {
6417 return __builtin_altivec_vmulhsd(
__a,
__b);
6420static __inline__ vector
unsigned long long __ATTRS_o_ai
6421vec_mulh(vector
unsigned long long __a, vector
unsigned long long __b) {
6422 return __builtin_altivec_vmulhud(
__a,
__b);
6426#ifdef __FUTURE_VECTOR__
6427static __inline__ vector
signed short
6429 return __builtin_altivec_vmulhsh(
__a,
__b);
6433vec_mulh(vector
unsigned short __a, vector
unsigned short __b) {
6434 return __builtin_altivec_vmulhuh(
__a,
__b);
6441 vector
signed char __b) {
6442#ifdef __LITTLE_ENDIAN__
6443 return __builtin_altivec_vmulesb(
__a,
__b);
6445 return __builtin_altivec_vmulosb(
__a,
__b);
6451#ifdef __LITTLE_ENDIAN__
6452 return __builtin_altivec_vmuleub(
__a,
__b);
6454 return __builtin_altivec_vmuloub(
__a,
__b);
6460#ifdef __LITTLE_ENDIAN__
6461 return __builtin_altivec_vmulesh(
__a,
__b);
6463 return __builtin_altivec_vmulosh(
__a,
__b);
6469#ifdef __LITTLE_ENDIAN__
6470 return __builtin_altivec_vmuleuh(
__a,
__b);
6472 return __builtin_altivec_vmulouh(
__a,
__b);
6476#ifdef __POWER8_VECTOR__
6479#ifdef __LITTLE_ENDIAN__
6480 return __builtin_altivec_vmulesw(
__a,
__b);
6482 return __builtin_altivec_vmulosw(
__a,
__b);
6486static __inline__ vector
unsigned long long __ATTRS_o_ai
6488#ifdef __LITTLE_ENDIAN__
6489 return __builtin_altivec_vmuleuw(
__a,
__b);
6491 return __builtin_altivec_vmulouw(
__a,
__b);
6496#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
6498vec_mulo(vector
signed long long __a, vector
signed long long __b) {
6499#ifdef __LITTLE_ENDIAN__
6500 return __builtin_altivec_vmulesd(
__a,
__b);
6502 return __builtin_altivec_vmulosd(
__a,
__b);
6507vec_mulo(vector
unsigned long long __a, vector
unsigned long long __b) {
6508#ifdef __LITTLE_ENDIAN__
6509 return __builtin_altivec_vmuleud(
__a,
__b);
6511 return __builtin_altivec_vmuloud(
__a,
__b);
6518static __inline__ vector
short __attribute__((__always_inline__))
6519vec_vmulosb(vector
signed char __a, vector
signed char __b) {
6520#ifdef __LITTLE_ENDIAN__
6521 return __builtin_altivec_vmulesb(
__a,
__b);
6523 return __builtin_altivec_vmulosb(
__a,
__b);
6529static __inline__ vector
unsigned short __attribute__((__always_inline__))
6530vec_vmuloub(vector
unsigned char __a, vector
unsigned char __b) {
6531#ifdef __LITTLE_ENDIAN__
6532 return __builtin_altivec_vmuleub(
__a,
__b);
6534 return __builtin_altivec_vmuloub(
__a,
__b);
6540static __inline__ vector
int __attribute__((__always_inline__))
6541vec_vmulosh(vector
short __a, vector
short __b) {
6542#ifdef __LITTLE_ENDIAN__
6543 return __builtin_altivec_vmulesh(
__a,
__b);
6545 return __builtin_altivec_vmulosh(
__a,
__b);
6551static __inline__ vector
unsigned int __attribute__((__always_inline__))
6552vec_vmulouh(vector
unsigned short __a, vector
unsigned short __b) {
6553#ifdef __LITTLE_ENDIAN__
6554 return __builtin_altivec_vmuleuh(
__a,
__b);
6556 return __builtin_altivec_vmulouh(
__a,
__b);
6562#ifdef __POWER8_VECTOR__
6564vec_nand(vector
signed char __a, vector
signed char __b) {
6569vec_nand(vector
signed char __a, vector
bool char __b) {
6570 return ~(
__a & (vector
signed char)
__b);
6574vec_nand(vector
bool char __a, vector
signed char __b) {
6575 return (vector
signed char)~(
__a & (vector
bool char)
__b);
6579vec_nand(vector
unsigned char __a, vector
unsigned char __b) {
6584vec_nand(vector
unsigned char __a, vector
bool char __b) {
6585 return ~(
__a & (vector
unsigned char)
__b);
6589vec_nand(vector
bool char __a, vector
unsigned char __b) {
6590 return (vector
unsigned char)~(
__a & (vector
bool char)
__b);
6593static __inline__ vector
bool char __ATTRS_o_ai vec_nand(vector
bool char __a,
6594 vector
bool char __b) {
6599vec_nand(vector
signed short __a, vector
signed short __b) {
6604vec_nand(vector
signed short __a, vector
bool short __b) {
6605 return ~(
__a & (vector
signed short)
__b);
6609vec_nand(vector
bool short __a, vector
signed short __b) {
6610 return (vector
signed short)~(
__a & (vector
bool short)
__b);
6614vec_nand(vector
unsigned short __a, vector
unsigned short __b) {
6619vec_nand(vector
unsigned short __a, vector
bool short __b) {
6620 return ~(
__a & (vector
unsigned short)
__b);
6624vec_nand(vector
bool short __a, vector
bool short __b) {
6629vec_nand(vector
signed int __a, vector
signed int __b) {
6633static __inline__ vector
signed int __ATTRS_o_ai vec_nand(vector
signed int __a,
6634 vector
bool int __b) {
6639vec_nand(vector
bool int __a, vector
signed int __b) {
6640 return (vector
signed int)~(
__a & (vector
bool int)
__b);
6644vec_nand(vector
unsigned int __a, vector
unsigned int __b) {
6649vec_nand(vector
unsigned int __a, vector
bool int __b) {
6650 return ~(
__a & (vector
unsigned int)
__b);
6654vec_nand(vector
bool int __a, vector
unsigned int __b) {
6655 return (vector
unsigned int)~(
__a & (vector
bool int)
__b);
6658static __inline__ vector
bool int __ATTRS_o_ai vec_nand(vector
bool int __a,
6659 vector
bool int __b) {
6664vec_nand(vector
float __a, vector
float __b) {
6665 return (vector
float)(~((vector
unsigned int)
__a &
6666 (vector
unsigned int)
__b));
6670vec_nand(vector
signed long long __a, vector
signed long long __b) {
6675vec_nand(vector
signed long long __a, vector
bool long long __b) {
6676 return ~(
__a & (vector
signed long long)
__b);
6680vec_nand(vector
bool long long __a, vector
signed long long __b) {
6681 return (vector
signed long long)~(
__a & (vector
bool long long)
__b);
6684static __inline__ vector
unsigned long long __ATTRS_o_ai
6685vec_nand(vector
unsigned long long __a, vector
unsigned long long __b) {
6689static __inline__ vector
unsigned long long __ATTRS_o_ai
6690vec_nand(vector
unsigned long long __a, vector
bool long long __b) {
6691 return ~(
__a & (vector
unsigned long long)
__b);
6694static __inline__ vector
unsigned long long __ATTRS_o_ai
6695vec_nand(vector
bool long long __a, vector
unsigned long long __b) {
6696 return (vector
unsigned long long)~(
__a & (vector
bool long long)
__b);
6700vec_nand(vector
bool long long __a, vector
bool long long __b) {
6705vec_nand(vector
double __a, vector
double __b) {
6706 return (vector
double)(~((vector
unsigned long long)
__a &
6707 (vector
unsigned long long)
__b));
6715static __inline__ vector
float __ATTRS_o_ai vec_nmadd(vector
float __a,
6718 return __builtin_vsx_xvnmaddasp(
__a,
__b,
__c);
6721static __inline__ vector
double __ATTRS_o_ai vec_nmadd(vector
double __a,
6723 vector
double __c) {
6724 return __builtin_vsx_xvnmaddadp(
__a,
__b,
__c);
6734 return __builtin_vsx_xvnmsubasp(
__a,
__b,
__c);
6736 return __builtin_altivec_vnmsubfp(
__a,
__b,
__c);
6743 vector
double __c) {
6744 return __builtin_vsx_xvnmsubadp(
__a,
__b,
__c);
6750static __inline__ vector
float __attribute__((__always_inline__))
6751vec_vnmsubfp(vector
float __a, vector
float __b, vector
float __c) {
6752 return __builtin_altivec_vnmsubfp(
__a,
__b,
__c);
6757#define __builtin_altivec_vnor vec_nor
6770 vector
bool char __b) {
6800 vector
bool int __b) {
6806 vector
unsigned int __res =
6807 ~((vector
unsigned int)
__a | (vector
unsigned int)
__b);
6808 return (vector
float)__res;
6813 vector
double __b) {
6814 vector
unsigned long long __res =
6815 ~((vector
unsigned long long)
__a | (vector
unsigned long long)
__b);
6816 return (vector
double)__res;
6833 vector
bool char __b) {
6863 vector
bool int __b) {
6869 vector
unsigned int __res =
6870 ~((vector
unsigned int)
__a | (vector
unsigned int)
__b);
6871 return (vector
float)__res;
6876vec_nor(vector
signed long long __a, vector
signed long long __b) {
6880static __inline__ vector
unsigned long long __ATTRS_o_ai
6881vec_nor(vector
unsigned long long __a, vector
unsigned long long __b) {
6886vec_nor(vector
bool long long __a, vector
bool long long __b) {
6893#define __builtin_altivec_vor vec_or
6902 return (vector
signed char)
__a |
__b;
6906 vector
bool char __b) {
6907 return __a | (vector
signed char)
__b;
6917 return (vector
unsigned char)
__a |
__b;
6922 return __a | (vector
unsigned char)
__b;
6926 vector
bool char __b) {
6937 return (vector
short)
__a |
__b;
6941 vector
bool short __b) {
6942 return __a | (vector short)
__b;
6952 return (vector
unsigned short)
__a |
__b;
6957 return __a | (vector
unsigned short)
__b;
6961 vector
bool short __b) {
6972 return (vector
int)
__a |
__b;
6976 vector
bool int __b) {
6987 return (vector
unsigned int)
__a |
__b;
6996 vector
bool int __b) {
7002 vector
unsigned int __res =
7003 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7004 return (vector
float)__res;
7009 vector
unsigned int __res =
7010 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7011 return (vector
float)__res;
7015 vector
bool int __b) {
7016 vector
unsigned int __res =
7017 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7018 return (vector
float)__res;
7023 vector
double __b) {
7024 return (vector
double)((vector
unsigned long long)
__a |
7025 (vector
unsigned long long)
__b);
7029 vector
bool long long __b) {
7030 return (vector
double)((vector
unsigned long long)
__a |
7031 (vector
unsigned long long)
__b);
7035 vector
double __b) {
7036 return (vector
double)((vector
unsigned long long)
__a |
7037 (vector
unsigned long long)
__b);
7041vec_or(vector
signed long long __a, vector
signed long long __b) {
7046vec_or(vector
bool long long __a, vector
signed long long __b) {
7047 return (vector
signed long long)
__a |
__b;
7051vec_or(vector
signed long long __a, vector
bool long long __b) {
7052 return __a | (vector
signed long long)
__b;
7055static __inline__ vector
unsigned long long __ATTRS_o_ai
7056vec_or(vector
unsigned long long __a, vector
unsigned long long __b) {
7060static __inline__ vector
unsigned long long __ATTRS_o_ai
7061vec_or(vector
bool long long __a, vector
unsigned long long __b) {
7062 return (vector
unsigned long long)
__a |
__b;
7065static __inline__ vector
unsigned long long __ATTRS_o_ai
7066vec_or(vector
unsigned long long __a, vector
bool long long __b) {
7067 return __a | (vector
unsigned long long)
__b;
7071vec_or(vector
bool long long __a, vector
bool long long __b) {
7076#ifdef __POWER8_VECTOR__
7078vec_orc(vector
signed char __a, vector
signed char __b) {
7083vec_orc(vector
signed char __a, vector
bool char __b) {
7084 return __a | (vector
signed char)~
__b;
7088vec_orc(vector
bool char __a, vector
signed char __b) {
7089 return (vector
signed char)(
__a | (vector
bool char)
~__b);
7093vec_orc(vector
unsigned char __a, vector
unsigned char __b) {
7098vec_orc(vector
unsigned char __a, vector
bool char __b) {
7099 return __a | (vector
unsigned char)~
__b;
7103vec_orc(vector
bool char __a, vector
unsigned char __b) {
7104 return (vector
unsigned char)(
__a | (vector
bool char)
~__b);
7107static __inline__ vector
bool char __ATTRS_o_ai vec_orc(vector
bool char __a,
7108 vector
bool char __b) {
7113vec_orc(vector
signed short __a, vector
signed short __b) {
7118vec_orc(vector
signed short __a, vector
bool short __b) {
7119 return __a | (vector
signed short)~
__b;
7123vec_orc(vector
bool short __a, vector
signed short __b) {
7124 return (vector
signed short)(
__a | (vector
bool short)
~__b);
7128vec_orc(vector
unsigned short __a, vector
unsigned short __b) {
7133vec_orc(vector
unsigned short __a, vector
bool short __b) {
7134 return __a | (vector
unsigned short)~
__b;
7138vec_orc(vector
bool short __a, vector
unsigned short __b) {
7139 return (vector
unsigned short)(
__a | (vector
bool short)
~__b);
7143vec_orc(vector
bool short __a, vector
bool short __b) {
7148vec_orc(vector
signed int __a, vector
signed int __b) {
7152static __inline__ vector
signed int __ATTRS_o_ai vec_orc(vector
signed int __a,
7153 vector
bool int __b) {
7158vec_orc(vector
bool int __a, vector
signed int __b) {
7159 return (vector
signed int)(
__a | (vector
bool int)
~__b);
7163vec_orc(vector
unsigned int __a, vector
unsigned int __b) {
7168vec_orc(vector
unsigned int __a, vector
bool int __b) {
7173vec_orc(vector
bool int __a, vector
unsigned int __b) {
7174 return (vector
unsigned int)(
__a | (vector
bool int)
~__b);
7177static __inline__ vector
bool int __ATTRS_o_ai vec_orc(vector
bool int __a,
7178 vector
bool int __b) {
7183vec_orc(vector
bool int __a, vector
float __b) {
7184 return (vector
float)(
__a | ~(vector
bool int)
__b);
7188vec_orc(vector
float __a, vector
bool int __b) {
7189 return (vector
float)((vector
bool int)
__a |
~__b);
7194 return (vector
float)((vector
unsigned int)
__a | ~(vector
unsigned int)
__b);
7198vec_orc(vector
signed long long __a, vector
signed long long __b) {
7203vec_orc(vector
signed long long __a, vector
bool long long __b) {
7204 return __a | (vector
signed long long)~
__b;
7208vec_orc(vector
bool long long __a, vector
signed long long __b) {
7209 return (vector
signed long long)(
__a | (vector
bool long long)
~__b);
7212static __inline__ vector
unsigned long long __ATTRS_o_ai
7213vec_orc(vector
unsigned long long __a, vector
unsigned long long __b) {
7217static __inline__ vector
unsigned long long __ATTRS_o_ai
7218vec_orc(vector
unsigned long long __a, vector
bool long long __b) {
7219 return __a | (vector
unsigned long long)~
__b;
7222static __inline__ vector
unsigned long long __ATTRS_o_ai
7223vec_orc(vector
bool long long __a, vector
unsigned long long __b) {
7224 return (vector
unsigned long long)(
__a | (vector
bool long long)
~__b);
7228vec_orc(vector
bool long long __a, vector
bool long long __b) {
7233vec_orc(vector
double __a, vector
bool long long __b) {
7234 return (vector
double)((vector
bool long long)
__a |
~__b);
7238vec_orc(vector
bool long long __a, vector
double __b) {
7239 return (vector
double)(
__a | ~(vector
bool long long)
__b);
7242static __inline__ vector
double __ATTRS_o_ai vec_orc(vector
double __a,
7243 vector
double __b) {
7244 return (vector
double)((vector
unsigned long long)
__a |
7245 ~(vector
unsigned long long)
__b);
7258 return (vector
signed char)
__a |
__b;
7263 return __a | (vector
signed char)
__b;
7273 return (vector
unsigned char)
__a |
__b;
7278 return __a | (vector
unsigned char)
__b;
7282 vector
bool char __b) {
7293 return (vector
short)
__a |
__b;
7297 vector
bool short __b) {
7298 return __a | (vector short)
__b;
7308 return (vector
unsigned short)
__a |
__b;
7313 return __a | (vector
unsigned short)
__b;
7328 return (vector
int)
__a |
__b;
7332 vector
bool int __b) {
7343 return (vector
unsigned int)
__a |
__b;
7352 vector
bool int __b) {
7358 vector
unsigned int __res =
7359 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7360 return (vector
float)__res;
7365 vector
unsigned int __res =
7366 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7367 return (vector
float)__res;
7371 vector
bool int __b) {
7372 vector
unsigned int __res =
7373 (vector
unsigned int)
__a | (vector
unsigned int)
__b;
7374 return (vector
float)__res;
7379vec_vor(vector
signed long long __a, vector
signed long long __b) {
7384vec_vor(vector
bool long long __a, vector
signed long long __b) {
7385 return (vector
signed long long)
__a |
__b;
7389vec_vor(vector
signed long long __a, vector
bool long long __b) {
7390 return __a | (vector
signed long long)
__b;
7393static __inline__ vector
unsigned long long __ATTRS_o_ai
7394vec_vor(vector
unsigned long long __a, vector
unsigned long long __b) {
7398static __inline__ vector
unsigned long long __ATTRS_o_ai
7399vec_vor(vector
bool long long __a, vector
unsigned long long __b) {
7400 return (vector
unsigned long long)
__a |
__b;
7403static __inline__ vector
unsigned long long __ATTRS_o_ai
7404vec_vor(vector
unsigned long long __a, vector
bool long long __b) {
7405 return __a | (vector
unsigned long long)
__b;
7409vec_vor(vector
bool long long __a, vector
bool long long __b) {
7421#ifdef __LITTLE_ENDIAN__
7422 return (vector
signed char)
vec_perm(
7424 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7425 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7427 return (vector
signed char)
vec_perm(
7429 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7430 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7436#ifdef __LITTLE_ENDIAN__
7437 return (vector
unsigned char)
vec_perm(
7439 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7440 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7442 return (vector
unsigned char)
vec_perm(
7444 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7445 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7451#ifdef __LITTLE_ENDIAN__
7454 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7455 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7459 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7460 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7466#ifdef __LITTLE_ENDIAN__
7469 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7470 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7474 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7475 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7481#ifdef __LITTLE_ENDIAN__
7482 return (vector
unsigned short)
vec_perm(
7484 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7485 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7487 return (vector
unsigned short)
vec_perm(
7489 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7490 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7495 vector
bool int __b) {
7496#ifdef __LITTLE_ENDIAN__
7497 return (vector
bool short)
vec_perm(
7499 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7500 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7502 return (vector
bool short)
vec_perm(
7504 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7505 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7511vec_pack(vector
signed long long __a, vector
signed long long __b) {
7512#ifdef __LITTLE_ENDIAN__
7513 return (vector
signed int)
vec_perm(
7515 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7516 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7518 return (vector
signed int)
vec_perm(
7520 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7521 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7525vec_pack(vector
unsigned long long __a, vector
unsigned long long __b) {
7526#ifdef __LITTLE_ENDIAN__
7527 return (vector
unsigned int)
vec_perm(
7529 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7530 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7532 return (vector
unsigned int)
vec_perm(
7534 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7535 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7541#ifdef __LITTLE_ENDIAN__
7544 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7545 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7549 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7550 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7556 return (vector
float) (
__a[0],
__a[1],
__b[0],
__b[1]);
7560#ifdef __POWER9_VECTOR__
7562vec_pack_to_short_fp32(vector
float __a, vector
float __b) {
7563 vector
float __resa = __builtin_vsx_xvcvsphp(
__a);
7564 vector
float __resb = __builtin_vsx_xvcvsphp(
__b);
7565#ifdef __LITTLE_ENDIAN__
7566 return (vector
unsigned short)vec_mergee(__resa, __resb);
7568 return (vector
unsigned short)vec_mergeo(__resa, __resb);
7575#define __builtin_altivec_vpkuhum vec_vpkuhum
7579#ifdef __LITTLE_ENDIAN__
7580 return (vector
signed char)
vec_perm(
7582 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7583 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7585 return (vector
signed char)
vec_perm(
7587 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7588 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7594#ifdef __LITTLE_ENDIAN__
7595 return (vector
unsigned char)
vec_perm(
7597 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7598 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7600 return (vector
unsigned char)
vec_perm(
7602 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7603 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7609#ifdef __LITTLE_ENDIAN__
7612 (vector
unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
7613 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
7617 (vector
unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
7618 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
7624#define __builtin_altivec_vpkuwum vec_vpkuwum
7628#ifdef __LITTLE_ENDIAN__
7631 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7632 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7636 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7637 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7643#ifdef __LITTLE_ENDIAN__
7644 return (vector
unsigned short)
vec_perm(
7646 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7647 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7649 return (vector
unsigned short)
vec_perm(
7651 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7652 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7658#ifdef __LITTLE_ENDIAN__
7659 return (vector
bool short)
vec_perm(
7661 (vector
unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
7662 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
7664 return (vector
bool short)
vec_perm(
7666 (vector
unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
7667 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
7673#ifdef __POWER8_VECTOR__
7674#define __builtin_altivec_vpkudum vec_vpkudum
7676static __inline__ vector
int __ATTRS_o_ai vec_vpkudum(vector
long long __a,
7677 vector
long long __b) {
7678#ifdef __LITTLE_ENDIAN__
7681 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7682 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7686 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7687 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7692vec_vpkudum(vector
unsigned long long __a, vector
unsigned long long __b) {
7693#ifdef __LITTLE_ENDIAN__
7694 return (vector
unsigned int)
vec_perm(
7696 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7697 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7699 return (vector
unsigned int)
vec_perm(
7701 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7702 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7707vec_vpkudum(vector
bool long long __a, vector
bool long long __b) {
7708#ifdef __LITTLE_ENDIAN__
7710 (vector
long long)
__a, (vector
long long)
__b,
7711 (vector
unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
7712 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
7715 (vector
long long)
__a, (vector
long long)
__b,
7716 (vector
unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
7717 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
7724static __inline__ vector pixel
__attribute__((__always_inline__))
7725vec_packpx(vector
unsigned int __a, vector
unsigned int __b) {
7726#ifdef __LITTLE_ENDIAN__
7727 return (vector pixel)__builtin_altivec_vpkpx(
__b,
__a);
7729 return (vector pixel)__builtin_altivec_vpkpx(
__a,
__b);
7735static __inline__ vector pixel
__attribute__((__always_inline__))
7736vec_vpkpx(vector
unsigned int __a, vector
unsigned int __b) {
7737#ifdef __LITTLE_ENDIAN__
7738 return (vector pixel)__builtin_altivec_vpkpx(
__b,
__a);
7740 return (vector pixel)__builtin_altivec_vpkpx(
__a,
__b);
7748#ifdef __LITTLE_ENDIAN__
7749 return __builtin_altivec_vpkshss(
__b,
__a);
7751 return __builtin_altivec_vpkshss(
__a,
__b);
7757#ifdef __LITTLE_ENDIAN__
7758 return __builtin_altivec_vpkuhus(
__b,
__a);
7760 return __builtin_altivec_vpkuhus(
__a,
__b);
7766#ifdef __LITTLE_ENDIAN__
7767 return __builtin_altivec_vpkswss(
__b,
__a);
7769 return __builtin_altivec_vpkswss(
__a,
__b);
7775#ifdef __LITTLE_ENDIAN__
7776 return __builtin_altivec_vpkuwus(
__b,
__a);
7778 return __builtin_altivec_vpkuwus(
__a,
__b);
7782#ifdef __POWER8_VECTOR__
7784 vector
long long __b) {
7785#ifdef __LITTLE_ENDIAN__
7786 return __builtin_altivec_vpksdss(
__b,
__a);
7788 return __builtin_altivec_vpksdss(
__a,
__b);
7793vec_packs(vector
unsigned long long __a, vector
unsigned long long __b) {
7794#ifdef __LITTLE_ENDIAN__
7795 return __builtin_altivec_vpkudus(
__b,
__a);
7797 return __builtin_altivec_vpkudus(
__a,
__b);
7804static __inline__ vector
signed char __attribute__((__always_inline__))
7805vec_vpkshss(vector
short __a, vector
short __b) {
7806#ifdef __LITTLE_ENDIAN__
7807 return __builtin_altivec_vpkshss(
__b,
__a);
7809 return __builtin_altivec_vpkshss(
__a,
__b);
7815#ifdef __POWER8_VECTOR__
7816static __inline__ vector
int __ATTRS_o_ai vec_vpksdss(vector
long long __a,
7817 vector
long long __b) {
7818#ifdef __LITTLE_ENDIAN__
7819 return __builtin_altivec_vpksdss(
__b,
__a);
7821 return __builtin_altivec_vpksdss(
__a,
__b);
7828static __inline__ vector
unsigned char __attribute__((__always_inline__))
7829vec_vpkuhus(vector
unsigned short __a, vector
unsigned short __b) {
7830#ifdef __LITTLE_ENDIAN__
7831 return __builtin_altivec_vpkuhus(
__b,
__a);
7833 return __builtin_altivec_vpkuhus(
__a,
__b);
7839#ifdef __POWER8_VECTOR__
7840static __inline__ vector
unsigned int __attribute__((__always_inline__))
7841vec_vpkudus(vector
unsigned long long __a, vector
unsigned long long __b) {
7842#ifdef __LITTLE_ENDIAN__
7843 return __builtin_altivec_vpkudus(
__b,
__a);
7845 return __builtin_altivec_vpkudus(
__a,
__b);
7852static __inline__ vector
signed short __attribute__((__always_inline__))
7853vec_vpkswss(vector
int __a, vector
int __b) {
7854#ifdef __LITTLE_ENDIAN__
7855 return __builtin_altivec_vpkswss(
__b,
__a);
7857 return __builtin_altivec_vpkswss(
__a,
__b);
7863static __inline__ vector
unsigned short __attribute__((__always_inline__))
7864vec_vpkuwus(vector
unsigned int __a, vector
unsigned int __b) {
7865#ifdef __LITTLE_ENDIAN__
7866 return __builtin_altivec_vpkuwus(
__b,
__a);
7868 return __builtin_altivec_vpkuwus(
__a,
__b);
7876#ifdef __LITTLE_ENDIAN__
7877 return __builtin_altivec_vpkshus(
__b,
__a);
7879 return __builtin_altivec_vpkshus(
__a,
__b);
7885#ifdef __LITTLE_ENDIAN__
7886 return __builtin_altivec_vpkuhus(
__b,
__a);
7888 return __builtin_altivec_vpkuhus(
__a,
__b);
7894#ifdef __LITTLE_ENDIAN__
7895 return __builtin_altivec_vpkswus(
__b,
__a);
7897 return __builtin_altivec_vpkswus(
__a,
__b);
7903#ifdef __LITTLE_ENDIAN__
7904 return __builtin_altivec_vpkuwus(
__b,
__a);
7906 return __builtin_altivec_vpkuwus(
__a,
__b);
7910#ifdef __POWER8_VECTOR__
7913#ifdef __LITTLE_ENDIAN__
7914 return __builtin_altivec_vpksdus(
__b,
__a);
7916 return __builtin_altivec_vpksdus(
__a,
__b);
7922#ifdef __LITTLE_ENDIAN__
7923 return __builtin_altivec_vpkudus(
__b,
__a);
7925 return __builtin_altivec_vpkudus(
__a,
__b);
7934#ifdef __LITTLE_ENDIAN__
7935 return __builtin_altivec_vpkshus(
__b,
__a);
7937 return __builtin_altivec_vpkshus(
__a,
__b);
7943#ifdef __LITTLE_ENDIAN__
7944 return __builtin_altivec_vpkuhus(
__b,
__a);
7946 return __builtin_altivec_vpkuhus(
__a,
__b);
7954#ifdef __LITTLE_ENDIAN__
7955 return __builtin_altivec_vpkswus(
__b,
__a);
7957 return __builtin_altivec_vpkswus(
__a,
__b);
7963#ifdef __LITTLE_ENDIAN__
7964 return __builtin_altivec_vpkuwus(
__b,
__a);
7966 return __builtin_altivec_vpkuwus(
__a,
__b);
7972#ifdef __POWER8_VECTOR__
7974vec_vpksdus(vector
long long __a, vector
long long __b) {
7975#ifdef __LITTLE_ENDIAN__
7976 return __builtin_altivec_vpksdus(
__b,
__a);
7978 return __builtin_altivec_vpksdus(
__a,
__b);
7994 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
7995#ifdef __LITTLE_ENDIAN__
7996 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
7997 255, 255, 255, 255, 255, 255, 255, 255};
7999 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)
__b,
8000 (vector
int)
__a, __d);
8002 return (vector
signed char)__builtin_altivec_vperm_4si((vector
int)
__a,
8009 vector
unsigned char __c) {
8010#ifdef __LITTLE_ENDIAN__
8011 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8012 255, 255, 255, 255, 255, 255, 255, 255};
8014 return (vector
unsigned char)__builtin_altivec_vperm_4si(
8015 (vector
int)
__b, (vector
int)
__a, __d);
8017 return (vector
unsigned char)__builtin_altivec_vperm_4si(
8024#ifdef __LITTLE_ENDIAN__
8025 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8026 255, 255, 255, 255, 255, 255, 255, 255};
8028 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)
__b,
8029 (vector
int)
__a, __d);
8031 return (vector
bool char)__builtin_altivec_vperm_4si((vector
int)
__a,
8037 vector
signed short __b,
8038 vector
unsigned char __c) {
8039#ifdef __LITTLE_ENDIAN__
8040 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8041 255, 255, 255, 255, 255, 255, 255, 255};
8043 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)
__b,
8044 (vector
int)
__a, __d);
8046 return (vector
signed short)__builtin_altivec_vperm_4si((vector
int)
__a,
8053 vector
unsigned char __c) {
8054#ifdef __LITTLE_ENDIAN__
8055 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8056 255, 255, 255, 255, 255, 255, 255, 255};
8058 return (vector
unsigned short)__builtin_altivec_vperm_4si(
8059 (vector
int)
__b, (vector
int)
__a, __d);
8061 return (vector
unsigned short)__builtin_altivec_vperm_4si(
8067 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
8068#ifdef __LITTLE_ENDIAN__
8069 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8070 255, 255, 255, 255, 255, 255, 255, 255};
8072 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)
__b,
8073 (vector
int)
__a, __d);
8075 return (vector
bool short)__builtin_altivec_vperm_4si((vector
int)
__a,
8082 vector
unsigned char __c) {
8083#ifdef __LITTLE_ENDIAN__
8084 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8085 255, 255, 255, 255, 255, 255, 255, 255};
8087 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)
__b,
8088 (vector
int)
__a, __d);
8090 return (vector pixel)__builtin_altivec_vperm_4si((vector
int)
__a,
8096 vector
signed int __b,
8097 vector
unsigned char __c) {
8098#ifdef __LITTLE_ENDIAN__
8099 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8100 255, 255, 255, 255, 255, 255, 255, 255};
8102 return (vector
signed int)__builtin_altivec_vperm_4si(
__b,
__a, __d);
8104 return (vector
signed int)__builtin_altivec_vperm_4si(
__a,
__b,
__c);
8110 vector
unsigned char __c) {
8111#ifdef __LITTLE_ENDIAN__
8112 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8113 255, 255, 255, 255, 255, 255, 255, 255};
8115 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)
__b,
8116 (vector
int)
__a, __d);
8118 return (vector
unsigned int)__builtin_altivec_vperm_4si((vector
int)
__a,
8125#ifdef __LITTLE_ENDIAN__
8126 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8127 255, 255, 255, 255, 255, 255, 255, 255};
8129 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)
__b,
8130 (vector
int)
__a, __d);
8132 return (vector
bool int)__builtin_altivec_vperm_4si((vector
int)
__a,
8139 vector
unsigned char __c) {
8140#ifdef __LITTLE_ENDIAN__
8141 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8142 255, 255, 255, 255, 255, 255, 255, 255};
8144 return (vector
float)__builtin_altivec_vperm_4si((vector
int)
__b,
8145 (vector
int)
__a, __d);
8147 return (vector
float)__builtin_altivec_vperm_4si((vector
int)
__a,
8154vec_perm(vector
signed long long __a, vector
signed long long __b,
8155 vector
unsigned char __c) {
8156#ifdef __LITTLE_ENDIAN__
8157 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8158 255, 255, 255, 255, 255, 255, 255, 255};
8160 return (vector
signed long long)__builtin_altivec_vperm_4si(
8161 (vector
int)
__b, (vector
int)
__a, __d);
8163 return (vector
signed long long)__builtin_altivec_vperm_4si(
8168static __inline__ vector
unsigned long long __ATTRS_o_ai
8169vec_perm(vector
unsigned long long __a, vector
unsigned long long __b,
8170 vector
unsigned char __c) {
8171#ifdef __LITTLE_ENDIAN__
8172 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8173 255, 255, 255, 255, 255, 255, 255, 255};
8175 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
8176 (vector
int)
__b, (vector
int)
__a, __d);
8178 return (vector
unsigned long long)__builtin_altivec_vperm_4si(
8185 vector
unsigned char __c) {
8186#ifdef __LITTLE_ENDIAN__
8187 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8188 255, 255, 255, 255, 255, 255, 255, 255};
8190 return (vector
bool long long)__builtin_altivec_vperm_4si(
8191 (vector
int)
__b, (vector
int)
__a, __d);
8193 return (vector
bool long long)__builtin_altivec_vperm_4si(
8200#ifdef __LITTLE_ENDIAN__
8201 vector
unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
8202 255, 255, 255, 255, 255, 255, 255, 255};
8204 return (vector
double)__builtin_altivec_vperm_4si((vector
int)
__b,
8205 (vector
int)
__a, __d);
8207 return (vector
double)__builtin_altivec_vperm_4si((vector
int)
__a,
8216 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8222 vector
unsigned char __c) {
8227 vector
bool char __a, vector
bool char __b, vector
unsigned char __c) {
8238 vector
unsigned char __c) {
8243 vector
bool short __a, vector
bool short __b, vector
unsigned char __c) {
8254 vector
unsigned char __c) {
8260 vector
unsigned char __c) {
8276 vector
long long __a, vector
long long __b, vector
unsigned char __c) {
8280static __inline__ vector
unsigned long long __ATTRS_o_ai
8281vec_vperm(vector
unsigned long long __a, vector
unsigned long long __b,
8282 vector
unsigned char __c) {
8296 return __builtin_vsx_xvresp(
__a);
8298 return __builtin_altivec_vrefp(
__a);
8304 return __builtin_vsx_xvredp(
__a);
8310static __inline__ vector
float __attribute__((__always_inline__))
8311vec_vrefp(vector
float __a) {
8312 return __builtin_altivec_vrefp(
__a);
8319 return (vector
signed char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8324 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8328 vector
unsigned short __b) {
8329 return __builtin_altivec_vrlh(
__a,
__b);
8334 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)
__a,
__b);
8338 vector
unsigned int __b) {
8339 return __builtin_altivec_vrlw(
__a,
__b);
8344 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)
__a,
__b);
8347#ifdef __POWER8_VECTOR__
8349vec_rl(vector
signed long long __a, vector
unsigned long long __b) {
8350 return __builtin_altivec_vrld(
__a,
__b);
8353static __inline__ vector
unsigned long long __ATTRS_o_ai
8354vec_rl(vector
unsigned long long __a, vector
unsigned long long __b) {
8355 return (vector
unsigned long long)__builtin_altivec_vrld(
8356 (vector
long long)
__a,
__b);
8360#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8362vec_rl(vector
signed __int128
__a, vector
unsigned __int128
__b) {
8363 return (vector
signed __int128)(((vector
unsigned __int128)
__b
8364 << (vector
unsigned __int128)
__a) |
8365 ((vector
unsigned __int128)
__b >>
8367 sizeof(vector
unsigned __int128)) -
8368 (vector
unsigned __int128)
__a)));
8372vec_rl(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
8373 return (
__b <<
__a)|(
__b >> ((__CHAR_BIT__ *
sizeof(vector
unsigned __int128)) -
__a));
8378#ifdef __POWER9_VECTOR__
8380vec_rlmi(vector
unsigned int __a, vector
unsigned int __b,
8381 vector
unsigned int __c) {
8382 return __builtin_altivec_vrlwmi(
__a,
__c,
__b);
8385static __inline__ vector
unsigned long long __ATTRS_o_ai
8386vec_rlmi(vector
unsigned long long __a, vector
unsigned long long __b,
8387 vector
unsigned long long __c) {
8388 return __builtin_altivec_vrldmi(
__a,
__c,
__b);
8392#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8394vec_rlmi(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
8395 vector
unsigned __int128
__c) {
8396 return __builtin_altivec_vrlqmi(
__a,
__c,
__b);
8400vec_rlmi(vector
signed __int128
__a, vector
signed __int128
__b,
8401 vector
signed __int128
__c) {
8402 return (vector
signed __int128)__builtin_altivec_vrlqmi(
8403 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__c,
8404 (vector
unsigned __int128)
__b);
8409#ifdef __POWER9_VECTOR__
8411vec_rlnm(vector
unsigned int __a, vector
unsigned int __b,
8412 vector
unsigned int __c) {
8413 vector
unsigned int OneByte = { 0x8, 0x8, 0x8, 0x8 };
8414 return __builtin_altivec_vrlwnm(
__a, ((
__c << OneByte) |
__b));
8417static __inline__ vector
unsigned long long __ATTRS_o_ai
8418vec_rlnm(vector
unsigned long long __a, vector
unsigned long long __b,
8419 vector
unsigned long long __c) {
8420 vector
unsigned long long OneByte = { 0x8, 0x8 };
8421 return __builtin_altivec_vrldnm(
__a, ((
__c << OneByte) |
__b));
8425#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
8427vec_rlnm(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
8428 vector
unsigned __int128
__c) {
8430 vector
unsigned char TmpB = (vector
unsigned char)
__b;
8431 vector
unsigned char TmpC = (vector
unsigned char)
__c;
8432 vector
unsigned char MaskAndShift =
8433#ifdef __LITTLE_ENDIAN__
8434 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, -1, -1, -1, 16, 0,
8435 1, -1, -1, -1, -1, -1);
8437 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1,
8438 -1, -1, -1, -1, -1, -1, -1);
8440 return __builtin_altivec_vrlqnm(
__a, (vector
unsigned __int128) MaskAndShift);
8444vec_rlnm(vector
signed __int128
__a, vector
signed __int128
__b,
8445 vector
signed __int128
__c) {
8447 vector
unsigned char TmpB = (vector
unsigned char)
__b;
8448 vector
unsigned char TmpC = (vector
unsigned char)
__c;
8449 vector
unsigned char MaskAndShift =
8450#ifdef __LITTLE_ENDIAN__
8451 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, -1, -1, -1, 16, 0,
8452 1, -1, -1, -1, -1, -1);
8454 __builtin_shufflevector(TmpB, TmpC, -1, -1, -1, -1, -1, 31, 30, 15, -1,
8455 -1, -1, -1, -1, -1, -1, -1);
8457 return (vector
signed __int128)__builtin_altivec_vrlqnm(
8458 (vector
unsigned __int128)
__a, (vector
unsigned __int128)MaskAndShift);
8466 return (vector
signed char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8471 return (vector
unsigned char)__builtin_altivec_vrlb((vector
char)
__a,
__b);
8478 return __builtin_altivec_vrlh(
__a,
__b);
8483 return (vector
unsigned short)__builtin_altivec_vrlh((vector
short)
__a,
__b);
8489 vector
unsigned int __b) {
8490 return __builtin_altivec_vrlw(
__a,
__b);
8495 return (vector
unsigned int)__builtin_altivec_vrlw((vector
int)
__a,
__b);
8501 return __builtin_altivec_vrfin(
__a);
8505#ifdef __XL_COMPAT_ALTIVEC__
8506static __inline__ vector
double __ATTRS_o_ai vec_rint(vector
double __a);
8508 double __fpscr = __builtin_readflm();
8509 __builtin_setrnd(0);
8510 vector
double __rounded = vec_rint(
__a);
8511 __builtin_setflm(__fpscr);
8516 return __builtin_vsx_xvrdpi(
__a);
8522static __inline__ vector
float __ATTRS_o_ai vec_rint(vector
float __a) {
8523 return __builtin_vsx_xvrspic(
__a);
8526static __inline__ vector
double __ATTRS_o_ai vec_rint(vector
double __a) {
8527 return __builtin_vsx_xvrdpic(
__a);
8532static __inline__ vector
float __ATTRS_o_ai vec_roundc(vector
float __a) {
8533 return __builtin_vsx_xvrspic(
__a);
8536static __inline__ vector
double __ATTRS_o_ai vec_roundc(vector
double __a) {
8537 return __builtin_vsx_xvrdpic(
__a);
8542static __inline__ vector
float __ATTRS_o_ai vec_nearbyint(vector
float __a) {
8543 return __builtin_vsx_xvrspi(
__a);
8546static __inline__ vector
double __ATTRS_o_ai vec_nearbyint(vector
double __a) {
8547 return __builtin_vsx_xvrdpi(
__a);
8553static __inline__ vector
float __attribute__((__always_inline__))
8554vec_vrfin(vector
float __a) {
8555 return __builtin_altivec_vrfin(
__a);
8561static __inline__ vector
float __ATTRS_o_ai vec_sqrt(vector
float __a) {
8562 return __builtin_vsx_xvsqrtsp(
__a);
8565static __inline__ vector
double __ATTRS_o_ai vec_sqrt(vector
double __a) {
8566 return __builtin_vsx_xvsqrtdp(
__a);
8574 return __builtin_vsx_xvrsqrtesp(
__a);
8576 return __builtin_altivec_vrsqrtefp(
__a);
8582 return __builtin_vsx_xvrsqrtedp(
__a);
8587 return __builtin_ppc_rsqrtf(
__a);
8592 return __builtin_ppc_rsqrtd(
__a);
8598static __inline__ __vector
float __attribute__((__always_inline__))
8599vec_vrsqrtefp(vector
float __a) {
8600 return __builtin_altivec_vrsqrtefp(
__a);
8606static __inline__
int __ATTRS_o_ai vec_test_swsqrt(vector
double __a) {
8607 return __builtin_vsx_xvtsqrtdp(
__a);
8610static __inline__
int __ATTRS_o_ai vec_test_swsqrts(vector
float __a) {
8611 return __builtin_vsx_xvtsqrtsp(
__a);
8617#define __builtin_altivec_vsel_4si vec_sel
8620 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8621 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8626 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8631 vector
unsigned char __c) {
8636 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
8637 return (
__a & ~(vector
unsigned char)
__c) | (
__b & (vector
unsigned char)
__c);
8642 return (
__a & ~(vector
bool char)
__c) | (
__b & (vector
bool char)
__c);
8646 vector
bool char __b,
8647 vector
bool char __c) {
8653 vector
unsigned short __c) {
8654 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8659 vector
bool short __c) {
8660 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8665 vector
unsigned short __c) {
8671 vector
bool short __c) {
8672 return (
__a & ~(vector
unsigned short)
__c) |
8673 (
__b & (vector
unsigned short)
__c);
8677 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
8678 return (
__a & ~(vector
bool short)
__c) | (
__b & (vector
bool short)
__c);
8688 vector
unsigned int __c) {
8694 vector
bool int __c) {
8699 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
8705 return (
__a & ~(vector
unsigned int)
__c) | (
__b & (vector
unsigned int)
__c);
8714 vector
bool int __b,
8715 vector
bool int __c) {
8721 vector
unsigned int __c) {
8722 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8723 ((vector
int)
__b & (vector
int)
__c);
8724 return (vector
float)__res;
8729 vector
bool int __c) {
8730 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8731 ((vector
int)
__b & (vector
int)
__c);
8732 return (vector
float)__res;
8738 vector
long long __res = ((vector
long long)
__a & ~(vector
long long)
__c) |
8739 ((vector
long long)
__b & (vector
long long)
__c);
8740 return (vector
double)__res;
8744vec_sel(vector
double __a, vector
double __b, vector
unsigned long long __c) {
8745 vector
long long __res = ((vector
long long)
__a & ~(vector
long long)
__c) |
8746 ((vector
long long)
__b & (vector
long long)
__c);
8747 return (vector
double)__res;
8751vec_sel(vector
bool long long __a, vector
bool long long __b,
8752 vector
bool long long __c) {
8757vec_sel(vector
bool long long __a, vector
bool long long __b,
8758 vector
unsigned long long __c) {
8759 return (
__a & ~(vector
bool long long)
__c) |
8760 (
__b & (vector
bool long long)
__c);
8764vec_sel(vector
signed long long __a, vector
signed long long __b,
8765 vector
bool long long __c) {
8766 return (
__a & ~(vector
signed long long)
__c) |
8767 (
__b & (vector
signed long long)
__c);
8771vec_sel(vector
signed long long __a, vector
signed long long __b,
8772 vector
unsigned long long __c) {
8773 return (
__a & ~(vector
signed long long)
__c) |
8774 (
__b & (vector
signed long long)
__c);
8777static __inline__ vector
unsigned long long __ATTRS_o_ai
8778vec_sel(vector
unsigned long long __a, vector
unsigned long long __b,
8779 vector
bool long long __c) {
8780 return (
__a & ~(vector
unsigned long long)
__c) |
8781 (
__b & (vector
unsigned long long)
__c);
8784static __inline__ vector
unsigned long long __ATTRS_o_ai
8785vec_sel(vector
unsigned long long __a, vector
unsigned long long __b,
8786 vector
unsigned long long __c) {
8794 vector
signed char __a, vector
signed char __b, vector
unsigned char __c) {
8795 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8800 return (
__a & ~(vector
signed char)
__c) | (
__b & (vector
signed char)
__c);
8805 vector
unsigned char __c) {
8810 vector
unsigned char __a, vector
unsigned char __b, vector
bool char __c) {
8811 return (
__a & ~(vector
unsigned char)
__c) | (
__b & (vector
unsigned char)
__c);
8816 return (
__a & ~(vector
bool char)
__c) | (
__b & (vector
bool char)
__c);
8820 vector
bool char __b,
8821 vector
bool char __c) {
8827 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8832 vector
bool short __c) {
8833 return (
__a & ~(vector
short)
__c) | (
__b & (vector short)
__c);
8838 vector
unsigned short __c) {
8844 vector
bool short __c) {
8845 return (
__a & ~(vector
unsigned short)
__c) |
8846 (
__b & (vector
unsigned short)
__c);
8850 vector
bool short __a, vector
bool short __b, vector
unsigned short __c) {
8851 return (
__a & ~(vector
bool short)
__c) | (
__b & (vector
bool short)
__c);
8861 vector
unsigned int __c) {
8867 vector
bool int __c) {
8872 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
8877 vector
unsigned int __a, vector
unsigned int __b, vector
bool int __c) {
8878 return (
__a & ~(vector
unsigned int)
__c) | (
__b & (vector
unsigned int)
__c);
8887 vector
bool int __b,
8888 vector
bool int __c) {
8894 vector
unsigned int __c) {
8895 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8896 ((vector
int)
__b & (vector
int)
__c);
8897 return (vector
float)__res;
8902 vector
bool int __c) {
8903 vector
int __res = ((vector
int)
__a & ~(vector
int)
__c) |
8904 ((vector
int)
__b & (vector
int)
__c);
8905 return (vector
float)__res;
8915 (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
8920 return (vector
signed char)
vec_sl((vector
unsigned char)
__a,
__b);
8925 return __a << (
__b % (vector
unsigned short)(
sizeof(
unsigned short) *
8930 vector
unsigned short __b) {
8931 return (vector
short)
vec_sl((vector
unsigned short)
__a,
__b);
8937 (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
8941 vector
unsigned int __b) {
8942 return (vector
int)
vec_sl((vector
unsigned int)
__a,
__b);
8945#ifdef __POWER8_VECTOR__
8946static __inline__ vector
unsigned long long __ATTRS_o_ai
8947vec_sl(vector
unsigned long long __a, vector
unsigned long long __b) {
8948 return __a << (
__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
8953vec_sl(vector
long long __a, vector
unsigned long long __b) {
8954 return (vector
long long)
vec_sl((vector
unsigned long long)
__a,
__b);
8956#elif defined(__VSX__)
8959static __inline__ vector
unsigned long long __ATTRS_o_ai
8960vec_sl(vector
unsigned long long __a, vector
unsigned long long __b) {
8961 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
8966 vector
signed long long __rightelt =
8967 (vector
signed long long)__builtin_altivec_vslo((vector
signed int)
__a,
8968 (vector
signed int)
__b);
8969#ifdef __LITTLE_ENDIAN__
8970 __rightelt = (vector
signed long long)__builtin_altivec_vsl(
8971 (vector
signed int)__rightelt,
8972 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 0));
8974 __rightelt = (vector
signed long long)__builtin_altivec_vsl(
8975 (vector
signed int)__rightelt,
8976 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 15));
8978 __a = __builtin_shufflevector(
__a,
__a, 1, 0);
8979 __b = __builtin_shufflevector(
__b,
__b, 1, 0);
8980 vector
signed long long __leftelt =
8981 (vector
signed long long)__builtin_altivec_vslo((vector
signed int)
__a,
8982 (vector
signed int)
__b);
8983#ifdef __LITTLE_ENDIAN__
8984 __leftelt = (vector
signed long long)__builtin_altivec_vsl(
8985 (vector
signed int)__leftelt,
8986 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 0));
8987 return (vector
unsigned long long)__builtin_shufflevector(__rightelt,
8990 __leftelt = (vector
signed long long)__builtin_altivec_vsl(
8991 (vector
signed int)__leftelt,
8992 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 15));
8993 return (vector
unsigned long long)__builtin_shufflevector(__leftelt,
8999vec_sl(vector
long long __a, vector
unsigned long long __b) {
9000 return (vector
long long)
vec_sl((vector
unsigned long long)
__a,
__b);
9006#define __builtin_altivec_vslb vec_vslb
9020#define __builtin_altivec_vslh vec_vslh
9034#define __builtin_altivec_vslw vec_vslw
9037 vector
unsigned int __b) {
9048#define __builtin_altivec_vsldoi_4si vec_sld
9051 vector
signed char __a, vector
signed char __b,
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 const int __c) {
9071 unsigned char __d =
__c & 0x0F;
9072#ifdef __LITTLE_ENDIAN__
9074 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9075 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9076 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9077 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9081 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9082 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9083 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9089 unsigned char __d =
__c & 0x0F;
9090#ifdef __LITTLE_ENDIAN__
9092 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9093 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9094 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9095 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9099 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9100 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9101 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9106 vector
signed short __a, vector
signed short __b,
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 const int __c) {
9126 unsigned char __d =
__c & 0x0F;
9127#ifdef __LITTLE_ENDIAN__
9129 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9130 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9131 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9132 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9136 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9137 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9138 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
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 const int __c) {
9163 unsigned char __d =
__c & 0x0F;
9164#ifdef __LITTLE_ENDIAN__
9166 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9167 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9168 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9169 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9173 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9174 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9175 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9181 unsigned char __d =
__c & 0x0F;
9182#ifdef __LITTLE_ENDIAN__
9184 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9185 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9186 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9187 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9191 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9192 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9193 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9198 vector
unsigned int __a, vector
unsigned int __b,
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));
9216 vector
bool int __b,
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));
9236 unsigned const int __c) {
9237 unsigned char __d =
__c & 0x0F;
9238#ifdef __LITTLE_ENDIAN__
9240 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9241 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9242 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9243 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9247 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9248 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9249 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9255vec_sld(vector
bool long long __a, vector
bool 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));
9274vec_sld(vector
signed long long __a, vector
signed 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));
9292static __inline__ vector
unsigned long long __ATTRS_o_ai
9293vec_sld(vector
unsigned long long __a, vector
unsigned long long __b,
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));
9313 unsigned const int __c) {
9314 unsigned char __d =
__c & 0x0F;
9315#ifdef __LITTLE_ENDIAN__
9317 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9318 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9319 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9320 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9324 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9325 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9326 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9333 vector
signed char __a, vector
signed char __b,
unsigned const int __c) {
9339 unsigned const int __c) {
9344 vector
signed short __a, vector
signed short __b,
unsigned const int __c) {
9350 unsigned const int __c) {
9360 vector
unsigned int __a, vector
unsigned int __b,
unsigned const int __c) {
9365 vector
float __a, vector
float __b,
unsigned const int __c) {
9371vec_sldw(vector
signed long long __a, vector
signed long long __b,
9372 unsigned const int __c) {
9376static __inline__ vector
unsigned long long __ATTRS_o_ai
9377vec_sldw(vector
unsigned long long __a, vector
unsigned long long __b,
9378 unsigned const int __c) {
9383 vector
double __a, vector
double __b,
unsigned const int __c) {
9388#ifdef __POWER9_VECTOR__
9391vec_slv(vector
unsigned char __a, vector
unsigned char __b) {
9392 return __builtin_altivec_vslv(
__a,
__b);
9397vec_srv(vector
unsigned char __a, vector
unsigned char __b) {
9398 return __builtin_altivec_vsrv(
__a,
__b);
9406 unsigned char __d =
__c & 0x0F;
9407#ifdef __LITTLE_ENDIAN__
9409 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9410 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9411 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9412 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9416 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9417 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9418 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9423 vector
unsigned char __a, vector
unsigned char __b,
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));
9442 unsigned char __c) {
9443 unsigned char __d =
__c & 0x0F;
9444#ifdef __LITTLE_ENDIAN__
9446 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9447 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9448 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9449 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9453 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9454 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9455 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9460 vector
unsigned short __a, vector
unsigned short __b,
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));
9498 unsigned char __c) {
9499 unsigned char __d =
__c & 0x0F;
9500#ifdef __LITTLE_ENDIAN__
9502 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9503 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9504 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9505 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9509 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9510 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9511 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9516 vector
unsigned int __a, vector
unsigned int __b,
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));
9535 unsigned char __c) {
9536 unsigned char __d =
__c & 0x0F;
9537#ifdef __LITTLE_ENDIAN__
9539 __b,
__a, (vector
unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d,
9540 20 - __d, 21 - __d, 22 - __d, 23 - __d,
9541 24 - __d, 25 - __d, 26 - __d, 27 - __d,
9542 28 - __d, 29 - __d, 30 - __d, 31 - __d));
9546 (vector
unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
9547 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
9548 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
9556 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9562 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9568 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9574 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9580 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9586 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9592 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9598 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9604 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9609 vector
unsigned char __b) {
9610 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9614 vector
unsigned short __b) {
9615 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9619 vector
unsigned int __b) {
9620 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9625 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9631 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9637 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9643 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9649 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9655 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9660 vector
unsigned char __b) {
9661 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9665 vector
unsigned short __b) {
9666 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9670 vector
unsigned int __b) {
9671 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9675 vector
unsigned char __b) {
9676 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9680 vector
unsigned short __b) {
9681 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9685 vector
unsigned int __b) {
9686 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9691 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9697 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9703 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9709 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9715 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9721 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9727vec_sll(vector
signed long long __a, vector
unsigned char __b) {
9728 return (vector
signed long long)__builtin_altivec_vsl((vector
int)
__a,
9732static __inline__ vector
unsigned long long __ATTRS_o_ai
9733vec_sll(vector
unsigned long long __a, vector
unsigned char __b) {
9734 return (vector
unsigned long long)__builtin_altivec_vsl((vector
int)
__a,
9743 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9749 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9755 return (vector
signed char)__builtin_altivec_vsl((vector
int)
__a,
9761 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9767 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9773 return (vector
unsigned char)__builtin_altivec_vsl((vector
int)
__a,
9779 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9785 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9791 return (vector
bool char)__builtin_altivec_vsl((vector
int)
__a,
9796 vector
unsigned char __b) {
9797 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9801 vector
unsigned short __b) {
9802 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9806 vector
unsigned int __b) {
9807 return (vector
short)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9812 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9818 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9824 return (vector
unsigned short)__builtin_altivec_vsl((vector
int)
__a,
9830 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9836 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9842 return (vector
bool short)__builtin_altivec_vsl((vector
int)
__a,
9847 vector
unsigned char __b) {
9848 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9852 vector
unsigned short __b) {
9853 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9857 vector
unsigned int __b) {
9858 return (vector pixel)__builtin_altivec_vsl((vector
int)
__a, (vector
int)
__b);
9862 vector
unsigned char __b) {
9863 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9867 vector
unsigned short __b) {
9868 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9872 vector
unsigned int __b) {
9873 return (vector
int)__builtin_altivec_vsl(
__a, (vector
int)
__b);
9878 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9884 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9890 return (vector
unsigned int)__builtin_altivec_vsl((vector
int)
__a,
9896 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9902 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9908 return (vector
bool int)__builtin_altivec_vsl((vector
int)
__a,
9916 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
9922 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
9928 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
9934 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
9939 vector
signed char __b) {
9940 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9944 vector
unsigned char __b) {
9945 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9950 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
9956 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
9961 vector
signed char __b) {
9962 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9966 vector
unsigned char __b) {
9967 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9971 vector
signed char __b) {
9972 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
9976 vector
unsigned char __b) {
9977 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
9982 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
9988 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
9993 vector
signed char __b) {
9994 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
9998 vector
unsigned char __b) {
9999 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10004vec_slo(vector
signed long long __a, vector
signed char __b) {
10005 return (vector
signed long long)__builtin_altivec_vslo((vector
int)
__a,
10010vec_slo(vector
signed long long __a, vector
unsigned char __b) {
10011 return (vector
signed long long)__builtin_altivec_vslo((vector
int)
__a,
10015static __inline__ vector
unsigned long long __ATTRS_o_ai
10016vec_slo(vector
unsigned long long __a, vector
signed char __b) {
10017 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)
__a,
10021static __inline__ vector
unsigned long long __ATTRS_o_ai
10022vec_slo(vector
unsigned long long __a, vector
unsigned char __b) {
10023 return (vector
unsigned long long)__builtin_altivec_vslo((vector
int)
__a,
10032 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
10038 return (vector
signed char)__builtin_altivec_vslo((vector
int)
__a,
10044 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
10050 return (vector
unsigned char)__builtin_altivec_vslo((vector
int)
__a,
10055 vector
signed char __b) {
10056 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10060 vector
unsigned char __b) {
10061 return (vector
short)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10066 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
10072 return (vector
unsigned short)__builtin_altivec_vslo((vector
int)
__a,
10077 vector
signed char __b) {
10078 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10082 vector
unsigned char __b) {
10083 return (vector pixel)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10087 vector
signed char __b) {
10088 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
10092 vector
unsigned char __b) {
10093 return (vector
int)__builtin_altivec_vslo(
__a, (vector
int)
__b);
10098 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
10104 return (vector
unsigned int)__builtin_altivec_vslo((vector
int)
__a,
10109 vector
signed char __b) {
10110 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10114 vector
unsigned char __b) {
10115 return (vector
float)__builtin_altivec_vslo((vector
int)
__a, (vector
int)
__b);
10137 unsigned char b0 = (
__b & 0x07) * 2;
10138 unsigned char b1 = b0 + 1;
10140 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10141 b0, b1, b0, b1, b0, b1));
10146 unsigned char b0 = (
__b & 0x07) * 2;
10147 unsigned char b1 = b0 + 1;
10149 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10150 b0, b1, b0, b1, b0, b1));
10155 unsigned char b0 = (
__b & 0x07) * 2;
10156 unsigned char b1 = b0 + 1;
10158 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10159 b0, b1, b0, b1, b0, b1));
10163 unsigned const int __b) {
10164 unsigned char b0 = (
__b & 0x07) * 2;
10165 unsigned char b1 = b0 + 1;
10167 (vector
unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1, b0, b1,
10168 b0, b1, b0, b1, b0, b1));
10173 unsigned char b0 = (
__b & 0x03) * 4;
10174 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10176 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10177 b2, b3, b0, b1, b2, b3));
10182 unsigned char b0 = (
__b & 0x03) * 4;
10183 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10185 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10186 b2, b3, b0, b1, b2, b3));
10191 unsigned char b0 = (
__b & 0x03) * 4;
10192 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10194 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10195 b2, b3, b0, b1, b2, b3));
10199 unsigned const int __b) {
10200 unsigned char b0 = (
__b & 0x03) * 4;
10201 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
10203 (vector
unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0, b1,
10204 b2, b3, b0, b1, b2, b3));
10209 unsigned const int __b) {
10210 unsigned char b0 = (
__b & 0x01) * 8;
10211 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10212 b6 = b0 + 6, b7 = b0 + 7;
10214 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10215 b2, b3, b4, b5, b6, b7));
10219 unsigned char b0 = (
__b & 0x01) * 8;
10220 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10221 b6 = b0 + 6, b7 = b0 + 7;
10223 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10224 b2, b3, b4, b5, b6, b7));
10228 unsigned char b0 = (
__b & 0x01) * 8;
10229 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10230 b6 = b0 + 6, b7 = b0 + 7;
10232 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10233 b2, b3, b4, b5, b6, b7));
10235static __inline__ vector
unsigned long long __ATTRS_o_ai
10237 unsigned char b0 = (
__b & 0x01) * 8;
10238 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4, b5 = b0 + 5,
10239 b6 = b0 + 6, b7 = b0 + 7;
10241 (vector
unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7, b0, b1,
10242 b2, b3, b4, b5, b6, b7));
10248#define __builtin_altivec_vspltb vec_vspltb
10261 unsigned char __b) {
10267#define __builtin_altivec_vsplth vec_vsplth
10270 unsigned char __b) {
10272 unsigned char b1 =
__b + 1;
10274 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10281 unsigned char b1 =
__b + 1;
10283 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10290 unsigned char b1 =
__b + 1;
10292 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10297 unsigned char __b) {
10299 unsigned char b1 =
__b + 1;
10301 (vector
unsigned char)(
__b, b1,
__b, b1,
__b, b1,
__b, b1,
10307#define __builtin_altivec_vspltw vec_vspltw
10310 unsigned char __b) {
10312 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10314 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10315 b1, b2, b3,
__b, b1, b2, b3));
10321 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10323 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10324 b1, b2, b3,
__b, b1, b2, b3));
10328 unsigned char __b) {
10330 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10332 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10333 b1, b2, b3,
__b, b1, b2, b3));
10337 unsigned char __b) {
10339 unsigned char b1 =
__b + 1, b2 =
__b + 2, b3 =
__b + 3;
10341 (vector
unsigned char)(
__b, b1, b2, b3,
__b, b1, b2, b3,
__b,
10342 b1, b2, b3,
__b, b1, b2, b3));
10347#define __builtin_altivec_vspltisb vec_splat_s8
10352 return (vector
signed char)(
__a);
10360 return (vector
signed char)(
__a);
10365#define __builtin_altivec_vspltish vec_splat_s16
10369 return (vector
short)(
__a);
10376 return (vector
short)(
__a);
10381#define __builtin_altivec_vspltisw vec_splat_s32
10385 return (vector
int)(
__a);
10392 return (vector
int)(
__a);
10400 return (vector
unsigned char)(
__a);
10408 return (vector
unsigned short)(
__a);
10416 return (vector
unsigned int)(
__a);
10426 (
__b % (vector
unsigned char)(
sizeof(
unsigned char) * __CHAR_BIT__));
10431 return (vector
signed char)
vec_sr((vector
unsigned char)
__a,
__b);
10437 (
__b % (vector
unsigned short)(
sizeof(
unsigned short) * __CHAR_BIT__));
10441 vector
unsigned short __b) {
10442 return (vector
short)
vec_sr((vector
unsigned short)
__a,
__b);
10448 (
__b % (vector
unsigned int)(
sizeof(
unsigned int) * __CHAR_BIT__));
10452 vector
unsigned int __b) {
10453 return (vector
int)
vec_sr((vector
unsigned int)
__a,
__b);
10456#ifdef __POWER8_VECTOR__
10457static __inline__ vector
unsigned long long __ATTRS_o_ai
10458vec_sr(vector
unsigned long long __a, vector
unsigned long long __b) {
10459 return __a >> (
__b % (vector
unsigned long long)(
sizeof(
unsigned long long) *
10464vec_sr(vector
long long __a, vector
unsigned long long __b) {
10465 return (vector
long long)
vec_sr((vector
unsigned long long)
__a,
__b);
10467#elif defined(__VSX__)
10468static __inline__ vector
unsigned long long __ATTRS_o_ai
10469vec_sr(vector
unsigned long long __a, vector
unsigned long long __b) {
10470 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10476 vector
unsigned long long __swapshift =
10477 __builtin_shufflevector(
__b,
__b, 1, 0);
10478 vector
unsigned long long __leftelt =
10479 (vector
unsigned long long)__builtin_altivec_vsro(
10480 (vector
signed int)
__a, (vector
signed int)__swapshift);
10481#ifdef __LITTLE_ENDIAN__
10482 __leftelt = (vector
unsigned long long)__builtin_altivec_vsr(
10483 (vector
signed int)__leftelt,
10484 (vector
signed int)
vec_vspltb((vector
unsigned char)__swapshift, 0));
10486 __leftelt = (vector
unsigned long long)__builtin_altivec_vsr(
10487 (vector
signed int)__leftelt,
10488 (vector
signed int)
vec_vspltb((vector
unsigned char)__swapshift, 15));
10490 __a = __builtin_shufflevector(
__a,
__a, 1, 0);
10491 vector
unsigned long long __rightelt =
10492 (vector
unsigned long long)__builtin_altivec_vsro((vector
signed int)
__a,
10493 (vector
signed int)
__b);
10494#ifdef __LITTLE_ENDIAN__
10495 __rightelt = (vector
unsigned long long)__builtin_altivec_vsr(
10496 (vector
signed int)__rightelt,
10497 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 0));
10498 return __builtin_shufflevector(__rightelt, __leftelt, 1, 3);
10500 __rightelt = (vector
unsigned long long)__builtin_altivec_vsr(
10501 (vector
signed int)__rightelt,
10502 (vector
signed int)
vec_vspltb((vector
unsigned char)
__b, 15));
10503 return __builtin_shufflevector(__leftelt, __rightelt, 0, 2);
10508vec_sr(vector
long long __a, vector
unsigned long long __b) {
10509 return (vector
long long)
vec_sr((vector
unsigned long long)
__a,
__b);
10515#define __builtin_altivec_vsrb vec_vsrb
10529#define __builtin_altivec_vsrh vec_vsrh
10543#define __builtin_altivec_vsrw vec_vsrw
10546 vector
unsigned int __b) {
10559 return (vector
signed char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10564 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10568 vector
unsigned short __b) {
10569 return __builtin_altivec_vsrah(
__a, (vector
unsigned short)
__b);
10574 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)
__a,
__b);
10578 vector
unsigned int __b) {
10579 return __builtin_altivec_vsraw(
__a,
__b);
10584 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)
__a,
__b);
10587#ifdef __POWER8_VECTOR__
10589vec_sra(vector
signed long long __a, vector
unsigned long long __b) {
10593static __inline__ vector
unsigned long long __ATTRS_o_ai
10594vec_sra(vector
unsigned long long __a, vector
unsigned long long __b) {
10595 return (vector
unsigned long long)((vector
signed long long)
__a >>
__b);
10597#elif defined(__VSX__)
10599vec_sra(vector
signed long long __a, vector
unsigned long long __b) {
10600 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10604static __inline__ vector
unsigned long long __ATTRS_o_ai
10605vec_sra(vector
unsigned long long __a, vector
unsigned long long __b) {
10606 __b %= (vector
unsigned long long)(
sizeof(
unsigned long long) * __CHAR_BIT__);
10607 return (vector
unsigned long long)((vector
signed long long)
__a >>
__b);
10615 return (vector
signed char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10620 return (vector
unsigned char)__builtin_altivec_vsrab((vector
char)
__a,
__b);
10627 return __builtin_altivec_vsrah(
__a, (vector
unsigned short)
__b);
10632 return (vector
unsigned short)__builtin_altivec_vsrah((vector
short)
__a,
__b);
10638 vector
unsigned int __b) {
10639 return __builtin_altivec_vsraw(
__a,
__b);
10644 return (vector
unsigned int)__builtin_altivec_vsraw((vector
int)
__a,
__b);
10651 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10657 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10663 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10669 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10675 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10681 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10687 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10693 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10699 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10704 vector
unsigned char __b) {
10705 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10709 vector
unsigned short __b) {
10710 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10714 vector
unsigned int __b) {
10715 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10720 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10726 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10732 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10738 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10744 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10750 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10755 vector
unsigned char __b) {
10756 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10760 vector
unsigned short __b) {
10761 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10765 vector
unsigned int __b) {
10766 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10770 vector
unsigned char __b) {
10771 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10775 vector
unsigned short __b) {
10776 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10780 vector
unsigned int __b) {
10781 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10786 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10792 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10798 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10804 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10810 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10816 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10822vec_srl(vector
signed long long __a, vector
unsigned char __b) {
10823 return (vector
signed long long)__builtin_altivec_vsr((vector
int)
__a,
10827static __inline__ vector
unsigned long long __ATTRS_o_ai
10828vec_srl(vector
unsigned long long __a, vector
unsigned char __b) {
10829 return (vector
unsigned long long)__builtin_altivec_vsr((vector
int)
__a,
10838 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10844 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10850 return (vector
signed char)__builtin_altivec_vsr((vector
int)
__a,
10856 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10862 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10868 return (vector
unsigned char)__builtin_altivec_vsr((vector
int)
__a,
10874 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10880 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10886 return (vector
bool char)__builtin_altivec_vsr((vector
int)
__a,
10891 vector
unsigned char __b) {
10892 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10896 vector
unsigned short __b) {
10897 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10901 vector
unsigned int __b) {
10902 return (vector
short)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10907 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10913 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10919 return (vector
unsigned short)__builtin_altivec_vsr((vector
int)
__a,
10925 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10931 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10937 return (vector
bool short)__builtin_altivec_vsr((vector
int)
__a,
10942 vector
unsigned char __b) {
10943 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10947 vector
unsigned short __b) {
10948 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10952 vector
unsigned int __b) {
10953 return (vector pixel)__builtin_altivec_vsr((vector
int)
__a, (vector
int)
__b);
10957 vector
unsigned char __b) {
10958 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10962 vector
unsigned short __b) {
10963 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10967 vector
unsigned int __b) {
10968 return (vector
int)__builtin_altivec_vsr(
__a, (vector
int)
__b);
10973 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10979 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10985 return (vector
unsigned int)__builtin_altivec_vsr((vector
int)
__a,
10991 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
10997 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
11003 return (vector
bool int)__builtin_altivec_vsr((vector
int)
__a,
11011 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
11017 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
11023 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11029 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11034 vector
signed char __b) {
11035 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11039 vector
unsigned char __b) {
11040 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11045 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11051 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11056 vector
signed char __b) {
11057 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11061 vector
unsigned char __b) {
11062 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11066 vector
signed char __b) {
11067 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11071 vector
unsigned char __b) {
11072 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11077 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11083 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11088 vector
signed char __b) {
11089 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11093 vector
unsigned char __b) {
11094 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11099vec_sro(vector
signed long long __a, vector
signed char __b) {
11100 return (vector
signed long long)__builtin_altivec_vsro((vector
int)
__a,
11105vec_sro(vector
signed long long __a, vector
unsigned char __b) {
11106 return (vector
signed long long)__builtin_altivec_vsro((vector
int)
__a,
11110static __inline__ vector
unsigned long long __ATTRS_o_ai
11111vec_sro(vector
unsigned long long __a, vector
signed char __b) {
11112 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)
__a,
11116static __inline__ vector
unsigned long long __ATTRS_o_ai
11117vec_sro(vector
unsigned long long __a, vector
unsigned char __b) {
11118 return (vector
unsigned long long)__builtin_altivec_vsro((vector
int)
__a,
11127 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
11133 return (vector
signed char)__builtin_altivec_vsro((vector
int)
__a,
11139 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11145 return (vector
unsigned char)__builtin_altivec_vsro((vector
int)
__a,
11150 vector
signed char __b) {
11151 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11155 vector
unsigned char __b) {
11156 return (vector
short)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11161 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11167 return (vector
unsigned short)__builtin_altivec_vsro((vector
int)
__a,
11172 vector
signed char __b) {
11173 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11177 vector
unsigned char __b) {
11178 return (vector pixel)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11182 vector
signed char __b) {
11183 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11187 vector
unsigned char __b) {
11188 return (vector
int)__builtin_altivec_vsro(
__a, (vector
int)
__b);
11193 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11199 return (vector
unsigned int)__builtin_altivec_vsro((vector
int)
__a,
11204 vector
signed char __b) {
11205 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11209 vector
unsigned char __b) {
11210 return (vector
float)__builtin_altivec_vsro((vector
int)
__a, (vector
int)
__b);
11216 vector
signed char *
__c) {
11217 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11221 signed char *
__c) {
11222 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11226 vector
unsigned char *
__c) {
11227 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11231 unsigned char *
__c) {
11232 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11236 signed char *
__c) {
11237 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11241 unsigned char *
__c) {
11242 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11246 vector
bool char *
__c) {
11247 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11251 vector
short *
__c) {
11252 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11257 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11261 vector
unsigned short *
__c) {
11262 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11266 unsigned short *
__c) {
11267 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11272 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11276 unsigned short *
__c) {
11277 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11281 vector
bool short *
__c) {
11282 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11287 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11291 unsigned short *
__c) {
11292 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11296 vector pixel *
__c) {
11297 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11310 vector
unsigned int *
__c) {
11311 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11315 unsigned int *
__c) {
11316 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11321 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11325 unsigned int *
__c) {
11326 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11330 vector
bool int *
__c) {
11331 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11335 vector
float *
__c) {
11336 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11341 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11347 vector
signed char *
__c) {
11348 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11352 signed char *
__c) {
11353 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11357 vector
unsigned char *
__c) {
11358 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11362 unsigned char *
__c) {
11363 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11367 signed char *
__c) {
11368 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11372 unsigned char *
__c) {
11373 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11377 vector
bool char *
__c) {
11378 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11382 vector
short *
__c) {
11383 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11388 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11392 vector
unsigned short *
__c) {
11393 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11397 unsigned short *
__c) {
11398 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11403 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11407 unsigned short *
__c) {
11408 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11412 vector
bool short *
__c) {
11413 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11418 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11422 unsigned short *
__c) {
11423 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11427 vector pixel *
__c) {
11428 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11442 vector
unsigned int *
__c) {
11443 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11447 unsigned int *
__c) {
11448 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11453 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11457 unsigned int *
__c) {
11458 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11462 vector
bool int *
__c) {
11463 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11467 vector
float *
__c) {
11468 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11473 __builtin_altivec_stvx((vector
int)
__a,
__b,
__c);
11479 signed char *
__c) {
11480 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11484 unsigned char *
__c) {
11485 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11489 signed char *
__c) {
11490 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11494 unsigned char *
__c) {
11495 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11500 __builtin_altivec_stvehx(
__a,
__b,
__c);
11504 unsigned short *
__c) {
11505 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11510 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11514 unsigned short *
__c) {
11515 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11520 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11524 unsigned short *
__c) {
11525 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11529 __builtin_altivec_stvewx(
__a,
__b,
__c);
11533 unsigned int *
__c) {
11534 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11539 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11543 unsigned int *
__c) {
11544 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11549 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11555 signed char *
__c) {
11556 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11560 long __b,
unsigned char *
__c) {
11561 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11565 signed char *
__c) {
11566 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11570 unsigned char *
__c) {
11571 __builtin_altivec_stvebx((vector
char)
__a,
__b,
__c);
11578 __builtin_altivec_stvehx(
__a,
__b,
__c);
11582 long __b,
unsigned short *
__c) {
11583 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11588 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11592 unsigned short *
__c) {
11593 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11598 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11602 unsigned short *
__c) {
11603 __builtin_altivec_stvehx((vector
short)
__a,
__b,
__c);
11610 __builtin_altivec_stvewx(
__a,
__b,
__c);
11614 unsigned int *
__c) {
11615 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11620 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11624 unsigned int *
__c) {
11625 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11630 __builtin_altivec_stvewx((vector
int)
__a,
__b,
__c);
11636 vector
signed char *
__c) {
11637 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11641 signed char *
__c) {
11642 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11646 vector
unsigned char *
__c) {
11647 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11651 unsigned char *
__c) {
11652 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11656 signed char *
__c) {
11657 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11661 unsigned char *
__c) {
11662 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11666 vector
bool char *
__c) {
11667 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11671 vector
short *
__c) {
11672 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11677 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11681 vector
unsigned short *
__c) {
11682 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11686 unsigned short *
__c) {
11687 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11692 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11696 unsigned short *
__c) {
11697 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11701 vector
bool short *
__c) {
11702 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11707 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11711 unsigned short *
__c) {
11712 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11716 vector pixel *
__c) {
11717 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11722 __builtin_altivec_stvxl(
__a,
__b,
__c);
11726 __builtin_altivec_stvxl(
__a,
__b,
__c);
11730 vector
unsigned int *
__c) {
11731 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11735 unsigned int *
__c) {
11736 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11741 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11745 unsigned int *
__c) {
11746 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11750 vector
bool int *
__c) {
11751 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11755 vector
float *
__c) {
11756 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11761 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11767 vector
signed char *
__c) {
11768 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11772 signed char *
__c) {
11773 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11777 vector
unsigned char *
__c) {
11778 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11782 unsigned char *
__c) {
11783 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11787 signed char *
__c) {
11788 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11792 unsigned char *
__c) {
11793 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11797 vector
bool char *
__c) {
11798 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11802 vector
short *
__c) {
11803 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11808 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11813 vector
unsigned short *
__c) {
11814 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11818 int __b,
unsigned short *
__c) {
11819 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11824 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11828 unsigned short *
__c) {
11829 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11833 vector
bool short *
__c) {
11834 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11839 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11843 unsigned short *
__c) {
11844 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11848 vector pixel *
__c) {
11849 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11854 __builtin_altivec_stvxl(
__a,
__b,
__c);
11859 __builtin_altivec_stvxl(
__a,
__b,
__c);
11863 vector
unsigned int *
__c) {
11864 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11868 unsigned int *
__c) {
11869 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11874 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11878 unsigned int *
__c) {
11879 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11883 vector
bool int *
__c) {
11884 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11888 vector
float *
__c) {
11889 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11894 __builtin_altivec_stvxl((vector
int)
__a,
__b,
__c);
11906 return (vector
signed char)
__a -
__b;
11911 return __a - (vector
signed char)
__b;
11921 return (vector
unsigned char)
__a -
__b;
11926 return __a - (vector
unsigned char)
__b;
11930 vector
short __b) {
11935 vector
short __b) {
11936 return (vector
short)
__a -
__b;
11940 vector
bool short __b) {
11941 return __a - (vector short)
__b;
11951 return (vector
unsigned short)
__a -
__b;
11956 return __a - (vector
unsigned short)
__b;
11966 return (vector
int)
__a -
__b;
11970 vector
bool int __b) {
11981 return (vector
unsigned int)
__a -
__b;
11989#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
11990 defined(__SIZEOF_INT128__)
11992vec_sub(vector
signed __int128
__a, vector
signed __int128
__b) {
11996static __inline__ vector
unsigned __int128
__ATTRS_o_ai
11997vec_sub(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12005vec_sub(vector
signed long long __a, vector
signed long long __b) {
12009static __inline__ vector
unsigned long long __ATTRS_o_ai
12010vec_sub(vector
unsigned long long __a, vector
unsigned long long __b) {
12015 vector
double __b) {
12021 vector
float __b) {
12027#define __builtin_altivec_vsububm vec_vsububm
12036 return (vector
signed char)
__a -
__b;
12041 return __a - (vector
signed char)
__b;
12051 return (vector
unsigned char)
__a -
__b;
12056 return __a - (vector
unsigned char)
__b;
12061#define __builtin_altivec_vsubuhm vec_vsubuhm
12064 vector
short __b) {
12069 vector
short __b) {
12070 return (vector
short)
__a -
__b;
12074 vector
bool short __b) {
12075 return __a - (vector short)
__b;
12085 return (vector
unsigned short)
__a -
__b;
12090 return __a - (vector
unsigned short)
__b;
12095#define __builtin_altivec_vsubuwm vec_vsubuwm
12104 return (vector
int)
__a -
__b;
12108 vector
bool int __b) {
12119 return (vector
unsigned int)
__a -
__b;
12129#define __builtin_altivec_vsubfp vec_vsubfp
12131static __inline__ vector
float __attribute__((__always_inline__))
12132vec_vsubfp(vector
float __a, vector
float __b) {
12140 return (vector
signed int)__builtin_altivec_vsubcuw((vector
unsigned int)
__a,
12141 (vector
unsigned int)
__b);
12146 return __builtin_altivec_vsubcuw(
__a,
__b);
12149#ifdef __POWER8_VECTOR__
12150#ifdef __SIZEOF_INT128__
12151static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12152vec_subc(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12153 return __builtin_altivec_vsubcuq(
__a,
__b);
12157vec_subc(vector
signed __int128
__a, vector
signed __int128
__b) {
12158 return (vector
signed __int128)__builtin_altivec_vsubcuq(
12159 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
12163static __inline__ vector
unsigned char __attribute__((__always_inline__))
12164vec_subc_u128(vector
unsigned char __a, vector
unsigned char __b) {
12165 return (vector
unsigned char)__builtin_altivec_vsubcuq_c(
12166 (vector
unsigned char)
__a, (vector
unsigned char)
__b);
12172static __inline__ vector
unsigned int __attribute__((__always_inline__))
12173vec_vsubcuw(vector
unsigned int __a, vector
unsigned int __b) {
12174 return __builtin_altivec_vsubcuw(
__a,
__b);
12181 return __builtin_altivec_vsubsbs(
__a,
__b);
12186 return __builtin_altivec_vsubsbs((vector
signed char)
__a,
__b);
12191 return __builtin_altivec_vsubsbs(
__a, (vector
signed char)
__b);
12196 return __builtin_altivec_vsububs(
__a,
__b);
12201 return __builtin_altivec_vsububs((vector
unsigned char)
__a,
__b);
12206 return __builtin_altivec_vsububs(
__a, (vector
unsigned char)
__b);
12210 vector
short __b) {
12211 return __builtin_altivec_vsubshs(
__a,
__b);
12215 vector
short __b) {
12216 return __builtin_altivec_vsubshs((vector
short)
__a,
__b);
12220 vector
bool short __b) {
12221 return __builtin_altivec_vsubshs(
__a, (vector
short)
__b);
12226 return __builtin_altivec_vsubuhs(
__a,
__b);
12231 return __builtin_altivec_vsubuhs((vector
unsigned short)
__a,
__b);
12236 return __builtin_altivec_vsubuhs(
__a, (vector
unsigned short)
__b);
12241 return __builtin_altivec_vsubsws(
__a,
__b);
12246 return __builtin_altivec_vsubsws((vector
int)
__a,
__b);
12250 vector
bool int __b) {
12251 return __builtin_altivec_vsubsws(
__a, (vector
int)
__b);
12256 return __builtin_altivec_vsubuws(
__a,
__b);
12261 return __builtin_altivec_vsubuws((vector
unsigned int)
__a,
__b);
12266 return __builtin_altivec_vsubuws(
__a, (vector
unsigned int)
__b);
12273 return __builtin_altivec_vsubsbs(
__a,
__b);
12278 return __builtin_altivec_vsubsbs((vector
signed char)
__a,
__b);
12283 return __builtin_altivec_vsubsbs(
__a, (vector
signed char)
__b);
12290 return __builtin_altivec_vsububs(
__a,
__b);
12295 return __builtin_altivec_vsububs((vector
unsigned char)
__a,
__b);
12300 return __builtin_altivec_vsububs(
__a, (vector
unsigned char)
__b);
12306 vector
short __b) {
12307 return __builtin_altivec_vsubshs(
__a,
__b);
12311 vector
short __b) {
12312 return __builtin_altivec_vsubshs((vector
short)
__a,
__b);
12316 vector
bool short __b) {
12317 return __builtin_altivec_vsubshs(
__a, (vector
short)
__b);
12324 return __builtin_altivec_vsubuhs(
__a,
__b);
12329 return __builtin_altivec_vsubuhs((vector
unsigned short)
__a,
__b);
12334 return __builtin_altivec_vsubuhs(
__a, (vector
unsigned short)
__b);
12341 return __builtin_altivec_vsubsws(
__a,
__b);
12346 return __builtin_altivec_vsubsws((vector
int)
__a,
__b);
12350 vector
bool int __b) {
12351 return __builtin_altivec_vsubsws(
__a, (vector
int)
__b);
12358 return __builtin_altivec_vsubuws(
__a,
__b);
12363 return __builtin_altivec_vsubuws((vector
unsigned int)
__a,
__b);
12368 return __builtin_altivec_vsubuws(
__a, (vector
unsigned int)
__b);
12371#ifdef __POWER8_VECTOR__
12374#ifdef __SIZEOF_INT128__
12376vec_vsubuqm(vector
signed __int128
__a, vector
signed __int128
__b) {
12380static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12381vec_vsubuqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12386static __inline__ vector
unsigned char __attribute__((__always_inline__))
12387vec_sub_u128(vector
unsigned char __a, vector
unsigned char __b) {
12388 return (vector
unsigned char)__builtin_altivec_vsubuqm(
__a,
__b);
12393#ifdef __SIZEOF_INT128__
12395vec_vsubeuqm(vector
signed __int128
__a, vector
signed __int128
__b,
12396 vector
signed __int128
__c) {
12397 return (vector
signed __int128)__builtin_altivec_vsubeuqm(
12398 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12399 (vector
unsigned __int128)
__c);
12402static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12403vec_vsubeuqm(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12404 vector
unsigned __int128
__c) {
12405 return __builtin_altivec_vsubeuqm(
__a,
__b,
__c);
12410 vector
signed __int128
__c) {
12411 return (vector
signed __int128)__builtin_altivec_vsubeuqm(
12412 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12413 (vector
unsigned __int128)
__c);
12416static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12417vec_sube(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12418 vector
unsigned __int128
__c) {
12419 return __builtin_altivec_vsubeuqm(
__a,
__b,
__c);
12423static __inline__ vector
unsigned char __attribute__((__always_inline__))
12424vec_sube_u128(vector
unsigned char __a, vector
unsigned char __b,
12425 vector
unsigned char __c) {
12426 return (vector
unsigned char)__builtin_altivec_vsubeuqm_c(
12427 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
12428 (vector
unsigned char)
__c);
12433#ifdef __SIZEOF_INT128__
12435vec_vsubcuq(vector
signed __int128
__a, vector
signed __int128
__b) {
12436 return (vector
signed __int128)__builtin_altivec_vsubcuq(
12437 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b);
12440static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12441vec_vsubcuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
12442 return __builtin_altivec_vsubcuq(
__a,
__b);
12448vec_vsubecuq(vector
signed __int128
__a, vector
signed __int128
__b,
12449 vector
signed __int128
__c) {
12450 return (vector
signed __int128)__builtin_altivec_vsubecuq(
12451 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12452 (vector
unsigned __int128)
__c);
12455static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12456vec_vsubecuq(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12457 vector
unsigned __int128
__c) {
12458 return __builtin_altivec_vsubecuq(
__a,
__b,
__c);
12462#ifdef __powerpc64__
12464vec_subec(vector
signed int __a, vector
signed int __b,
12465 vector
signed int __c) {
12470vec_subec(vector
unsigned int __a, vector
unsigned int __b,
12471 vector
unsigned int __c) {
12476#ifdef __SIZEOF_INT128__
12478vec_subec(vector
signed __int128
__a, vector
signed __int128
__b,
12479 vector
signed __int128
__c) {
12480 return (vector
signed __int128)__builtin_altivec_vsubecuq(
12481 (vector
unsigned __int128)
__a, (vector
unsigned __int128)
__b,
12482 (vector
unsigned __int128)
__c);
12485static __inline__ vector
unsigned __int128
__ATTRS_o_ai
12486vec_subec(vector
unsigned __int128
__a, vector
unsigned __int128
__b,
12487 vector
unsigned __int128
__c) {
12488 return __builtin_altivec_vsubecuq(
__a,
__b,
__c);
12492static __inline__ vector
unsigned char __attribute__((__always_inline__))
12493vec_subec_u128(vector
unsigned char __a, vector
unsigned char __b,
12494 vector
unsigned char __c) {
12495 return (vector
unsigned char)__builtin_altivec_vsubecuq_c(
12496 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
12497 (vector
unsigned char)
__c);
12503 vector
signed int __c) {
12504 vector
signed int __mask = {1, 1, 1, 1};
12505 vector
signed int __carry =
__c & __mask;
12511 vector
unsigned int __c) {
12512 vector
unsigned int __mask = {1, 1, 1, 1};
12513 vector
unsigned int __carry =
__c & __mask;
12520 return __builtin_altivec_vsum4sbs(
__a,
__b);
12525 return __builtin_altivec_vsum4ubs(
__a,
__b);
12530 return __builtin_altivec_vsum4shs(
__a,
__b);
12535static __inline__ vector
int __attribute__((__always_inline__))
12536vec_vsum4sbs(vector
signed char __a, vector
int __b) {
12537 return __builtin_altivec_vsum4sbs(
__a,
__b);
12542static __inline__ vector
unsigned int __attribute__((__always_inline__))
12543vec_vsum4ubs(vector
unsigned char __a, vector
unsigned int __b) {
12544 return __builtin_altivec_vsum4ubs(
__a,
__b);
12549static __inline__ vector
int __attribute__((__always_inline__))
12550vec_vsum4shs(vector
signed short __a, vector
int __b) {
12551 return __builtin_altivec_vsum4shs(
__a,
__b);
12562static __inline__ vector
signed int __attribute__((__always_inline__))
12563vec_sum2s(vector
int __a, vector
int __b) {
12564#ifdef __LITTLE_ENDIAN__
12566 __b,
__b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12568 __c = __builtin_altivec_vsum2sws(
__a,
__c);
12569 return (vector
signed int)
vec_perm(
12570 __c,
__c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12573 return __builtin_altivec_vsum2sws(
__a,
__b);
12579static __inline__ vector
signed int __attribute__((__always_inline__))
12580vec_vsum2sws(vector
int __a, vector
int __b) {
12581#ifdef __LITTLE_ENDIAN__
12583 __b,
__b, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12585 __c = __builtin_altivec_vsum2sws(
__a,
__c);
12586 return (vector
signed int)
vec_perm(
12587 __c,
__c, (vector
unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
12590 return __builtin_altivec_vsum2sws(
__a,
__b);
12602static __inline__ vector
signed int __attribute__((__always_inline__))
12603vec_sums(vector
signed int __a, vector
signed int __b) {
12604#ifdef __LITTLE_ENDIAN__
12606 __b = __builtin_altivec_vsumsws(
__a,
__b);
12607 return (vector
signed int)(0, 0, 0,
__b[0]);
12609 return __builtin_altivec_vsumsws(
__a,
__b);
12615static __inline__ vector
signed int __attribute__((__always_inline__))
12616vec_vsumsws(vector
signed int __a, vector
signed int __b) {
12617#ifdef __LITTLE_ENDIAN__
12619 __b = __builtin_altivec_vsumsws(
__a,
__b);
12620 return (vector
signed int)(0, 0, 0,
__b[0]);
12622 return __builtin_altivec_vsumsws(
__a,
__b);
12630 return __builtin_vsx_xvrspiz(
__a);
12632 return __builtin_altivec_vrfiz(
__a);
12638 return __builtin_vsx_xvrdpiz(
__a);
12655static __inline__ vector
float __attribute__((__always_inline__))
12656vec_vrfiz(vector
float __a) {
12657 return __builtin_altivec_vrfiz(
__a);
12664#ifdef __LITTLE_ENDIAN__
12665#define vec_vupkhpx(__a) __builtin_altivec_vupklpx((vector short)(__a))
12666#define vec_vupklpx(__a) __builtin_altivec_vupkhpx((vector short)(__a))
12668#define vec_vupkhpx(__a) __builtin_altivec_vupkhpx((vector short)(__a))
12669#define vec_vupklpx(__a) __builtin_altivec_vupklpx((vector short)(__a))
12674#ifdef __LITTLE_ENDIAN__
12675 return __builtin_altivec_vupklsb((vector
char)
__a);
12677 return __builtin_altivec_vupkhsb((vector
char)
__a);
12683#ifdef __LITTLE_ENDIAN__
12684 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12686 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12691#ifdef __LITTLE_ENDIAN__
12692 return __builtin_altivec_vupklsh(
__a);
12694 return __builtin_altivec_vupkhsh(
__a);
12700#ifdef __LITTLE_ENDIAN__
12701 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12703 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12709#ifdef __LITTLE_ENDIAN__
12710 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12712 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12716#ifdef __POWER8_VECTOR__
12718#ifdef __LITTLE_ENDIAN__
12719 return __builtin_altivec_vupklsw(
__a);
12721 return __builtin_altivec_vupkhsw(
__a);
12727#ifdef __LITTLE_ENDIAN__
12728 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12730 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12736 return (vector
double)(
__a[0],
__a[1]);
12744#ifdef __LITTLE_ENDIAN__
12745 return __builtin_altivec_vupklsb((vector
char)
__a);
12747 return __builtin_altivec_vupkhsb((vector
char)
__a);
12753#ifdef __LITTLE_ENDIAN__
12754 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12756 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12763#ifdef __LITTLE_ENDIAN__
12764 return __builtin_altivec_vupklsh(
__a);
12766 return __builtin_altivec_vupkhsh(
__a);
12772#ifdef __LITTLE_ENDIAN__
12773 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12775 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12781#ifdef __LITTLE_ENDIAN__
12782 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12784 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12790#ifdef __POWER8_VECTOR__
12791static __inline__ vector
long long __ATTRS_o_ai vec_vupkhsw(vector
int __a) {
12792#ifdef __LITTLE_ENDIAN__
12793 return __builtin_altivec_vupklsw(
__a);
12795 return __builtin_altivec_vupkhsw(
__a);
12800vec_vupkhsw(vector
bool int __a) {
12801#ifdef __LITTLE_ENDIAN__
12802 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12804 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12813#ifdef __LITTLE_ENDIAN__
12814 return __builtin_altivec_vupkhsb((vector
char)
__a);
12816 return __builtin_altivec_vupklsb((vector
char)
__a);
12822#ifdef __LITTLE_ENDIAN__
12823 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12825 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12830#ifdef __LITTLE_ENDIAN__
12831 return __builtin_altivec_vupkhsh(
__a);
12833 return __builtin_altivec_vupklsh(
__a);
12839#ifdef __LITTLE_ENDIAN__
12840 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12842 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12848#ifdef __LITTLE_ENDIAN__
12849 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12851 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12855#ifdef __POWER8_VECTOR__
12857#ifdef __LITTLE_ENDIAN__
12858 return __builtin_altivec_vupkhsw(
__a);
12860 return __builtin_altivec_vupklsw(
__a);
12866#ifdef __LITTLE_ENDIAN__
12867 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12869 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12875 return (vector
double)(
__a[2],
__a[3]);
12883#ifdef __LITTLE_ENDIAN__
12884 return __builtin_altivec_vupkhsb((vector
char)
__a);
12886 return __builtin_altivec_vupklsb((vector
char)
__a);
12892#ifdef __LITTLE_ENDIAN__
12893 return (vector
bool short)__builtin_altivec_vupkhsb((vector
char)
__a);
12895 return (vector
bool short)__builtin_altivec_vupklsb((vector
char)
__a);
12902#ifdef __LITTLE_ENDIAN__
12903 return __builtin_altivec_vupkhsh(
__a);
12905 return __builtin_altivec_vupklsh(
__a);
12911#ifdef __LITTLE_ENDIAN__
12912 return (vector
bool int)__builtin_altivec_vupkhsh((vector
short)
__a);
12914 return (vector
bool int)__builtin_altivec_vupklsh((vector
short)
__a);
12920#ifdef __LITTLE_ENDIAN__
12921 return (vector
unsigned int)__builtin_altivec_vupkhpx((vector
short)
__a);
12923 return (vector
unsigned int)__builtin_altivec_vupklpx((vector
short)
__a);
12929#ifdef __POWER8_VECTOR__
12930static __inline__ vector
long long __ATTRS_o_ai vec_vupklsw(vector
int __a) {
12931#ifdef __LITTLE_ENDIAN__
12932 return __builtin_altivec_vupkhsw(
__a);
12934 return __builtin_altivec_vupklsw(
__a);
12939vec_vupklsw(vector
bool int __a) {
12940#ifdef __LITTLE_ENDIAN__
12941 return (vector
bool long long)__builtin_altivec_vupkhsw((vector
int)
__a);
12943 return (vector
bool long long)__builtin_altivec_vupklsw((vector
int)
__a);
12953vec_vsx_ld(
int __a,
const vector
bool int *
__b) {
12954 return (vector
bool int)__builtin_vsx_lxvw4x(
__a,
__b);
12958vec_vsx_ld(
int __a,
const vector
signed int *
__b) {
12959 return (vector
signed int)__builtin_vsx_lxvw4x(
__a,
__b);
12963vec_vsx_ld(
int __a,
const signed int *
__b) {
12964 return (vector
signed int)__builtin_vsx_lxvw4x(
__a,
__b);
12968vec_vsx_ld(
int __a,
const vector
unsigned int *
__b) {
12969 return (vector
unsigned int)__builtin_vsx_lxvw4x(
__a,
__b);
12973vec_vsx_ld(
int __a,
const unsigned int *
__b) {
12974 return (vector
unsigned int)__builtin_vsx_lxvw4x(
__a,
__b);
12978vec_vsx_ld(
int __a,
const vector
float *
__b) {
12979 return (vector
float)__builtin_vsx_lxvw4x(
__a,
__b);
12983 const float *
__b) {
12984 return (vector
float)__builtin_vsx_lxvw4x(
__a,
__b);
12988vec_vsx_ld(
int __a,
const vector
signed long long *
__b) {
12989 return (vector
signed long long)__builtin_vsx_lxvd2x(
__a,
__b);
12992static __inline__ vector
unsigned long long __ATTRS_o_ai
12993vec_vsx_ld(
int __a,
const vector
unsigned long long *
__b) {
12994 return (vector
unsigned long long)__builtin_vsx_lxvd2x(
__a,
__b);
12998vec_vsx_ld(
int __a,
const vector
double *
__b) {
12999 return (vector
double)__builtin_vsx_lxvd2x(
__a,
__b);
13003vec_vsx_ld(
int __a,
const double *
__b) {
13004 return (vector
double)__builtin_vsx_lxvd2x(
__a,
__b);
13008vec_vsx_ld(
int __a,
const vector
bool short *
__b) {
13009 return (vector
bool short)__builtin_vsx_lxvw4x(
__a,
__b);
13013vec_vsx_ld(
int __a,
const vector
signed short *
__b) {
13014 return (vector
signed short)__builtin_vsx_lxvw4x(
__a,
__b);
13018vec_vsx_ld(
int __a,
const signed short *
__b) {
13019 return (vector
signed short)__builtin_vsx_lxvw4x(
__a,
__b);
13023vec_vsx_ld(
int __a,
const vector
unsigned short *
__b) {
13024 return (vector
unsigned short)__builtin_vsx_lxvw4x(
__a,
__b);
13028vec_vsx_ld(
int __a,
const unsigned short *
__b) {
13029 return (vector
unsigned short)__builtin_vsx_lxvw4x(
__a,
__b);
13033vec_vsx_ld(
int __a,
const vector
bool char *
__b) {
13034 return (vector
bool char)__builtin_vsx_lxvw4x(
__a,
__b);
13038vec_vsx_ld(
int __a,
const vector
signed char *
__b) {
13039 return (vector
signed char)__builtin_vsx_lxvw4x(
__a,
__b);
13043vec_vsx_ld(
int __a,
const signed char *
__b) {
13044 return (vector
signed char)__builtin_vsx_lxvw4x(
__a,
__b);
13048vec_vsx_ld(
int __a,
const vector
unsigned char *
__b) {
13049 return (vector
unsigned char)__builtin_vsx_lxvw4x(
__a,
__b);
13053vec_vsx_ld(
int __a,
const unsigned char *
__b) {
13054 return (vector
unsigned char)__builtin_vsx_lxvw4x(
__a,
__b);
13064 vector
bool int *
__c) {
13065 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13070 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13074 unsigned int *
__c) {
13075 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13079 vector
signed int *
__c) {
13080 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13085 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13089 vector
unsigned int *
__c) {
13090 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13094 unsigned int *
__c) {
13095 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13099 vector
float *
__c) {
13100 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13105 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13108static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
signed long long __a,
13110 vector
signed long long *
__c) {
13111 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13114static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned long long __a,
13116 vector
unsigned long long *
__c) {
13117 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13121 vector
double *
__c) {
13122 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13127 __builtin_vsx_stxvd2x((vector
double)
__a,
__b,
__c);
13131 vector
bool short *
__c) {
13132 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13136 signed short *
__c) {
13137 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13141 unsigned short *
__c) {
13142 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13145 vector
signed short *
__c) {
13146 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13150 signed short *
__c) {
13151 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13154static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
13156 vector
unsigned short *
__c) {
13157 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13160static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned short __a,
13161 int __b,
unsigned short *
__c) {
13162 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13166 vector
bool char *
__c) {
13167 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13171 signed char *
__c) {
13172 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13176 unsigned char *
__c) {
13177 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13181 vector
signed char *
__c) {
13182 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13186 signed char *
__c) {
13187 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13190static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
13192 vector
unsigned char *
__c) {
13193 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13196static __inline__
void __ATTRS_o_ai vec_vsx_st(vector
unsigned char __a,
13197 int __b,
unsigned char *
__c) {
13198 __builtin_vsx_stxvw4x((vector
int)
__a,
__b,
__c);
13204#define vec_xxpermdi __builtin_vsx_xxpermdi
13205#define vec_xxsldwi __builtin_vsx_xxsldwi
13206#define vec_permi(__a, __b, __c) \
13207 _Generic((__a), vector signed long long \
13208 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13209 (((__c)&0x1) + 2)), \
13210 vector unsigned long long \
13211 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13212 (((__c)&0x1) + 2)), \
13214 : __builtin_shufflevector((__a), (__b), (((__c) >> 1) & 0x1), \
13215 (((__c)&0x1) + 2)))
13220#define __builtin_altivec_vxor vec_xor
13229 return (vector
signed char)
__a ^
__b;
13234 return __a ^ (vector
signed char)
__b;
13244 return (vector
unsigned char)
__a ^
__b;
13249 return __a ^ (vector
unsigned char)
__b;
13253 vector
bool char __b) {
13258 vector
short __b) {
13263 vector
short __b) {
13264 return (vector
short)
__a ^
__b;
13268 vector
bool short __b) {
13269 return __a ^ (vector short)
__b;
13279 return (vector
unsigned short)
__a ^
__b;
13284 return __a ^ (vector
unsigned short)
__b;
13299 return (vector
int)
__a ^
__b;
13303 vector
bool int __b) {
13314 return (vector
unsigned int)
__a ^
__b;
13323 vector
bool int __b) {
13328 vector
float __b) {
13329 vector
unsigned int __res =
13330 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13331 return (vector
float)__res;
13335 vector
float __b) {
13336 vector
unsigned int __res =
13337 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13338 return (vector
float)__res;
13342 vector
bool int __b) {
13343 vector
unsigned int __res =
13344 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13345 return (vector
float)__res;
13350vec_xor(vector
signed long long __a, vector
signed long long __b) {
13355vec_xor(vector
bool long long __a, vector
signed long long __b) {
13356 return (vector
signed long long)
__a ^
__b;
13360vec_xor(vector
signed long long __a, vector
bool long long __b) {
13361 return __a ^ (vector
signed long long)
__b;
13364static __inline__ vector
unsigned long long __ATTRS_o_ai
13365vec_xor(vector
unsigned long long __a, vector
unsigned long long __b) {
13369static __inline__ vector
unsigned long long __ATTRS_o_ai
13370vec_xor(vector
bool long long __a, vector
unsigned long long __b) {
13371 return (vector
unsigned long long)
__a ^
__b;
13374static __inline__ vector
unsigned long long __ATTRS_o_ai
13375vec_xor(vector
unsigned long long __a, vector
bool long long __b) {
13376 return __a ^ (vector
unsigned long long)
__b;
13380vec_xor(vector
bool long long __a, vector
bool long long __b) {
13385 vector
double __b) {
13386 return (vector
double)((vector
unsigned long long)
__a ^
13387 (vector
unsigned long long)
__b);
13392 return (vector
double)((vector
unsigned long long)
__a ^
13393 (vector
unsigned long long)
__b);
13397 vector
double __b) {
13398 return (vector
double)((vector
unsigned long long)
__a ^
13399 (vector
unsigned long long)
__b);
13412 return (vector
signed char)
__a ^
__b;
13417 return __a ^ (vector
signed char)
__b;
13427 return (vector
unsigned char)
__a ^
__b;
13432 return __a ^ (vector
unsigned char)
__b;
13436 vector
bool char __b) {
13441 vector
short __b) {
13446 vector
short __b) {
13447 return (vector
short)
__a ^
__b;
13451 vector
bool short __b) {
13452 return __a ^ (vector short)
__b;
13462 return (vector
unsigned short)
__a ^
__b;
13467 return __a ^ (vector
unsigned short)
__b;
13482 return (vector
int)
__a ^
__b;
13486 vector
bool int __b) {
13497 return (vector
unsigned int)
__a ^
__b;
13506 vector
bool int __b) {
13511 vector
float __b) {
13512 vector
unsigned int __res =
13513 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13514 return (vector
float)__res;
13518 vector
float __b) {
13519 vector
unsigned int __res =
13520 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13521 return (vector
float)__res;
13525 vector
bool int __b) {
13526 vector
unsigned int __res =
13527 (vector
unsigned int)
__a ^ (vector
unsigned int)
__b;
13528 return (vector
float)__res;
13533vec_vxor(vector
signed long long __a, vector
signed long long __b) {
13538vec_vxor(vector
bool long long __a, vector
signed long long __b) {
13539 return (vector
signed long long)
__a ^
__b;
13543vec_vxor(vector
signed long long __a, vector
bool long long __b) {
13544 return __a ^ (vector
signed long long)
__b;
13547static __inline__ vector
unsigned long long __ATTRS_o_ai
13548vec_vxor(vector
unsigned long long __a, vector
unsigned long long __b) {
13552static __inline__ vector
unsigned long long __ATTRS_o_ai
13553vec_vxor(vector
bool long long __a, vector
unsigned long long __b) {
13554 return (vector
unsigned long long)
__a ^
__b;
13557static __inline__ vector
unsigned long long __ATTRS_o_ai
13558vec_vxor(vector
unsigned long long __a, vector
bool long long __b) {
13559 return __a ^ (vector
unsigned long long)
__b;
13644#ifdef __POWER9_VECTOR__
13646#define vec_insert4b __builtin_vsx_insertword
13647#define vec_extract4b __builtin_vsx_extractuword
13652vec_extract_exp(vector
float __a) {
13653 return __builtin_vsx_xvxexpsp(
__a);
13656static __inline__ vector
unsigned long long __ATTRS_o_ai
13657vec_extract_exp(vector
double __a) {
13658 return __builtin_vsx_xvxexpdp(
__a);
13664vec_extract_sig(vector
float __a) {
13665 return __builtin_vsx_xvxsigsp(
__a);
13668static __inline__ vector
unsigned long long __ATTRS_o_ai
13669vec_extract_sig (vector
double __a) {
13670 return __builtin_vsx_xvxsigdp(
__a);
13674vec_extract_fp32_from_shorth(vector
unsigned short __a) {
13675 vector
unsigned short __b =
13676#ifdef __LITTLE_ENDIAN__
13677 __builtin_shufflevector(
__a,
__a, 0, -1, 1, -1, 2, -1, 3, -1);
13679 __builtin_shufflevector(
__a,
__a, -1, 0, -1, 1, -1, 2, -1, 3);
13681 return __builtin_vsx_xvcvhpsp(
__b);
13685vec_extract_fp32_from_shortl(vector
unsigned short __a) {
13686 vector
unsigned short __b =
13687#ifdef __LITTLE_ENDIAN__
13688 __builtin_shufflevector(
__a,
__a, 4, -1, 5, -1, 6, -1, 7, -1);
13690 __builtin_shufflevector(
__a,
__a, -1, 4, -1, 5, -1, 6, -1, 7);
13692 return __builtin_vsx_xvcvhpsp(
__b);
13711 vector
bool char __b,
13748 vector
bool int __b,
13761static __inline__ vector
unsigned long long __ATTRS_o_ai
13820 const short *
__b) {
13825 const vector
short *
__b) {
13849 const vector pixel *
__b) {
13859 const vector
int *
__b) {
13883 const float *
__b) {
13888 const vector
float *
__b) {
13926 const short *
__b) {
13931 const vector
short *
__b) {
13955 const vector pixel *
__b) {
13965 const vector
int *
__b) {
13989 const float *
__b) {
13994 vector
float *
__b) {
14032 const short *
__b) {
14037 const vector
short *
__b) {
14061 const vector pixel *
__b) {
14071 const vector
int *
__b) {
14095 const float *
__b) {
14100 const vector
float *
__b) {
14138 const short *
__b) {
14143 const vector
short *
__b) {
14167 const vector pixel *
__b) {
14177 const vector
int *
__b) {
14201 const float *
__b) {
14206 const vector
float *
__b) {
14214 signed char *
__c) {
14220 vector
signed char *
__c) {
14227 unsigned char *
__c) {
14233 vector
unsigned char *
__c) {
14240 vector
bool char *
__c) {
14253 vector
short *
__c) {
14260 int __b,
unsigned short *
__c) {
14267 vector
unsigned short *
__c) {
14274 vector
bool short *
__c) {
14281 vector pixel *
__c) {
14301 unsigned int *
__c) {
14307 vector
unsigned int *
__c) {
14314 vector
bool int *
__c) {
14321 vector
float *
__c) {
14330 signed char *
__c) {
14336 vector
signed char *
__c) {
14343 int __b,
unsigned char *
__c) {
14350 vector
unsigned char *
__c) {
14357 vector
bool char *
__c) {
14370 vector
short *
__c) {
14377 int __b,
unsigned short *
__c) {
14384 vector
unsigned short *
__c) {
14391 vector
bool short *
__c) {
14398 vector pixel *
__c) {
14418 unsigned int *
__c) {
14424 vector
unsigned int *
__c) {
14431 vector
bool int *
__c) {
14438 vector
float *
__c) {
14447 signed char *
__c) {
14453 vector
signed char *
__c) {
14460 unsigned char *
__c) {
14466 vector
unsigned char *
__c) {
14473 vector
bool char *
__c) {
14486 vector
short *
__c) {
14493 int __b,
unsigned short *
__c) {
14500 vector
unsigned short *
__c) {
14507 vector
bool short *
__c) {
14514 vector pixel *
__c) {
14534 unsigned int *
__c) {
14540 vector
unsigned int *
__c) {
14547 vector
bool int *
__c) {
14554 vector
float *
__c) {
14563 signed char *
__c) {
14569 vector
signed char *
__c) {
14576 int __b,
unsigned char *
__c) {
14583 vector
unsigned char *
__c) {
14590 vector
bool char *
__c) {
14603 vector
short *
__c) {
14610 int __b,
unsigned short *
__c) {
14617 vector
unsigned short *
__c) {
14624 vector
bool short *
__c) {
14631 vector pixel *
__c) {
14651 unsigned int *
__c) {
14657 vector
unsigned int *
__c) {
14664 vector
bool int *
__c) {
14671 vector
float *
__c) {
14681 const vector
signed char __zero = (vector
signed char)0;
14682 vector
signed char __res =
14683 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1,
14684 -1, -1, -1, -1, -1, -1, -1, -1);
14691 const vector
unsigned char __zero = (vector
unsigned char)(0);
14692 vector
unsigned char __res =
14693 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1,
14694 -1, -1, -1, -1, -1, -1, -1, -1);
14700 const vector
short __zero = (vector short)(0);
14701 vector
short __res =
14702 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1);
14709 const vector
unsigned short __zero = (vector
unsigned short)(0);
14710 vector
unsigned short __res =
14711 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1);
14717 const vector
int __zero = (vector
int)(0);
14718 vector
int __res = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14725 const vector
unsigned int __zero = (vector
unsigned int)(0);
14726 vector
unsigned int __res =
14727 __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14733 const vector
float __zero = (vector
float)(0);
14734 vector
float __res = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
14741 const vector
double __zero = (vector
double)(0);
14742 vector
double __res = __builtin_shufflevector(__zero, __zero, -1, -1);
14749 const vector
signed long long __zero = (vector
signed long long)(0);
14750 vector
signed long long __res =
14751 __builtin_shufflevector(__zero, __zero, -1, -1);
14756static __inline__ vector
unsigned long long __ATTRS_o_ai
14758 const vector
unsigned long long __zero = (vector
unsigned long long)(0);
14759 vector
unsigned long long __res =
14760 __builtin_shufflevector(__zero, __zero, -1, -1);
14769 return (vector
signed char)(
__a);
14774 return (vector
unsigned char)(
__a);
14778 return (vector
short)(
__a);
14783 return (vector
unsigned short)(
__a);
14787 return (vector
int)(
__a);
14792 return (vector
unsigned int)(
__a);
14798 return (vector
signed long long)(
__a);
14801static __inline__ vector
unsigned long long __ATTRS_o_ai
14803 return (vector
unsigned long long)(
__a);
14806#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
14807 defined(__SIZEOF_INT128__)
14810 return (vector
signed __int128)(
__a);
14813static __inline__ vector
unsigned __int128
__ATTRS_o_ai
14815 return (vector
unsigned __int128)(
__a);
14821 return (vector
double)(
__a);
14826 return (vector
float)(
__a);
14834 vector
signed char __b) {
14835 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14840 vector
bool char __b) {
14841 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14846 vector
unsigned char __b) {
14847 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14852 vector
bool char __b) {
14853 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14858 vector
signed char __b) {
14859 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14864 vector
unsigned char __b) {
14865 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14870 vector
bool char __b) {
14871 return __builtin_altivec_vcmpequb_p(
__CR6_LT, (vector
char)
__a,
14876 vector
short __b) {
14881 vector
bool short __b) {
14882 return __builtin_altivec_vcmpequh_p(
__CR6_LT,
__a, (vector
short)
__b);
14886 vector
unsigned short __b) {
14887 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14888 (vector
short)
__b);
14892 vector
bool short __b) {
14893 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14894 (vector
short)
__b);
14898 vector
short __b) {
14899 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14900 (vector
short)
__b);
14904 vector
unsigned short __b) {
14905 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14906 (vector
short)
__b);
14910 vector
bool short __b) {
14911 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14912 (vector
short)
__b);
14916 vector pixel
__b) {
14917 return __builtin_altivec_vcmpequh_p(
__CR6_LT, (vector
short)
__a,
14918 (vector
short)
__b);
14926 vector
bool int __b) {
14927 return __builtin_altivec_vcmpequw_p(
__CR6_LT,
__a, (vector
int)
__b);
14931 vector
unsigned int __b) {
14932 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14937 vector
bool int __b) {
14938 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14944 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14949 vector
unsigned int __b) {
14950 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14955 vector
bool int __b) {
14956 return __builtin_altivec_vcmpequw_p(
__CR6_LT, (vector
int)
__a,
14962 vector
signed long long __b) {
14963#ifdef __POWER8_VECTOR__
14973 vector
bool long long __b) {
14974 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14978 vector
unsigned long long __b) {
14979 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14983 vector
bool long long __b) {
14984 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14988 vector
long long __b) {
14989 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14993 vector
unsigned long long __b) {
14994 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
14998 vector
bool long long __b) {
14999 return vec_all_eq((vector
signed long long)
__a, (vector
signed long long)
__b);
15004 vector
float __b) {
15014 vector
double __b) {
15019#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15021 vector
signed __int128
__b) {
15022 return __builtin_altivec_vcmpequq_p(
__CR6_LT, (vector
unsigned __int128)
__a,
15023 (vector
signed __int128)
__b);
15027 vector
unsigned __int128
__b) {
15028 return __builtin_altivec_vcmpequq_p(
__CR6_LT,
__a,
15029 (vector
signed __int128)
__b);
15033 vector
bool __int128
__b) {
15034 return __builtin_altivec_vcmpequq_p(
__CR6_LT, (vector
unsigned __int128)
__a,
15035 (vector
signed __int128)
__b);
15042 vector
signed char __b) {
15047 vector
bool char __b) {
15048 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, (vector
signed char)
__b,
__a);
15052 vector
unsigned char __b) {
15057 vector
bool char __b) {
15058 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__b,
__a);
15062 vector
signed char __b) {
15063 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ,
__b, (vector
signed char)
__a);
15067 vector
unsigned char __b) {
15068 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ,
__b, (vector
unsigned char)
__a);
15072 vector
bool char __b) {
15073 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__b,
15074 (vector
unsigned char)
__a);
15078 vector
short __b) {
15083 vector
bool short __b) {
15084 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, (vector
short)
__b,
__a);
15088 vector
unsigned short __b) {
15093 vector
bool short __b) {
15094 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__b,
15099 vector
short __b) {
15100 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ,
__b, (vector
signed short)
__a);
15104 vector
unsigned short __b) {
15105 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ,
__b,
15106 (vector
unsigned short)
__a);
15110 vector
bool short __b) {
15111 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__b,
15112 (vector
unsigned short)
__a);
15120 vector
bool int __b) {
15121 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, (vector
int)
__b,
__a);
15125 vector
unsigned int __b) {
15130 vector
bool int __b) {
15131 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__b,
__a);
15136 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ,
__b, (vector
signed int)
__a);
15140 vector
unsigned int __b) {
15141 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ,
__b, (vector
unsigned int)
__a);
15145 vector
bool int __b) {
15146 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__b,
15147 (vector
unsigned int)
__a);
15152 vector
signed long long __b) {
15156 vector
bool long long __b) {
15157 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, (vector
signed long long)
__b,
15162 vector
unsigned long long __b) {
15167 vector
bool long long __b) {
15168 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__b,
15173 vector
signed long long __b) {
15174 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ,
__b,
15175 (vector
signed long long)
__a);
15179 vector
unsigned long long __b) {
15180 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ,
__b,
15181 (vector
unsigned long long)
__a);
15185 vector
bool long long __b) {
15186 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__b,
15187 (vector
unsigned long long)
__a);
15192 vector
float __b) {
15202 vector
double __b) {
15207#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15209 vector
signed __int128
__b) {
15214 vector
unsigned __int128
__b) {
15222 vector
signed char __b) {
15227 vector
bool char __b) {
15228 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT,
__a, (vector
signed char)
__b);
15232 vector
unsigned char __b) {
15237 vector
bool char __b) {
15238 return __builtin_altivec_vcmpgtub_p(
__CR6_LT,
__a, (vector
unsigned char)
__b);
15242 vector
signed char __b) {
15243 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, (vector
signed char)
__a,
__b);
15247 vector
unsigned char __b) {
15248 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__a,
__b);
15252 vector
bool char __b) {
15253 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__a,
15254 (vector
unsigned char)
__b);
15258 vector
short __b) {
15263 vector
bool short __b) {
15264 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT,
__a, (vector
short)
__b);
15268 vector
unsigned short __b) {
15273 vector
bool short __b) {
15274 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT,
__a,
15275 (vector
unsigned short)
__b);
15279 vector
short __b) {
15280 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, (vector
signed short)
__a,
__b);
15284 vector
unsigned short __b) {
15285 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__a,
15290 vector
bool short __b) {
15291 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__a,
15292 (vector
unsigned short)
__b);
15300 vector
bool int __b) {
15301 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT,
__a, (vector
int)
__b);
15305 vector
unsigned int __b) {
15310 vector
bool int __b) {
15311 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT,
__a, (vector
unsigned int)
__b);
15316 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, (vector
signed int)
__a,
__b);
15320 vector
unsigned int __b) {
15321 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__a,
__b);
15325 vector
bool int __b) {
15326 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__a,
15327 (vector
unsigned int)
__b);
15332 vector
signed long long __b) {
15336 vector
bool long long __b) {
15337 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT,
__a,
15338 (vector
signed long long)
__b);
15342 vector
unsigned long long __b) {
15347 vector
bool long long __b) {
15348 return __builtin_altivec_vcmpgtud_p(
__CR6_LT,
__a,
15349 (vector
unsigned long long)
__b);
15353 vector
signed long long __b) {
15354 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, (vector
signed long long)
__a,
15359 vector
unsigned long long __b) {
15360 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__a,
15365 vector
bool long long __b) {
15366 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__a,
15367 (vector
unsigned long long)
__b);
15372 vector
float __b) {
15382 vector
double __b) {
15387#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15389 vector
signed __int128
__b) {
15394 vector
unsigned __int128
__b) {
15402vec_all_in(vector
float __a, vector
float __b) {
15409 vector
signed char __b) {
15414 vector
bool char __b) {
15415 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ,
__a, (vector
signed char)
__b);
15419 vector
unsigned char __b) {
15424 vector
bool char __b) {
15425 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ,
__a, (vector
unsigned char)
__b);
15429 vector
signed char __b) {
15430 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ, (vector
signed char)
__a,
__b);
15434 vector
unsigned char __b) {
15435 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__a,
__b);
15439 vector
bool char __b) {
15440 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ, (vector
unsigned char)
__a,
15441 (vector
unsigned char)
__b);
15445 vector
short __b) {
15450 vector
bool short __b) {
15451 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ,
__a, (vector
short)
__b);
15455 vector
unsigned short __b) {
15460 vector
bool short __b) {
15461 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ,
__a,
15462 (vector
unsigned short)
__b);
15466 vector
short __b) {
15467 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ, (vector
signed short)
__a,
__b);
15471 vector
unsigned short __b) {
15472 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__a,
15477 vector
bool short __b) {
15478 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ, (vector
unsigned short)
__a,
15479 (vector
unsigned short)
__b);
15487 vector
bool int __b) {
15488 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ,
__a, (vector
int)
__b);
15492 vector
unsigned int __b) {
15497 vector
bool int __b) {
15498 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ,
__a, (vector
unsigned int)
__b);
15503 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ, (vector
signed int)
__a,
__b);
15507 vector
unsigned int __b) {
15508 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__a,
__b);
15512 vector
bool int __b) {
15513 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ, (vector
unsigned int)
__a,
15514 (vector
unsigned int)
__b);
15519 vector
signed long long __b) {
15524 vector
unsigned long long __b) {
15529 vector
bool long long __b) {
15530 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ,
__a,
15531 (vector
signed long long)
__b);
15535 vector
bool long long __b) {
15536 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ,
__a,
15537 (vector
unsigned long long)
__b);
15541 vector
signed long long __b) {
15542 return __builtin_altivec_vcmpgtsd_p(
__CR6_EQ, (vector
signed long long)
__a,
15547 vector
unsigned long long __b) {
15548 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__a,
15553 vector
bool long long __b) {
15554 return __builtin_altivec_vcmpgtud_p(
__CR6_EQ, (vector
unsigned long long)
__a,
15555 (vector
unsigned long long)
__b);
15560 vector
float __b) {
15570 vector
double __b) {
15575#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15577 vector
signed __int128
__b) {
15582 vector
unsigned __int128
__b) {
15590 vector
signed char __b) {
15595 vector
bool char __b) {
15596 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT, (vector
signed char)
__b,
__a);
15600 vector
unsigned char __b) {
15605 vector
bool char __b) {
15606 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__b,
__a);
15610 vector
signed char __b) {
15611 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT,
__b, (vector
signed char)
__a);
15615 vector
unsigned char __b) {
15616 return __builtin_altivec_vcmpgtub_p(
__CR6_LT,
__b, (vector
unsigned char)
__a);
15620 vector
bool char __b) {
15621 return __builtin_altivec_vcmpgtub_p(
__CR6_LT, (vector
unsigned char)
__b,
15622 (vector
unsigned char)
__a);
15626 vector
short __b) {
15631 vector
bool short __b) {
15632 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT, (vector
short)
__b,
__a);
15636 vector
unsigned short __b) {
15641 vector
bool short __b) {
15642 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__b,
15647 vector
short __b) {
15648 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT,
__b, (vector
signed short)
__a);
15652 vector
unsigned short __b) {
15653 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT,
__b,
15654 (vector
unsigned short)
__a);
15658 vector
bool short __b) {
15659 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT, (vector
unsigned short)
__b,
15660 (vector
unsigned short)
__a);
15668 vector
bool int __b) {
15669 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT, (vector
int)
__b,
__a);
15673 vector
unsigned int __b) {
15678 vector
bool int __b) {
15679 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__b,
__a);
15684 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT,
__b, (vector
signed int)
__a);
15688 vector
unsigned int __b) {
15689 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT,
__b, (vector
unsigned int)
__a);
15693 vector
bool int __b) {
15694 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT, (vector
unsigned int)
__b,
15695 (vector
unsigned int)
__a);
15700 vector
signed long long __b) {
15705 vector
unsigned long long __b) {
15710 vector
bool long long __b) {
15711 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT, (vector
signed long long)
__b,
15716 vector
bool long long __b) {
15717 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__b,
15722 vector
signed long long __b) {
15723 return __builtin_altivec_vcmpgtsd_p(
__CR6_LT,
__b,
15724 (vector
signed long long)
__a);
15728 vector
unsigned long long __b) {
15729 return __builtin_altivec_vcmpgtud_p(
__CR6_LT,
__b,
15730 (vector
unsigned long long)
__a);
15734 vector
bool long long __b) {
15735 return __builtin_altivec_vcmpgtud_p(
__CR6_LT, (vector
unsigned long long)
__b,
15736 (vector
unsigned long long)
__a);
15741 vector
float __b) {
15751 vector
double __b) {
15756#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15758 vector
signed __int128
__b) {
15763 vector
unsigned __int128
__b) {
15787 vector
signed char __b) {
15788 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15793 vector
bool char __b) {
15794 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15799 vector
unsigned char __b) {
15800 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15805 vector
bool char __b) {
15806 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15811 vector
signed char __b) {
15812 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15817 vector
unsigned char __b) {
15818 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15823 vector
bool char __b) {
15824 return __builtin_altivec_vcmpequb_p(
__CR6_EQ, (vector
char)
__a,
15829 vector
short __b) {
15834 vector
bool short __b) {
15835 return __builtin_altivec_vcmpequh_p(
__CR6_EQ,
__a, (vector
short)
__b);
15839 vector
unsigned short __b) {
15840 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15841 (vector
short)
__b);
15845 vector
bool short __b) {
15846 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15847 (vector
short)
__b);
15851 vector
short __b) {
15852 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15853 (vector
short)
__b);
15857 vector
unsigned short __b) {
15858 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15859 (vector
short)
__b);
15863 vector
bool short __b) {
15864 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15865 (vector
short)
__b);
15869 vector pixel
__b) {
15870 return __builtin_altivec_vcmpequh_p(
__CR6_EQ, (vector
short)
__a,
15871 (vector
short)
__b);
15879 vector
bool int __b) {
15880 return __builtin_altivec_vcmpequw_p(
__CR6_EQ,
__a, (vector
int)
__b);
15884 vector
unsigned int __b) {
15885 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15890 vector
bool int __b) {
15891 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15897 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15902 vector
unsigned int __b) {
15903 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15908 vector
bool int __b) {
15909 return __builtin_altivec_vcmpequw_p(
__CR6_EQ, (vector
int)
__a,
15915 vector
signed long long __b) {
15920 vector
unsigned long long __b) {
15921 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
long long)
__a,
15922 (vector
long long)
__b);
15926 vector
bool long long __b) {
15927 return __builtin_altivec_vcmpequd_p(
__CR6_EQ,
__a,
15928 (vector
signed long long)
__b);
15932 vector
bool long long __b) {
15933 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15934 (vector
signed long long)
__b);
15938 vector
signed long long __b) {
15939 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15940 (vector
signed long long)
__b);
15944 vector
unsigned long long __b) {
15945 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15946 (vector
signed long long)
__b);
15950 vector
bool long long __b) {
15951 return __builtin_altivec_vcmpequd_p(
__CR6_EQ, (vector
signed long long)
__a,
15952 (vector
signed long long)
__b);
15957 vector
float __b) {
15967 vector
double __b) {
15972#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
15974 vector
signed __int128
__b) {
15975 return __builtin_altivec_vcmpequq_p(
__CR6_EQ, (vector
unsigned __int128)
__a,
15980 vector
unsigned __int128
__b) {
15981 return __builtin_altivec_vcmpequq_p(
__CR6_EQ,
__a,
15982 (vector
signed __int128)
__b);
15986 vector
bool __int128
__b) {
15987 return __builtin_altivec_vcmpequq_p(
__CR6_EQ, (vector
unsigned __int128)
__a,
15988 (vector
signed __int128)
__b);
15995 vector
float __b) {
16005 vector
double __b) {
16013 vector
float __b) {
16023 vector
double __b) {
16041 vector
double __b) {
16059 vector
double __b) {
16084 vector
signed char __b) {
16090 vector
bool char __b) {
16096 vector
unsigned char __b) {
16102 vector
bool char __b) {
16108 vector
signed char __b) {
16114 vector
unsigned char __b) {
16120 vector
bool char __b) {
16126 vector
short __b) {
16131 vector
bool short __b) {
16136 vector
unsigned short __b) {
16138 (vector
short)
__b);
16142 vector
bool short __b) {
16144 (vector
short)
__b);
16148 vector
short __b) {
16150 (vector
short)
__b);
16154 vector
unsigned short __b) {
16156 (vector
short)
__b);
16160 vector
bool short __b) {
16162 (vector
short)
__b);
16166 vector pixel
__b) {
16168 (vector
short)
__b);
16176 vector
bool int __b) {
16181 vector
unsigned int __b) {
16187 vector
bool int __b) {
16199 vector
unsigned int __b) {
16205 vector
bool int __b) {
16212 vector
signed long long __b) {
16217 vector
unsigned long long __b) {
16218 return __builtin_altivec_vcmpequd_p(
__CR6_EQ_REV, (vector
long long)
__a,
16219 (vector
long long)
__b);
16223 vector
bool long long __b) {
16225 (vector
signed long long)
__b);
16229 vector
bool long long __b) {
16230 return __builtin_altivec_vcmpequd_p(
16235 vector
signed long long __b) {
16236 return __builtin_altivec_vcmpequd_p(
16241 vector
unsigned long long __b) {
16242 return __builtin_altivec_vcmpequd_p(
16247 vector
bool long long __b) {
16248 return __builtin_altivec_vcmpequd_p(
16254 vector
float __b) {
16264 vector
double __b) {
16269#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16271 vector
signed __int128
__b) {
16273 (vector
unsigned __int128)
__a,
__b);
16277 vector
unsigned __int128
__b) {
16279 (vector
signed __int128)
__b);
16283 vector
bool __int128
__b) {
16284 return __builtin_altivec_vcmpequq_p(
16292 vector
signed char __b) {
16297 vector
bool char __b) {
16298 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, (vector
signed char)
__b,
16303 vector
unsigned char __b) {
16308 vector
bool char __b) {
16309 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__b,
16314 vector
signed char __b) {
16316 (vector
signed char)
__a);
16320 vector
unsigned char __b) {
16322 (vector
unsigned char)
__a);
16326 vector
bool char __b) {
16327 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__b,
16328 (vector
unsigned char)
__a);
16332 vector
short __b) {
16337 vector
bool short __b) {
16342 vector
unsigned short __b) {
16347 vector
bool short __b) {
16348 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__b,
16353 vector
short __b) {
16355 (vector
signed short)
__a);
16359 vector
unsigned short __b) {
16361 (vector
unsigned short)
__a);
16365 vector
bool short __b) {
16366 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__b,
16367 (vector
unsigned short)
__a);
16375 vector
bool int __b) {
16380 vector
unsigned int __b) {
16385 vector
bool int __b) {
16386 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__b,
16393 (vector
signed int)
__a);
16397 vector
unsigned int __b) {
16399 (vector
unsigned int)
__a);
16403 vector
bool int __b) {
16404 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__b,
16405 (vector
unsigned int)
__a);
16410 vector
signed long long __b) {
16415 vector
unsigned long long __b) {
16420 vector
bool long long __b) {
16422 (vector
signed long long)
__b,
__a);
16426 vector
bool long long __b) {
16428 (vector
unsigned long long)
__b,
__a);
16432 vector
signed long long __b) {
16434 (vector
signed long long)
__a);
16438 vector
unsigned long long __b) {
16440 (vector
unsigned long long)
__a);
16444 vector
bool long long __b) {
16446 (vector
unsigned long long)
__b,
16447 (vector
unsigned long long)
__a);
16452 vector
float __b) {
16462 vector
double __b) {
16467#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16469 vector
signed __int128
__b) {
16474 vector
unsigned __int128
__b) {
16482 vector
signed char __b) {
16487 vector
bool char __b) {
16489 (vector
signed char)
__b);
16493 vector
unsigned char __b) {
16498 vector
bool char __b) {
16500 (vector
unsigned char)
__b);
16504 vector
signed char __b) {
16505 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, (vector
signed char)
__a,
16510 vector
unsigned char __b) {
16511 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__a,
16516 vector
bool char __b) {
16517 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__a,
16518 (vector
unsigned char)
__b);
16522 vector
short __b) {
16527 vector
bool short __b) {
16532 vector
unsigned short __b) {
16537 vector
bool short __b) {
16539 (vector
unsigned short)
__b);
16543 vector
short __b) {
16544 return __builtin_altivec_vcmpgtsh_p(
__CR6_EQ_REV, (vector
signed short)
__a,
16549 vector
unsigned short __b) {
16550 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__a,
16555 vector
bool short __b) {
16556 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__a,
16557 (vector
unsigned short)
__b);
16565 vector
bool int __b) {
16570 vector
unsigned int __b) {
16575 vector
bool int __b) {
16577 (vector
unsigned int)
__b);
16582 return __builtin_altivec_vcmpgtsw_p(
__CR6_EQ_REV, (vector
signed int)
__a,
16587 vector
unsigned int __b) {
16588 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__a,
16593 vector
bool int __b) {
16594 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__a,
16595 (vector
unsigned int)
__b);
16600 vector
signed long long __b) {
16605 vector
unsigned long long __b) {
16610 vector
bool long long __b) {
16612 (vector
signed long long)
__b);
16616 vector
bool long long __b) {
16618 (vector
unsigned long long)
__b);
16622 vector
signed long long __b) {
16624 (vector
signed long long)
__a,
__b);
16628 vector
unsigned long long __b) {
16630 (vector
unsigned long long)
__a,
__b);
16634 vector
bool long long __b) {
16636 (vector
unsigned long long)
__a,
16637 (vector
unsigned long long)
__b);
16642 vector
float __b) {
16652 vector
double __b) {
16657#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16659 vector
signed __int128
__b) {
16664 vector
unsigned __int128
__b) {
16672 vector
signed char __b) {
16677 vector
bool char __b) {
16679 (vector
signed char)
__b);
16683 vector
unsigned char __b) {
16688 vector
bool char __b) {
16690 (vector
unsigned char)
__b);
16694 vector
signed char __b) {
16695 return __builtin_altivec_vcmpgtsb_p(
__CR6_LT_REV, (vector
signed char)
__a,
16700 vector
unsigned char __b) {
16701 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__a,
16706 vector
bool char __b) {
16707 return __builtin_altivec_vcmpgtub_p(
__CR6_LT_REV, (vector
unsigned char)
__a,
16708 (vector
unsigned char)
__b);
16712 vector
short __b) {
16717 vector
bool short __b) {
16722 vector
unsigned short __b) {
16727 vector
bool short __b) {
16729 (vector
unsigned short)
__b);
16733 vector
short __b) {
16734 return __builtin_altivec_vcmpgtsh_p(
__CR6_LT_REV, (vector
signed short)
__a,
16739 vector
unsigned short __b) {
16740 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__a,
16745 vector
bool short __b) {
16746 return __builtin_altivec_vcmpgtuh_p(
__CR6_LT_REV, (vector
unsigned short)
__a,
16747 (vector
unsigned short)
__b);
16755 vector
bool int __b) {
16760 vector
unsigned int __b) {
16765 vector
bool int __b) {
16767 (vector
unsigned int)
__b);
16772 return __builtin_altivec_vcmpgtsw_p(
__CR6_LT_REV, (vector
signed int)
__a,
16777 vector
unsigned int __b) {
16778 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__a,
16783 vector
bool int __b) {
16784 return __builtin_altivec_vcmpgtuw_p(
__CR6_LT_REV, (vector
unsigned int)
__a,
16785 (vector
unsigned int)
__b);
16790 vector
signed long long __b) {
16795 vector
unsigned long long __b) {
16800 vector
bool long long __b) {
16802 (vector
signed long long)
__b);
16806 vector
bool long long __b) {
16808 (vector
unsigned long long)
__b);
16812 vector
signed long long __b) {
16814 (vector
signed long long)
__a,
__b);
16818 vector
unsigned long long __b) {
16820 (vector
unsigned long long)
__a,
__b);
16824 vector
bool long long __b) {
16826 (vector
unsigned long long)
__a,
16827 (vector
unsigned long long)
__b);
16832 vector
float __b) {
16842 vector
double __b) {
16847#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
16849 vector
signed __int128
__b) {
16854 vector
unsigned __int128
__b) {
16862 vector
signed char __b) {
16867 vector
bool char __b) {
16868 return __builtin_altivec_vcmpgtsb_p(
__CR6_EQ_REV, (vector
signed char)
__b,
16873 vector
unsigned char __b) {
16878 vector
bool char __b) {
16879 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__b,
16884 vector
signed char __b) {
16886 (vector
signed char)
__a);
16890 vector
unsigned char __b) {
16892 (vector
unsigned char)
__a);
16896 vector
bool char __b) {
16897 return __builtin_altivec_vcmpgtub_p(
__CR6_EQ_REV, (vector
unsigned char)
__b,
16898 (vector
unsigned char)
__a);
16902 vector
short __b) {
16907 vector
bool short __b) {
16912 vector
unsigned short __b) {
16917 vector
bool short __b) {
16918 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__b,
16923 vector
short __b) {
16925 (vector
signed short)
__a);
16929 vector
unsigned short __b) {
16931 (vector
unsigned short)
__a);
16935 vector
bool short __b) {
16936 return __builtin_altivec_vcmpgtuh_p(
__CR6_EQ_REV, (vector
unsigned short)
__b,
16937 (vector
unsigned short)
__a);
16945 vector
bool int __b) {
16950 vector
unsigned int __b) {
16955 vector
bool int __b) {
16956 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__b,
16963 (vector
signed int)
__a);
16967 vector
unsigned int __b) {
16969 (vector
unsigned int)
__a);
16973 vector
bool int __b) {
16974 return __builtin_altivec_vcmpgtuw_p(
__CR6_EQ_REV, (vector
unsigned int)
__b,
16975 (vector
unsigned int)
__a);
16980 vector
signed long long __b) {
16985 vector
unsigned long long __b) {
16990 vector
bool long long __b) {
16992 (vector
signed long long)
__b,
__a);
16996 vector
bool long long __b) {
16998 (vector
unsigned long long)
__b,
__a);
17002 vector
signed long long __b) {
17004 (vector
signed long long)
__a);
17008 vector
unsigned long long __b) {
17010 (vector
unsigned long long)
__a);
17014 vector
bool long long __b) {
17016 (vector
unsigned long long)
__b,
17017 (vector
unsigned long long)
__a);
17022 vector
float __b) {
17032 vector
double __b) {
17037#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
17039 vector
signed __int128
__b) {
17044 vector
unsigned __int128
__b) {
17067 vector
signed char __b) {
17073 vector
bool char __b) {
17079 vector
unsigned char __b) {
17085 vector
bool char __b) {
17091 vector
signed char __b) {
17097 vector
unsigned char __b) {
17103 vector
bool char __b) {
17109 vector
short __b) {
17114 vector
bool short __b) {
17119 vector
unsigned short __b) {
17121 (vector
short)
__b);
17125 vector
bool short __b) {
17127 (vector
short)
__b);
17131 vector
short __b) {
17133 (vector
short)
__b);
17137 vector
unsigned short __b) {
17139 (vector
short)
__b);
17143 vector
bool short __b) {
17145 (vector
short)
__b);
17149 vector pixel
__b) {
17151 (vector
short)
__b);
17159 vector
bool int __b) {
17164 vector
unsigned int __b) {
17170 vector
bool int __b) {
17182 vector
unsigned int __b) {
17188 vector
bool int __b) {
17195 vector
signed long long __b) {
17196#ifdef __POWER8_VECTOR__
17206 vector
unsigned long long __b) {
17207 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17211 vector
bool long long __b) {
17212 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17216 vector
bool long long __b) {
17217 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17221 vector
signed long long __b) {
17222 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17226 vector
unsigned long long __b) {
17227 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17231 vector
bool long long __b) {
17232 return vec_any_ne((vector
signed long long)
__a, (vector
signed long long)
__b);
17237 vector
float __b) {
17247 vector
double __b) {
17252#if defined(__POWER10_VECTOR__) && defined(__SIZEOF_INT128__)
17254 vector
signed __int128
__b) {
17256 (vector
unsigned __int128)
__a,
__b);
17260 vector
unsigned __int128
__b) {
17262 (vector
signed __int128)
__b);
17266 vector
bool __int128
__b) {
17267 return __builtin_altivec_vcmpequq_p(
17275 vector
float __b) {
17285 vector
double __b) {
17293 vector
float __b) {
17303 vector
double __b) {
17311 vector
float __b) {
17321 vector
double __b) {
17329 vector
float __b) {
17339 vector
double __b) {
17363vec_any_out(vector
float __a, vector
float __b) {
17381#define vec_sbox_be __builtin_altivec_crypto_vsbox
17382#define vec_cipher_be __builtin_altivec_crypto_vcipher
17383#define vec_cipherlast_be __builtin_altivec_crypto_vcipherlast
17384#define vec_ncipher_be __builtin_altivec_crypto_vncipher
17385#define vec_ncipherlast_be __builtin_altivec_crypto_vncipherlast
17388static __inline__ vector
unsigned char __attribute__((__always_inline__))
17389__builtin_crypto_vsbox(vector
unsigned char __a) {
17390 return __builtin_altivec_crypto_vsbox(
__a);
17393static __inline__ vector
unsigned char __attribute__((__always_inline__))
17394__builtin_crypto_vcipher(vector
unsigned char __a,
17395 vector
unsigned char __b) {
17396 return __builtin_altivec_crypto_vcipher(
__a,
__b);
17399static __inline__ vector
unsigned char __attribute__((__always_inline__))
17400__builtin_crypto_vcipherlast(vector
unsigned char __a,
17401 vector
unsigned char __b) {
17402 return __builtin_altivec_crypto_vcipherlast(
__a,
__b);
17405static __inline__ vector
unsigned char __attribute__((__always_inline__))
17406__builtin_crypto_vncipher(vector
unsigned char __a,
17407 vector
unsigned char __b) {
17408 return __builtin_altivec_crypto_vncipher(
__a,
__b);
17411static __inline__ vector
unsigned char __attribute__((__always_inline__))
17412__builtin_crypto_vncipherlast(vector
unsigned char __a,
17413 vector
unsigned char __b) {
17414 return __builtin_altivec_crypto_vncipherlast(
__a,
__b);
17418#define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad
17419#define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw
17421#define vec_shasigma_be(X, Y, Z) \
17422 _Generic((X), vector unsigned int \
17423 : __builtin_crypto_vshasigmaw, vector unsigned long long \
17424 : __builtin_crypto_vshasigmad)((X), (Y), (Z))
17427#ifdef __POWER8_VECTOR__
17429vec_permxor(vector
bool char __a, vector
bool char __b,
17430 vector
bool char __c) {
17431 return (vector
bool char)__builtin_altivec_crypto_vpermxor(
17432 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17433 (vector
unsigned char)
__c);
17437vec_permxor(vector
signed char __a, vector
signed char __b,
17438 vector
signed char __c) {
17439 return (vector
signed char)__builtin_altivec_crypto_vpermxor(
17440 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17441 (vector
unsigned char)
__c);
17445vec_permxor(vector
unsigned char __a, vector
unsigned char __b,
17446 vector
unsigned char __c) {
17447 return __builtin_altivec_crypto_vpermxor(
__a,
__b,
__c);
17451__builtin_crypto_vpermxor(vector
unsigned char __a, vector
unsigned char __b,
17452 vector
unsigned char __c) {
17453 return __builtin_altivec_crypto_vpermxor(
__a,
__b,
__c);
17457__builtin_crypto_vpermxor(vector
unsigned short __a, vector
unsigned short __b,
17458 vector
unsigned short __c) {
17459 return (vector
unsigned short)__builtin_altivec_crypto_vpermxor(
17460 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17461 (vector
unsigned char)
__c);
17464static __inline__ vector
unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
17465 vector
unsigned int __a, vector
unsigned int __b, vector
unsigned int __c) {
17466 return (vector
unsigned int)__builtin_altivec_crypto_vpermxor(
17467 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17468 (vector
unsigned char)
__c);
17471static __inline__ vector
unsigned long long __ATTRS_o_ai
17472__builtin_crypto_vpermxor(vector
unsigned long long __a,
17473 vector
unsigned long long __b,
17474 vector
unsigned long long __c) {
17475 return (vector
unsigned long long)__builtin_altivec_crypto_vpermxor(
17476 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
17477 (vector
unsigned char)
__c);
17481__builtin_crypto_vpmsumb(vector
unsigned char __a, vector
unsigned char __b) {
17482 return __builtin_altivec_crypto_vpmsumb(
__a,
__b);
17486__builtin_crypto_vpmsumb(vector
unsigned short __a, vector
unsigned short __b) {
17487 return __builtin_altivec_crypto_vpmsumh(
__a,
__b);
17491__builtin_crypto_vpmsumb(vector
unsigned int __a, vector
unsigned int __b) {
17492 return __builtin_altivec_crypto_vpmsumw(
__a,
__b);
17495static __inline__ vector
unsigned long long __ATTRS_o_ai
17496__builtin_crypto_vpmsumb(vector
unsigned long long __a,
17497 vector
unsigned long long __b) {
17498 return __builtin_altivec_crypto_vpmsumd(
__a,
__b);
17502vec_vgbbd(vector
signed char __a) {
17503 return (vector
signed char)__builtin_altivec_vgbbd((vector
unsigned char)
__a);
17506#define vec_pmsum_be __builtin_crypto_vpmsumb
17507#define vec_gb __builtin_altivec_vgbbd
17510vec_vgbbd(vector
unsigned char __a) {
17511 return __builtin_altivec_vgbbd(
__a);
17515vec_gbb(vector
signed long long __a) {
17516 return (vector
signed long long)__builtin_altivec_vgbbd(
17517 (vector
unsigned char)
__a);
17520static __inline__ vector
unsigned long long __ATTRS_o_ai
17521vec_gbb(vector
unsigned long long __a) {
17522 return (vector
unsigned long long)__builtin_altivec_vgbbd(
17523 (vector
unsigned char)
__a);
17527vec_vbpermq(vector
signed char __a, vector
signed char __b) {
17528 return (vector
long long)__builtin_altivec_vbpermq((vector
unsigned char)
__a,
17529 (vector
unsigned char)
__b);
17533vec_vbpermq(vector
unsigned char __a, vector
unsigned char __b) {
17534 return (vector
long long)__builtin_altivec_vbpermq(
__a,
__b);
17537#if defined(__powerpc64__) && defined(__SIZEOF_INT128__)
17538static __inline__ vector
unsigned long long __ATTRS_o_ai
17539vec_bperm(vector
unsigned __int128
__a, vector
unsigned char __b) {
17540 return __builtin_altivec_vbpermq((vector
unsigned char)
__a,
17541 (vector
unsigned char)
__b);
17545vec_bperm(vector
unsigned char __a, vector
unsigned char __b) {
17546 return (vector
unsigned char)__builtin_altivec_vbpermq(
__a,
__b);
17549#ifdef __POWER9_VECTOR__
17550static __inline__ vector
unsigned long long __ATTRS_o_ai
17551vec_bperm(vector
unsigned long long __a, vector
unsigned char __b) {
17552 return __builtin_altivec_vbpermd(
__a,
__b);
17560 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17566 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17572 return __builtin_shufflevector(
__a,
__a, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6,
17577 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17582 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17587 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17592 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17597 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17602 return __builtin_shufflevector(
__a,
__a, 7, 6, 5, 4, 3, 2, 1, 0);
17606 return __builtin_shufflevector(
__a,
__a, 3, 2, 1, 0);
17612 return __builtin_shufflevector(
__a,
__a, 1, 0);
17617 return __builtin_shufflevector(
__a,
__a, 1, 0);
17620static __inline__
__ATTRS_o_ai vector
unsigned long long
17622 return __builtin_shufflevector(
__a,
__a, 1, 0);
17626 return __builtin_shufflevector(
__a,
__a, 1, 0);
17648 vector
unsigned char __indices =
17649 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17655 vector
unsigned char __indices =
17656 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17662 vector
unsigned char __indices =
17663 { 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 };
17669 vector
unsigned char __indices =
17670 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17676 vector
unsigned char __indices =
17677 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17683 vector
unsigned char __indices =
17684 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17690 vector
unsigned char __indices =
17691 { 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 };
17698 vector
unsigned char __indices =
17699 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17705 vector
unsigned char __indices =
17706 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17710static __inline__ vector
unsigned long long __ATTRS_o_ai
17712 vector
unsigned char __indices =
17713 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17719 vector
unsigned char __indices =
17720 { 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 };
17725#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17726 defined(__SIZEOF_INT128__)
17729 vector
unsigned char __indices =
17730 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
17731 return (vector
signed __int128)
vec_perm((vector
signed int)
__a,
17732 (vector
signed int)
__a,
17736static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17738 vector
unsigned char __indices =
17739 { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 };
17740 return (vector
unsigned __int128)
vec_perm((vector
signed int)
__a,
17741 (vector
signed int)
__a,
17748#define vec_xld2 vec_xl
17749#define vec_xlw4 vec_xl
17751typedef vector
unsigned char unaligned_vec_uchar
__attribute__((aligned(1)));
17752typedef vector
signed short unaligned_vec_sshort
__attribute__((aligned(1)));
17753typedef vector
unsigned short unaligned_vec_ushort
__attribute__((aligned(1)));
17754typedef vector
signed int unaligned_vec_sint
__attribute__((aligned(1)));
17755typedef vector
unsigned int unaligned_vec_uint
__attribute__((aligned(1)));
17756typedef vector
float unaligned_vec_float
__attribute__((aligned(1)));
17760 return *(unaligned_vec_schar *)(__ptr + __offset);
17765 return *(unaligned_vec_uchar*)(__ptr + __offset);
17770 signed char *__addr = (
signed char *)__ptr + __offset;
17771 return *(unaligned_vec_sshort *)__addr;
17776 signed char *__addr = (
signed char *)__ptr + __offset;
17777 return *(unaligned_vec_ushort *)__addr;
17782 signed char *__addr = (
signed char *)__ptr + __offset;
17783 return *(unaligned_vec_sint *)__addr;
17788 signed char *__addr = (
signed char *)__ptr + __offset;
17789 return *(unaligned_vec_uint *)__addr;
17793 const float *__ptr) {
17794 signed char *__addr = (
signed char *)__ptr + __offset;
17795 return *(unaligned_vec_float *)__addr;
17805 signed char *__addr = (
signed char *)__ptr + __offset;
17806 return *(unaligned_vec_sll *)__addr;
17809static __inline__
__ATTRS_o_ai vector
unsigned long long
17811 signed char *__addr = (
signed char *)__ptr + __offset;
17812 return *(unaligned_vec_ull *)__addr;
17816 const double *__ptr) {
17817 signed char *__addr = (
signed char *)__ptr + __offset;
17818 return *(unaligned_vec_double *)__addr;
17822#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17823 defined(__SIZEOF_INT128__)
17825typedef vector
unsigned __int128 unaligned_vec_ui128
17829 signed char *__addr = (
signed char *)__ptr + __offset;
17830 return *(unaligned_vec_si128 *)__addr;
17833static __inline__
__ATTRS_o_ai vector
unsigned __int128
17835 signed char *__addr = (
signed char *)__ptr + __offset;
17836 return *(unaligned_vec_ui128 *)__addr;
17842#ifdef __LITTLE_ENDIAN__
17846 vector
signed char __vec = (vector
signed char)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17847 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
17848 13, 12, 11, 10, 9, 8);
17853 vector
unsigned char __vec = (vector
unsigned char)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17854 return __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
17855 13, 12, 11, 10, 9, 8);
17860 vector
signed short __vec = (vector
signed short)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17861 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
17866 vector
unsigned short __vec = (vector
unsigned short)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17867 return __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
17871vec_xl_be(
signed long long __offset,
const signed int *__ptr) {
17872 return (vector
signed int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17876vec_xl_be(
signed long long __offset,
const unsigned int *__ptr) {
17877 return (vector
unsigned int)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17881vec_xl_be(
signed long long __offset,
const float *__ptr) {
17882 return (vector
float)__builtin_vsx_lxvw4x_be(__offset, __ptr);
17886vec_xl_be(
signed long long __offset,
const signed long long *__ptr) {
17887 return (vector
signed long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17890static __inline__ vector
unsigned long long __ATTRS_o_ai
17891vec_xl_be(
signed long long __offset,
const unsigned long long *__ptr) {
17892 return (vector
unsigned long long)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17896vec_xl_be(
signed long long __offset,
const double *__ptr) {
17897 return (vector
double)__builtin_vsx_lxvd2x_be(__offset, __ptr);
17900#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
17901 defined(__SIZEOF_INT128__)
17903vec_xl_be(
signed long long __offset,
const signed __int128 *__ptr) {
17904 return vec_xl(__offset, __ptr);
17907static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17908vec_xl_be(
signed long long __offset,
const unsigned __int128 *__ptr) {
17909 return vec_xl(__offset, __ptr);
17914#define vec_xl_be vec_xl
17917#if defined(__POWER10_VECTOR__) && defined(__VSX__) && \
17918 defined(__SIZEOF_INT128__)
17923vec_xl_sext(
ptrdiff_t __offset,
const signed char *__pointer) {
17924 return (vector
signed __int128)*(__pointer + __offset);
17928vec_xl_sext(
ptrdiff_t __offset,
const signed short *__pointer) {
17929 return (vector
signed __int128)*(__pointer + __offset);
17933vec_xl_sext(
ptrdiff_t __offset,
const signed int *__pointer) {
17934 return (vector
signed __int128)*(__pointer + __offset);
17938vec_xl_sext(
ptrdiff_t __offset,
const signed long long *__pointer) {
17939 return (vector
signed __int128)*(__pointer + __offset);
17944static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17945vec_xl_zext(
ptrdiff_t __offset,
const unsigned char *__pointer) {
17946 return (vector
unsigned __int128)*(__pointer + __offset);
17949static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17950vec_xl_zext(
ptrdiff_t __offset,
const unsigned short *__pointer) {
17951 return (vector
unsigned __int128)*(__pointer + __offset);
17954static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17955vec_xl_zext(
ptrdiff_t __offset,
const unsigned int *__pointer) {
17956 return (vector
unsigned __int128)*(__pointer + __offset);
17959static __inline__ vector
unsigned __int128
__ATTRS_o_ai
17960vec_xl_zext(
ptrdiff_t __offset,
const unsigned long long *__pointer) {
17961 return (vector
unsigned __int128)*(__pointer + __offset);
17969vec_xlds(
ptrdiff_t __offset,
const signed long long *__ptr) {
17970 signed long long *__addr = (
signed long long*)((
signed char *)__ptr + __offset);
17971 return (vector
signed long long) *__addr;
17974static __inline__ vector
unsigned long long __ATTRS_o_ai
17975vec_xlds(
ptrdiff_t __offset,
const unsigned long long *__ptr) {
17976 unsigned long long *__addr = (
unsigned long long *)((
signed char *)__ptr + __offset);
17977 return (unaligned_vec_ull) *__addr;
17981 const double *__ptr) {
17982 double *__addr = (
double*)((
signed char *)__ptr + __offset);
17983 return (unaligned_vec_double) *__addr;
17988vec_load_splats(
signed long long __offset,
const signed int *__ptr) {
17989 signed int *__addr = (
signed int*)((
signed char *)__ptr + __offset);
17990 return (vector
signed int)*__addr;
17994vec_load_splats(
unsigned long long __offset,
const signed int *__ptr) {
17995 signed int *__addr = (
signed int*)((
signed char *)__ptr + __offset);
17996 return (vector
signed int)*__addr;
18000vec_load_splats(
signed long long __offset,
const unsigned int *__ptr) {
18001 unsigned int *__addr = (
unsigned int*)((
signed char *)__ptr + __offset);
18002 return (vector
unsigned int)*__addr;
18006vec_load_splats(
unsigned long long __offset,
const unsigned int *__ptr) {
18007 unsigned int *__addr = (
unsigned int*)((
signed char *)__ptr + __offset);
18008 return (vector
unsigned int)*__addr;
18012vec_load_splats(
signed long long __offset,
const float *__ptr) {
18013 float *__addr = (
float*)((
signed char *)__ptr + __offset);
18014 return (vector
float)*__addr;
18018vec_load_splats(
unsigned long long __offset,
const float *__ptr) {
18019 float *__addr = (
float*)((
signed char *)__ptr + __offset);
18020 return (vector
float)*__addr;
18026#define vec_xstd2 vec_xst
18027#define vec_xstw4 vec_xst
18030 *(unaligned_vec_schar *)(__ptr + __offset) = __vec;
18035 *(unaligned_vec_uchar *)(__ptr + __offset) = __vec;
18040 signed char *__addr = (
signed char *)__ptr + __offset;
18041 *(unaligned_vec_sshort *)__addr = __vec;
18046 unsigned short *__ptr) {
18047 signed char *__addr = (
signed char *)__ptr + __offset;
18048 *(unaligned_vec_ushort *)__addr = __vec;
18053 signed char *__addr = (
signed char *)__ptr + __offset;
18054 *(unaligned_vec_sint *)__addr = __vec;
18059 signed char *__addr = (
signed char *)__ptr + __offset;
18060 *(unaligned_vec_uint *)__addr = __vec;
18065 signed char *__addr = (
signed char *)__ptr + __offset;
18066 *(unaligned_vec_float *)__addr = __vec;
18072 signed long long *__ptr) {
18073 signed char *__addr = (
signed char *)__ptr + __offset;
18074 *(unaligned_vec_sll *)__addr = __vec;
18079 unsigned long long *__ptr) {
18080 signed char *__addr = (
signed char *)__ptr + __offset;
18081 *(unaligned_vec_ull *)__addr = __vec;
18086 signed char *__addr = (
signed char *)__ptr + __offset;
18087 *(unaligned_vec_double *)__addr = __vec;
18091#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
18092 defined(__SIZEOF_INT128__)
18095 signed __int128 *__ptr) {
18096 signed char *__addr = (
signed char *)__ptr + __offset;
18097 *(unaligned_vec_si128 *)__addr = __vec;
18102 unsigned __int128 *__ptr) {
18103 signed char *__addr = (
signed char *)__ptr + __offset;
18104 *(unaligned_vec_ui128 *)__addr = __vec;
18110#if defined(__POWER10_VECTOR__) && defined(__VSX__) && \
18111 defined(__SIZEOF_INT128__)
18112static __inline__
__ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18114 signed char *__ptr) {
18115 *(__ptr + __offset) = (
signed char)__vec[0];
18119vec_xst_trunc(vector
unsigned __int128 __vec,
ptrdiff_t __offset,
18120 unsigned char *__ptr) {
18121 *(__ptr + __offset) = (
unsigned char)__vec[0];
18124static __inline__
__ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18126 signed short *__ptr) {
18127 *(__ptr + __offset) = (
signed short)__vec[0];
18131vec_xst_trunc(vector
unsigned __int128 __vec,
ptrdiff_t __offset,
18132 unsigned short *__ptr) {
18133 *(__ptr + __offset) = (
unsigned short)__vec[0];
18136static __inline__
__ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18138 signed int *__ptr) {
18139 *(__ptr + __offset) = (
signed int)__vec[0];
18143vec_xst_trunc(vector
unsigned __int128 __vec,
ptrdiff_t __offset,
18144 unsigned int *__ptr) {
18145 *(__ptr + __offset) = (
unsigned int)__vec[0];
18148static __inline__
__ATTRS_o_ai void vec_xst_trunc(vector
signed __int128 __vec,
18150 signed long long *__ptr) {
18151 *(__ptr + __offset) = (
signed long long)__vec[0];
18155vec_xst_trunc(vector
unsigned __int128 __vec,
ptrdiff_t __offset,
18156 unsigned long long *__ptr) {
18157 *(__ptr + __offset) = (
unsigned long long)__vec[0];
18163#ifdef __LITTLE_ENDIAN__
18166 signed long long __offset,
18167 signed char *__ptr) {
18168 vector
signed char __tmp =
18169 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
18170 13, 12, 11, 10, 9, 8);
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 char *__ptr) {
18178 vector
unsigned char __tmp =
18179 __builtin_shufflevector(__vec, __vec, 7, 6, 5, 4, 3, 2, 1, 0, 15, 14,
18180 13, 12, 11, 10, 9, 8);
18181 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18182 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18186 signed long long __offset,
18187 signed short *__ptr) {
18188 vector
signed short __tmp =
18189 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
18190 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18191 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18195 signed long long __offset,
18196 unsigned short *__ptr) {
18197 vector
unsigned short __tmp =
18198 __builtin_shufflevector(__vec, __vec, 3, 2, 1, 0, 7, 6, 5, 4);
18199 typedef __attribute__((vector_size(
sizeof(__tmp))))
double __vector_double;
18200 __builtin_vsx_stxvd2x_be((__vector_double)__tmp, __offset, __ptr);
18204 signed long long __offset,
18205 signed int *__ptr) {
18206 __builtin_vsx_stxvw4x_be(__vec, __offset, __ptr);
18210 signed long long __offset,
18211 unsigned int *__ptr) {
18212 __builtin_vsx_stxvw4x_be((vector
int)__vec, __offset, __ptr);
18216 signed long long __offset,
18218 __builtin_vsx_stxvw4x_be((vector
int)__vec, __offset, __ptr);
18222 signed long long __offset,
18223 signed long long *__ptr) {
18224 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18228 signed long long __offset,
18229 unsigned long long *__ptr) {
18230 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18234 signed long long __offset,
18236 __builtin_vsx_stxvd2x_be((vector
double)__vec, __offset, __ptr);
18239#if defined(__POWER8_VECTOR__) && defined(__powerpc64__) && \
18240 defined(__SIZEOF_INT128__)
18242 signed long long __offset,
18243 signed __int128 *__ptr) {
18244 vec_xst(__vec, __offset, __ptr);
18248 signed long long __offset,
18249 unsigned __int128 *__ptr) {
18250 vec_xst(__vec, __offset, __ptr);
18255#define vec_xst_be vec_xst
18258#ifdef __POWER9_VECTOR__
18259#define vec_test_data_class(__a, __b) \
18261 (__a), vector float \
18262 : (vector bool int)__builtin_vsx_xvtstdcsp((vector float)(__a), (__b)), \
18264 : (vector bool long long)__builtin_vsx_xvtstdcdp((vector double)(__a), \
18309#ifdef __POWER8_VECTOR__
18311 return __builtin_altivec_vminsd(
__a, -
__a);
18316 return __builtin_altivec_vminsw(
__a, -
__a);
18320 return __builtin_altivec_vminsh(
__a, -
__a);
18324 return __builtin_altivec_vminsb(
__a, -
__a);
18328 vector
float __b) {
18329 return __builtin_ppc_recipdivf(
__a,
__b);
18334 vector
double __b) {
18335 return __builtin_ppc_recipdivd(
__a,
__b);
18339#ifdef __POWER10_VECTOR__
18344vec_extractm(vector
unsigned char __a) {
18345 return __builtin_altivec_vextractbm(
__a);
18349vec_extractm(vector
unsigned short __a) {
18350 return __builtin_altivec_vextracthm(
__a);
18354vec_extractm(vector
unsigned int __a) {
18355 return __builtin_altivec_vextractwm(
__a);
18359vec_extractm(vector
unsigned long long __a) {
18360 return __builtin_altivec_vextractdm(
__a);
18363#ifdef __SIZEOF_INT128__
18365vec_extractm(vector
unsigned __int128
__a) {
18366 return __builtin_altivec_vextractqm(
__a);
18373vec_expandm(vector
unsigned char __a) {
18374 return __builtin_altivec_vexpandbm(
__a);
18378vec_expandm(vector
unsigned short __a) {
18379 return __builtin_altivec_vexpandhm(
__a);
18383vec_expandm(vector
unsigned int __a) {
18384 return __builtin_altivec_vexpandwm(
__a);
18387static __inline__ vector
unsigned long long __ATTRS_o_ai
18388vec_expandm(vector
unsigned long long __a) {
18389 return __builtin_altivec_vexpanddm(
__a);
18392#ifdef __SIZEOF_INT128__
18393static __inline__ vector
unsigned __int128
__ATTRS_o_ai
18394vec_expandm(vector
unsigned __int128
__a) {
18395 return __builtin_altivec_vexpandqm(
__a);
18401#define vec_cntm(__a, __mp) \
18402 _Generic((__a), vector unsigned char \
18403 : __builtin_altivec_vcntmbb((vector unsigned char)(__a), \
18404 (unsigned char)(__mp)), \
18405 vector unsigned short \
18406 : __builtin_altivec_vcntmbh((vector unsigned short)(__a), \
18407 (unsigned char)(__mp)), \
18408 vector unsigned int \
18409 : __builtin_altivec_vcntmbw((vector unsigned int)(__a), \
18410 (unsigned char)(__mp)), \
18411 vector unsigned long long \
18412 : __builtin_altivec_vcntmbd((vector unsigned long long)(__a), \
18413 (unsigned char)(__mp)))
18418vec_genbm(
unsigned long long __bm) {
18419 return __builtin_altivec_mtvsrbm(__bm);
18423vec_genhm(
unsigned long long __bm) {
18424 return __builtin_altivec_mtvsrhm(__bm);
18428vec_genwm(
unsigned long long __bm) {
18429 return __builtin_altivec_mtvsrwm(__bm);
18432static __inline__ vector
unsigned long long __ATTRS_o_ai
18433vec_gendm(
unsigned long long __bm) {
18434 return __builtin_altivec_mtvsrdm(__bm);
18437#ifdef __SIZEOF_INT128__
18438static __inline__ vector
unsigned __int128
__ATTRS_o_ai
18439vec_genqm(
unsigned long long __bm) {
18440 return __builtin_altivec_mtvsrqm(__bm);
18446static __inline__ vector
unsigned long long __ATTRS_o_ai
18447vec_pdep(vector
unsigned long long __a, vector
unsigned long long __b) {
18448 return __builtin_altivec_vpdepd(
__a,
__b);
18453static __inline__ vector
unsigned long long __ATTRS_o_ai
18454vec_pext(vector
unsigned long long __a, vector
unsigned long long __b) {
18455 return __builtin_altivec_vpextd(
__a,
__b);
18460static __inline__ vector
unsigned long long __ATTRS_o_ai
18461vec_cfuge(vector
unsigned long long __a, vector
unsigned long long __b) {
18462 return __builtin_altivec_vcfuged(
__a,
__b);
18467#define vec_gnb(__a, __b) __builtin_altivec_vgnb(__a, __b)
18471#ifdef __SIZEOF_INT128__
18472#define vec_ternarylogic(__a, __b, __c, __imm) \
18473 _Generic((__a), vector unsigned char \
18474 : (vector unsigned char)__builtin_vsx_xxeval( \
18475 (vector unsigned long long)(__a), \
18476 (vector unsigned long long)(__b), \
18477 (vector unsigned long long)(__c), (__imm)), \
18478 vector unsigned short \
18479 : (vector unsigned short)__builtin_vsx_xxeval( \
18480 (vector unsigned long long)(__a), \
18481 (vector unsigned long long)(__b), \
18482 (vector unsigned long long)(__c), (__imm)), \
18483 vector unsigned int \
18484 : (vector unsigned int)__builtin_vsx_xxeval( \
18485 (vector unsigned long long)(__a), \
18486 (vector unsigned long long)(__b), \
18487 (vector unsigned long long)(__c), (__imm)), \
18488 vector unsigned long long \
18489 : (vector unsigned long long)__builtin_vsx_xxeval( \
18490 (vector unsigned long long)(__a), \
18491 (vector unsigned long long)(__b), \
18492 (vector unsigned long long)(__c), (__imm)), \
18493 vector unsigned __int128 \
18494 : (vector unsigned __int128)__builtin_vsx_xxeval( \
18495 (vector unsigned long long)(__a), \
18496 (vector unsigned long long)(__b), \
18497 (vector unsigned long long)(__c), (__imm)))
18499#define vec_ternarylogic(__a, __b, __c, __imm) \
18500 _Generic((__a), vector unsigned char \
18501 : (vector unsigned char)__builtin_vsx_xxeval( \
18502 (vector unsigned long long)(__a), \
18503 (vector unsigned long long)(__b), \
18504 (vector unsigned long long)(__c), (__imm)), \
18505 vector unsigned short \
18506 : (vector unsigned short)__builtin_vsx_xxeval( \
18507 (vector unsigned long long)(__a), \
18508 (vector unsigned long long)(__b), \
18509 (vector unsigned long long)(__c), (__imm)), \
18510 vector unsigned int \
18511 : (vector unsigned int)__builtin_vsx_xxeval( \
18512 (vector unsigned long long)(__a), \
18513 (vector unsigned long long)(__b), \
18514 (vector unsigned long long)(__c), (__imm)), \
18515 vector unsigned long long \
18516 : (vector unsigned long long)__builtin_vsx_xxeval( \
18517 (vector unsigned long long)(__a), \
18518 (vector unsigned long long)(__b), \
18519 (vector unsigned long long)(__c), (__imm)))
18526#define vec_genpcvm(__a, __imm) \
18528 (__a), vector unsigned char \
18529 : __builtin_vsx_xxgenpcvbm((vector unsigned char)(__a), (int)(__imm)), \
18530 vector unsigned short \
18531 : __builtin_vsx_xxgenpcvhm((vector unsigned short)(__a), (int)(__imm)), \
18532 vector unsigned int \
18533 : __builtin_vsx_xxgenpcvwm((vector unsigned int)(__a), (int)(__imm)), \
18534 vector unsigned long long \
18535 : __builtin_vsx_xxgenpcvdm((vector unsigned long long)(__a), \
18542vec_clr_first(vector
signed char __a,
unsigned int __n) {
18543#ifdef __LITTLE_ENDIAN__
18544 return (vector
signed char)__builtin_altivec_vclrrb((vector
unsigned char)
__a,
18547 return (vector
signed char)__builtin_altivec_vclrlb((vector
unsigned char)
__a,
18553vec_clr_first(vector
unsigned char __a,
unsigned int __n) {
18554#ifdef __LITTLE_ENDIAN__
18555 return (vector
unsigned char)__builtin_altivec_vclrrb(
18556 (vector
unsigned char)
__a, __n);
18558 return (vector
unsigned char)__builtin_altivec_vclrlb(
18559 (vector
unsigned char)
__a, __n);
18566vec_clr_last(vector
signed char __a,
unsigned int __n) {
18567#ifdef __LITTLE_ENDIAN__
18568 return (vector
signed char)__builtin_altivec_vclrlb((vector
unsigned char)
__a,
18571 return (vector
signed char)__builtin_altivec_vclrrb((vector
unsigned char)
__a,
18577vec_clr_last(vector
unsigned char __a,
unsigned int __n) {
18578#ifdef __LITTLE_ENDIAN__
18579 return (vector
unsigned char)__builtin_altivec_vclrlb(
18580 (vector
unsigned char)
__a, __n);
18582 return (vector
unsigned char)__builtin_altivec_vclrrb(
18583 (vector
unsigned char)
__a, __n);
18589static __inline__ vector
unsigned long long __ATTRS_o_ai
18590vec_cntlzm(vector
unsigned long long __a, vector
unsigned long long __b) {
18591 return __builtin_altivec_vclzdm(
__a,
__b);
18596static __inline__ vector
unsigned long long __ATTRS_o_ai
18597vec_cnttzm(vector
unsigned long long __a, vector
unsigned long long __b) {
18598 return __builtin_altivec_vctzdm(
__a,
__b);
18604vec_mod(vector
signed int __a, vector
signed int __b) {
18609vec_mod(vector
unsigned int __a, vector
unsigned int __b) {
18614vec_mod(vector
signed long long __a, vector
signed long long __b) {
18618static __inline__ vector
unsigned long long __ATTRS_o_ai
18619vec_mod(vector
unsigned long long __a, vector
unsigned long long __b) {
18623#ifdef __SIZEOF_INT128__
18625vec_mod(vector
signed __int128
__a, vector
signed __int128
__b) {
18629static __inline__ vector
unsigned __int128
__ATTRS_o_ai
18630vec_mod(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
18636#define vec_sldb(__a, __b, __c) \
18638 (__a), vector unsigned char \
18639 : (vector unsigned char)__builtin_altivec_vsldbi( \
18640 (vector unsigned char)__a, (vector unsigned char)__b, \
18642 vector signed char \
18643 : (vector signed char)__builtin_altivec_vsldbi( \
18644 (vector unsigned char)__a, (vector unsigned char)__b, \
18646 vector unsigned short \
18647 : (vector unsigned short)__builtin_altivec_vsldbi( \
18648 (vector unsigned char)__a, (vector unsigned char)__b, \
18650 vector signed short \
18651 : (vector signed short)__builtin_altivec_vsldbi( \
18652 (vector unsigned char)__a, (vector unsigned char)__b, \
18654 vector unsigned int \
18655 : (vector unsigned int)__builtin_altivec_vsldbi( \
18656 (vector unsigned char)__a, (vector unsigned char)__b, \
18658 vector signed int \
18659 : (vector signed int)__builtin_altivec_vsldbi((vector unsigned char)__a, \
18660 (vector unsigned char)__b, \
18662 vector unsigned long long \
18663 : (vector unsigned long long)__builtin_altivec_vsldbi( \
18664 (vector unsigned char)__a, (vector unsigned char)__b, \
18666 vector signed long long \
18667 : (vector signed long long)__builtin_altivec_vsldbi( \
18668 (vector unsigned char)__a, (vector unsigned char)__b, (__c & 0x7)))
18671#define vec_srdb(__a, __b, __c) \
18673 (__a), vector unsigned char \
18674 : (vector unsigned char)__builtin_altivec_vsrdbi( \
18675 (vector unsigned char)__a, (vector unsigned char)__b, \
18677 vector signed char \
18678 : (vector signed char)__builtin_altivec_vsrdbi( \
18679 (vector unsigned char)__a, (vector unsigned char)__b, \
18681 vector unsigned short \
18682 : (vector unsigned short)__builtin_altivec_vsrdbi( \
18683 (vector unsigned char)__a, (vector unsigned char)__b, \
18685 vector signed short \
18686 : (vector signed short)__builtin_altivec_vsrdbi( \
18687 (vector unsigned char)__a, (vector unsigned char)__b, \
18689 vector unsigned int \
18690 : (vector unsigned int)__builtin_altivec_vsrdbi( \
18691 (vector unsigned char)__a, (vector unsigned char)__b, \
18693 vector signed int \
18694 : (vector signed int)__builtin_altivec_vsrdbi((vector unsigned char)__a, \
18695 (vector unsigned char)__b, \
18697 vector unsigned long long \
18698 : (vector unsigned long long)__builtin_altivec_vsrdbi( \
18699 (vector unsigned char)__a, (vector unsigned char)__b, \
18701 vector signed long long \
18702 : (vector signed long long)__builtin_altivec_vsrdbi( \
18703 (vector unsigned char)__a, (vector unsigned char)__b, (__c & 0x7)))
18708vec_insertl(
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18709#ifdef __LITTLE_ENDIAN__
18710 return __builtin_altivec_vinsbrx(
__b,
__c,
__a);
18712 return __builtin_altivec_vinsblx(
__b,
__c,
__a);
18717vec_insertl(
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18718#ifdef __LITTLE_ENDIAN__
18719 return __builtin_altivec_vinshrx(
__b,
__c,
__a);
18721 return __builtin_altivec_vinshlx(
__b,
__c,
__a);
18726vec_insertl(
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18727#ifdef __LITTLE_ENDIAN__
18728 return __builtin_altivec_vinswrx(
__b,
__c,
__a);
18730 return __builtin_altivec_vinswlx(
__b,
__c,
__a);
18734static __inline__ vector
unsigned long long __ATTRS_o_ai
18735vec_insertl(
unsigned long long __a, vector
unsigned long long __b,
18736 unsigned int __c) {
18737#ifdef __LITTLE_ENDIAN__
18738 return __builtin_altivec_vinsdrx(
__b,
__c,
__a);
18740 return __builtin_altivec_vinsdlx(
__b,
__c,
__a);
18745vec_insertl(vector
unsigned char __a, vector
unsigned char __b,
18746 unsigned int __c) {
18747#ifdef __LITTLE_ENDIAN__
18748 return __builtin_altivec_vinsbvrx(
__b,
__c,
__a);
18750 return __builtin_altivec_vinsbvlx(
__b,
__c,
__a);
18755vec_insertl(vector
unsigned short __a, vector
unsigned short __b,
18756 unsigned int __c) {
18757#ifdef __LITTLE_ENDIAN__
18758 return __builtin_altivec_vinshvrx(
__b,
__c,
__a);
18760 return __builtin_altivec_vinshvlx(
__b,
__c,
__a);
18765vec_insertl(vector
unsigned int __a, vector
unsigned int __b,
18766 unsigned int __c) {
18767#ifdef __LITTLE_ENDIAN__
18768 return __builtin_altivec_vinswvrx(
__b,
__c,
__a);
18770 return __builtin_altivec_vinswvlx(
__b,
__c,
__a);
18777vec_inserth(
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18778#ifdef __LITTLE_ENDIAN__
18779 return __builtin_altivec_vinsblx(
__b,
__c,
__a);
18781 return __builtin_altivec_vinsbrx(
__b,
__c,
__a);
18786vec_inserth(
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18787#ifdef __LITTLE_ENDIAN__
18788 return __builtin_altivec_vinshlx(
__b,
__c,
__a);
18790 return __builtin_altivec_vinshrx(
__b,
__c,
__a);
18795vec_inserth(
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18796#ifdef __LITTLE_ENDIAN__
18797 return __builtin_altivec_vinswlx(
__b,
__c,
__a);
18799 return __builtin_altivec_vinswrx(
__b,
__c,
__a);
18803static __inline__ vector
unsigned long long __ATTRS_o_ai
18804vec_inserth(
unsigned long long __a, vector
unsigned long long __b,
18805 unsigned int __c) {
18806#ifdef __LITTLE_ENDIAN__
18807 return __builtin_altivec_vinsdlx(
__b,
__c,
__a);
18809 return __builtin_altivec_vinsdrx(
__b,
__c,
__a);
18814vec_inserth(vector
unsigned char __a, vector
unsigned char __b,
18815 unsigned int __c) {
18816#ifdef __LITTLE_ENDIAN__
18817 return __builtin_altivec_vinsbvlx(
__b,
__c,
__a);
18819 return __builtin_altivec_vinsbvrx(
__b,
__c,
__a);
18824vec_inserth(vector
unsigned short __a, vector
unsigned short __b,
18825 unsigned int __c) {
18826#ifdef __LITTLE_ENDIAN__
18827 return __builtin_altivec_vinshvlx(
__b,
__c,
__a);
18829 return __builtin_altivec_vinshvrx(
__b,
__c,
__a);
18834vec_inserth(vector
unsigned int __a, vector
unsigned int __b,
18835 unsigned int __c) {
18836#ifdef __LITTLE_ENDIAN__
18837 return __builtin_altivec_vinswvlx(
__b,
__c,
__a);
18839 return __builtin_altivec_vinswvrx(
__b,
__c,
__a);
18845static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extractl(
18846 vector
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18847#ifdef __LITTLE_ENDIAN__
18848 return __builtin_altivec_vextdubvrx(
__a,
__b,
__c);
18850 vector
unsigned long long __ret = __builtin_altivec_vextdubvlx(
__a,
__b,
__c);
18851 return vec_sld(__ret, __ret, 8);
18855static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extractl(
18856 vector
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18857#ifdef __LITTLE_ENDIAN__
18858 return __builtin_altivec_vextduhvrx(
__a,
__b,
__c);
18860 vector
unsigned long long __ret = __builtin_altivec_vextduhvlx(
__a,
__b,
__c);
18861 return vec_sld(__ret, __ret, 8);
18865static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extractl(
18866 vector
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18867#ifdef __LITTLE_ENDIAN__
18868 return __builtin_altivec_vextduwvrx(
__a,
__b,
__c);
18870 vector
unsigned long long __ret = __builtin_altivec_vextduwvlx(
__a,
__b,
__c);
18871 return vec_sld(__ret, __ret, 8);
18875static __inline__ vector
unsigned long long __ATTRS_o_ai
18876vec_extractl(vector
unsigned long long __a, vector
unsigned long long __b,
18877 unsigned int __c) {
18878#ifdef __LITTLE_ENDIAN__
18879 return __builtin_altivec_vextddvrx(
__a,
__b,
__c);
18881 vector
unsigned long long __ret = __builtin_altivec_vextddvlx(
__a,
__b,
__c);
18882 return vec_sld(__ret, __ret, 8);
18888static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extracth(
18889 vector
unsigned char __a, vector
unsigned char __b,
unsigned int __c) {
18890#ifdef __LITTLE_ENDIAN__
18891 return __builtin_altivec_vextdubvlx(
__a,
__b,
__c);
18893 vector
unsigned long long __ret = __builtin_altivec_vextdubvrx(
__a,
__b,
__c);
18894 return vec_sld(__ret, __ret, 8);
18898static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extracth(
18899 vector
unsigned short __a, vector
unsigned short __b,
unsigned int __c) {
18900#ifdef __LITTLE_ENDIAN__
18901 return __builtin_altivec_vextduhvlx(
__a,
__b,
__c);
18903 vector
unsigned long long __ret = __builtin_altivec_vextduhvrx(
__a,
__b,
__c);
18904 return vec_sld(__ret, __ret, 8);
18908static __inline__ vector
unsigned long long __ATTRS_o_ai vec_extracth(
18909 vector
unsigned int __a, vector
unsigned int __b,
unsigned int __c) {
18910#ifdef __LITTLE_ENDIAN__
18911 return __builtin_altivec_vextduwvlx(
__a,
__b,
__c);
18913 vector
unsigned long long __ret = __builtin_altivec_vextduwvrx(
__a,
__b,
__c);
18914 return vec_sld(__ret, __ret, 8);
18918static __inline__ vector
unsigned long long __ATTRS_o_ai
18919vec_extracth(vector
unsigned long long __a, vector
unsigned long long __b,
18920 unsigned int __c) {
18921#ifdef __LITTLE_ENDIAN__
18922 return __builtin_altivec_vextddvlx(
__a,
__b,
__c);
18924 vector
unsigned long long __ret = __builtin_altivec_vextddvrx(
__a,
__b,
__c);
18925 return vec_sld(__ret, __ret, 8);
18932#define vec_permx(__a, __b, __c, __d) \
18934 (__a), vector unsigned char \
18935 : (vector unsigned char)__builtin_vsx_xxpermx( \
18936 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18937 vector signed char \
18938 : (vector signed char)__builtin_vsx_xxpermx( \
18939 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18940 vector unsigned short \
18941 : (vector unsigned short)__builtin_vsx_xxpermx( \
18942 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18943 vector signed short \
18944 : (vector signed short)__builtin_vsx_xxpermx( \
18945 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18946 vector unsigned int \
18947 : (vector unsigned int)__builtin_vsx_xxpermx( \
18948 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18949 vector signed int \
18950 : (vector signed int)__builtin_vsx_xxpermx( \
18951 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18952 vector unsigned long long \
18953 : (vector unsigned long long)__builtin_vsx_xxpermx( \
18954 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18955 vector signed long long \
18956 : (vector signed long long)__builtin_vsx_xxpermx( \
18957 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18959 : (vector float)__builtin_vsx_xxpermx( \
18960 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d), \
18962 : (vector double)__builtin_vsx_xxpermx( \
18963 (vector unsigned char)__a, (vector unsigned char)__b, __c, __d))
18968vec_blendv(vector
signed char __a, vector
signed char __b,
18969 vector
unsigned char __c) {
18970 return (vector
signed char)__builtin_vsx_xxblendvb(
18971 (vector
unsigned char)
__a, (vector
unsigned char)
__b,
__c);
18975vec_blendv(vector
unsigned char __a, vector
unsigned char __b,
18976 vector
unsigned char __c) {
18977 return __builtin_vsx_xxblendvb(
__a,
__b,
__c);
18981vec_blendv(vector
signed short __a, vector
signed short __b,
18982 vector
unsigned short __c) {
18983 return (vector
signed short)__builtin_vsx_xxblendvh(
18984 (vector
unsigned short)
__a, (vector
unsigned short)
__b,
__c);
18988vec_blendv(vector
unsigned short __a, vector
unsigned short __b,
18989 vector
unsigned short __c) {
18990 return __builtin_vsx_xxblendvh(
__a,
__b,
__c);
18994vec_blendv(vector
signed int __a, vector
signed int __b,
18995 vector
unsigned int __c) {
18996 return (vector
signed int)__builtin_vsx_xxblendvw(
18997 (vector
unsigned int)
__a, (vector
unsigned int)
__b,
__c);
19001vec_blendv(vector
unsigned int __a, vector
unsigned int __b,
19002 vector
unsigned int __c) {
19003 return __builtin_vsx_xxblendvw(
__a,
__b,
__c);
19007vec_blendv(vector
signed long long __a, vector
signed long long __b,
19008 vector
unsigned long long __c) {
19009 return (vector
signed long long)__builtin_vsx_xxblendvd(
19010 (vector
unsigned long long)
__a, (vector
unsigned long long)
__b,
__c);
19013static __inline__ vector
unsigned long long __ATTRS_o_ai
19014vec_blendv(vector
unsigned long long __a, vector
unsigned long long __b,
19015 vector
unsigned long long __c) {
19016 return (vector
unsigned long long)__builtin_vsx_xxblendvd(
__a,
__b,
__c);
19020vec_blendv(vector
float __a, vector
float __b, vector
unsigned int __c) {
19021 return (vector
float)__builtin_vsx_xxblendvw((vector
unsigned int)
__a,
19022 (vector
unsigned int)
__b,
__c);
19026vec_blendv(vector
double __a, vector
double __b,
19027 vector
unsigned long long __c) {
19028 return (vector
double)__builtin_vsx_xxblendvd(
19029 (vector
unsigned long long)
__a, (vector
unsigned long long)
__b,
__c);
19032#define vec_replace_unaligned(__a, __b, __c) \
19033 _Generic((__a), vector signed int \
19034 : __builtin_altivec_vinsw((vector unsigned char)__a, \
19035 (unsigned int)__b, __c), \
19036 vector unsigned int \
19037 : __builtin_altivec_vinsw((vector unsigned char)__a, \
19038 (unsigned int)__b, __c), \
19039 vector unsigned long long \
19040 : __builtin_altivec_vinsd((vector unsigned char)__a, \
19041 (unsigned long long)__b, __c), \
19042 vector signed long long \
19043 : __builtin_altivec_vinsd((vector unsigned char)__a, \
19044 (unsigned long long)__b, __c), \
19046 : __builtin_altivec_vinsw((vector unsigned char)__a, \
19047 (unsigned int)__b, __c), \
19049 : __builtin_altivec_vinsd((vector unsigned char)__a, \
19050 (unsigned long long)__b, __c))
19052#define vec_replace_elt(__a, __b, __c) \
19053 _Generic((__a), vector signed int \
19054 : (vector signed int)__builtin_altivec_vinsw_elt( \
19055 (vector unsigned char)__a, (unsigned int)__b, __c), \
19056 vector unsigned int \
19057 : (vector unsigned int)__builtin_altivec_vinsw_elt( \
19058 (vector unsigned char)__a, (unsigned int)__b, __c), \
19059 vector unsigned long long \
19060 : (vector unsigned long long)__builtin_altivec_vinsd_elt( \
19061 (vector unsigned char)__a, (unsigned long long)__b, __c), \
19062 vector signed long long \
19063 : (vector signed long long)__builtin_altivec_vinsd_elt( \
19064 (vector unsigned char)__a, (unsigned long long)__b, __c), \
19066 : (vector float)__builtin_altivec_vinsw_elt( \
19067 (vector unsigned char)__a, (unsigned int)__b, __c), \
19069 : (vector double)__builtin_altivec_vinsd_elt( \
19070 (vector unsigned char)__a, (unsigned long long)__b, __c))
19074#define vec_splati(__a) \
19075 _Generic((__a), signed int \
19076 : ((vector signed int)__a), unsigned int \
19077 : ((vector unsigned int)__a), float \
19078 : ((vector float)__a))
19082static __inline__ vector
double __ATTRS_o_ai vec_splatid(
const float __a) {
19083 return ((vector
double)((
double)
__a));
19088static __inline__ vector
signed int __ATTRS_o_ai vec_splati_ins(
19089 vector
signed int __a,
const unsigned int __b,
const signed int __c) {
19090 const unsigned int __d =
__b & 0x01;
19091#ifdef __LITTLE_ENDIAN__
19101static __inline__ vector
unsigned int __ATTRS_o_ai vec_splati_ins(
19102 vector
unsigned int __a,
const unsigned int __b,
const unsigned int __c) {
19103 const unsigned int __d =
__b & 0x01;
19104#ifdef __LITTLE_ENDIAN__
19115vec_splati_ins(vector
float __a,
const unsigned int __b,
const float __c) {
19116 const unsigned int __d =
__b & 0x01;
19117#ifdef __LITTLE_ENDIAN__
19130vec_test_lsbb_all_ones(vector
unsigned char __a) {
19131 return __builtin_vsx_xvtlsbb(
__a, 1);
19137vec_test_lsbb_all_zeros(vector
unsigned char __a) {
19138 return __builtin_vsx_xvtlsbb(
__a, 0);
19145vec_stril(vector
unsigned char __a) {
19146#ifdef __LITTLE_ENDIAN__
19147 return (vector
unsigned char)__builtin_altivec_vstribr(
19148 (vector
unsigned char)
__a);
19150 return (vector
unsigned char)__builtin_altivec_vstribl(
19151 (vector
unsigned char)
__a);
19156vec_stril(vector
signed char __a) {
19157#ifdef __LITTLE_ENDIAN__
19158 return (vector
signed char)__builtin_altivec_vstribr(
19159 (vector
unsigned char)
__a);
19161 return (vector
signed char)__builtin_altivec_vstribl(
19162 (vector
unsigned char)
__a);
19167vec_stril(vector
unsigned short __a) {
19168#ifdef __LITTLE_ENDIAN__
19169 return (vector
unsigned short)__builtin_altivec_vstrihr(
19170 (vector
signed short)
__a);
19172 return (vector
unsigned short)__builtin_altivec_vstrihl(
19173 (vector
signed short)
__a);
19178vec_stril(vector
signed short __a) {
19179#ifdef __LITTLE_ENDIAN__
19180 return __builtin_altivec_vstrihr(
__a);
19182 return __builtin_altivec_vstrihl(
__a);
19188static __inline__
int __ATTRS_o_ai vec_stril_p(vector
unsigned char __a) {
19189#ifdef __LITTLE_ENDIAN__
19190 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19192 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19196static __inline__
int __ATTRS_o_ai vec_stril_p(vector
signed char __a) {
19197#ifdef __LITTLE_ENDIAN__
19198 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19200 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19204static __inline__
int __ATTRS_o_ai vec_stril_p(vector
unsigned short __a) {
19205#ifdef __LITTLE_ENDIAN__
19206 return __builtin_altivec_vstrihr_p(
__CR6_EQ, (vector
signed short)
__a);
19208 return __builtin_altivec_vstrihl_p(
__CR6_EQ, (vector
signed short)
__a);
19212static __inline__
int __ATTRS_o_ai vec_stril_p(vector
signed short __a) {
19213#ifdef __LITTLE_ENDIAN__
19214 return __builtin_altivec_vstrihr_p(
__CR6_EQ,
__a);
19216 return __builtin_altivec_vstrihl_p(
__CR6_EQ,
__a);
19223vec_strir(vector
unsigned char __a) {
19224#ifdef __LITTLE_ENDIAN__
19225 return (vector
unsigned char)__builtin_altivec_vstribl(
19226 (vector
unsigned char)
__a);
19228 return (vector
unsigned char)__builtin_altivec_vstribr(
19229 (vector
unsigned char)
__a);
19234vec_strir(vector
signed char __a) {
19235#ifdef __LITTLE_ENDIAN__
19236 return (vector
signed char)__builtin_altivec_vstribl(
19237 (vector
unsigned char)
__a);
19239 return (vector
signed char)__builtin_altivec_vstribr(
19240 (vector
unsigned char)
__a);
19245vec_strir(vector
unsigned short __a) {
19246#ifdef __LITTLE_ENDIAN__
19247 return (vector
unsigned short)__builtin_altivec_vstrihl(
19248 (vector
signed short)
__a);
19250 return (vector
unsigned short)__builtin_altivec_vstrihr(
19251 (vector
signed short)
__a);
19256vec_strir(vector
signed short __a) {
19257#ifdef __LITTLE_ENDIAN__
19258 return __builtin_altivec_vstrihl(
__a);
19260 return __builtin_altivec_vstrihr(
__a);
19266static __inline__
int __ATTRS_o_ai vec_strir_p(vector
unsigned char __a) {
19267#ifdef __LITTLE_ENDIAN__
19268 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19270 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19274static __inline__
int __ATTRS_o_ai vec_strir_p(vector
signed char __a) {
19275#ifdef __LITTLE_ENDIAN__
19276 return __builtin_altivec_vstribl_p(
__CR6_EQ, (vector
unsigned char)
__a);
19278 return __builtin_altivec_vstribr_p(
__CR6_EQ, (vector
unsigned char)
__a);
19282static __inline__
int __ATTRS_o_ai vec_strir_p(vector
unsigned short __a) {
19283#ifdef __LITTLE_ENDIAN__
19284 return __builtin_altivec_vstrihl_p(
__CR6_EQ, (vector
signed short)
__a);
19286 return __builtin_altivec_vstrihr_p(
__CR6_EQ, (vector
signed short)
__a);
19290static __inline__
int __ATTRS_o_ai vec_strir_p(vector
signed short __a) {
19291#ifdef __LITTLE_ENDIAN__
19292 return __builtin_altivec_vstrihl_p(
__CR6_EQ,
__a);
19294 return __builtin_altivec_vstrihr_p(
__CR6_EQ,
__a);
19300#ifdef __SIZEOF_INT128__
19301static __inline__ vector
unsigned __int128
__ATTRS_o_ai
19302vec_sl(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
19303 return __a << (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19308vec_sl(vector
signed __int128
__a, vector
unsigned __int128
__b) {
19309 return __a << (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19313static __inline__ vector
unsigned __int128
__ATTRS_o_ai
19314vec_sr(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
19315 return __a >> (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19320vec_sr(vector
signed __int128
__a, vector
unsigned __int128
__b) {
19322 vector
signed __int128)(((vector
unsigned __int128)
__a) >>
19324 (vector
unsigned __int128)(
sizeof(
19325 unsigned __int128) *
19329static __inline__ vector
unsigned __int128
__ATTRS_o_ai
19330vec_sra(vector
unsigned __int128
__a, vector
unsigned __int128
__b) {
19332 vector
unsigned __int128)(((vector
signed __int128)
__a) >>
19334 (vector
unsigned __int128)(
sizeof(
19335 unsigned __int128) *
19340vec_sra(vector
signed __int128
__a, vector
unsigned __int128
__b) {
19341 return __a >> (
__b % (vector
unsigned __int128)(
sizeof(
unsigned __int128) *
19348#ifdef __FUTURE_VECTOR__
19353vec_uncompresshn(vector
unsigned char __a, vector
unsigned char __b) {
19354 return __builtin_altivec_vucmprhn(
__a,
__b);
19358vec_uncompressln(vector
unsigned char __a, vector
unsigned char __b) {
19359 return __builtin_altivec_vucmprln(
__a,
__b);
19363vec_uncompresshb(vector
unsigned char __a, vector
unsigned char __b) {
19364 return __builtin_altivec_vucmprhb(
__a,
__b);
19368vec_uncompresslb(vector
unsigned char __a, vector
unsigned char __b) {
19369 return __builtin_altivec_vucmprlb(
__a,
__b);
19373vec_uncompresshh(vector
unsigned char __a, vector
unsigned char __b) {
19374 return __builtin_altivec_vucmprhh(
__a,
__b);
19378vec_uncompresslh(vector
unsigned char __a, vector
unsigned char __b) {
19379 return __builtin_altivec_vucmprlh(
__a,
__b);
19383vec_unpack_hsn_to_byte(vector
unsigned char __a) {
19384 return __builtin_altivec_vupkhsntob(
__a);
19388vec_unpack_lsn_to_byte(vector
unsigned char __a) {
19389 return __builtin_altivec_vupklsntob(
__a);
19392#define vec_unpack_int4_to_bf16(__a, __imm) \
19393 __builtin_altivec_vupkint4tobf16((__a), (__imm))
19395#define vec_unpack_int8_to_bf16(__a, __imm) \
19396 __builtin_altivec_vupkint8tobf16((__a), (__imm))
19398#define vec_unpack_int4_to_fp32(__a, __imm) \
19399 __builtin_altivec_vupkint4tofp32((__a), (__imm))
19401#define vec_unpack_int8_to_fp32(__a, __imm) \
19402 __builtin_altivec_vupkint8tofp32((__a), (__imm))
19406#ifdef __POWER8_VECTOR__
19407#define __bcdadd(__a, __b, __ps) __builtin_ppc_bcdadd((__a), (__b), (__ps))
19408#define __bcdsub(__a, __b, __ps) __builtin_ppc_bcdsub((__a), (__b), (__ps))
19410static __inline__
long __bcdadd_ofl(vector
unsigned char __a,
19411 vector
unsigned char __b) {
19415static __inline__
long __bcdsub_ofl(vector
unsigned char __a,
19416 vector
unsigned char __b) {
19420static __inline__
long __bcd_invalid(vector
unsigned char __a) {
19424static __inline__
long __bcdcmpeq(vector
unsigned char __a,
19425 vector
unsigned char __b) {
19429static __inline__
long __bcdcmplt(vector
unsigned char __a,
19430 vector
unsigned char __b) {
19434static __inline__
long __bcdcmpgt(vector
unsigned char __a,
19435 vector
unsigned char __b) {
19439static __inline__
long __bcdcmple(vector
unsigned char __a,
19440 vector
unsigned char __b) {
19444static __inline__
long __bcdcmpge(vector
unsigned char __a,
19445 vector
unsigned char __b) {
__PTRDIFF_TYPE__ ptrdiff_t
A signed integer type that is the result of subtracting two pointers.
static __inline__ vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector int __b)
static __inline__ vector int __ATTRS_o_ai vec_lvewx(long __a, const int *__b)
static __inline__ vector signed int __ATTRS_o_ai vec_sube(vector signed int __a, vector signed int __b, vector signed int __c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vadduhs(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a, vector signed char __b)
static __inline__ void __ATTRS_o_ai vec_stvx(vector signed char __a, long __b, vector signed char *__c)
static __inline__ vector short __ATTRS_o_ai vec_vmaxsh(vector short __a, vector short __b)
static __inline__ signed char __ATTRS_o_ai vec_extract(vector signed char __a, signed int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sra(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvx(long __a, const vector signed char *__b)
static __inline__ vector int __ATTRS_o_ai vec_vmrghw(vector int __a, vector int __b)
static __inline__ vector short __ATTRS_o_ai vec_vsubshs(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sro(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvrx(int __a, const signed char *__b)
static __inline__ __ATTRS_o_ai vector signed char vec_xl(ptrdiff_t __offset, const signed char *__ptr)
static __inline__ void __ATTRS_o_ai vec_stvehx(vector short __a, long __b, short *__c)
static __inline__ __ATTRS_o_ai void vec_xst(vector signed char __vec, ptrdiff_t __offset, signed char *__ptr)
static __inline__ vector signed char __ATTRS_o_ai vec_abss(vector signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector float __ATTRS_o_ai vec_ceil(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vslb(vector signed char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vsplth(vector short __a, unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vmladduhm(vector short __a, vector short __b, vector short __c)
static __inline__ vector int __ATTRS_o_ai vec_vupkhsh(vector short __a)
static __inline__ int __ATTRS_o_ai vec_any_ngt(vector float __a, vector float __b)
static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lde(long __a, const signed char *__b)
static __inline__ void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b, signed char *__c)
static __inline__ vector int __ATTRS_o_ai vec_vsraw(vector int __a, vector unsigned int __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpne(vector bool char __a, vector bool char __b)
static __inline__ int __ATTRS_o_ai vec_any_nge(vector float __a, vector float __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sldw(vector signed char __a, vector signed char __b, unsigned const int __c)
vector signed char unaligned_vec_schar __attribute__((aligned(1)))
static __inline__ vector short __ATTRS_o_ai vec_vslh(vector short __a, vector unsigned short __b)
static __inline__ __ATTRS_o_ai vector bool char vec_reve(vector bool char __a)
static __inline__ vector float vector float vector float __c
static __inline__ vector short __ATTRS_o_ai vec_vaddshs(vector short __a, vector short __b)
static __inline__ vector int __ATTRS_o_ai vec_msum(vector signed char __a, vector unsigned char __b, vector int __c)
static __inline__ vector short __ATTRS_o_ai vec_mule(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_le(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vspltish(signed char __a)
static __inline__ vector float vector float __b
static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const signed char *__b)
static vector float __ATTRS_o_ai vec_recipdiv(vector float __a, vector float __b)
static __inline__ vector short __ATTRS_o_ai vec_vsubuhm(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_ld(long __a, const vector signed char *__b)
static __inline__ vector float __ATTRS_o_ai vec_round(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vrlb(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed int __ATTRS_o_ai vec_subc(vector signed int __a, vector signed int __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vpkuhum(vector signed short __a, vector signed short __b)
static __inline__ vector signed int __ATTRS_o_ai vec_addc(vector signed int __a, vector signed int __b)
static __inline__ int __ATTRS_o_ai vec_all_le(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vminsh(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_splats(signed char __a)
static __inline__ vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a)
static __inline__ vector bool char __ATTRS_o_ai vec_revb(vector bool char __a)
static __inline__ int __ATTRS_o_ai vec_any_nan(vector float __a)
static __inline__ int __ATTRS_o_ai vec_all_eq(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_andc(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const signed char *__b)
static __inline__ void __ATTRS_o_ai vec_st(vector signed char __a, long __b, vector signed char *__c)
static __inline__ vector signed int __ATTRS_o_ai vec_sld(vector signed int, vector signed int, unsigned const int __c)
static __inline__ vector int __ATTRS_o_ai vec_vsrw(vector int __a, vector unsigned int __b)
static __inline__ vector short __ATTRS_o_ai vec_unpackl(vector signed char __a)
static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_sum4s(vector signed char __a, vector int __b)
static __inline__ void __ATTRS_o_ai vec_mtvscr(vector signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_mul(vector signed char __a, vector signed char __b)
static __inline__ void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b, vector signed char *__c)
static __inline__ vector signed int __ATTRS_o_ai vec_signed(vector float __a)
static __inline__ void __ATTRS_o_ai vec_stl(vector signed char __a, int __b, vector signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_and(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_avg(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a)
static __inline__ int __ATTRS_o_ai vec_all_nan(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vspltisw(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_subs(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vmrglw(vector int __a, vector int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vmrglh(vector short __a, vector short __b)
static __inline__ int __ATTRS_o_ai vec_all_ngt(vector float __a, vector float __b)
static __inline__ vector float __ATTRS_o_ai vec_floor(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_lvlx(int __a, const signed char *__b)
static __inline__ vector short __ATTRS_o_ai vec_vrlh(vector short __a, vector unsigned short __b)
static __inline__ vector int __ATTRS_o_ai vec_vrlw(vector int __a, vector unsigned int __b)
static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_splat_s32(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vmrglb(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_adds(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a, vector signed char __b)
static __inline__ vector signed short __ATTRS_o_ai vec_mladd(vector signed short, vector signed short, vector signed short)
static __inline__ void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_sel(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ vector signed char __ATTRS_o_ai vec_lvxl(long __a, const vector signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_numeric(vector float __a)
static __inline__ vector float __ATTRS_o_ai vec_float(vector signed int __a)
static __inline__ vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_mergeh(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_vupklsh(vector short __a)
static __inline__ vector signed char __ATTRS_o_ai vec_lvebx(long __a, const signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsldoi(vector signed char __a, vector signed char __b, unsigned char __c)
static __inline__ vector signed char __ATTRS_o_ai vec_rl(vector signed char __a, vector unsigned char __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_unsigned(vector float __a)
static __inline__ vector int __ATTRS_o_ai vec_vslw(vector int __a, vector unsigned int __b)
static __inline__ void __ATTRS_o_ai vec_ste(vector signed char __a, long __b, signed char *__c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vpkswus(vector int __a, vector int __b)
static __inline__ vector short __ATTRS_o_ai vec_vsrh(vector short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vmrghb(vector signed char __a, vector signed char __b)
static __inline__ vector float __ATTRS_o_ai vec_roundp(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vnor(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_max(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed char __a, vector signed char __b)
static __inline__ void __ATTRS_o_ai vec_stvewx(vector int __a, long __b, int *__c)
static __inline__ vector signed int __ATTRS_o_ai vec_adde(vector signed int __a, vector signed int __b, vector signed int __c)
static __inline__ vector int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_slo(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_all_numeric(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_nor(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vpkuwum(vector int __a, vector int __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpge(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvlxl(int __a, const signed char *__b)
static __inline__ vector signed char __ATTRS_o_ai vec_pack(vector signed short __a, vector signed short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_ldl(long __a, const vector signed char *__b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_packsu(vector short __a, vector short __b)
static __inline__ vector short __ATTRS_o_ai vec_mulo(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_all_nge(vector float __a, vector float __b)
static __inline__ vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_srl(vector signed char __a, vector unsigned char __b)
static vector float __ATTRS_o_ai vec_rsqrt(vector float __a)
static __inline__ vector float __ATTRS_o_ai vec_re(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_min(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vand(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_splat(vector signed char __a, unsigned const int __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vpkshus(vector short __a, vector short __b)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector signed char __ATTRS_o_ai vec_lvrxl(int __a, const signed char *__b)
static vector float __ATTRS_o_ai vec_neg(vector float __a)
static vector float __ATTRS_o_ai vec_nabs(vector float __a)
static __inline__ vector signed char __ATTRS_o_ai vec_or(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_unpackh(vector signed char __a)
static __inline__ vector short __ATTRS_o_ai vec_vmrghh(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a, vector unsigned char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_sl(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector short __ATTRS_o_ai vec_vadduhm(vector short __a, vector short __b)
static __inline__ vector short __ATTRS_o_ai vec_splat_s16(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_add(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vperm(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ vector short __ATTRS_o_ai vec_lvehx(long __a, const short *__b)
static __inline__ void __ATTRS_o_ai vec_stvebx(vector signed char __a, long __b, signed char *__c)
static __inline__ vector int __ATTRS_o_ai vec_vaddsws(vector int __a, vector int __b)
static __inline__ int __ATTRS_o_ai vec_any_nlt(vector float __a, vector float __b)
static __inline__ void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed char __ATTRS_o_ai vec_abs(vector signed char __a)
static __inline__ void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b, signed char *__c)
static __inline__ vector signed short __ATTRS_o_ai vec_madd(vector signed short __a, vector signed short __b, vector signed short __c)
static __inline__ vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed char __a, vector signed char __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector int __b)
static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed char __a, vector signed char __b)
static __inline__ vector float __ATTRS_o_ai vec_roundm(vector float __a)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a, vector unsigned int __b)
static __inline__ vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector int __b)
static __inline__ vector float __ATTRS_o_ai vec_rsqrte(vector float __a)
static __inline__ int __ATTRS_o_ai vec_all_nle(vector float __a, vector float __b)
static __inline__ vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a, vector unsigned char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_vminuh(vector unsigned short __a, vector unsigned short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vspltb(vector signed char __a, unsigned char __b)
static __inline__ vector float __ATTRS_o_ai vec_trunc(vector float __a)
static __inline__ vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a)
static __inline__ vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_insert(signed char __a, vector signed char __b, int __c)
static __inline__ vector signed char __ATTRS_o_ai vec_sll(vector signed char __a, vector unsigned char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsrb(vector signed char __a, vector unsigned char __b)
static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a, vector signed char __b)
static __inline__ vector bool char __ATTRS_o_ai vec_cmple(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a, vector unsigned char __b)
static __inline__ vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a)
static __inline__ vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector int __b)
static __inline__ int __ATTRS_o_ai vec_all_nlt(vector float __a, vector float __b)
static __inline__ vector signed char __ATTRS_o_ai vec_packs(vector short __a, vector short __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vspltisb(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a, vector signed char __b)
static __inline__ vector signed char __ATTRS_o_ai vec_div(vector signed char __a, vector signed char __b)
static __inline__ vector int __ATTRS_o_ai vec_msums(vector short __a, vector short __b, vector int __c)
static __inline__ vector signed char __ATTRS_o_ai vec_vor(vector signed char __a, vector signed char __b)
static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed char __a, vector signed char __b)
static __inline__ vector float __ATTRS_o_ai vec_roundz(vector float __a)
static __inline__ int __ATTRS_o_ai vec_any_nle(vector float __a, vector float __b)
static __inline__ vector signed char __ATTRS_o_ai vec_sub(vector signed char __a, vector signed char __b)
static __inline__ vector short __ATTRS_o_ai vec_vsrah(vector short __a, vector unsigned short __b)
static __inline__ vector float __ATTRS_o_ai vec_nmsub(vector float __a, vector float __b, vector float __c)
static __inline__ vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a)
static __inline__ vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a, vector unsigned int __b)
static __inline__ void int __a
constexpr bool aligned(uintptr_t Value)