1 /*===---- altivec.h - Standard header for type generic math ---------------===*\
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 \*===----------------------------------------------------------------------===*/
27 #error "AltiVec support not enabled"
30 /* constants for mapping CR6 bits to predicate result. */
33 #define __CR6_EQ_REV 1
35 #define __CR6_LT_REV 3
37 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
39 static vector signed char __ATTRS_o_ai vec_perm(vector signed char __a,
40 vector signed char __b,
41 vector unsigned char __c);
43 static vector unsigned char __ATTRS_o_ai vec_perm(vector unsigned char __a,
44 vector unsigned char __b,
45 vector unsigned char __c);
47 static vector bool char __ATTRS_o_ai vec_perm(vector bool char __a,
49 vector unsigned char __c);
51 static vector short __ATTRS_o_ai vec_perm(vector short __a, vector short __b,
52 vector unsigned char __c);
54 static vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a,
55 vector unsigned short __b,
56 vector unsigned char __c);
58 static vector bool short __ATTRS_o_ai vec_perm(vector bool short __a,
59 vector bool short __b,
60 vector unsigned char __c);
62 static vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b,
63 vector unsigned char __c);
65 static vector int __ATTRS_o_ai vec_perm(vector int __a, vector int __b,
66 vector unsigned char __c);
68 static vector unsigned int __ATTRS_o_ai vec_perm(vector unsigned int __a,
69 vector unsigned int __b,
70 vector unsigned char __c);
72 static vector bool int __ATTRS_o_ai vec_perm(vector bool int __a,
74 vector unsigned char __c);
76 static vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b,
77 vector unsigned char __c);
80 static vector long long __ATTRS_o_ai vec_perm(vector long long __a,
82 vector unsigned char __c);
84 static vector unsigned long long __ATTRS_o_ai
85 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
86 vector unsigned char __c);
88 static vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b,
89 vector unsigned char __c);
92 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
93 vector unsigned char __b);
97 #define __builtin_altivec_abs_v16qi vec_abs
98 #define __builtin_altivec_abs_v8hi vec_abs
99 #define __builtin_altivec_abs_v4si vec_abs
101 static vector signed char __ATTRS_o_ai vec_abs(vector signed char __a) {
102 return __builtin_altivec_vmaxsb(__a, -__a);
105 static vector signed short __ATTRS_o_ai vec_abs(vector signed short __a) {
106 return __builtin_altivec_vmaxsh(__a, -__a);
109 static vector signed int __ATTRS_o_ai vec_abs(vector signed int __a) {
110 return __builtin_altivec_vmaxsw(__a, -__a);
113 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
114 static vector signed long long __ATTRS_o_ai
115 vec_abs(vector signed long long __a) {
116 return __builtin_altivec_vmaxsd(__a, -__a);
120 static vector float __ATTRS_o_ai vec_abs(vector float __a) {
121 vector unsigned int __res =
122 (vector unsigned int)__a & (vector unsigned int)(0x7FFFFFFF);
123 return (vector float)__res;
126 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
127 static vector double __ATTRS_o_ai vec_abs(vector double __a) {
128 vector unsigned long long __res = { 0x7FFFFFFFFFFFFFFF, 0x7FFFFFFFFFFFFFFF };
129 __res &= (vector unsigned int)__a;
130 return (vector double)__res;
135 #define __builtin_altivec_abss_v16qi vec_abss
136 #define __builtin_altivec_abss_v8hi vec_abss
137 #define __builtin_altivec_abss_v4si vec_abss
139 static vector signed char __ATTRS_o_ai vec_abss(vector signed char __a) {
140 return __builtin_altivec_vmaxsb(
141 __a, __builtin_altivec_vsubsbs((vector signed char)(0), __a));
144 static vector signed short __ATTRS_o_ai vec_abss(vector signed short __a) {
145 return __builtin_altivec_vmaxsh(
146 __a, __builtin_altivec_vsubshs((vector signed short)(0), __a));
149 static vector signed int __ATTRS_o_ai vec_abss(vector signed int __a) {
150 return __builtin_altivec_vmaxsw(
151 __a, __builtin_altivec_vsubsws((vector signed int)(0), __a));
156 static vector signed char __ATTRS_o_ai vec_add(vector signed char __a,
157 vector signed char __b) {
161 static vector signed char __ATTRS_o_ai vec_add(vector bool char __a,
162 vector signed char __b) {
163 return (vector signed char)__a + __b;
166 static vector signed char __ATTRS_o_ai vec_add(vector signed char __a,
167 vector bool char __b) {
168 return __a + (vector signed char)__b;
171 static vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a,
172 vector unsigned char __b) {
176 static vector unsigned char __ATTRS_o_ai vec_add(vector bool char __a,
177 vector unsigned char __b) {
178 return (vector unsigned char)__a + __b;
181 static vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a,
182 vector bool char __b) {
183 return __a + (vector unsigned char)__b;
186 static vector short __ATTRS_o_ai vec_add(vector short __a, vector short __b) {
190 static vector short __ATTRS_o_ai vec_add(vector bool short __a,
192 return (vector short)__a + __b;
195 static vector short __ATTRS_o_ai vec_add(vector short __a,
196 vector bool short __b) {
197 return __a + (vector short)__b;
200 static vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a,
201 vector unsigned short __b) {
205 static vector unsigned short __ATTRS_o_ai vec_add(vector bool short __a,
206 vector unsigned short __b) {
207 return (vector unsigned short)__a + __b;
210 static vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a,
211 vector bool short __b) {
212 return __a + (vector unsigned short)__b;
215 static vector int __ATTRS_o_ai vec_add(vector int __a, vector int __b) {
219 static vector int __ATTRS_o_ai vec_add(vector bool int __a, vector int __b) {
220 return (vector int)__a + __b;
223 static vector int __ATTRS_o_ai vec_add(vector int __a, vector bool int __b) {
224 return __a + (vector int)__b;
227 static vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a,
228 vector unsigned int __b) {
232 static vector unsigned int __ATTRS_o_ai vec_add(vector bool int __a,
233 vector unsigned int __b) {
234 return (vector unsigned int)__a + __b;
237 static vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a,
238 vector bool int __b) {
239 return __a + (vector unsigned int)__b;
242 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
243 static vector signed long long __ATTRS_o_ai
244 vec_add(vector signed long long __a, vector signed long long __b) {
248 static vector unsigned long long __ATTRS_o_ai
249 vec_add(vector unsigned long long __a, vector unsigned long long __b) {
253 static vector signed __int128 __ATTRS_o_ai vec_add(vector signed __int128 __a,
254 vector signed __int128 __b) {
258 static vector unsigned __int128 __ATTRS_o_ai
259 vec_add(vector unsigned __int128 __a, vector unsigned __int128 __b) {
262 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
264 static vector float __ATTRS_o_ai vec_add(vector float __a, vector float __b) {
269 static vector double __ATTRS_o_ai
270 vec_add(vector double __a, vector double __b) {
277 #define __builtin_altivec_vaddubm vec_vaddubm
279 static vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a,
280 vector signed char __b) {
284 static vector signed char __ATTRS_o_ai vec_vaddubm(vector bool char __a,
285 vector signed char __b) {
286 return (vector signed char)__a + __b;
289 static vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a,
290 vector bool char __b) {
291 return __a + (vector signed char)__b;
294 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a,
295 vector unsigned char __b) {
299 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector bool char __a,
300 vector unsigned char __b) {
301 return (vector unsigned char)__a + __b;
304 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a,
305 vector bool char __b) {
306 return __a + (vector unsigned char)__b;
311 #define __builtin_altivec_vadduhm vec_vadduhm
313 static vector short __ATTRS_o_ai vec_vadduhm(vector short __a,
318 static vector short __ATTRS_o_ai vec_vadduhm(vector bool short __a,
320 return (vector short)__a + __b;
323 static vector short __ATTRS_o_ai vec_vadduhm(vector short __a,
324 vector bool short __b) {
325 return __a + (vector short)__b;
328 static vector unsigned short __ATTRS_o_ai
329 vec_vadduhm(vector unsigned short __a, vector unsigned short __b) {
333 static vector unsigned short __ATTRS_o_ai
334 vec_vadduhm(vector bool short __a, vector unsigned short __b) {
335 return (vector unsigned short)__a + __b;
338 static vector unsigned short __ATTRS_o_ai vec_vadduhm(vector unsigned short __a,
339 vector bool short __b) {
340 return __a + (vector unsigned short)__b;
345 #define __builtin_altivec_vadduwm vec_vadduwm
347 static vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector int __b) {
351 static vector int __ATTRS_o_ai vec_vadduwm(vector bool int __a,
353 return (vector int)__a + __b;
356 static vector int __ATTRS_o_ai vec_vadduwm(vector int __a,
357 vector bool int __b) {
358 return __a + (vector int)__b;
361 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a,
362 vector unsigned int __b) {
366 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector bool int __a,
367 vector unsigned int __b) {
368 return (vector unsigned int)__a + __b;
371 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a,
372 vector bool int __b) {
373 return __a + (vector unsigned int)__b;
378 #define __builtin_altivec_vaddfp vec_vaddfp
380 static vector float __attribute__((__always_inline__))
381 vec_vaddfp(vector float __a, vector float __b) {
387 static vector unsigned int __ATTRS_o_ai vec_addc(vector unsigned int __a,
388 vector unsigned int __b) {
389 return __builtin_altivec_vaddcuw(__a, __b);
392 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
393 static vector signed __int128 __ATTRS_o_ai
394 vec_addc(vector signed __int128 __a, vector signed __int128 __b) {
395 return __builtin_altivec_vaddcuq(__a, __b);
398 static vector unsigned __int128 __ATTRS_o_ai
399 vec_addc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
400 return __builtin_altivec_vaddcuq(__a, __b);
402 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
406 static vector unsigned int __attribute__((__always_inline__))
407 vec_vaddcuw(vector unsigned int __a, vector unsigned int __b) {
408 return __builtin_altivec_vaddcuw(__a, __b);
413 static vector signed char __ATTRS_o_ai vec_adds(vector signed char __a,
414 vector signed char __b) {
415 return __builtin_altivec_vaddsbs(__a, __b);
418 static vector signed char __ATTRS_o_ai vec_adds(vector bool char __a,
419 vector signed char __b) {
420 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
423 static vector signed char __ATTRS_o_ai vec_adds(vector signed char __a,
424 vector bool char __b) {
425 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
428 static vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a,
429 vector unsigned char __b) {
430 return __builtin_altivec_vaddubs(__a, __b);
433 static vector unsigned char __ATTRS_o_ai vec_adds(vector bool char __a,
434 vector unsigned char __b) {
435 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
438 static vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a,
439 vector bool char __b) {
440 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
443 static vector short __ATTRS_o_ai vec_adds(vector short __a, vector short __b) {
444 return __builtin_altivec_vaddshs(__a, __b);
447 static vector short __ATTRS_o_ai vec_adds(vector bool short __a,
449 return __builtin_altivec_vaddshs((vector short)__a, __b);
452 static vector short __ATTRS_o_ai vec_adds(vector short __a,
453 vector bool short __b) {
454 return __builtin_altivec_vaddshs(__a, (vector short)__b);
457 static vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a,
458 vector unsigned short __b) {
459 return __builtin_altivec_vadduhs(__a, __b);
462 static vector unsigned short __ATTRS_o_ai vec_adds(vector bool short __a,
463 vector unsigned short __b) {
464 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
467 static vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a,
468 vector bool short __b) {
469 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
472 static vector int __ATTRS_o_ai vec_adds(vector int __a, vector int __b) {
473 return __builtin_altivec_vaddsws(__a, __b);
476 static vector int __ATTRS_o_ai vec_adds(vector bool int __a, vector int __b) {
477 return __builtin_altivec_vaddsws((vector int)__a, __b);
480 static vector int __ATTRS_o_ai vec_adds(vector int __a, vector bool int __b) {
481 return __builtin_altivec_vaddsws(__a, (vector int)__b);
484 static vector unsigned int __ATTRS_o_ai vec_adds(vector unsigned int __a,
485 vector unsigned int __b) {
486 return __builtin_altivec_vadduws(__a, __b);
489 static vector unsigned int __ATTRS_o_ai vec_adds(vector bool int __a,
490 vector unsigned int __b) {
491 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
494 static vector unsigned int __ATTRS_o_ai vec_adds(vector unsigned int __a,
495 vector bool int __b) {
496 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
501 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a,
502 vector signed char __b) {
503 return __builtin_altivec_vaddsbs(__a, __b);
506 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector bool char __a,
507 vector signed char __b) {
508 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
511 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a,
512 vector bool char __b) {
513 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
518 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a,
519 vector unsigned char __b) {
520 return __builtin_altivec_vaddubs(__a, __b);
523 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector bool char __a,
524 vector unsigned char __b) {
525 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
528 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a,
529 vector bool char __b) {
530 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
535 static vector short __ATTRS_o_ai vec_vaddshs(vector short __a,
537 return __builtin_altivec_vaddshs(__a, __b);
540 static vector short __ATTRS_o_ai vec_vaddshs(vector bool short __a,
542 return __builtin_altivec_vaddshs((vector short)__a, __b);
545 static vector short __ATTRS_o_ai vec_vaddshs(vector short __a,
546 vector bool short __b) {
547 return __builtin_altivec_vaddshs(__a, (vector short)__b);
552 static vector unsigned short __ATTRS_o_ai
553 vec_vadduhs(vector unsigned short __a, vector unsigned short __b) {
554 return __builtin_altivec_vadduhs(__a, __b);
557 static vector unsigned short __ATTRS_o_ai
558 vec_vadduhs(vector bool short __a, vector unsigned short __b) {
559 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
562 static vector unsigned short __ATTRS_o_ai vec_vadduhs(vector unsigned short __a,
563 vector bool short __b) {
564 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
569 static vector int __ATTRS_o_ai vec_vaddsws(vector int __a, vector int __b) {
570 return __builtin_altivec_vaddsws(__a, __b);
573 static vector int __ATTRS_o_ai vec_vaddsws(vector bool int __a,
575 return __builtin_altivec_vaddsws((vector int)__a, __b);
578 static vector int __ATTRS_o_ai vec_vaddsws(vector int __a,
579 vector bool int __b) {
580 return __builtin_altivec_vaddsws(__a, (vector int)__b);
585 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a,
586 vector unsigned int __b) {
587 return __builtin_altivec_vadduws(__a, __b);
590 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector bool int __a,
591 vector unsigned int __b) {
592 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
595 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a,
596 vector bool int __b) {
597 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
600 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
603 static vector signed __int128 __ATTRS_o_ai
604 vec_vadduqm(vector signed __int128 __a, vector signed __int128 __b) {
608 static vector unsigned __int128 __ATTRS_o_ai
609 vec_vadduqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
615 static vector signed __int128 __ATTRS_o_ai
616 vec_vaddeuqm(vector signed __int128 __a, vector signed __int128 __b,
617 vector signed __int128 __c) {
618 return __builtin_altivec_vaddeuqm(__a, __b, __c);
621 static vector unsigned __int128 __ATTRS_o_ai
622 vec_vaddeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
623 vector unsigned __int128 __c) {
624 return __builtin_altivec_vaddeuqm(__a, __b, __c);
629 static vector signed __int128 __ATTRS_o_ai
630 vec_vaddcuq(vector signed __int128 __a, vector signed __int128 __b) {
631 return __builtin_altivec_vaddcuq(__a, __b);
634 static vector unsigned __int128 __ATTRS_o_ai
635 vec_vaddcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
636 return __builtin_altivec_vaddcuq(__a, __b);
641 static vector signed __int128 __ATTRS_o_ai
642 vec_vaddecuq(vector signed __int128 __a, vector signed __int128 __b,
643 vector signed __int128 __c) {
644 return __builtin_altivec_vaddecuq(__a, __b, __c);
647 static vector unsigned __int128 __ATTRS_o_ai
648 vec_vaddecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
649 vector unsigned __int128 __c) {
650 return __builtin_altivec_vaddecuq(__a, __b, __c);
652 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
656 #define __builtin_altivec_vand vec_and
658 static vector signed char __ATTRS_o_ai vec_and(vector signed char __a,
659 vector signed char __b) {
663 static vector signed char __ATTRS_o_ai vec_and(vector bool char __a,
664 vector signed char __b) {
665 return (vector signed char)__a & __b;
668 static vector signed char __ATTRS_o_ai vec_and(vector signed char __a,
669 vector bool char __b) {
670 return __a & (vector signed char)__b;
673 static vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a,
674 vector unsigned char __b) {
678 static vector unsigned char __ATTRS_o_ai vec_and(vector bool char __a,
679 vector unsigned char __b) {
680 return (vector unsigned char)__a & __b;
683 static vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a,
684 vector bool char __b) {
685 return __a & (vector unsigned char)__b;
688 static vector bool char __ATTRS_o_ai vec_and(vector bool char __a,
689 vector bool char __b) {
693 static vector short __ATTRS_o_ai vec_and(vector short __a, vector short __b) {
697 static vector short __ATTRS_o_ai vec_and(vector bool short __a,
699 return (vector short)__a & __b;
702 static vector short __ATTRS_o_ai vec_and(vector short __a,
703 vector bool short __b) {
704 return __a & (vector short)__b;
707 static vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a,
708 vector unsigned short __b) {
712 static vector unsigned short __ATTRS_o_ai vec_and(vector bool short __a,
713 vector unsigned short __b) {
714 return (vector unsigned short)__a & __b;
717 static vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a,
718 vector bool short __b) {
719 return __a & (vector unsigned short)__b;
722 static vector bool short __ATTRS_o_ai vec_and(vector bool short __a,
723 vector bool short __b) {
727 static vector int __ATTRS_o_ai vec_and(vector int __a, vector int __b) {
731 static vector int __ATTRS_o_ai vec_and(vector bool int __a, vector int __b) {
732 return (vector int)__a & __b;
735 static vector int __ATTRS_o_ai vec_and(vector int __a, vector bool int __b) {
736 return __a & (vector int)__b;
739 static vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a,
740 vector unsigned int __b) {
744 static vector unsigned int __ATTRS_o_ai vec_and(vector bool int __a,
745 vector unsigned int __b) {
746 return (vector unsigned int)__a & __b;
749 static vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a,
750 vector bool int __b) {
751 return __a & (vector unsigned int)__b;
754 static vector bool int __ATTRS_o_ai vec_and(vector bool int __a,
755 vector bool int __b) {
759 static vector float __ATTRS_o_ai vec_and(vector float __a, vector float __b) {
760 vector unsigned int __res =
761 (vector unsigned int)__a & (vector unsigned int)__b;
762 return (vector float)__res;
765 static vector float __ATTRS_o_ai vec_and(vector bool int __a,
767 vector unsigned int __res =
768 (vector unsigned int)__a & (vector unsigned int)__b;
769 return (vector float)__res;
772 static vector float __ATTRS_o_ai vec_and(vector float __a,
773 vector bool int __b) {
774 vector unsigned int __res =
775 (vector unsigned int)__a & (vector unsigned int)__b;
776 return (vector float)__res;
780 static vector double __ATTRS_o_ai vec_and(vector bool long long __a, vector double __b) {
781 vector unsigned long long __res =
782 (vector unsigned long long)__a & (vector unsigned long long)__b;
783 return (vector double)__res;
786 static vector double __ATTRS_o_ai vec_and(vector double __a, vector bool long long __b) {
787 vector unsigned long long __res =
788 (vector unsigned long long)__a & (vector unsigned long long)__b;
789 return (vector double)__res;
792 static vector double __ATTRS_o_ai vec_and(vector double __a, vector double __b) {
793 vector unsigned long long __res =
794 (vector unsigned long long)__a & (vector unsigned long long)__b;
795 return (vector double)__res;
798 static vector signed long long __ATTRS_o_ai
799 vec_and(vector signed long long __a, vector signed long long __b) {
803 static vector signed long long __ATTRS_o_ai
804 vec_and(vector bool long long __a, vector signed long long __b) {
805 return (vector signed long long)__a & __b;
808 static vector signed long long __ATTRS_o_ai vec_and(vector signed long long __a,
809 vector bool long long __b) {
810 return __a & (vector signed long long)__b;
813 static vector unsigned long long __ATTRS_o_ai
814 vec_and(vector unsigned long long __a, vector unsigned long long __b) {
818 static vector unsigned long long __ATTRS_o_ai
819 vec_and(vector bool long long __a, vector unsigned long long __b) {
820 return (vector unsigned long long)__a & __b;
823 static vector unsigned long long __ATTRS_o_ai
824 vec_and(vector unsigned long long __a, vector bool long long __b) {
825 return __a & (vector unsigned long long)__b;
828 static vector bool long long __ATTRS_o_ai vec_and(vector bool long long __a,
829 vector bool long long __b) {
836 static vector signed char __ATTRS_o_ai vec_vand(vector signed char __a,
837 vector signed char __b) {
841 static vector signed char __ATTRS_o_ai vec_vand(vector bool char __a,
842 vector signed char __b) {
843 return (vector signed char)__a & __b;
846 static vector signed char __ATTRS_o_ai vec_vand(vector signed char __a,
847 vector bool char __b) {
848 return __a & (vector signed char)__b;
851 static vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a,
852 vector unsigned char __b) {
856 static vector unsigned char __ATTRS_o_ai vec_vand(vector bool char __a,
857 vector unsigned char __b) {
858 return (vector unsigned char)__a & __b;
861 static vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a,
862 vector bool char __b) {
863 return __a & (vector unsigned char)__b;
866 static vector bool char __ATTRS_o_ai vec_vand(vector bool char __a,
867 vector bool char __b) {
871 static vector short __ATTRS_o_ai vec_vand(vector short __a, vector short __b) {
875 static vector short __ATTRS_o_ai vec_vand(vector bool short __a,
877 return (vector short)__a & __b;
880 static vector short __ATTRS_o_ai vec_vand(vector short __a,
881 vector bool short __b) {
882 return __a & (vector short)__b;
885 static vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a,
886 vector unsigned short __b) {
890 static vector unsigned short __ATTRS_o_ai vec_vand(vector bool short __a,
891 vector unsigned short __b) {
892 return (vector unsigned short)__a & __b;
895 static vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a,
896 vector bool short __b) {
897 return __a & (vector unsigned short)__b;
900 static vector bool short __ATTRS_o_ai vec_vand(vector bool short __a,
901 vector bool short __b) {
905 static vector int __ATTRS_o_ai vec_vand(vector int __a, vector int __b) {
909 static vector int __ATTRS_o_ai vec_vand(vector bool int __a, vector int __b) {
910 return (vector int)__a & __b;
913 static vector int __ATTRS_o_ai vec_vand(vector int __a, vector bool int __b) {
914 return __a & (vector int)__b;
917 static vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a,
918 vector unsigned int __b) {
922 static vector unsigned int __ATTRS_o_ai vec_vand(vector bool int __a,
923 vector unsigned int __b) {
924 return (vector unsigned int)__a & __b;
927 static vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a,
928 vector bool int __b) {
929 return __a & (vector unsigned int)__b;
932 static vector bool int __ATTRS_o_ai vec_vand(vector bool int __a,
933 vector bool int __b) {
937 static vector float __ATTRS_o_ai vec_vand(vector float __a, vector float __b) {
938 vector unsigned int __res =
939 (vector unsigned int)__a & (vector unsigned int)__b;
940 return (vector float)__res;
943 static vector float __ATTRS_o_ai vec_vand(vector bool int __a,
945 vector unsigned int __res =
946 (vector unsigned int)__a & (vector unsigned int)__b;
947 return (vector float)__res;
950 static vector float __ATTRS_o_ai vec_vand(vector float __a,
951 vector bool int __b) {
952 vector unsigned int __res =
953 (vector unsigned int)__a & (vector unsigned int)__b;
954 return (vector float)__res;
958 static vector signed long long __ATTRS_o_ai
959 vec_vand(vector signed long long __a, vector signed long long __b) {
963 static vector signed long long __ATTRS_o_ai
964 vec_vand(vector bool long long __a, vector signed long long __b) {
965 return (vector signed long long)__a & __b;
968 static vector signed long long __ATTRS_o_ai
969 vec_vand(vector signed long long __a, vector bool long long __b) {
970 return __a & (vector signed long long)__b;
973 static vector unsigned long long __ATTRS_o_ai
974 vec_vand(vector unsigned long long __a, vector unsigned long long __b) {
978 static vector unsigned long long __ATTRS_o_ai
979 vec_vand(vector bool long long __a, vector unsigned long long __b) {
980 return (vector unsigned long long)__a & __b;
983 static vector unsigned long long __ATTRS_o_ai
984 vec_vand(vector unsigned long long __a, vector bool long long __b) {
985 return __a & (vector unsigned long long)__b;
988 static vector bool long long __ATTRS_o_ai vec_vand(vector bool long long __a,
989 vector bool long long __b) {
996 #define __builtin_altivec_vandc vec_andc
998 static vector signed char __ATTRS_o_ai vec_andc(vector signed char __a,
999 vector signed char __b) {
1003 static vector signed char __ATTRS_o_ai vec_andc(vector bool char __a,
1004 vector signed char __b) {
1005 return (vector signed char)__a & ~__b;
1008 static vector signed char __ATTRS_o_ai vec_andc(vector signed char __a,
1009 vector bool char __b) {
1010 return __a & ~(vector signed char)__b;
1013 static vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a,
1014 vector unsigned char __b) {
1018 static vector unsigned char __ATTRS_o_ai vec_andc(vector bool char __a,
1019 vector unsigned char __b) {
1020 return (vector unsigned char)__a & ~__b;
1023 static vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a,
1024 vector bool char __b) {
1025 return __a & ~(vector unsigned char)__b;
1028 static vector bool char __ATTRS_o_ai vec_andc(vector bool char __a,
1029 vector bool char __b) {
1033 static vector short __ATTRS_o_ai vec_andc(vector short __a, vector short __b) {
1037 static vector short __ATTRS_o_ai vec_andc(vector bool short __a,
1039 return (vector short)__a & ~__b;
1042 static vector short __ATTRS_o_ai vec_andc(vector short __a,
1043 vector bool short __b) {
1044 return __a & ~(vector short)__b;
1047 static vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a,
1048 vector unsigned short __b) {
1052 static vector unsigned short __ATTRS_o_ai vec_andc(vector bool short __a,
1053 vector unsigned short __b) {
1054 return (vector unsigned short)__a & ~__b;
1057 static vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a,
1058 vector bool short __b) {
1059 return __a & ~(vector unsigned short)__b;
1062 static vector bool short __ATTRS_o_ai vec_andc(vector bool short __a,
1063 vector bool short __b) {
1067 static vector int __ATTRS_o_ai vec_andc(vector int __a, vector int __b) {
1071 static vector int __ATTRS_o_ai vec_andc(vector bool int __a, vector int __b) {
1072 return (vector int)__a & ~__b;
1075 static vector int __ATTRS_o_ai vec_andc(vector int __a, vector bool int __b) {
1076 return __a & ~(vector int)__b;
1079 static vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a,
1080 vector unsigned int __b) {
1084 static vector unsigned int __ATTRS_o_ai vec_andc(vector bool int __a,
1085 vector unsigned int __b) {
1086 return (vector unsigned int)__a & ~__b;
1089 static vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a,
1090 vector bool int __b) {
1091 return __a & ~(vector unsigned int)__b;
1094 static vector bool int __ATTRS_o_ai vec_andc(vector bool int __a,
1095 vector bool int __b) {
1099 static vector float __ATTRS_o_ai vec_andc(vector float __a, vector float __b) {
1100 vector unsigned int __res =
1101 (vector unsigned int)__a & ~(vector unsigned int)__b;
1102 return (vector float)__res;
1105 static vector float __ATTRS_o_ai vec_andc(vector bool int __a,
1107 vector unsigned int __res =
1108 (vector unsigned int)__a & ~(vector unsigned int)__b;
1109 return (vector float)__res;
1112 static vector float __ATTRS_o_ai vec_andc(vector float __a,
1113 vector bool int __b) {
1114 vector unsigned int __res =
1115 (vector unsigned int)__a & ~(vector unsigned int)__b;
1116 return (vector float)__res;
1120 static vector double __ATTRS_o_ai
1121 vec_andc(vector bool long long __a, vector double __b) {
1122 vector unsigned long long __res =
1123 (vector unsigned long long)__a & ~(vector unsigned long long)__b;
1124 return (vector double)__res;
1127 static vector double __ATTRS_o_ai
1128 vec_andc(vector double __a, vector bool long long __b) {
1129 vector unsigned long long __res =
1130 (vector unsigned long long)__a & ~(vector unsigned long long)__b;
1131 return (vector double)__res;
1134 static vector double __ATTRS_o_ai vec_andc(vector double __a, vector double __b) {
1135 vector unsigned long long __res =
1136 (vector unsigned long long)__a & ~(vector unsigned long long)__b;
1137 return (vector double)__res;
1140 static vector signed long long __ATTRS_o_ai
1141 vec_andc(vector signed long long __a, vector signed long long __b) {
1145 static vector signed long long __ATTRS_o_ai
1146 vec_andc(vector bool long long __a, vector signed long long __b) {
1147 return (vector signed long long)__a & ~__b;
1150 static vector signed long long __ATTRS_o_ai
1151 vec_andc(vector signed long long __a, vector bool long long __b) {
1152 return __a & ~(vector signed long long)__b;
1155 static vector unsigned long long __ATTRS_o_ai
1156 vec_andc(vector unsigned long long __a, vector unsigned long long __b) {
1160 static vector unsigned long long __ATTRS_o_ai
1161 vec_andc(vector bool long long __a, vector unsigned long long __b) {
1162 return (vector unsigned long long)__a & ~__b;
1165 static vector unsigned long long __ATTRS_o_ai
1166 vec_andc(vector unsigned long long __a, vector bool long long __b) {
1167 return __a & ~(vector unsigned long long)__b;
1170 static vector bool long long __ATTRS_o_ai vec_andc(vector bool long long __a,
1171 vector bool long long __b) {
1178 static vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a,
1179 vector signed char __b) {
1183 static vector signed char __ATTRS_o_ai vec_vandc(vector bool char __a,
1184 vector signed char __b) {
1185 return (vector signed char)__a & ~__b;
1188 static vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a,
1189 vector bool char __b) {
1190 return __a & ~(vector signed char)__b;
1193 static vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a,
1194 vector unsigned char __b) {
1198 static vector unsigned char __ATTRS_o_ai vec_vandc(vector bool char __a,
1199 vector unsigned char __b) {
1200 return (vector unsigned char)__a & ~__b;
1203 static vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a,
1204 vector bool char __b) {
1205 return __a & ~(vector unsigned char)__b;
1208 static vector bool char __ATTRS_o_ai vec_vandc(vector bool char __a,
1209 vector bool char __b) {
1213 static vector short __ATTRS_o_ai vec_vandc(vector short __a, vector short __b) {
1217 static vector short __ATTRS_o_ai vec_vandc(vector bool short __a,
1219 return (vector short)__a & ~__b;
1222 static vector short __ATTRS_o_ai vec_vandc(vector short __a,
1223 vector bool short __b) {
1224 return __a & ~(vector short)__b;
1227 static vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a,
1228 vector unsigned short __b) {
1232 static vector unsigned short __ATTRS_o_ai vec_vandc(vector bool short __a,
1233 vector unsigned short __b) {
1234 return (vector unsigned short)__a & ~__b;
1237 static vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a,
1238 vector bool short __b) {
1239 return __a & ~(vector unsigned short)__b;
1242 static vector bool short __ATTRS_o_ai vec_vandc(vector bool short __a,
1243 vector bool short __b) {
1247 static vector int __ATTRS_o_ai vec_vandc(vector int __a, vector int __b) {
1251 static vector int __ATTRS_o_ai vec_vandc(vector bool int __a, vector int __b) {
1252 return (vector int)__a & ~__b;
1255 static vector int __ATTRS_o_ai vec_vandc(vector int __a, vector bool int __b) {
1256 return __a & ~(vector int)__b;
1259 static vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a,
1260 vector unsigned int __b) {
1264 static vector unsigned int __ATTRS_o_ai vec_vandc(vector bool int __a,
1265 vector unsigned int __b) {
1266 return (vector unsigned int)__a & ~__b;
1269 static vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a,
1270 vector bool int __b) {
1271 return __a & ~(vector unsigned int)__b;
1274 static vector bool int __ATTRS_o_ai vec_vandc(vector bool int __a,
1275 vector bool int __b) {
1279 static vector float __ATTRS_o_ai vec_vandc(vector float __a, vector float __b) {
1280 vector unsigned int __res =
1281 (vector unsigned int)__a & ~(vector unsigned int)__b;
1282 return (vector float)__res;
1285 static vector float __ATTRS_o_ai vec_vandc(vector bool int __a,
1287 vector unsigned int __res =
1288 (vector unsigned int)__a & ~(vector unsigned int)__b;
1289 return (vector float)__res;
1292 static vector float __ATTRS_o_ai vec_vandc(vector float __a,
1293 vector bool int __b) {
1294 vector unsigned int __res =
1295 (vector unsigned int)__a & ~(vector unsigned int)__b;
1296 return (vector float)__res;
1300 static vector signed long long __ATTRS_o_ai
1301 vec_vandc(vector signed long long __a, vector signed long long __b) {
1305 static vector signed long long __ATTRS_o_ai
1306 vec_vandc(vector bool long long __a, vector signed long long __b) {
1307 return (vector signed long long)__a & ~__b;
1310 static vector signed long long __ATTRS_o_ai
1311 vec_vandc(vector signed long long __a, vector bool long long __b) {
1312 return __a & ~(vector signed long long)__b;
1315 static vector unsigned long long __ATTRS_o_ai
1316 vec_vandc(vector unsigned long long __a, vector unsigned long long __b) {
1320 static vector unsigned long long __ATTRS_o_ai
1321 vec_vandc(vector bool long long __a, vector unsigned long long __b) {
1322 return (vector unsigned long long)__a & ~__b;
1325 static vector unsigned long long __ATTRS_o_ai
1326 vec_vandc(vector unsigned long long __a, vector bool long long __b) {
1327 return __a & ~(vector unsigned long long)__b;
1330 static vector bool long long __ATTRS_o_ai vec_vandc(vector bool long long __a,
1331 vector bool long long __b) {
1338 static vector signed char __ATTRS_o_ai vec_avg(vector signed char __a,
1339 vector signed char __b) {
1340 return __builtin_altivec_vavgsb(__a, __b);
1343 static vector unsigned char __ATTRS_o_ai vec_avg(vector unsigned char __a,
1344 vector unsigned char __b) {
1345 return __builtin_altivec_vavgub(__a, __b);
1348 static vector short __ATTRS_o_ai vec_avg(vector short __a, vector short __b) {
1349 return __builtin_altivec_vavgsh(__a, __b);
1352 static vector unsigned short __ATTRS_o_ai vec_avg(vector unsigned short __a,
1353 vector unsigned short __b) {
1354 return __builtin_altivec_vavguh(__a, __b);
1357 static vector int __ATTRS_o_ai vec_avg(vector int __a, vector int __b) {
1358 return __builtin_altivec_vavgsw(__a, __b);
1361 static vector unsigned int __ATTRS_o_ai vec_avg(vector unsigned int __a,
1362 vector unsigned int __b) {
1363 return __builtin_altivec_vavguw(__a, __b);
1368 static vector signed char __attribute__((__always_inline__))
1369 vec_vavgsb(vector signed char __a, vector signed char __b) {
1370 return __builtin_altivec_vavgsb(__a, __b);
1375 static vector unsigned char __attribute__((__always_inline__))
1376 vec_vavgub(vector unsigned char __a, vector unsigned char __b) {
1377 return __builtin_altivec_vavgub(__a, __b);
1382 static vector short __attribute__((__always_inline__))
1383 vec_vavgsh(vector short __a, vector short __b) {
1384 return __builtin_altivec_vavgsh(__a, __b);
1389 static vector unsigned short __attribute__((__always_inline__))
1390 vec_vavguh(vector unsigned short __a, vector unsigned short __b) {
1391 return __builtin_altivec_vavguh(__a, __b);
1396 static vector int __attribute__((__always_inline__))
1397 vec_vavgsw(vector int __a, vector int __b) {
1398 return __builtin_altivec_vavgsw(__a, __b);
1403 static vector unsigned int __attribute__((__always_inline__))
1404 vec_vavguw(vector unsigned int __a, vector unsigned int __b) {
1405 return __builtin_altivec_vavguw(__a, __b);
1410 static vector float __ATTRS_o_ai vec_ceil(vector float __a) {
1412 return __builtin_vsx_xvrspip(__a);
1414 return __builtin_altivec_vrfip(__a);
1419 static vector double __ATTRS_o_ai vec_ceil(vector double __a) {
1420 return __builtin_vsx_xvrdpip(__a);
1426 static vector float __attribute__((__always_inline__))
1427 vec_vrfip(vector float __a) {
1428 return __builtin_altivec_vrfip(__a);
1433 static vector int __attribute__((__always_inline__))
1434 vec_cmpb(vector float __a, vector float __b) {
1435 return __builtin_altivec_vcmpbfp(__a, __b);
1440 static vector int __attribute__((__always_inline__))
1441 vec_vcmpbfp(vector float __a, vector float __b) {
1442 return __builtin_altivec_vcmpbfp(__a, __b);
1447 static vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a,
1448 vector signed char __b) {
1449 return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a,
1453 static vector bool char __ATTRS_o_ai vec_cmpeq(vector unsigned char __a,
1454 vector unsigned char __b) {
1455 return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a,
1459 static vector bool short __ATTRS_o_ai vec_cmpeq(vector short __a,
1461 return (vector bool short)__builtin_altivec_vcmpequh(__a, __b);
1464 static vector bool short __ATTRS_o_ai vec_cmpeq(vector unsigned short __a,
1465 vector unsigned short __b) {
1466 return (vector bool short)__builtin_altivec_vcmpequh((vector short)__a,
1470 static vector bool int __ATTRS_o_ai vec_cmpeq(vector int __a, vector int __b) {
1471 return (vector bool int)__builtin_altivec_vcmpequw(__a, __b);
1474 static vector bool int __ATTRS_o_ai vec_cmpeq(vector unsigned int __a,
1475 vector unsigned int __b) {
1476 return (vector bool int)__builtin_altivec_vcmpequw((vector int)__a,
1480 #ifdef __POWER8_VECTOR__
1481 static vector bool long long __ATTRS_o_ai
1482 vec_cmpeq(vector signed long long __a, vector signed long long __b) {
1483 return (vector bool long long)__builtin_altivec_vcmpequd(__a, __b);
1486 static vector bool long long __ATTRS_o_ai
1487 vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) {
1488 return (vector bool long long)__builtin_altivec_vcmpequd(
1489 (vector long long)__a, (vector long long)__b);
1493 static vector bool int __ATTRS_o_ai vec_cmpeq(vector float __a,
1496 return (vector bool int)__builtin_vsx_xvcmpeqsp(__a, __b);
1498 return (vector bool int)__builtin_altivec_vcmpeqfp(__a, __b);
1503 static vector bool long long __ATTRS_o_ai
1504 vec_cmpeq(vector double __a, vector double __b) {
1505 return (vector bool long long)__builtin_vsx_xvcmpeqdp(__a, __b);
1511 static vector bool int __ATTRS_o_ai
1512 vec_cmpge(vector float __a, vector float __b) {
1514 return (vector bool int)__builtin_vsx_xvcmpgesp(__a, __b);
1516 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1521 static vector bool long long __ATTRS_o_ai
1522 vec_cmpge(vector double __a, vector double __b) {
1523 return (vector bool long long)__builtin_vsx_xvcmpgedp(__a, __b);
1527 #ifdef __POWER8_VECTOR__
1528 /* Forwrad declarations as the functions are used here */
1529 static vector bool long long __ATTRS_o_ai
1530 vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b);
1531 static vector bool long long __ATTRS_o_ai
1532 vec_cmpgt(vector signed long long __a, vector signed long long __b);
1534 static vector bool long long __ATTRS_o_ai
1535 vec_cmpge(vector signed long long __a, vector signed long long __b) {
1536 return ~(vec_cmpgt(__b, __a));
1539 static vector bool long long __ATTRS_o_ai
1540 vec_cmpge(vector unsigned long long __a, vector unsigned long long __b) {
1541 return ~(vec_cmpgt(__b, __a));
1547 static vector bool int __attribute__((__always_inline__))
1548 vec_vcmpgefp(vector float __a, vector float __b) {
1549 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1554 static vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a,
1555 vector signed char __b) {
1556 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1559 static vector bool char __ATTRS_o_ai vec_cmpgt(vector unsigned char __a,
1560 vector unsigned char __b) {
1561 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1564 static vector bool short __ATTRS_o_ai vec_cmpgt(vector short __a,
1566 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1569 static vector bool short __ATTRS_o_ai vec_cmpgt(vector unsigned short __a,
1570 vector unsigned short __b) {
1571 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1574 static vector bool int __ATTRS_o_ai vec_cmpgt(vector int __a, vector int __b) {
1575 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1578 static vector bool int __ATTRS_o_ai vec_cmpgt(vector unsigned int __a,
1579 vector unsigned int __b) {
1580 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1583 #ifdef __POWER8_VECTOR__
1584 static vector bool long long __ATTRS_o_ai
1585 vec_cmpgt(vector signed long long __a, vector signed long long __b) {
1586 return (vector bool long long)__builtin_altivec_vcmpgtsd(__a, __b);
1589 static vector bool long long __ATTRS_o_ai
1590 vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) {
1591 return (vector bool long long)__builtin_altivec_vcmpgtud(__a, __b);
1595 static vector bool int __ATTRS_o_ai vec_cmpgt(vector float __a,
1598 return (vector bool int)__builtin_vsx_xvcmpgtsp(__a, __b);
1600 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1605 static vector bool long long __ATTRS_o_ai
1606 vec_cmpgt(vector double __a, vector double __b) {
1607 return (vector bool long long)__builtin_vsx_xvcmpgtdp(__a, __b);
1612 static vector bool char __attribute__((__always_inline__))
1613 vec_vcmpgtsb(vector signed char __a, vector signed char __b) {
1614 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1619 static vector bool char __attribute__((__always_inline__))
1620 vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b) {
1621 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1626 static vector bool short __attribute__((__always_inline__))
1627 vec_vcmpgtsh(vector short __a, vector short __b) {
1628 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1633 static vector bool short __attribute__((__always_inline__))
1634 vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b) {
1635 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1640 static vector bool int __attribute__((__always_inline__))
1641 vec_vcmpgtsw(vector int __a, vector int __b) {
1642 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1647 static vector bool int __attribute__((__always_inline__))
1648 vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b) {
1649 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1654 static vector bool int __attribute__((__always_inline__))
1655 vec_vcmpgtfp(vector float __a, vector float __b) {
1656 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1661 static vector bool int __ATTRS_o_ai
1662 vec_cmple(vector float __a, vector float __b) {
1663 return vec_cmpge(__b, __a);
1667 static vector bool long long __ATTRS_o_ai
1668 vec_cmple(vector double __a, vector double __b) {
1669 return vec_cmpge(__b, __a);
1673 #ifdef __POWER8_VECTOR__
1674 static vector bool long long __ATTRS_o_ai
1675 vec_cmple(vector signed long long __a, vector signed long long __b) {
1676 return vec_cmpge(__b, __a);
1679 static vector bool long long __ATTRS_o_ai
1680 vec_cmple(vector unsigned long long __a, vector unsigned long long __b) {
1681 return vec_cmpge(__b, __a);
1687 static vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a,
1688 vector signed char __b) {
1689 return vec_cmpgt(__b, __a);
1692 static vector bool char __ATTRS_o_ai vec_cmplt(vector unsigned char __a,
1693 vector unsigned char __b) {
1694 return vec_cmpgt(__b, __a);
1697 static vector bool short __ATTRS_o_ai vec_cmplt(vector short __a,
1699 return vec_cmpgt(__b, __a);
1702 static vector bool short __ATTRS_o_ai vec_cmplt(vector unsigned short __a,
1703 vector unsigned short __b) {
1704 return vec_cmpgt(__b, __a);
1707 static vector bool int __ATTRS_o_ai vec_cmplt(vector int __a, vector int __b) {
1708 return vec_cmpgt(__b, __a);
1711 static vector bool int __ATTRS_o_ai vec_cmplt(vector unsigned int __a,
1712 vector unsigned int __b) {
1713 return vec_cmpgt(__b, __a);
1716 static vector bool int __ATTRS_o_ai vec_cmplt(vector float __a,
1718 return vec_cmpgt(__b, __a);
1722 static vector bool long long __ATTRS_o_ai
1723 vec_cmplt(vector double __a, vector double __b) {
1724 return vec_cmpgt(__b, __a);
1728 #ifdef __POWER8_VECTOR__
1729 static vector bool long long __ATTRS_o_ai
1730 vec_cmplt(vector signed long long __a, vector signed long long __b) {
1731 return vec_cmpgt(__b, __a);
1734 static vector bool long long __ATTRS_o_ai
1735 vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) {
1736 return vec_cmpgt(__b, __a);
1742 static vector float __ATTRS_o_ai vec_ctf(vector int __a, int __b) {
1743 return __builtin_altivec_vcfsx(__a, __b);
1746 static vector float __ATTRS_o_ai vec_ctf(vector unsigned int __a, int __b) {
1747 return __builtin_altivec_vcfux((vector int)__a, __b);
1752 static vector float __attribute__((__always_inline__))
1753 vec_vcfsx(vector int __a, int __b) {
1754 return __builtin_altivec_vcfsx(__a, __b);
1759 static vector float __attribute__((__always_inline__))
1760 vec_vcfux(vector unsigned int __a, int __b) {
1761 return __builtin_altivec_vcfux((vector int)__a, __b);
1766 static vector int __attribute__((__always_inline__))
1767 vec_cts(vector float __a, int __b) {
1768 return __builtin_altivec_vctsxs(__a, __b);
1773 static vector int __attribute__((__always_inline__))
1774 vec_vctsxs(vector float __a, int __b) {
1775 return __builtin_altivec_vctsxs(__a, __b);
1780 static vector unsigned int __attribute__((__always_inline__))
1781 vec_ctu(vector float __a, int __b) {
1782 return __builtin_altivec_vctuxs(__a, __b);
1787 static vector unsigned int __attribute__((__always_inline__))
1788 vec_vctuxs(vector float __a, int __b) {
1789 return __builtin_altivec_vctuxs(__a, __b);
1794 static vector float __ATTRS_o_ai vec_div(vector float __a, vector float __b) {
1795 return __builtin_vsx_xvdivsp(__a, __b);
1798 static vector double __ATTRS_o_ai vec_div(vector double __a,
1799 vector double __b) {
1800 return __builtin_vsx_xvdivdp(__a, __b);
1806 static void __attribute__((__always_inline__)) vec_dss(int __a) {
1807 __builtin_altivec_dss(__a);
1812 static void __attribute__((__always_inline__)) vec_dssall(void) {
1813 __builtin_altivec_dssall();
1818 static void __attribute__((__always_inline__))
1819 vec_dst(const void *__a, int __b, int __c) {
1820 __builtin_altivec_dst(__a, __b, __c);
1825 static void __attribute__((__always_inline__))
1826 vec_dstst(const void *__a, int __b, int __c) {
1827 __builtin_altivec_dstst(__a, __b, __c);
1832 static void __attribute__((__always_inline__))
1833 vec_dststt(const void *__a, int __b, int __c) {
1834 __builtin_altivec_dststt(__a, __b, __c);
1839 static void __attribute__((__always_inline__))
1840 vec_dstt(const void *__a, int __b, int __c) {
1841 __builtin_altivec_dstt(__a, __b, __c);
1846 static vector float __attribute__((__always_inline__))
1847 vec_expte(vector float __a) {
1848 return __builtin_altivec_vexptefp(__a);
1853 static vector float __attribute__((__always_inline__))
1854 vec_vexptefp(vector float __a) {
1855 return __builtin_altivec_vexptefp(__a);
1860 static vector float __attribute__((__always_inline__))
1861 vec_floor(vector float __a) {
1862 return __builtin_altivec_vrfim(__a);
1867 static vector float __attribute__((__always_inline__))
1868 vec_vrfim(vector float __a) {
1869 return __builtin_altivec_vrfim(__a);
1874 static vector signed char __ATTRS_o_ai vec_ld(int __a,
1875 const vector signed char *__b) {
1876 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1879 static vector signed char __ATTRS_o_ai vec_ld(int __a, const signed char *__b) {
1880 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1883 static vector unsigned char __ATTRS_o_ai
1884 vec_ld(int __a, const vector unsigned char *__b) {
1885 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1888 static vector unsigned char __ATTRS_o_ai vec_ld(int __a,
1889 const unsigned char *__b) {
1890 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1893 static vector bool char __ATTRS_o_ai vec_ld(int __a,
1894 const vector bool char *__b) {
1895 return (vector bool char)__builtin_altivec_lvx(__a, __b);
1898 static vector short __ATTRS_o_ai vec_ld(int __a, const vector short *__b) {
1899 return (vector short)__builtin_altivec_lvx(__a, __b);
1902 static vector short __ATTRS_o_ai vec_ld(int __a, const short *__b) {
1903 return (vector short)__builtin_altivec_lvx(__a, __b);
1906 static vector unsigned short __ATTRS_o_ai
1907 vec_ld(int __a, const vector unsigned short *__b) {
1908 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1911 static vector unsigned short __ATTRS_o_ai vec_ld(int __a,
1912 const unsigned short *__b) {
1913 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1916 static vector bool short __ATTRS_o_ai vec_ld(int __a,
1917 const vector bool short *__b) {
1918 return (vector bool short)__builtin_altivec_lvx(__a, __b);
1921 static vector pixel __ATTRS_o_ai vec_ld(int __a, const vector pixel *__b) {
1922 return (vector pixel)__builtin_altivec_lvx(__a, __b);
1925 static vector int __ATTRS_o_ai vec_ld(int __a, const vector int *__b) {
1926 return (vector int)__builtin_altivec_lvx(__a, __b);
1929 static vector int __ATTRS_o_ai vec_ld(int __a, const int *__b) {
1930 return (vector int)__builtin_altivec_lvx(__a, __b);
1933 static vector unsigned int __ATTRS_o_ai vec_ld(int __a,
1934 const vector unsigned int *__b) {
1935 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1938 static vector unsigned int __ATTRS_o_ai vec_ld(int __a,
1939 const unsigned int *__b) {
1940 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1943 static vector bool int __ATTRS_o_ai vec_ld(int __a,
1944 const vector bool int *__b) {
1945 return (vector bool int)__builtin_altivec_lvx(__a, __b);
1948 static vector float __ATTRS_o_ai vec_ld(int __a, const vector float *__b) {
1949 return (vector float)__builtin_altivec_lvx(__a, __b);
1952 static vector float __ATTRS_o_ai vec_ld(int __a, const float *__b) {
1953 return (vector float)__builtin_altivec_lvx(__a, __b);
1958 static vector signed char __ATTRS_o_ai vec_lvx(int __a,
1959 const vector signed char *__b) {
1960 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1963 static vector signed char __ATTRS_o_ai vec_lvx(int __a,
1964 const signed char *__b) {
1965 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1968 static vector unsigned char __ATTRS_o_ai
1969 vec_lvx(int __a, const vector unsigned char *__b) {
1970 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1973 static vector unsigned char __ATTRS_o_ai vec_lvx(int __a,
1974 const unsigned char *__b) {
1975 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1978 static vector bool char __ATTRS_o_ai vec_lvx(int __a,
1979 const vector bool char *__b) {
1980 return (vector bool char)__builtin_altivec_lvx(__a, __b);
1983 static vector short __ATTRS_o_ai vec_lvx(int __a, const vector short *__b) {
1984 return (vector short)__builtin_altivec_lvx(__a, __b);
1987 static vector short __ATTRS_o_ai vec_lvx(int __a, const short *__b) {
1988 return (vector short)__builtin_altivec_lvx(__a, __b);
1991 static vector unsigned short __ATTRS_o_ai
1992 vec_lvx(int __a, const vector unsigned short *__b) {
1993 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1996 static vector unsigned short __ATTRS_o_ai vec_lvx(int __a,
1997 const unsigned short *__b) {
1998 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
2001 static vector bool short __ATTRS_o_ai vec_lvx(int __a,
2002 const vector bool short *__b) {
2003 return (vector bool short)__builtin_altivec_lvx(__a, __b);
2006 static vector pixel __ATTRS_o_ai vec_lvx(int __a, const vector pixel *__b) {
2007 return (vector pixel)__builtin_altivec_lvx(__a, __b);
2010 static vector int __ATTRS_o_ai vec_lvx(int __a, const vector int *__b) {
2011 return (vector int)__builtin_altivec_lvx(__a, __b);
2014 static vector int __ATTRS_o_ai vec_lvx(int __a, const int *__b) {
2015 return (vector int)__builtin_altivec_lvx(__a, __b);
2018 static vector unsigned int __ATTRS_o_ai
2019 vec_lvx(int __a, const vector unsigned int *__b) {
2020 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2023 static vector unsigned int __ATTRS_o_ai vec_lvx(int __a,
2024 const unsigned int *__b) {
2025 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2028 static vector bool int __ATTRS_o_ai vec_lvx(int __a,
2029 const vector bool int *__b) {
2030 return (vector bool int)__builtin_altivec_lvx(__a, __b);
2033 static vector float __ATTRS_o_ai vec_lvx(int __a, const vector float *__b) {
2034 return (vector float)__builtin_altivec_lvx(__a, __b);
2037 static vector float __ATTRS_o_ai vec_lvx(int __a, const float *__b) {
2038 return (vector float)__builtin_altivec_lvx(__a, __b);
2043 static vector signed char __ATTRS_o_ai vec_lde(int __a,
2044 const signed char *__b) {
2045 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
2048 static vector unsigned char __ATTRS_o_ai vec_lde(int __a,
2049 const unsigned char *__b) {
2050 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
2053 static vector short __ATTRS_o_ai vec_lde(int __a, const short *__b) {
2054 return (vector short)__builtin_altivec_lvehx(__a, __b);
2057 static vector unsigned short __ATTRS_o_ai vec_lde(int __a,
2058 const unsigned short *__b) {
2059 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
2062 static vector int __ATTRS_o_ai vec_lde(int __a, const int *__b) {
2063 return (vector int)__builtin_altivec_lvewx(__a, __b);
2066 static vector unsigned int __ATTRS_o_ai vec_lde(int __a,
2067 const unsigned int *__b) {
2068 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2071 static vector float __ATTRS_o_ai vec_lde(int __a, const float *__b) {
2072 return (vector float)__builtin_altivec_lvewx(__a, __b);
2077 static vector signed char __ATTRS_o_ai vec_lvebx(int __a,
2078 const signed char *__b) {
2079 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
2082 static vector unsigned char __ATTRS_o_ai vec_lvebx(int __a,
2083 const unsigned char *__b) {
2084 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
2089 static vector short __ATTRS_o_ai vec_lvehx(int __a, const short *__b) {
2090 return (vector short)__builtin_altivec_lvehx(__a, __b);
2093 static vector unsigned short __ATTRS_o_ai vec_lvehx(int __a,
2094 const unsigned short *__b) {
2095 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
2100 static vector int __ATTRS_o_ai vec_lvewx(int __a, const int *__b) {
2101 return (vector int)__builtin_altivec_lvewx(__a, __b);
2104 static vector unsigned int __ATTRS_o_ai vec_lvewx(int __a,
2105 const unsigned int *__b) {
2106 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2109 static vector float __ATTRS_o_ai vec_lvewx(int __a, const float *__b) {
2110 return (vector float)__builtin_altivec_lvewx(__a, __b);
2115 static vector signed char __ATTRS_o_ai vec_ldl(int __a,
2116 const vector signed char *__b) {
2117 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2120 static vector signed char __ATTRS_o_ai vec_ldl(int __a,
2121 const signed char *__b) {
2122 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2125 static vector unsigned char __ATTRS_o_ai
2126 vec_ldl(int __a, const vector unsigned char *__b) {
2127 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2130 static vector unsigned char __ATTRS_o_ai vec_ldl(int __a,
2131 const unsigned char *__b) {
2132 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2135 static vector bool char __ATTRS_o_ai vec_ldl(int __a,
2136 const vector bool char *__b) {
2137 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2140 static vector short __ATTRS_o_ai vec_ldl(int __a, const vector short *__b) {
2141 return (vector short)__builtin_altivec_lvxl(__a, __b);
2144 static vector short __ATTRS_o_ai vec_ldl(int __a, const short *__b) {
2145 return (vector short)__builtin_altivec_lvxl(__a, __b);
2148 static vector unsigned short __ATTRS_o_ai
2149 vec_ldl(int __a, const vector unsigned short *__b) {
2150 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2153 static vector unsigned short __ATTRS_o_ai vec_ldl(int __a,
2154 const unsigned short *__b) {
2155 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2158 static vector bool short __ATTRS_o_ai vec_ldl(int __a,
2159 const vector bool short *__b) {
2160 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2163 static vector pixel __ATTRS_o_ai vec_ldl(int __a, const vector pixel *__b) {
2164 return (vector pixel short)__builtin_altivec_lvxl(__a, __b);
2167 static vector int __ATTRS_o_ai vec_ldl(int __a, const vector int *__b) {
2168 return (vector int)__builtin_altivec_lvxl(__a, __b);
2171 static vector int __ATTRS_o_ai vec_ldl(int __a, const int *__b) {
2172 return (vector int)__builtin_altivec_lvxl(__a, __b);
2175 static vector unsigned int __ATTRS_o_ai
2176 vec_ldl(int __a, const vector unsigned int *__b) {
2177 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2180 static vector unsigned int __ATTRS_o_ai vec_ldl(int __a,
2181 const unsigned int *__b) {
2182 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2185 static vector bool int __ATTRS_o_ai vec_ldl(int __a,
2186 const vector bool int *__b) {
2187 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2190 static vector float __ATTRS_o_ai vec_ldl(int __a, const vector float *__b) {
2191 return (vector float)__builtin_altivec_lvxl(__a, __b);
2194 static vector float __ATTRS_o_ai vec_ldl(int __a, const float *__b) {
2195 return (vector float)__builtin_altivec_lvxl(__a, __b);
2200 static vector signed char __ATTRS_o_ai vec_lvxl(int __a,
2201 const vector signed char *__b) {
2202 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2205 static vector signed char __ATTRS_o_ai vec_lvxl(int __a,
2206 const signed char *__b) {
2207 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2210 static vector unsigned char __ATTRS_o_ai
2211 vec_lvxl(int __a, const vector unsigned char *__b) {
2212 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2215 static vector unsigned char __ATTRS_o_ai vec_lvxl(int __a,
2216 const unsigned char *__b) {
2217 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2220 static vector bool char __ATTRS_o_ai vec_lvxl(int __a,
2221 const vector bool char *__b) {
2222 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2225 static vector short __ATTRS_o_ai vec_lvxl(int __a, const vector short *__b) {
2226 return (vector short)__builtin_altivec_lvxl(__a, __b);
2229 static vector short __ATTRS_o_ai vec_lvxl(int __a, const short *__b) {
2230 return (vector short)__builtin_altivec_lvxl(__a, __b);
2233 static vector unsigned short __ATTRS_o_ai
2234 vec_lvxl(int __a, const vector unsigned short *__b) {
2235 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2238 static vector unsigned short __ATTRS_o_ai vec_lvxl(int __a,
2239 const unsigned short *__b) {
2240 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2243 static vector bool short __ATTRS_o_ai vec_lvxl(int __a,
2244 const vector bool short *__b) {
2245 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2248 static vector pixel __ATTRS_o_ai vec_lvxl(int __a, const vector pixel *__b) {
2249 return (vector pixel)__builtin_altivec_lvxl(__a, __b);
2252 static vector int __ATTRS_o_ai vec_lvxl(int __a, const vector int *__b) {
2253 return (vector int)__builtin_altivec_lvxl(__a, __b);
2256 static vector int __ATTRS_o_ai vec_lvxl(int __a, const int *__b) {
2257 return (vector int)__builtin_altivec_lvxl(__a, __b);
2260 static vector unsigned int __ATTRS_o_ai
2261 vec_lvxl(int __a, const vector unsigned int *__b) {
2262 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2265 static vector unsigned int __ATTRS_o_ai vec_lvxl(int __a,
2266 const unsigned int *__b) {
2267 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2270 static vector bool int __ATTRS_o_ai vec_lvxl(int __a,
2271 const vector bool int *__b) {
2272 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2275 static vector float __ATTRS_o_ai vec_lvxl(int __a, const vector float *__b) {
2276 return (vector float)__builtin_altivec_lvxl(__a, __b);
2279 static vector float __ATTRS_o_ai vec_lvxl(int __a, const float *__b) {
2280 return (vector float)__builtin_altivec_lvxl(__a, __b);
2285 static vector float __attribute__((__always_inline__))
2286 vec_loge(vector float __a) {
2287 return __builtin_altivec_vlogefp(__a);
2292 static vector float __attribute__((__always_inline__))
2293 vec_vlogefp(vector float __a) {
2294 return __builtin_altivec_vlogefp(__a);
2299 #ifdef __LITTLE_ENDIAN__
2300 static vector unsigned char __ATTRS_o_ai
2301 __attribute__((__deprecated__("use assignment for unaligned little endian \
2302 loads/stores"))) vec_lvsl(int __a, const signed char *__b) {
2303 vector unsigned char mask =
2304 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2305 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2306 7, 6, 5, 4, 3, 2, 1, 0};
2307 return vec_perm(mask, mask, reverse);
2310 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2311 const signed char *__b) {
2312 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2316 #ifdef __LITTLE_ENDIAN__
2317 static vector unsigned char __ATTRS_o_ai
2318 __attribute__((__deprecated__("use assignment for unaligned little endian \
2319 loads/stores"))) vec_lvsl(int __a, const unsigned char *__b) {
2320 vector unsigned char mask =
2321 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2322 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2323 7, 6, 5, 4, 3, 2, 1, 0};
2324 return vec_perm(mask, mask, reverse);
2327 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2328 const unsigned char *__b) {
2329 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2333 #ifdef __LITTLE_ENDIAN__
2334 static vector unsigned char __ATTRS_o_ai
2335 __attribute__((__deprecated__("use assignment for unaligned little endian \
2336 loads/stores"))) vec_lvsl(int __a, const short *__b) {
2337 vector unsigned char mask =
2338 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2339 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2340 7, 6, 5, 4, 3, 2, 1, 0};
2341 return vec_perm(mask, mask, reverse);
2344 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const short *__b) {
2345 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2349 #ifdef __LITTLE_ENDIAN__
2350 static vector unsigned char __ATTRS_o_ai
2351 __attribute__((__deprecated__("use assignment for unaligned little endian \
2352 loads/stores"))) vec_lvsl(int __a, const unsigned short *__b) {
2353 vector unsigned char mask =
2354 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2355 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2356 7, 6, 5, 4, 3, 2, 1, 0};
2357 return vec_perm(mask, mask, reverse);
2360 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2361 const unsigned short *__b) {
2362 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2366 #ifdef __LITTLE_ENDIAN__
2367 static vector unsigned char __ATTRS_o_ai
2368 __attribute__((__deprecated__("use assignment for unaligned little endian \
2369 loads/stores"))) vec_lvsl(int __a, const int *__b) {
2370 vector unsigned char mask =
2371 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2372 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2373 7, 6, 5, 4, 3, 2, 1, 0};
2374 return vec_perm(mask, mask, reverse);
2377 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const int *__b) {
2378 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2382 #ifdef __LITTLE_ENDIAN__
2383 static vector unsigned char __ATTRS_o_ai
2384 __attribute__((__deprecated__("use assignment for unaligned little endian \
2385 loads/stores"))) vec_lvsl(int __a, const unsigned int *__b) {
2386 vector unsigned char mask =
2387 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2388 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2389 7, 6, 5, 4, 3, 2, 1, 0};
2390 return vec_perm(mask, mask, reverse);
2393 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2394 const unsigned int *__b) {
2395 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2399 #ifdef __LITTLE_ENDIAN__
2400 static vector unsigned char __ATTRS_o_ai
2401 __attribute__((__deprecated__("use assignment for unaligned little endian \
2402 loads/stores"))) vec_lvsl(int __a, const float *__b) {
2403 vector unsigned char mask =
2404 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2405 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2406 7, 6, 5, 4, 3, 2, 1, 0};
2407 return vec_perm(mask, mask, reverse);
2410 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const float *__b) {
2411 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2417 #ifdef __LITTLE_ENDIAN__
2418 static vector unsigned char __ATTRS_o_ai
2419 __attribute__((__deprecated__("use assignment for unaligned little endian \
2420 loads/stores"))) vec_lvsr(int __a, const signed char *__b) {
2421 vector unsigned char mask =
2422 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2423 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2424 7, 6, 5, 4, 3, 2, 1, 0};
2425 return vec_perm(mask, mask, reverse);
2428 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2429 const signed char *__b) {
2430 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2434 #ifdef __LITTLE_ENDIAN__
2435 static vector unsigned char __ATTRS_o_ai
2436 __attribute__((__deprecated__("use assignment for unaligned little endian \
2437 loads/stores"))) vec_lvsr(int __a, const unsigned char *__b) {
2438 vector unsigned char mask =
2439 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2440 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2441 7, 6, 5, 4, 3, 2, 1, 0};
2442 return vec_perm(mask, mask, reverse);
2445 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2446 const unsigned char *__b) {
2447 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2451 #ifdef __LITTLE_ENDIAN__
2452 static vector unsigned char __ATTRS_o_ai
2453 __attribute__((__deprecated__("use assignment for unaligned little endian \
2454 loads/stores"))) vec_lvsr(int __a, const short *__b) {
2455 vector unsigned char mask =
2456 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2457 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2458 7, 6, 5, 4, 3, 2, 1, 0};
2459 return vec_perm(mask, mask, reverse);
2462 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const short *__b) {
2463 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2467 #ifdef __LITTLE_ENDIAN__
2468 static vector unsigned char __ATTRS_o_ai
2469 __attribute__((__deprecated__("use assignment for unaligned little endian \
2470 loads/stores"))) vec_lvsr(int __a, const unsigned short *__b) {
2471 vector unsigned char mask =
2472 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2473 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2474 7, 6, 5, 4, 3, 2, 1, 0};
2475 return vec_perm(mask, mask, reverse);
2478 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2479 const unsigned short *__b) {
2480 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2484 #ifdef __LITTLE_ENDIAN__
2485 static vector unsigned char __ATTRS_o_ai
2486 __attribute__((__deprecated__("use assignment for unaligned little endian \
2487 loads/stores"))) vec_lvsr(int __a, const int *__b) {
2488 vector unsigned char mask =
2489 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2490 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2491 7, 6, 5, 4, 3, 2, 1, 0};
2492 return vec_perm(mask, mask, reverse);
2495 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const int *__b) {
2496 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2500 #ifdef __LITTLE_ENDIAN__
2501 static vector unsigned char __ATTRS_o_ai
2502 __attribute__((__deprecated__("use assignment for unaligned little endian \
2503 loads/stores"))) vec_lvsr(int __a, const unsigned int *__b) {
2504 vector unsigned char mask =
2505 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2506 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2507 7, 6, 5, 4, 3, 2, 1, 0};
2508 return vec_perm(mask, mask, reverse);
2511 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2512 const unsigned int *__b) {
2513 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2517 #ifdef __LITTLE_ENDIAN__
2518 static vector unsigned char __ATTRS_o_ai
2519 __attribute__((__deprecated__("use assignment for unaligned little endian \
2520 loads/stores"))) vec_lvsr(int __a, const float *__b) {
2521 vector unsigned char mask =
2522 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2523 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2524 7, 6, 5, 4, 3, 2, 1, 0};
2525 return vec_perm(mask, mask, reverse);
2528 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const float *__b) {
2529 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2535 static vector float __attribute__((__always_inline__))
2536 vec_madd(vector float __a, vector float __b, vector float __c) {
2537 return __builtin_altivec_vmaddfp(__a, __b, __c);
2542 static vector float __attribute__((__always_inline__))
2543 vec_vmaddfp(vector float __a, vector float __b, vector float __c) {
2544 return __builtin_altivec_vmaddfp(__a, __b, __c);
2549 static vector signed short __attribute__((__always_inline__))
2550 vec_madds(vector signed short __a, vector signed short __b,
2551 vector signed short __c) {
2552 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2556 static vector signed short __attribute__((__always_inline__))
2557 vec_vmhaddshs(vector signed short __a, vector signed short __b,
2558 vector signed short __c) {
2559 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2564 static vector signed char __ATTRS_o_ai vec_max(vector signed char __a,
2565 vector signed char __b) {
2566 return __builtin_altivec_vmaxsb(__a, __b);
2569 static vector signed char __ATTRS_o_ai vec_max(vector bool char __a,
2570 vector signed char __b) {
2571 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2574 static vector signed char __ATTRS_o_ai vec_max(vector signed char __a,
2575 vector bool char __b) {
2576 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2579 static vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a,
2580 vector unsigned char __b) {
2581 return __builtin_altivec_vmaxub(__a, __b);
2584 static vector unsigned char __ATTRS_o_ai vec_max(vector bool char __a,
2585 vector unsigned char __b) {
2586 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2589 static vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a,
2590 vector bool char __b) {
2591 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2594 static vector short __ATTRS_o_ai vec_max(vector short __a, vector short __b) {
2595 return __builtin_altivec_vmaxsh(__a, __b);
2598 static vector short __ATTRS_o_ai vec_max(vector bool short __a,
2600 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2603 static vector short __ATTRS_o_ai vec_max(vector short __a,
2604 vector bool short __b) {
2605 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2608 static vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a,
2609 vector unsigned short __b) {
2610 return __builtin_altivec_vmaxuh(__a, __b);
2613 static vector unsigned short __ATTRS_o_ai vec_max(vector bool short __a,
2614 vector unsigned short __b) {
2615 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2618 static vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a,
2619 vector bool short __b) {
2620 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2623 static vector int __ATTRS_o_ai vec_max(vector int __a, vector int __b) {
2624 return __builtin_altivec_vmaxsw(__a, __b);
2627 static vector int __ATTRS_o_ai vec_max(vector bool int __a, vector int __b) {
2628 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2631 static vector int __ATTRS_o_ai vec_max(vector int __a, vector bool int __b) {
2632 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2635 static vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a,
2636 vector unsigned int __b) {
2637 return __builtin_altivec_vmaxuw(__a, __b);
2640 static vector unsigned int __ATTRS_o_ai vec_max(vector bool int __a,
2641 vector unsigned int __b) {
2642 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2645 static vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a,
2646 vector bool int __b) {
2647 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2650 #ifdef __POWER8_VECTOR__
2651 static vector signed long long __ATTRS_o_ai
2652 vec_max(vector signed long long __a, vector signed long long __b) {
2653 return __builtin_altivec_vmaxsd(__a, __b);
2656 static vector signed long long __ATTRS_o_ai
2657 vec_max(vector bool long long __a, vector signed long long __b) {
2658 return __builtin_altivec_vmaxsd((vector signed long long)__a, __b);
2661 static vector signed long long __ATTRS_o_ai vec_max(vector signed long long __a,
2662 vector bool long long __b) {
2663 return __builtin_altivec_vmaxsd(__a, (vector signed long long)__b);
2666 static vector unsigned long long __ATTRS_o_ai
2667 vec_max(vector unsigned long long __a, vector unsigned long long __b) {
2668 return __builtin_altivec_vmaxud(__a, __b);
2671 static vector unsigned long long __ATTRS_o_ai
2672 vec_max(vector bool long long __a, vector unsigned long long __b) {
2673 return __builtin_altivec_vmaxud((vector unsigned long long)__a, __b);
2676 static vector unsigned long long __ATTRS_o_ai
2677 vec_max(vector unsigned long long __a, vector bool long long __b) {
2678 return __builtin_altivec_vmaxud(__a, (vector unsigned long long)__b);
2682 static vector float __ATTRS_o_ai vec_max(vector float __a, vector float __b) {
2684 return __builtin_vsx_xvmaxsp(__a, __b);
2686 return __builtin_altivec_vmaxfp(__a, __b);
2691 static vector double __ATTRS_o_ai vec_max(vector double __a,
2692 vector double __b) {
2693 return __builtin_vsx_xvmaxdp(__a, __b);
2699 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a,
2700 vector signed char __b) {
2701 return __builtin_altivec_vmaxsb(__a, __b);
2704 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector bool char __a,
2705 vector signed char __b) {
2706 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2709 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a,
2710 vector bool char __b) {
2711 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2716 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a,
2717 vector unsigned char __b) {
2718 return __builtin_altivec_vmaxub(__a, __b);
2721 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector bool char __a,
2722 vector unsigned char __b) {
2723 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2726 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a,
2727 vector bool char __b) {
2728 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2733 static vector short __ATTRS_o_ai vec_vmaxsh(vector short __a,
2735 return __builtin_altivec_vmaxsh(__a, __b);
2738 static vector short __ATTRS_o_ai vec_vmaxsh(vector bool short __a,
2740 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2743 static vector short __ATTRS_o_ai vec_vmaxsh(vector short __a,
2744 vector bool short __b) {
2745 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2750 static vector unsigned short __ATTRS_o_ai
2751 vec_vmaxuh(vector unsigned short __a, vector unsigned short __b) {
2752 return __builtin_altivec_vmaxuh(__a, __b);
2755 static vector unsigned short __ATTRS_o_ai
2756 vec_vmaxuh(vector bool short __a, vector unsigned short __b) {
2757 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2760 static vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a,
2761 vector bool short __b) {
2762 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2767 static vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector int __b) {
2768 return __builtin_altivec_vmaxsw(__a, __b);
2771 static vector int __ATTRS_o_ai vec_vmaxsw(vector bool int __a, vector int __b) {
2772 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2775 static vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector bool int __b) {
2776 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2781 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a,
2782 vector unsigned int __b) {
2783 return __builtin_altivec_vmaxuw(__a, __b);
2786 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector bool int __a,
2787 vector unsigned int __b) {
2788 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2791 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a,
2792 vector bool int __b) {
2793 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2798 static vector float __attribute__((__always_inline__))
2799 vec_vmaxfp(vector float __a, vector float __b) {
2801 return __builtin_vsx_xvmaxsp(__a, __b);
2803 return __builtin_altivec_vmaxfp(__a, __b);
2809 static vector signed char __ATTRS_o_ai vec_mergeh(vector signed char __a,
2810 vector signed char __b) {
2811 return vec_perm(__a, __b,
2812 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2813 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2814 0x06, 0x16, 0x07, 0x17));
2817 static vector unsigned char __ATTRS_o_ai vec_mergeh(vector unsigned char __a,
2818 vector unsigned char __b) {
2819 return vec_perm(__a, __b,
2820 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2821 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2822 0x06, 0x16, 0x07, 0x17));
2825 static vector bool char __ATTRS_o_ai vec_mergeh(vector bool char __a,
2826 vector bool char __b) {
2827 return vec_perm(__a, __b,
2828 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2829 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2830 0x06, 0x16, 0x07, 0x17));
2833 static vector short __ATTRS_o_ai vec_mergeh(vector short __a,
2835 return vec_perm(__a, __b,
2836 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2837 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2838 0x06, 0x07, 0x16, 0x17));
2841 static vector unsigned short __ATTRS_o_ai
2842 vec_mergeh(vector unsigned short __a, vector unsigned short __b) {
2843 return vec_perm(__a, __b,
2844 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2845 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2846 0x06, 0x07, 0x16, 0x17));
2849 static vector bool short __ATTRS_o_ai vec_mergeh(vector bool short __a,
2850 vector bool short __b) {
2851 return vec_perm(__a, __b,
2852 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2853 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2854 0x06, 0x07, 0x16, 0x17));
2857 static vector pixel __ATTRS_o_ai vec_mergeh(vector pixel __a,
2859 return vec_perm(__a, __b,
2860 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2861 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2862 0x06, 0x07, 0x16, 0x17));
2865 static vector int __ATTRS_o_ai vec_mergeh(vector int __a, vector int __b) {
2866 return vec_perm(__a, __b,
2867 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2868 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2869 0x14, 0x15, 0x16, 0x17));
2872 static vector unsigned int __ATTRS_o_ai vec_mergeh(vector unsigned int __a,
2873 vector unsigned int __b) {
2874 return vec_perm(__a, __b,
2875 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2876 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2877 0x14, 0x15, 0x16, 0x17));
2880 static vector bool int __ATTRS_o_ai vec_mergeh(vector bool int __a,
2881 vector bool int __b) {
2882 return vec_perm(__a, __b,
2883 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2884 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2885 0x14, 0x15, 0x16, 0x17));
2888 static vector float __ATTRS_o_ai vec_mergeh(vector float __a,
2890 return vec_perm(__a, __b,
2891 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2892 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2893 0x14, 0x15, 0x16, 0x17));
2898 #define __builtin_altivec_vmrghb vec_vmrghb
2900 static vector signed char __ATTRS_o_ai vec_vmrghb(vector signed char __a,
2901 vector signed char __b) {
2902 return vec_perm(__a, __b,
2903 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2904 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2905 0x06, 0x16, 0x07, 0x17));
2908 static vector unsigned char __ATTRS_o_ai vec_vmrghb(vector unsigned char __a,
2909 vector unsigned char __b) {
2910 return vec_perm(__a, __b,
2911 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2912 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2913 0x06, 0x16, 0x07, 0x17));
2916 static vector bool char __ATTRS_o_ai vec_vmrghb(vector bool char __a,
2917 vector bool char __b) {
2918 return vec_perm(__a, __b,
2919 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2920 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2921 0x06, 0x16, 0x07, 0x17));
2926 #define __builtin_altivec_vmrghh vec_vmrghh
2928 static vector short __ATTRS_o_ai vec_vmrghh(vector short __a,
2930 return vec_perm(__a, __b,
2931 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2932 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2933 0x06, 0x07, 0x16, 0x17));
2936 static vector unsigned short __ATTRS_o_ai
2937 vec_vmrghh(vector unsigned short __a, vector unsigned short __b) {
2938 return vec_perm(__a, __b,
2939 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2940 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2941 0x06, 0x07, 0x16, 0x17));
2944 static vector bool short __ATTRS_o_ai vec_vmrghh(vector bool short __a,
2945 vector bool short __b) {
2946 return vec_perm(__a, __b,
2947 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2948 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2949 0x06, 0x07, 0x16, 0x17));
2952 static vector pixel __ATTRS_o_ai vec_vmrghh(vector pixel __a,
2954 return vec_perm(__a, __b,
2955 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2956 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2957 0x06, 0x07, 0x16, 0x17));
2962 #define __builtin_altivec_vmrghw vec_vmrghw
2964 static vector int __ATTRS_o_ai vec_vmrghw(vector int __a, vector int __b) {
2965 return vec_perm(__a, __b,
2966 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2967 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2968 0x14, 0x15, 0x16, 0x17));
2971 static vector unsigned int __ATTRS_o_ai vec_vmrghw(vector unsigned int __a,
2972 vector unsigned int __b) {
2973 return vec_perm(__a, __b,
2974 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2975 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2976 0x14, 0x15, 0x16, 0x17));
2979 static vector bool int __ATTRS_o_ai vec_vmrghw(vector bool int __a,
2980 vector bool int __b) {
2981 return vec_perm(__a, __b,
2982 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2983 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2984 0x14, 0x15, 0x16, 0x17));
2987 static vector float __ATTRS_o_ai vec_vmrghw(vector float __a,
2989 return vec_perm(__a, __b,
2990 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2991 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2992 0x14, 0x15, 0x16, 0x17));
2997 static vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a,
2998 vector signed char __b) {
2999 return vec_perm(__a, __b,
3000 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3001 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3002 0x0E, 0x1E, 0x0F, 0x1F));
3005 static vector unsigned char __ATTRS_o_ai vec_mergel(vector unsigned char __a,
3006 vector unsigned char __b) {
3007 return vec_perm(__a, __b,
3008 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3009 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3010 0x0E, 0x1E, 0x0F, 0x1F));
3013 static vector bool char __ATTRS_o_ai vec_mergel(vector bool char __a,
3014 vector bool char __b) {
3015 return vec_perm(__a, __b,
3016 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3017 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3018 0x0E, 0x1E, 0x0F, 0x1F));
3021 static vector short __ATTRS_o_ai vec_mergel(vector short __a,
3023 return vec_perm(__a, __b,
3024 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3025 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3026 0x0E, 0x0F, 0x1E, 0x1F));
3029 static vector unsigned short __ATTRS_o_ai
3030 vec_mergel(vector unsigned short __a, vector unsigned short __b) {
3031 return vec_perm(__a, __b,
3032 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3033 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3034 0x0E, 0x0F, 0x1E, 0x1F));
3037 static vector bool short __ATTRS_o_ai vec_mergel(vector bool short __a,
3038 vector bool short __b) {
3039 return vec_perm(__a, __b,
3040 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3041 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3042 0x0E, 0x0F, 0x1E, 0x1F));
3045 static vector pixel __ATTRS_o_ai vec_mergel(vector pixel __a,
3047 return vec_perm(__a, __b,
3048 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3049 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3050 0x0E, 0x0F, 0x1E, 0x1F));
3053 static vector int __ATTRS_o_ai vec_mergel(vector int __a, vector int __b) {
3054 return vec_perm(__a, __b,
3055 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3056 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3057 0x1C, 0x1D, 0x1E, 0x1F));
3060 static vector unsigned int __ATTRS_o_ai vec_mergel(vector unsigned int __a,
3061 vector unsigned int __b) {
3062 return vec_perm(__a, __b,
3063 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3064 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3065 0x1C, 0x1D, 0x1E, 0x1F));
3068 static vector bool int __ATTRS_o_ai vec_mergel(vector bool int __a,
3069 vector bool int __b) {
3070 return vec_perm(__a, __b,
3071 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3072 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3073 0x1C, 0x1D, 0x1E, 0x1F));
3076 static vector float __ATTRS_o_ai vec_mergel(vector float __a,
3078 return vec_perm(__a, __b,
3079 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3080 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3081 0x1C, 0x1D, 0x1E, 0x1F));
3086 #define __builtin_altivec_vmrglb vec_vmrglb
3088 static vector signed char __ATTRS_o_ai vec_vmrglb(vector signed char __a,
3089 vector signed char __b) {
3090 return vec_perm(__a, __b,
3091 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3092 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3093 0x0E, 0x1E, 0x0F, 0x1F));
3096 static vector unsigned char __ATTRS_o_ai vec_vmrglb(vector unsigned char __a,
3097 vector unsigned char __b) {
3098 return vec_perm(__a, __b,
3099 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3100 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3101 0x0E, 0x1E, 0x0F, 0x1F));
3104 static vector bool char __ATTRS_o_ai vec_vmrglb(vector bool char __a,
3105 vector bool char __b) {
3106 return vec_perm(__a, __b,
3107 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3108 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3109 0x0E, 0x1E, 0x0F, 0x1F));
3114 #define __builtin_altivec_vmrglh vec_vmrglh
3116 static vector short __ATTRS_o_ai vec_vmrglh(vector short __a,
3118 return vec_perm(__a, __b,
3119 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3120 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3121 0x0E, 0x0F, 0x1E, 0x1F));
3124 static vector unsigned short __ATTRS_o_ai
3125 vec_vmrglh(vector unsigned short __a, vector unsigned short __b) {
3126 return vec_perm(__a, __b,
3127 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3128 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3129 0x0E, 0x0F, 0x1E, 0x1F));
3132 static vector bool short __ATTRS_o_ai vec_vmrglh(vector bool short __a,
3133 vector bool short __b) {
3134 return vec_perm(__a, __b,
3135 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3136 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3137 0x0E, 0x0F, 0x1E, 0x1F));
3140 static vector pixel __ATTRS_o_ai vec_vmrglh(vector pixel __a,
3142 return vec_perm(__a, __b,
3143 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3144 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3145 0x0E, 0x0F, 0x1E, 0x1F));
3150 #define __builtin_altivec_vmrglw vec_vmrglw
3152 static vector int __ATTRS_o_ai vec_vmrglw(vector int __a, vector int __b) {
3153 return vec_perm(__a, __b,
3154 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3155 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3156 0x1C, 0x1D, 0x1E, 0x1F));
3159 static vector unsigned int __ATTRS_o_ai vec_vmrglw(vector unsigned int __a,
3160 vector unsigned int __b) {
3161 return vec_perm(__a, __b,
3162 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3163 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3164 0x1C, 0x1D, 0x1E, 0x1F));
3167 static vector bool int __ATTRS_o_ai vec_vmrglw(vector bool int __a,
3168 vector bool int __b) {
3169 return vec_perm(__a, __b,
3170 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3171 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3172 0x1C, 0x1D, 0x1E, 0x1F));
3175 static vector float __ATTRS_o_ai vec_vmrglw(vector float __a,
3177 return vec_perm(__a, __b,
3178 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3179 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3180 0x1C, 0x1D, 0x1E, 0x1F));
3184 #ifdef __POWER8_VECTOR__
3187 static vector bool int __ATTRS_o_ai
3188 vec_mergee(vector bool int __a, vector bool int __b) {
3189 return vec_perm(__a, __b, (vector unsigned char)
3190 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3191 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B));
3194 static vector signed int __ATTRS_o_ai
3195 vec_mergee(vector signed int __a, vector signed int __b) {
3196 return vec_perm(__a, __b, (vector unsigned char)
3197 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3198 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B));
3201 static vector unsigned int __ATTRS_o_ai
3202 vec_mergee(vector unsigned int __a, vector unsigned int __b) {
3203 return vec_perm(__a, __b, (vector unsigned char)
3204 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3205 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B));
3210 static vector bool int __ATTRS_o_ai
3211 vec_mergeo(vector bool int __a, vector bool int __b) {
3212 return vec_perm(__a, __b, (vector unsigned char)
3213 (0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17,
3214 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3217 static vector signed int __ATTRS_o_ai
3218 vec_mergeo(vector signed int __a, vector signed int __b) {
3219 return vec_perm(__a, __b, (vector unsigned char)
3220 (0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17,
3221 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3224 static vector unsigned int __ATTRS_o_ai
3225 vec_mergeo(vector unsigned int __a, vector unsigned int __b) {
3226 return vec_perm(__a, __b, (vector unsigned char)
3227 (0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17,
3228 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3235 static vector unsigned short __attribute__((__always_inline__))
3237 return __builtin_altivec_mfvscr();
3242 static vector signed char __ATTRS_o_ai vec_min(vector signed char __a,
3243 vector signed char __b) {
3244 return __builtin_altivec_vminsb(__a, __b);
3247 static vector signed char __ATTRS_o_ai vec_min(vector bool char __a,
3248 vector signed char __b) {
3249 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3252 static vector signed char __ATTRS_o_ai vec_min(vector signed char __a,
3253 vector bool char __b) {
3254 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3257 static vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a,
3258 vector unsigned char __b) {
3259 return __builtin_altivec_vminub(__a, __b);
3262 static vector unsigned char __ATTRS_o_ai vec_min(vector bool char __a,
3263 vector unsigned char __b) {
3264 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3267 static vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a,
3268 vector bool char __b) {
3269 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3272 static vector short __ATTRS_o_ai vec_min(vector short __a, vector short __b) {
3273 return __builtin_altivec_vminsh(__a, __b);
3276 static vector short __ATTRS_o_ai vec_min(vector bool short __a,
3278 return __builtin_altivec_vminsh((vector short)__a, __b);
3281 static vector short __ATTRS_o_ai vec_min(vector short __a,
3282 vector bool short __b) {
3283 return __builtin_altivec_vminsh(__a, (vector short)__b);
3286 static vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a,
3287 vector unsigned short __b) {
3288 return __builtin_altivec_vminuh(__a, __b);
3291 static vector unsigned short __ATTRS_o_ai vec_min(vector bool short __a,
3292 vector unsigned short __b) {
3293 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3296 static vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a,
3297 vector bool short __b) {
3298 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3301 static vector int __ATTRS_o_ai vec_min(vector int __a, vector int __b) {
3302 return __builtin_altivec_vminsw(__a, __b);
3305 static vector int __ATTRS_o_ai vec_min(vector bool int __a, vector int __b) {
3306 return __builtin_altivec_vminsw((vector int)__a, __b);
3309 static vector int __ATTRS_o_ai vec_min(vector int __a, vector bool int __b) {
3310 return __builtin_altivec_vminsw(__a, (vector int)__b);
3313 static vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a,
3314 vector unsigned int __b) {
3315 return __builtin_altivec_vminuw(__a, __b);
3318 static vector unsigned int __ATTRS_o_ai vec_min(vector bool int __a,
3319 vector unsigned int __b) {
3320 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3323 static vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a,
3324 vector bool int __b) {
3325 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3328 #ifdef __POWER8_VECTOR__
3329 static vector signed long long __ATTRS_o_ai
3330 vec_min(vector signed long long __a, vector signed long long __b) {
3331 return __builtin_altivec_vminsd(__a, __b);
3334 static vector signed long long __ATTRS_o_ai
3335 vec_min(vector bool long long __a, vector signed long long __b) {
3336 return __builtin_altivec_vminsd((vector signed long long)__a, __b);
3339 static vector signed long long __ATTRS_o_ai vec_min(vector signed long long __a,
3340 vector bool long long __b) {
3341 return __builtin_altivec_vminsd(__a, (vector signed long long)__b);
3344 static vector unsigned long long __ATTRS_o_ai
3345 vec_min(vector unsigned long long __a, vector unsigned long long __b) {
3346 return __builtin_altivec_vminud(__a, __b);
3349 static vector unsigned long long __ATTRS_o_ai
3350 vec_min(vector bool long long __a, vector unsigned long long __b) {
3351 return __builtin_altivec_vminud((vector unsigned long long)__a, __b);
3354 static vector unsigned long long __ATTRS_o_ai
3355 vec_min(vector unsigned long long __a, vector bool long long __b) {
3356 return __builtin_altivec_vminud(__a, (vector unsigned long long)__b);
3360 static vector float __ATTRS_o_ai vec_min(vector float __a, vector float __b) {
3362 return __builtin_vsx_xvminsp(__a, __b);
3364 return __builtin_altivec_vminfp(__a, __b);
3369 static vector double __ATTRS_o_ai vec_min(vector double __a,
3370 vector double __b) {
3371 return __builtin_vsx_xvmindp(__a, __b);
3377 static vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a,
3378 vector signed char __b) {
3379 return __builtin_altivec_vminsb(__a, __b);
3382 static vector signed char __ATTRS_o_ai vec_vminsb(vector bool char __a,
3383 vector signed char __b) {
3384 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3387 static vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a,
3388 vector bool char __b) {
3389 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3394 static vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a,
3395 vector unsigned char __b) {
3396 return __builtin_altivec_vminub(__a, __b);
3399 static vector unsigned char __ATTRS_o_ai vec_vminub(vector bool char __a,
3400 vector unsigned char __b) {
3401 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3404 static vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a,
3405 vector bool char __b) {
3406 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3411 static vector short __ATTRS_o_ai vec_vminsh(vector short __a,
3413 return __builtin_altivec_vminsh(__a, __b);
3416 static vector short __ATTRS_o_ai vec_vminsh(vector bool short __a,
3418 return __builtin_altivec_vminsh((vector short)__a, __b);
3421 static vector short __ATTRS_o_ai vec_vminsh(vector short __a,
3422 vector bool short __b) {
3423 return __builtin_altivec_vminsh(__a, (vector short)__b);
3428 static vector unsigned short __ATTRS_o_ai
3429 vec_vminuh(vector unsigned short __a, vector unsigned short __b) {
3430 return __builtin_altivec_vminuh(__a, __b);
3433 static vector unsigned short __ATTRS_o_ai
3434 vec_vminuh(vector bool short __a, vector unsigned short __b) {
3435 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3438 static vector unsigned short __ATTRS_o_ai vec_vminuh(vector unsigned short __a,
3439 vector bool short __b) {
3440 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3445 static vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector int __b) {
3446 return __builtin_altivec_vminsw(__a, __b);
3449 static vector int __ATTRS_o_ai vec_vminsw(vector bool int __a, vector int __b) {
3450 return __builtin_altivec_vminsw((vector int)__a, __b);
3453 static vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector bool int __b) {
3454 return __builtin_altivec_vminsw(__a, (vector int)__b);
3459 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a,
3460 vector unsigned int __b) {
3461 return __builtin_altivec_vminuw(__a, __b);
3464 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector bool int __a,
3465 vector unsigned int __b) {
3466 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3469 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a,
3470 vector bool int __b) {
3471 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3476 static vector float __attribute__((__always_inline__))
3477 vec_vminfp(vector float __a, vector float __b) {
3479 return __builtin_vsx_xvminsp(__a, __b);
3481 return __builtin_altivec_vminfp(__a, __b);
3487 #define __builtin_altivec_vmladduhm vec_mladd
3489 static vector short __ATTRS_o_ai vec_mladd(vector short __a, vector short __b,
3491 return __a * __b + __c;
3494 static vector short __ATTRS_o_ai vec_mladd(vector short __a,
3495 vector unsigned short __b,
3496 vector unsigned short __c) {
3497 return __a * (vector short)__b + (vector short)__c;
3500 static vector short __ATTRS_o_ai vec_mladd(vector unsigned short __a,
3501 vector short __b, vector short __c) {
3502 return (vector short)__a * __b + __c;
3505 static vector unsigned short __ATTRS_o_ai vec_mladd(vector unsigned short __a,
3506 vector unsigned short __b,
3507 vector unsigned short __c) {
3508 return __a * __b + __c;
3513 static vector short __ATTRS_o_ai vec_vmladduhm(vector short __a,
3516 return __a * __b + __c;
3519 static vector short __ATTRS_o_ai vec_vmladduhm(vector short __a,
3520 vector unsigned short __b,
3521 vector unsigned short __c) {
3522 return __a * (vector short)__b + (vector short)__c;
3525 static vector short __ATTRS_o_ai vec_vmladduhm(vector unsigned short __a,
3528 return (vector short)__a * __b + __c;
3531 static vector unsigned short __ATTRS_o_ai
3532 vec_vmladduhm(vector unsigned short __a, vector unsigned short __b,
3533 vector unsigned short __c) {
3534 return __a * __b + __c;
3539 static vector short __attribute__((__always_inline__))
3540 vec_mradds(vector short __a, vector short __b, vector short __c) {
3541 return __builtin_altivec_vmhraddshs(__a, __b, __c);
3544 /* vec_vmhraddshs */
3546 static vector short __attribute__((__always_inline__))
3547 vec_vmhraddshs(vector short __a, vector short __b, vector short __c) {
3548 return __builtin_altivec_vmhraddshs(__a, __b, __c);
3553 static vector int __ATTRS_o_ai vec_msum(vector signed char __a,
3554 vector unsigned char __b,
3556 return __builtin_altivec_vmsummbm(__a, __b, __c);
3559 static vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned char __a,
3560 vector unsigned char __b,
3561 vector unsigned int __c) {
3562 return __builtin_altivec_vmsumubm(__a, __b, __c);
3565 static vector int __ATTRS_o_ai vec_msum(vector short __a, vector short __b,
3567 return __builtin_altivec_vmsumshm(__a, __b, __c);
3570 static vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned short __a,
3571 vector unsigned short __b,
3572 vector unsigned int __c) {
3573 return __builtin_altivec_vmsumuhm(__a, __b, __c);
3578 static vector int __attribute__((__always_inline__))
3579 vec_vmsummbm(vector signed char __a, vector unsigned char __b, vector int __c) {
3580 return __builtin_altivec_vmsummbm(__a, __b, __c);
3585 static vector unsigned int __attribute__((__always_inline__))
3586 vec_vmsumubm(vector unsigned char __a, vector unsigned char __b,
3587 vector unsigned int __c) {
3588 return __builtin_altivec_vmsumubm(__a, __b, __c);
3593 static vector int __attribute__((__always_inline__))
3594 vec_vmsumshm(vector short __a, vector short __b, vector int __c) {
3595 return __builtin_altivec_vmsumshm(__a, __b, __c);
3600 static vector unsigned int __attribute__((__always_inline__))
3601 vec_vmsumuhm(vector unsigned short __a, vector unsigned short __b,
3602 vector unsigned int __c) {
3603 return __builtin_altivec_vmsumuhm(__a, __b, __c);
3608 static vector int __ATTRS_o_ai vec_msums(vector short __a, vector short __b,
3610 return __builtin_altivec_vmsumshs(__a, __b, __c);
3613 static vector unsigned int __ATTRS_o_ai vec_msums(vector unsigned short __a,
3614 vector unsigned short __b,
3615 vector unsigned int __c) {
3616 return __builtin_altivec_vmsumuhs(__a, __b, __c);
3621 static vector int __attribute__((__always_inline__))
3622 vec_vmsumshs(vector short __a, vector short __b, vector int __c) {
3623 return __builtin_altivec_vmsumshs(__a, __b, __c);
3628 static vector unsigned int __attribute__((__always_inline__))
3629 vec_vmsumuhs(vector unsigned short __a, vector unsigned short __b,
3630 vector unsigned int __c) {
3631 return __builtin_altivec_vmsumuhs(__a, __b, __c);
3636 static void __ATTRS_o_ai vec_mtvscr(vector signed char __a) {
3637 __builtin_altivec_mtvscr((vector int)__a);
3640 static void __ATTRS_o_ai vec_mtvscr(vector unsigned char __a) {
3641 __builtin_altivec_mtvscr((vector int)__a);
3644 static void __ATTRS_o_ai vec_mtvscr(vector bool char __a) {
3645 __builtin_altivec_mtvscr((vector int)__a);
3648 static void __ATTRS_o_ai vec_mtvscr(vector short __a) {
3649 __builtin_altivec_mtvscr((vector int)__a);
3652 static void __ATTRS_o_ai vec_mtvscr(vector unsigned short __a) {
3653 __builtin_altivec_mtvscr((vector int)__a);
3656 static void __ATTRS_o_ai vec_mtvscr(vector bool short __a) {
3657 __builtin_altivec_mtvscr((vector int)__a);
3660 static void __ATTRS_o_ai vec_mtvscr(vector pixel __a) {
3661 __builtin_altivec_mtvscr((vector int)__a);
3664 static void __ATTRS_o_ai vec_mtvscr(vector int __a) {
3665 __builtin_altivec_mtvscr((vector int)__a);
3668 static void __ATTRS_o_ai vec_mtvscr(vector unsigned int __a) {
3669 __builtin_altivec_mtvscr((vector int)__a);
3672 static void __ATTRS_o_ai vec_mtvscr(vector bool int __a) {
3673 __builtin_altivec_mtvscr((vector int)__a);
3676 static void __ATTRS_o_ai vec_mtvscr(vector float __a) {
3677 __builtin_altivec_mtvscr((vector int)__a);
3680 /* The vmulos* and vmules* instructions have a big endian bias, so
3681 we must reverse the meaning of "even" and "odd" for little endian. */
3685 static vector short __ATTRS_o_ai vec_mule(vector signed char __a,
3686 vector signed char __b) {
3687 #ifdef __LITTLE_ENDIAN__
3688 return __builtin_altivec_vmulosb(__a, __b);
3690 return __builtin_altivec_vmulesb(__a, __b);
3694 static vector unsigned short __ATTRS_o_ai vec_mule(vector unsigned char __a,
3695 vector unsigned char __b) {
3696 #ifdef __LITTLE_ENDIAN__
3697 return __builtin_altivec_vmuloub(__a, __b);
3699 return __builtin_altivec_vmuleub(__a, __b);
3703 static vector int __ATTRS_o_ai vec_mule(vector short __a, vector short __b) {
3704 #ifdef __LITTLE_ENDIAN__
3705 return __builtin_altivec_vmulosh(__a, __b);
3707 return __builtin_altivec_vmulesh(__a, __b);
3711 static vector unsigned int __ATTRS_o_ai vec_mule(vector unsigned short __a,
3712 vector unsigned short __b) {
3713 #ifdef __LITTLE_ENDIAN__
3714 return __builtin_altivec_vmulouh(__a, __b);
3716 return __builtin_altivec_vmuleuh(__a, __b);
3720 #ifdef __POWER8_VECTOR__
3721 static vector signed long long __ATTRS_o_ai vec_mule(vector signed int __a,
3722 vector signed int __b) {
3723 #ifdef __LITTLE_ENDIAN__
3724 return __builtin_altivec_vmulosw(__a, __b);
3726 return __builtin_altivec_vmulesw(__a, __b);
3730 static vector unsigned long long __ATTRS_o_ai
3731 vec_mule(vector unsigned int __a, vector unsigned int __b) {
3732 #ifdef __LITTLE_ENDIAN__
3733 return __builtin_altivec_vmulouw(__a, __b);
3735 return __builtin_altivec_vmuleuw(__a, __b);
3742 static vector short __attribute__((__always_inline__))
3743 vec_vmulesb(vector signed char __a, vector signed char __b) {
3744 #ifdef __LITTLE_ENDIAN__
3745 return __builtin_altivec_vmulosb(__a, __b);
3747 return __builtin_altivec_vmulesb(__a, __b);
3753 static vector unsigned short __attribute__((__always_inline__))
3754 vec_vmuleub(vector unsigned char __a, vector unsigned char __b) {
3755 #ifdef __LITTLE_ENDIAN__
3756 return __builtin_altivec_vmuloub(__a, __b);
3758 return __builtin_altivec_vmuleub(__a, __b);
3764 static vector int __attribute__((__always_inline__))
3765 vec_vmulesh(vector short __a, vector short __b) {
3766 #ifdef __LITTLE_ENDIAN__
3767 return __builtin_altivec_vmulosh(__a, __b);
3769 return __builtin_altivec_vmulesh(__a, __b);
3775 static vector unsigned int __attribute__((__always_inline__))
3776 vec_vmuleuh(vector unsigned short __a, vector unsigned short __b) {
3777 #ifdef __LITTLE_ENDIAN__
3778 return __builtin_altivec_vmulouh(__a, __b);
3780 return __builtin_altivec_vmuleuh(__a, __b);
3786 static vector short __ATTRS_o_ai vec_mulo(vector signed char __a,
3787 vector signed char __b) {
3788 #ifdef __LITTLE_ENDIAN__
3789 return __builtin_altivec_vmulesb(__a, __b);
3791 return __builtin_altivec_vmulosb(__a, __b);
3795 static vector unsigned short __ATTRS_o_ai vec_mulo(vector unsigned char __a,
3796 vector unsigned char __b) {
3797 #ifdef __LITTLE_ENDIAN__
3798 return __builtin_altivec_vmuleub(__a, __b);
3800 return __builtin_altivec_vmuloub(__a, __b);
3804 static vector int __ATTRS_o_ai vec_mulo(vector short __a, vector short __b) {
3805 #ifdef __LITTLE_ENDIAN__
3806 return __builtin_altivec_vmulesh(__a, __b);
3808 return __builtin_altivec_vmulosh(__a, __b);
3812 static vector unsigned int __ATTRS_o_ai vec_mulo(vector unsigned short __a,
3813 vector unsigned short __b) {
3814 #ifdef __LITTLE_ENDIAN__
3815 return __builtin_altivec_vmuleuh(__a, __b);
3817 return __builtin_altivec_vmulouh(__a, __b);
3821 #ifdef __POWER8_VECTOR__
3822 static vector signed long long __ATTRS_o_ai vec_mulo(vector signed int __a,
3823 vector signed int __b) {
3824 #ifdef __LITTLE_ENDIAN__
3825 return __builtin_altivec_vmulesw(__a, __b);
3827 return __builtin_altivec_vmulosw(__a, __b);
3831 static vector unsigned long long __ATTRS_o_ai
3832 vec_mulo(vector unsigned int __a, vector unsigned int __b) {
3833 #ifdef __LITTLE_ENDIAN__
3834 return __builtin_altivec_vmuleuw(__a, __b);
3836 return __builtin_altivec_vmulouw(__a, __b);
3843 static vector short __attribute__((__always_inline__))
3844 vec_vmulosb(vector signed char __a, vector signed char __b) {
3845 #ifdef __LITTLE_ENDIAN__
3846 return __builtin_altivec_vmulesb(__a, __b);
3848 return __builtin_altivec_vmulosb(__a, __b);
3854 static vector unsigned short __attribute__((__always_inline__))
3855 vec_vmuloub(vector unsigned char __a, vector unsigned char __b) {
3856 #ifdef __LITTLE_ENDIAN__
3857 return __builtin_altivec_vmuleub(__a, __b);
3859 return __builtin_altivec_vmuloub(__a, __b);
3865 static vector int __attribute__((__always_inline__))
3866 vec_vmulosh(vector short __a, vector short __b) {
3867 #ifdef __LITTLE_ENDIAN__
3868 return __builtin_altivec_vmulesh(__a, __b);
3870 return __builtin_altivec_vmulosh(__a, __b);
3876 static vector unsigned int __attribute__((__always_inline__))
3877 vec_vmulouh(vector unsigned short __a, vector unsigned short __b) {
3878 #ifdef __LITTLE_ENDIAN__
3879 return __builtin_altivec_vmuleuh(__a, __b);
3881 return __builtin_altivec_vmulouh(__a, __b);
3887 static vector float __attribute__((__always_inline__))
3888 vec_nmsub(vector float __a, vector float __b, vector float __c) {
3889 return __builtin_altivec_vnmsubfp(__a, __b, __c);
3894 static vector float __attribute__((__always_inline__))
3895 vec_vnmsubfp(vector float __a, vector float __b, vector float __c) {
3896 return __builtin_altivec_vnmsubfp(__a, __b, __c);
3901 #define __builtin_altivec_vnor vec_nor
3903 static vector signed char __ATTRS_o_ai vec_nor(vector signed char __a,
3904 vector signed char __b) {
3905 return ~(__a | __b);
3908 static vector unsigned char __ATTRS_o_ai vec_nor(vector unsigned char __a,
3909 vector unsigned char __b) {
3910 return ~(__a | __b);
3913 static vector bool char __ATTRS_o_ai vec_nor(vector bool char __a,
3914 vector bool char __b) {
3915 return ~(__a | __b);
3918 static vector short __ATTRS_o_ai vec_nor(vector short __a, vector short __b) {
3919 return ~(__a | __b);
3922 static vector unsigned short __ATTRS_o_ai vec_nor(vector unsigned short __a,
3923 vector unsigned short __b) {
3924 return ~(__a | __b);
3927 static vector bool short __ATTRS_o_ai vec_nor(vector bool short __a,
3928 vector bool short __b) {
3929 return ~(__a | __b);
3932 static vector int __ATTRS_o_ai vec_nor(vector int __a, vector int __b) {
3933 return ~(__a | __b);
3936 static vector unsigned int __ATTRS_o_ai vec_nor(vector unsigned int __a,
3937 vector unsigned int __b) {
3938 return ~(__a | __b);
3941 static vector bool int __ATTRS_o_ai vec_nor(vector bool int __a,
3942 vector bool int __b) {
3943 return ~(__a | __b);
3946 static vector float __ATTRS_o_ai vec_nor(vector float __a, vector float __b) {
3947 vector unsigned int __res =
3948 ~((vector unsigned int)__a | (vector unsigned int)__b);
3949 return (vector float)__res;
3954 static vector signed char __ATTRS_o_ai vec_vnor(vector signed char __a,
3955 vector signed char __b) {
3956 return ~(__a | __b);
3959 static vector unsigned char __ATTRS_o_ai vec_vnor(vector unsigned char __a,
3960 vector unsigned char __b) {
3961 return ~(__a | __b);
3964 static vector bool char __ATTRS_o_ai vec_vnor(vector bool char __a,
3965 vector bool char __b) {
3966 return ~(__a | __b);
3969 static vector short __ATTRS_o_ai vec_vnor(vector short __a, vector short __b) {
3970 return ~(__a | __b);
3973 static vector unsigned short __ATTRS_o_ai vec_vnor(vector unsigned short __a,
3974 vector unsigned short __b) {
3975 return ~(__a | __b);
3978 static vector bool short __ATTRS_o_ai vec_vnor(vector bool short __a,
3979 vector bool short __b) {
3980 return ~(__a | __b);
3983 static vector int __ATTRS_o_ai vec_vnor(vector int __a, vector int __b) {
3984 return ~(__a | __b);
3987 static vector unsigned int __ATTRS_o_ai vec_vnor(vector unsigned int __a,
3988 vector unsigned int __b) {
3989 return ~(__a | __b);
3992 static vector bool int __ATTRS_o_ai vec_vnor(vector bool int __a,
3993 vector bool int __b) {
3994 return ~(__a | __b);
3997 static vector float __ATTRS_o_ai vec_vnor(vector float __a, vector float __b) {
3998 vector unsigned int __res =
3999 ~((vector unsigned int)__a | (vector unsigned int)__b);
4000 return (vector float)__res;
4004 static vector signed long long __ATTRS_o_ai
4005 vec_nor(vector signed long long __a, vector signed long long __b) {
4006 return ~(__a | __b);
4009 static vector unsigned long long __ATTRS_o_ai
4010 vec_nor(vector unsigned long long __a, vector unsigned long long __b) {
4011 return ~(__a | __b);
4014 static vector bool long long __ATTRS_o_ai vec_nor(vector bool long long __a,
4015 vector bool long long __b) {
4016 return ~(__a | __b);
4022 #define __builtin_altivec_vor vec_or
4024 static vector signed char __ATTRS_o_ai vec_or(vector signed char __a,
4025 vector signed char __b) {
4029 static vector signed char __ATTRS_o_ai vec_or(vector bool char __a,
4030 vector signed char __b) {
4031 return (vector signed char)__a | __b;
4034 static vector signed char __ATTRS_o_ai vec_or(vector signed char __a,
4035 vector bool char __b) {
4036 return __a | (vector signed char)__b;
4039 static vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a,
4040 vector unsigned char __b) {
4044 static vector unsigned char __ATTRS_o_ai vec_or(vector bool char __a,
4045 vector unsigned char __b) {
4046 return (vector unsigned char)__a | __b;
4049 static vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a,
4050 vector bool char __b) {
4051 return __a | (vector unsigned char)__b;
4054 static vector bool char __ATTRS_o_ai vec_or(vector bool char __a,
4055 vector bool char __b) {
4059 static vector short __ATTRS_o_ai vec_or(vector short __a, vector short __b) {
4063 static vector short __ATTRS_o_ai vec_or(vector bool short __a,
4065 return (vector short)__a | __b;
4068 static vector short __ATTRS_o_ai vec_or(vector short __a,
4069 vector bool short __b) {
4070 return __a | (vector short)__b;
4073 static vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a,
4074 vector unsigned short __b) {
4078 static vector unsigned short __ATTRS_o_ai vec_or(vector bool short __a,
4079 vector unsigned short __b) {
4080 return (vector unsigned short)__a | __b;
4083 static vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a,
4084 vector bool short __b) {
4085 return __a | (vector unsigned short)__b;
4088 static vector bool short __ATTRS_o_ai vec_or(vector bool short __a,
4089 vector bool short __b) {
4093 static vector int __ATTRS_o_ai vec_or(vector int __a, vector int __b) {
4097 static vector int __ATTRS_o_ai vec_or(vector bool int __a, vector int __b) {
4098 return (vector int)__a | __b;
4101 static vector int __ATTRS_o_ai vec_or(vector int __a, vector bool int __b) {
4102 return __a | (vector int)__b;
4105 static vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a,
4106 vector unsigned int __b) {
4110 static vector unsigned int __ATTRS_o_ai vec_or(vector bool int __a,
4111 vector unsigned int __b) {
4112 return (vector unsigned int)__a | __b;
4115 static vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a,
4116 vector bool int __b) {
4117 return __a | (vector unsigned int)__b;
4120 static vector bool int __ATTRS_o_ai vec_or(vector bool int __a,
4121 vector bool int __b) {
4125 static vector float __ATTRS_o_ai vec_or(vector float __a, vector float __b) {
4126 vector unsigned int __res =
4127 (vector unsigned int)__a | (vector unsigned int)__b;
4128 return (vector float)__res;
4131 static vector float __ATTRS_o_ai vec_or(vector bool int __a, vector float __b) {
4132 vector unsigned int __res =
4133 (vector unsigned int)__a | (vector unsigned int)__b;
4134 return (vector float)__res;
4137 static vector float __ATTRS_o_ai vec_or(vector float __a, vector bool int __b) {
4138 vector unsigned int __res =
4139 (vector unsigned int)__a | (vector unsigned int)__b;
4140 return (vector float)__res;
4144 static vector signed long long __ATTRS_o_ai
4145 vec_or(vector signed long long __a, vector signed long long __b) {
4149 static vector signed long long __ATTRS_o_ai
4150 vec_or(vector bool long long __a, vector signed long long __b) {
4151 return (vector signed long long)__a | __b;
4154 static vector signed long long __ATTRS_o_ai vec_or(vector signed long long __a,
4155 vector bool long long __b) {
4156 return __a | (vector signed long long)__b;
4159 static vector unsigned long long __ATTRS_o_ai
4160 vec_or(vector unsigned long long __a, vector unsigned long long __b) {
4164 static vector unsigned long long __ATTRS_o_ai
4165 vec_or(vector bool long long __a, vector unsigned long long __b) {
4166 return (vector unsigned long long)__a | __b;
4169 static vector unsigned long long __ATTRS_o_ai
4170 vec_or(vector unsigned long long __a, vector bool long long __b) {
4171 return __a | (vector unsigned long long)__b;
4174 static vector bool long long __ATTRS_o_ai vec_or(vector bool long long __a,
4175 vector bool long long __b) {
4182 static vector signed char __ATTRS_o_ai vec_vor(vector signed char __a,
4183 vector signed char __b) {
4187 static vector signed char __ATTRS_o_ai vec_vor(vector bool char __a,
4188 vector signed char __b) {
4189 return (vector signed char)__a | __b;
4192 static vector signed char __ATTRS_o_ai vec_vor(vector signed char __a,
4193 vector bool char __b) {
4194 return __a | (vector signed char)__b;
4197 static vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a,
4198 vector unsigned char __b) {
4202 static vector unsigned char __ATTRS_o_ai vec_vor(vector bool char __a,
4203 vector unsigned char __b) {
4204 return (vector unsigned char)__a | __b;
4207 static vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a,
4208 vector bool char __b) {
4209 return __a | (vector unsigned char)__b;
4212 static vector bool char __ATTRS_o_ai vec_vor(vector bool char __a,
4213 vector bool char __b) {
4217 static vector short __ATTRS_o_ai vec_vor(vector short __a, vector short __b) {
4221 static vector short __ATTRS_o_ai vec_vor(vector bool short __a,
4223 return (vector short)__a | __b;
4226 static vector short __ATTRS_o_ai vec_vor(vector short __a,
4227 vector bool short __b) {
4228 return __a | (vector short)__b;
4231 static vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a,
4232 vector unsigned short __b) {
4236 static vector unsigned short __ATTRS_o_ai vec_vor(vector bool short __a,
4237 vector unsigned short __b) {
4238 return (vector unsigned short)__a | __b;
4241 static vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a,
4242 vector bool short __b) {
4243 return __a | (vector unsigned short)__b;
4246 static vector bool short __ATTRS_o_ai vec_vor(vector bool short __a,
4247 vector bool short __b) {
4251 static vector int __ATTRS_o_ai vec_vor(vector int __a, vector int __b) {
4255 static vector int __ATTRS_o_ai vec_vor(vector bool int __a, vector int __b) {
4256 return (vector int)__a | __b;
4259 static vector int __ATTRS_o_ai vec_vor(vector int __a, vector bool int __b) {
4260 return __a | (vector int)__b;
4263 static vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a,
4264 vector unsigned int __b) {
4268 static vector unsigned int __ATTRS_o_ai vec_vor(vector bool int __a,
4269 vector unsigned int __b) {
4270 return (vector unsigned int)__a | __b;
4273 static vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a,
4274 vector bool int __b) {
4275 return __a | (vector unsigned int)__b;
4278 static vector bool int __ATTRS_o_ai vec_vor(vector bool int __a,
4279 vector bool int __b) {
4283 static vector float __ATTRS_o_ai vec_vor(vector float __a, vector float __b) {
4284 vector unsigned int __res =
4285 (vector unsigned int)__a | (vector unsigned int)__b;
4286 return (vector float)__res;
4289 static vector float __ATTRS_o_ai vec_vor(vector bool int __a,
4291 vector unsigned int __res =
4292 (vector unsigned int)__a | (vector unsigned int)__b;
4293 return (vector float)__res;
4296 static vector float __ATTRS_o_ai vec_vor(vector float __a,
4297 vector bool int __b) {
4298 vector unsigned int __res =
4299 (vector unsigned int)__a | (vector unsigned int)__b;
4300 return (vector float)__res;
4304 static vector signed long long __ATTRS_o_ai
4305 vec_vor(vector signed long long __a, vector signed long long __b) {
4309 static vector signed long long __ATTRS_o_ai
4310 vec_vor(vector bool long long __a, vector signed long long __b) {
4311 return (vector signed long long)__a | __b;
4314 static vector signed long long __ATTRS_o_ai vec_vor(vector signed long long __a,
4315 vector bool long long __b) {
4316 return __a | (vector signed long long)__b;
4319 static vector unsigned long long __ATTRS_o_ai
4320 vec_vor(vector unsigned long long __a, vector unsigned long long __b) {
4324 static vector unsigned long long __ATTRS_o_ai
4325 vec_vor(vector bool long long __a, vector unsigned long long __b) {
4326 return (vector unsigned long long)__a | __b;
4329 static vector unsigned long long __ATTRS_o_ai
4330 vec_vor(vector unsigned long long __a, vector bool long long __b) {
4331 return __a | (vector unsigned long long)__b;
4334 static vector bool long long __ATTRS_o_ai vec_vor(vector bool long long __a,
4335 vector bool long long __b) {
4342 /* The various vector pack instructions have a big-endian bias, so for
4343 little endian we must handle reversed element numbering. */
4345 static vector signed char __ATTRS_o_ai vec_pack(vector signed short __a,
4346 vector signed short __b) {
4347 #ifdef __LITTLE_ENDIAN__
4348 return (vector signed char)vec_perm(
4350 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4351 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4353 return (vector signed char)vec_perm(
4355 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4356 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4360 static vector unsigned char __ATTRS_o_ai vec_pack(vector unsigned short __a,
4361 vector unsigned short __b) {
4362 #ifdef __LITTLE_ENDIAN__
4363 return (vector unsigned char)vec_perm(
4365 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4366 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4368 return (vector unsigned char)vec_perm(
4370 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4371 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4375 static vector bool char __ATTRS_o_ai vec_pack(vector bool short __a,
4376 vector bool short __b) {
4377 #ifdef __LITTLE_ENDIAN__
4378 return (vector bool char)vec_perm(
4380 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4381 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4383 return (vector bool char)vec_perm(
4385 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4386 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4390 static vector short __ATTRS_o_ai vec_pack(vector int __a, vector int __b) {
4391 #ifdef __LITTLE_ENDIAN__
4392 return (vector short)vec_perm(
4394 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4395 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4397 return (vector short)vec_perm(
4399 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4400 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4404 static vector unsigned short __ATTRS_o_ai vec_pack(vector unsigned int __a,
4405 vector unsigned int __b) {
4406 #ifdef __LITTLE_ENDIAN__
4407 return (vector unsigned short)vec_perm(
4409 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4410 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4412 return (vector unsigned short)vec_perm(
4414 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4415 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4419 static vector bool short __ATTRS_o_ai vec_pack(vector bool int __a,
4420 vector bool int __b) {
4421 #ifdef __LITTLE_ENDIAN__
4422 return (vector bool short)vec_perm(
4424 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4425 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4427 return (vector bool short)vec_perm(
4429 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4430 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4436 #define __builtin_altivec_vpkuhum vec_vpkuhum
4438 static vector signed char __ATTRS_o_ai vec_vpkuhum(vector signed short __a,
4439 vector signed short __b) {
4440 #ifdef __LITTLE_ENDIAN__
4441 return (vector signed char)vec_perm(
4443 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4444 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4446 return (vector signed char)vec_perm(
4448 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4449 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4453 static vector unsigned char __ATTRS_o_ai
4454 vec_vpkuhum(vector unsigned short __a, vector unsigned short __b) {
4455 #ifdef __LITTLE_ENDIAN__
4456 return (vector unsigned char)vec_perm(
4458 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4459 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4461 return (vector unsigned char)vec_perm(
4463 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4464 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4468 static vector bool char __ATTRS_o_ai vec_vpkuhum(vector bool short __a,
4469 vector bool short __b) {
4470 #ifdef __LITTLE_ENDIAN__
4471 return (vector bool char)vec_perm(
4473 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4474 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4476 return (vector bool char)vec_perm(
4478 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4479 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4485 #define __builtin_altivec_vpkuwum vec_vpkuwum
4487 static vector short __ATTRS_o_ai vec_vpkuwum(vector int __a, vector int __b) {
4488 #ifdef __LITTLE_ENDIAN__
4489 return (vector short)vec_perm(
4491 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4492 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4494 return (vector short)vec_perm(
4496 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4497 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4501 static vector unsigned short __ATTRS_o_ai vec_vpkuwum(vector unsigned int __a,
4502 vector unsigned int __b) {
4503 #ifdef __LITTLE_ENDIAN__
4504 return (vector unsigned short)vec_perm(
4506 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4507 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4509 return (vector unsigned short)vec_perm(
4511 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4512 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4516 static vector bool short __ATTRS_o_ai vec_vpkuwum(vector bool int __a,
4517 vector bool int __b) {
4518 #ifdef __LITTLE_ENDIAN__
4519 return (vector bool short)vec_perm(
4521 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4522 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4524 return (vector bool short)vec_perm(
4526 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4527 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4533 #ifdef __POWER8_VECTOR__
4534 #define __builtin_altivec_vpkudum vec_vpkudum
4536 static vector int __ATTRS_o_ai vec_vpkudum(vector long long __a,
4537 vector long long __b) {
4538 #ifdef __LITTLE_ENDIAN__
4539 return (vector int)vec_perm(
4541 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
4542 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
4544 return (vector int)vec_perm(
4546 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
4547 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
4551 static vector unsigned int __ATTRS_o_ai
4552 vec_vpkudum(vector unsigned long long __a, vector unsigned long long __b) {
4553 #ifdef __LITTLE_ENDIAN__
4554 return (vector unsigned int)vec_perm(
4556 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
4557 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
4559 return (vector unsigned int)vec_perm(
4561 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
4562 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
4566 static vector bool int __ATTRS_o_ai vec_vpkudum(vector bool long long __a,
4567 vector bool long long __b) {
4568 #ifdef __LITTLE_ENDIAN__
4569 return (vector bool int)vec_perm(
4570 (vector long long)__a, (vector long long)__b,
4571 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
4572 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
4574 return (vector bool int)vec_perm(
4575 (vector long long)__a, (vector long long)__b,
4576 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
4577 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
4584 static vector pixel __attribute__((__always_inline__))
4585 vec_packpx(vector unsigned int __a, vector unsigned int __b) {
4586 #ifdef __LITTLE_ENDIAN__
4587 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4589 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4595 static vector pixel __attribute__((__always_inline__))
4596 vec_vpkpx(vector unsigned int __a, vector unsigned int __b) {
4597 #ifdef __LITTLE_ENDIAN__
4598 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4600 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4606 static vector signed char __ATTRS_o_ai vec_packs(vector short __a,
4608 #ifdef __LITTLE_ENDIAN__
4609 return __builtin_altivec_vpkshss(__b, __a);
4611 return __builtin_altivec_vpkshss(__a, __b);
4615 static vector unsigned char __ATTRS_o_ai vec_packs(vector unsigned short __a,
4616 vector unsigned short __b) {
4617 #ifdef __LITTLE_ENDIAN__
4618 return __builtin_altivec_vpkuhus(__b, __a);
4620 return __builtin_altivec_vpkuhus(__a, __b);
4624 static vector signed short __ATTRS_o_ai vec_packs(vector int __a,
4626 #ifdef __LITTLE_ENDIAN__
4627 return __builtin_altivec_vpkswss(__b, __a);
4629 return __builtin_altivec_vpkswss(__a, __b);
4633 static vector unsigned short __ATTRS_o_ai vec_packs(vector unsigned int __a,
4634 vector unsigned int __b) {
4635 #ifdef __LITTLE_ENDIAN__
4636 return __builtin_altivec_vpkuwus(__b, __a);
4638 return __builtin_altivec_vpkuwus(__a, __b);
4642 #ifdef __POWER8_VECTOR__
4643 static vector int __ATTRS_o_ai vec_packs(vector long long __a,
4644 vector long long __b) {
4645 #ifdef __LITTLE_ENDIAN__
4646 return __builtin_altivec_vpksdss(__b, __a);
4648 return __builtin_altivec_vpksdss(__a, __b);
4652 static vector unsigned int __ATTRS_o_ai
4653 vec_packs(vector unsigned long long __a, vector unsigned long long __b) {
4654 #ifdef __LITTLE_ENDIAN__
4655 return __builtin_altivec_vpkudus(__b, __a);
4657 return __builtin_altivec_vpkudus(__a, __b);
4664 static vector signed char __attribute__((__always_inline__))
4665 vec_vpkshss(vector short __a, vector short __b) {
4666 #ifdef __LITTLE_ENDIAN__
4667 return __builtin_altivec_vpkshss(__b, __a);
4669 return __builtin_altivec_vpkshss(__a, __b);
4675 #ifdef __POWER8_VECTOR__
4676 static vector int __ATTRS_o_ai vec_vpksdss(vector long long __a,
4677 vector long long __b) {
4678 #ifdef __LITTLE_ENDIAN__
4679 return __builtin_altivec_vpksdss(__b, __a);
4681 return __builtin_altivec_vpksdss(__a, __b);
4688 static vector unsigned char __attribute__((__always_inline__))
4689 vec_vpkuhus(vector unsigned short __a, vector unsigned short __b) {
4690 #ifdef __LITTLE_ENDIAN__
4691 return __builtin_altivec_vpkuhus(__b, __a);
4693 return __builtin_altivec_vpkuhus(__a, __b);
4699 #ifdef __POWER8_VECTOR__
4700 static vector unsigned int __attribute__((__always_inline__))
4701 vec_vpkudus(vector unsigned long long __a, vector unsigned long long __b) {
4702 #ifdef __LITTLE_ENDIAN__
4703 return __builtin_altivec_vpkudus(__b, __a);
4705 return __builtin_altivec_vpkudus(__a, __b);
4712 static vector signed short __attribute__((__always_inline__))
4713 vec_vpkswss(vector int __a, vector int __b) {
4714 #ifdef __LITTLE_ENDIAN__
4715 return __builtin_altivec_vpkswss(__b, __a);
4717 return __builtin_altivec_vpkswss(__a, __b);
4723 static vector unsigned short __attribute__((__always_inline__))
4724 vec_vpkuwus(vector unsigned int __a, vector unsigned int __b) {
4725 #ifdef __LITTLE_ENDIAN__
4726 return __builtin_altivec_vpkuwus(__b, __a);
4728 return __builtin_altivec_vpkuwus(__a, __b);
4734 static vector unsigned char __ATTRS_o_ai vec_packsu(vector short __a,
4736 #ifdef __LITTLE_ENDIAN__
4737 return __builtin_altivec_vpkshus(__b, __a);
4739 return __builtin_altivec_vpkshus(__a, __b);
4743 static vector unsigned char __ATTRS_o_ai vec_packsu(vector unsigned short __a,
4744 vector unsigned short __b) {
4745 #ifdef __LITTLE_ENDIAN__
4746 return __builtin_altivec_vpkuhus(__b, __a);
4748 return __builtin_altivec_vpkuhus(__a, __b);
4752 static vector unsigned short __ATTRS_o_ai vec_packsu(vector int __a,
4754 #ifdef __LITTLE_ENDIAN__
4755 return __builtin_altivec_vpkswus(__b, __a);
4757 return __builtin_altivec_vpkswus(__a, __b);
4761 static vector unsigned short __ATTRS_o_ai vec_packsu(vector unsigned int __a,
4762 vector unsigned int __b) {
4763 #ifdef __LITTLE_ENDIAN__
4764 return __builtin_altivec_vpkuwus(__b, __a);
4766 return __builtin_altivec_vpkuwus(__a, __b);
4770 #ifdef __POWER8_VECTOR__
4771 static vector unsigned int __ATTRS_o_ai vec_packsu(vector long long __a,
4772 vector long long __b) {
4773 #ifdef __LITTLE_ENDIAN__
4774 return __builtin_altivec_vpksdus(__b, __a);
4776 return __builtin_altivec_vpksdus(__a, __b);
4780 static vector unsigned int __ATTRS_o_ai
4781 vec_packsu(vector unsigned long long __a, vector unsigned long long __b) {
4782 #ifdef __LITTLE_ENDIAN__
4783 return __builtin_altivec_vpkudus(__b, __a);
4785 return __builtin_altivec_vpkudus(__a, __b);
4792 static vector unsigned char __ATTRS_o_ai vec_vpkshus(vector short __a,
4794 #ifdef __LITTLE_ENDIAN__
4795 return __builtin_altivec_vpkshus(__b, __a);
4797 return __builtin_altivec_vpkshus(__a, __b);
4801 static vector unsigned char __ATTRS_o_ai
4802 vec_vpkshus(vector unsigned short __a, vector unsigned short __b) {
4803 #ifdef __LITTLE_ENDIAN__
4804 return __builtin_altivec_vpkuhus(__b, __a);
4806 return __builtin_altivec_vpkuhus(__a, __b);
4812 static vector unsigned short __ATTRS_o_ai vec_vpkswus(vector int __a,
4814 #ifdef __LITTLE_ENDIAN__
4815 return __builtin_altivec_vpkswus(__b, __a);
4817 return __builtin_altivec_vpkswus(__a, __b);
4821 static vector unsigned short __ATTRS_o_ai vec_vpkswus(vector unsigned int __a,
4822 vector unsigned int __b) {
4823 #ifdef __LITTLE_ENDIAN__
4824 return __builtin_altivec_vpkuwus(__b, __a);
4826 return __builtin_altivec_vpkuwus(__a, __b);
4832 #ifdef __POWER8_VECTOR__
4833 static vector unsigned int __ATTRS_o_ai vec_vpksdus(vector long long __a,
4834 vector long long __b) {
4835 #ifdef __LITTLE_ENDIAN__
4836 return __builtin_altivec_vpksdus(__b, __a);
4838 return __builtin_altivec_vpksdus(__a, __b);
4845 // The vperm instruction is defined architecturally with a big-endian bias.
4846 // For little endian, we swap the input operands and invert the permute
4847 // control vector. Only the rightmost 5 bits matter, so we could use
4848 // a vector of all 31s instead of all 255s to perform the inversion.
4849 // However, when the PCV is not a constant, using 255 has an advantage
4850 // in that the vec_xor can be recognized as a vec_nor (and for P8 and
4851 // later, possibly a vec_nand).
4853 static vector signed char __ATTRS_o_ai vec_perm(vector signed char __a,
4854 vector signed char __b,
4855 vector unsigned char __c) {
4856 #ifdef __LITTLE_ENDIAN__
4857 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4858 255, 255, 255, 255, 255, 255, 255, 255};
4859 __d = vec_xor(__c, __d);
4860 return (vector signed char)__builtin_altivec_vperm_4si((vector int)__b,
4861 (vector int)__a, __d);
4863 return (vector signed char)__builtin_altivec_vperm_4si((vector int)__a,
4864 (vector int)__b, __c);
4868 static vector unsigned char __ATTRS_o_ai vec_perm(vector unsigned char __a,
4869 vector unsigned char __b,
4870 vector unsigned char __c) {
4871 #ifdef __LITTLE_ENDIAN__
4872 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4873 255, 255, 255, 255, 255, 255, 255, 255};
4874 __d = vec_xor(__c, __d);
4875 return (vector unsigned char)__builtin_altivec_vperm_4si(
4876 (vector int)__b, (vector int)__a, __d);
4878 return (vector unsigned char)__builtin_altivec_vperm_4si(
4879 (vector int)__a, (vector int)__b, __c);
4883 static vector bool char __ATTRS_o_ai vec_perm(vector bool char __a,
4884 vector bool char __b,
4885 vector unsigned char __c) {
4886 #ifdef __LITTLE_ENDIAN__
4887 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4888 255, 255, 255, 255, 255, 255, 255, 255};
4889 __d = vec_xor(__c, __d);
4890 return (vector bool char)__builtin_altivec_vperm_4si((vector int)__b,
4891 (vector int)__a, __d);
4893 return (vector bool char)__builtin_altivec_vperm_4si((vector int)__a,
4894 (vector int)__b, __c);
4898 static vector short __ATTRS_o_ai vec_perm(vector short __a, vector short __b,
4899 vector unsigned char __c) {
4900 #ifdef __LITTLE_ENDIAN__
4901 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4902 255, 255, 255, 255, 255, 255, 255, 255};
4903 __d = vec_xor(__c, __d);
4904 return (vector short)__builtin_altivec_vperm_4si((vector int)__b,
4905 (vector int)__a, __d);
4907 return (vector short)__builtin_altivec_vperm_4si((vector int)__a,
4908 (vector int)__b, __c);
4912 static vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a,
4913 vector unsigned short __b,
4914 vector unsigned char __c) {
4915 #ifdef __LITTLE_ENDIAN__
4916 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4917 255, 255, 255, 255, 255, 255, 255, 255};
4918 __d = vec_xor(__c, __d);
4919 return (vector unsigned short)__builtin_altivec_vperm_4si(
4920 (vector int)__b, (vector int)__a, __d);
4922 return (vector unsigned short)__builtin_altivec_vperm_4si(
4923 (vector int)__a, (vector int)__b, __c);
4927 static vector bool short __ATTRS_o_ai vec_perm(vector bool short __a,
4928 vector bool short __b,
4929 vector unsigned char __c) {
4930 #ifdef __LITTLE_ENDIAN__
4931 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4932 255, 255, 255, 255, 255, 255, 255, 255};
4933 __d = vec_xor(__c, __d);
4934 return (vector bool short)__builtin_altivec_vperm_4si((vector int)__b,
4935 (vector int)__a, __d);
4937 return (vector bool short)__builtin_altivec_vperm_4si((vector int)__a,
4938 (vector int)__b, __c);
4942 static vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b,
4943 vector unsigned char __c) {
4944 #ifdef __LITTLE_ENDIAN__
4945 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4946 255, 255, 255, 255, 255, 255, 255, 255};
4947 __d = vec_xor(__c, __d);
4948 return (vector pixel)__builtin_altivec_vperm_4si((vector int)__b,
4949 (vector int)__a, __d);
4951 return (vector pixel)__builtin_altivec_vperm_4si((vector int)__a,
4952 (vector int)__b, __c);
4956 static vector int __ATTRS_o_ai vec_perm(vector int __a, vector int __b,
4957 vector unsigned char __c) {
4958 #ifdef __LITTLE_ENDIAN__
4959 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4960 255, 255, 255, 255, 255, 255, 255, 255};
4961 __d = vec_xor(__c, __d);
4962 return (vector int)__builtin_altivec_vperm_4si(__b, __a, __d);
4964 return (vector int)__builtin_altivec_vperm_4si(__a, __b, __c);
4968 static vector unsigned int __ATTRS_o_ai vec_perm(vector unsigned int __a,
4969 vector unsigned int __b,
4970 vector unsigned char __c) {
4971 #ifdef __LITTLE_ENDIAN__
4972 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4973 255, 255, 255, 255, 255, 255, 255, 255};
4974 __d = vec_xor(__c, __d);
4975 return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__b,
4976 (vector int)__a, __d);
4978 return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__a,
4979 (vector int)__b, __c);
4983 static vector bool int __ATTRS_o_ai vec_perm(vector bool int __a,
4984 vector bool int __b,
4985 vector unsigned char __c) {
4986 #ifdef __LITTLE_ENDIAN__
4987 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4988 255, 255, 255, 255, 255, 255, 255, 255};
4989 __d = vec_xor(__c, __d);
4990 return (vector bool int)__builtin_altivec_vperm_4si((vector int)__b,
4991 (vector int)__a, __d);
4993 return (vector bool int)__builtin_altivec_vperm_4si((vector int)__a,
4994 (vector int)__b, __c);
4998 static vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b,
4999 vector unsigned char __c) {
5000 #ifdef __LITTLE_ENDIAN__
5001 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5002 255, 255, 255, 255, 255, 255, 255, 255};
5003 __d = vec_xor(__c, __d);
5004 return (vector float)__builtin_altivec_vperm_4si((vector int)__b,
5005 (vector int)__a, __d);
5007 return (vector float)__builtin_altivec_vperm_4si((vector int)__a,
5008 (vector int)__b, __c);
5013 static vector long long __ATTRS_o_ai vec_perm(vector long long __a,
5014 vector long long __b,
5015 vector unsigned char __c) {
5016 #ifdef __LITTLE_ENDIAN__
5017 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5018 255, 255, 255, 255, 255, 255, 255, 255};
5019 __d = vec_xor(__c, __d);
5020 return (vector long long)__builtin_altivec_vperm_4si(__b, __a, __d);
5022 return (vector long long)__builtin_altivec_vperm_4si(__a, __b, __c);
5026 static vector unsigned long long __ATTRS_o_ai
5027 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
5028 vector unsigned char __c) {
5029 #ifdef __LITTLE_ENDIAN__
5030 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5031 255, 255, 255, 255, 255, 255, 255, 255};
5032 __d = vec_xor(__c, __d);
5033 return (vector unsigned long long)__builtin_altivec_vperm_4si(
5034 (vector int)__b, (vector int)__a, __d);
5036 return (vector unsigned long long)__builtin_altivec_vperm_4si(
5037 (vector int)__a, (vector int)__b, __c);
5041 static vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b,
5042 vector unsigned char __c) {
5043 #ifdef __LITTLE_ENDIAN__
5044 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5045 255, 255, 255, 255, 255, 255, 255, 255};
5046 __d = vec_xor(__c, __d);
5047 return (vector double)__builtin_altivec_vperm_4si((vector int)__b,
5048 (vector int)__a, __d);
5050 return (vector double)__builtin_altivec_vperm_4si((vector int)__a,
5051 (vector int)__b, __c);
5058 static vector signed char __ATTRS_o_ai vec_vperm(vector signed char __a,
5059 vector signed char __b,
5060 vector unsigned char __c) {
5061 return vec_perm(__a, __b, __c);
5064 static vector unsigned char __ATTRS_o_ai vec_vperm(vector unsigned char __a,
5065 vector unsigned char __b,
5066 vector unsigned char __c) {
5067 return vec_perm(__a, __b, __c);
5070 static vector bool char __ATTRS_o_ai vec_vperm(vector bool char __a,
5071 vector bool char __b,
5072 vector unsigned char __c) {
5073 return vec_perm(__a, __b, __c);
5076 static vector short __ATTRS_o_ai vec_vperm(vector short __a, vector short __b,
5077 vector unsigned char __c) {
5078 return vec_perm(__a, __b, __c);
5081 static vector unsigned short __ATTRS_o_ai vec_vperm(vector unsigned short __a,
5082 vector unsigned short __b,
5083 vector unsigned char __c) {
5084 return vec_perm(__a, __b, __c);
5087 static vector bool short __ATTRS_o_ai vec_vperm(vector bool short __a,
5088 vector bool short __b,
5089 vector unsigned char __c) {
5090 return vec_perm(__a, __b, __c);
5093 static vector pixel __ATTRS_o_ai vec_vperm(vector pixel __a, vector pixel __b,
5094 vector unsigned char __c) {
5095 return vec_perm(__a, __b, __c);
5098 static vector int __ATTRS_o_ai vec_vperm(vector int __a, vector int __b,
5099 vector unsigned char __c) {
5100 return vec_perm(__a, __b, __c);
5103 static vector unsigned int __ATTRS_o_ai vec_vperm(vector unsigned int __a,
5104 vector unsigned int __b,
5105 vector unsigned char __c) {
5106 return vec_perm(__a, __b, __c);
5109 static vector bool int __ATTRS_o_ai vec_vperm(vector bool int __a,
5110 vector bool int __b,
5111 vector unsigned char __c) {
5112 return vec_perm(__a, __b, __c);
5115 static vector float __ATTRS_o_ai vec_vperm(vector float __a, vector float __b,
5116 vector unsigned char __c) {
5117 return vec_perm(__a, __b, __c);
5121 static vector long long __ATTRS_o_ai vec_vperm(vector long long __a,
5122 vector long long __b,
5123 vector unsigned char __c) {
5124 return vec_perm(__a, __b, __c);
5127 static vector unsigned long long __ATTRS_o_ai
5128 vec_vperm(vector unsigned long long __a, vector unsigned long long __b,
5129 vector unsigned char __c) {
5130 return vec_perm(__a, __b, __c);
5133 static vector double __ATTRS_o_ai vec_vperm(vector double __a,
5135 vector unsigned char __c) {
5136 return vec_perm(__a, __b, __c);
5142 static vector float __attribute__((__always_inline__))
5143 vec_re(vector float __a) {
5144 return __builtin_altivec_vrefp(__a);
5149 static vector float __attribute__((__always_inline__))
5150 vec_vrefp(vector float __a) {
5151 return __builtin_altivec_vrefp(__a);
5156 static vector signed char __ATTRS_o_ai vec_rl(vector signed char __a,
5157 vector unsigned char __b) {
5158 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
5161 static vector unsigned char __ATTRS_o_ai vec_rl(vector unsigned char __a,
5162 vector unsigned char __b) {
5163 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
5166 static vector short __ATTRS_o_ai vec_rl(vector short __a,
5167 vector unsigned short __b) {
5168 return __builtin_altivec_vrlh(__a, __b);
5171 static vector unsigned short __ATTRS_o_ai vec_rl(vector unsigned short __a,
5172 vector unsigned short __b) {
5173 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
5176 static vector int __ATTRS_o_ai vec_rl(vector int __a, vector unsigned int __b) {
5177 return __builtin_altivec_vrlw(__a, __b);
5180 static vector unsigned int __ATTRS_o_ai vec_rl(vector unsigned int __a,
5181 vector unsigned int __b) {
5182 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
5185 #ifdef __POWER8_VECTOR__
5186 static vector signed long long __ATTRS_o_ai
5187 vec_rl(vector signed long long __a, vector unsigned long long __b) {
5188 return __builtin_altivec_vrld(__a, __b);
5191 static vector unsigned long long __ATTRS_o_ai
5192 vec_rl(vector unsigned long long __a, vector unsigned long long __b) {
5193 return __builtin_altivec_vrld(__a, __b);
5199 static vector signed char __ATTRS_o_ai vec_vrlb(vector signed char __a,
5200 vector unsigned char __b) {
5201 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
5204 static vector unsigned char __ATTRS_o_ai vec_vrlb(vector unsigned char __a,
5205 vector unsigned char __b) {
5206 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
5211 static vector short __ATTRS_o_ai vec_vrlh(vector short __a,
5212 vector unsigned short __b) {
5213 return __builtin_altivec_vrlh(__a, __b);
5216 static vector unsigned short __ATTRS_o_ai vec_vrlh(vector unsigned short __a,
5217 vector unsigned short __b) {
5218 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
5223 static vector int __ATTRS_o_ai vec_vrlw(vector int __a,
5224 vector unsigned int __b) {
5225 return __builtin_altivec_vrlw(__a, __b);
5228 static vector unsigned int __ATTRS_o_ai vec_vrlw(vector unsigned int __a,
5229 vector unsigned int __b) {
5230 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
5235 static vector float __attribute__((__always_inline__))
5236 vec_round(vector float __a) {
5237 return __builtin_altivec_vrfin(__a);
5242 static vector float __attribute__((__always_inline__))
5243 vec_vrfin(vector float __a) {
5244 return __builtin_altivec_vrfin(__a);
5249 static __vector float __attribute__((__always_inline__))
5250 vec_rsqrte(vector float __a) {
5251 return __builtin_altivec_vrsqrtefp(__a);
5256 static __vector float __attribute__((__always_inline__))
5257 vec_vrsqrtefp(vector float __a) {
5258 return __builtin_altivec_vrsqrtefp(__a);
5263 #define __builtin_altivec_vsel_4si vec_sel
5265 static vector signed char __ATTRS_o_ai vec_sel(vector signed char __a,
5266 vector signed char __b,
5267 vector unsigned char __c) {
5268 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5271 static vector signed char __ATTRS_o_ai vec_sel(vector signed char __a,
5272 vector signed char __b,
5273 vector bool char __c) {
5274 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5277 static vector unsigned char __ATTRS_o_ai vec_sel(vector unsigned char __a,
5278 vector unsigned char __b,
5279 vector unsigned char __c) {
5280 return (__a & ~__c) | (__b & __c);
5283 static vector unsigned char __ATTRS_o_ai vec_sel(vector unsigned char __a,
5284 vector unsigned char __b,
5285 vector bool char __c) {
5286 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
5289 static vector bool char __ATTRS_o_ai vec_sel(vector bool char __a,
5290 vector bool char __b,
5291 vector unsigned char __c) {
5292 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
5295 static vector bool char __ATTRS_o_ai vec_sel(vector bool char __a,
5296 vector bool char __b,
5297 vector bool char __c) {
5298 return (__a & ~__c) | (__b & __c);
5301 static vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b,
5302 vector unsigned short __c) {
5303 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5306 static vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b,
5307 vector bool short __c) {
5308 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5311 static vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a,
5312 vector unsigned short __b,
5313 vector unsigned short __c) {
5314 return (__a & ~__c) | (__b & __c);
5317 static vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a,
5318 vector unsigned short __b,
5319 vector bool short __c) {
5320 return (__a & ~(vector unsigned short)__c) |
5321 (__b & (vector unsigned short)__c);
5324 static vector bool short __ATTRS_o_ai vec_sel(vector bool short __a,
5325 vector bool short __b,
5326 vector unsigned short __c) {
5327 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
5330 static vector bool short __ATTRS_o_ai vec_sel(vector bool short __a,
5331 vector bool short __b,
5332 vector bool short __c) {
5333 return (__a & ~__c) | (__b & __c);
5336 static vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b,
5337 vector unsigned int __c) {
5338 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5341 static vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b,
5342 vector bool int __c) {
5343 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5346 static vector unsigned int __ATTRS_o_ai vec_sel(vector unsigned int __a,
5347 vector unsigned int __b,
5348 vector unsigned int __c) {
5349 return (__a & ~__c) | (__b & __c);
5352 static vector unsigned int __ATTRS_o_ai vec_sel(vector unsigned int __a,
5353 vector unsigned int __b,
5354 vector bool int __c) {
5355 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
5358 static vector bool int __ATTRS_o_ai vec_sel(vector bool int __a,
5359 vector bool int __b,
5360 vector unsigned int __c) {
5361 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
5364 static vector bool int __ATTRS_o_ai vec_sel(vector bool int __a,
5365 vector bool int __b,
5366 vector bool int __c) {
5367 return (__a & ~__c) | (__b & __c);
5370 static vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b,
5371 vector unsigned int __c) {
5372 vector int __res = ((vector int)__a & ~(vector int)__c) |
5373 ((vector int)__b & (vector int)__c);
5374 return (vector float)__res;
5377 static vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b,
5378 vector bool int __c) {
5379 vector int __res = ((vector int)__a & ~(vector int)__c) |
5380 ((vector int)__b & (vector int)__c);
5381 return (vector float)__res;
5386 static vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a,
5387 vector signed char __b,
5388 vector unsigned char __c) {
5389 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5392 static vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a,
5393 vector signed char __b,
5394 vector bool char __c) {
5395 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5398 static vector unsigned char __ATTRS_o_ai vec_vsel(vector unsigned char __a,
5399 vector unsigned char __b,
5400 vector unsigned char __c) {
5401 return (__a & ~__c) | (__b & __c);
5404 static vector unsigned char __ATTRS_o_ai vec_vsel(vector unsigned char __a,
5405 vector unsigned char __b,
5406 vector bool char __c) {
5407 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
5410 static vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a,
5411 vector bool char __b,
5412 vector unsigned char __c) {
5413 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
5416 static vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a,
5417 vector bool char __b,
5418 vector bool char __c) {
5419 return (__a & ~__c) | (__b & __c);
5422 static vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b,
5423 vector unsigned short __c) {
5424 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5427 static vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b,
5428 vector bool short __c) {
5429 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5432 static vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a,
5433 vector unsigned short __b,
5434 vector unsigned short __c) {
5435 return (__a & ~__c) | (__b & __c);
5438 static vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a,
5439 vector unsigned short __b,
5440 vector bool short __c) {
5441 return (__a & ~(vector unsigned short)__c) |
5442 (__b & (vector unsigned short)__c);
5445 static vector bool short __ATTRS_o_ai vec_vsel(vector bool short __a,
5446 vector bool short __b,
5447 vector unsigned short __c) {
5448 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
5451 static vector bool short __ATTRS_o_ai vec_vsel(vector bool short __a,
5452 vector bool short __b,
5453 vector bool short __c) {
5454 return (__a & ~__c) | (__b & __c);
5457 static vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b,
5458 vector unsigned int __c) {
5459 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5462 static vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b,
5463 vector bool int __c) {
5464 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5467 static vector unsigned int __ATTRS_o_ai vec_vsel(vector unsigned int __a,
5468 vector unsigned int __b,
5469 vector unsigned int __c) {
5470 return (__a & ~__c) | (__b & __c);
5473 static vector unsigned int __ATTRS_o_ai vec_vsel(vector unsigned int __a,
5474 vector unsigned int __b,
5475 vector bool int __c) {
5476 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
5479 static vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a,
5480 vector bool int __b,
5481 vector unsigned int __c) {
5482 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
5485 static vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a,
5486 vector bool int __b,
5487 vector bool int __c) {
5488 return (__a & ~__c) | (__b & __c);
5491 static vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b,
5492 vector unsigned int __c) {
5493 vector int __res = ((vector int)__a & ~(vector int)__c) |
5494 ((vector int)__b & (vector int)__c);
5495 return (vector float)__res;
5498 static vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b,
5499 vector bool int __c) {
5500 vector int __res = ((vector int)__a & ~(vector int)__c) |
5501 ((vector int)__b & (vector int)__c);
5502 return (vector float)__res;
5507 static vector signed char __ATTRS_o_ai vec_sl(vector signed char __a,
5508 vector unsigned char __b) {
5509 return __a << (vector signed char)__b;
5512 static vector unsigned char __ATTRS_o_ai vec_sl(vector unsigned char __a,
5513 vector unsigned char __b) {
5517 static vector short __ATTRS_o_ai vec_sl(vector short __a,
5518 vector unsigned short __b) {
5519 return __a << (vector short)__b;
5522 static vector unsigned short __ATTRS_o_ai vec_sl(vector unsigned short __a,
5523 vector unsigned short __b) {
5527 static vector int __ATTRS_o_ai vec_sl(vector int __a, vector unsigned int __b) {
5528 return __a << (vector int)__b;
5531 static vector unsigned int __ATTRS_o_ai vec_sl(vector unsigned int __a,
5532 vector unsigned int __b) {
5536 #ifdef __POWER8_VECTOR__
5537 static vector signed long long __ATTRS_o_ai
5538 vec_sl(vector signed long long __a, vector unsigned long long __b) {
5539 return __a << (vector long long)__b;
5542 static vector unsigned long long __ATTRS_o_ai
5543 vec_sl(vector unsigned long long __a, vector unsigned long long __b) {
5550 #define __builtin_altivec_vslb vec_vslb
5552 static vector signed char __ATTRS_o_ai vec_vslb(vector signed char __a,
5553 vector unsigned char __b) {
5554 return vec_sl(__a, __b);
5557 static vector unsigned char __ATTRS_o_ai vec_vslb(vector unsigned char __a,
5558 vector unsigned char __b) {
5559 return vec_sl(__a, __b);
5564 #define __builtin_altivec_vslh vec_vslh
5566 static vector short __ATTRS_o_ai vec_vslh(vector short __a,
5567 vector unsigned short __b) {
5568 return vec_sl(__a, __b);
5571 static vector unsigned short __ATTRS_o_ai vec_vslh(vector unsigned short __a,
5572 vector unsigned short __b) {
5573 return vec_sl(__a, __b);
5578 #define __builtin_altivec_vslw vec_vslw
5580 static vector int __ATTRS_o_ai vec_vslw(vector int __a,
5581 vector unsigned int __b) {
5582 return vec_sl(__a, __b);
5585 static vector unsigned int __ATTRS_o_ai vec_vslw(vector unsigned int __a,
5586 vector unsigned int __b) {
5587 return vec_sl(__a, __b);
5592 #define __builtin_altivec_vsldoi_4si vec_sld
5594 static vector signed char __ATTRS_o_ai vec_sld(vector signed char __a,
5595 vector signed char __b,
5596 unsigned char __c) {
5599 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5600 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5601 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5604 static vector unsigned char __ATTRS_o_ai vec_sld(vector unsigned char __a,
5605 vector unsigned char __b,
5606 unsigned char __c) {
5609 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5610 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5611 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5614 static vector short __ATTRS_o_ai vec_sld(vector short __a, vector short __b,
5615 unsigned char __c) {
5618 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5619 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5620 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5623 static vector unsigned short __ATTRS_o_ai vec_sld(vector unsigned short __a,
5624 vector unsigned short __b,
5625 unsigned char __c) {
5628 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5629 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5630 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5633 static vector pixel __ATTRS_o_ai vec_sld(vector pixel __a, vector pixel __b,
5634 unsigned char __c) {
5637 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5638 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5639 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5642 static vector int __ATTRS_o_ai vec_sld(vector int __a, vector int __b,
5643 unsigned char __c) {
5646 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5647 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5648 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5651 static vector unsigned int __ATTRS_o_ai vec_sld(vector unsigned int __a,
5652 vector unsigned int __b,
5653 unsigned char __c) {
5656 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5657 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5658 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5661 static vector float __ATTRS_o_ai vec_sld(vector float __a, vector float __b,
5662 unsigned char __c) {
5665 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5666 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5667 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5672 static vector signed char __ATTRS_o_ai vec_vsldoi(vector signed char __a,
5673 vector signed char __b,
5674 unsigned char __c) {
5677 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5678 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5679 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5682 static vector unsigned char __ATTRS_o_ai vec_vsldoi(vector unsigned char __a,
5683 vector unsigned char __b,
5684 unsigned char __c) {
5687 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5688 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5689 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5692 static vector short __ATTRS_o_ai vec_vsldoi(vector short __a, vector short __b,
5693 unsigned char __c) {
5696 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5697 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5698 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5701 static vector unsigned short __ATTRS_o_ai vec_vsldoi(vector unsigned short __a,
5702 vector unsigned short __b,
5703 unsigned char __c) {
5706 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5707 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5708 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5711 static vector pixel __ATTRS_o_ai vec_vsldoi(vector pixel __a, vector pixel __b,
5712 unsigned char __c) {
5715 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5716 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5717 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5720 static vector int __ATTRS_o_ai vec_vsldoi(vector int __a, vector int __b,
5721 unsigned char __c) {
5724 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5725 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5726 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5729 static vector unsigned int __ATTRS_o_ai vec_vsldoi(vector unsigned int __a,
5730 vector unsigned int __b,
5731 unsigned char __c) {
5734 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5735 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5736 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5739 static vector float __ATTRS_o_ai vec_vsldoi(vector float __a, vector float __b,
5740 unsigned char __c) {
5743 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5744 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5745 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5750 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
5751 vector unsigned char __b) {
5752 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5756 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
5757 vector unsigned short __b) {
5758 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5762 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
5763 vector unsigned int __b) {
5764 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5768 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
5769 vector unsigned char __b) {
5770 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5774 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
5775 vector unsigned short __b) {
5776 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5780 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
5781 vector unsigned int __b) {
5782 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5786 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
5787 vector unsigned char __b) {
5788 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5792 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
5793 vector unsigned short __b) {
5794 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5798 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
5799 vector unsigned int __b) {
5800 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5804 static vector short __ATTRS_o_ai vec_sll(vector short __a,
5805 vector unsigned char __b) {
5806 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5809 static vector short __ATTRS_o_ai vec_sll(vector short __a,
5810 vector unsigned short __b) {
5811 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5814 static vector short __ATTRS_o_ai vec_sll(vector short __a,
5815 vector unsigned int __b) {
5816 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5819 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
5820 vector unsigned char __b) {
5821 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
5825 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
5826 vector unsigned short __b) {
5827 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
5831 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
5832 vector unsigned int __b) {
5833 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
5837 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
5838 vector unsigned char __b) {
5839 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
5843 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
5844 vector unsigned short __b) {
5845 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
5849 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
5850 vector unsigned int __b) {
5851 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
5855 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
5856 vector unsigned char __b) {
5857 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5860 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
5861 vector unsigned short __b) {
5862 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5865 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
5866 vector unsigned int __b) {
5867 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5870 static vector int __ATTRS_o_ai vec_sll(vector int __a,
5871 vector unsigned char __b) {
5872 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5875 static vector int __ATTRS_o_ai vec_sll(vector int __a,
5876 vector unsigned short __b) {
5877 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5880 static vector int __ATTRS_o_ai vec_sll(vector int __a,
5881 vector unsigned int __b) {
5882 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5885 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
5886 vector unsigned char __b) {
5887 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
5891 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
5892 vector unsigned short __b) {
5893 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
5897 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
5898 vector unsigned int __b) {
5899 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
5903 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
5904 vector unsigned char __b) {
5905 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
5909 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
5910 vector unsigned short __b) {
5911 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
5915 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
5916 vector unsigned int __b) {
5917 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
5923 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
5924 vector unsigned char __b) {
5925 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5929 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
5930 vector unsigned short __b) {
5931 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5935 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
5936 vector unsigned int __b) {
5937 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5941 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
5942 vector unsigned char __b) {
5943 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5947 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
5948 vector unsigned short __b) {
5949 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5953 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
5954 vector unsigned int __b) {
5955 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5959 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
5960 vector unsigned char __b) {
5961 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5965 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
5966 vector unsigned short __b) {
5967 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5971 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
5972 vector unsigned int __b) {
5973 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5977 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
5978 vector unsigned char __b) {
5979 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5982 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
5983 vector unsigned short __b) {
5984 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5987 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
5988 vector unsigned int __b) {
5989 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5992 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
5993 vector unsigned char __b) {
5994 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
5998 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
5999 vector unsigned short __b) {
6000 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
6004 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
6005 vector unsigned int __b) {
6006 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
6010 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
6011 vector unsigned char __b) {
6012 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
6016 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
6017 vector unsigned short __b) {
6018 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
6022 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
6023 vector unsigned int __b) {
6024 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
6028 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
6029 vector unsigned char __b) {
6030 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6033 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
6034 vector unsigned short __b) {
6035 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6038 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
6039 vector unsigned int __b) {
6040 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6043 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
6044 vector unsigned char __b) {
6045 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6048 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
6049 vector unsigned short __b) {
6050 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6053 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
6054 vector unsigned int __b) {
6055 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6058 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
6059 vector unsigned char __b) {
6060 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
6064 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
6065 vector unsigned short __b) {
6066 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
6070 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
6071 vector unsigned int __b) {
6072 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
6076 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
6077 vector unsigned char __b) {
6078 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
6082 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
6083 vector unsigned short __b) {
6084 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
6088 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
6089 vector unsigned int __b) {
6090 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
6096 static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a,
6097 vector signed char __b) {
6098 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
6102 static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a,
6103 vector unsigned char __b) {
6104 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
6108 static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a,
6109 vector signed char __b) {
6110 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
6114 static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a,
6115 vector unsigned char __b) {
6116 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
6120 static vector short __ATTRS_o_ai vec_slo(vector short __a,
6121 vector signed char __b) {
6122 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6125 static vector short __ATTRS_o_ai vec_slo(vector short __a,
6126 vector unsigned char __b) {
6127 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6130 static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a,
6131 vector signed char __b) {
6132 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
6136 static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a,
6137 vector unsigned char __b) {
6138 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
6142 static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a,
6143 vector signed char __b) {
6144 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6147 static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a,
6148 vector unsigned char __b) {
6149 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6152 static vector int __ATTRS_o_ai vec_slo(vector int __a, vector signed char __b) {
6153 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6156 static vector int __ATTRS_o_ai vec_slo(vector int __a,
6157 vector unsigned char __b) {
6158 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6161 static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a,
6162 vector signed char __b) {
6163 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
6167 static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a,
6168 vector unsigned char __b) {
6169 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
6173 static vector float __ATTRS_o_ai vec_slo(vector float __a,
6174 vector signed char __b) {
6175 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6178 static vector float __ATTRS_o_ai vec_slo(vector float __a,
6179 vector unsigned char __b) {
6180 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6185 static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a,
6186 vector signed char __b) {
6187 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
6191 static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a,
6192 vector unsigned char __b) {
6193 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
6197 static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a,
6198 vector signed char __b) {
6199 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
6203 static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a,
6204 vector unsigned char __b) {
6205 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
6209 static vector short __ATTRS_o_ai vec_vslo(vector short __a,
6210 vector signed char __b) {
6211 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6214 static vector short __ATTRS_o_ai vec_vslo(vector short __a,
6215 vector unsigned char __b) {
6216 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6219 static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a,
6220 vector signed char __b) {
6221 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
6225 static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a,
6226 vector unsigned char __b) {
6227 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
6231 static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a,
6232 vector signed char __b) {
6233 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6236 static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a,
6237 vector unsigned char __b) {
6238 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6241 static vector int __ATTRS_o_ai vec_vslo(vector int __a,
6242 vector signed char __b) {
6243 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6246 static vector int __ATTRS_o_ai vec_vslo(vector int __a,
6247 vector unsigned char __b) {
6248 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6251 static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a,
6252 vector signed char __b) {
6253 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
6257 static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a,
6258 vector unsigned char __b) {
6259 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
6263 static vector float __ATTRS_o_ai vec_vslo(vector float __a,
6264 vector signed char __b) {
6265 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6268 static vector float __ATTRS_o_ai vec_vslo(vector float __a,
6269 vector unsigned char __b) {
6270 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6275 static vector signed char __ATTRS_o_ai vec_splat(vector signed char __a,
6276 unsigned char __b) {
6277 return vec_perm(__a, __a, (vector unsigned char)(__b));
6280 static vector unsigned char __ATTRS_o_ai vec_splat(vector unsigned char __a,
6281 unsigned char __b) {
6282 return vec_perm(__a, __a, (vector unsigned char)(__b));
6285 static vector bool char __ATTRS_o_ai vec_splat(vector bool char __a,
6286 unsigned char __b) {
6287 return vec_perm(__a, __a, (vector unsigned char)(__b));
6290 static vector short __ATTRS_o_ai vec_splat(vector short __a,
6291 unsigned char __b) {
6293 unsigned char b1 = __b + 1;
6294 return vec_perm(__a, __a,
6295 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6296 __b, b1, __b, b1, __b, b1, __b, b1));
6299 static vector unsigned short __ATTRS_o_ai vec_splat(vector unsigned short __a,
6300 unsigned char __b) {
6302 unsigned char b1 = __b + 1;
6303 return vec_perm(__a, __a,
6304 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6305 __b, b1, __b, b1, __b, b1, __b, b1));
6308 static vector bool short __ATTRS_o_ai vec_splat(vector bool short __a,
6309 unsigned char __b) {
6311 unsigned char b1 = __b + 1;
6312 return vec_perm(__a, __a,
6313 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6314 __b, b1, __b, b1, __b, b1, __b, b1));
6317 static vector pixel __ATTRS_o_ai vec_splat(vector pixel __a,
6318 unsigned char __b) {
6320 unsigned char b1 = __b + 1;
6321 return vec_perm(__a, __a,
6322 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6323 __b, b1, __b, b1, __b, b1, __b, b1));
6326 static vector int __ATTRS_o_ai vec_splat(vector int __a, unsigned char __b) {
6328 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6329 return vec_perm(__a, __a,
6330 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6331 b1, b2, b3, __b, b1, b2, b3));
6334 static vector unsigned int __ATTRS_o_ai vec_splat(vector unsigned int __a,
6335 unsigned char __b) {
6337 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6338 return vec_perm(__a, __a,
6339 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6340 b1, b2, b3, __b, b1, b2, b3));
6343 static vector bool int __ATTRS_o_ai vec_splat(vector bool int __a,
6344 unsigned char __b) {
6346 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6347 return vec_perm(__a, __a,
6348 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6349 b1, b2, b3, __b, b1, b2, b3));
6352 static vector float __ATTRS_o_ai vec_splat(vector float __a,
6353 unsigned char __b) {
6355 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6356 return vec_perm(__a, __a,
6357 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6358 b1, b2, b3, __b, b1, b2, b3));
6363 #define __builtin_altivec_vspltb vec_vspltb
6365 static vector signed char __ATTRS_o_ai vec_vspltb(vector signed char __a,
6366 unsigned char __b) {
6367 return vec_perm(__a, __a, (vector unsigned char)(__b));
6370 static vector unsigned char __ATTRS_o_ai vec_vspltb(vector unsigned char __a,
6371 unsigned char __b) {
6372 return vec_perm(__a, __a, (vector unsigned char)(__b));
6375 static vector bool char __ATTRS_o_ai vec_vspltb(vector bool char __a,
6376 unsigned char __b) {
6377 return vec_perm(__a, __a, (vector unsigned char)(__b));
6382 #define __builtin_altivec_vsplth vec_vsplth
6384 static vector short __ATTRS_o_ai vec_vsplth(vector short __a,
6385 unsigned char __b) {
6387 unsigned char b1 = __b + 1;
6388 return vec_perm(__a, __a,
6389 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6390 __b, b1, __b, b1, __b, b1, __b, b1));
6393 static vector unsigned short __ATTRS_o_ai vec_vsplth(vector unsigned short __a,
6394 unsigned char __b) {
6396 unsigned char b1 = __b + 1;
6397 return vec_perm(__a, __a,
6398 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6399 __b, b1, __b, b1, __b, b1, __b, b1));
6402 static vector bool short __ATTRS_o_ai vec_vsplth(vector bool short __a,
6403 unsigned char __b) {
6405 unsigned char b1 = __b + 1;
6406 return vec_perm(__a, __a,
6407 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6408 __b, b1, __b, b1, __b, b1, __b, b1));
6411 static vector pixel __ATTRS_o_ai vec_vsplth(vector pixel __a,
6412 unsigned char __b) {
6414 unsigned char b1 = __b + 1;
6415 return vec_perm(__a, __a,
6416 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6417 __b, b1, __b, b1, __b, b1, __b, b1));
6422 #define __builtin_altivec_vspltw vec_vspltw
6424 static vector int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b) {
6426 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6427 return vec_perm(__a, __a,
6428 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6429 b1, b2, b3, __b, b1, b2, b3));
6432 static vector unsigned int __ATTRS_o_ai vec_vspltw(vector unsigned int __a,
6433 unsigned char __b) {
6435 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6436 return vec_perm(__a, __a,
6437 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6438 b1, b2, b3, __b, b1, b2, b3));
6441 static vector bool int __ATTRS_o_ai vec_vspltw(vector bool int __a,
6442 unsigned char __b) {
6444 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6445 return vec_perm(__a, __a,
6446 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6447 b1, b2, b3, __b, b1, b2, b3));
6450 static vector float __ATTRS_o_ai vec_vspltw(vector float __a,
6451 unsigned char __b) {
6453 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6454 return vec_perm(__a, __a,
6455 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6456 b1, b2, b3, __b, b1, b2, b3));
6461 #define __builtin_altivec_vspltisb vec_splat_s8
6463 // FIXME: parameter should be treated as 5-bit signed literal
6464 static vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a) {
6465 return (vector signed char)(__a);
6470 // FIXME: parameter should be treated as 5-bit signed literal
6471 static vector signed char __ATTRS_o_ai vec_vspltisb(signed char __a) {
6472 return (vector signed char)(__a);
6477 #define __builtin_altivec_vspltish vec_splat_s16
6479 // FIXME: parameter should be treated as 5-bit signed literal
6480 static vector short __ATTRS_o_ai vec_splat_s16(signed char __a) {
6481 return (vector short)(__a);
6486 // FIXME: parameter should be treated as 5-bit signed literal
6487 static vector short __ATTRS_o_ai vec_vspltish(signed char __a) {
6488 return (vector short)(__a);
6493 #define __builtin_altivec_vspltisw vec_splat_s32
6495 // FIXME: parameter should be treated as 5-bit signed literal
6496 static vector int __ATTRS_o_ai vec_splat_s32(signed char __a) {
6497 return (vector int)(__a);
6502 // FIXME: parameter should be treated as 5-bit signed literal
6503 static vector int __ATTRS_o_ai vec_vspltisw(signed char __a) {
6504 return (vector int)(__a);
6509 // FIXME: parameter should be treated as 5-bit signed literal
6510 static vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a) {
6511 return (vector unsigned char)(__a);
6516 // FIXME: parameter should be treated as 5-bit signed literal
6517 static vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a) {
6518 return (vector unsigned short)(__a);
6523 // FIXME: parameter should be treated as 5-bit signed literal
6524 static vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a) {
6525 return (vector unsigned int)(__a);
6530 static vector signed char __ATTRS_o_ai vec_sr(vector signed char __a,
6531 vector unsigned char __b) {
6532 return __a >> (vector signed char)__b;
6535 static vector unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a,
6536 vector unsigned char __b) {
6540 static vector short __ATTRS_o_ai vec_sr(vector short __a,
6541 vector unsigned short __b) {
6542 return __a >> (vector short)__b;
6545 static vector unsigned short __ATTRS_o_ai vec_sr(vector unsigned short __a,
6546 vector unsigned short __b) {
6550 static vector int __ATTRS_o_ai vec_sr(vector int __a, vector unsigned int __b) {
6551 return __a >> (vector int)__b;
6554 static vector unsigned int __ATTRS_o_ai vec_sr(vector unsigned int __a,
6555 vector unsigned int __b) {
6559 #ifdef __POWER8_VECTOR__
6560 static vector signed long long __ATTRS_o_ai
6561 vec_sr(vector signed long long __a, vector unsigned long long __b) {
6562 return __a >> (vector long long)__b;
6565 static vector unsigned long long __ATTRS_o_ai
6566 vec_sr(vector unsigned long long __a, vector unsigned long long __b) {
6573 #define __builtin_altivec_vsrb vec_vsrb
6575 static vector signed char __ATTRS_o_ai vec_vsrb(vector signed char __a,
6576 vector unsigned char __b) {
6577 return __a >> (vector signed char)__b;
6580 static vector unsigned char __ATTRS_o_ai vec_vsrb(vector unsigned char __a,
6581 vector unsigned char __b) {
6587 #define __builtin_altivec_vsrh vec_vsrh
6589 static vector short __ATTRS_o_ai vec_vsrh(vector short __a,
6590 vector unsigned short __b) {
6591 return __a >> (vector short)__b;
6594 static vector unsigned short __ATTRS_o_ai vec_vsrh(vector unsigned short __a,
6595 vector unsigned short __b) {
6601 #define __builtin_altivec_vsrw vec_vsrw
6603 static vector int __ATTRS_o_ai vec_vsrw(vector int __a,
6604 vector unsigned int __b) {
6605 return __a >> (vector int)__b;
6608 static vector unsigned int __ATTRS_o_ai vec_vsrw(vector unsigned int __a,
6609 vector unsigned int __b) {
6615 static vector signed char __ATTRS_o_ai vec_sra(vector signed char __a,
6616 vector unsigned char __b) {
6617 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
6620 static vector unsigned char __ATTRS_o_ai vec_sra(vector unsigned char __a,
6621 vector unsigned char __b) {
6622 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
6625 static vector short __ATTRS_o_ai vec_sra(vector short __a,
6626 vector unsigned short __b) {
6627 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
6630 static vector unsigned short __ATTRS_o_ai vec_sra(vector unsigned short __a,
6631 vector unsigned short __b) {
6632 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
6635 static vector int __ATTRS_o_ai vec_sra(vector int __a,
6636 vector unsigned int __b) {
6637 return __builtin_altivec_vsraw(__a, __b);
6640 static vector unsigned int __ATTRS_o_ai vec_sra(vector unsigned int __a,
6641 vector unsigned int __b) {
6642 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
6645 #ifdef __POWER8_VECTOR__
6646 static vector signed long long __ATTRS_o_ai
6647 vec_sra(vector signed long long __a, vector unsigned long long __b) {
6651 static vector unsigned long long __ATTRS_o_ai
6652 vec_sra(vector unsigned long long __a, vector unsigned long long __b) {
6653 return (vector unsigned long long)((vector signed long long)__a >> __b);
6659 static vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a,
6660 vector unsigned char __b) {
6661 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
6664 static vector unsigned char __ATTRS_o_ai vec_vsrab(vector unsigned char __a,
6665 vector unsigned char __b) {
6666 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
6671 static vector short __ATTRS_o_ai vec_vsrah(vector short __a,
6672 vector unsigned short __b) {
6673 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
6676 static vector unsigned short __ATTRS_o_ai vec_vsrah(vector unsigned short __a,
6677 vector unsigned short __b) {
6678 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
6683 static vector int __ATTRS_o_ai vec_vsraw(vector int __a,
6684 vector unsigned int __b) {
6685 return __builtin_altivec_vsraw(__a, __b);
6688 static vector unsigned int __ATTRS_o_ai vec_vsraw(vector unsigned int __a,
6689 vector unsigned int __b) {
6690 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
6695 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
6696 vector unsigned char __b) {
6697 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6701 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
6702 vector unsigned short __b) {
6703 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6707 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
6708 vector unsigned int __b) {
6709 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6713 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
6714 vector unsigned char __b) {
6715 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6719 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
6720 vector unsigned short __b) {
6721 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6725 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
6726 vector unsigned int __b) {
6727 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6731 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
6732 vector unsigned char __b) {
6733 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6737 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
6738 vector unsigned short __b) {
6739 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6743 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
6744 vector unsigned int __b) {
6745 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6749 static vector short __ATTRS_o_ai vec_srl(vector short __a,
6750 vector unsigned char __b) {
6751 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6754 static vector short __ATTRS_o_ai vec_srl(vector short __a,
6755 vector unsigned short __b) {
6756 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6759 static vector short __ATTRS_o_ai vec_srl(vector short __a,
6760 vector unsigned int __b) {
6761 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6764 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
6765 vector unsigned char __b) {
6766 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6770 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
6771 vector unsigned short __b) {
6772 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6776 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
6777 vector unsigned int __b) {
6778 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6782 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
6783 vector unsigned char __b) {
6784 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6788 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
6789 vector unsigned short __b) {
6790 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6794 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
6795 vector unsigned int __b) {
6796 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6800 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
6801 vector unsigned char __b) {
6802 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6805 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
6806 vector unsigned short __b) {
6807 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6810 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
6811 vector unsigned int __b) {
6812 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6815 static vector int __ATTRS_o_ai vec_srl(vector int __a,
6816 vector unsigned char __b) {
6817 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6820 static vector int __ATTRS_o_ai vec_srl(vector int __a,
6821 vector unsigned short __b) {
6822 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6825 static vector int __ATTRS_o_ai vec_srl(vector int __a,
6826 vector unsigned int __b) {
6827 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6830 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
6831 vector unsigned char __b) {
6832 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
6836 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
6837 vector unsigned short __b) {
6838 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
6842 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
6843 vector unsigned int __b) {
6844 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
6848 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
6849 vector unsigned char __b) {
6850 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
6854 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
6855 vector unsigned short __b) {
6856 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
6860 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
6861 vector unsigned int __b) {
6862 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
6868 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
6869 vector unsigned char __b) {
6870 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6874 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
6875 vector unsigned short __b) {
6876 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6880 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
6881 vector unsigned int __b) {
6882 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6886 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
6887 vector unsigned char __b) {
6888 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6892 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
6893 vector unsigned short __b) {
6894 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6898 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
6899 vector unsigned int __b) {
6900 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6904 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
6905 vector unsigned char __b) {
6906 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6910 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
6911 vector unsigned short __b) {
6912 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6916 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
6917 vector unsigned int __b) {
6918 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6922 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
6923 vector unsigned char __b) {
6924 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6927 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
6928 vector unsigned short __b) {
6929 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6932 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
6933 vector unsigned int __b) {
6934 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6937 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
6938 vector unsigned char __b) {
6939 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6943 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
6944 vector unsigned short __b) {
6945 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6949 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
6950 vector unsigned int __b) {
6951 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6955 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
6956 vector unsigned char __b) {
6957 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6961 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
6962 vector unsigned short __b) {
6963 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6967 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
6968 vector unsigned int __b) {
6969 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6973 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
6974 vector unsigned char __b) {
6975 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6978 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
6979 vector unsigned short __b) {
6980 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6983 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
6984 vector unsigned int __b) {
6985 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6988 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
6989 vector unsigned char __b) {
6990 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6993 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
6994 vector unsigned short __b) {
6995 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6998 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
6999 vector unsigned int __b) {
7000 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7003 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
7004 vector unsigned char __b) {
7005 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
7009 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
7010 vector unsigned short __b) {
7011 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
7015 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
7016 vector unsigned int __b) {
7017 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
7021 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
7022 vector unsigned char __b) {
7023 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
7027 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
7028 vector unsigned short __b) {
7029 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
7033 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
7034 vector unsigned int __b) {
7035 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
7041 static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a,
7042 vector signed char __b) {
7043 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
7047 static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a,
7048 vector unsigned char __b) {
7049 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
7053 static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a,
7054 vector signed char __b) {
7055 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
7059 static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a,
7060 vector unsigned char __b) {
7061 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
7065 static vector short __ATTRS_o_ai vec_sro(vector short __a,
7066 vector signed char __b) {
7067 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7070 static vector short __ATTRS_o_ai vec_sro(vector short __a,
7071 vector unsigned char __b) {
7072 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7075 static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a,
7076 vector signed char __b) {
7077 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
7081 static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a,
7082 vector unsigned char __b) {
7083 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
7087 static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a,
7088 vector signed char __b) {
7089 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7092 static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a,
7093 vector unsigned char __b) {
7094 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7097 static vector int __ATTRS_o_ai vec_sro(vector int __a, vector signed char __b) {
7098 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7101 static vector int __ATTRS_o_ai vec_sro(vector int __a,
7102 vector unsigned char __b) {
7103 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7106 static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a,
7107 vector signed char __b) {
7108 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
7112 static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a,
7113 vector unsigned char __b) {
7114 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
7118 static vector float __ATTRS_o_ai vec_sro(vector float __a,
7119 vector signed char __b) {
7120 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7123 static vector float __ATTRS_o_ai vec_sro(vector float __a,
7124 vector unsigned char __b) {
7125 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7130 static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a,
7131 vector signed char __b) {
7132 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
7136 static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a,
7137 vector unsigned char __b) {
7138 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
7142 static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a,
7143 vector signed char __b) {
7144 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
7148 static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a,
7149 vector unsigned char __b) {
7150 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
7154 static vector short __ATTRS_o_ai vec_vsro(vector short __a,
7155 vector signed char __b) {
7156 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7159 static vector short __ATTRS_o_ai vec_vsro(vector short __a,
7160 vector unsigned char __b) {
7161 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7164 static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a,
7165 vector signed char __b) {
7166 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
7170 static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a,
7171 vector unsigned char __b) {
7172 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
7176 static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a,
7177 vector signed char __b) {
7178 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7181 static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a,
7182 vector unsigned char __b) {
7183 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7186 static vector int __ATTRS_o_ai vec_vsro(vector int __a,
7187 vector signed char __b) {
7188 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7191 static vector int __ATTRS_o_ai vec_vsro(vector int __a,
7192 vector unsigned char __b) {
7193 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7196 static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a,
7197 vector signed char __b) {
7198 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
7202 static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a,
7203 vector unsigned char __b) {
7204 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
7208 static vector float __ATTRS_o_ai vec_vsro(vector float __a,
7209 vector signed char __b) {
7210 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7213 static vector float __ATTRS_o_ai vec_vsro(vector float __a,
7214 vector unsigned char __b) {
7215 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7220 static void __ATTRS_o_ai vec_st(vector signed char __a, int __b,
7221 vector signed char *__c) {
7222 __builtin_altivec_stvx((vector int)__a, __b, __c);
7225 static void __ATTRS_o_ai vec_st(vector signed char __a, int __b,
7227 __builtin_altivec_stvx((vector int)__a, __b, __c);
7230 static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b,
7231 vector unsigned char *__c) {
7232 __builtin_altivec_stvx((vector int)__a, __b, __c);
7235 static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b,
7236 unsigned char *__c) {
7237 __builtin_altivec_stvx((vector int)__a, __b, __c);
7240 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
7242 __builtin_altivec_stvx((vector int)__a, __b, __c);
7245 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
7246 unsigned char *__c) {
7247 __builtin_altivec_stvx((vector int)__a, __b, __c);
7250 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
7251 vector bool char *__c) {
7252 __builtin_altivec_stvx((vector int)__a, __b, __c);
7255 static void __ATTRS_o_ai vec_st(vector short __a, int __b, vector short *__c) {
7256 __builtin_altivec_stvx((vector int)__a, __b, __c);
7259 static void __ATTRS_o_ai vec_st(vector short __a, int __b, short *__c) {
7260 __builtin_altivec_stvx((vector int)__a, __b, __c);
7263 static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b,
7264 vector unsigned short *__c) {
7265 __builtin_altivec_stvx((vector int)__a, __b, __c);
7268 static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b,
7269 unsigned short *__c) {
7270 __builtin_altivec_stvx((vector int)__a, __b, __c);
7273 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b, short *__c) {
7274 __builtin_altivec_stvx((vector int)__a, __b, __c);
7277 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b,
7278 unsigned short *__c) {
7279 __builtin_altivec_stvx((vector int)__a, __b, __c);
7282 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b,
7283 vector bool short *__c) {
7284 __builtin_altivec_stvx((vector int)__a, __b, __c);
7287 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, short *__c) {
7288 __builtin_altivec_stvx((vector int)__a, __b, __c);
7291 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b,
7292 unsigned short *__c) {
7293 __builtin_altivec_stvx((vector int)__a, __b, __c);
7296 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, vector pixel *__c) {
7297 __builtin_altivec_stvx((vector int)__a, __b, __c);
7300 static void __ATTRS_o_ai vec_st(vector int __a, int __b, vector int *__c) {
7301 __builtin_altivec_stvx(__a, __b, __c);
7304 static void __ATTRS_o_ai vec_st(vector int __a, int __b, int *__c) {
7305 __builtin_altivec_stvx(__a, __b, __c);
7308 static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b,
7309 vector unsigned int *__c) {
7310 __builtin_altivec_stvx((vector int)__a, __b, __c);
7313 static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b,
7314 unsigned int *__c) {
7315 __builtin_altivec_stvx((vector int)__a, __b, __c);
7318 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b, int *__c) {
7319 __builtin_altivec_stvx((vector int)__a, __b, __c);
7322 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b,
7323 unsigned int *__c) {
7324 __builtin_altivec_stvx((vector int)__a, __b, __c);
7327 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b,
7328 vector bool int *__c) {
7329 __builtin_altivec_stvx((vector int)__a, __b, __c);
7332 static void __ATTRS_o_ai vec_st(vector float __a, int __b, vector float *__c) {
7333 __builtin_altivec_stvx((vector int)__a, __b, __c);
7336 static void __ATTRS_o_ai vec_st(vector float __a, int __b, float *__c) {
7337 __builtin_altivec_stvx((vector int)__a, __b, __c);
7342 static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b,
7343 vector signed char *__c) {
7344 __builtin_altivec_stvx((vector int)__a, __b, __c);
7347 static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b,
7349 __builtin_altivec_stvx((vector int)__a, __b, __c);
7352 static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b,
7353 vector unsigned char *__c) {
7354 __builtin_altivec_stvx((vector int)__a, __b, __c);
7357 static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b,
7358 unsigned char *__c) {
7359 __builtin_altivec_stvx((vector int)__a, __b, __c);
7362 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
7364 __builtin_altivec_stvx((vector int)__a, __b, __c);
7367 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
7368 unsigned char *__c) {
7369 __builtin_altivec_stvx((vector int)__a, __b, __c);
7372 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
7373 vector bool char *__c) {
7374 __builtin_altivec_stvx((vector int)__a, __b, __c);
7377 static void __ATTRS_o_ai vec_stvx(vector short __a, int __b,
7378 vector short *__c) {
7379 __builtin_altivec_stvx((vector int)__a, __b, __c);
7382 static void __ATTRS_o_ai vec_stvx(vector short __a, int __b, short *__c) {
7383 __builtin_altivec_stvx((vector int)__a, __b, __c);
7386 static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b,
7387 vector unsigned short *__c) {
7388 __builtin_altivec_stvx((vector int)__a, __b, __c);
7391 static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b,
7392 unsigned short *__c) {
7393 __builtin_altivec_stvx((vector int)__a, __b, __c);
7396 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b, short *__c) {
7397 __builtin_altivec_stvx((vector int)__a, __b, __c);
7400 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b,
7401 unsigned short *__c) {
7402 __builtin_altivec_stvx((vector int)__a, __b, __c);
7405 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b,
7406 vector bool short *__c) {
7407 __builtin_altivec_stvx((vector int)__a, __b, __c);
7410 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b, short *__c) {
7411 __builtin_altivec_stvx((vector int)__a, __b, __c);
7414 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b,
7415 unsigned short *__c) {
7416 __builtin_altivec_stvx((vector int)__a, __b, __c);
7419 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b,
7420 vector pixel *__c) {
7421 __builtin_altivec_stvx((vector int)__a, __b, __c);
7424 static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, vector int *__c) {
7425 __builtin_altivec_stvx(__a, __b, __c);
7428 static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, int *__c) {
7429 __builtin_altivec_stvx(__a, __b, __c);
7432 static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b,
7433 vector unsigned int *__c) {
7434 __builtin_altivec_stvx((vector int)__a, __b, __c);
7437 static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b,
7438 unsigned int *__c) {
7439 __builtin_altivec_stvx((vector int)__a, __b, __c);
7442 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b, int *__c) {
7443 __builtin_altivec_stvx((vector int)__a, __b, __c);
7446 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b,
7447 unsigned int *__c) {
7448 __builtin_altivec_stvx((vector int)__a, __b, __c);
7451 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b,
7452 vector bool int *__c) {
7453 __builtin_altivec_stvx((vector int)__a, __b, __c);
7456 static void __ATTRS_o_ai vec_stvx(vector float __a, int __b,
7457 vector float *__c) {
7458 __builtin_altivec_stvx((vector int)__a, __b, __c);
7461 static void __ATTRS_o_ai vec_stvx(vector float __a, int __b, float *__c) {
7462 __builtin_altivec_stvx((vector int)__a, __b, __c);
7467 static void __ATTRS_o_ai vec_ste(vector signed char __a, int __b,
7469 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7472 static void __ATTRS_o_ai vec_ste(vector unsigned char __a, int __b,
7473 unsigned char *__c) {
7474 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7477 static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b,
7479 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7482 static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b,
7483 unsigned char *__c) {
7484 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7487 static void __ATTRS_o_ai vec_ste(vector short __a, int __b, short *__c) {
7488 __builtin_altivec_stvehx(__a, __b, __c);
7491 static void __ATTRS_o_ai vec_ste(vector unsigned short __a, int __b,
7492 unsigned short *__c) {
7493 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7496 static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b, short *__c) {
7497 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7500 static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b,
7501 unsigned short *__c) {
7502 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7505 static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b, short *__c) {
7506 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7509 static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b,
7510 unsigned short *__c) {
7511 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7514 static void __ATTRS_o_ai vec_ste(vector int __a, int __b, int *__c) {
7515 __builtin_altivec_stvewx(__a, __b, __c);
7518 static void __ATTRS_o_ai vec_ste(vector unsigned int __a, int __b,
7519 unsigned int *__c) {
7520 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7523 static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b, int *__c) {
7524 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7527 static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b,
7528 unsigned int *__c) {
7529 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7532 static void __ATTRS_o_ai vec_ste(vector float __a, int __b, float *__c) {
7533 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7538 static void __ATTRS_o_ai vec_stvebx(vector signed char __a, int __b,
7540 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7543 static void __ATTRS_o_ai vec_stvebx(vector unsigned char __a, int __b,
7544 unsigned char *__c) {
7545 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7548 static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b,
7550 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7553 static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b,
7554 unsigned char *__c) {
7555 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7560 static void __ATTRS_o_ai vec_stvehx(vector short __a, int __b, short *__c) {
7561 __builtin_altivec_stvehx(__a, __b, __c);
7564 static void __ATTRS_o_ai vec_stvehx(vector unsigned short __a, int __b,
7565 unsigned short *__c) {
7566 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7569 static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b,
7571 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7574 static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b,
7575 unsigned short *__c) {
7576 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7579 static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b, short *__c) {
7580 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7583 static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b,
7584 unsigned short *__c) {
7585 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7590 static void __ATTRS_o_ai vec_stvewx(vector int __a, int __b, int *__c) {
7591 __builtin_altivec_stvewx(__a, __b, __c);
7594 static void __ATTRS_o_ai vec_stvewx(vector unsigned int __a, int __b,
7595 unsigned int *__c) {
7596 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7599 static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b, int *__c) {
7600 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7603 static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b,
7604 unsigned int *__c) {
7605 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7608 static void __ATTRS_o_ai vec_stvewx(vector float __a, int __b, float *__c) {
7609 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7614 static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b,
7615 vector signed char *__c) {
7616 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7619 static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b,
7621 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7624 static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b,
7625 vector unsigned char *__c) {
7626 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7629 static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b,
7630 unsigned char *__c) {
7631 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7634 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
7636 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7639 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
7640 unsigned char *__c) {
7641 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7644 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
7645 vector bool char *__c) {
7646 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7649 static void __ATTRS_o_ai vec_stl(vector short __a, int __b, vector short *__c) {
7650 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7653 static void __ATTRS_o_ai vec_stl(vector short __a, int __b, short *__c) {
7654 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7657 static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b,
7658 vector unsigned short *__c) {
7659 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7662 static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b,
7663 unsigned short *__c) {
7664 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7667 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b, short *__c) {
7668 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7671 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b,
7672 unsigned short *__c) {
7673 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7676 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b,
7677 vector bool short *__c) {
7678 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7681 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, short *__c) {
7682 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7685 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b,
7686 unsigned short *__c) {
7687 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7690 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, vector pixel *__c) {
7691 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7694 static void __ATTRS_o_ai vec_stl(vector int __a, int __b, vector int *__c) {
7695 __builtin_altivec_stvxl(__a, __b, __c);
7698 static void __ATTRS_o_ai vec_stl(vector int __a, int __b, int *__c) {
7699 __builtin_altivec_stvxl(__a, __b, __c);
7702 static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b,
7703 vector unsigned int *__c) {
7704 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7707 static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b,
7708 unsigned int *__c) {
7709 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7712 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b, int *__c) {
7713 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7716 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b,
7717 unsigned int *__c) {
7718 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7721 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b,
7722 vector bool int *__c) {
7723 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7726 static void __ATTRS_o_ai vec_stl(vector float __a, int __b, vector float *__c) {
7727 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7730 static void __ATTRS_o_ai vec_stl(vector float __a, int __b, float *__c) {
7731 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7736 static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b,
7737 vector signed char *__c) {
7738 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7741 static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b,
7743 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7746 static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b,
7747 vector unsigned char *__c) {
7748 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7751 static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b,
7752 unsigned char *__c) {
7753 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7756 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
7758 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7761 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
7762 unsigned char *__c) {
7763 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7766 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
7767 vector bool char *__c) {
7768 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7771 static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b,
7772 vector short *__c) {
7773 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7776 static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b, short *__c) {
7777 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7780 static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b,
7781 vector unsigned short *__c) {
7782 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7785 static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b,
7786 unsigned short *__c) {
7787 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7790 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b, short *__c) {
7791 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7794 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b,
7795 unsigned short *__c) {
7796 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7799 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b,
7800 vector bool short *__c) {
7801 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7804 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b, short *__c) {
7805 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7808 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b,
7809 unsigned short *__c) {
7810 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7813 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b,
7814 vector pixel *__c) {
7815 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7818 static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, vector int *__c) {
7819 __builtin_altivec_stvxl(__a, __b, __c);
7822 static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, int *__c) {
7823 __builtin_altivec_stvxl(__a, __b, __c);
7826 static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b,
7827 vector unsigned int *__c) {
7828 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7831 static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b,
7832 unsigned int *__c) {
7833 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7836 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b, int *__c) {
7837 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7840 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b,
7841 unsigned int *__c) {
7842 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7845 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b,
7846 vector bool int *__c) {
7847 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7850 static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b,
7851 vector float *__c) {
7852 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7855 static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b, float *__c) {
7856 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7861 static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a,
7862 vector signed char __b) {
7866 static vector signed char __ATTRS_o_ai vec_sub(vector bool char __a,
7867 vector signed char __b) {
7868 return (vector signed char)__a - __b;
7871 static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a,
7872 vector bool char __b) {
7873 return __a - (vector signed char)__b;
7876 static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a,
7877 vector unsigned char __b) {
7881 static vector unsigned char __ATTRS_o_ai vec_sub(vector bool char __a,
7882 vector unsigned char __b) {
7883 return (vector unsigned char)__a - __b;
7886 static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a,
7887 vector bool char __b) {
7888 return __a - (vector unsigned char)__b;
7891 static vector short __ATTRS_o_ai vec_sub(vector short __a, vector short __b) {
7895 static vector short __ATTRS_o_ai vec_sub(vector bool short __a,
7897 return (vector short)__a - __b;
7900 static vector short __ATTRS_o_ai vec_sub(vector short __a,
7901 vector bool short __b) {
7902 return __a - (vector short)__b;
7905 static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a,
7906 vector unsigned short __b) {
7910 static vector unsigned short __ATTRS_o_ai vec_sub(vector bool short __a,
7911 vector unsigned short __b) {
7912 return (vector unsigned short)__a - __b;
7915 static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a,
7916 vector bool short __b) {
7917 return __a - (vector unsigned short)__b;
7920 static vector int __ATTRS_o_ai vec_sub(vector int __a, vector int __b) {
7924 static vector int __ATTRS_o_ai vec_sub(vector bool int __a, vector int __b) {
7925 return (vector int)__a - __b;
7928 static vector int __ATTRS_o_ai vec_sub(vector int __a, vector bool int __b) {
7929 return __a - (vector int)__b;
7932 static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a,
7933 vector unsigned int __b) {
7937 static vector unsigned int __ATTRS_o_ai vec_sub(vector bool int __a,
7938 vector unsigned int __b) {
7939 return (vector unsigned int)__a - __b;
7942 static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a,
7943 vector bool int __b) {
7944 return __a - (vector unsigned int)__b;
7947 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
7948 static vector signed __int128 __ATTRS_o_ai vec_sub(vector signed __int128 __a,
7949 vector signed __int128 __b) {
7953 static vector unsigned __int128 __ATTRS_o_ai
7954 vec_sub(vector unsigned __int128 __a, vector unsigned __int128 __b) {
7957 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
7959 static vector float __ATTRS_o_ai vec_sub(vector float __a, vector float __b) {
7965 #define __builtin_altivec_vsububm vec_vsububm
7967 static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a,
7968 vector signed char __b) {
7972 static vector signed char __ATTRS_o_ai vec_vsububm(vector bool char __a,
7973 vector signed char __b) {
7974 return (vector signed char)__a - __b;
7977 static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a,
7978 vector bool char __b) {
7979 return __a - (vector signed char)__b;
7982 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a,
7983 vector unsigned char __b) {
7987 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector bool char __a,
7988 vector unsigned char __b) {
7989 return (vector unsigned char)__a - __b;
7992 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a,
7993 vector bool char __b) {
7994 return __a - (vector unsigned char)__b;
7999 #define __builtin_altivec_vsubuhm vec_vsubuhm
8001 static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a,
8006 static vector short __ATTRS_o_ai vec_vsubuhm(vector bool short __a,
8008 return (vector short)__a - __b;
8011 static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a,
8012 vector bool short __b) {
8013 return __a - (vector short)__b;
8016 static vector unsigned short __ATTRS_o_ai
8017 vec_vsubuhm(vector unsigned short __a, vector unsigned short __b) {
8021 static vector unsigned short __ATTRS_o_ai
8022 vec_vsubuhm(vector bool short __a, vector unsigned short __b) {
8023 return (vector unsigned short)__a - __b;
8026 static vector unsigned short __ATTRS_o_ai vec_vsubuhm(vector unsigned short __a,
8027 vector bool short __b) {
8028 return __a - (vector unsigned short)__b;
8033 #define __builtin_altivec_vsubuwm vec_vsubuwm
8035 static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b) {
8039 static vector int __ATTRS_o_ai vec_vsubuwm(vector bool int __a,
8041 return (vector int)__a - __b;
8044 static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a,
8045 vector bool int __b) {
8046 return __a - (vector int)__b;
8049 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a,
8050 vector unsigned int __b) {
8054 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector bool int __a,
8055 vector unsigned int __b) {
8056 return (vector unsigned int)__a - __b;
8059 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a,
8060 vector bool int __b) {
8061 return __a - (vector unsigned int)__b;
8066 #define __builtin_altivec_vsubfp vec_vsubfp
8068 static vector float __attribute__((__always_inline__))
8069 vec_vsubfp(vector float __a, vector float __b) {
8075 static vector unsigned int __ATTRS_o_ai vec_subc(vector unsigned int __a,
8076 vector unsigned int __b) {
8077 return __builtin_altivec_vsubcuw(__a, __b);
8080 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
8081 static vector unsigned __int128 __ATTRS_o_ai
8082 vec_subc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
8083 return __builtin_altivec_vsubcuq(__a, __b);
8086 static vector signed __int128 __ATTRS_o_ai
8087 vec_subc(vector signed __int128 __a, vector signed __int128 __b) {
8088 return __builtin_altivec_vsubcuq(__a, __b);
8090 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
8094 static vector unsigned int __attribute__((__always_inline__))
8095 vec_vsubcuw(vector unsigned int __a, vector unsigned int __b) {
8096 return __builtin_altivec_vsubcuw(__a, __b);
8101 static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a,
8102 vector signed char __b) {
8103 return __builtin_altivec_vsubsbs(__a, __b);
8106 static vector signed char __ATTRS_o_ai vec_subs(vector bool char __a,
8107 vector signed char __b) {
8108 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
8111 static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a,
8112 vector bool char __b) {
8113 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
8116 static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a,
8117 vector unsigned char __b) {
8118 return __builtin_altivec_vsububs(__a, __b);
8121 static vector unsigned char __ATTRS_o_ai vec_subs(vector bool char __a,
8122 vector unsigned char __b) {
8123 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
8126 static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a,
8127 vector bool char __b) {
8128 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
8131 static vector short __ATTRS_o_ai vec_subs(vector short __a, vector short __b) {
8132 return __builtin_altivec_vsubshs(__a, __b);
8135 static vector short __ATTRS_o_ai vec_subs(vector bool short __a,
8137 return __builtin_altivec_vsubshs((vector short)__a, __b);
8140 static vector short __ATTRS_o_ai vec_subs(vector short __a,
8141 vector bool short __b) {
8142 return __builtin_altivec_vsubshs(__a, (vector short)__b);
8145 static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a,
8146 vector unsigned short __b) {
8147 return __builtin_altivec_vsubuhs(__a, __b);
8150 static vector unsigned short __ATTRS_o_ai vec_subs(vector bool short __a,
8151 vector unsigned short __b) {
8152 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
8155 static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a,
8156 vector bool short __b) {
8157 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
8160 static vector int __ATTRS_o_ai vec_subs(vector int __a, vector int __b) {
8161 return __builtin_altivec_vsubsws(__a, __b);
8164 static vector int __ATTRS_o_ai vec_subs(vector bool int __a, vector int __b) {
8165 return __builtin_altivec_vsubsws((vector int)__a, __b);
8168 static vector int __ATTRS_o_ai vec_subs(vector int __a, vector bool int __b) {
8169 return __builtin_altivec_vsubsws(__a, (vector int)__b);
8172 static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a,
8173 vector unsigned int __b) {
8174 return __builtin_altivec_vsubuws(__a, __b);
8177 static vector unsigned int __ATTRS_o_ai vec_subs(vector bool int __a,
8178 vector unsigned int __b) {
8179 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
8182 static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a,
8183 vector bool int __b) {
8184 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
8189 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a,
8190 vector signed char __b) {
8191 return __builtin_altivec_vsubsbs(__a, __b);
8194 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector bool char __a,
8195 vector signed char __b) {
8196 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
8199 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a,
8200 vector bool char __b) {
8201 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
8206 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a,
8207 vector unsigned char __b) {
8208 return __builtin_altivec_vsububs(__a, __b);
8211 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector bool char __a,
8212 vector unsigned char __b) {
8213 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
8216 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a,
8217 vector bool char __b) {
8218 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
8223 static vector short __ATTRS_o_ai vec_vsubshs(vector short __a,
8225 return __builtin_altivec_vsubshs(__a, __b);
8228 static vector short __ATTRS_o_ai vec_vsubshs(vector bool short __a,
8230 return __builtin_altivec_vsubshs((vector short)__a, __b);
8233 static vector short __ATTRS_o_ai vec_vsubshs(vector short __a,
8234 vector bool short __b) {
8235 return __builtin_altivec_vsubshs(__a, (vector short)__b);
8240 static vector unsigned short __ATTRS_o_ai
8241 vec_vsubuhs(vector unsigned short __a, vector unsigned short __b) {
8242 return __builtin_altivec_vsubuhs(__a, __b);
8245 static vector unsigned short __ATTRS_o_ai
8246 vec_vsubuhs(vector bool short __a, vector unsigned short __b) {
8247 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
8250 static vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a,
8251 vector bool short __b) {
8252 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
8257 static vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector int __b) {
8258 return __builtin_altivec_vsubsws(__a, __b);
8261 static vector int __ATTRS_o_ai vec_vsubsws(vector bool int __a,
8263 return __builtin_altivec_vsubsws((vector int)__a, __b);
8266 static vector int __ATTRS_o_ai vec_vsubsws(vector int __a,
8267 vector bool int __b) {
8268 return __builtin_altivec_vsubsws(__a, (vector int)__b);
8273 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a,
8274 vector unsigned int __b) {
8275 return __builtin_altivec_vsubuws(__a, __b);
8278 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector bool int __a,
8279 vector unsigned int __b) {
8280 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
8283 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a,
8284 vector bool int __b) {
8285 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
8288 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
8291 static vector signed __int128 __ATTRS_o_ai
8292 vec_vsubuqm(vector signed __int128 __a, vector signed __int128 __b) {
8296 static vector unsigned __int128 __ATTRS_o_ai
8297 vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
8303 static vector signed __int128 __ATTRS_o_ai
8304 vec_vsubeuqm(vector signed __int128 __a, vector signed __int128 __b,
8305 vector signed __int128 __c) {
8306 return __builtin_altivec_vsubeuqm(__a, __b, __c);
8309 static vector unsigned __int128 __ATTRS_o_ai
8310 vec_vsubeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
8311 vector unsigned __int128 __c) {
8312 return __builtin_altivec_vsubeuqm(__a, __b, __c);
8317 static vector signed __int128 __ATTRS_o_ai
8318 vec_vsubcuq(vector signed __int128 __a, vector signed __int128 __b) {
8319 return __builtin_altivec_vsubcuq(__a, __b);
8322 static vector unsigned __int128 __ATTRS_o_ai
8323 vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
8324 return __builtin_altivec_vsubcuq(__a, __b);
8329 static vector signed __int128 __ATTRS_o_ai
8330 vec_vsubecuq(vector signed __int128 __a, vector signed __int128 __b,
8331 vector signed __int128 __c) {
8332 return __builtin_altivec_vsubecuq(__a, __b, __c);
8335 static vector unsigned __int128 __ATTRS_o_ai
8336 vec_vsubecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
8337 vector unsigned __int128 __c) {
8338 return __builtin_altivec_vsubecuq(__a, __b, __c);
8340 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
8344 static vector int __ATTRS_o_ai vec_sum4s(vector signed char __a,
8346 return __builtin_altivec_vsum4sbs(__a, __b);
8349 static vector unsigned int __ATTRS_o_ai vec_sum4s(vector unsigned char __a,
8350 vector unsigned int __b) {
8351 return __builtin_altivec_vsum4ubs(__a, __b);
8354 static vector int __ATTRS_o_ai vec_sum4s(vector signed short __a,
8356 return __builtin_altivec_vsum4shs(__a, __b);
8361 static vector int __attribute__((__always_inline__))
8362 vec_vsum4sbs(vector signed char __a, vector int __b) {
8363 return __builtin_altivec_vsum4sbs(__a, __b);
8368 static vector unsigned int __attribute__((__always_inline__))
8369 vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b) {
8370 return __builtin_altivec_vsum4ubs(__a, __b);
8375 static vector int __attribute__((__always_inline__))
8376 vec_vsum4shs(vector signed short __a, vector int __b) {
8377 return __builtin_altivec_vsum4shs(__a, __b);
8382 /* The vsum2sws instruction has a big-endian bias, so that the second
8383 input vector and the result always reference big-endian elements
8384 1 and 3 (little-endian element 0 and 2). For ease of porting the
8385 programmer wants elements 1 and 3 in both cases, so for little
8386 endian we must perform some permutes. */
8388 static vector signed int __attribute__((__always_inline__))
8389 vec_sum2s(vector int __a, vector int __b) {
8390 #ifdef __LITTLE_ENDIAN__
8391 vector int __c = (vector signed int)vec_perm(
8392 __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
8394 __c = __builtin_altivec_vsum2sws(__a, __c);
8395 return (vector signed int)vec_perm(
8396 __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
8399 return __builtin_altivec_vsum2sws(__a, __b);
8405 static vector signed int __attribute__((__always_inline__))
8406 vec_vsum2sws(vector int __a, vector int __b) {
8407 #ifdef __LITTLE_ENDIAN__
8408 vector int __c = (vector signed int)vec_perm(
8409 __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
8411 __c = __builtin_altivec_vsum2sws(__a, __c);
8412 return (vector signed int)vec_perm(
8413 __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
8416 return __builtin_altivec_vsum2sws(__a, __b);
8422 /* The vsumsws instruction has a big-endian bias, so that the second
8423 input vector and the result always reference big-endian element 3
8424 (little-endian element 0). For ease of porting the programmer
8425 wants element 3 in both cases, so for little endian we must perform
8428 static vector signed int __attribute__((__always_inline__))
8429 vec_sums(vector signed int __a, vector signed int __b) {
8430 #ifdef __LITTLE_ENDIAN__
8431 __b = (vector signed int)vec_splat(__b, 3);
8432 __b = __builtin_altivec_vsumsws(__a, __b);
8433 return (vector signed int)(0, 0, 0, __b[0]);
8435 return __builtin_altivec_vsumsws(__a, __b);
8441 static vector signed int __attribute__((__always_inline__))
8442 vec_vsumsws(vector signed int __a, vector signed int __b) {
8443 #ifdef __LITTLE_ENDIAN__
8444 __b = (vector signed int)vec_splat(__b, 3);
8445 __b = __builtin_altivec_vsumsws(__a, __b);
8446 return (vector signed int)(0, 0, 0, __b[0]);
8448 return __builtin_altivec_vsumsws(__a, __b);
8454 static vector float __attribute__((__always_inline__))
8455 vec_trunc(vector float __a) {
8456 return __builtin_altivec_vrfiz(__a);
8461 static vector float __attribute__((__always_inline__))
8462 vec_vrfiz(vector float __a) {
8463 return __builtin_altivec_vrfiz(__a);
8468 /* The vector unpack instructions all have a big-endian bias, so for
8469 little endian we must reverse the meanings of "high" and "low." */
8471 static vector short __ATTRS_o_ai vec_unpackh(vector signed char __a) {
8472 #ifdef __LITTLE_ENDIAN__
8473 return __builtin_altivec_vupklsb((vector char)__a);
8475 return __builtin_altivec_vupkhsb((vector char)__a);
8479 static vector bool short __ATTRS_o_ai vec_unpackh(vector bool char __a) {
8480 #ifdef __LITTLE_ENDIAN__
8481 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8483 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8487 static vector int __ATTRS_o_ai vec_unpackh(vector short __a) {
8488 #ifdef __LITTLE_ENDIAN__
8489 return __builtin_altivec_vupklsh(__a);
8491 return __builtin_altivec_vupkhsh(__a);
8495 static vector bool int __ATTRS_o_ai vec_unpackh(vector bool short __a) {
8496 #ifdef __LITTLE_ENDIAN__
8497 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8499 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8503 static vector unsigned int __ATTRS_o_ai vec_unpackh(vector pixel __a) {
8504 #ifdef __LITTLE_ENDIAN__
8505 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8507 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8511 #ifdef __POWER8_VECTOR__
8512 static vector long long __ATTRS_o_ai vec_unpackh(vector int __a) {
8513 #ifdef __LITTLE_ENDIAN__
8514 return __builtin_altivec_vupklsw(__a);
8516 return __builtin_altivec_vupkhsw(__a);
8520 static vector bool long long __ATTRS_o_ai vec_unpackh(vector bool int __a) {
8521 #ifdef __LITTLE_ENDIAN__
8522 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
8524 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
8531 static vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a) {
8532 #ifdef __LITTLE_ENDIAN__
8533 return __builtin_altivec_vupklsb((vector char)__a);
8535 return __builtin_altivec_vupkhsb((vector char)__a);
8539 static vector bool short __ATTRS_o_ai vec_vupkhsb(vector bool char __a) {
8540 #ifdef __LITTLE_ENDIAN__
8541 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8543 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8549 static vector int __ATTRS_o_ai vec_vupkhsh(vector short __a) {
8550 #ifdef __LITTLE_ENDIAN__
8551 return __builtin_altivec_vupklsh(__a);
8553 return __builtin_altivec_vupkhsh(__a);
8557 static vector bool int __ATTRS_o_ai vec_vupkhsh(vector bool short __a) {
8558 #ifdef __LITTLE_ENDIAN__
8559 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8561 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8565 static vector unsigned int __ATTRS_o_ai vec_vupkhsh(vector pixel __a) {
8566 #ifdef __LITTLE_ENDIAN__
8567 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8569 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8575 #ifdef __POWER8_VECTOR__
8576 static vector long long __ATTRS_o_ai vec_vupkhsw(vector int __a) {
8577 #ifdef __LITTLE_ENDIAN__
8578 return __builtin_altivec_vupklsw(__a);
8580 return __builtin_altivec_vupkhsw(__a);
8584 static vector bool long long __ATTRS_o_ai vec_vupkhsw(vector bool int __a) {
8585 #ifdef __LITTLE_ENDIAN__
8586 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
8588 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
8595 static vector short __ATTRS_o_ai vec_unpackl(vector signed char __a) {
8596 #ifdef __LITTLE_ENDIAN__
8597 return __builtin_altivec_vupkhsb((vector char)__a);
8599 return __builtin_altivec_vupklsb((vector char)__a);
8603 static vector bool short __ATTRS_o_ai vec_unpackl(vector bool char __a) {
8604 #ifdef __LITTLE_ENDIAN__
8605 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8607 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8611 static vector int __ATTRS_o_ai vec_unpackl(vector short __a) {
8612 #ifdef __LITTLE_ENDIAN__
8613 return __builtin_altivec_vupkhsh(__a);
8615 return __builtin_altivec_vupklsh(__a);
8619 static vector bool int __ATTRS_o_ai vec_unpackl(vector bool short __a) {
8620 #ifdef __LITTLE_ENDIAN__
8621 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8623 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8627 static vector unsigned int __ATTRS_o_ai vec_unpackl(vector pixel __a) {
8628 #ifdef __LITTLE_ENDIAN__
8629 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8631 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8635 #ifdef __POWER8_VECTOR__
8636 static vector long long __ATTRS_o_ai vec_unpackl(vector int __a) {
8637 #ifdef __LITTLE_ENDIAN__
8638 return __builtin_altivec_vupkhsw(__a);
8640 return __builtin_altivec_vupklsw(__a);
8644 static vector bool long long __ATTRS_o_ai vec_unpackl(vector bool int __a) {
8645 #ifdef __LITTLE_ENDIAN__
8646 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
8648 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
8655 static vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a) {
8656 #ifdef __LITTLE_ENDIAN__
8657 return __builtin_altivec_vupkhsb((vector char)__a);
8659 return __builtin_altivec_vupklsb((vector char)__a);
8663 static vector bool short __ATTRS_o_ai vec_vupklsb(vector bool char __a) {
8664 #ifdef __LITTLE_ENDIAN__
8665 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8667 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8673 static vector int __ATTRS_o_ai vec_vupklsh(vector short __a) {
8674 #ifdef __LITTLE_ENDIAN__
8675 return __builtin_altivec_vupkhsh(__a);
8677 return __builtin_altivec_vupklsh(__a);
8681 static vector bool int __ATTRS_o_ai vec_vupklsh(vector bool short __a) {
8682 #ifdef __LITTLE_ENDIAN__
8683 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8685 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8689 static vector unsigned int __ATTRS_o_ai vec_vupklsh(vector pixel __a) {
8690 #ifdef __LITTLE_ENDIAN__
8691 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8693 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8699 #ifdef __POWER8_VECTOR__
8700 static vector long long __ATTRS_o_ai vec_vupklsw(vector int __a) {
8701 #ifdef __LITTLE_ENDIAN__
8702 return __builtin_altivec_vupkhsw(__a);
8704 return __builtin_altivec_vupklsw(__a);
8708 static vector bool long long __ATTRS_o_ai vec_vupklsw(vector bool int __a) {
8709 #ifdef __LITTLE_ENDIAN__
8710 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
8712 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
8721 static vector signed int __ATTRS_o_ai vec_vsx_ld(int __a,
8722 const vector signed int *__b) {
8723 return (vector signed int)__builtin_vsx_lxvw4x(__a, __b);
8726 static vector unsigned int __ATTRS_o_ai
8727 vec_vsx_ld(int __a, const vector unsigned int *__b) {
8728 return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b);
8731 static vector float __ATTRS_o_ai vec_vsx_ld(int __a, const vector float *__b) {
8732 return (vector float)__builtin_vsx_lxvw4x(__a, __b);
8735 static vector signed long long __ATTRS_o_ai
8736 vec_vsx_ld(int __a, const vector signed long long *__b) {
8737 return (vector signed long long)__builtin_vsx_lxvd2x(__a, __b);
8740 static vector unsigned long long __ATTRS_o_ai
8741 vec_vsx_ld(int __a, const vector unsigned long long *__b) {
8742 return (vector unsigned long long)__builtin_vsx_lxvd2x(__a, __b);
8745 static vector double __ATTRS_o_ai vec_vsx_ld(int __a,
8746 const vector double *__b) {
8747 return (vector double)__builtin_vsx_lxvd2x(__a, __b);
8756 static void __ATTRS_o_ai vec_vsx_st(vector signed int __a, int __b,
8757 vector signed int *__c) {
8758 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
8761 static void __ATTRS_o_ai vec_vsx_st(vector unsigned int __a, int __b,
8762 vector unsigned int *__c) {
8763 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
8766 static void __ATTRS_o_ai vec_vsx_st(vector float __a, int __b,
8767 vector float *__c) {
8768 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
8771 static void __ATTRS_o_ai vec_vsx_st(vector signed long long __a, int __b,
8772 vector signed long long *__c) {
8773 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
8776 static void __ATTRS_o_ai vec_vsx_st(vector unsigned long long __a, int __b,
8777 vector unsigned long long *__c) {
8778 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
8781 static void __ATTRS_o_ai vec_vsx_st(vector double __a, int __b,
8782 vector double *__c) {
8783 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
8790 #define __builtin_altivec_vxor vec_xor
8792 static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a,
8793 vector signed char __b) {
8797 static vector signed char __ATTRS_o_ai vec_xor(vector bool char __a,
8798 vector signed char __b) {
8799 return (vector signed char)__a ^ __b;
8802 static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a,
8803 vector bool char __b) {
8804 return __a ^ (vector signed char)__b;
8807 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
8808 vector unsigned char __b) {
8812 static vector unsigned char __ATTRS_o_ai vec_xor(vector bool char __a,
8813 vector unsigned char __b) {
8814 return (vector unsigned char)__a ^ __b;
8817 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
8818 vector bool char __b) {
8819 return __a ^ (vector unsigned char)__b;
8822 static vector bool char __ATTRS_o_ai vec_xor(vector bool char __a,
8823 vector bool char __b) {
8827 static vector short __ATTRS_o_ai vec_xor(vector short __a, vector short __b) {
8831 static vector short __ATTRS_o_ai vec_xor(vector bool short __a,
8833 return (vector short)__a ^ __b;
8836 static vector short __ATTRS_o_ai vec_xor(vector short __a,
8837 vector bool short __b) {
8838 return __a ^ (vector short)__b;
8841 static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a,
8842 vector unsigned short __b) {
8846 static vector unsigned short __ATTRS_o_ai vec_xor(vector bool short __a,
8847 vector unsigned short __b) {
8848 return (vector unsigned short)__a ^ __b;
8851 static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a,
8852 vector bool short __b) {
8853 return __a ^ (vector unsigned short)__b;
8856 static vector bool short __ATTRS_o_ai vec_xor(vector bool short __a,
8857 vector bool short __b) {
8861 static vector int __ATTRS_o_ai vec_xor(vector int __a, vector int __b) {
8865 static vector int __ATTRS_o_ai vec_xor(vector bool int __a, vector int __b) {
8866 return (vector int)__a ^ __b;
8869 static vector int __ATTRS_o_ai vec_xor(vector int __a, vector bool int __b) {
8870 return __a ^ (vector int)__b;
8873 static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a,
8874 vector unsigned int __b) {
8878 static vector unsigned int __ATTRS_o_ai vec_xor(vector bool int __a,
8879 vector unsigned int __b) {
8880 return (vector unsigned int)__a ^ __b;
8883 static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a,
8884 vector bool int __b) {
8885 return __a ^ (vector unsigned int)__b;
8888 static vector bool int __ATTRS_o_ai vec_xor(vector bool int __a,
8889 vector bool int __b) {
8893 static vector float __ATTRS_o_ai vec_xor(vector float __a, vector float __b) {
8894 vector unsigned int __res =
8895 (vector unsigned int)__a ^ (vector unsigned int)__b;
8896 return (vector float)__res;
8899 static vector float __ATTRS_o_ai vec_xor(vector bool int __a,
8901 vector unsigned int __res =
8902 (vector unsigned int)__a ^ (vector unsigned int)__b;
8903 return (vector float)__res;
8906 static vector float __ATTRS_o_ai vec_xor(vector float __a,
8907 vector bool int __b) {
8908 vector unsigned int __res =
8909 (vector unsigned int)__a ^ (vector unsigned int)__b;
8910 return (vector float)__res;
8914 static vector signed long long __ATTRS_o_ai
8915 vec_xor(vector signed long long __a, vector signed long long __b) {
8919 static vector signed long long __ATTRS_o_ai
8920 vec_xor(vector bool long long __a, vector signed long long __b) {
8921 return (vector signed long long)__a ^ __b;
8924 static vector signed long long __ATTRS_o_ai vec_xor(vector signed long long __a,
8925 vector bool long long __b) {
8926 return __a ^ (vector signed long long)__b;
8929 static vector unsigned long long __ATTRS_o_ai
8930 vec_xor(vector unsigned long long __a, vector unsigned long long __b) {
8934 static vector unsigned long long __ATTRS_o_ai
8935 vec_xor(vector bool long long __a, vector unsigned long long __b) {
8936 return (vector unsigned long long)__a ^ __b;
8939 static vector unsigned long long __ATTRS_o_ai
8940 vec_xor(vector unsigned long long __a, vector bool long long __b) {
8941 return __a ^ (vector unsigned long long)__b;
8944 static vector bool long long __ATTRS_o_ai vec_xor(vector bool long long __a,
8945 vector bool long long __b) {
8952 static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a,
8953 vector signed char __b) {
8957 static vector signed char __ATTRS_o_ai vec_vxor(vector bool char __a,
8958 vector signed char __b) {
8959 return (vector signed char)__a ^ __b;
8962 static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a,
8963 vector bool char __b) {
8964 return __a ^ (vector signed char)__b;
8967 static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a,
8968 vector unsigned char __b) {
8972 static vector unsigned char __ATTRS_o_ai vec_vxor(vector bool char __a,
8973 vector unsigned char __b) {
8974 return (vector unsigned char)__a ^ __b;
8977 static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a,
8978 vector bool char __b) {
8979 return __a ^ (vector unsigned char)__b;
8982 static vector bool char __ATTRS_o_ai vec_vxor(vector bool char __a,
8983 vector bool char __b) {
8987 static vector short __ATTRS_o_ai vec_vxor(vector short __a, vector short __b) {
8991 static vector short __ATTRS_o_ai vec_vxor(vector bool short __a,
8993 return (vector short)__a ^ __b;
8996 static vector short __ATTRS_o_ai vec_vxor(vector short __a,
8997 vector bool short __b) {
8998 return __a ^ (vector short)__b;
9001 static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a,
9002 vector unsigned short __b) {
9006 static vector unsigned short __ATTRS_o_ai vec_vxor(vector bool short __a,
9007 vector unsigned short __b) {
9008 return (vector unsigned short)__a ^ __b;
9011 static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a,
9012 vector bool short __b) {
9013 return __a ^ (vector unsigned short)__b;
9016 static vector bool short __ATTRS_o_ai vec_vxor(vector bool short __a,
9017 vector bool short __b) {
9021 static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector int __b) {
9025 static vector int __ATTRS_o_ai vec_vxor(vector bool int __a, vector int __b) {
9026 return (vector int)__a ^ __b;
9029 static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector bool int __b) {
9030 return __a ^ (vector int)__b;
9033 static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a,
9034 vector unsigned int __b) {
9038 static vector unsigned int __ATTRS_o_ai vec_vxor(vector bool int __a,
9039 vector unsigned int __b) {
9040 return (vector unsigned int)__a ^ __b;
9043 static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a,
9044 vector bool int __b) {
9045 return __a ^ (vector unsigned int)__b;
9048 static vector bool int __ATTRS_o_ai vec_vxor(vector bool int __a,
9049 vector bool int __b) {
9053 static vector float __ATTRS_o_ai vec_vxor(vector float __a, vector float __b) {
9054 vector unsigned int __res =
9055 (vector unsigned int)__a ^ (vector unsigned int)__b;
9056 return (vector float)__res;
9059 static vector float __ATTRS_o_ai vec_vxor(vector bool int __a,
9061 vector unsigned int __res =
9062 (vector unsigned int)__a ^ (vector unsigned int)__b;
9063 return (vector float)__res;
9066 static vector float __ATTRS_o_ai vec_vxor(vector float __a,
9067 vector bool int __b) {
9068 vector unsigned int __res =
9069 (vector unsigned int)__a ^ (vector unsigned int)__b;
9070 return (vector float)__res;
9074 static vector signed long long __ATTRS_o_ai
9075 vec_vxor(vector signed long long __a, vector signed long long __b) {
9079 static vector signed long long __ATTRS_o_ai
9080 vec_vxor(vector bool long long __a, vector signed long long __b) {
9081 return (vector signed long long)__a ^ __b;
9084 static vector signed long long __ATTRS_o_ai
9085 vec_vxor(vector signed long long __a, vector bool long long __b) {
9086 return __a ^ (vector signed long long)__b;
9089 static vector unsigned long long __ATTRS_o_ai
9090 vec_vxor(vector unsigned long long __a, vector unsigned long long __b) {
9094 static vector unsigned long long __ATTRS_o_ai
9095 vec_vxor(vector bool long long __a, vector unsigned long long __b) {
9096 return (vector unsigned long long)__a ^ __b;
9099 static vector unsigned long long __ATTRS_o_ai
9100 vec_vxor(vector unsigned long long __a, vector bool long long __b) {
9101 return __a ^ (vector unsigned long long)__b;
9104 static vector bool long long __ATTRS_o_ai vec_vxor(vector bool long long __a,
9105 vector bool long long __b) {
9110 /* ------------------------ extensions for CBEA ----------------------------- */
9114 static signed char __ATTRS_o_ai vec_extract(vector signed char __a, int __b) {
9118 static unsigned char __ATTRS_o_ai vec_extract(vector unsigned char __a,
9123 static short __ATTRS_o_ai vec_extract(vector short __a, int __b) {
9127 static unsigned short __ATTRS_o_ai vec_extract(vector unsigned short __a,
9132 static int __ATTRS_o_ai vec_extract(vector int __a, int __b) {
9136 static unsigned int __ATTRS_o_ai vec_extract(vector unsigned int __a, int __b) {
9140 static float __ATTRS_o_ai vec_extract(vector float __a, int __b) {
9146 static vector signed char __ATTRS_o_ai vec_insert(signed char __a,
9147 vector signed char __b,
9153 static vector unsigned char __ATTRS_o_ai vec_insert(unsigned char __a,
9154 vector unsigned char __b,
9160 static vector short __ATTRS_o_ai vec_insert(short __a, vector short __b,
9166 static vector unsigned short __ATTRS_o_ai vec_insert(unsigned short __a,
9167 vector unsigned short __b,
9173 static vector int __ATTRS_o_ai vec_insert(int __a, vector int __b, int __c) {
9178 static vector unsigned int __ATTRS_o_ai vec_insert(unsigned int __a,
9179 vector unsigned int __b,
9185 static vector float __ATTRS_o_ai vec_insert(float __a, vector float __b,
9193 static vector signed char __ATTRS_o_ai vec_lvlx(int __a,
9194 const signed char *__b) {
9195 return vec_perm(vec_ld(__a, __b), (vector signed char)(0),
9196 vec_lvsl(__a, __b));
9199 static vector signed char __ATTRS_o_ai vec_lvlx(int __a,
9200 const vector signed char *__b) {
9201 return vec_perm(vec_ld(__a, __b), (vector signed char)(0),
9202 vec_lvsl(__a, (unsigned char *)__b));
9205 static vector unsigned char __ATTRS_o_ai vec_lvlx(int __a,
9206 const unsigned char *__b) {
9207 return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0),
9208 vec_lvsl(__a, __b));
9211 static vector unsigned char __ATTRS_o_ai
9212 vec_lvlx(int __a, const vector unsigned char *__b) {
9213 return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0),
9214 vec_lvsl(__a, (unsigned char *)__b));
9217 static vector bool char __ATTRS_o_ai vec_lvlx(int __a,
9218 const vector bool char *__b) {
9219 return vec_perm(vec_ld(__a, __b), (vector bool char)(0),
9220 vec_lvsl(__a, (unsigned char *)__b));
9223 static vector short __ATTRS_o_ai vec_lvlx(int __a, const short *__b) {
9224 return vec_perm(vec_ld(__a, __b), (vector short)(0), vec_lvsl(__a, __b));
9227 static vector short __ATTRS_o_ai vec_lvlx(int __a, const vector short *__b) {
9228 return vec_perm(vec_ld(__a, __b), (vector short)(0),
9229 vec_lvsl(__a, (unsigned char *)__b));
9232 static vector unsigned short __ATTRS_o_ai vec_lvlx(int __a,
9233 const unsigned short *__b) {
9234 return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0),
9235 vec_lvsl(__a, __b));
9238 static vector unsigned short __ATTRS_o_ai
9239 vec_lvlx(int __a, const vector unsigned short *__b) {
9240 return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0),
9241 vec_lvsl(__a, (unsigned char *)__b));
9244 static vector bool short __ATTRS_o_ai vec_lvlx(int __a,
9245 const vector bool short *__b) {
9246 return vec_perm(vec_ld(__a, __b), (vector bool short)(0),
9247 vec_lvsl(__a, (unsigned char *)__b));
9250 static vector pixel __ATTRS_o_ai vec_lvlx(int __a, const vector pixel *__b) {
9251 return vec_perm(vec_ld(__a, __b), (vector pixel)(0),
9252 vec_lvsl(__a, (unsigned char *)__b));
9255 static vector int __ATTRS_o_ai vec_lvlx(int __a, const int *__b) {
9256 return vec_perm(vec_ld(__a, __b), (vector int)(0), vec_lvsl(__a, __b));
9259 static vector int __ATTRS_o_ai vec_lvlx(int __a, const vector int *__b) {
9260 return vec_perm(vec_ld(__a, __b), (vector int)(0),
9261 vec_lvsl(__a, (unsigned char *)__b));
9264 static vector unsigned int __ATTRS_o_ai vec_lvlx(int __a,
9265 const unsigned int *__b) {
9266 return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0),
9267 vec_lvsl(__a, __b));
9270 static vector unsigned int __ATTRS_o_ai
9271 vec_lvlx(int __a, const vector unsigned int *__b) {
9272 return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0),
9273 vec_lvsl(__a, (unsigned char *)__b));
9276 static vector bool int __ATTRS_o_ai vec_lvlx(int __a,
9277 const vector bool int *__b) {
9278 return vec_perm(vec_ld(__a, __b), (vector bool int)(0),
9279 vec_lvsl(__a, (unsigned char *)__b));
9282 static vector float __ATTRS_o_ai vec_lvlx(int __a, const float *__b) {
9283 return vec_perm(vec_ld(__a, __b), (vector float)(0), vec_lvsl(__a, __b));
9286 static vector float __ATTRS_o_ai vec_lvlx(int __a, const vector float *__b) {
9287 return vec_perm(vec_ld(__a, __b), (vector float)(0),
9288 vec_lvsl(__a, (unsigned char *)__b));
9293 static vector signed char __ATTRS_o_ai vec_lvlxl(int __a,
9294 const signed char *__b) {
9295 return vec_perm(vec_ldl(__a, __b), (vector signed char)(0),
9296 vec_lvsl(__a, __b));
9299 static vector signed char __ATTRS_o_ai
9300 vec_lvlxl(int __a, const vector signed char *__b) {
9301 return vec_perm(vec_ldl(__a, __b), (vector signed char)(0),
9302 vec_lvsl(__a, (unsigned char *)__b));
9305 static vector unsigned char __ATTRS_o_ai vec_lvlxl(int __a,
9306 const unsigned char *__b) {
9307 return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0),
9308 vec_lvsl(__a, __b));
9311 static vector unsigned char __ATTRS_o_ai
9312 vec_lvlxl(int __a, const vector unsigned char *__b) {
9313 return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0),
9314 vec_lvsl(__a, (unsigned char *)__b));
9317 static vector bool char __ATTRS_o_ai vec_lvlxl(int __a,
9318 const vector bool char *__b) {
9319 return vec_perm(vec_ldl(__a, __b), (vector bool char)(0),
9320 vec_lvsl(__a, (unsigned char *)__b));
9323 static vector short __ATTRS_o_ai vec_lvlxl(int __a, const short *__b) {
9324 return vec_perm(vec_ldl(__a, __b), (vector short)(0), vec_lvsl(__a, __b));
9327 static vector short __ATTRS_o_ai vec_lvlxl(int __a, const vector short *__b) {
9328 return vec_perm(vec_ldl(__a, __b), (vector short)(0),
9329 vec_lvsl(__a, (unsigned char *)__b));
9332 static vector unsigned short __ATTRS_o_ai vec_lvlxl(int __a,
9333 const unsigned short *__b) {
9334 return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0),
9335 vec_lvsl(__a, __b));
9338 static vector unsigned short __ATTRS_o_ai
9339 vec_lvlxl(int __a, const vector unsigned short *__b) {
9340 return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0),
9341 vec_lvsl(__a, (unsigned char *)__b));
9344 static vector bool short __ATTRS_o_ai vec_lvlxl(int __a,
9345 const vector bool short *__b) {
9346 return vec_perm(vec_ldl(__a, __b), (vector bool short)(0),
9347 vec_lvsl(__a, (unsigned char *)__b));
9350 static vector pixel __ATTRS_o_ai vec_lvlxl(int __a, const vector pixel *__b) {
9351 return vec_perm(vec_ldl(__a, __b), (vector pixel)(0),
9352 vec_lvsl(__a, (unsigned char *)__b));
9355 static vector int __ATTRS_o_ai vec_lvlxl(int __a, const int *__b) {
9356 return vec_perm(vec_ldl(__a, __b), (vector int)(0), vec_lvsl(__a, __b));
9359 static vector int __ATTRS_o_ai vec_lvlxl(int __a, const vector int *__b) {
9360 return vec_perm(vec_ldl(__a, __b), (vector int)(0),
9361 vec_lvsl(__a, (unsigned char *)__b));
9364 static vector unsigned int __ATTRS_o_ai vec_lvlxl(int __a,
9365 const unsigned int *__b) {
9366 return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0),
9367 vec_lvsl(__a, __b));
9370 static vector unsigned int __ATTRS_o_ai
9371 vec_lvlxl(int __a, const vector unsigned int *__b) {
9372 return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0),
9373 vec_lvsl(__a, (unsigned char *)__b));
9376 static vector bool int __ATTRS_o_ai vec_lvlxl(int __a,
9377 const vector bool int *__b) {
9378 return vec_perm(vec_ldl(__a, __b), (vector bool int)(0),
9379 vec_lvsl(__a, (unsigned char *)__b));
9382 static vector float __ATTRS_o_ai vec_lvlxl(int __a, const float *__b) {
9383 return vec_perm(vec_ldl(__a, __b), (vector float)(0), vec_lvsl(__a, __b));
9386 static vector float __ATTRS_o_ai vec_lvlxl(int __a, vector float *__b) {
9387 return vec_perm(vec_ldl(__a, __b), (vector float)(0),
9388 vec_lvsl(__a, (unsigned char *)__b));
9393 static vector signed char __ATTRS_o_ai vec_lvrx(int __a,
9394 const signed char *__b) {
9395 return vec_perm((vector signed char)(0), vec_ld(__a, __b),
9396 vec_lvsl(__a, __b));
9399 static vector signed char __ATTRS_o_ai vec_lvrx(int __a,
9400 const vector signed char *__b) {
9401 return vec_perm((vector signed char)(0), vec_ld(__a, __b),
9402 vec_lvsl(__a, (unsigned char *)__b));
9405 static vector unsigned char __ATTRS_o_ai vec_lvrx(int __a,
9406 const unsigned char *__b) {
9407 return vec_perm((vector unsigned char)(0), vec_ld(__a, __b),
9408 vec_lvsl(__a, __b));
9411 static vector unsigned char __ATTRS_o_ai
9412 vec_lvrx(int __a, const vector unsigned char *__b) {
9413 return vec_perm((vector unsigned char)(0), vec_ld(__a, __b),
9414 vec_lvsl(__a, (unsigned char *)__b));
9417 static vector bool char __ATTRS_o_ai vec_lvrx(int __a,
9418 const vector bool char *__b) {
9419 return vec_perm((vector bool char)(0), vec_ld(__a, __b),
9420 vec_lvsl(__a, (unsigned char *)__b));
9423 static vector short __ATTRS_o_ai vec_lvrx(int __a, const short *__b) {
9424 return vec_perm((vector short)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
9427 static vector short __ATTRS_o_ai vec_lvrx(int __a, const vector short *__b) {
9428 return vec_perm((vector short)(0), vec_ld(__a, __b),
9429 vec_lvsl(__a, (unsigned char *)__b));
9432 static vector unsigned short __ATTRS_o_ai vec_lvrx(int __a,
9433 const unsigned short *__b) {
9434 return vec_perm((vector unsigned short)(0), vec_ld(__a, __b),
9435 vec_lvsl(__a, __b));
9438 static vector unsigned short __ATTRS_o_ai
9439 vec_lvrx(int __a, const vector unsigned short *__b) {
9440 return vec_perm((vector unsigned short)(0), vec_ld(__a, __b),
9441 vec_lvsl(__a, (unsigned char *)__b));
9444 static vector bool short __ATTRS_o_ai vec_lvrx(int __a,
9445 const vector bool short *__b) {
9446 return vec_perm((vector bool short)(0), vec_ld(__a, __b),
9447 vec_lvsl(__a, (unsigned char *)__b));
9450 static vector pixel __ATTRS_o_ai vec_lvrx(int __a, const vector pixel *__b) {
9451 return vec_perm((vector pixel)(0), vec_ld(__a, __b),
9452 vec_lvsl(__a, (unsigned char *)__b));
9455 static vector int __ATTRS_o_ai vec_lvrx(int __a, const int *__b) {
9456 return vec_perm((vector int)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
9459 static vector int __ATTRS_o_ai vec_lvrx(int __a, const vector int *__b) {
9460 return vec_perm((vector int)(0), vec_ld(__a, __b),
9461 vec_lvsl(__a, (unsigned char *)__b));
9464 static vector unsigned int __ATTRS_o_ai vec_lvrx(int __a,
9465 const unsigned int *__b) {
9466 return vec_perm((vector unsigned int)(0), vec_ld(__a, __b),
9467 vec_lvsl(__a, __b));
9470 static vector unsigned int __ATTRS_o_ai
9471 vec_lvrx(int __a, const vector unsigned int *__b) {
9472 return vec_perm((vector unsigned int)(0), vec_ld(__a, __b),
9473 vec_lvsl(__a, (unsigned char *)__b));
9476 static vector bool int __ATTRS_o_ai vec_lvrx(int __a,
9477 const vector bool int *__b) {
9478 return vec_perm((vector bool int)(0), vec_ld(__a, __b),
9479 vec_lvsl(__a, (unsigned char *)__b));
9482 static vector float __ATTRS_o_ai vec_lvrx(int __a, const float *__b) {
9483 return vec_perm((vector float)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
9486 static vector float __ATTRS_o_ai vec_lvrx(int __a, const vector float *__b) {
9487 return vec_perm((vector float)(0), vec_ld(__a, __b),
9488 vec_lvsl(__a, (unsigned char *)__b));
9493 static vector signed char __ATTRS_o_ai vec_lvrxl(int __a,
9494 const signed char *__b) {
9495 return vec_perm((vector signed char)(0), vec_ldl(__a, __b),
9496 vec_lvsl(__a, __b));
9499 static vector signed char __ATTRS_o_ai
9500 vec_lvrxl(int __a, const vector signed char *__b) {
9501 return vec_perm((vector signed char)(0), vec_ldl(__a, __b),
9502 vec_lvsl(__a, (unsigned char *)__b));
9505 static vector unsigned char __ATTRS_o_ai vec_lvrxl(int __a,
9506 const unsigned char *__b) {
9507 return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b),
9508 vec_lvsl(__a, __b));
9511 static vector unsigned char __ATTRS_o_ai
9512 vec_lvrxl(int __a, const vector unsigned char *__b) {
9513 return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b),
9514 vec_lvsl(__a, (unsigned char *)__b));
9517 static vector bool char __ATTRS_o_ai vec_lvrxl(int __a,
9518 const vector bool char *__b) {
9519 return vec_perm((vector bool char)(0), vec_ldl(__a, __b),
9520 vec_lvsl(__a, (unsigned char *)__b));
9523 static vector short __ATTRS_o_ai vec_lvrxl(int __a, const short *__b) {
9524 return vec_perm((vector short)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
9527 static vector short __ATTRS_o_ai vec_lvrxl(int __a, const vector short *__b) {
9528 return vec_perm((vector short)(0), vec_ldl(__a, __b),
9529 vec_lvsl(__a, (unsigned char *)__b));
9532 static vector unsigned short __ATTRS_o_ai vec_lvrxl(int __a,
9533 const unsigned short *__b) {
9534 return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b),
9535 vec_lvsl(__a, __b));
9538 static vector unsigned short __ATTRS_o_ai
9539 vec_lvrxl(int __a, const vector unsigned short *__b) {
9540 return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b),
9541 vec_lvsl(__a, (unsigned char *)__b));
9544 static vector bool short __ATTRS_o_ai vec_lvrxl(int __a,
9545 const vector bool short *__b) {
9546 return vec_perm((vector bool short)(0), vec_ldl(__a, __b),
9547 vec_lvsl(__a, (unsigned char *)__b));
9550 static vector pixel __ATTRS_o_ai vec_lvrxl(int __a, const vector pixel *__b) {
9551 return vec_perm((vector pixel)(0), vec_ldl(__a, __b),
9552 vec_lvsl(__a, (unsigned char *)__b));
9555 static vector int __ATTRS_o_ai vec_lvrxl(int __a, const int *__b) {
9556 return vec_perm((vector int)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
9559 static vector int __ATTRS_o_ai vec_lvrxl(int __a, const vector int *__b) {
9560 return vec_perm((vector int)(0), vec_ldl(__a, __b),
9561 vec_lvsl(__a, (unsigned char *)__b));
9564 static vector unsigned int __ATTRS_o_ai vec_lvrxl(int __a,
9565 const unsigned int *__b) {
9566 return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b),
9567 vec_lvsl(__a, __b));
9570 static vector unsigned int __ATTRS_o_ai
9571 vec_lvrxl(int __a, const vector unsigned int *__b) {
9572 return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b),
9573 vec_lvsl(__a, (unsigned char *)__b));
9576 static vector bool int __ATTRS_o_ai vec_lvrxl(int __a,
9577 const vector bool int *__b) {
9578 return vec_perm((vector bool int)(0), vec_ldl(__a, __b),
9579 vec_lvsl(__a, (unsigned char *)__b));
9582 static vector float __ATTRS_o_ai vec_lvrxl(int __a, const float *__b) {
9583 return vec_perm((vector float)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
9586 static vector float __ATTRS_o_ai vec_lvrxl(int __a, const vector float *__b) {
9587 return vec_perm((vector float)(0), vec_ldl(__a, __b),
9588 vec_lvsl(__a, (unsigned char *)__b));
9593 static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b,
9595 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9599 static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b,
9600 vector signed char *__c) {
9602 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9606 static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b,
9607 unsigned char *__c) {
9608 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9612 static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b,
9613 vector unsigned char *__c) {
9615 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9619 static void __ATTRS_o_ai vec_stvlx(vector bool char __a, int __b,
9620 vector bool char *__c) {
9622 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9626 static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b, short *__c) {
9627 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9631 static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b,
9632 vector short *__c) {
9634 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9638 static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b,
9639 unsigned short *__c) {
9640 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9644 static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b,
9645 vector unsigned short *__c) {
9647 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9651 static void __ATTRS_o_ai vec_stvlx(vector bool short __a, int __b,
9652 vector bool short *__c) {
9654 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9658 static void __ATTRS_o_ai vec_stvlx(vector pixel __a, int __b,
9659 vector pixel *__c) {
9661 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9665 static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, int *__c) {
9666 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9670 static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, vector int *__c) {
9672 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9676 static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b,
9677 unsigned int *__c) {
9678 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9682 static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b,
9683 vector unsigned int *__c) {
9685 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9689 static void __ATTRS_o_ai vec_stvlx(vector bool int __a, int __b,
9690 vector bool int *__c) {
9692 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9696 static void __ATTRS_o_ai vec_stvlx(vector float __a, int __b,
9697 vector float *__c) {
9699 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9705 static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b,
9707 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9711 static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b,
9712 vector signed char *__c) {
9714 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9718 static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b,
9719 unsigned char *__c) {
9720 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9724 static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b,
9725 vector unsigned char *__c) {
9727 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9731 static void __ATTRS_o_ai vec_stvlxl(vector bool char __a, int __b,
9732 vector bool char *__c) {
9734 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9738 static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b, short *__c) {
9739 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9743 static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b,
9744 vector short *__c) {
9746 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9750 static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b,
9751 unsigned short *__c) {
9752 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9756 static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b,
9757 vector unsigned short *__c) {
9759 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9763 static void __ATTRS_o_ai vec_stvlxl(vector bool short __a, int __b,
9764 vector bool short *__c) {
9766 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9770 static void __ATTRS_o_ai vec_stvlxl(vector pixel __a, int __b,
9771 vector pixel *__c) {
9773 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9777 static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, int *__c) {
9778 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9782 static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, vector int *__c) {
9784 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9788 static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b,
9789 unsigned int *__c) {
9790 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9794 static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b,
9795 vector unsigned int *__c) {
9797 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9801 static void __ATTRS_o_ai vec_stvlxl(vector bool int __a, int __b,
9802 vector bool int *__c) {
9804 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9808 static void __ATTRS_o_ai vec_stvlxl(vector float __a, int __b,
9809 vector float *__c) {
9811 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9817 static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b,
9819 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9823 static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b,
9824 vector signed char *__c) {
9826 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9830 static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b,
9831 unsigned char *__c) {
9832 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9836 static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b,
9837 vector unsigned char *__c) {
9839 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9843 static void __ATTRS_o_ai vec_stvrx(vector bool char __a, int __b,
9844 vector bool char *__c) {
9846 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9850 static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b, short *__c) {
9851 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9855 static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b,
9856 vector short *__c) {
9858 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9862 static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b,
9863 unsigned short *__c) {
9864 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9868 static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b,
9869 vector unsigned short *__c) {
9871 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9875 static void __ATTRS_o_ai vec_stvrx(vector bool short __a, int __b,
9876 vector bool short *__c) {
9878 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9882 static void __ATTRS_o_ai vec_stvrx(vector pixel __a, int __b,
9883 vector pixel *__c) {
9885 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9889 static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, int *__c) {
9890 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9894 static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, vector int *__c) {
9896 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9900 static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b,
9901 unsigned int *__c) {
9902 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9906 static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b,
9907 vector unsigned int *__c) {
9909 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9913 static void __ATTRS_o_ai vec_stvrx(vector bool int __a, int __b,
9914 vector bool int *__c) {
9916 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9920 static void __ATTRS_o_ai vec_stvrx(vector float __a, int __b,
9921 vector float *__c) {
9923 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9929 static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b,
9931 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9935 static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b,
9936 vector signed char *__c) {
9938 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9942 static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b,
9943 unsigned char *__c) {
9944 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9948 static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b,
9949 vector unsigned char *__c) {
9951 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9955 static void __ATTRS_o_ai vec_stvrxl(vector bool char __a, int __b,
9956 vector bool char *__c) {
9958 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9962 static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b, short *__c) {
9963 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9967 static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b,
9968 vector short *__c) {
9970 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9974 static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b,
9975 unsigned short *__c) {
9976 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9980 static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b,
9981 vector unsigned short *__c) {
9983 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9987 static void __ATTRS_o_ai vec_stvrxl(vector bool short __a, int __b,
9988 vector bool short *__c) {
9990 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9994 static void __ATTRS_o_ai vec_stvrxl(vector pixel __a, int __b,
9995 vector pixel *__c) {
9997 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10001 static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, int *__c) {
10002 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
10006 static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, vector int *__c) {
10008 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10012 static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b,
10013 unsigned int *__c) {
10014 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
10018 static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b,
10019 vector unsigned int *__c) {
10021 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10025 static void __ATTRS_o_ai vec_stvrxl(vector bool int __a, int __b,
10026 vector bool int *__c) {
10028 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10032 static void __ATTRS_o_ai vec_stvrxl(vector float __a, int __b,
10033 vector float *__c) {
10035 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10041 static vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b) {
10042 vector signed char __res = (vector signed char)(0);
10047 static vector unsigned char __ATTRS_o_ai vec_promote(unsigned char __a,
10049 vector unsigned char __res = (vector unsigned char)(0);
10054 static vector short __ATTRS_o_ai vec_promote(short __a, int __b) {
10055 vector short __res = (vector short)(0);
10060 static vector unsigned short __ATTRS_o_ai vec_promote(unsigned short __a,
10062 vector unsigned short __res = (vector unsigned short)(0);
10067 static vector int __ATTRS_o_ai vec_promote(int __a, int __b) {
10068 vector int __res = (vector int)(0);
10073 static vector unsigned int __ATTRS_o_ai vec_promote(unsigned int __a, int __b) {
10074 vector unsigned int __res = (vector unsigned int)(0);
10079 static vector float __ATTRS_o_ai vec_promote(float __a, int __b) {
10080 vector float __res = (vector float)(0);
10087 static vector signed char __ATTRS_o_ai vec_splats(signed char __a) {
10088 return (vector signed char)(__a);
10091 static vector unsigned char __ATTRS_o_ai vec_splats(unsigned char __a) {
10092 return (vector unsigned char)(__a);
10095 static vector short __ATTRS_o_ai vec_splats(short __a) {
10096 return (vector short)(__a);
10099 static vector unsigned short __ATTRS_o_ai vec_splats(unsigned short __a) {
10100 return (vector unsigned short)(__a);
10103 static vector int __ATTRS_o_ai vec_splats(int __a) { return (vector int)(__a); }
10105 static vector unsigned int __ATTRS_o_ai vec_splats(unsigned int __a) {
10106 return (vector unsigned int)(__a);
10109 static vector float __ATTRS_o_ai vec_splats(float __a) {
10110 return (vector float)(__a);
10113 /* ----------------------------- predicates --------------------------------- */
10117 static int __ATTRS_o_ai vec_all_eq(vector signed char __a,
10118 vector signed char __b) {
10119 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
10123 static int __ATTRS_o_ai vec_all_eq(vector signed char __a,
10124 vector bool char __b) {
10125 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
10129 static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a,
10130 vector unsigned char __b) {
10131 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
10135 static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a,
10136 vector bool char __b) {
10137 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
10141 static int __ATTRS_o_ai vec_all_eq(vector bool char __a,
10142 vector signed char __b) {
10143 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
10147 static int __ATTRS_o_ai vec_all_eq(vector bool char __a,
10148 vector unsigned char __b) {
10149 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
10153 static int __ATTRS_o_ai vec_all_eq(vector bool char __a, vector bool char __b) {
10154 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
10158 static int __ATTRS_o_ai vec_all_eq(vector short __a, vector short __b) {
10159 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, __b);
10162 static int __ATTRS_o_ai vec_all_eq(vector short __a, vector bool short __b) {
10163 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, (vector short)__b);
10166 static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a,
10167 vector unsigned short __b) {
10168 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
10169 (vector short)__b);
10172 static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a,
10173 vector bool short __b) {
10174 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
10175 (vector short)__b);
10178 static int __ATTRS_o_ai vec_all_eq(vector bool short __a, vector short __b) {
10179 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
10180 (vector short)__b);
10183 static int __ATTRS_o_ai vec_all_eq(vector bool short __a,
10184 vector unsigned short __b) {
10185 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
10186 (vector short)__b);
10189 static int __ATTRS_o_ai vec_all_eq(vector bool short __a,
10190 vector bool short __b) {
10191 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
10192 (vector short)__b);
10195 static int __ATTRS_o_ai vec_all_eq(vector pixel __a, vector pixel __b) {
10196 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
10197 (vector short)__b);
10200 static int __ATTRS_o_ai vec_all_eq(vector int __a, vector int __b) {
10201 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, __b);
10204 static int __ATTRS_o_ai vec_all_eq(vector int __a, vector bool int __b) {
10205 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, (vector int)__b);
10208 static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a,
10209 vector unsigned int __b) {
10210 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
10214 static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a,
10215 vector bool int __b) {
10216 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
10220 static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector int __b) {
10221 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
10225 static int __ATTRS_o_ai vec_all_eq(vector bool int __a,
10226 vector unsigned int __b) {
10227 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
10231 static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector bool int __b) {
10232 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
10236 #ifdef __POWER8_VECTOR__
10237 static int __ATTRS_o_ai vec_all_eq(vector signed long long __a,
10238 vector signed long long __b) {
10239 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, __b);
10242 static int __ATTRS_o_ai vec_all_eq(vector long long __a,
10243 vector bool long long __b) {
10244 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, (vector long long)__b);
10247 static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a,
10248 vector unsigned long long __b) {
10249 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
10250 (vector long long)__b);
10253 static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a,
10254 vector bool long long __b) {
10255 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
10256 (vector long long)__b);
10259 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
10260 vector long long __b) {
10261 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
10262 (vector long long)__b);
10265 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
10266 vector unsigned long long __b) {
10267 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
10268 (vector long long)__b);
10271 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
10272 vector bool long long __b) {
10273 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
10274 (vector long long)__b);
10278 static int __ATTRS_o_ai vec_all_eq(vector float __a, vector float __b) {
10279 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __b);
10284 static int __ATTRS_o_ai vec_all_ge(vector signed char __a,
10285 vector signed char __b) {
10286 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, __a);
10289 static int __ATTRS_o_ai vec_all_ge(vector signed char __a,
10290 vector bool char __b) {
10291 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__b, __a);
10294 static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a,
10295 vector unsigned char __b) {
10296 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, __a);
10299 static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a,
10300 vector bool char __b) {
10301 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, __a);
10304 static int __ATTRS_o_ai vec_all_ge(vector bool char __a,
10305 vector signed char __b) {
10306 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b,
10307 (vector unsigned char)__a);
10310 static int __ATTRS_o_ai vec_all_ge(vector bool char __a,
10311 vector unsigned char __b) {
10312 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, (vector unsigned char)__a);
10315 static int __ATTRS_o_ai vec_all_ge(vector bool char __a, vector bool char __b) {
10316 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b,
10317 (vector unsigned char)__a);
10320 static int __ATTRS_o_ai vec_all_ge(vector short __a, vector short __b) {
10321 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, __a);
10324 static int __ATTRS_o_ai vec_all_ge(vector short __a, vector bool short __b) {
10325 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)__b, __a);
10328 static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a,
10329 vector unsigned short __b) {
10330 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, __a);
10333 static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a,
10334 vector bool short __b) {
10335 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
10339 static int __ATTRS_o_ai vec_all_ge(vector bool short __a, vector short __b) {
10340 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
10341 (vector unsigned short)__a);
10344 static int __ATTRS_o_ai vec_all_ge(vector bool short __a,
10345 vector unsigned short __b) {
10346 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b,
10347 (vector unsigned short)__a);
10350 static int __ATTRS_o_ai vec_all_ge(vector bool short __a,
10351 vector bool short __b) {
10352 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
10353 (vector unsigned short)__a);
10356 static int __ATTRS_o_ai vec_all_ge(vector int __a, vector int __b) {
10357 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, __a);
10360 static int __ATTRS_o_ai vec_all_ge(vector int __a, vector bool int __b) {
10361 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)__b, __a);
10364 static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a,
10365 vector unsigned int __b) {
10366 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, __a);
10369 static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a,
10370 vector bool int __b) {
10371 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, __a);
10374 static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector int __b) {
10375 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b,
10376 (vector unsigned int)__a);
10379 static int __ATTRS_o_ai vec_all_ge(vector bool int __a,
10380 vector unsigned int __b) {
10381 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, (vector unsigned int)__a);
10384 static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector bool int __b) {
10385 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b,
10386 (vector unsigned int)__a);
10389 #ifdef __POWER8_VECTOR__
10390 static int __ATTRS_o_ai vec_all_ge(vector signed long long __a,
10391 vector signed long long __b) {
10392 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b, __a);
10394 static int __ATTRS_o_ai vec_all_ge(vector signed long long __a,
10395 vector bool long long __b) {
10396 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector signed long long)__b,
10400 static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a,
10401 vector unsigned long long __b) {
10402 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, __a);
10405 static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a,
10406 vector bool long long __b) {
10407 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
10411 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
10412 vector signed long long __b) {
10413 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
10414 (vector unsigned long long)__a);
10417 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
10418 vector unsigned long long __b) {
10419 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b,
10420 (vector unsigned long long)__a);
10423 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
10424 vector bool long long __b) {
10425 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
10426 (vector unsigned long long)__a);
10430 static int __ATTRS_o_ai vec_all_ge(vector float __a, vector float __b) {
10431 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __a, __b);
10436 static int __ATTRS_o_ai vec_all_gt(vector signed char __a,
10437 vector signed char __b) {
10438 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, __b);
10441 static int __ATTRS_o_ai vec_all_gt(vector signed char __a,
10442 vector bool char __b) {
10443 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, (vector signed char)__b);
10446 static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a,
10447 vector unsigned char __b) {
10448 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, __b);
10451 static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a,
10452 vector bool char __b) {
10453 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, (vector unsigned char)__b);
10456 static int __ATTRS_o_ai vec_all_gt(vector bool char __a,
10457 vector signed char __b) {
10458 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a,
10459 (vector unsigned char)__b);
10462 static int __ATTRS_o_ai vec_all_gt(vector bool char __a,
10463 vector unsigned char __b) {
10464 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, __b);
10467 static int __ATTRS_o_ai vec_all_gt(vector bool char __a, vector bool char __b) {
10468 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a,
10469 (vector unsigned char)__b);
10472 static int __ATTRS_o_ai vec_all_gt(vector short __a, vector short __b) {
10473 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, __b);
10476 static int __ATTRS_o_ai vec_all_gt(vector short __a, vector bool short __b) {
10477 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, (vector short)__b);
10480 static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a,
10481 vector unsigned short __b) {
10482 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, __b);
10485 static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a,
10486 vector bool short __b) {
10487 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a,
10488 (vector unsigned short)__b);
10491 static int __ATTRS_o_ai vec_all_gt(vector bool short __a, vector short __b) {
10492 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
10493 (vector unsigned short)__b);
10496 static int __ATTRS_o_ai vec_all_gt(vector bool short __a,
10497 vector unsigned short __b) {
10498 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
10502 static int __ATTRS_o_ai vec_all_gt(vector bool short __a,
10503 vector bool short __b) {
10504 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
10505 (vector unsigned short)__b);
10508 static int __ATTRS_o_ai vec_all_gt(vector int __a, vector int __b) {
10509 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, __b);
10512 static int __ATTRS_o_ai vec_all_gt(vector int __a, vector bool int __b) {
10513 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, (vector int)__b);
10516 static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a,
10517 vector unsigned int __b) {
10518 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, __b);
10521 static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a,
10522 vector bool int __b) {
10523 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, (vector unsigned int)__b);
10526 static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector int __b) {
10527 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a,
10528 (vector unsigned int)__b);
10531 static int __ATTRS_o_ai vec_all_gt(vector bool int __a,
10532 vector unsigned int __b) {
10533 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, __b);
10536 static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector bool int __b) {
10537 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a,
10538 (vector unsigned int)__b);
10541 #ifdef __POWER8_VECTOR__
10542 static int __ATTRS_o_ai vec_all_gt(vector signed long long __a,
10543 vector signed long long __b) {
10544 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, __b);
10546 static int __ATTRS_o_ai vec_all_gt(vector signed long long __a,
10547 vector bool long long __b) {
10548 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a,
10549 (vector signed long long)__b);
10552 static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a,
10553 vector unsigned long long __b) {
10554 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, __b);
10557 static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a,
10558 vector bool long long __b) {
10559 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a,
10560 (vector unsigned long long)__b);
10563 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
10564 vector signed long long __b) {
10565 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
10566 (vector unsigned long long)__b);
10569 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
10570 vector unsigned long long __b) {
10571 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
10575 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
10576 vector bool long long __b) {
10577 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
10578 (vector unsigned long long)__b);
10582 static int __ATTRS_o_ai vec_all_gt(vector float __a, vector float __b) {
10583 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __a, __b);
10588 static int __attribute__((__always_inline__))
10589 vec_all_in(vector float __a, vector float __b) {
10590 return __builtin_altivec_vcmpbfp_p(__CR6_EQ, __a, __b);
10595 static int __ATTRS_o_ai vec_all_le(vector signed char __a,
10596 vector signed char __b) {
10597 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, __b);
10600 static int __ATTRS_o_ai vec_all_le(vector signed char __a,
10601 vector bool char __b) {
10602 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, (vector signed char)__b);
10605 static int __ATTRS_o_ai vec_all_le(vector unsigned char __a,
10606 vector unsigned char __b) {
10607 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, __b);
10610 static int __ATTRS_o_ai vec_all_le(vector unsigned char __a,
10611 vector bool char __b) {
10612 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, (vector unsigned char)__b);
10615 static int __ATTRS_o_ai vec_all_le(vector bool char __a,
10616 vector signed char __b) {
10617 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a,
10618 (vector unsigned char)__b);
10621 static int __ATTRS_o_ai vec_all_le(vector bool char __a,
10622 vector unsigned char __b) {
10623 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, __b);
10626 static int __ATTRS_o_ai vec_all_le(vector bool char __a, vector bool char __b) {
10627 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a,
10628 (vector unsigned char)__b);
10631 static int __ATTRS_o_ai vec_all_le(vector short __a, vector short __b) {
10632 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, __b);
10635 static int __ATTRS_o_ai vec_all_le(vector short __a, vector bool short __b) {
10636 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, (vector short)__b);
10639 static int __ATTRS_o_ai vec_all_le(vector unsigned short __a,
10640 vector unsigned short __b) {
10641 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, __b);
10644 static int __ATTRS_o_ai vec_all_le(vector unsigned short __a,
10645 vector bool short __b) {
10646 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a,
10647 (vector unsigned short)__b);
10650 static int __ATTRS_o_ai vec_all_le(vector bool short __a, vector short __b) {
10651 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
10652 (vector unsigned short)__b);
10655 static int __ATTRS_o_ai vec_all_le(vector bool short __a,
10656 vector unsigned short __b) {
10657 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
10661 static int __ATTRS_o_ai vec_all_le(vector bool short __a,
10662 vector bool short __b) {
10663 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
10664 (vector unsigned short)__b);
10667 static int __ATTRS_o_ai vec_all_le(vector int __a, vector int __b) {
10668 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, __b);
10671 static int __ATTRS_o_ai vec_all_le(vector int __a, vector bool int __b) {
10672 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, (vector int)__b);
10675 static int __ATTRS_o_ai vec_all_le(vector unsigned int __a,
10676 vector unsigned int __b) {
10677 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, __b);
10680 static int __ATTRS_o_ai vec_all_le(vector unsigned int __a,
10681 vector bool int __b) {
10682 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, (vector unsigned int)__b);
10685 static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector int __b) {
10686 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a,
10687 (vector unsigned int)__b);
10690 static int __ATTRS_o_ai vec_all_le(vector bool int __a,
10691 vector unsigned int __b) {
10692 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, __b);
10695 static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector bool int __b) {
10696 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a,
10697 (vector unsigned int)__b);
10700 #ifdef __POWER8_VECTOR__
10701 static int __ATTRS_o_ai vec_all_le(vector signed long long __a,
10702 vector signed long long __b) {
10703 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, __b);
10706 static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a,
10707 vector unsigned long long __b) {
10708 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, __b);
10711 static int __ATTRS_o_ai vec_all_le(vector signed long long __a,
10712 vector bool long long __b) {
10713 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a,
10714 (vector signed long long)__b);
10717 static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a,
10718 vector bool long long __b) {
10719 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a,
10720 (vector unsigned long long)__b);
10723 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
10724 vector signed long long __b) {
10725 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
10726 (vector unsigned long long)__b);
10729 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
10730 vector unsigned long long __b) {
10731 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
10735 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
10736 vector bool long long __b) {
10737 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
10738 (vector unsigned long long)__b);
10742 static int __ATTRS_o_ai vec_all_le(vector float __a, vector float __b) {
10743 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __b, __a);
10748 static int __ATTRS_o_ai vec_all_lt(vector signed char __a,
10749 vector signed char __b) {
10750 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, __a);
10753 static int __ATTRS_o_ai vec_all_lt(vector signed char __a,
10754 vector bool char __b) {
10755 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__b, __a);
10758 static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a,
10759 vector unsigned char __b) {
10760 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, __a);
10763 static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a,
10764 vector bool char __b) {
10765 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, __a);
10768 static int __ATTRS_o_ai vec_all_lt(vector bool char __a,
10769 vector signed char __b) {
10770 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b,
10771 (vector unsigned char)__a);
10774 static int __ATTRS_o_ai vec_all_lt(vector bool char __a,
10775 vector unsigned char __b) {
10776 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, (vector unsigned char)__a);
10779 static int __ATTRS_o_ai vec_all_lt(vector bool char __a, vector bool char __b) {
10780 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b,
10781 (vector unsigned char)__a);
10784 static int __ATTRS_o_ai vec_all_lt(vector short __a, vector short __b) {
10785 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, __a);
10788 static int __ATTRS_o_ai vec_all_lt(vector short __a, vector bool short __b) {
10789 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)__b, __a);
10792 static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a,
10793 vector unsigned short __b) {
10794 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, __a);
10797 static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a,
10798 vector bool short __b) {
10799 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
10803 static int __ATTRS_o_ai vec_all_lt(vector bool short __a, vector short __b) {
10804 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
10805 (vector unsigned short)__a);
10808 static int __ATTRS_o_ai vec_all_lt(vector bool short __a,
10809 vector unsigned short __b) {
10810 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b,
10811 (vector unsigned short)__a);
10814 static int __ATTRS_o_ai vec_all_lt(vector bool short __a,
10815 vector bool short __b) {
10816 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
10817 (vector unsigned short)__a);
10820 static int __ATTRS_o_ai vec_all_lt(vector int __a, vector int __b) {
10821 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, __a);
10824 static int __ATTRS_o_ai vec_all_lt(vector int __a, vector bool int __b) {
10825 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)__b, __a);
10828 static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a,
10829 vector unsigned int __b) {
10830 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, __a);
10833 static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a,
10834 vector bool int __b) {
10835 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, __a);
10838 static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector int __b) {
10839 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b,
10840 (vector unsigned int)__a);
10843 static int __ATTRS_o_ai vec_all_lt(vector bool int __a,
10844 vector unsigned int __b) {
10845 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, (vector unsigned int)__a);
10848 static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector bool int __b) {
10849 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b,
10850 (vector unsigned int)__a);
10853 #ifdef __POWER8_VECTOR__
10854 static int __ATTRS_o_ai vec_all_lt(vector signed long long __a,
10855 vector signed long long __b) {
10856 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, __a);
10859 static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a,
10860 vector unsigned long long __b) {
10861 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, __a);
10864 static int __ATTRS_o_ai vec_all_lt(vector signed long long __a,
10865 vector bool long long __b) {
10866 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector signed long long)__b,
10870 static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a,
10871 vector bool long long __b) {
10872 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
10876 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
10877 vector signed long long __b) {
10878 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
10879 (vector unsigned long long)__a);
10882 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
10883 vector unsigned long long __b) {
10884 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b,
10885 (vector unsigned long long)__a);
10888 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
10889 vector bool long long __b) {
10890 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
10891 (vector unsigned long long)__a);
10895 static int __ATTRS_o_ai vec_all_lt(vector float __a, vector float __b) {
10896 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __b, __a);
10901 static int __attribute__((__always_inline__)) vec_all_nan(vector float __a) {
10902 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __a);
10907 static int __ATTRS_o_ai vec_all_ne(vector signed char __a,
10908 vector signed char __b) {
10909 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10913 static int __ATTRS_o_ai vec_all_ne(vector signed char __a,
10914 vector bool char __b) {
10915 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10919 static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a,
10920 vector unsigned char __b) {
10921 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10925 static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a,
10926 vector bool char __b) {
10927 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10931 static int __ATTRS_o_ai vec_all_ne(vector bool char __a,
10932 vector signed char __b) {
10933 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10937 static int __ATTRS_o_ai vec_all_ne(vector bool char __a,
10938 vector unsigned char __b) {
10939 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10943 static int __ATTRS_o_ai vec_all_ne(vector bool char __a, vector bool char __b) {
10944 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10948 static int __ATTRS_o_ai vec_all_ne(vector short __a, vector short __b) {
10949 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, __b);
10952 static int __ATTRS_o_ai vec_all_ne(vector short __a, vector bool short __b) {
10953 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, (vector short)__b);
10956 static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a,
10957 vector unsigned short __b) {
10958 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10959 (vector short)__b);
10962 static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a,
10963 vector bool short __b) {
10964 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10965 (vector short)__b);
10968 static int __ATTRS_o_ai vec_all_ne(vector bool short __a, vector short __b) {
10969 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10970 (vector short)__b);
10973 static int __ATTRS_o_ai vec_all_ne(vector bool short __a,
10974 vector unsigned short __b) {
10975 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10976 (vector short)__b);
10979 static int __ATTRS_o_ai vec_all_ne(vector bool short __a,
10980 vector bool short __b) {
10981 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10982 (vector short)__b);
10985 static int __ATTRS_o_ai vec_all_ne(vector pixel __a, vector pixel __b) {
10986 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10987 (vector short)__b);
10990 static int __ATTRS_o_ai vec_all_ne(vector int __a, vector int __b) {
10991 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, __b);
10994 static int __ATTRS_o_ai vec_all_ne(vector int __a, vector bool int __b) {
10995 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, (vector int)__b);
10998 static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a,
10999 vector unsigned int __b) {
11000 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
11004 static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a,
11005 vector bool int __b) {
11006 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
11010 static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector int __b) {
11011 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
11015 static int __ATTRS_o_ai vec_all_ne(vector bool int __a,
11016 vector unsigned int __b) {
11017 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
11021 static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector bool int __b) {
11022 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
11026 #ifdef __POWER8_VECTOR__
11027 static int __ATTRS_o_ai vec_all_ne(vector signed long long __a,
11028 vector signed long long __b) {
11029 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, __b);
11032 static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a,
11033 vector unsigned long long __b) {
11034 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a,
11035 (vector long long)__b);
11038 static int __ATTRS_o_ai vec_all_ne(vector signed long long __a,
11039 vector bool long long __b) {
11040 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a,
11041 (vector signed long long)__b);
11044 static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a,
11045 vector bool long long __b) {
11046 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
11047 (vector signed long long)__b);
11050 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
11051 vector signed long long __b) {
11052 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
11053 (vector signed long long)__b);
11056 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
11057 vector unsigned long long __b) {
11058 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
11059 (vector signed long long)__b);
11062 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
11063 vector bool long long __b) {
11064 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
11065 (vector signed long long)__b);
11069 static int __ATTRS_o_ai vec_all_ne(vector float __a, vector float __b) {
11070 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __b);
11075 static int __attribute__((__always_inline__))
11076 vec_all_nge(vector float __a, vector float __b) {
11077 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __a, __b);
11082 static int __attribute__((__always_inline__))
11083 vec_all_ngt(vector float __a, vector float __b) {
11084 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __a, __b);
11089 static int __attribute__((__always_inline__))
11090 vec_all_nle(vector float __a, vector float __b) {
11091 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __b, __a);
11096 static int __attribute__((__always_inline__))
11097 vec_all_nlt(vector float __a, vector float __b) {
11098 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __b, __a);
11101 /* vec_all_numeric */
11103 static int __attribute__((__always_inline__))
11104 vec_all_numeric(vector float __a) {
11105 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __a);
11110 static int __ATTRS_o_ai vec_any_eq(vector signed char __a,
11111 vector signed char __b) {
11112 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
11116 static int __ATTRS_o_ai vec_any_eq(vector signed char __a,
11117 vector bool char __b) {
11118 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
11122 static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a,
11123 vector unsigned char __b) {
11124 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
11128 static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a,
11129 vector bool char __b) {
11130 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
11134 static int __ATTRS_o_ai vec_any_eq(vector bool char __a,
11135 vector signed char __b) {
11136 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
11140 static int __ATTRS_o_ai vec_any_eq(vector bool char __a,
11141 vector unsigned char __b) {
11142 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
11146 static int __ATTRS_o_ai vec_any_eq(vector bool char __a, vector bool char __b) {
11147 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
11151 static int __ATTRS_o_ai vec_any_eq(vector short __a, vector short __b) {
11152 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, __b);
11155 static int __ATTRS_o_ai vec_any_eq(vector short __a, vector bool short __b) {
11156 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, (vector short)__b);
11159 static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a,
11160 vector unsigned short __b) {
11161 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
11162 (vector short)__b);
11165 static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a,
11166 vector bool short __b) {
11167 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
11168 (vector short)__b);
11171 static int __ATTRS_o_ai vec_any_eq(vector bool short __a, vector short __b) {
11172 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
11173 (vector short)__b);
11176 static int __ATTRS_o_ai vec_any_eq(vector bool short __a,
11177 vector unsigned short __b) {
11178 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
11179 (vector short)__b);
11182 static int __ATTRS_o_ai vec_any_eq(vector bool short __a,
11183 vector bool short __b) {
11184 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
11185 (vector short)__b);
11188 static int __ATTRS_o_ai vec_any_eq(vector pixel __a, vector pixel __b) {
11189 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
11190 (vector short)__b);
11193 static int __ATTRS_o_ai vec_any_eq(vector int __a, vector int __b) {
11194 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, __b);
11197 static int __ATTRS_o_ai vec_any_eq(vector int __a, vector bool int __b) {
11198 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, (vector int)__b);
11201 static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a,
11202 vector unsigned int __b) {
11203 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
11207 static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a,
11208 vector bool int __b) {
11209 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
11213 static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector int __b) {
11214 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
11218 static int __ATTRS_o_ai vec_any_eq(vector bool int __a,
11219 vector unsigned int __b) {
11220 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
11224 static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector bool int __b) {
11225 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
11229 #ifdef __POWER8_VECTOR__
11230 static int __ATTRS_o_ai vec_any_eq(vector signed long long __a,
11231 vector signed long long __b) {
11232 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, __b);
11235 static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a,
11236 vector unsigned long long __b) {
11237 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a,
11238 (vector long long)__b);
11241 static int __ATTRS_o_ai vec_any_eq(vector signed long long __a,
11242 vector bool long long __b) {
11243 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a,
11244 (vector signed long long)__b);
11247 static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a,
11248 vector bool long long __b) {
11249 return __builtin_altivec_vcmpequd_p(
11250 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
11253 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
11254 vector signed long long __b) {
11255 return __builtin_altivec_vcmpequd_p(
11256 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
11259 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
11260 vector unsigned long long __b) {
11261 return __builtin_altivec_vcmpequd_p(
11262 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
11265 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
11266 vector bool long long __b) {
11267 return __builtin_altivec_vcmpequd_p(
11268 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
11272 static int __ATTRS_o_ai vec_any_eq(vector float __a, vector float __b) {
11273 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __b);
11278 static int __ATTRS_o_ai vec_any_ge(vector signed char __a,
11279 vector signed char __b) {
11280 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b, __a);
11283 static int __ATTRS_o_ai vec_any_ge(vector signed char __a,
11284 vector bool char __b) {
11285 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b,
11289 static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a,
11290 vector unsigned char __b) {
11291 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, __a);
11294 static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a,
11295 vector bool char __b) {
11296 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
11300 static int __ATTRS_o_ai vec_any_ge(vector bool char __a,
11301 vector signed char __b) {
11302 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
11303 (vector unsigned char)__a);
11306 static int __ATTRS_o_ai vec_any_ge(vector bool char __a,
11307 vector unsigned char __b) {
11308 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b,
11309 (vector unsigned char)__a);
11312 static int __ATTRS_o_ai vec_any_ge(vector bool char __a, vector bool char __b) {
11313 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
11314 (vector unsigned char)__a);
11317 static int __ATTRS_o_ai vec_any_ge(vector short __a, vector short __b) {
11318 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b, __a);
11321 static int __ATTRS_o_ai vec_any_ge(vector short __a, vector bool short __b) {
11322 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)__b, __a);
11325 static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a,
11326 vector unsigned short __b) {
11327 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, __a);
11330 static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a,
11331 vector bool short __b) {
11332 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
11336 static int __ATTRS_o_ai vec_any_ge(vector bool short __a, vector short __b) {
11337 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
11338 (vector unsigned short)__a);
11341 static int __ATTRS_o_ai vec_any_ge(vector bool short __a,
11342 vector unsigned short __b) {
11343 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b,
11344 (vector unsigned short)__a);
11347 static int __ATTRS_o_ai vec_any_ge(vector bool short __a,
11348 vector bool short __b) {
11349 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
11350 (vector unsigned short)__a);
11353 static int __ATTRS_o_ai vec_any_ge(vector int __a, vector int __b) {
11354 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b, __a);
11357 static int __ATTRS_o_ai vec_any_ge(vector int __a, vector bool int __b) {
11358 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)__b, __a);
11361 static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a,
11362 vector unsigned int __b) {
11363 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, __a);
11366 static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a,
11367 vector bool int __b) {
11368 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
11372 static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector int __b) {
11373 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
11374 (vector unsigned int)__a);
11377 static int __ATTRS_o_ai vec_any_ge(vector bool int __a,
11378 vector unsigned int __b) {
11379 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b,
11380 (vector unsigned int)__a);
11383 static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector bool int __b) {
11384 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
11385 (vector unsigned int)__a);
11388 #ifdef __POWER8_VECTOR__
11389 static int __ATTRS_o_ai vec_any_ge(vector signed long long __a,
11390 vector signed long long __b) {
11391 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b, __a);
11394 static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a,
11395 vector unsigned long long __b) {
11396 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, __a);
11399 static int __ATTRS_o_ai vec_any_ge(vector signed long long __a,
11400 vector bool long long __b) {
11401 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV,
11402 (vector signed long long)__b, __a);
11405 static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a,
11406 vector bool long long __b) {
11407 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11408 (vector unsigned long long)__b, __a);
11411 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
11412 vector signed long long __b) {
11413 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11414 (vector unsigned long long)__b,
11415 (vector unsigned long long)__a);
11418 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
11419 vector unsigned long long __b) {
11420 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b,
11421 (vector unsigned long long)__a);
11424 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
11425 vector bool long long __b) {
11426 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11427 (vector unsigned long long)__b,
11428 (vector unsigned long long)__a);
11432 static int __ATTRS_o_ai vec_any_ge(vector float __a, vector float __b) {
11433 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __a, __b);
11438 static int __ATTRS_o_ai vec_any_gt(vector signed char __a,
11439 vector signed char __b) {
11440 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, __b);
11443 static int __ATTRS_o_ai vec_any_gt(vector signed char __a,
11444 vector bool char __b) {
11445 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a,
11446 (vector signed char)__b);
11449 static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a,
11450 vector unsigned char __b) {
11451 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, __b);
11454 static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a,
11455 vector bool char __b) {
11456 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a,
11457 (vector unsigned char)__b);
11460 static int __ATTRS_o_ai vec_any_gt(vector bool char __a,
11461 vector signed char __b) {
11462 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
11463 (vector unsigned char)__b);
11466 static int __ATTRS_o_ai vec_any_gt(vector bool char __a,
11467 vector unsigned char __b) {
11468 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
11472 static int __ATTRS_o_ai vec_any_gt(vector bool char __a, vector bool char __b) {
11473 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
11474 (vector unsigned char)__b);
11477 static int __ATTRS_o_ai vec_any_gt(vector short __a, vector short __b) {
11478 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, __b);
11481 static int __ATTRS_o_ai vec_any_gt(vector short __a, vector bool short __b) {
11482 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, (vector short)__b);
11485 static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a,
11486 vector unsigned short __b) {
11487 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, __b);
11490 static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a,
11491 vector bool short __b) {
11492 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a,
11493 (vector unsigned short)__b);
11496 static int __ATTRS_o_ai vec_any_gt(vector bool short __a, vector short __b) {
11497 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
11498 (vector unsigned short)__b);
11501 static int __ATTRS_o_ai vec_any_gt(vector bool short __a,
11502 vector unsigned short __b) {
11503 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
11507 static int __ATTRS_o_ai vec_any_gt(vector bool short __a,
11508 vector bool short __b) {
11509 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
11510 (vector unsigned short)__b);
11513 static int __ATTRS_o_ai vec_any_gt(vector int __a, vector int __b) {
11514 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, __b);
11517 static int __ATTRS_o_ai vec_any_gt(vector int __a, vector bool int __b) {
11518 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, (vector int)__b);
11521 static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a,
11522 vector unsigned int __b) {
11523 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, __b);
11526 static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a,
11527 vector bool int __b) {
11528 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a,
11529 (vector unsigned int)__b);
11532 static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector int __b) {
11533 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
11534 (vector unsigned int)__b);
11537 static int __ATTRS_o_ai vec_any_gt(vector bool int __a,
11538 vector unsigned int __b) {
11539 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
11543 static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector bool int __b) {
11544 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
11545 (vector unsigned int)__b);
11548 #ifdef __POWER8_VECTOR__
11549 static int __ATTRS_o_ai vec_any_gt(vector signed long long __a,
11550 vector signed long long __b) {
11551 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, __b);
11554 static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a,
11555 vector unsigned long long __b) {
11556 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, __b);
11559 static int __ATTRS_o_ai vec_any_gt(vector signed long long __a,
11560 vector bool long long __b) {
11561 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a,
11562 (vector signed long long)__b);
11565 static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a,
11566 vector bool long long __b) {
11567 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a,
11568 (vector unsigned long long)__b);
11571 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
11572 vector signed long long __b) {
11573 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11574 (vector unsigned long long)__a,
11575 (vector unsigned long long)__b);
11578 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
11579 vector unsigned long long __b) {
11580 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11581 (vector unsigned long long)__a, __b);
11584 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
11585 vector bool long long __b) {
11586 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11587 (vector unsigned long long)__a,
11588 (vector unsigned long long)__b);
11592 static int __ATTRS_o_ai vec_any_gt(vector float __a, vector float __b) {
11593 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __a, __b);
11598 static int __ATTRS_o_ai vec_any_le(vector signed char __a,
11599 vector signed char __b) {
11600 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, __b);
11603 static int __ATTRS_o_ai vec_any_le(vector signed char __a,
11604 vector bool char __b) {
11605 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a,
11606 (vector signed char)__b);
11609 static int __ATTRS_o_ai vec_any_le(vector unsigned char __a,
11610 vector unsigned char __b) {
11611 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, __b);
11614 static int __ATTRS_o_ai vec_any_le(vector unsigned char __a,
11615 vector bool char __b) {
11616 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a,
11617 (vector unsigned char)__b);
11620 static int __ATTRS_o_ai vec_any_le(vector bool char __a,
11621 vector signed char __b) {
11622 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
11623 (vector unsigned char)__b);
11626 static int __ATTRS_o_ai vec_any_le(vector bool char __a,
11627 vector unsigned char __b) {
11628 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
11632 static int __ATTRS_o_ai vec_any_le(vector bool char __a, vector bool char __b) {
11633 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
11634 (vector unsigned char)__b);
11637 static int __ATTRS_o_ai vec_any_le(vector short __a, vector short __b) {
11638 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, __b);
11641 static int __ATTRS_o_ai vec_any_le(vector short __a, vector bool short __b) {
11642 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, (vector short)__b);
11645 static int __ATTRS_o_ai vec_any_le(vector unsigned short __a,
11646 vector unsigned short __b) {
11647 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, __b);
11650 static int __ATTRS_o_ai vec_any_le(vector unsigned short __a,
11651 vector bool short __b) {
11652 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a,
11653 (vector unsigned short)__b);
11656 static int __ATTRS_o_ai vec_any_le(vector bool short __a, vector short __b) {
11657 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
11658 (vector unsigned short)__b);
11661 static int __ATTRS_o_ai vec_any_le(vector bool short __a,
11662 vector unsigned short __b) {
11663 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
11667 static int __ATTRS_o_ai vec_any_le(vector bool short __a,
11668 vector bool short __b) {
11669 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
11670 (vector unsigned short)__b);
11673 static int __ATTRS_o_ai vec_any_le(vector int __a, vector int __b) {
11674 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, __b);
11677 static int __ATTRS_o_ai vec_any_le(vector int __a, vector bool int __b) {
11678 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, (vector int)__b);
11681 static int __ATTRS_o_ai vec_any_le(vector unsigned int __a,
11682 vector unsigned int __b) {
11683 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, __b);
11686 static int __ATTRS_o_ai vec_any_le(vector unsigned int __a,
11687 vector bool int __b) {
11688 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a,
11689 (vector unsigned int)__b);
11692 static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector int __b) {
11693 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
11694 (vector unsigned int)__b);
11697 static int __ATTRS_o_ai vec_any_le(vector bool int __a,
11698 vector unsigned int __b) {
11699 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
11703 static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector bool int __b) {
11704 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
11705 (vector unsigned int)__b);
11708 #ifdef __POWER8_VECTOR__
11709 static int __ATTRS_o_ai vec_any_le(vector signed long long __a,
11710 vector signed long long __b) {
11711 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, __b);
11714 static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a,
11715 vector unsigned long long __b) {
11716 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, __b);
11719 static int __ATTRS_o_ai vec_any_le(vector signed long long __a,
11720 vector bool long long __b) {
11721 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a,
11722 (vector signed long long)__b);
11725 static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a,
11726 vector bool long long __b) {
11727 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a,
11728 (vector unsigned long long)__b);
11731 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
11732 vector signed long long __b) {
11733 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11734 (vector unsigned long long)__a,
11735 (vector unsigned long long)__b);
11738 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
11739 vector unsigned long long __b) {
11740 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11741 (vector unsigned long long)__a, __b);
11744 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
11745 vector bool long long __b) {
11746 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11747 (vector unsigned long long)__a,
11748 (vector unsigned long long)__b);
11752 static int __ATTRS_o_ai vec_any_le(vector float __a, vector float __b) {
11753 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __b, __a);
11758 static int __ATTRS_o_ai vec_any_lt(vector signed char __a,
11759 vector signed char __b) {
11760 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b, __a);
11763 static int __ATTRS_o_ai vec_any_lt(vector signed char __a,
11764 vector bool char __b) {
11765 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b,
11769 static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a,
11770 vector unsigned char __b) {
11771 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, __a);
11774 static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a,
11775 vector bool char __b) {
11776 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
11780 static int __ATTRS_o_ai vec_any_lt(vector bool char __a,
11781 vector signed char __b) {
11782 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
11783 (vector unsigned char)__a);
11786 static int __ATTRS_o_ai vec_any_lt(vector bool char __a,
11787 vector unsigned char __b) {
11788 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b,
11789 (vector unsigned char)__a);
11792 static int __ATTRS_o_ai vec_any_lt(vector bool char __a, vector bool char __b) {
11793 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
11794 (vector unsigned char)__a);
11797 static int __ATTRS_o_ai vec_any_lt(vector short __a, vector short __b) {
11798 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b, __a);
11801 static int __ATTRS_o_ai vec_any_lt(vector short __a, vector bool short __b) {
11802 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)__b, __a);
11805 static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a,
11806 vector unsigned short __b) {
11807 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, __a);
11810 static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a,
11811 vector bool short __b) {
11812 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
11816 static int __ATTRS_o_ai vec_any_lt(vector bool short __a, vector short __b) {
11817 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
11818 (vector unsigned short)__a);
11821 static int __ATTRS_o_ai vec_any_lt(vector bool short __a,
11822 vector unsigned short __b) {
11823 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b,
11824 (vector unsigned short)__a);
11827 static int __ATTRS_o_ai vec_any_lt(vector bool short __a,
11828 vector bool short __b) {
11829 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
11830 (vector unsigned short)__a);
11833 static int __ATTRS_o_ai vec_any_lt(vector int __a, vector int __b) {
11834 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b, __a);
11837 static int __ATTRS_o_ai vec_any_lt(vector int __a, vector bool int __b) {
11838 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)__b, __a);
11841 static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a,
11842 vector unsigned int __b) {
11843 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, __a);
11846 static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a,
11847 vector bool int __b) {
11848 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
11852 static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector int __b) {
11853 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
11854 (vector unsigned int)__a);
11857 static int __ATTRS_o_ai vec_any_lt(vector bool int __a,
11858 vector unsigned int __b) {
11859 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b,
11860 (vector unsigned int)__a);
11863 static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector bool int __b) {
11864 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
11865 (vector unsigned int)__a);
11868 #ifdef __POWER8_VECTOR__
11869 static int __ATTRS_o_ai vec_any_lt(vector signed long long __a,
11870 vector signed long long __b) {
11871 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b, __a);
11874 static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a,
11875 vector unsigned long long __b) {
11876 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, __a);
11879 static int __ATTRS_o_ai vec_any_lt(vector signed long long __a,
11880 vector bool long long __b) {
11881 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV,
11882 (vector signed long long)__b, __a);
11885 static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a,
11886 vector bool long long __b) {
11887 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11888 (vector unsigned long long)__b, __a);
11891 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
11892 vector signed long long __b) {
11893 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11894 (vector unsigned long long)__b,
11895 (vector unsigned long long)__a);
11898 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
11899 vector unsigned long long __b) {
11900 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b,
11901 (vector unsigned long long)__a);
11904 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
11905 vector bool long long __b) {
11906 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11907 (vector unsigned long long)__b,
11908 (vector unsigned long long)__a);
11912 static int __ATTRS_o_ai vec_any_lt(vector float __a, vector float __b) {
11913 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __b, __a);
11918 static int __attribute__((__always_inline__)) vec_any_nan(vector float __a) {
11919 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __a);
11924 static int __ATTRS_o_ai vec_any_ne(vector signed char __a,
11925 vector signed char __b) {
11926 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11930 static int __ATTRS_o_ai vec_any_ne(vector signed char __a,
11931 vector bool char __b) {
11932 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11936 static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a,
11937 vector unsigned char __b) {
11938 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11942 static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a,
11943 vector bool char __b) {
11944 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11948 static int __ATTRS_o_ai vec_any_ne(vector bool char __a,
11949 vector signed char __b) {
11950 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11954 static int __ATTRS_o_ai vec_any_ne(vector bool char __a,
11955 vector unsigned char __b) {
11956 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11960 static int __ATTRS_o_ai vec_any_ne(vector bool char __a, vector bool char __b) {
11961 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11965 static int __ATTRS_o_ai vec_any_ne(vector short __a, vector short __b) {
11966 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, __b);
11969 static int __ATTRS_o_ai vec_any_ne(vector short __a, vector bool short __b) {
11970 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, (vector short)__b);
11973 static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a,
11974 vector unsigned short __b) {
11975 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
11976 (vector short)__b);
11979 static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a,
11980 vector bool short __b) {
11981 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
11982 (vector short)__b);
11985 static int __ATTRS_o_ai vec_any_ne(vector bool short __a, vector short __b) {
11986 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
11987 (vector short)__b);
11990 static int __ATTRS_o_ai vec_any_ne(vector bool short __a,
11991 vector unsigned short __b) {
11992 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
11993 (vector short)__b);
11996 static int __ATTRS_o_ai vec_any_ne(vector bool short __a,
11997 vector bool short __b) {
11998 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
11999 (vector short)__b);
12002 static int __ATTRS_o_ai vec_any_ne(vector pixel __a, vector pixel __b) {
12003 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
12004 (vector short)__b);
12007 static int __ATTRS_o_ai vec_any_ne(vector int __a, vector int __b) {
12008 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, __b);
12011 static int __ATTRS_o_ai vec_any_ne(vector int __a, vector bool int __b) {
12012 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, (vector int)__b);
12015 static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a,
12016 vector unsigned int __b) {
12017 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
12021 static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a,
12022 vector bool int __b) {
12023 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
12027 static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector int __b) {
12028 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
12032 static int __ATTRS_o_ai vec_any_ne(vector bool int __a,
12033 vector unsigned int __b) {
12034 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
12038 static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector bool int __b) {
12039 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
12043 #ifdef __POWER8_VECTOR__
12044 static int __ATTRS_o_ai vec_any_ne(vector signed long long __a,
12045 vector signed long long __b) {
12046 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, __b);
12049 static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a,
12050 vector unsigned long long __b) {
12051 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a,
12052 (vector long long)__b);
12055 static int __ATTRS_o_ai vec_any_ne(vector signed long long __a,
12056 vector bool long long __b) {
12057 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a,
12058 (vector signed long long)__b);
12061 static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a,
12062 vector bool long long __b) {
12063 return __builtin_altivec_vcmpequd_p(
12064 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
12067 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
12068 vector signed long long __b) {
12069 return __builtin_altivec_vcmpequd_p(
12070 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
12073 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
12074 vector unsigned long long __b) {
12075 return __builtin_altivec_vcmpequd_p(
12076 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
12079 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
12080 vector bool long long __b) {
12081 return __builtin_altivec_vcmpequd_p(
12082 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
12086 static int __ATTRS_o_ai vec_any_ne(vector float __a, vector float __b) {
12087 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __b);
12092 static int __attribute__((__always_inline__))
12093 vec_any_nge(vector float __a, vector float __b) {
12094 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __a, __b);
12099 static int __attribute__((__always_inline__))
12100 vec_any_ngt(vector float __a, vector float __b) {
12101 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __a, __b);
12106 static int __attribute__((__always_inline__))
12107 vec_any_nle(vector float __a, vector float __b) {
12108 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __b, __a);
12113 static int __attribute__((__always_inline__))
12114 vec_any_nlt(vector float __a, vector float __b) {
12115 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __b, __a);
12118 /* vec_any_numeric */
12120 static int __attribute__((__always_inline__))
12121 vec_any_numeric(vector float __a) {
12122 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __a);
12127 static int __attribute__((__always_inline__))
12128 vec_any_out(vector float __a, vector float __b) {
12129 return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, __a, __b);
12132 /* Power 8 Crypto functions
12133 Note: We diverge from the current GCC implementation with regard
12134 to cryptography and related functions as follows:
12135 - Only the SHA and AES instructions and builtins are disabled by -mno-crypto
12136 - The remaining ones are only available on Power8 and up so
12137 require -mpower8-vector
12138 The justification for this is that export requirements require that
12139 Category:Vector.Crypto is optional (i.e. compliant hardware may not provide
12140 support). As a result, we need to be able to turn off support for those.
12141 The remaining ones (currently controlled by -mcrypto for GCC) still
12142 need to be provided on compliant hardware even if Vector.Crypto is not
12144 FIXME: the naming convention for the builtins will be adjusted due
12145 to the inconsistency (__builtin_crypto_ prefix on builtins that cannot be
12146 removed with -mno-crypto). This is under development.
12149 static vector unsigned long long __attribute__((__always_inline__))
12150 __builtin_crypto_vsbox(vector unsigned long long __a) {
12151 return __builtin_altivec_crypto_vsbox(__a);
12154 static vector unsigned long long __attribute__((__always_inline__))
12155 __builtin_crypto_vcipher(vector unsigned long long __a,
12156 vector unsigned long long __b) {
12157 return __builtin_altivec_crypto_vcipher(__a, __b);
12160 static vector unsigned long long __attribute__((__always_inline__))
12161 __builtin_crypto_vcipherlast(vector unsigned long long __a,
12162 vector unsigned long long __b) {
12163 return __builtin_altivec_crypto_vcipherlast(__a, __b);
12166 static vector unsigned long long __attribute__((__always_inline__))
12167 __builtin_crypto_vncipher(vector unsigned long long __a,
12168 vector unsigned long long __b) {
12169 return __builtin_altivec_crypto_vncipher(__a, __b);
12172 static vector unsigned long long __attribute__((__always_inline__))
12173 __builtin_crypto_vncipherlast(vector unsigned long long __a,
12174 vector unsigned long long __b) {
12175 return __builtin_altivec_crypto_vncipherlast(__a, __b);
12178 #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad
12179 #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw
12182 #ifdef __POWER8_VECTOR__
12183 static vector unsigned char __ATTRS_o_ai
12184 __builtin_crypto_vpermxor(vector unsigned char __a, vector unsigned char __b,
12185 vector unsigned char __c) {
12186 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
12189 static vector unsigned short __ATTRS_o_ai
12190 __builtin_crypto_vpermxor(vector unsigned short __a, vector unsigned short __b,
12191 vector unsigned short __c) {
12192 return (vector unsigned short)__builtin_altivec_crypto_vpermxor(
12193 (vector unsigned char)__a, (vector unsigned char)__b,
12194 (vector unsigned char)__c);
12197 static vector unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
12198 vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) {
12199 return (vector unsigned int)__builtin_altivec_crypto_vpermxor(
12200 (vector unsigned char)__a, (vector unsigned char)__b,
12201 (vector unsigned char)__c);
12204 static vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpermxor(
12205 vector unsigned long long __a, vector unsigned long long __b,
12206 vector unsigned long long __c) {
12207 return (vector unsigned long long)__builtin_altivec_crypto_vpermxor(
12208 (vector unsigned char)__a, (vector unsigned char)__b,
12209 (vector unsigned char)__c);
12212 static vector unsigned char __ATTRS_o_ai
12213 __builtin_crypto_vpmsumb(vector unsigned char __a, vector unsigned char __b) {
12214 return __builtin_altivec_crypto_vpmsumb(__a, __b);
12217 static vector unsigned short __ATTRS_o_ai
12218 __builtin_crypto_vpmsumb(vector unsigned short __a, vector unsigned short __b) {
12219 return __builtin_altivec_crypto_vpmsumh(__a, __b);
12222 static vector unsigned int __ATTRS_o_ai
12223 __builtin_crypto_vpmsumb(vector unsigned int __a, vector unsigned int __b) {
12224 return __builtin_altivec_crypto_vpmsumw(__a, __b);
12227 static vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpmsumb(
12228 vector unsigned long long __a, vector unsigned long long __b) {
12229 return __builtin_altivec_crypto_vpmsumd(__a, __b);
12232 static vector signed char __ATTRS_o_ai vec_vgbbd (vector signed char __a)
12234 return __builtin_altivec_vgbbd((vector unsigned char) __a);
12237 static vector unsigned char __ATTRS_o_ai vec_vgbbd (vector unsigned char __a)
12239 return __builtin_altivec_vgbbd(__a);
12242 static vector long long __ATTRS_o_ai
12243 vec_vbpermq (vector signed char __a, vector signed char __b)
12245 return __builtin_altivec_vbpermq((vector unsigned char) __a,
12246 (vector unsigned char) __b);
12249 static vector long long __ATTRS_o_ai
12250 vec_vbpermq (vector unsigned char __a, vector unsigned char __b)
12252 return __builtin_altivec_vbpermq(__a, __b);
12256 #undef __ATTRS_o_ai
12258 #endif /* __ALTIVEC_H */