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 signed short __a,
52 vector signed short __b,
53 vector unsigned char __c);
55 static vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a,
56 vector unsigned short __b,
57 vector unsigned char __c);
59 static vector bool short __ATTRS_o_ai vec_perm(vector bool short __a,
60 vector bool short __b,
61 vector unsigned char __c);
63 static vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b,
64 vector unsigned char __c);
66 static vector int __ATTRS_o_ai vec_perm(vector signed int __a,
67 vector signed int __b,
68 vector unsigned char __c);
70 static vector unsigned int __ATTRS_o_ai vec_perm(vector unsigned int __a,
71 vector unsigned int __b,
72 vector unsigned char __c);
74 static vector bool int __ATTRS_o_ai vec_perm(vector bool int __a,
76 vector unsigned char __c);
78 static vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b,
79 vector unsigned char __c);
82 static vector long long __ATTRS_o_ai vec_perm(vector signed long long __a,
83 vector signed long long __b,
84 vector unsigned char __c);
86 static vector unsigned long long __ATTRS_o_ai
87 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
88 vector unsigned char __c);
90 static vector bool long long __ATTRS_o_ai
91 vec_perm(vector bool long long __a, vector bool long long __b,
92 vector unsigned char __c);
94 static vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b,
95 vector unsigned char __c);
98 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
99 vector unsigned char __b);
103 #define __builtin_altivec_abs_v16qi vec_abs
104 #define __builtin_altivec_abs_v8hi vec_abs
105 #define __builtin_altivec_abs_v4si vec_abs
107 static vector signed char __ATTRS_o_ai vec_abs(vector signed char __a) {
108 return __builtin_altivec_vmaxsb(__a, -__a);
111 static vector signed short __ATTRS_o_ai vec_abs(vector signed short __a) {
112 return __builtin_altivec_vmaxsh(__a, -__a);
115 static vector signed int __ATTRS_o_ai vec_abs(vector signed int __a) {
116 return __builtin_altivec_vmaxsw(__a, -__a);
119 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
120 static vector signed long long __ATTRS_o_ai
121 vec_abs(vector signed long long __a) {
122 return __builtin_altivec_vmaxsd(__a, -__a);
126 static vector float __ATTRS_o_ai vec_abs(vector float __a) {
127 vector unsigned int __res =
128 (vector unsigned int)__a & (vector unsigned int)(0x7FFFFFFF);
129 return (vector float)__res;
132 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
133 static vector double __ATTRS_o_ai vec_abs(vector double __a) {
134 vector unsigned long long __res = { 0x7FFFFFFFFFFFFFFF, 0x7FFFFFFFFFFFFFFF };
135 __res &= (vector unsigned int)__a;
136 return (vector double)__res;
141 #define __builtin_altivec_abss_v16qi vec_abss
142 #define __builtin_altivec_abss_v8hi vec_abss
143 #define __builtin_altivec_abss_v4si vec_abss
145 static vector signed char __ATTRS_o_ai vec_abss(vector signed char __a) {
146 return __builtin_altivec_vmaxsb(
147 __a, __builtin_altivec_vsubsbs((vector signed char)(0), __a));
150 static vector signed short __ATTRS_o_ai vec_abss(vector signed short __a) {
151 return __builtin_altivec_vmaxsh(
152 __a, __builtin_altivec_vsubshs((vector signed short)(0), __a));
155 static vector signed int __ATTRS_o_ai vec_abss(vector signed int __a) {
156 return __builtin_altivec_vmaxsw(
157 __a, __builtin_altivec_vsubsws((vector signed int)(0), __a));
162 static vector signed char __ATTRS_o_ai vec_add(vector signed char __a,
163 vector signed char __b) {
167 static vector signed char __ATTRS_o_ai vec_add(vector bool char __a,
168 vector signed char __b) {
169 return (vector signed char)__a + __b;
172 static vector signed char __ATTRS_o_ai vec_add(vector signed char __a,
173 vector bool char __b) {
174 return __a + (vector signed char)__b;
177 static vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a,
178 vector unsigned char __b) {
182 static vector unsigned char __ATTRS_o_ai vec_add(vector bool char __a,
183 vector unsigned char __b) {
184 return (vector unsigned char)__a + __b;
187 static vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a,
188 vector bool char __b) {
189 return __a + (vector unsigned char)__b;
192 static vector short __ATTRS_o_ai vec_add(vector short __a, vector short __b) {
196 static vector short __ATTRS_o_ai vec_add(vector bool short __a,
198 return (vector short)__a + __b;
201 static vector short __ATTRS_o_ai vec_add(vector short __a,
202 vector bool short __b) {
203 return __a + (vector short)__b;
206 static vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a,
207 vector unsigned short __b) {
211 static vector unsigned short __ATTRS_o_ai vec_add(vector bool short __a,
212 vector unsigned short __b) {
213 return (vector unsigned short)__a + __b;
216 static vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a,
217 vector bool short __b) {
218 return __a + (vector unsigned short)__b;
221 static vector int __ATTRS_o_ai vec_add(vector int __a, vector int __b) {
225 static vector int __ATTRS_o_ai vec_add(vector bool int __a, vector int __b) {
226 return (vector int)__a + __b;
229 static vector int __ATTRS_o_ai vec_add(vector int __a, vector bool int __b) {
230 return __a + (vector int)__b;
233 static vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a,
234 vector unsigned int __b) {
238 static vector unsigned int __ATTRS_o_ai vec_add(vector bool int __a,
239 vector unsigned int __b) {
240 return (vector unsigned int)__a + __b;
243 static vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a,
244 vector bool int __b) {
245 return __a + (vector unsigned int)__b;
248 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
249 static vector signed long long __ATTRS_o_ai
250 vec_add(vector signed long long __a, vector signed long long __b) {
254 static vector unsigned long long __ATTRS_o_ai
255 vec_add(vector unsigned long long __a, vector unsigned long long __b) {
259 static vector signed __int128 __ATTRS_o_ai vec_add(vector signed __int128 __a,
260 vector signed __int128 __b) {
264 static vector unsigned __int128 __ATTRS_o_ai
265 vec_add(vector unsigned __int128 __a, vector unsigned __int128 __b) {
268 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
270 static vector float __ATTRS_o_ai vec_add(vector float __a, vector float __b) {
275 static vector double __ATTRS_o_ai
276 vec_add(vector double __a, vector double __b) {
283 #define __builtin_altivec_vaddubm vec_vaddubm
285 static vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a,
286 vector signed char __b) {
290 static vector signed char __ATTRS_o_ai vec_vaddubm(vector bool char __a,
291 vector signed char __b) {
292 return (vector signed char)__a + __b;
295 static vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a,
296 vector bool char __b) {
297 return __a + (vector signed char)__b;
300 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a,
301 vector unsigned char __b) {
305 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector bool char __a,
306 vector unsigned char __b) {
307 return (vector unsigned char)__a + __b;
310 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a,
311 vector bool char __b) {
312 return __a + (vector unsigned char)__b;
317 #define __builtin_altivec_vadduhm vec_vadduhm
319 static vector short __ATTRS_o_ai vec_vadduhm(vector short __a,
324 static vector short __ATTRS_o_ai vec_vadduhm(vector bool short __a,
326 return (vector short)__a + __b;
329 static vector short __ATTRS_o_ai vec_vadduhm(vector short __a,
330 vector bool short __b) {
331 return __a + (vector short)__b;
334 static vector unsigned short __ATTRS_o_ai
335 vec_vadduhm(vector unsigned short __a, vector unsigned short __b) {
339 static vector unsigned short __ATTRS_o_ai
340 vec_vadduhm(vector bool short __a, vector unsigned short __b) {
341 return (vector unsigned short)__a + __b;
344 static vector unsigned short __ATTRS_o_ai vec_vadduhm(vector unsigned short __a,
345 vector bool short __b) {
346 return __a + (vector unsigned short)__b;
351 #define __builtin_altivec_vadduwm vec_vadduwm
353 static vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector int __b) {
357 static vector int __ATTRS_o_ai vec_vadduwm(vector bool int __a,
359 return (vector int)__a + __b;
362 static vector int __ATTRS_o_ai vec_vadduwm(vector int __a,
363 vector bool int __b) {
364 return __a + (vector int)__b;
367 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a,
368 vector unsigned int __b) {
372 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector bool int __a,
373 vector unsigned int __b) {
374 return (vector unsigned int)__a + __b;
377 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a,
378 vector bool int __b) {
379 return __a + (vector unsigned int)__b;
384 #define __builtin_altivec_vaddfp vec_vaddfp
386 static vector float __attribute__((__always_inline__))
387 vec_vaddfp(vector float __a, vector float __b) {
393 static vector unsigned int __ATTRS_o_ai vec_addc(vector unsigned int __a,
394 vector unsigned int __b) {
395 return __builtin_altivec_vaddcuw(__a, __b);
398 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
399 static vector signed __int128 __ATTRS_o_ai
400 vec_addc(vector signed __int128 __a, vector signed __int128 __b) {
401 return __builtin_altivec_vaddcuq(__a, __b);
404 static vector unsigned __int128 __ATTRS_o_ai
405 vec_addc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
406 return __builtin_altivec_vaddcuq(__a, __b);
408 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
412 static vector unsigned int __attribute__((__always_inline__))
413 vec_vaddcuw(vector unsigned int __a, vector unsigned int __b) {
414 return __builtin_altivec_vaddcuw(__a, __b);
419 static vector signed char __ATTRS_o_ai vec_adds(vector signed char __a,
420 vector signed char __b) {
421 return __builtin_altivec_vaddsbs(__a, __b);
424 static vector signed char __ATTRS_o_ai vec_adds(vector bool char __a,
425 vector signed char __b) {
426 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
429 static vector signed char __ATTRS_o_ai vec_adds(vector signed char __a,
430 vector bool char __b) {
431 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
434 static vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a,
435 vector unsigned char __b) {
436 return __builtin_altivec_vaddubs(__a, __b);
439 static vector unsigned char __ATTRS_o_ai vec_adds(vector bool char __a,
440 vector unsigned char __b) {
441 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
444 static vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a,
445 vector bool char __b) {
446 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
449 static vector short __ATTRS_o_ai vec_adds(vector short __a, vector short __b) {
450 return __builtin_altivec_vaddshs(__a, __b);
453 static vector short __ATTRS_o_ai vec_adds(vector bool short __a,
455 return __builtin_altivec_vaddshs((vector short)__a, __b);
458 static vector short __ATTRS_o_ai vec_adds(vector short __a,
459 vector bool short __b) {
460 return __builtin_altivec_vaddshs(__a, (vector short)__b);
463 static vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a,
464 vector unsigned short __b) {
465 return __builtin_altivec_vadduhs(__a, __b);
468 static vector unsigned short __ATTRS_o_ai vec_adds(vector bool short __a,
469 vector unsigned short __b) {
470 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
473 static vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a,
474 vector bool short __b) {
475 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
478 static vector int __ATTRS_o_ai vec_adds(vector int __a, vector int __b) {
479 return __builtin_altivec_vaddsws(__a, __b);
482 static vector int __ATTRS_o_ai vec_adds(vector bool int __a, vector int __b) {
483 return __builtin_altivec_vaddsws((vector int)__a, __b);
486 static vector int __ATTRS_o_ai vec_adds(vector int __a, vector bool int __b) {
487 return __builtin_altivec_vaddsws(__a, (vector int)__b);
490 static vector unsigned int __ATTRS_o_ai vec_adds(vector unsigned int __a,
491 vector unsigned int __b) {
492 return __builtin_altivec_vadduws(__a, __b);
495 static vector unsigned int __ATTRS_o_ai vec_adds(vector bool int __a,
496 vector unsigned int __b) {
497 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
500 static vector unsigned int __ATTRS_o_ai vec_adds(vector unsigned int __a,
501 vector bool int __b) {
502 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
507 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a,
508 vector signed char __b) {
509 return __builtin_altivec_vaddsbs(__a, __b);
512 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector bool char __a,
513 vector signed char __b) {
514 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
517 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a,
518 vector bool char __b) {
519 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
524 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a,
525 vector unsigned char __b) {
526 return __builtin_altivec_vaddubs(__a, __b);
529 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector bool char __a,
530 vector unsigned char __b) {
531 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
534 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a,
535 vector bool char __b) {
536 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
541 static vector short __ATTRS_o_ai vec_vaddshs(vector short __a,
543 return __builtin_altivec_vaddshs(__a, __b);
546 static vector short __ATTRS_o_ai vec_vaddshs(vector bool short __a,
548 return __builtin_altivec_vaddshs((vector short)__a, __b);
551 static vector short __ATTRS_o_ai vec_vaddshs(vector short __a,
552 vector bool short __b) {
553 return __builtin_altivec_vaddshs(__a, (vector short)__b);
558 static vector unsigned short __ATTRS_o_ai
559 vec_vadduhs(vector unsigned short __a, vector unsigned short __b) {
560 return __builtin_altivec_vadduhs(__a, __b);
563 static vector unsigned short __ATTRS_o_ai
564 vec_vadduhs(vector bool short __a, vector unsigned short __b) {
565 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
568 static vector unsigned short __ATTRS_o_ai vec_vadduhs(vector unsigned short __a,
569 vector bool short __b) {
570 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
575 static vector int __ATTRS_o_ai vec_vaddsws(vector int __a, vector int __b) {
576 return __builtin_altivec_vaddsws(__a, __b);
579 static vector int __ATTRS_o_ai vec_vaddsws(vector bool int __a,
581 return __builtin_altivec_vaddsws((vector int)__a, __b);
584 static vector int __ATTRS_o_ai vec_vaddsws(vector int __a,
585 vector bool int __b) {
586 return __builtin_altivec_vaddsws(__a, (vector int)__b);
591 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a,
592 vector unsigned int __b) {
593 return __builtin_altivec_vadduws(__a, __b);
596 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector bool int __a,
597 vector unsigned int __b) {
598 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
601 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a,
602 vector bool int __b) {
603 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
606 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
609 static vector signed __int128 __ATTRS_o_ai
610 vec_vadduqm(vector signed __int128 __a, vector signed __int128 __b) {
614 static vector unsigned __int128 __ATTRS_o_ai
615 vec_vadduqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
621 static vector signed __int128 __ATTRS_o_ai
622 vec_vaddeuqm(vector signed __int128 __a, vector signed __int128 __b,
623 vector signed __int128 __c) {
624 return __builtin_altivec_vaddeuqm(__a, __b, __c);
627 static vector unsigned __int128 __ATTRS_o_ai
628 vec_vaddeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
629 vector unsigned __int128 __c) {
630 return __builtin_altivec_vaddeuqm(__a, __b, __c);
635 static vector signed __int128 __ATTRS_o_ai
636 vec_vaddcuq(vector signed __int128 __a, vector signed __int128 __b) {
637 return __builtin_altivec_vaddcuq(__a, __b);
640 static vector unsigned __int128 __ATTRS_o_ai
641 vec_vaddcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
642 return __builtin_altivec_vaddcuq(__a, __b);
647 static vector signed __int128 __ATTRS_o_ai
648 vec_vaddecuq(vector signed __int128 __a, vector signed __int128 __b,
649 vector signed __int128 __c) {
650 return __builtin_altivec_vaddecuq(__a, __b, __c);
653 static vector unsigned __int128 __ATTRS_o_ai
654 vec_vaddecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
655 vector unsigned __int128 __c) {
656 return __builtin_altivec_vaddecuq(__a, __b, __c);
658 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
662 #define __builtin_altivec_vand vec_and
664 static vector signed char __ATTRS_o_ai vec_and(vector signed char __a,
665 vector signed char __b) {
669 static vector signed char __ATTRS_o_ai vec_and(vector bool char __a,
670 vector signed char __b) {
671 return (vector signed char)__a & __b;
674 static vector signed char __ATTRS_o_ai vec_and(vector signed char __a,
675 vector bool char __b) {
676 return __a & (vector signed char)__b;
679 static vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a,
680 vector unsigned char __b) {
684 static vector unsigned char __ATTRS_o_ai vec_and(vector bool char __a,
685 vector unsigned char __b) {
686 return (vector unsigned char)__a & __b;
689 static vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a,
690 vector bool char __b) {
691 return __a & (vector unsigned char)__b;
694 static vector bool char __ATTRS_o_ai vec_and(vector bool char __a,
695 vector bool char __b) {
699 static vector short __ATTRS_o_ai vec_and(vector short __a, vector short __b) {
703 static vector short __ATTRS_o_ai vec_and(vector bool short __a,
705 return (vector short)__a & __b;
708 static vector short __ATTRS_o_ai vec_and(vector short __a,
709 vector bool short __b) {
710 return __a & (vector short)__b;
713 static vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a,
714 vector unsigned short __b) {
718 static vector unsigned short __ATTRS_o_ai vec_and(vector bool short __a,
719 vector unsigned short __b) {
720 return (vector unsigned short)__a & __b;
723 static vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a,
724 vector bool short __b) {
725 return __a & (vector unsigned short)__b;
728 static vector bool short __ATTRS_o_ai vec_and(vector bool short __a,
729 vector bool short __b) {
733 static vector int __ATTRS_o_ai vec_and(vector int __a, vector int __b) {
737 static vector int __ATTRS_o_ai vec_and(vector bool int __a, vector int __b) {
738 return (vector int)__a & __b;
741 static vector int __ATTRS_o_ai vec_and(vector int __a, vector bool int __b) {
742 return __a & (vector int)__b;
745 static vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a,
746 vector unsigned int __b) {
750 static vector unsigned int __ATTRS_o_ai vec_and(vector bool int __a,
751 vector unsigned int __b) {
752 return (vector unsigned int)__a & __b;
755 static vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a,
756 vector bool int __b) {
757 return __a & (vector unsigned int)__b;
760 static vector bool int __ATTRS_o_ai vec_and(vector bool int __a,
761 vector bool int __b) {
765 static vector float __ATTRS_o_ai vec_and(vector float __a, vector float __b) {
766 vector unsigned int __res =
767 (vector unsigned int)__a & (vector unsigned int)__b;
768 return (vector float)__res;
771 static vector float __ATTRS_o_ai vec_and(vector bool int __a,
773 vector unsigned int __res =
774 (vector unsigned int)__a & (vector unsigned int)__b;
775 return (vector float)__res;
778 static vector float __ATTRS_o_ai vec_and(vector float __a,
779 vector bool int __b) {
780 vector unsigned int __res =
781 (vector unsigned int)__a & (vector unsigned int)__b;
782 return (vector float)__res;
786 static vector double __ATTRS_o_ai vec_and(vector bool long long __a, vector double __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 bool long long __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 double __ATTRS_o_ai vec_and(vector double __a, vector double __b) {
799 vector unsigned long long __res =
800 (vector unsigned long long)__a & (vector unsigned long long)__b;
801 return (vector double)__res;
804 static vector signed long long __ATTRS_o_ai
805 vec_and(vector signed long long __a, vector signed long long __b) {
809 static vector signed long long __ATTRS_o_ai
810 vec_and(vector bool long long __a, vector signed long long __b) {
811 return (vector signed long long)__a & __b;
814 static vector signed long long __ATTRS_o_ai vec_and(vector signed long long __a,
815 vector bool long long __b) {
816 return __a & (vector signed long long)__b;
819 static vector unsigned long long __ATTRS_o_ai
820 vec_and(vector unsigned long long __a, vector unsigned long long __b) {
824 static vector unsigned long long __ATTRS_o_ai
825 vec_and(vector bool long long __a, vector unsigned long long __b) {
826 return (vector unsigned long long)__a & __b;
829 static vector unsigned long long __ATTRS_o_ai
830 vec_and(vector unsigned long long __a, vector bool long long __b) {
831 return __a & (vector unsigned long long)__b;
834 static vector bool long long __ATTRS_o_ai vec_and(vector bool long long __a,
835 vector bool long long __b) {
842 static vector signed char __ATTRS_o_ai vec_vand(vector signed char __a,
843 vector signed char __b) {
847 static vector signed char __ATTRS_o_ai vec_vand(vector bool char __a,
848 vector signed char __b) {
849 return (vector signed char)__a & __b;
852 static vector signed char __ATTRS_o_ai vec_vand(vector signed char __a,
853 vector bool char __b) {
854 return __a & (vector signed char)__b;
857 static vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a,
858 vector unsigned char __b) {
862 static vector unsigned char __ATTRS_o_ai vec_vand(vector bool char __a,
863 vector unsigned char __b) {
864 return (vector unsigned char)__a & __b;
867 static vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a,
868 vector bool char __b) {
869 return __a & (vector unsigned char)__b;
872 static vector bool char __ATTRS_o_ai vec_vand(vector bool char __a,
873 vector bool char __b) {
877 static vector short __ATTRS_o_ai vec_vand(vector short __a, vector short __b) {
881 static vector short __ATTRS_o_ai vec_vand(vector bool short __a,
883 return (vector short)__a & __b;
886 static vector short __ATTRS_o_ai vec_vand(vector short __a,
887 vector bool short __b) {
888 return __a & (vector short)__b;
891 static vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a,
892 vector unsigned short __b) {
896 static vector unsigned short __ATTRS_o_ai vec_vand(vector bool short __a,
897 vector unsigned short __b) {
898 return (vector unsigned short)__a & __b;
901 static vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a,
902 vector bool short __b) {
903 return __a & (vector unsigned short)__b;
906 static vector bool short __ATTRS_o_ai vec_vand(vector bool short __a,
907 vector bool short __b) {
911 static vector int __ATTRS_o_ai vec_vand(vector int __a, vector int __b) {
915 static vector int __ATTRS_o_ai vec_vand(vector bool int __a, vector int __b) {
916 return (vector int)__a & __b;
919 static vector int __ATTRS_o_ai vec_vand(vector int __a, vector bool int __b) {
920 return __a & (vector int)__b;
923 static vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a,
924 vector unsigned int __b) {
928 static vector unsigned int __ATTRS_o_ai vec_vand(vector bool int __a,
929 vector unsigned int __b) {
930 return (vector unsigned int)__a & __b;
933 static vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a,
934 vector bool int __b) {
935 return __a & (vector unsigned int)__b;
938 static vector bool int __ATTRS_o_ai vec_vand(vector bool int __a,
939 vector bool int __b) {
943 static vector float __ATTRS_o_ai vec_vand(vector float __a, vector float __b) {
944 vector unsigned int __res =
945 (vector unsigned int)__a & (vector unsigned int)__b;
946 return (vector float)__res;
949 static vector float __ATTRS_o_ai vec_vand(vector bool int __a,
951 vector unsigned int __res =
952 (vector unsigned int)__a & (vector unsigned int)__b;
953 return (vector float)__res;
956 static vector float __ATTRS_o_ai vec_vand(vector float __a,
957 vector bool int __b) {
958 vector unsigned int __res =
959 (vector unsigned int)__a & (vector unsigned int)__b;
960 return (vector float)__res;
964 static vector signed long long __ATTRS_o_ai
965 vec_vand(vector signed long long __a, vector signed long long __b) {
969 static vector signed long long __ATTRS_o_ai
970 vec_vand(vector bool long long __a, vector signed long long __b) {
971 return (vector signed long long)__a & __b;
974 static vector signed long long __ATTRS_o_ai
975 vec_vand(vector signed long long __a, vector bool long long __b) {
976 return __a & (vector signed long long)__b;
979 static vector unsigned long long __ATTRS_o_ai
980 vec_vand(vector unsigned long long __a, vector unsigned long long __b) {
984 static vector unsigned long long __ATTRS_o_ai
985 vec_vand(vector bool long long __a, vector unsigned long long __b) {
986 return (vector unsigned long long)__a & __b;
989 static vector unsigned long long __ATTRS_o_ai
990 vec_vand(vector unsigned long long __a, vector bool long long __b) {
991 return __a & (vector unsigned long long)__b;
994 static vector bool long long __ATTRS_o_ai vec_vand(vector bool long long __a,
995 vector bool long long __b) {
1002 #define __builtin_altivec_vandc vec_andc
1004 static vector signed char __ATTRS_o_ai vec_andc(vector signed char __a,
1005 vector signed char __b) {
1009 static vector signed char __ATTRS_o_ai vec_andc(vector bool char __a,
1010 vector signed char __b) {
1011 return (vector signed char)__a & ~__b;
1014 static vector signed char __ATTRS_o_ai vec_andc(vector signed char __a,
1015 vector bool char __b) {
1016 return __a & ~(vector signed char)__b;
1019 static vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a,
1020 vector unsigned char __b) {
1024 static vector unsigned char __ATTRS_o_ai vec_andc(vector bool char __a,
1025 vector unsigned char __b) {
1026 return (vector unsigned char)__a & ~__b;
1029 static vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a,
1030 vector bool char __b) {
1031 return __a & ~(vector unsigned char)__b;
1034 static vector bool char __ATTRS_o_ai vec_andc(vector bool char __a,
1035 vector bool char __b) {
1039 static vector short __ATTRS_o_ai vec_andc(vector short __a, vector short __b) {
1043 static vector short __ATTRS_o_ai vec_andc(vector bool short __a,
1045 return (vector short)__a & ~__b;
1048 static vector short __ATTRS_o_ai vec_andc(vector short __a,
1049 vector bool short __b) {
1050 return __a & ~(vector short)__b;
1053 static vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a,
1054 vector unsigned short __b) {
1058 static vector unsigned short __ATTRS_o_ai vec_andc(vector bool short __a,
1059 vector unsigned short __b) {
1060 return (vector unsigned short)__a & ~__b;
1063 static vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a,
1064 vector bool short __b) {
1065 return __a & ~(vector unsigned short)__b;
1068 static vector bool short __ATTRS_o_ai vec_andc(vector bool short __a,
1069 vector bool short __b) {
1073 static vector int __ATTRS_o_ai vec_andc(vector int __a, vector int __b) {
1077 static vector int __ATTRS_o_ai vec_andc(vector bool int __a, vector int __b) {
1078 return (vector int)__a & ~__b;
1081 static vector int __ATTRS_o_ai vec_andc(vector int __a, vector bool int __b) {
1082 return __a & ~(vector int)__b;
1085 static vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a,
1086 vector unsigned int __b) {
1090 static vector unsigned int __ATTRS_o_ai vec_andc(vector bool int __a,
1091 vector unsigned int __b) {
1092 return (vector unsigned int)__a & ~__b;
1095 static vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a,
1096 vector bool int __b) {
1097 return __a & ~(vector unsigned int)__b;
1100 static vector bool int __ATTRS_o_ai vec_andc(vector bool int __a,
1101 vector bool int __b) {
1105 static vector float __ATTRS_o_ai vec_andc(vector float __a, vector float __b) {
1106 vector unsigned int __res =
1107 (vector unsigned int)__a & ~(vector unsigned int)__b;
1108 return (vector float)__res;
1111 static vector float __ATTRS_o_ai vec_andc(vector bool int __a,
1113 vector unsigned int __res =
1114 (vector unsigned int)__a & ~(vector unsigned int)__b;
1115 return (vector float)__res;
1118 static vector float __ATTRS_o_ai vec_andc(vector float __a,
1119 vector bool int __b) {
1120 vector unsigned int __res =
1121 (vector unsigned int)__a & ~(vector unsigned int)__b;
1122 return (vector float)__res;
1126 static vector double __ATTRS_o_ai
1127 vec_andc(vector bool long long __a, vector double __b) {
1128 vector unsigned long long __res =
1129 (vector unsigned long long)__a & ~(vector unsigned long long)__b;
1130 return (vector double)__res;
1133 static vector double __ATTRS_o_ai
1134 vec_andc(vector double __a, vector bool long long __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 double __ATTRS_o_ai vec_andc(vector double __a, vector double __b) {
1141 vector unsigned long long __res =
1142 (vector unsigned long long)__a & ~(vector unsigned long long)__b;
1143 return (vector double)__res;
1146 static vector signed long long __ATTRS_o_ai
1147 vec_andc(vector signed long long __a, vector signed long long __b) {
1151 static vector signed long long __ATTRS_o_ai
1152 vec_andc(vector bool long long __a, vector signed long long __b) {
1153 return (vector signed long long)__a & ~__b;
1156 static vector signed long long __ATTRS_o_ai
1157 vec_andc(vector signed long long __a, vector bool long long __b) {
1158 return __a & ~(vector signed long long)__b;
1161 static vector unsigned long long __ATTRS_o_ai
1162 vec_andc(vector unsigned long long __a, vector unsigned long long __b) {
1166 static vector unsigned long long __ATTRS_o_ai
1167 vec_andc(vector bool long long __a, vector unsigned long long __b) {
1168 return (vector unsigned long long)__a & ~__b;
1171 static vector unsigned long long __ATTRS_o_ai
1172 vec_andc(vector unsigned long long __a, vector bool long long __b) {
1173 return __a & ~(vector unsigned long long)__b;
1176 static vector bool long long __ATTRS_o_ai vec_andc(vector bool long long __a,
1177 vector bool long long __b) {
1184 static vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a,
1185 vector signed char __b) {
1189 static vector signed char __ATTRS_o_ai vec_vandc(vector bool char __a,
1190 vector signed char __b) {
1191 return (vector signed char)__a & ~__b;
1194 static vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a,
1195 vector bool char __b) {
1196 return __a & ~(vector signed char)__b;
1199 static vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a,
1200 vector unsigned char __b) {
1204 static vector unsigned char __ATTRS_o_ai vec_vandc(vector bool char __a,
1205 vector unsigned char __b) {
1206 return (vector unsigned char)__a & ~__b;
1209 static vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a,
1210 vector bool char __b) {
1211 return __a & ~(vector unsigned char)__b;
1214 static vector bool char __ATTRS_o_ai vec_vandc(vector bool char __a,
1215 vector bool char __b) {
1219 static vector short __ATTRS_o_ai vec_vandc(vector short __a, vector short __b) {
1223 static vector short __ATTRS_o_ai vec_vandc(vector bool short __a,
1225 return (vector short)__a & ~__b;
1228 static vector short __ATTRS_o_ai vec_vandc(vector short __a,
1229 vector bool short __b) {
1230 return __a & ~(vector short)__b;
1233 static vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a,
1234 vector unsigned short __b) {
1238 static vector unsigned short __ATTRS_o_ai vec_vandc(vector bool short __a,
1239 vector unsigned short __b) {
1240 return (vector unsigned short)__a & ~__b;
1243 static vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a,
1244 vector bool short __b) {
1245 return __a & ~(vector unsigned short)__b;
1248 static vector bool short __ATTRS_o_ai vec_vandc(vector bool short __a,
1249 vector bool short __b) {
1253 static vector int __ATTRS_o_ai vec_vandc(vector int __a, vector int __b) {
1257 static vector int __ATTRS_o_ai vec_vandc(vector bool int __a, vector int __b) {
1258 return (vector int)__a & ~__b;
1261 static vector int __ATTRS_o_ai vec_vandc(vector int __a, vector bool int __b) {
1262 return __a & ~(vector int)__b;
1265 static vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a,
1266 vector unsigned int __b) {
1270 static vector unsigned int __ATTRS_o_ai vec_vandc(vector bool int __a,
1271 vector unsigned int __b) {
1272 return (vector unsigned int)__a & ~__b;
1275 static vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a,
1276 vector bool int __b) {
1277 return __a & ~(vector unsigned int)__b;
1280 static vector bool int __ATTRS_o_ai vec_vandc(vector bool int __a,
1281 vector bool int __b) {
1285 static vector float __ATTRS_o_ai vec_vandc(vector float __a, vector float __b) {
1286 vector unsigned int __res =
1287 (vector unsigned int)__a & ~(vector unsigned int)__b;
1288 return (vector float)__res;
1291 static vector float __ATTRS_o_ai vec_vandc(vector bool int __a,
1293 vector unsigned int __res =
1294 (vector unsigned int)__a & ~(vector unsigned int)__b;
1295 return (vector float)__res;
1298 static vector float __ATTRS_o_ai vec_vandc(vector float __a,
1299 vector bool int __b) {
1300 vector unsigned int __res =
1301 (vector unsigned int)__a & ~(vector unsigned int)__b;
1302 return (vector float)__res;
1306 static vector signed long long __ATTRS_o_ai
1307 vec_vandc(vector signed long long __a, vector signed long long __b) {
1311 static vector signed long long __ATTRS_o_ai
1312 vec_vandc(vector bool long long __a, vector signed long long __b) {
1313 return (vector signed long long)__a & ~__b;
1316 static vector signed long long __ATTRS_o_ai
1317 vec_vandc(vector signed long long __a, vector bool long long __b) {
1318 return __a & ~(vector signed long long)__b;
1321 static vector unsigned long long __ATTRS_o_ai
1322 vec_vandc(vector unsigned long long __a, vector unsigned long long __b) {
1326 static vector unsigned long long __ATTRS_o_ai
1327 vec_vandc(vector bool long long __a, vector unsigned long long __b) {
1328 return (vector unsigned long long)__a & ~__b;
1331 static vector unsigned long long __ATTRS_o_ai
1332 vec_vandc(vector unsigned long long __a, vector bool long long __b) {
1333 return __a & ~(vector unsigned long long)__b;
1336 static vector bool long long __ATTRS_o_ai vec_vandc(vector bool long long __a,
1337 vector bool long long __b) {
1344 static vector signed char __ATTRS_o_ai vec_avg(vector signed char __a,
1345 vector signed char __b) {
1346 return __builtin_altivec_vavgsb(__a, __b);
1349 static vector unsigned char __ATTRS_o_ai vec_avg(vector unsigned char __a,
1350 vector unsigned char __b) {
1351 return __builtin_altivec_vavgub(__a, __b);
1354 static vector short __ATTRS_o_ai vec_avg(vector short __a, vector short __b) {
1355 return __builtin_altivec_vavgsh(__a, __b);
1358 static vector unsigned short __ATTRS_o_ai vec_avg(vector unsigned short __a,
1359 vector unsigned short __b) {
1360 return __builtin_altivec_vavguh(__a, __b);
1363 static vector int __ATTRS_o_ai vec_avg(vector int __a, vector int __b) {
1364 return __builtin_altivec_vavgsw(__a, __b);
1367 static vector unsigned int __ATTRS_o_ai vec_avg(vector unsigned int __a,
1368 vector unsigned int __b) {
1369 return __builtin_altivec_vavguw(__a, __b);
1374 static vector signed char __attribute__((__always_inline__))
1375 vec_vavgsb(vector signed char __a, vector signed char __b) {
1376 return __builtin_altivec_vavgsb(__a, __b);
1381 static vector unsigned char __attribute__((__always_inline__))
1382 vec_vavgub(vector unsigned char __a, vector unsigned char __b) {
1383 return __builtin_altivec_vavgub(__a, __b);
1388 static vector short __attribute__((__always_inline__))
1389 vec_vavgsh(vector short __a, vector short __b) {
1390 return __builtin_altivec_vavgsh(__a, __b);
1395 static vector unsigned short __attribute__((__always_inline__))
1396 vec_vavguh(vector unsigned short __a, vector unsigned short __b) {
1397 return __builtin_altivec_vavguh(__a, __b);
1402 static vector int __attribute__((__always_inline__))
1403 vec_vavgsw(vector int __a, vector int __b) {
1404 return __builtin_altivec_vavgsw(__a, __b);
1409 static vector unsigned int __attribute__((__always_inline__))
1410 vec_vavguw(vector unsigned int __a, vector unsigned int __b) {
1411 return __builtin_altivec_vavguw(__a, __b);
1416 static vector float __ATTRS_o_ai vec_ceil(vector float __a) {
1418 return __builtin_vsx_xvrspip(__a);
1420 return __builtin_altivec_vrfip(__a);
1425 static vector double __ATTRS_o_ai vec_ceil(vector double __a) {
1426 return __builtin_vsx_xvrdpip(__a);
1432 static vector float __attribute__((__always_inline__))
1433 vec_vrfip(vector float __a) {
1434 return __builtin_altivec_vrfip(__a);
1439 static vector int __attribute__((__always_inline__))
1440 vec_cmpb(vector float __a, vector float __b) {
1441 return __builtin_altivec_vcmpbfp(__a, __b);
1446 static vector int __attribute__((__always_inline__))
1447 vec_vcmpbfp(vector float __a, vector float __b) {
1448 return __builtin_altivec_vcmpbfp(__a, __b);
1453 static vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a,
1454 vector signed char __b) {
1455 return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a,
1459 static vector bool char __ATTRS_o_ai vec_cmpeq(vector unsigned char __a,
1460 vector unsigned char __b) {
1461 return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a,
1465 static vector bool short __ATTRS_o_ai vec_cmpeq(vector short __a,
1467 return (vector bool short)__builtin_altivec_vcmpequh(__a, __b);
1470 static vector bool short __ATTRS_o_ai vec_cmpeq(vector unsigned short __a,
1471 vector unsigned short __b) {
1472 return (vector bool short)__builtin_altivec_vcmpequh((vector short)__a,
1476 static vector bool int __ATTRS_o_ai vec_cmpeq(vector int __a, vector int __b) {
1477 return (vector bool int)__builtin_altivec_vcmpequw(__a, __b);
1480 static vector bool int __ATTRS_o_ai vec_cmpeq(vector unsigned int __a,
1481 vector unsigned int __b) {
1482 return (vector bool int)__builtin_altivec_vcmpequw((vector int)__a,
1486 #ifdef __POWER8_VECTOR__
1487 static vector bool long long __ATTRS_o_ai
1488 vec_cmpeq(vector signed long long __a, vector signed long long __b) {
1489 return (vector bool long long)__builtin_altivec_vcmpequd(__a, __b);
1492 static vector bool long long __ATTRS_o_ai
1493 vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) {
1494 return (vector bool long long)__builtin_altivec_vcmpequd(
1495 (vector long long)__a, (vector long long)__b);
1499 static vector bool int __ATTRS_o_ai vec_cmpeq(vector float __a,
1502 return (vector bool int)__builtin_vsx_xvcmpeqsp(__a, __b);
1504 return (vector bool int)__builtin_altivec_vcmpeqfp(__a, __b);
1509 static vector bool long long __ATTRS_o_ai
1510 vec_cmpeq(vector double __a, vector double __b) {
1511 return (vector bool long long)__builtin_vsx_xvcmpeqdp(__a, __b);
1517 static vector bool int __ATTRS_o_ai
1518 vec_cmpge(vector float __a, vector float __b) {
1520 return (vector bool int)__builtin_vsx_xvcmpgesp(__a, __b);
1522 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1527 static vector bool long long __ATTRS_o_ai
1528 vec_cmpge(vector double __a, vector double __b) {
1529 return (vector bool long long)__builtin_vsx_xvcmpgedp(__a, __b);
1533 #ifdef __POWER8_VECTOR__
1534 /* Forwrad declarations as the functions are used here */
1535 static vector bool long long __ATTRS_o_ai
1536 vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b);
1537 static vector bool long long __ATTRS_o_ai
1538 vec_cmpgt(vector signed long long __a, vector signed long long __b);
1540 static vector bool long long __ATTRS_o_ai
1541 vec_cmpge(vector signed long long __a, vector signed long long __b) {
1542 return ~(vec_cmpgt(__b, __a));
1545 static vector bool long long __ATTRS_o_ai
1546 vec_cmpge(vector unsigned long long __a, vector unsigned long long __b) {
1547 return ~(vec_cmpgt(__b, __a));
1553 static vector bool int __attribute__((__always_inline__))
1554 vec_vcmpgefp(vector float __a, vector float __b) {
1555 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1560 static vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a,
1561 vector signed char __b) {
1562 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1565 static vector bool char __ATTRS_o_ai vec_cmpgt(vector unsigned char __a,
1566 vector unsigned char __b) {
1567 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1570 static vector bool short __ATTRS_o_ai vec_cmpgt(vector short __a,
1572 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1575 static vector bool short __ATTRS_o_ai vec_cmpgt(vector unsigned short __a,
1576 vector unsigned short __b) {
1577 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1580 static vector bool int __ATTRS_o_ai vec_cmpgt(vector int __a, vector int __b) {
1581 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1584 static vector bool int __ATTRS_o_ai vec_cmpgt(vector unsigned int __a,
1585 vector unsigned int __b) {
1586 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1589 #ifdef __POWER8_VECTOR__
1590 static vector bool long long __ATTRS_o_ai
1591 vec_cmpgt(vector signed long long __a, vector signed long long __b) {
1592 return (vector bool long long)__builtin_altivec_vcmpgtsd(__a, __b);
1595 static vector bool long long __ATTRS_o_ai
1596 vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) {
1597 return (vector bool long long)__builtin_altivec_vcmpgtud(__a, __b);
1601 static vector bool int __ATTRS_o_ai vec_cmpgt(vector float __a,
1604 return (vector bool int)__builtin_vsx_xvcmpgtsp(__a, __b);
1606 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1611 static vector bool long long __ATTRS_o_ai
1612 vec_cmpgt(vector double __a, vector double __b) {
1613 return (vector bool long long)__builtin_vsx_xvcmpgtdp(__a, __b);
1618 static vector bool char __attribute__((__always_inline__))
1619 vec_vcmpgtsb(vector signed char __a, vector signed char __b) {
1620 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1625 static vector bool char __attribute__((__always_inline__))
1626 vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b) {
1627 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1632 static vector bool short __attribute__((__always_inline__))
1633 vec_vcmpgtsh(vector short __a, vector short __b) {
1634 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1639 static vector bool short __attribute__((__always_inline__))
1640 vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b) {
1641 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1646 static vector bool int __attribute__((__always_inline__))
1647 vec_vcmpgtsw(vector int __a, vector int __b) {
1648 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1653 static vector bool int __attribute__((__always_inline__))
1654 vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b) {
1655 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1660 static vector bool int __attribute__((__always_inline__))
1661 vec_vcmpgtfp(vector float __a, vector float __b) {
1662 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1667 static vector bool int __ATTRS_o_ai
1668 vec_cmple(vector float __a, vector float __b) {
1669 return vec_cmpge(__b, __a);
1673 static vector bool long long __ATTRS_o_ai
1674 vec_cmple(vector double __a, vector double __b) {
1675 return vec_cmpge(__b, __a);
1679 #ifdef __POWER8_VECTOR__
1680 static vector bool long long __ATTRS_o_ai
1681 vec_cmple(vector signed long long __a, vector signed long long __b) {
1682 return vec_cmpge(__b, __a);
1685 static vector bool long long __ATTRS_o_ai
1686 vec_cmple(vector unsigned long long __a, vector unsigned long long __b) {
1687 return vec_cmpge(__b, __a);
1693 static vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a,
1694 vector signed char __b) {
1695 return vec_cmpgt(__b, __a);
1698 static vector bool char __ATTRS_o_ai vec_cmplt(vector unsigned char __a,
1699 vector unsigned char __b) {
1700 return vec_cmpgt(__b, __a);
1703 static vector bool short __ATTRS_o_ai vec_cmplt(vector short __a,
1705 return vec_cmpgt(__b, __a);
1708 static vector bool short __ATTRS_o_ai vec_cmplt(vector unsigned short __a,
1709 vector unsigned short __b) {
1710 return vec_cmpgt(__b, __a);
1713 static vector bool int __ATTRS_o_ai vec_cmplt(vector int __a, vector int __b) {
1714 return vec_cmpgt(__b, __a);
1717 static vector bool int __ATTRS_o_ai vec_cmplt(vector unsigned int __a,
1718 vector unsigned int __b) {
1719 return vec_cmpgt(__b, __a);
1722 static vector bool int __ATTRS_o_ai vec_cmplt(vector float __a,
1724 return vec_cmpgt(__b, __a);
1728 static vector bool long long __ATTRS_o_ai
1729 vec_cmplt(vector double __a, vector double __b) {
1730 return vec_cmpgt(__b, __a);
1734 #ifdef __POWER8_VECTOR__
1735 static vector bool long long __ATTRS_o_ai
1736 vec_cmplt(vector signed long long __a, vector signed long long __b) {
1737 return vec_cmpgt(__b, __a);
1740 static vector bool long long __ATTRS_o_ai
1741 vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) {
1742 return vec_cmpgt(__b, __a);
1747 static vector signed char __ATTRS_o_ai vec_cntlz(vector signed char __a) {
1748 return __builtin_altivec_vclzb(__a);
1750 static vector unsigned char __ATTRS_o_ai vec_cntlz(vector unsigned char __a) {
1751 return __builtin_altivec_vclzb(__a);
1753 static vector signed short __ATTRS_o_ai vec_cntlz(vector signed short __a) {
1754 return __builtin_altivec_vclzh(__a);
1756 static vector unsigned short __ATTRS_o_ai vec_cntlz(vector unsigned short __a) {
1757 return __builtin_altivec_vclzh(__a);
1759 static vector signed int __ATTRS_o_ai vec_cntlz(vector signed int __a) {
1760 return __builtin_altivec_vclzw(__a);
1762 static vector unsigned int __ATTRS_o_ai vec_cntlz(vector unsigned int __a) {
1763 return __builtin_altivec_vclzw(__a);
1765 static vector signed long long __ATTRS_o_ai
1766 vec_cntlz(vector signed long long __a) {
1767 return __builtin_altivec_vclzd(__a);
1769 static vector unsigned long long __ATTRS_o_ai
1770 vec_cntlz(vector unsigned long long __a) {
1771 return __builtin_altivec_vclzd(__a);
1778 static vector float __ATTRS_o_ai vec_cpsgn(vector float __a, vector float __b) {
1779 return __builtin_vsx_xvcpsgnsp(__a, __b);
1782 static vector double __ATTRS_o_ai vec_cpsgn(vector double __a,
1783 vector double __b) {
1784 return __builtin_vsx_xvcpsgndp(__a, __b);
1790 static vector float __ATTRS_o_ai vec_ctf(vector int __a, int __b) {
1791 return __builtin_altivec_vcfsx(__a, __b);
1794 static vector float __ATTRS_o_ai vec_ctf(vector unsigned int __a, int __b) {
1795 return __builtin_altivec_vcfux((vector int)__a, __b);
1800 static vector float __attribute__((__always_inline__))
1801 vec_vcfsx(vector int __a, int __b) {
1802 return __builtin_altivec_vcfsx(__a, __b);
1807 static vector float __attribute__((__always_inline__))
1808 vec_vcfux(vector unsigned int __a, int __b) {
1809 return __builtin_altivec_vcfux((vector int)__a, __b);
1814 static vector int __attribute__((__always_inline__))
1815 vec_cts(vector float __a, int __b) {
1816 return __builtin_altivec_vctsxs(__a, __b);
1821 static vector int __attribute__((__always_inline__))
1822 vec_vctsxs(vector float __a, int __b) {
1823 return __builtin_altivec_vctsxs(__a, __b);
1828 static vector unsigned int __attribute__((__always_inline__))
1829 vec_ctu(vector float __a, int __b) {
1830 return __builtin_altivec_vctuxs(__a, __b);
1835 static vector unsigned int __attribute__((__always_inline__))
1836 vec_vctuxs(vector float __a, int __b) {
1837 return __builtin_altivec_vctuxs(__a, __b);
1842 /* Integer vector divides (vectors are scalarized, elements divided
1843 and the vectors reassembled).
1845 static vector signed char __ATTRS_o_ai vec_div(vector signed char __a,
1846 vector signed char __b) {
1850 static vector unsigned char __ATTRS_o_ai vec_div(vector unsigned char __a,
1851 vector unsigned char __b) {
1855 static vector signed short __ATTRS_o_ai vec_div(vector signed short __a,
1856 vector signed short __b) {
1860 static vector unsigned short __ATTRS_o_ai vec_div(vector unsigned short __a,
1861 vector unsigned short __b) {
1865 static vector signed int __ATTRS_o_ai vec_div(vector signed int __a,
1866 vector signed int __b) {
1870 static vector unsigned int __ATTRS_o_ai vec_div(vector unsigned int __a,
1871 vector unsigned int __b) {
1876 static vector signed long long __ATTRS_o_ai
1877 vec_div(vector signed long long __a, vector signed long long __b) {
1881 static vector unsigned long long __ATTRS_o_ai
1882 vec_div(vector unsigned long long __a, vector unsigned long long __b) {
1886 static vector float __ATTRS_o_ai vec_div(vector float __a, vector float __b) {
1890 static vector double __ATTRS_o_ai vec_div(vector double __a,
1891 vector double __b) {
1898 static void __attribute__((__always_inline__)) vec_dss(int __a) {
1899 __builtin_altivec_dss(__a);
1904 static void __attribute__((__always_inline__)) vec_dssall(void) {
1905 __builtin_altivec_dssall();
1910 static void __attribute__((__always_inline__))
1911 vec_dst(const void *__a, int __b, int __c) {
1912 __builtin_altivec_dst(__a, __b, __c);
1917 static void __attribute__((__always_inline__))
1918 vec_dstst(const void *__a, int __b, int __c) {
1919 __builtin_altivec_dstst(__a, __b, __c);
1924 static void __attribute__((__always_inline__))
1925 vec_dststt(const void *__a, int __b, int __c) {
1926 __builtin_altivec_dststt(__a, __b, __c);
1931 static void __attribute__((__always_inline__))
1932 vec_dstt(const void *__a, int __b, int __c) {
1933 __builtin_altivec_dstt(__a, __b, __c);
1938 #ifdef __POWER8_VECTOR__
1939 static vector signed char __ATTRS_o_ai vec_eqv(vector signed char __a,
1940 vector signed char __b) {
1941 return (vector signed char)__builtin_vsx_xxleqv((vector unsigned int)__a,
1942 (vector unsigned int)__b);
1945 static vector signed char __ATTRS_o_ai vec_eqv(vector bool char __a,
1946 vector signed char __b) {
1947 return (vector signed char)__builtin_vsx_xxleqv((vector unsigned int)__a,
1948 (vector unsigned int)__b);
1951 static vector signed char __ATTRS_o_ai vec_eqv(vector signed char __a,
1952 vector bool char __b) {
1953 return (vector signed char)__builtin_vsx_xxleqv((vector unsigned int)__a,
1954 (vector unsigned int)__b);
1957 static vector unsigned char __ATTRS_o_ai vec_eqv(vector unsigned char __a,
1958 vector unsigned char __b) {
1959 return (vector unsigned char)__builtin_vsx_xxleqv((vector unsigned int)__a,
1960 (vector unsigned int)__b);
1963 static vector unsigned char __ATTRS_o_ai vec_eqv(vector bool char __a,
1964 vector unsigned char __b) {
1965 return (vector unsigned char)__builtin_vsx_xxleqv((vector unsigned int)__a,
1966 (vector unsigned int)__b);
1969 static vector unsigned char __ATTRS_o_ai vec_eqv(vector unsigned char __a,
1970 vector bool char __b) {
1971 return (vector unsigned char)__builtin_vsx_xxleqv((vector unsigned int)__a,
1972 (vector unsigned int)__b);
1975 static vector signed short __ATTRS_o_ai vec_eqv(vector signed short __a,
1976 vector signed short __b) {
1977 return (vector signed short)__builtin_vsx_xxleqv((vector unsigned int)__a,
1978 (vector unsigned int)__b);
1981 static vector signed short __ATTRS_o_ai vec_eqv(vector bool short __a,
1982 vector signed short __b) {
1983 return (vector signed short)__builtin_vsx_xxleqv((vector unsigned int)__a,
1984 (vector unsigned int)__b);
1987 static vector signed short __ATTRS_o_ai vec_eqv(vector signed short __a,
1988 vector bool short __b) {
1989 return (vector signed short)__builtin_vsx_xxleqv((vector unsigned int)__a,
1990 (vector unsigned int)__b);
1993 static vector unsigned short __ATTRS_o_ai vec_eqv(vector unsigned short __a,
1994 vector unsigned short __b) {
1995 return (vector unsigned short)__builtin_vsx_xxleqv((vector unsigned int)__a,
1996 (vector unsigned int)__b);
1999 static vector unsigned short __ATTRS_o_ai vec_eqv(vector bool short __a,
2000 vector unsigned short __b) {
2001 return (vector unsigned short)__builtin_vsx_xxleqv((vector unsigned int)__a,
2002 (vector unsigned int)__b);
2005 static vector unsigned short __ATTRS_o_ai vec_eqv(vector unsigned short __a,
2006 vector bool short __b) {
2007 return (vector unsigned short)__builtin_vsx_xxleqv((vector unsigned int)__a,
2008 (vector unsigned int)__b);
2011 static vector signed int __ATTRS_o_ai vec_eqv(vector signed int __a,
2012 vector signed int __b) {
2013 return (vector signed int)__builtin_vsx_xxleqv((vector unsigned int)__a,
2014 (vector unsigned int)__b);
2017 static vector signed int __ATTRS_o_ai vec_eqv(vector bool int __a,
2018 vector signed int __b) {
2019 return (vector signed int)__builtin_vsx_xxleqv((vector unsigned int)__a,
2020 (vector unsigned int)__b);
2023 static vector signed int __ATTRS_o_ai vec_eqv(vector signed int __a,
2024 vector bool int __b) {
2025 return (vector signed int)__builtin_vsx_xxleqv((vector unsigned int)__a,
2026 (vector unsigned int)__b);
2029 static vector unsigned int __ATTRS_o_ai vec_eqv(vector unsigned int __a,
2030 vector unsigned int __b) {
2031 return __builtin_vsx_xxleqv((vector unsigned int)__a,
2032 (vector unsigned int)__b);
2035 static vector unsigned int __ATTRS_o_ai vec_eqv(vector bool int __a,
2036 vector unsigned int __b) {
2037 return __builtin_vsx_xxleqv((vector unsigned int)__a,
2038 (vector unsigned int)__b);
2041 static vector unsigned int __ATTRS_o_ai vec_eqv(vector unsigned int __a,
2042 vector bool int __b) {
2043 return __builtin_vsx_xxleqv((vector unsigned int)__a,
2044 (vector unsigned int)__b);
2047 static vector signed long long __ATTRS_o_ai
2048 vec_eqv(vector signed long long __a, vector signed long long __b) {
2049 return (vector signed long long)
2050 __builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b);
2053 static vector signed long long __ATTRS_o_ai
2054 vec_eqv(vector bool long long __a, vector signed long long __b) {
2055 return (vector signed long long)
2056 __builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b);
2059 static vector signed long long __ATTRS_o_ai
2060 vec_eqv(vector signed long long __a, vector bool long long __b) {
2061 return (vector signed long long)
2062 __builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b);
2065 static vector unsigned long long __ATTRS_o_ai
2066 vec_eqv(vector unsigned long long __a, vector unsigned long long __b) {
2067 return (vector unsigned long long)
2068 __builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b);
2071 static vector unsigned long long __ATTRS_o_ai
2072 vec_eqv(vector bool long long __a, vector unsigned long long __b) {
2073 return (vector unsigned long long)
2074 __builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b);
2077 static vector unsigned long long __ATTRS_o_ai
2078 vec_eqv(vector unsigned long long __a, vector bool long long __b) {
2079 return (vector unsigned long long)
2080 __builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b);
2083 static vector float __ATTRS_o_ai vec_eqv(vector float __a, vector float __b) {
2084 return (vector float)__builtin_vsx_xxleqv((vector unsigned int)__a,
2085 (vector unsigned int)__b);
2088 static vector float __ATTRS_o_ai vec_eqv(vector bool int __a,
2090 return (vector float)__builtin_vsx_xxleqv((vector unsigned int)__a,
2091 (vector unsigned int)__b);
2094 static vector float __ATTRS_o_ai vec_eqv(vector float __a,
2095 vector bool int __b) {
2096 return (vector float)__builtin_vsx_xxleqv((vector unsigned int)__a,
2097 (vector unsigned int)__b);
2100 static vector double __ATTRS_o_ai vec_eqv(vector double __a,
2101 vector double __b) {
2102 return (vector double)__builtin_vsx_xxleqv((vector unsigned int)__a,
2103 (vector unsigned int)__b);
2106 static vector double __ATTRS_o_ai vec_eqv(vector bool long long __a,
2107 vector double __b) {
2108 return (vector double)__builtin_vsx_xxleqv((vector unsigned int)__a,
2109 (vector unsigned int)__b);
2112 static vector double __ATTRS_o_ai vec_eqv(vector double __a,
2113 vector bool long long __b) {
2114 return (vector double)__builtin_vsx_xxleqv((vector unsigned int)__a,
2115 (vector unsigned int)__b);
2121 static vector float __attribute__((__always_inline__))
2122 vec_expte(vector float __a) {
2123 return __builtin_altivec_vexptefp(__a);
2128 static vector float __attribute__((__always_inline__))
2129 vec_vexptefp(vector float __a) {
2130 return __builtin_altivec_vexptefp(__a);
2135 static vector float __ATTRS_o_ai vec_floor(vector float __a) {
2137 return __builtin_vsx_xvrspim(__a);
2139 return __builtin_altivec_vrfim(__a);
2144 static vector double __ATTRS_o_ai vec_floor(vector double __a) {
2145 return __builtin_vsx_xvrdpim(__a);
2151 static vector float __attribute__((__always_inline__))
2152 vec_vrfim(vector float __a) {
2153 return __builtin_altivec_vrfim(__a);
2158 static vector signed char __ATTRS_o_ai vec_ld(int __a,
2159 const vector signed char *__b) {
2160 return (vector signed char)__builtin_altivec_lvx(__a, __b);
2163 static vector signed char __ATTRS_o_ai vec_ld(int __a, const signed char *__b) {
2164 return (vector signed char)__builtin_altivec_lvx(__a, __b);
2167 static vector unsigned char __ATTRS_o_ai
2168 vec_ld(int __a, const vector unsigned char *__b) {
2169 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
2172 static vector unsigned char __ATTRS_o_ai vec_ld(int __a,
2173 const unsigned char *__b) {
2174 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
2177 static vector bool char __ATTRS_o_ai vec_ld(int __a,
2178 const vector bool char *__b) {
2179 return (vector bool char)__builtin_altivec_lvx(__a, __b);
2182 static vector short __ATTRS_o_ai vec_ld(int __a, const vector short *__b) {
2183 return (vector short)__builtin_altivec_lvx(__a, __b);
2186 static vector short __ATTRS_o_ai vec_ld(int __a, const short *__b) {
2187 return (vector short)__builtin_altivec_lvx(__a, __b);
2190 static vector unsigned short __ATTRS_o_ai
2191 vec_ld(int __a, const vector unsigned short *__b) {
2192 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
2195 static vector unsigned short __ATTRS_o_ai vec_ld(int __a,
2196 const unsigned short *__b) {
2197 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
2200 static vector bool short __ATTRS_o_ai vec_ld(int __a,
2201 const vector bool short *__b) {
2202 return (vector bool short)__builtin_altivec_lvx(__a, __b);
2205 static vector pixel __ATTRS_o_ai vec_ld(int __a, const vector pixel *__b) {
2206 return (vector pixel)__builtin_altivec_lvx(__a, __b);
2209 static vector int __ATTRS_o_ai vec_ld(int __a, const vector int *__b) {
2210 return (vector int)__builtin_altivec_lvx(__a, __b);
2213 static vector int __ATTRS_o_ai vec_ld(int __a, const int *__b) {
2214 return (vector int)__builtin_altivec_lvx(__a, __b);
2217 static vector unsigned int __ATTRS_o_ai vec_ld(int __a,
2218 const vector unsigned int *__b) {
2219 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2222 static vector unsigned int __ATTRS_o_ai vec_ld(int __a,
2223 const unsigned int *__b) {
2224 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2227 static vector bool int __ATTRS_o_ai vec_ld(int __a,
2228 const vector bool int *__b) {
2229 return (vector bool int)__builtin_altivec_lvx(__a, __b);
2232 static vector float __ATTRS_o_ai vec_ld(int __a, const vector float *__b) {
2233 return (vector float)__builtin_altivec_lvx(__a, __b);
2236 static vector float __ATTRS_o_ai vec_ld(int __a, const float *__b) {
2237 return (vector float)__builtin_altivec_lvx(__a, __b);
2242 static vector signed char __ATTRS_o_ai vec_lvx(int __a,
2243 const vector signed char *__b) {
2244 return (vector signed char)__builtin_altivec_lvx(__a, __b);
2247 static vector signed char __ATTRS_o_ai vec_lvx(int __a,
2248 const signed char *__b) {
2249 return (vector signed char)__builtin_altivec_lvx(__a, __b);
2252 static vector unsigned char __ATTRS_o_ai
2253 vec_lvx(int __a, const vector unsigned char *__b) {
2254 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
2257 static vector unsigned char __ATTRS_o_ai vec_lvx(int __a,
2258 const unsigned char *__b) {
2259 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
2262 static vector bool char __ATTRS_o_ai vec_lvx(int __a,
2263 const vector bool char *__b) {
2264 return (vector bool char)__builtin_altivec_lvx(__a, __b);
2267 static vector short __ATTRS_o_ai vec_lvx(int __a, const vector short *__b) {
2268 return (vector short)__builtin_altivec_lvx(__a, __b);
2271 static vector short __ATTRS_o_ai vec_lvx(int __a, const short *__b) {
2272 return (vector short)__builtin_altivec_lvx(__a, __b);
2275 static vector unsigned short __ATTRS_o_ai
2276 vec_lvx(int __a, const vector unsigned short *__b) {
2277 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
2280 static vector unsigned short __ATTRS_o_ai vec_lvx(int __a,
2281 const unsigned short *__b) {
2282 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
2285 static vector bool short __ATTRS_o_ai vec_lvx(int __a,
2286 const vector bool short *__b) {
2287 return (vector bool short)__builtin_altivec_lvx(__a, __b);
2290 static vector pixel __ATTRS_o_ai vec_lvx(int __a, const vector pixel *__b) {
2291 return (vector pixel)__builtin_altivec_lvx(__a, __b);
2294 static vector int __ATTRS_o_ai vec_lvx(int __a, const vector int *__b) {
2295 return (vector int)__builtin_altivec_lvx(__a, __b);
2298 static vector int __ATTRS_o_ai vec_lvx(int __a, const int *__b) {
2299 return (vector int)__builtin_altivec_lvx(__a, __b);
2302 static vector unsigned int __ATTRS_o_ai
2303 vec_lvx(int __a, const vector unsigned int *__b) {
2304 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2307 static vector unsigned int __ATTRS_o_ai vec_lvx(int __a,
2308 const unsigned int *__b) {
2309 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2312 static vector bool int __ATTRS_o_ai vec_lvx(int __a,
2313 const vector bool int *__b) {
2314 return (vector bool int)__builtin_altivec_lvx(__a, __b);
2317 static vector float __ATTRS_o_ai vec_lvx(int __a, const vector float *__b) {
2318 return (vector float)__builtin_altivec_lvx(__a, __b);
2321 static vector float __ATTRS_o_ai vec_lvx(int __a, const float *__b) {
2322 return (vector float)__builtin_altivec_lvx(__a, __b);
2327 static vector signed char __ATTRS_o_ai vec_lde(int __a,
2328 const signed char *__b) {
2329 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
2332 static vector unsigned char __ATTRS_o_ai vec_lde(int __a,
2333 const unsigned char *__b) {
2334 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
2337 static vector short __ATTRS_o_ai vec_lde(int __a, const short *__b) {
2338 return (vector short)__builtin_altivec_lvehx(__a, __b);
2341 static vector unsigned short __ATTRS_o_ai vec_lde(int __a,
2342 const unsigned short *__b) {
2343 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
2346 static vector int __ATTRS_o_ai vec_lde(int __a, const int *__b) {
2347 return (vector int)__builtin_altivec_lvewx(__a, __b);
2350 static vector unsigned int __ATTRS_o_ai vec_lde(int __a,
2351 const unsigned int *__b) {
2352 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2355 static vector float __ATTRS_o_ai vec_lde(int __a, const float *__b) {
2356 return (vector float)__builtin_altivec_lvewx(__a, __b);
2361 static vector signed char __ATTRS_o_ai vec_lvebx(int __a,
2362 const signed char *__b) {
2363 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
2366 static vector unsigned char __ATTRS_o_ai vec_lvebx(int __a,
2367 const unsigned char *__b) {
2368 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
2373 static vector short __ATTRS_o_ai vec_lvehx(int __a, const short *__b) {
2374 return (vector short)__builtin_altivec_lvehx(__a, __b);
2377 static vector unsigned short __ATTRS_o_ai vec_lvehx(int __a,
2378 const unsigned short *__b) {
2379 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
2384 static vector int __ATTRS_o_ai vec_lvewx(int __a, const int *__b) {
2385 return (vector int)__builtin_altivec_lvewx(__a, __b);
2388 static vector unsigned int __ATTRS_o_ai vec_lvewx(int __a,
2389 const unsigned int *__b) {
2390 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2393 static vector float __ATTRS_o_ai vec_lvewx(int __a, const float *__b) {
2394 return (vector float)__builtin_altivec_lvewx(__a, __b);
2399 static vector signed char __ATTRS_o_ai vec_ldl(int __a,
2400 const vector signed char *__b) {
2401 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2404 static vector signed char __ATTRS_o_ai vec_ldl(int __a,
2405 const signed char *__b) {
2406 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2409 static vector unsigned char __ATTRS_o_ai
2410 vec_ldl(int __a, const vector unsigned char *__b) {
2411 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2414 static vector unsigned char __ATTRS_o_ai vec_ldl(int __a,
2415 const unsigned char *__b) {
2416 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2419 static vector bool char __ATTRS_o_ai vec_ldl(int __a,
2420 const vector bool char *__b) {
2421 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2424 static vector short __ATTRS_o_ai vec_ldl(int __a, const vector short *__b) {
2425 return (vector short)__builtin_altivec_lvxl(__a, __b);
2428 static vector short __ATTRS_o_ai vec_ldl(int __a, const short *__b) {
2429 return (vector short)__builtin_altivec_lvxl(__a, __b);
2432 static vector unsigned short __ATTRS_o_ai
2433 vec_ldl(int __a, const vector unsigned short *__b) {
2434 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2437 static vector unsigned short __ATTRS_o_ai vec_ldl(int __a,
2438 const unsigned short *__b) {
2439 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2442 static vector bool short __ATTRS_o_ai vec_ldl(int __a,
2443 const vector bool short *__b) {
2444 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2447 static vector pixel __ATTRS_o_ai vec_ldl(int __a, const vector pixel *__b) {
2448 return (vector pixel short)__builtin_altivec_lvxl(__a, __b);
2451 static vector int __ATTRS_o_ai vec_ldl(int __a, const vector int *__b) {
2452 return (vector int)__builtin_altivec_lvxl(__a, __b);
2455 static vector int __ATTRS_o_ai vec_ldl(int __a, const int *__b) {
2456 return (vector int)__builtin_altivec_lvxl(__a, __b);
2459 static vector unsigned int __ATTRS_o_ai
2460 vec_ldl(int __a, const vector unsigned int *__b) {
2461 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2464 static vector unsigned int __ATTRS_o_ai vec_ldl(int __a,
2465 const unsigned int *__b) {
2466 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2469 static vector bool int __ATTRS_o_ai vec_ldl(int __a,
2470 const vector bool int *__b) {
2471 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2474 static vector float __ATTRS_o_ai vec_ldl(int __a, const vector float *__b) {
2475 return (vector float)__builtin_altivec_lvxl(__a, __b);
2478 static vector float __ATTRS_o_ai vec_ldl(int __a, const float *__b) {
2479 return (vector float)__builtin_altivec_lvxl(__a, __b);
2484 static vector signed char __ATTRS_o_ai vec_lvxl(int __a,
2485 const vector signed char *__b) {
2486 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2489 static vector signed char __ATTRS_o_ai vec_lvxl(int __a,
2490 const signed char *__b) {
2491 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2494 static vector unsigned char __ATTRS_o_ai
2495 vec_lvxl(int __a, const vector unsigned char *__b) {
2496 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2499 static vector unsigned char __ATTRS_o_ai vec_lvxl(int __a,
2500 const unsigned char *__b) {
2501 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2504 static vector bool char __ATTRS_o_ai vec_lvxl(int __a,
2505 const vector bool char *__b) {
2506 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2509 static vector short __ATTRS_o_ai vec_lvxl(int __a, const vector short *__b) {
2510 return (vector short)__builtin_altivec_lvxl(__a, __b);
2513 static vector short __ATTRS_o_ai vec_lvxl(int __a, const short *__b) {
2514 return (vector short)__builtin_altivec_lvxl(__a, __b);
2517 static vector unsigned short __ATTRS_o_ai
2518 vec_lvxl(int __a, const vector unsigned short *__b) {
2519 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2522 static vector unsigned short __ATTRS_o_ai vec_lvxl(int __a,
2523 const unsigned short *__b) {
2524 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2527 static vector bool short __ATTRS_o_ai vec_lvxl(int __a,
2528 const vector bool short *__b) {
2529 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2532 static vector pixel __ATTRS_o_ai vec_lvxl(int __a, const vector pixel *__b) {
2533 return (vector pixel)__builtin_altivec_lvxl(__a, __b);
2536 static vector int __ATTRS_o_ai vec_lvxl(int __a, const vector int *__b) {
2537 return (vector int)__builtin_altivec_lvxl(__a, __b);
2540 static vector int __ATTRS_o_ai vec_lvxl(int __a, const int *__b) {
2541 return (vector int)__builtin_altivec_lvxl(__a, __b);
2544 static vector unsigned int __ATTRS_o_ai
2545 vec_lvxl(int __a, const vector unsigned int *__b) {
2546 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2549 static vector unsigned int __ATTRS_o_ai vec_lvxl(int __a,
2550 const unsigned int *__b) {
2551 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2554 static vector bool int __ATTRS_o_ai vec_lvxl(int __a,
2555 const vector bool int *__b) {
2556 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2559 static vector float __ATTRS_o_ai vec_lvxl(int __a, const vector float *__b) {
2560 return (vector float)__builtin_altivec_lvxl(__a, __b);
2563 static vector float __ATTRS_o_ai vec_lvxl(int __a, const float *__b) {
2564 return (vector float)__builtin_altivec_lvxl(__a, __b);
2569 static vector float __attribute__((__always_inline__))
2570 vec_loge(vector float __a) {
2571 return __builtin_altivec_vlogefp(__a);
2576 static vector float __attribute__((__always_inline__))
2577 vec_vlogefp(vector float __a) {
2578 return __builtin_altivec_vlogefp(__a);
2583 #ifdef __LITTLE_ENDIAN__
2584 static vector unsigned char __ATTRS_o_ai
2585 __attribute__((__deprecated__("use assignment for unaligned little endian \
2586 loads/stores"))) vec_lvsl(int __a, const signed char *__b) {
2587 vector unsigned char mask =
2588 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2589 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2590 7, 6, 5, 4, 3, 2, 1, 0};
2591 return vec_perm(mask, mask, reverse);
2594 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2595 const signed char *__b) {
2596 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2600 #ifdef __LITTLE_ENDIAN__
2601 static vector unsigned char __ATTRS_o_ai
2602 __attribute__((__deprecated__("use assignment for unaligned little endian \
2603 loads/stores"))) vec_lvsl(int __a, const unsigned char *__b) {
2604 vector unsigned char mask =
2605 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2606 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2607 7, 6, 5, 4, 3, 2, 1, 0};
2608 return vec_perm(mask, mask, reverse);
2611 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2612 const unsigned char *__b) {
2613 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2617 #ifdef __LITTLE_ENDIAN__
2618 static vector unsigned char __ATTRS_o_ai
2619 __attribute__((__deprecated__("use assignment for unaligned little endian \
2620 loads/stores"))) vec_lvsl(int __a, const short *__b) {
2621 vector unsigned char mask =
2622 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2623 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2624 7, 6, 5, 4, 3, 2, 1, 0};
2625 return vec_perm(mask, mask, reverse);
2628 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const short *__b) {
2629 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2633 #ifdef __LITTLE_ENDIAN__
2634 static vector unsigned char __ATTRS_o_ai
2635 __attribute__((__deprecated__("use assignment for unaligned little endian \
2636 loads/stores"))) vec_lvsl(int __a, const unsigned short *__b) {
2637 vector unsigned char mask =
2638 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2639 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2640 7, 6, 5, 4, 3, 2, 1, 0};
2641 return vec_perm(mask, mask, reverse);
2644 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2645 const unsigned short *__b) {
2646 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2650 #ifdef __LITTLE_ENDIAN__
2651 static vector unsigned char __ATTRS_o_ai
2652 __attribute__((__deprecated__("use assignment for unaligned little endian \
2653 loads/stores"))) vec_lvsl(int __a, const int *__b) {
2654 vector unsigned char mask =
2655 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2656 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2657 7, 6, 5, 4, 3, 2, 1, 0};
2658 return vec_perm(mask, mask, reverse);
2661 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const int *__b) {
2662 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2666 #ifdef __LITTLE_ENDIAN__
2667 static vector unsigned char __ATTRS_o_ai
2668 __attribute__((__deprecated__("use assignment for unaligned little endian \
2669 loads/stores"))) vec_lvsl(int __a, const unsigned int *__b) {
2670 vector unsigned char mask =
2671 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2672 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2673 7, 6, 5, 4, 3, 2, 1, 0};
2674 return vec_perm(mask, mask, reverse);
2677 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2678 const unsigned int *__b) {
2679 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2683 #ifdef __LITTLE_ENDIAN__
2684 static vector unsigned char __ATTRS_o_ai
2685 __attribute__((__deprecated__("use assignment for unaligned little endian \
2686 loads/stores"))) vec_lvsl(int __a, const float *__b) {
2687 vector unsigned char mask =
2688 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2689 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2690 7, 6, 5, 4, 3, 2, 1, 0};
2691 return vec_perm(mask, mask, reverse);
2694 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const float *__b) {
2695 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2701 #ifdef __LITTLE_ENDIAN__
2702 static vector unsigned char __ATTRS_o_ai
2703 __attribute__((__deprecated__("use assignment for unaligned little endian \
2704 loads/stores"))) vec_lvsr(int __a, const signed char *__b) {
2705 vector unsigned char mask =
2706 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2707 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2708 7, 6, 5, 4, 3, 2, 1, 0};
2709 return vec_perm(mask, mask, reverse);
2712 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2713 const signed char *__b) {
2714 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2718 #ifdef __LITTLE_ENDIAN__
2719 static vector unsigned char __ATTRS_o_ai
2720 __attribute__((__deprecated__("use assignment for unaligned little endian \
2721 loads/stores"))) vec_lvsr(int __a, const unsigned char *__b) {
2722 vector unsigned char mask =
2723 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2724 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2725 7, 6, 5, 4, 3, 2, 1, 0};
2726 return vec_perm(mask, mask, reverse);
2729 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2730 const unsigned char *__b) {
2731 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2735 #ifdef __LITTLE_ENDIAN__
2736 static vector unsigned char __ATTRS_o_ai
2737 __attribute__((__deprecated__("use assignment for unaligned little endian \
2738 loads/stores"))) vec_lvsr(int __a, const short *__b) {
2739 vector unsigned char mask =
2740 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2741 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2742 7, 6, 5, 4, 3, 2, 1, 0};
2743 return vec_perm(mask, mask, reverse);
2746 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const short *__b) {
2747 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2751 #ifdef __LITTLE_ENDIAN__
2752 static vector unsigned char __ATTRS_o_ai
2753 __attribute__((__deprecated__("use assignment for unaligned little endian \
2754 loads/stores"))) vec_lvsr(int __a, const unsigned short *__b) {
2755 vector unsigned char mask =
2756 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2757 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2758 7, 6, 5, 4, 3, 2, 1, 0};
2759 return vec_perm(mask, mask, reverse);
2762 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2763 const unsigned short *__b) {
2764 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2768 #ifdef __LITTLE_ENDIAN__
2769 static vector unsigned char __ATTRS_o_ai
2770 __attribute__((__deprecated__("use assignment for unaligned little endian \
2771 loads/stores"))) vec_lvsr(int __a, const int *__b) {
2772 vector unsigned char mask =
2773 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2774 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2775 7, 6, 5, 4, 3, 2, 1, 0};
2776 return vec_perm(mask, mask, reverse);
2779 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const int *__b) {
2780 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2784 #ifdef __LITTLE_ENDIAN__
2785 static vector unsigned char __ATTRS_o_ai
2786 __attribute__((__deprecated__("use assignment for unaligned little endian \
2787 loads/stores"))) vec_lvsr(int __a, const unsigned int *__b) {
2788 vector unsigned char mask =
2789 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2790 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2791 7, 6, 5, 4, 3, 2, 1, 0};
2792 return vec_perm(mask, mask, reverse);
2795 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2796 const unsigned int *__b) {
2797 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2801 #ifdef __LITTLE_ENDIAN__
2802 static vector unsigned char __ATTRS_o_ai
2803 __attribute__((__deprecated__("use assignment for unaligned little endian \
2804 loads/stores"))) vec_lvsr(int __a, const float *__b) {
2805 vector unsigned char mask =
2806 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2807 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2808 7, 6, 5, 4, 3, 2, 1, 0};
2809 return vec_perm(mask, mask, reverse);
2812 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const float *__b) {
2813 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2819 static vector float __ATTRS_o_ai
2820 vec_madd(vector float __a, vector float __b, vector float __c) {
2822 return __builtin_vsx_xvmaddasp(__a, __b, __c);
2824 return __builtin_altivec_vmaddfp(__a, __b, __c);
2829 static vector double __ATTRS_o_ai
2830 vec_madd(vector double __a, vector double __b, vector double __c) {
2831 return __builtin_vsx_xvmaddadp(__a, __b, __c);
2837 static vector float __attribute__((__always_inline__))
2838 vec_vmaddfp(vector float __a, vector float __b, vector float __c) {
2839 return __builtin_altivec_vmaddfp(__a, __b, __c);
2844 static vector signed short __attribute__((__always_inline__))
2845 vec_madds(vector signed short __a, vector signed short __b,
2846 vector signed short __c) {
2847 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2851 static vector signed short __attribute__((__always_inline__))
2852 vec_vmhaddshs(vector signed short __a, vector signed short __b,
2853 vector signed short __c) {
2854 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2860 static vector float __ATTRS_o_ai
2861 vec_msub(vector float __a, vector float __b, vector float __c) {
2862 return __builtin_vsx_xvmsubasp(__a, __b, __c);
2865 static vector double __ATTRS_o_ai
2866 vec_msub(vector double __a, vector double __b, vector double __c) {
2867 return __builtin_vsx_xvmsubadp(__a, __b, __c);
2873 static vector signed char __ATTRS_o_ai vec_max(vector signed char __a,
2874 vector signed char __b) {
2875 return __builtin_altivec_vmaxsb(__a, __b);
2878 static vector signed char __ATTRS_o_ai vec_max(vector bool char __a,
2879 vector signed char __b) {
2880 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2883 static vector signed char __ATTRS_o_ai vec_max(vector signed char __a,
2884 vector bool char __b) {
2885 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2888 static vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a,
2889 vector unsigned char __b) {
2890 return __builtin_altivec_vmaxub(__a, __b);
2893 static vector unsigned char __ATTRS_o_ai vec_max(vector bool char __a,
2894 vector unsigned char __b) {
2895 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2898 static vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a,
2899 vector bool char __b) {
2900 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2903 static vector short __ATTRS_o_ai vec_max(vector short __a, vector short __b) {
2904 return __builtin_altivec_vmaxsh(__a, __b);
2907 static vector short __ATTRS_o_ai vec_max(vector bool short __a,
2909 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2912 static vector short __ATTRS_o_ai vec_max(vector short __a,
2913 vector bool short __b) {
2914 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2917 static vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a,
2918 vector unsigned short __b) {
2919 return __builtin_altivec_vmaxuh(__a, __b);
2922 static vector unsigned short __ATTRS_o_ai vec_max(vector bool short __a,
2923 vector unsigned short __b) {
2924 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2927 static vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a,
2928 vector bool short __b) {
2929 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2932 static vector int __ATTRS_o_ai vec_max(vector int __a, vector int __b) {
2933 return __builtin_altivec_vmaxsw(__a, __b);
2936 static vector int __ATTRS_o_ai vec_max(vector bool int __a, vector int __b) {
2937 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2940 static vector int __ATTRS_o_ai vec_max(vector int __a, vector bool int __b) {
2941 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2944 static vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a,
2945 vector unsigned int __b) {
2946 return __builtin_altivec_vmaxuw(__a, __b);
2949 static vector unsigned int __ATTRS_o_ai vec_max(vector bool int __a,
2950 vector unsigned int __b) {
2951 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2954 static vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a,
2955 vector bool int __b) {
2956 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2959 #ifdef __POWER8_VECTOR__
2960 static vector signed long long __ATTRS_o_ai
2961 vec_max(vector signed long long __a, vector signed long long __b) {
2962 return __builtin_altivec_vmaxsd(__a, __b);
2965 static vector signed long long __ATTRS_o_ai
2966 vec_max(vector bool long long __a, vector signed long long __b) {
2967 return __builtin_altivec_vmaxsd((vector signed long long)__a, __b);
2970 static vector signed long long __ATTRS_o_ai vec_max(vector signed long long __a,
2971 vector bool long long __b) {
2972 return __builtin_altivec_vmaxsd(__a, (vector signed long long)__b);
2975 static vector unsigned long long __ATTRS_o_ai
2976 vec_max(vector unsigned long long __a, vector unsigned long long __b) {
2977 return __builtin_altivec_vmaxud(__a, __b);
2980 static vector unsigned long long __ATTRS_o_ai
2981 vec_max(vector bool long long __a, vector unsigned long long __b) {
2982 return __builtin_altivec_vmaxud((vector unsigned long long)__a, __b);
2985 static vector unsigned long long __ATTRS_o_ai
2986 vec_max(vector unsigned long long __a, vector bool long long __b) {
2987 return __builtin_altivec_vmaxud(__a, (vector unsigned long long)__b);
2991 static vector float __ATTRS_o_ai vec_max(vector float __a, vector float __b) {
2993 return __builtin_vsx_xvmaxsp(__a, __b);
2995 return __builtin_altivec_vmaxfp(__a, __b);
3000 static vector double __ATTRS_o_ai vec_max(vector double __a,
3001 vector double __b) {
3002 return __builtin_vsx_xvmaxdp(__a, __b);
3008 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a,
3009 vector signed char __b) {
3010 return __builtin_altivec_vmaxsb(__a, __b);
3013 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector bool char __a,
3014 vector signed char __b) {
3015 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
3018 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a,
3019 vector bool char __b) {
3020 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
3025 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a,
3026 vector unsigned char __b) {
3027 return __builtin_altivec_vmaxub(__a, __b);
3030 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector bool char __a,
3031 vector unsigned char __b) {
3032 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
3035 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a,
3036 vector bool char __b) {
3037 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
3042 static vector short __ATTRS_o_ai vec_vmaxsh(vector short __a,
3044 return __builtin_altivec_vmaxsh(__a, __b);
3047 static vector short __ATTRS_o_ai vec_vmaxsh(vector bool short __a,
3049 return __builtin_altivec_vmaxsh((vector short)__a, __b);
3052 static vector short __ATTRS_o_ai vec_vmaxsh(vector short __a,
3053 vector bool short __b) {
3054 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
3059 static vector unsigned short __ATTRS_o_ai
3060 vec_vmaxuh(vector unsigned short __a, vector unsigned short __b) {
3061 return __builtin_altivec_vmaxuh(__a, __b);
3064 static vector unsigned short __ATTRS_o_ai
3065 vec_vmaxuh(vector bool short __a, vector unsigned short __b) {
3066 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
3069 static vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a,
3070 vector bool short __b) {
3071 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
3076 static vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector int __b) {
3077 return __builtin_altivec_vmaxsw(__a, __b);
3080 static vector int __ATTRS_o_ai vec_vmaxsw(vector bool int __a, vector int __b) {
3081 return __builtin_altivec_vmaxsw((vector int)__a, __b);
3084 static vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector bool int __b) {
3085 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
3090 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a,
3091 vector unsigned int __b) {
3092 return __builtin_altivec_vmaxuw(__a, __b);
3095 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector bool int __a,
3096 vector unsigned int __b) {
3097 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
3100 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a,
3101 vector bool int __b) {
3102 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
3107 static vector float __attribute__((__always_inline__))
3108 vec_vmaxfp(vector float __a, vector float __b) {
3110 return __builtin_vsx_xvmaxsp(__a, __b);
3112 return __builtin_altivec_vmaxfp(__a, __b);
3118 static vector signed char __ATTRS_o_ai vec_mergeh(vector signed char __a,
3119 vector signed char __b) {
3120 return vec_perm(__a, __b,
3121 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3122 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3123 0x06, 0x16, 0x07, 0x17));
3126 static vector unsigned char __ATTRS_o_ai vec_mergeh(vector unsigned char __a,
3127 vector unsigned char __b) {
3128 return vec_perm(__a, __b,
3129 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3130 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3131 0x06, 0x16, 0x07, 0x17));
3134 static vector bool char __ATTRS_o_ai vec_mergeh(vector bool char __a,
3135 vector bool char __b) {
3136 return vec_perm(__a, __b,
3137 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3138 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3139 0x06, 0x16, 0x07, 0x17));
3142 static vector short __ATTRS_o_ai vec_mergeh(vector short __a,
3144 return vec_perm(__a, __b,
3145 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3146 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3147 0x06, 0x07, 0x16, 0x17));
3150 static vector unsigned short __ATTRS_o_ai
3151 vec_mergeh(vector unsigned short __a, vector unsigned short __b) {
3152 return vec_perm(__a, __b,
3153 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3154 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3155 0x06, 0x07, 0x16, 0x17));
3158 static vector bool short __ATTRS_o_ai vec_mergeh(vector bool short __a,
3159 vector bool short __b) {
3160 return vec_perm(__a, __b,
3161 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3162 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3163 0x06, 0x07, 0x16, 0x17));
3166 static vector pixel __ATTRS_o_ai vec_mergeh(vector pixel __a,
3168 return vec_perm(__a, __b,
3169 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3170 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3171 0x06, 0x07, 0x16, 0x17));
3174 static vector int __ATTRS_o_ai vec_mergeh(vector int __a, vector int __b) {
3175 return vec_perm(__a, __b,
3176 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3177 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3178 0x14, 0x15, 0x16, 0x17));
3181 static vector unsigned int __ATTRS_o_ai vec_mergeh(vector unsigned int __a,
3182 vector unsigned int __b) {
3183 return vec_perm(__a, __b,
3184 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3185 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3186 0x14, 0x15, 0x16, 0x17));
3189 static vector bool int __ATTRS_o_ai vec_mergeh(vector bool int __a,
3190 vector bool int __b) {
3191 return vec_perm(__a, __b,
3192 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3193 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3194 0x14, 0x15, 0x16, 0x17));
3197 static vector float __ATTRS_o_ai vec_mergeh(vector float __a,
3199 return vec_perm(__a, __b,
3200 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3201 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3202 0x14, 0x15, 0x16, 0x17));
3206 static vector signed long long __ATTRS_o_ai
3207 vec_mergeh(vector signed long long __a, vector signed long long __b) {
3208 return vec_perm(__a, __b,
3209 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3210 0x04, 0x05, 0x06, 0x07,
3211 0x10, 0x11, 0x12, 0x13,
3212 0x14, 0x15, 0x16, 0x17));
3215 static vector signed long long __ATTRS_o_ai
3216 vec_mergeh(vector signed long long __a, vector bool long long __b) {
3217 return vec_perm(__a, (vector signed long long)__b,
3218 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3219 0x04, 0x05, 0x06, 0x07,
3220 0x10, 0x11, 0x12, 0x13,
3221 0x14, 0x15, 0x16, 0x17));
3224 static vector signed long long __ATTRS_o_ai
3225 vec_mergeh(vector bool long long __a, vector signed long long __b) {
3226 return vec_perm((vector signed long long)__a, __b,
3227 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3228 0x04, 0x05, 0x06, 0x07,
3229 0x10, 0x11, 0x12, 0x13,
3230 0x14, 0x15, 0x16, 0x17));
3233 static vector unsigned long long __ATTRS_o_ai
3234 vec_mergeh(vector unsigned long long __a, vector unsigned long long __b) {
3235 return vec_perm(__a, __b,
3236 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3237 0x04, 0x05, 0x06, 0x07,
3238 0x10, 0x11, 0x12, 0x13,
3239 0x14, 0x15, 0x16, 0x17));
3242 static vector unsigned long long __ATTRS_o_ai
3243 vec_mergeh(vector unsigned long long __a, vector bool long long __b) {
3244 return vec_perm(__a, (vector unsigned long long)__b,
3245 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3246 0x04, 0x05, 0x06, 0x07,
3247 0x10, 0x11, 0x12, 0x13,
3248 0x14, 0x15, 0x16, 0x17));
3251 static vector unsigned long long __ATTRS_o_ai
3252 vec_mergeh(vector bool long long __a, vector unsigned long long __b) {
3253 return vec_perm((vector unsigned long long)__a, __b,
3254 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3255 0x04, 0x05, 0x06, 0x07,
3256 0x10, 0x11, 0x12, 0x13,
3257 0x14, 0x15, 0x16, 0x17));
3259 static vector double __ATTRS_o_ai vec_mergeh(vector double __a,
3260 vector double __b) {
3261 return vec_perm(__a, __b,
3262 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3263 0x04, 0x05, 0x06, 0x07,
3264 0x10, 0x11, 0x12, 0x13,
3265 0x14, 0x15, 0x16, 0x17));
3267 static vector double __ATTRS_o_ai vec_mergeh(vector double __a,
3268 vector bool long long __b) {
3269 return vec_perm(__a, (vector double)__b,
3270 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3271 0x04, 0x05, 0x06, 0x07,
3272 0x10, 0x11, 0x12, 0x13,
3273 0x14, 0x15, 0x16, 0x17));
3275 static vector double __ATTRS_o_ai vec_mergeh(vector bool long long __a,
3276 vector double __b) {
3277 return vec_perm((vector double)__a, __b,
3278 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3279 0x04, 0x05, 0x06, 0x07,
3280 0x10, 0x11, 0x12, 0x13,
3281 0x14, 0x15, 0x16, 0x17));
3287 #define __builtin_altivec_vmrghb vec_vmrghb
3289 static vector signed char __ATTRS_o_ai vec_vmrghb(vector signed char __a,
3290 vector signed char __b) {
3291 return vec_perm(__a, __b,
3292 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3293 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3294 0x06, 0x16, 0x07, 0x17));
3297 static vector unsigned char __ATTRS_o_ai vec_vmrghb(vector unsigned char __a,
3298 vector unsigned char __b) {
3299 return vec_perm(__a, __b,
3300 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3301 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3302 0x06, 0x16, 0x07, 0x17));
3305 static vector bool char __ATTRS_o_ai vec_vmrghb(vector bool char __a,
3306 vector bool char __b) {
3307 return vec_perm(__a, __b,
3308 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3309 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3310 0x06, 0x16, 0x07, 0x17));
3315 #define __builtin_altivec_vmrghh vec_vmrghh
3317 static vector short __ATTRS_o_ai vec_vmrghh(vector short __a,
3319 return vec_perm(__a, __b,
3320 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3321 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3322 0x06, 0x07, 0x16, 0x17));
3325 static vector unsigned short __ATTRS_o_ai
3326 vec_vmrghh(vector unsigned short __a, vector unsigned short __b) {
3327 return vec_perm(__a, __b,
3328 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3329 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3330 0x06, 0x07, 0x16, 0x17));
3333 static vector bool short __ATTRS_o_ai vec_vmrghh(vector bool short __a,
3334 vector bool short __b) {
3335 return vec_perm(__a, __b,
3336 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3337 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3338 0x06, 0x07, 0x16, 0x17));
3341 static vector pixel __ATTRS_o_ai vec_vmrghh(vector pixel __a,
3343 return vec_perm(__a, __b,
3344 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3345 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3346 0x06, 0x07, 0x16, 0x17));
3351 #define __builtin_altivec_vmrghw vec_vmrghw
3353 static vector int __ATTRS_o_ai vec_vmrghw(vector int __a, vector int __b) {
3354 return vec_perm(__a, __b,
3355 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3356 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3357 0x14, 0x15, 0x16, 0x17));
3360 static vector unsigned int __ATTRS_o_ai vec_vmrghw(vector unsigned int __a,
3361 vector unsigned int __b) {
3362 return vec_perm(__a, __b,
3363 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3364 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3365 0x14, 0x15, 0x16, 0x17));
3368 static vector bool int __ATTRS_o_ai vec_vmrghw(vector bool int __a,
3369 vector bool int __b) {
3370 return vec_perm(__a, __b,
3371 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3372 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3373 0x14, 0x15, 0x16, 0x17));
3376 static vector float __ATTRS_o_ai vec_vmrghw(vector float __a,
3378 return vec_perm(__a, __b,
3379 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3380 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3381 0x14, 0x15, 0x16, 0x17));
3386 static vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a,
3387 vector signed char __b) {
3388 return vec_perm(__a, __b,
3389 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3390 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3391 0x0E, 0x1E, 0x0F, 0x1F));
3394 static vector unsigned char __ATTRS_o_ai vec_mergel(vector unsigned char __a,
3395 vector unsigned char __b) {
3396 return vec_perm(__a, __b,
3397 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3398 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3399 0x0E, 0x1E, 0x0F, 0x1F));
3402 static vector bool char __ATTRS_o_ai vec_mergel(vector bool char __a,
3403 vector bool char __b) {
3404 return vec_perm(__a, __b,
3405 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3406 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3407 0x0E, 0x1E, 0x0F, 0x1F));
3410 static vector short __ATTRS_o_ai vec_mergel(vector short __a,
3412 return vec_perm(__a, __b,
3413 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3414 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3415 0x0E, 0x0F, 0x1E, 0x1F));
3418 static vector unsigned short __ATTRS_o_ai
3419 vec_mergel(vector unsigned short __a, vector unsigned short __b) {
3420 return vec_perm(__a, __b,
3421 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3422 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3423 0x0E, 0x0F, 0x1E, 0x1F));
3426 static vector bool short __ATTRS_o_ai vec_mergel(vector bool short __a,
3427 vector bool short __b) {
3428 return vec_perm(__a, __b,
3429 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3430 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3431 0x0E, 0x0F, 0x1E, 0x1F));
3434 static vector pixel __ATTRS_o_ai vec_mergel(vector pixel __a,
3436 return vec_perm(__a, __b,
3437 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3438 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3439 0x0E, 0x0F, 0x1E, 0x1F));
3442 static vector int __ATTRS_o_ai vec_mergel(vector int __a, vector int __b) {
3443 return vec_perm(__a, __b,
3444 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3445 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3446 0x1C, 0x1D, 0x1E, 0x1F));
3449 static vector unsigned int __ATTRS_o_ai vec_mergel(vector unsigned int __a,
3450 vector unsigned int __b) {
3451 return vec_perm(__a, __b,
3452 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3453 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3454 0x1C, 0x1D, 0x1E, 0x1F));
3457 static vector bool int __ATTRS_o_ai vec_mergel(vector bool int __a,
3458 vector bool int __b) {
3459 return vec_perm(__a, __b,
3460 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3461 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3462 0x1C, 0x1D, 0x1E, 0x1F));
3465 static vector float __ATTRS_o_ai vec_mergel(vector float __a,
3467 return vec_perm(__a, __b,
3468 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3469 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3470 0x1C, 0x1D, 0x1E, 0x1F));
3474 static vector signed long long __ATTRS_o_ai
3475 vec_mergel(vector signed long long __a, vector signed long long __b) {
3476 return vec_perm(__a, __b,
3477 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3478 0x0C, 0x0D, 0x0E, 0x0F,
3479 0x18, 0X19, 0x1A, 0x1B,
3480 0x1C, 0x1D, 0x1E, 0x1F));
3482 static vector signed long long __ATTRS_o_ai
3483 vec_mergel(vector signed long long __a, vector bool long long __b) {
3484 return vec_perm(__a, (vector signed long long)__b,
3485 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3486 0x0C, 0x0D, 0x0E, 0x0F,
3487 0x18, 0X19, 0x1A, 0x1B,
3488 0x1C, 0x1D, 0x1E, 0x1F));
3490 static vector signed long long __ATTRS_o_ai
3491 vec_mergel(vector bool long long __a, vector signed long long __b) {
3492 return vec_perm((vector signed long long)__a, __b,
3493 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3494 0x0C, 0x0D, 0x0E, 0x0F,
3495 0x18, 0X19, 0x1A, 0x1B,
3496 0x1C, 0x1D, 0x1E, 0x1F));
3498 static vector unsigned long long __ATTRS_o_ai
3499 vec_mergel(vector unsigned long long __a, vector unsigned long long __b) {
3500 return vec_perm(__a, __b,
3501 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3502 0x0C, 0x0D, 0x0E, 0x0F,
3503 0x18, 0X19, 0x1A, 0x1B,
3504 0x1C, 0x1D, 0x1E, 0x1F));
3506 static vector unsigned long long __ATTRS_o_ai
3507 vec_mergel(vector unsigned long long __a, vector bool long long __b) {
3508 return vec_perm(__a, (vector unsigned long long)__b,
3509 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3510 0x0C, 0x0D, 0x0E, 0x0F,
3511 0x18, 0X19, 0x1A, 0x1B,
3512 0x1C, 0x1D, 0x1E, 0x1F));
3514 static vector unsigned long long __ATTRS_o_ai
3515 vec_mergel(vector bool long long __a, vector unsigned long long __b) {
3516 return vec_perm((vector unsigned long long)__a, __b,
3517 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3518 0x0C, 0x0D, 0x0E, 0x0F,
3519 0x18, 0X19, 0x1A, 0x1B,
3520 0x1C, 0x1D, 0x1E, 0x1F));
3522 static vector double __ATTRS_o_ai
3523 vec_mergel(vector double __a, vector double __b) {
3524 return vec_perm(__a, __b,
3525 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3526 0x0C, 0x0D, 0x0E, 0x0F,
3527 0x18, 0X19, 0x1A, 0x1B,
3528 0x1C, 0x1D, 0x1E, 0x1F));
3530 static vector double __ATTRS_o_ai
3531 vec_mergel(vector double __a, vector bool long long __b) {
3532 return vec_perm(__a, (vector double)__b,
3533 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3534 0x0C, 0x0D, 0x0E, 0x0F,
3535 0x18, 0X19, 0x1A, 0x1B,
3536 0x1C, 0x1D, 0x1E, 0x1F));
3538 static vector double __ATTRS_o_ai
3539 vec_mergel(vector bool long long __a, vector double __b) {
3540 return vec_perm((vector double)__a, __b,
3541 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3542 0x0C, 0x0D, 0x0E, 0x0F,
3543 0x18, 0X19, 0x1A, 0x1B,
3544 0x1C, 0x1D, 0x1E, 0x1F));
3550 #define __builtin_altivec_vmrglb vec_vmrglb
3552 static vector signed char __ATTRS_o_ai vec_vmrglb(vector signed char __a,
3553 vector signed char __b) {
3554 return vec_perm(__a, __b,
3555 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3556 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3557 0x0E, 0x1E, 0x0F, 0x1F));
3560 static vector unsigned char __ATTRS_o_ai vec_vmrglb(vector unsigned char __a,
3561 vector unsigned char __b) {
3562 return vec_perm(__a, __b,
3563 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3564 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3565 0x0E, 0x1E, 0x0F, 0x1F));
3568 static vector bool char __ATTRS_o_ai vec_vmrglb(vector bool char __a,
3569 vector bool char __b) {
3570 return vec_perm(__a, __b,
3571 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3572 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3573 0x0E, 0x1E, 0x0F, 0x1F));
3578 #define __builtin_altivec_vmrglh vec_vmrglh
3580 static vector short __ATTRS_o_ai vec_vmrglh(vector short __a,
3582 return vec_perm(__a, __b,
3583 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3584 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3585 0x0E, 0x0F, 0x1E, 0x1F));
3588 static vector unsigned short __ATTRS_o_ai
3589 vec_vmrglh(vector unsigned short __a, vector unsigned short __b) {
3590 return vec_perm(__a, __b,
3591 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3592 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3593 0x0E, 0x0F, 0x1E, 0x1F));
3596 static vector bool short __ATTRS_o_ai vec_vmrglh(vector bool short __a,
3597 vector bool short __b) {
3598 return vec_perm(__a, __b,
3599 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3600 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3601 0x0E, 0x0F, 0x1E, 0x1F));
3604 static vector pixel __ATTRS_o_ai vec_vmrglh(vector pixel __a,
3606 return vec_perm(__a, __b,
3607 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3608 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3609 0x0E, 0x0F, 0x1E, 0x1F));
3614 #define __builtin_altivec_vmrglw vec_vmrglw
3616 static vector int __ATTRS_o_ai vec_vmrglw(vector int __a, vector int __b) {
3617 return vec_perm(__a, __b,
3618 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3619 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3620 0x1C, 0x1D, 0x1E, 0x1F));
3623 static vector unsigned int __ATTRS_o_ai vec_vmrglw(vector unsigned int __a,
3624 vector unsigned int __b) {
3625 return vec_perm(__a, __b,
3626 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3627 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3628 0x1C, 0x1D, 0x1E, 0x1F));
3631 static vector bool int __ATTRS_o_ai vec_vmrglw(vector bool int __a,
3632 vector bool int __b) {
3633 return vec_perm(__a, __b,
3634 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3635 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3636 0x1C, 0x1D, 0x1E, 0x1F));
3639 static vector float __ATTRS_o_ai vec_vmrglw(vector float __a,
3641 return vec_perm(__a, __b,
3642 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3643 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3644 0x1C, 0x1D, 0x1E, 0x1F));
3648 #ifdef __POWER8_VECTOR__
3651 static vector bool int __ATTRS_o_ai
3652 vec_mergee(vector bool int __a, vector bool int __b) {
3653 return vec_perm(__a, __b, (vector unsigned char)
3654 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3655 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B));
3658 static vector signed int __ATTRS_o_ai
3659 vec_mergee(vector signed int __a, vector signed int __b) {
3660 return vec_perm(__a, __b, (vector unsigned char)
3661 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3662 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B));
3665 static vector unsigned int __ATTRS_o_ai
3666 vec_mergee(vector unsigned int __a, vector unsigned int __b) {
3667 return vec_perm(__a, __b, (vector unsigned char)
3668 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3669 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B));
3674 static vector bool int __ATTRS_o_ai
3675 vec_mergeo(vector bool int __a, vector bool int __b) {
3676 return vec_perm(__a, __b, (vector unsigned char)
3677 (0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17,
3678 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3681 static vector signed int __ATTRS_o_ai
3682 vec_mergeo(vector signed int __a, vector signed int __b) {
3683 return vec_perm(__a, __b, (vector unsigned char)
3684 (0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17,
3685 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3688 static vector unsigned int __ATTRS_o_ai
3689 vec_mergeo(vector unsigned int __a, vector unsigned int __b) {
3690 return vec_perm(__a, __b, (vector unsigned char)
3691 (0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17,
3692 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3699 static vector unsigned short __attribute__((__always_inline__))
3701 return __builtin_altivec_mfvscr();
3706 static vector signed char __ATTRS_o_ai vec_min(vector signed char __a,
3707 vector signed char __b) {
3708 return __builtin_altivec_vminsb(__a, __b);
3711 static vector signed char __ATTRS_o_ai vec_min(vector bool char __a,
3712 vector signed char __b) {
3713 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3716 static vector signed char __ATTRS_o_ai vec_min(vector signed char __a,
3717 vector bool char __b) {
3718 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3721 static vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a,
3722 vector unsigned char __b) {
3723 return __builtin_altivec_vminub(__a, __b);
3726 static vector unsigned char __ATTRS_o_ai vec_min(vector bool char __a,
3727 vector unsigned char __b) {
3728 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3731 static vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a,
3732 vector bool char __b) {
3733 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3736 static vector short __ATTRS_o_ai vec_min(vector short __a, vector short __b) {
3737 return __builtin_altivec_vminsh(__a, __b);
3740 static vector short __ATTRS_o_ai vec_min(vector bool short __a,
3742 return __builtin_altivec_vminsh((vector short)__a, __b);
3745 static vector short __ATTRS_o_ai vec_min(vector short __a,
3746 vector bool short __b) {
3747 return __builtin_altivec_vminsh(__a, (vector short)__b);
3750 static vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a,
3751 vector unsigned short __b) {
3752 return __builtin_altivec_vminuh(__a, __b);
3755 static vector unsigned short __ATTRS_o_ai vec_min(vector bool short __a,
3756 vector unsigned short __b) {
3757 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3760 static vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a,
3761 vector bool short __b) {
3762 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3765 static vector int __ATTRS_o_ai vec_min(vector int __a, vector int __b) {
3766 return __builtin_altivec_vminsw(__a, __b);
3769 static vector int __ATTRS_o_ai vec_min(vector bool int __a, vector int __b) {
3770 return __builtin_altivec_vminsw((vector int)__a, __b);
3773 static vector int __ATTRS_o_ai vec_min(vector int __a, vector bool int __b) {
3774 return __builtin_altivec_vminsw(__a, (vector int)__b);
3777 static vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a,
3778 vector unsigned int __b) {
3779 return __builtin_altivec_vminuw(__a, __b);
3782 static vector unsigned int __ATTRS_o_ai vec_min(vector bool int __a,
3783 vector unsigned int __b) {
3784 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3787 static vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a,
3788 vector bool int __b) {
3789 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3792 #ifdef __POWER8_VECTOR__
3793 static vector signed long long __ATTRS_o_ai
3794 vec_min(vector signed long long __a, vector signed long long __b) {
3795 return __builtin_altivec_vminsd(__a, __b);
3798 static vector signed long long __ATTRS_o_ai
3799 vec_min(vector bool long long __a, vector signed long long __b) {
3800 return __builtin_altivec_vminsd((vector signed long long)__a, __b);
3803 static vector signed long long __ATTRS_o_ai vec_min(vector signed long long __a,
3804 vector bool long long __b) {
3805 return __builtin_altivec_vminsd(__a, (vector signed long long)__b);
3808 static vector unsigned long long __ATTRS_o_ai
3809 vec_min(vector unsigned long long __a, vector unsigned long long __b) {
3810 return __builtin_altivec_vminud(__a, __b);
3813 static vector unsigned long long __ATTRS_o_ai
3814 vec_min(vector bool long long __a, vector unsigned long long __b) {
3815 return __builtin_altivec_vminud((vector unsigned long long)__a, __b);
3818 static vector unsigned long long __ATTRS_o_ai
3819 vec_min(vector unsigned long long __a, vector bool long long __b) {
3820 return __builtin_altivec_vminud(__a, (vector unsigned long long)__b);
3824 static vector float __ATTRS_o_ai vec_min(vector float __a, vector float __b) {
3826 return __builtin_vsx_xvminsp(__a, __b);
3828 return __builtin_altivec_vminfp(__a, __b);
3833 static vector double __ATTRS_o_ai vec_min(vector double __a,
3834 vector double __b) {
3835 return __builtin_vsx_xvmindp(__a, __b);
3841 static vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a,
3842 vector signed char __b) {
3843 return __builtin_altivec_vminsb(__a, __b);
3846 static vector signed char __ATTRS_o_ai vec_vminsb(vector bool char __a,
3847 vector signed char __b) {
3848 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3851 static vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a,
3852 vector bool char __b) {
3853 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3858 static vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a,
3859 vector unsigned char __b) {
3860 return __builtin_altivec_vminub(__a, __b);
3863 static vector unsigned char __ATTRS_o_ai vec_vminub(vector bool char __a,
3864 vector unsigned char __b) {
3865 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3868 static vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a,
3869 vector bool char __b) {
3870 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3875 static vector short __ATTRS_o_ai vec_vminsh(vector short __a,
3877 return __builtin_altivec_vminsh(__a, __b);
3880 static vector short __ATTRS_o_ai vec_vminsh(vector bool short __a,
3882 return __builtin_altivec_vminsh((vector short)__a, __b);
3885 static vector short __ATTRS_o_ai vec_vminsh(vector short __a,
3886 vector bool short __b) {
3887 return __builtin_altivec_vminsh(__a, (vector short)__b);
3892 static vector unsigned short __ATTRS_o_ai
3893 vec_vminuh(vector unsigned short __a, vector unsigned short __b) {
3894 return __builtin_altivec_vminuh(__a, __b);
3897 static vector unsigned short __ATTRS_o_ai
3898 vec_vminuh(vector bool short __a, vector unsigned short __b) {
3899 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3902 static vector unsigned short __ATTRS_o_ai vec_vminuh(vector unsigned short __a,
3903 vector bool short __b) {
3904 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3909 static vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector int __b) {
3910 return __builtin_altivec_vminsw(__a, __b);
3913 static vector int __ATTRS_o_ai vec_vminsw(vector bool int __a, vector int __b) {
3914 return __builtin_altivec_vminsw((vector int)__a, __b);
3917 static vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector bool int __b) {
3918 return __builtin_altivec_vminsw(__a, (vector int)__b);
3923 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a,
3924 vector unsigned int __b) {
3925 return __builtin_altivec_vminuw(__a, __b);
3928 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector bool int __a,
3929 vector unsigned int __b) {
3930 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3933 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a,
3934 vector bool int __b) {
3935 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3940 static vector float __attribute__((__always_inline__))
3941 vec_vminfp(vector float __a, vector float __b) {
3943 return __builtin_vsx_xvminsp(__a, __b);
3945 return __builtin_altivec_vminfp(__a, __b);
3951 #define __builtin_altivec_vmladduhm vec_mladd
3953 static vector short __ATTRS_o_ai vec_mladd(vector short __a, vector short __b,
3955 return __a * __b + __c;
3958 static vector short __ATTRS_o_ai vec_mladd(vector short __a,
3959 vector unsigned short __b,
3960 vector unsigned short __c) {
3961 return __a * (vector short)__b + (vector short)__c;
3964 static vector short __ATTRS_o_ai vec_mladd(vector unsigned short __a,
3965 vector short __b, vector short __c) {
3966 return (vector short)__a * __b + __c;
3969 static vector unsigned short __ATTRS_o_ai vec_mladd(vector unsigned short __a,
3970 vector unsigned short __b,
3971 vector unsigned short __c) {
3972 return __a * __b + __c;
3977 static vector short __ATTRS_o_ai vec_vmladduhm(vector short __a,
3980 return __a * __b + __c;
3983 static vector short __ATTRS_o_ai vec_vmladduhm(vector short __a,
3984 vector unsigned short __b,
3985 vector unsigned short __c) {
3986 return __a * (vector short)__b + (vector short)__c;
3989 static vector short __ATTRS_o_ai vec_vmladduhm(vector unsigned short __a,
3992 return (vector short)__a * __b + __c;
3995 static vector unsigned short __ATTRS_o_ai
3996 vec_vmladduhm(vector unsigned short __a, vector unsigned short __b,
3997 vector unsigned short __c) {
3998 return __a * __b + __c;
4003 static vector short __attribute__((__always_inline__))
4004 vec_mradds(vector short __a, vector short __b, vector short __c) {
4005 return __builtin_altivec_vmhraddshs(__a, __b, __c);
4008 /* vec_vmhraddshs */
4010 static vector short __attribute__((__always_inline__))
4011 vec_vmhraddshs(vector short __a, vector short __b, vector short __c) {
4012 return __builtin_altivec_vmhraddshs(__a, __b, __c);
4017 static vector int __ATTRS_o_ai vec_msum(vector signed char __a,
4018 vector unsigned char __b,
4020 return __builtin_altivec_vmsummbm(__a, __b, __c);
4023 static vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned char __a,
4024 vector unsigned char __b,
4025 vector unsigned int __c) {
4026 return __builtin_altivec_vmsumubm(__a, __b, __c);
4029 static vector int __ATTRS_o_ai vec_msum(vector short __a, vector short __b,
4031 return __builtin_altivec_vmsumshm(__a, __b, __c);
4034 static vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned short __a,
4035 vector unsigned short __b,
4036 vector unsigned int __c) {
4037 return __builtin_altivec_vmsumuhm(__a, __b, __c);
4042 static vector int __attribute__((__always_inline__))
4043 vec_vmsummbm(vector signed char __a, vector unsigned char __b, vector int __c) {
4044 return __builtin_altivec_vmsummbm(__a, __b, __c);
4049 static vector unsigned int __attribute__((__always_inline__))
4050 vec_vmsumubm(vector unsigned char __a, vector unsigned char __b,
4051 vector unsigned int __c) {
4052 return __builtin_altivec_vmsumubm(__a, __b, __c);
4057 static vector int __attribute__((__always_inline__))
4058 vec_vmsumshm(vector short __a, vector short __b, vector int __c) {
4059 return __builtin_altivec_vmsumshm(__a, __b, __c);
4064 static vector unsigned int __attribute__((__always_inline__))
4065 vec_vmsumuhm(vector unsigned short __a, vector unsigned short __b,
4066 vector unsigned int __c) {
4067 return __builtin_altivec_vmsumuhm(__a, __b, __c);
4072 static vector int __ATTRS_o_ai vec_msums(vector short __a, vector short __b,
4074 return __builtin_altivec_vmsumshs(__a, __b, __c);
4077 static vector unsigned int __ATTRS_o_ai vec_msums(vector unsigned short __a,
4078 vector unsigned short __b,
4079 vector unsigned int __c) {
4080 return __builtin_altivec_vmsumuhs(__a, __b, __c);
4085 static vector int __attribute__((__always_inline__))
4086 vec_vmsumshs(vector short __a, vector short __b, vector int __c) {
4087 return __builtin_altivec_vmsumshs(__a, __b, __c);
4092 static vector unsigned int __attribute__((__always_inline__))
4093 vec_vmsumuhs(vector unsigned short __a, vector unsigned short __b,
4094 vector unsigned int __c) {
4095 return __builtin_altivec_vmsumuhs(__a, __b, __c);
4100 static void __ATTRS_o_ai vec_mtvscr(vector signed char __a) {
4101 __builtin_altivec_mtvscr((vector int)__a);
4104 static void __ATTRS_o_ai vec_mtvscr(vector unsigned char __a) {
4105 __builtin_altivec_mtvscr((vector int)__a);
4108 static void __ATTRS_o_ai vec_mtvscr(vector bool char __a) {
4109 __builtin_altivec_mtvscr((vector int)__a);
4112 static void __ATTRS_o_ai vec_mtvscr(vector short __a) {
4113 __builtin_altivec_mtvscr((vector int)__a);
4116 static void __ATTRS_o_ai vec_mtvscr(vector unsigned short __a) {
4117 __builtin_altivec_mtvscr((vector int)__a);
4120 static void __ATTRS_o_ai vec_mtvscr(vector bool short __a) {
4121 __builtin_altivec_mtvscr((vector int)__a);
4124 static void __ATTRS_o_ai vec_mtvscr(vector pixel __a) {
4125 __builtin_altivec_mtvscr((vector int)__a);
4128 static void __ATTRS_o_ai vec_mtvscr(vector int __a) {
4129 __builtin_altivec_mtvscr((vector int)__a);
4132 static void __ATTRS_o_ai vec_mtvscr(vector unsigned int __a) {
4133 __builtin_altivec_mtvscr((vector int)__a);
4136 static void __ATTRS_o_ai vec_mtvscr(vector bool int __a) {
4137 __builtin_altivec_mtvscr((vector int)__a);
4140 static void __ATTRS_o_ai vec_mtvscr(vector float __a) {
4141 __builtin_altivec_mtvscr((vector int)__a);
4146 /* Integer vector multiplication will involve multiplication of the odd/even
4147 elements separately, then truncating the results and moving to the
4150 static vector signed char __ATTRS_o_ai vec_mul(vector signed char __a,
4151 vector signed char __b) {
4155 static vector unsigned char __ATTRS_o_ai vec_mul(vector unsigned char __a,
4156 vector unsigned char __b) {
4160 static vector signed short __ATTRS_o_ai vec_mul(vector signed short __a,
4161 vector signed short __b) {
4165 static vector unsigned short __ATTRS_o_ai vec_mul(vector unsigned short __a,
4166 vector unsigned short __b) {
4170 static vector signed int __ATTRS_o_ai vec_mul(vector signed int __a,
4171 vector signed int __b) {
4175 static vector unsigned int __ATTRS_o_ai vec_mul(vector unsigned int __a,
4176 vector unsigned int __b) {
4181 static vector signed long long __ATTRS_o_ai
4182 vec_mul(vector signed long long __a, vector signed long long __b) {
4186 static vector unsigned long long __ATTRS_o_ai
4187 vec_mul(vector unsigned long long __a, vector unsigned long long __b) {
4192 static vector float __ATTRS_o_ai vec_mul(vector float __a, vector float __b) {
4197 static vector double __ATTRS_o_ai
4198 vec_mul(vector double __a, vector double __b) {
4203 /* The vmulos* and vmules* instructions have a big endian bias, so
4204 we must reverse the meaning of "even" and "odd" for little endian. */
4208 static vector short __ATTRS_o_ai vec_mule(vector signed char __a,
4209 vector signed char __b) {
4210 #ifdef __LITTLE_ENDIAN__
4211 return __builtin_altivec_vmulosb(__a, __b);
4213 return __builtin_altivec_vmulesb(__a, __b);
4217 static vector unsigned short __ATTRS_o_ai vec_mule(vector unsigned char __a,
4218 vector unsigned char __b) {
4219 #ifdef __LITTLE_ENDIAN__
4220 return __builtin_altivec_vmuloub(__a, __b);
4222 return __builtin_altivec_vmuleub(__a, __b);
4226 static vector int __ATTRS_o_ai vec_mule(vector short __a, vector short __b) {
4227 #ifdef __LITTLE_ENDIAN__
4228 return __builtin_altivec_vmulosh(__a, __b);
4230 return __builtin_altivec_vmulesh(__a, __b);
4234 static vector unsigned int __ATTRS_o_ai vec_mule(vector unsigned short __a,
4235 vector unsigned short __b) {
4236 #ifdef __LITTLE_ENDIAN__
4237 return __builtin_altivec_vmulouh(__a, __b);
4239 return __builtin_altivec_vmuleuh(__a, __b);
4243 #ifdef __POWER8_VECTOR__
4244 static vector signed long long __ATTRS_o_ai vec_mule(vector signed int __a,
4245 vector signed int __b) {
4246 #ifdef __LITTLE_ENDIAN__
4247 return __builtin_altivec_vmulosw(__a, __b);
4249 return __builtin_altivec_vmulesw(__a, __b);
4253 static vector unsigned long long __ATTRS_o_ai
4254 vec_mule(vector unsigned int __a, vector unsigned int __b) {
4255 #ifdef __LITTLE_ENDIAN__
4256 return __builtin_altivec_vmulouw(__a, __b);
4258 return __builtin_altivec_vmuleuw(__a, __b);
4265 static vector short __attribute__((__always_inline__))
4266 vec_vmulesb(vector signed char __a, vector signed char __b) {
4267 #ifdef __LITTLE_ENDIAN__
4268 return __builtin_altivec_vmulosb(__a, __b);
4270 return __builtin_altivec_vmulesb(__a, __b);
4276 static vector unsigned short __attribute__((__always_inline__))
4277 vec_vmuleub(vector unsigned char __a, vector unsigned char __b) {
4278 #ifdef __LITTLE_ENDIAN__
4279 return __builtin_altivec_vmuloub(__a, __b);
4281 return __builtin_altivec_vmuleub(__a, __b);
4287 static vector int __attribute__((__always_inline__))
4288 vec_vmulesh(vector short __a, vector short __b) {
4289 #ifdef __LITTLE_ENDIAN__
4290 return __builtin_altivec_vmulosh(__a, __b);
4292 return __builtin_altivec_vmulesh(__a, __b);
4298 static vector unsigned int __attribute__((__always_inline__))
4299 vec_vmuleuh(vector unsigned short __a, vector unsigned short __b) {
4300 #ifdef __LITTLE_ENDIAN__
4301 return __builtin_altivec_vmulouh(__a, __b);
4303 return __builtin_altivec_vmuleuh(__a, __b);
4309 static vector short __ATTRS_o_ai vec_mulo(vector signed char __a,
4310 vector signed char __b) {
4311 #ifdef __LITTLE_ENDIAN__
4312 return __builtin_altivec_vmulesb(__a, __b);
4314 return __builtin_altivec_vmulosb(__a, __b);
4318 static vector unsigned short __ATTRS_o_ai vec_mulo(vector unsigned char __a,
4319 vector unsigned char __b) {
4320 #ifdef __LITTLE_ENDIAN__
4321 return __builtin_altivec_vmuleub(__a, __b);
4323 return __builtin_altivec_vmuloub(__a, __b);
4327 static vector int __ATTRS_o_ai vec_mulo(vector short __a, vector short __b) {
4328 #ifdef __LITTLE_ENDIAN__
4329 return __builtin_altivec_vmulesh(__a, __b);
4331 return __builtin_altivec_vmulosh(__a, __b);
4335 static vector unsigned int __ATTRS_o_ai vec_mulo(vector unsigned short __a,
4336 vector unsigned short __b) {
4337 #ifdef __LITTLE_ENDIAN__
4338 return __builtin_altivec_vmuleuh(__a, __b);
4340 return __builtin_altivec_vmulouh(__a, __b);
4344 #ifdef __POWER8_VECTOR__
4345 static vector signed long long __ATTRS_o_ai vec_mulo(vector signed int __a,
4346 vector signed int __b) {
4347 #ifdef __LITTLE_ENDIAN__
4348 return __builtin_altivec_vmulesw(__a, __b);
4350 return __builtin_altivec_vmulosw(__a, __b);
4354 static vector unsigned long long __ATTRS_o_ai
4355 vec_mulo(vector unsigned int __a, vector unsigned int __b) {
4356 #ifdef __LITTLE_ENDIAN__
4357 return __builtin_altivec_vmuleuw(__a, __b);
4359 return __builtin_altivec_vmulouw(__a, __b);
4366 static vector short __attribute__((__always_inline__))
4367 vec_vmulosb(vector signed char __a, vector signed char __b) {
4368 #ifdef __LITTLE_ENDIAN__
4369 return __builtin_altivec_vmulesb(__a, __b);
4371 return __builtin_altivec_vmulosb(__a, __b);
4377 static vector unsigned short __attribute__((__always_inline__))
4378 vec_vmuloub(vector unsigned char __a, vector unsigned char __b) {
4379 #ifdef __LITTLE_ENDIAN__
4380 return __builtin_altivec_vmuleub(__a, __b);
4382 return __builtin_altivec_vmuloub(__a, __b);
4388 static vector int __attribute__((__always_inline__))
4389 vec_vmulosh(vector short __a, vector short __b) {
4390 #ifdef __LITTLE_ENDIAN__
4391 return __builtin_altivec_vmulesh(__a, __b);
4393 return __builtin_altivec_vmulosh(__a, __b);
4399 static vector unsigned int __attribute__((__always_inline__))
4400 vec_vmulouh(vector unsigned short __a, vector unsigned short __b) {
4401 #ifdef __LITTLE_ENDIAN__
4402 return __builtin_altivec_vmuleuh(__a, __b);
4404 return __builtin_altivec_vmulouh(__a, __b);
4410 #ifdef __POWER8_VECTOR__
4411 static vector signed char __ATTRS_o_ai vec_nand(vector signed char __a,
4412 vector signed char __b) {
4413 return ~(__a & __b);
4416 static vector signed char __ATTRS_o_ai vec_nand(vector signed char __a,
4417 vector bool char __b) {
4418 return ~(__a & __b);
4421 static vector signed char __ATTRS_o_ai vec_nand(vector bool char __a,
4422 vector signed char __b) {
4423 return ~(__a & __b);
4426 static vector unsigned char __ATTRS_o_ai vec_nand(vector unsigned char __a,
4427 vector unsigned char __b) {
4428 return ~(__a & __b);
4431 static vector unsigned char __ATTRS_o_ai vec_nand(vector unsigned char __a,
4432 vector bool char __b) {
4433 return ~(__a & __b);
4437 static vector unsigned char __ATTRS_o_ai vec_nand(vector bool char __a,
4438 vector unsigned char __b) {
4439 return ~(__a & __b);
4442 static vector signed short __ATTRS_o_ai vec_nand(vector signed short __a,
4443 vector signed short __b) {
4444 return ~(__a & __b);
4447 static vector signed short __ATTRS_o_ai vec_nand(vector signed short __a,
4448 vector bool short __b) {
4449 return ~(__a & __b);
4452 static vector signed short __ATTRS_o_ai vec_nand(vector bool short __a,
4453 vector signed short __b) {
4454 return ~(__a & __b);
4457 static vector unsigned short __ATTRS_o_ai vec_nand(vector unsigned short __a,
4458 vector unsigned short __b) {
4459 return ~(__a & __b);
4462 static vector unsigned short __ATTRS_o_ai vec_nand(vector unsigned short __a,
4463 vector bool short __b) {
4464 return ~(__a & __b);
4468 static vector unsigned short __ATTRS_o_ai vec_nand(vector bool short __a,
4469 vector unsigned short __b) {
4470 return ~(__a & __b);
4474 static vector signed int __ATTRS_o_ai vec_nand(vector signed int __a,
4475 vector signed int __b) {
4476 return ~(__a & __b);
4479 static vector signed int __ATTRS_o_ai vec_nand(vector signed int __a,
4480 vector bool int __b) {
4481 return ~(__a & __b);
4484 static vector signed int __ATTRS_o_ai vec_nand(vector bool int __a,
4485 vector signed int __b) {
4486 return ~(__a & __b);
4489 static vector unsigned int __ATTRS_o_ai vec_nand(vector unsigned int __a,
4490 vector unsigned int __b) {
4491 return ~(__a & __b);
4494 static vector unsigned int __ATTRS_o_ai vec_nand(vector unsigned int __a,
4495 vector bool int __b) {
4496 return ~(__a & __b);
4499 static vector unsigned int __ATTRS_o_ai vec_nand(vector bool int __a,
4500 vector unsigned int __b) {
4501 return ~(__a & __b);
4504 static vector signed long long __ATTRS_o_ai
4505 vec_nand(vector signed long long __a, vector signed long long __b) {
4506 return ~(__a & __b);
4509 static vector signed long long __ATTRS_o_ai
4510 vec_nand(vector signed long long __a, vector bool long long __b) {
4511 return ~(__a & __b);
4514 static vector signed long long __ATTRS_o_ai
4515 vec_nand(vector bool long long __a, vector signed long long __b) {
4516 return ~(__a & __b);
4519 static vector unsigned long long __ATTRS_o_ai
4520 vec_nand(vector unsigned long long __a, vector unsigned long long __b) {
4521 return ~(__a & __b);
4524 static vector unsigned long long __ATTRS_o_ai
4525 vec_nand(vector unsigned long long __a, vector bool long long __b) {
4526 return ~(__a & __b);
4529 static vector unsigned long long __ATTRS_o_ai
4530 vec_nand(vector bool long long __a, vector unsigned long long __b) {
4531 return ~(__a & __b);
4539 static vector float __ATTRS_o_ai
4540 vec_nmadd(vector float __a, vector float __b, vector float __c) {
4541 return __builtin_vsx_xvnmaddasp(__a, __b, __c);
4544 static vector double __ATTRS_o_ai
4545 vec_nmadd(vector double __a, vector double __b, vector double __c) {
4546 return __builtin_vsx_xvnmaddadp(__a, __b, __c);
4552 static vector float __ATTRS_o_ai
4553 vec_nmsub(vector float __a, vector float __b, vector float __c) {
4555 return __builtin_vsx_xvnmsubasp(__a, __b, __c);
4557 return __builtin_altivec_vnmsubfp(__a, __b, __c);
4562 static vector double __ATTRS_o_ai
4563 vec_nmsub(vector double __a, vector double __b, vector double __c) {
4564 return __builtin_vsx_xvnmsubadp(__a, __b, __c);
4570 static vector float __attribute__((__always_inline__))
4571 vec_vnmsubfp(vector float __a, vector float __b, vector float __c) {
4572 return __builtin_altivec_vnmsubfp(__a, __b, __c);
4577 #define __builtin_altivec_vnor vec_nor
4579 static vector signed char __ATTRS_o_ai vec_nor(vector signed char __a,
4580 vector signed char __b) {
4581 return ~(__a | __b);
4584 static vector unsigned char __ATTRS_o_ai vec_nor(vector unsigned char __a,
4585 vector unsigned char __b) {
4586 return ~(__a | __b);
4589 static vector bool char __ATTRS_o_ai vec_nor(vector bool char __a,
4590 vector bool char __b) {
4591 return ~(__a | __b);
4594 static vector short __ATTRS_o_ai vec_nor(vector short __a, vector short __b) {
4595 return ~(__a | __b);
4598 static vector unsigned short __ATTRS_o_ai vec_nor(vector unsigned short __a,
4599 vector unsigned short __b) {
4600 return ~(__a | __b);
4603 static vector bool short __ATTRS_o_ai vec_nor(vector bool short __a,
4604 vector bool short __b) {
4605 return ~(__a | __b);
4608 static vector int __ATTRS_o_ai vec_nor(vector int __a, vector int __b) {
4609 return ~(__a | __b);
4612 static vector unsigned int __ATTRS_o_ai vec_nor(vector unsigned int __a,
4613 vector unsigned int __b) {
4614 return ~(__a | __b);
4617 static vector bool int __ATTRS_o_ai vec_nor(vector bool int __a,
4618 vector bool int __b) {
4619 return ~(__a | __b);
4622 static vector float __ATTRS_o_ai vec_nor(vector float __a, vector float __b) {
4623 vector unsigned int __res =
4624 ~((vector unsigned int)__a | (vector unsigned int)__b);
4625 return (vector float)__res;
4629 static vector double __ATTRS_o_ai
4630 vec_nor(vector double __a, vector double __b) {
4631 vector unsigned long long __res =
4632 ~((vector unsigned long long)__a | (vector unsigned long long)__b);
4633 return (vector double)__res;
4639 static vector signed char __ATTRS_o_ai vec_vnor(vector signed char __a,
4640 vector signed char __b) {
4641 return ~(__a | __b);
4644 static vector unsigned char __ATTRS_o_ai vec_vnor(vector unsigned char __a,
4645 vector unsigned char __b) {
4646 return ~(__a | __b);
4649 static vector bool char __ATTRS_o_ai vec_vnor(vector bool char __a,
4650 vector bool char __b) {
4651 return ~(__a | __b);
4654 static vector short __ATTRS_o_ai vec_vnor(vector short __a, vector short __b) {
4655 return ~(__a | __b);
4658 static vector unsigned short __ATTRS_o_ai vec_vnor(vector unsigned short __a,
4659 vector unsigned short __b) {
4660 return ~(__a | __b);
4663 static vector bool short __ATTRS_o_ai vec_vnor(vector bool short __a,
4664 vector bool short __b) {
4665 return ~(__a | __b);
4668 static vector int __ATTRS_o_ai vec_vnor(vector int __a, vector int __b) {
4669 return ~(__a | __b);
4672 static vector unsigned int __ATTRS_o_ai vec_vnor(vector unsigned int __a,
4673 vector unsigned int __b) {
4674 return ~(__a | __b);
4677 static vector bool int __ATTRS_o_ai vec_vnor(vector bool int __a,
4678 vector bool int __b) {
4679 return ~(__a | __b);
4682 static vector float __ATTRS_o_ai vec_vnor(vector float __a, vector float __b) {
4683 vector unsigned int __res =
4684 ~((vector unsigned int)__a | (vector unsigned int)__b);
4685 return (vector float)__res;
4689 static vector signed long long __ATTRS_o_ai
4690 vec_nor(vector signed long long __a, vector signed long long __b) {
4691 return ~(__a | __b);
4694 static vector unsigned long long __ATTRS_o_ai
4695 vec_nor(vector unsigned long long __a, vector unsigned long long __b) {
4696 return ~(__a | __b);
4699 static vector bool long long __ATTRS_o_ai vec_nor(vector bool long long __a,
4700 vector bool long long __b) {
4701 return ~(__a | __b);
4707 #define __builtin_altivec_vor vec_or
4709 static vector signed char __ATTRS_o_ai vec_or(vector signed char __a,
4710 vector signed char __b) {
4714 static vector signed char __ATTRS_o_ai vec_or(vector bool char __a,
4715 vector signed char __b) {
4716 return (vector signed char)__a | __b;
4719 static vector signed char __ATTRS_o_ai vec_or(vector signed char __a,
4720 vector bool char __b) {
4721 return __a | (vector signed char)__b;
4724 static vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a,
4725 vector unsigned char __b) {
4729 static vector unsigned char __ATTRS_o_ai vec_or(vector bool char __a,
4730 vector unsigned char __b) {
4731 return (vector unsigned char)__a | __b;
4734 static vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a,
4735 vector bool char __b) {
4736 return __a | (vector unsigned char)__b;
4739 static vector bool char __ATTRS_o_ai vec_or(vector bool char __a,
4740 vector bool char __b) {
4744 static vector short __ATTRS_o_ai vec_or(vector short __a, vector short __b) {
4748 static vector short __ATTRS_o_ai vec_or(vector bool short __a,
4750 return (vector short)__a | __b;
4753 static vector short __ATTRS_o_ai vec_or(vector short __a,
4754 vector bool short __b) {
4755 return __a | (vector short)__b;
4758 static vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a,
4759 vector unsigned short __b) {
4763 static vector unsigned short __ATTRS_o_ai vec_or(vector bool short __a,
4764 vector unsigned short __b) {
4765 return (vector unsigned short)__a | __b;
4768 static vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a,
4769 vector bool short __b) {
4770 return __a | (vector unsigned short)__b;
4773 static vector bool short __ATTRS_o_ai vec_or(vector bool short __a,
4774 vector bool short __b) {
4778 static vector int __ATTRS_o_ai vec_or(vector int __a, vector int __b) {
4782 static vector int __ATTRS_o_ai vec_or(vector bool int __a, vector int __b) {
4783 return (vector int)__a | __b;
4786 static vector int __ATTRS_o_ai vec_or(vector int __a, vector bool int __b) {
4787 return __a | (vector int)__b;
4790 static vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a,
4791 vector unsigned int __b) {
4795 static vector unsigned int __ATTRS_o_ai vec_or(vector bool int __a,
4796 vector unsigned int __b) {
4797 return (vector unsigned int)__a | __b;
4800 static vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a,
4801 vector bool int __b) {
4802 return __a | (vector unsigned int)__b;
4805 static vector bool int __ATTRS_o_ai vec_or(vector bool int __a,
4806 vector bool int __b) {
4810 static vector float __ATTRS_o_ai vec_or(vector float __a, vector float __b) {
4811 vector unsigned int __res =
4812 (vector unsigned int)__a | (vector unsigned int)__b;
4813 return (vector float)__res;
4816 static vector float __ATTRS_o_ai vec_or(vector bool int __a, vector float __b) {
4817 vector unsigned int __res =
4818 (vector unsigned int)__a | (vector unsigned int)__b;
4819 return (vector float)__res;
4822 static vector float __ATTRS_o_ai vec_or(vector float __a, vector bool int __b) {
4823 vector unsigned int __res =
4824 (vector unsigned int)__a | (vector unsigned int)__b;
4825 return (vector float)__res;
4829 static vector double __ATTRS_o_ai vec_or(vector bool long long __a,
4830 vector double __b) {
4831 return (vector unsigned long long)__a | (vector unsigned long long)__b;
4834 static vector double __ATTRS_o_ai vec_or(vector double __a,
4835 vector bool long long __b) {
4836 return (vector unsigned long long)__a | (vector unsigned long long)__b;
4839 static vector double __ATTRS_o_ai vec_or(vector double __a, vector double __b) {
4840 vector unsigned long long __res =
4841 (vector unsigned long long)__a | (vector unsigned long long)__b;
4842 return (vector double)__res;
4845 static vector signed long long __ATTRS_o_ai
4846 vec_or(vector signed long long __a, vector signed long long __b) {
4850 static vector signed long long __ATTRS_o_ai
4851 vec_or(vector bool long long __a, vector signed long long __b) {
4852 return (vector signed long long)__a | __b;
4855 static vector signed long long __ATTRS_o_ai vec_or(vector signed long long __a,
4856 vector bool long long __b) {
4857 return __a | (vector signed long long)__b;
4860 static vector unsigned long long __ATTRS_o_ai
4861 vec_or(vector unsigned long long __a, vector unsigned long long __b) {
4865 static vector unsigned long long __ATTRS_o_ai
4866 vec_or(vector bool long long __a, vector unsigned long long __b) {
4867 return (vector unsigned long long)__a | __b;
4870 static vector unsigned long long __ATTRS_o_ai
4871 vec_or(vector unsigned long long __a, vector bool long long __b) {
4872 return __a | (vector unsigned long long)__b;
4875 static vector bool long long __ATTRS_o_ai vec_or(vector bool long long __a,
4876 vector bool long long __b) {
4881 #ifdef __POWER8_VECTOR__
4882 static vector signed char __ATTRS_o_ai vec_orc(vector signed char __a,
4883 vector signed char __b) {
4887 static vector signed char __ATTRS_o_ai vec_orc(vector signed char __a,
4888 vector bool char __b) {
4892 static vector signed char __ATTRS_o_ai vec_orc(vector bool char __a,
4893 vector signed char __b) {
4897 static vector unsigned char __ATTRS_o_ai vec_orc(vector unsigned char __a,
4898 vector unsigned char __b) {
4902 static vector unsigned char __ATTRS_o_ai vec_orc(vector unsigned char __a,
4903 vector bool char __b) {
4907 static vector unsigned char __ATTRS_o_ai vec_orc(vector bool char __a,
4908 vector unsigned char __b) {
4912 static vector signed short __ATTRS_o_ai vec_orc(vector signed short __a,
4913 vector signed short __b) {
4917 static vector signed short __ATTRS_o_ai vec_orc(vector signed short __a,
4918 vector bool short __b) {
4922 static vector signed short __ATTRS_o_ai vec_orc(vector bool short __a,
4923 vector signed short __b) {
4927 static vector unsigned short __ATTRS_o_ai vec_orc(vector unsigned short __a,
4928 vector unsigned short __b) {
4932 static vector unsigned short __ATTRS_o_ai vec_orc(vector unsigned short __a,
4933 vector bool short __b) {
4937 static vector unsigned short __ATTRS_o_ai
4938 vec_orc(vector bool short __a, vector unsigned short __b) {
4942 static vector signed int __ATTRS_o_ai vec_orc(vector signed int __a,
4943 vector signed int __b) {
4947 static vector signed int __ATTRS_o_ai vec_orc(vector signed int __a,
4948 vector bool int __b) {
4952 static vector signed int __ATTRS_o_ai vec_orc(vector bool int __a,
4953 vector signed int __b) {
4957 static vector unsigned int __ATTRS_o_ai vec_orc(vector unsigned int __a,
4958 vector unsigned int __b) {
4962 static vector unsigned int __ATTRS_o_ai vec_orc(vector unsigned int __a,
4963 vector bool int __b) {
4967 static vector unsigned int __ATTRS_o_ai vec_orc(vector bool int __a,
4968 vector unsigned int __b) {
4972 static vector signed long long __ATTRS_o_ai
4973 vec_orc(vector signed long long __a, vector signed long long __b) {
4977 static vector signed long long __ATTRS_o_ai vec_orc(vector signed long long __a,
4978 vector bool long long __b) {
4982 static vector signed long long __ATTRS_o_ai
4983 vec_orc(vector bool long long __a, vector signed long long __b) {
4987 static vector unsigned long long __ATTRS_o_ai
4988 vec_orc(vector unsigned long long __a, vector unsigned long long __b) {
4992 static vector unsigned long long __ATTRS_o_ai
4993 vec_orc(vector unsigned long long __a, vector bool long long __b) {
4997 static vector unsigned long long __ATTRS_o_ai
4998 vec_orc(vector bool long long __a, vector unsigned long long __b) {
5005 static vector signed char __ATTRS_o_ai vec_vor(vector signed char __a,
5006 vector signed char __b) {
5010 static vector signed char __ATTRS_o_ai vec_vor(vector bool char __a,
5011 vector signed char __b) {
5012 return (vector signed char)__a | __b;
5015 static vector signed char __ATTRS_o_ai vec_vor(vector signed char __a,
5016 vector bool char __b) {
5017 return __a | (vector signed char)__b;
5020 static vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a,
5021 vector unsigned char __b) {
5025 static vector unsigned char __ATTRS_o_ai vec_vor(vector bool char __a,
5026 vector unsigned char __b) {
5027 return (vector unsigned char)__a | __b;
5030 static vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a,
5031 vector bool char __b) {
5032 return __a | (vector unsigned char)__b;
5035 static vector bool char __ATTRS_o_ai vec_vor(vector bool char __a,
5036 vector bool char __b) {
5040 static vector short __ATTRS_o_ai vec_vor(vector short __a, vector short __b) {
5044 static vector short __ATTRS_o_ai vec_vor(vector bool short __a,
5046 return (vector short)__a | __b;
5049 static vector short __ATTRS_o_ai vec_vor(vector short __a,
5050 vector bool short __b) {
5051 return __a | (vector short)__b;
5054 static vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a,
5055 vector unsigned short __b) {
5059 static vector unsigned short __ATTRS_o_ai vec_vor(vector bool short __a,
5060 vector unsigned short __b) {
5061 return (vector unsigned short)__a | __b;
5064 static vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a,
5065 vector bool short __b) {
5066 return __a | (vector unsigned short)__b;
5069 static vector bool short __ATTRS_o_ai vec_vor(vector bool short __a,
5070 vector bool short __b) {
5074 static vector int __ATTRS_o_ai vec_vor(vector int __a, vector int __b) {
5078 static vector int __ATTRS_o_ai vec_vor(vector bool int __a, vector int __b) {
5079 return (vector int)__a | __b;
5082 static vector int __ATTRS_o_ai vec_vor(vector int __a, vector bool int __b) {
5083 return __a | (vector int)__b;
5086 static vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a,
5087 vector unsigned int __b) {
5091 static vector unsigned int __ATTRS_o_ai vec_vor(vector bool int __a,
5092 vector unsigned int __b) {
5093 return (vector unsigned int)__a | __b;
5096 static vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a,
5097 vector bool int __b) {
5098 return __a | (vector unsigned int)__b;
5101 static vector bool int __ATTRS_o_ai vec_vor(vector bool int __a,
5102 vector bool int __b) {
5106 static vector float __ATTRS_o_ai vec_vor(vector float __a, vector float __b) {
5107 vector unsigned int __res =
5108 (vector unsigned int)__a | (vector unsigned int)__b;
5109 return (vector float)__res;
5112 static vector float __ATTRS_o_ai vec_vor(vector bool int __a,
5114 vector unsigned int __res =
5115 (vector unsigned int)__a | (vector unsigned int)__b;
5116 return (vector float)__res;
5119 static vector float __ATTRS_o_ai vec_vor(vector float __a,
5120 vector bool int __b) {
5121 vector unsigned int __res =
5122 (vector unsigned int)__a | (vector unsigned int)__b;
5123 return (vector float)__res;
5127 static vector signed long long __ATTRS_o_ai
5128 vec_vor(vector signed long long __a, vector signed long long __b) {
5132 static vector signed long long __ATTRS_o_ai
5133 vec_vor(vector bool long long __a, vector signed long long __b) {
5134 return (vector signed long long)__a | __b;
5137 static vector signed long long __ATTRS_o_ai vec_vor(vector signed long long __a,
5138 vector bool long long __b) {
5139 return __a | (vector signed long long)__b;
5142 static vector unsigned long long __ATTRS_o_ai
5143 vec_vor(vector unsigned long long __a, vector unsigned long long __b) {
5147 static vector unsigned long long __ATTRS_o_ai
5148 vec_vor(vector bool long long __a, vector unsigned long long __b) {
5149 return (vector unsigned long long)__a | __b;
5152 static vector unsigned long long __ATTRS_o_ai
5153 vec_vor(vector unsigned long long __a, vector bool long long __b) {
5154 return __a | (vector unsigned long long)__b;
5157 static vector bool long long __ATTRS_o_ai vec_vor(vector bool long long __a,
5158 vector bool long long __b) {
5165 /* The various vector pack instructions have a big-endian bias, so for
5166 little endian we must handle reversed element numbering. */
5168 static vector signed char __ATTRS_o_ai vec_pack(vector signed short __a,
5169 vector signed short __b) {
5170 #ifdef __LITTLE_ENDIAN__
5171 return (vector signed char)vec_perm(
5173 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5174 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5176 return (vector signed char)vec_perm(
5178 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5179 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5183 static vector unsigned char __ATTRS_o_ai vec_pack(vector unsigned short __a,
5184 vector unsigned short __b) {
5185 #ifdef __LITTLE_ENDIAN__
5186 return (vector unsigned char)vec_perm(
5188 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5189 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5191 return (vector unsigned char)vec_perm(
5193 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5194 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5198 static vector bool char __ATTRS_o_ai vec_pack(vector bool short __a,
5199 vector bool short __b) {
5200 #ifdef __LITTLE_ENDIAN__
5201 return (vector bool char)vec_perm(
5203 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5204 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5206 return (vector bool char)vec_perm(
5208 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5209 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5213 static vector short __ATTRS_o_ai vec_pack(vector int __a, vector int __b) {
5214 #ifdef __LITTLE_ENDIAN__
5215 return (vector short)vec_perm(
5217 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5218 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5220 return (vector short)vec_perm(
5222 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5223 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5227 static vector unsigned short __ATTRS_o_ai vec_pack(vector unsigned int __a,
5228 vector unsigned int __b) {
5229 #ifdef __LITTLE_ENDIAN__
5230 return (vector unsigned short)vec_perm(
5232 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5233 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5235 return (vector unsigned short)vec_perm(
5237 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5238 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5242 static vector bool short __ATTRS_o_ai vec_pack(vector bool int __a,
5243 vector bool int __b) {
5244 #ifdef __LITTLE_ENDIAN__
5245 return (vector bool short)vec_perm(
5247 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5248 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5250 return (vector bool short)vec_perm(
5252 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5253 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5258 static vector signed int __ATTRS_o_ai vec_pack(vector signed long long __a,
5259 vector signed long long __b) {
5260 #ifdef __LITTLE_ENDIAN__
5261 return (vector signed int)vec_perm(
5263 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5264 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5266 return (vector signed int)vec_perm(
5268 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5269 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5272 static vector unsigned int __ATTRS_o_ai
5273 vec_pack(vector unsigned long long __a, vector unsigned long long __b) {
5274 #ifdef __LITTLE_ENDIAN__
5275 return (vector unsigned int)vec_perm(
5277 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5278 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5280 return (vector unsigned int)vec_perm(
5282 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5283 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5287 static vector bool int __ATTRS_o_ai vec_pack(vector bool long long __a,
5288 vector bool long long __b) {
5289 #ifdef __LITTLE_ENDIAN__
5290 return (vector bool int)vec_perm(
5292 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5293 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5295 return (vector bool int)vec_perm(
5297 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5298 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5306 #define __builtin_altivec_vpkuhum vec_vpkuhum
5308 static vector signed char __ATTRS_o_ai vec_vpkuhum(vector signed short __a,
5309 vector signed short __b) {
5310 #ifdef __LITTLE_ENDIAN__
5311 return (vector signed char)vec_perm(
5313 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5314 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5316 return (vector signed char)vec_perm(
5318 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5319 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5323 static vector unsigned char __ATTRS_o_ai
5324 vec_vpkuhum(vector unsigned short __a, vector unsigned short __b) {
5325 #ifdef __LITTLE_ENDIAN__
5326 return (vector unsigned char)vec_perm(
5328 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5329 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5331 return (vector unsigned char)vec_perm(
5333 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5334 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5338 static vector bool char __ATTRS_o_ai vec_vpkuhum(vector bool short __a,
5339 vector bool short __b) {
5340 #ifdef __LITTLE_ENDIAN__
5341 return (vector bool char)vec_perm(
5343 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5344 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5346 return (vector bool char)vec_perm(
5348 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5349 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5355 #define __builtin_altivec_vpkuwum vec_vpkuwum
5357 static vector short __ATTRS_o_ai vec_vpkuwum(vector int __a, vector int __b) {
5358 #ifdef __LITTLE_ENDIAN__
5359 return (vector short)vec_perm(
5361 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5362 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5364 return (vector short)vec_perm(
5366 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5367 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5371 static vector unsigned short __ATTRS_o_ai vec_vpkuwum(vector unsigned int __a,
5372 vector unsigned int __b) {
5373 #ifdef __LITTLE_ENDIAN__
5374 return (vector unsigned short)vec_perm(
5376 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5377 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5379 return (vector unsigned short)vec_perm(
5381 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5382 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5386 static vector bool short __ATTRS_o_ai vec_vpkuwum(vector bool int __a,
5387 vector bool int __b) {
5388 #ifdef __LITTLE_ENDIAN__
5389 return (vector bool short)vec_perm(
5391 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5392 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5394 return (vector bool short)vec_perm(
5396 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5397 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5403 #ifdef __POWER8_VECTOR__
5404 #define __builtin_altivec_vpkudum vec_vpkudum
5406 static vector int __ATTRS_o_ai vec_vpkudum(vector long long __a,
5407 vector long long __b) {
5408 #ifdef __LITTLE_ENDIAN__
5409 return (vector int)vec_perm(
5411 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5412 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5414 return (vector int)vec_perm(
5416 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5417 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5421 static vector unsigned int __ATTRS_o_ai
5422 vec_vpkudum(vector unsigned long long __a, vector unsigned long long __b) {
5423 #ifdef __LITTLE_ENDIAN__
5424 return (vector unsigned int)vec_perm(
5426 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5427 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5429 return (vector unsigned int)vec_perm(
5431 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5432 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5436 static vector bool int __ATTRS_o_ai vec_vpkudum(vector bool long long __a,
5437 vector bool long long __b) {
5438 #ifdef __LITTLE_ENDIAN__
5439 return (vector bool int)vec_perm(
5440 (vector long long)__a, (vector long long)__b,
5441 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5442 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5444 return (vector bool int)vec_perm(
5445 (vector long long)__a, (vector long long)__b,
5446 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5447 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5454 static vector pixel __attribute__((__always_inline__))
5455 vec_packpx(vector unsigned int __a, vector unsigned int __b) {
5456 #ifdef __LITTLE_ENDIAN__
5457 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
5459 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
5465 static vector pixel __attribute__((__always_inline__))
5466 vec_vpkpx(vector unsigned int __a, vector unsigned int __b) {
5467 #ifdef __LITTLE_ENDIAN__
5468 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
5470 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
5476 static vector signed char __ATTRS_o_ai vec_packs(vector short __a,
5478 #ifdef __LITTLE_ENDIAN__
5479 return __builtin_altivec_vpkshss(__b, __a);
5481 return __builtin_altivec_vpkshss(__a, __b);
5485 static vector unsigned char __ATTRS_o_ai vec_packs(vector unsigned short __a,
5486 vector unsigned short __b) {
5487 #ifdef __LITTLE_ENDIAN__
5488 return __builtin_altivec_vpkuhus(__b, __a);
5490 return __builtin_altivec_vpkuhus(__a, __b);
5494 static vector signed short __ATTRS_o_ai vec_packs(vector int __a,
5496 #ifdef __LITTLE_ENDIAN__
5497 return __builtin_altivec_vpkswss(__b, __a);
5499 return __builtin_altivec_vpkswss(__a, __b);
5503 static vector unsigned short __ATTRS_o_ai vec_packs(vector unsigned int __a,
5504 vector unsigned int __b) {
5505 #ifdef __LITTLE_ENDIAN__
5506 return __builtin_altivec_vpkuwus(__b, __a);
5508 return __builtin_altivec_vpkuwus(__a, __b);
5512 #ifdef __POWER8_VECTOR__
5513 static vector int __ATTRS_o_ai vec_packs(vector long long __a,
5514 vector long long __b) {
5515 #ifdef __LITTLE_ENDIAN__
5516 return __builtin_altivec_vpksdss(__b, __a);
5518 return __builtin_altivec_vpksdss(__a, __b);
5522 static vector unsigned int __ATTRS_o_ai
5523 vec_packs(vector unsigned long long __a, vector unsigned long long __b) {
5524 #ifdef __LITTLE_ENDIAN__
5525 return __builtin_altivec_vpkudus(__b, __a);
5527 return __builtin_altivec_vpkudus(__a, __b);
5534 static vector signed char __attribute__((__always_inline__))
5535 vec_vpkshss(vector short __a, vector short __b) {
5536 #ifdef __LITTLE_ENDIAN__
5537 return __builtin_altivec_vpkshss(__b, __a);
5539 return __builtin_altivec_vpkshss(__a, __b);
5545 #ifdef __POWER8_VECTOR__
5546 static vector int __ATTRS_o_ai vec_vpksdss(vector long long __a,
5547 vector long long __b) {
5548 #ifdef __LITTLE_ENDIAN__
5549 return __builtin_altivec_vpksdss(__b, __a);
5551 return __builtin_altivec_vpksdss(__a, __b);
5558 static vector unsigned char __attribute__((__always_inline__))
5559 vec_vpkuhus(vector unsigned short __a, vector unsigned short __b) {
5560 #ifdef __LITTLE_ENDIAN__
5561 return __builtin_altivec_vpkuhus(__b, __a);
5563 return __builtin_altivec_vpkuhus(__a, __b);
5569 #ifdef __POWER8_VECTOR__
5570 static vector unsigned int __attribute__((__always_inline__))
5571 vec_vpkudus(vector unsigned long long __a, vector unsigned long long __b) {
5572 #ifdef __LITTLE_ENDIAN__
5573 return __builtin_altivec_vpkudus(__b, __a);
5575 return __builtin_altivec_vpkudus(__a, __b);
5582 static vector signed short __attribute__((__always_inline__))
5583 vec_vpkswss(vector int __a, vector int __b) {
5584 #ifdef __LITTLE_ENDIAN__
5585 return __builtin_altivec_vpkswss(__b, __a);
5587 return __builtin_altivec_vpkswss(__a, __b);
5593 static vector unsigned short __attribute__((__always_inline__))
5594 vec_vpkuwus(vector unsigned int __a, vector unsigned int __b) {
5595 #ifdef __LITTLE_ENDIAN__
5596 return __builtin_altivec_vpkuwus(__b, __a);
5598 return __builtin_altivec_vpkuwus(__a, __b);
5604 static vector unsigned char __ATTRS_o_ai vec_packsu(vector short __a,
5606 #ifdef __LITTLE_ENDIAN__
5607 return __builtin_altivec_vpkshus(__b, __a);
5609 return __builtin_altivec_vpkshus(__a, __b);
5613 static vector unsigned char __ATTRS_o_ai vec_packsu(vector unsigned short __a,
5614 vector unsigned short __b) {
5615 #ifdef __LITTLE_ENDIAN__
5616 return __builtin_altivec_vpkuhus(__b, __a);
5618 return __builtin_altivec_vpkuhus(__a, __b);
5622 static vector unsigned short __ATTRS_o_ai vec_packsu(vector int __a,
5624 #ifdef __LITTLE_ENDIAN__
5625 return __builtin_altivec_vpkswus(__b, __a);
5627 return __builtin_altivec_vpkswus(__a, __b);
5631 static vector unsigned short __ATTRS_o_ai vec_packsu(vector unsigned int __a,
5632 vector unsigned int __b) {
5633 #ifdef __LITTLE_ENDIAN__
5634 return __builtin_altivec_vpkuwus(__b, __a);
5636 return __builtin_altivec_vpkuwus(__a, __b);
5640 #ifdef __POWER8_VECTOR__
5641 static vector unsigned int __ATTRS_o_ai vec_packsu(vector long long __a,
5642 vector long long __b) {
5643 #ifdef __LITTLE_ENDIAN__
5644 return __builtin_altivec_vpksdus(__b, __a);
5646 return __builtin_altivec_vpksdus(__a, __b);
5650 static vector unsigned int __ATTRS_o_ai
5651 vec_packsu(vector unsigned long long __a, vector unsigned long long __b) {
5652 #ifdef __LITTLE_ENDIAN__
5653 return __builtin_altivec_vpkudus(__b, __a);
5655 return __builtin_altivec_vpkudus(__a, __b);
5662 static vector unsigned char __ATTRS_o_ai vec_vpkshus(vector short __a,
5664 #ifdef __LITTLE_ENDIAN__
5665 return __builtin_altivec_vpkshus(__b, __a);
5667 return __builtin_altivec_vpkshus(__a, __b);
5671 static vector unsigned char __ATTRS_o_ai
5672 vec_vpkshus(vector unsigned short __a, vector unsigned short __b) {
5673 #ifdef __LITTLE_ENDIAN__
5674 return __builtin_altivec_vpkuhus(__b, __a);
5676 return __builtin_altivec_vpkuhus(__a, __b);
5682 static vector unsigned short __ATTRS_o_ai vec_vpkswus(vector int __a,
5684 #ifdef __LITTLE_ENDIAN__
5685 return __builtin_altivec_vpkswus(__b, __a);
5687 return __builtin_altivec_vpkswus(__a, __b);
5691 static vector unsigned short __ATTRS_o_ai vec_vpkswus(vector unsigned int __a,
5692 vector unsigned int __b) {
5693 #ifdef __LITTLE_ENDIAN__
5694 return __builtin_altivec_vpkuwus(__b, __a);
5696 return __builtin_altivec_vpkuwus(__a, __b);
5702 #ifdef __POWER8_VECTOR__
5703 static vector unsigned int __ATTRS_o_ai vec_vpksdus(vector long long __a,
5704 vector long long __b) {
5705 #ifdef __LITTLE_ENDIAN__
5706 return __builtin_altivec_vpksdus(__b, __a);
5708 return __builtin_altivec_vpksdus(__a, __b);
5715 // The vperm instruction is defined architecturally with a big-endian bias.
5716 // For little endian, we swap the input operands and invert the permute
5717 // control vector. Only the rightmost 5 bits matter, so we could use
5718 // a vector of all 31s instead of all 255s to perform the inversion.
5719 // However, when the PCV is not a constant, using 255 has an advantage
5720 // in that the vec_xor can be recognized as a vec_nor (and for P8 and
5721 // later, possibly a vec_nand).
5723 static vector signed char __ATTRS_o_ai vec_perm(vector signed char __a,
5724 vector signed char __b,
5725 vector unsigned char __c) {
5726 #ifdef __LITTLE_ENDIAN__
5727 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5728 255, 255, 255, 255, 255, 255, 255, 255};
5729 __d = vec_xor(__c, __d);
5730 return (vector signed char)__builtin_altivec_vperm_4si((vector int)__b,
5731 (vector int)__a, __d);
5733 return (vector signed char)__builtin_altivec_vperm_4si((vector int)__a,
5734 (vector int)__b, __c);
5738 static vector unsigned char __ATTRS_o_ai vec_perm(vector unsigned char __a,
5739 vector unsigned char __b,
5740 vector unsigned char __c) {
5741 #ifdef __LITTLE_ENDIAN__
5742 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5743 255, 255, 255, 255, 255, 255, 255, 255};
5744 __d = vec_xor(__c, __d);
5745 return (vector unsigned char)__builtin_altivec_vperm_4si(
5746 (vector int)__b, (vector int)__a, __d);
5748 return (vector unsigned char)__builtin_altivec_vperm_4si(
5749 (vector int)__a, (vector int)__b, __c);
5753 static vector bool char __ATTRS_o_ai vec_perm(vector bool char __a,
5754 vector bool char __b,
5755 vector unsigned char __c) {
5756 #ifdef __LITTLE_ENDIAN__
5757 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5758 255, 255, 255, 255, 255, 255, 255, 255};
5759 __d = vec_xor(__c, __d);
5760 return (vector bool char)__builtin_altivec_vperm_4si((vector int)__b,
5761 (vector int)__a, __d);
5763 return (vector bool char)__builtin_altivec_vperm_4si((vector int)__a,
5764 (vector int)__b, __c);
5768 static vector short __ATTRS_o_ai vec_perm(vector signed short __a,
5769 vector signed short __b,
5770 vector unsigned char __c) {
5771 #ifdef __LITTLE_ENDIAN__
5772 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5773 255, 255, 255, 255, 255, 255, 255, 255};
5774 __d = vec_xor(__c, __d);
5775 return (vector signed short)__builtin_altivec_vperm_4si((vector int)__b,
5776 (vector int)__a, __d);
5778 return (vector signed short)__builtin_altivec_vperm_4si((vector int)__a,
5779 (vector int)__b, __c);
5783 static vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a,
5784 vector unsigned short __b,
5785 vector unsigned char __c) {
5786 #ifdef __LITTLE_ENDIAN__
5787 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5788 255, 255, 255, 255, 255, 255, 255, 255};
5789 __d = vec_xor(__c, __d);
5790 return (vector unsigned short)__builtin_altivec_vperm_4si(
5791 (vector int)__b, (vector int)__a, __d);
5793 return (vector unsigned short)__builtin_altivec_vperm_4si(
5794 (vector int)__a, (vector int)__b, __c);
5798 static vector bool short __ATTRS_o_ai vec_perm(vector bool short __a,
5799 vector bool short __b,
5800 vector unsigned char __c) {
5801 #ifdef __LITTLE_ENDIAN__
5802 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5803 255, 255, 255, 255, 255, 255, 255, 255};
5804 __d = vec_xor(__c, __d);
5805 return (vector bool short)__builtin_altivec_vperm_4si((vector int)__b,
5806 (vector int)__a, __d);
5808 return (vector bool short)__builtin_altivec_vperm_4si((vector int)__a,
5809 (vector int)__b, __c);
5813 static vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b,
5814 vector unsigned char __c) {
5815 #ifdef __LITTLE_ENDIAN__
5816 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5817 255, 255, 255, 255, 255, 255, 255, 255};
5818 __d = vec_xor(__c, __d);
5819 return (vector pixel)__builtin_altivec_vperm_4si((vector int)__b,
5820 (vector int)__a, __d);
5822 return (vector pixel)__builtin_altivec_vperm_4si((vector int)__a,
5823 (vector int)__b, __c);
5827 static vector int __ATTRS_o_ai vec_perm(vector signed int __a,
5828 vector signed int __b,
5829 vector unsigned char __c) {
5830 #ifdef __LITTLE_ENDIAN__
5831 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5832 255, 255, 255, 255, 255, 255, 255, 255};
5833 __d = vec_xor(__c, __d);
5834 return (vector signed int)__builtin_altivec_vperm_4si(__b, __a, __d);
5836 return (vector signed int)__builtin_altivec_vperm_4si(__a, __b, __c);
5840 static vector unsigned int __ATTRS_o_ai vec_perm(vector unsigned int __a,
5841 vector unsigned int __b,
5842 vector unsigned char __c) {
5843 #ifdef __LITTLE_ENDIAN__
5844 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5845 255, 255, 255, 255, 255, 255, 255, 255};
5846 __d = vec_xor(__c, __d);
5847 return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__b,
5848 (vector int)__a, __d);
5850 return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__a,
5851 (vector int)__b, __c);
5855 static vector bool int __ATTRS_o_ai vec_perm(vector bool int __a,
5856 vector bool int __b,
5857 vector unsigned char __c) {
5858 #ifdef __LITTLE_ENDIAN__
5859 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5860 255, 255, 255, 255, 255, 255, 255, 255};
5861 __d = vec_xor(__c, __d);
5862 return (vector bool int)__builtin_altivec_vperm_4si((vector int)__b,
5863 (vector int)__a, __d);
5865 return (vector bool int)__builtin_altivec_vperm_4si((vector int)__a,
5866 (vector int)__b, __c);
5870 static vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b,
5871 vector unsigned char __c) {
5872 #ifdef __LITTLE_ENDIAN__
5873 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5874 255, 255, 255, 255, 255, 255, 255, 255};
5875 __d = vec_xor(__c, __d);
5876 return (vector float)__builtin_altivec_vperm_4si((vector int)__b,
5877 (vector int)__a, __d);
5879 return (vector float)__builtin_altivec_vperm_4si((vector int)__a,
5880 (vector int)__b, __c);
5885 static vector long long __ATTRS_o_ai vec_perm(vector signed long long __a,
5886 vector signed long long __b,
5887 vector unsigned char __c) {
5888 #ifdef __LITTLE_ENDIAN__
5889 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5890 255, 255, 255, 255, 255, 255, 255, 255};
5891 __d = vec_xor(__c, __d);
5892 return (vector signed long long)__builtin_altivec_vperm_4si(
5893 (vector int)__b, (vector int)__a, __d);
5895 return (vector signed long long)__builtin_altivec_vperm_4si(
5896 (vector int)__a, (vector int)__b, __c);
5900 static vector unsigned long long __ATTRS_o_ai
5901 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
5902 vector unsigned char __c) {
5903 #ifdef __LITTLE_ENDIAN__
5904 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5905 255, 255, 255, 255, 255, 255, 255, 255};
5906 __d = vec_xor(__c, __d);
5907 return (vector unsigned long long)__builtin_altivec_vperm_4si(
5908 (vector int)__b, (vector int)__a, __d);
5910 return (vector unsigned long long)__builtin_altivec_vperm_4si(
5911 (vector int)__a, (vector int)__b, __c);
5915 static vector bool long long __ATTRS_o_ai
5916 vec_perm(vector bool long long __a, vector bool long long __b,
5917 vector unsigned char __c) {
5918 #ifdef __LITTLE_ENDIAN__
5919 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5920 255, 255, 255, 255, 255, 255, 255, 255};
5921 __d = vec_xor(__c, __d);
5922 return (vector bool long long)__builtin_altivec_vperm_4si(
5923 (vector int)__b, (vector int)__a, __d);
5925 return (vector bool long long)__builtin_altivec_vperm_4si(
5926 (vector int)__a, (vector int)__b, __c);
5930 static vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b,
5931 vector unsigned char __c) {
5932 #ifdef __LITTLE_ENDIAN__
5933 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5934 255, 255, 255, 255, 255, 255, 255, 255};
5935 __d = vec_xor(__c, __d);
5936 return (vector double)__builtin_altivec_vperm_4si((vector int)__b,
5937 (vector int)__a, __d);
5939 return (vector double)__builtin_altivec_vperm_4si((vector int)__a,
5940 (vector int)__b, __c);
5947 static vector signed char __ATTRS_o_ai vec_vperm(vector signed char __a,
5948 vector signed char __b,
5949 vector unsigned char __c) {
5950 return vec_perm(__a, __b, __c);
5953 static vector unsigned char __ATTRS_o_ai vec_vperm(vector unsigned char __a,
5954 vector unsigned char __b,
5955 vector unsigned char __c) {
5956 return vec_perm(__a, __b, __c);
5959 static vector bool char __ATTRS_o_ai vec_vperm(vector bool char __a,
5960 vector bool char __b,
5961 vector unsigned char __c) {
5962 return vec_perm(__a, __b, __c);
5965 static vector short __ATTRS_o_ai vec_vperm(vector short __a, vector short __b,
5966 vector unsigned char __c) {
5967 return vec_perm(__a, __b, __c);
5970 static vector unsigned short __ATTRS_o_ai vec_vperm(vector unsigned short __a,
5971 vector unsigned short __b,
5972 vector unsigned char __c) {
5973 return vec_perm(__a, __b, __c);
5976 static vector bool short __ATTRS_o_ai vec_vperm(vector bool short __a,
5977 vector bool short __b,
5978 vector unsigned char __c) {
5979 return vec_perm(__a, __b, __c);
5982 static vector pixel __ATTRS_o_ai vec_vperm(vector pixel __a, vector pixel __b,
5983 vector unsigned char __c) {
5984 return vec_perm(__a, __b, __c);
5987 static vector int __ATTRS_o_ai vec_vperm(vector int __a, vector int __b,
5988 vector unsigned char __c) {
5989 return vec_perm(__a, __b, __c);
5992 static vector unsigned int __ATTRS_o_ai vec_vperm(vector unsigned int __a,
5993 vector unsigned int __b,
5994 vector unsigned char __c) {
5995 return vec_perm(__a, __b, __c);
5998 static vector bool int __ATTRS_o_ai vec_vperm(vector bool int __a,
5999 vector bool int __b,
6000 vector unsigned char __c) {
6001 return vec_perm(__a, __b, __c);
6004 static vector float __ATTRS_o_ai vec_vperm(vector float __a, vector float __b,
6005 vector unsigned char __c) {
6006 return vec_perm(__a, __b, __c);
6010 static vector long long __ATTRS_o_ai vec_vperm(vector long long __a,
6011 vector long long __b,
6012 vector unsigned char __c) {
6013 return vec_perm(__a, __b, __c);
6016 static vector unsigned long long __ATTRS_o_ai
6017 vec_vperm(vector unsigned long long __a, vector unsigned long long __b,
6018 vector unsigned char __c) {
6019 return vec_perm(__a, __b, __c);
6022 static vector double __ATTRS_o_ai vec_vperm(vector double __a,
6024 vector unsigned char __c) {
6025 return vec_perm(__a, __b, __c);
6031 static vector float __ATTRS_o_ai
6032 vec_re(vector float __a) {
6034 return __builtin_vsx_xvresp(__a);
6036 return __builtin_altivec_vrefp(__a);
6041 static vector double __ATTRS_o_ai vec_re(vector double __a) {
6042 return __builtin_vsx_xvredp(__a);
6048 static vector float __attribute__((__always_inline__))
6049 vec_vrefp(vector float __a) {
6050 return __builtin_altivec_vrefp(__a);
6055 static vector signed char __ATTRS_o_ai vec_rl(vector signed char __a,
6056 vector unsigned char __b) {
6057 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
6060 static vector unsigned char __ATTRS_o_ai vec_rl(vector unsigned char __a,
6061 vector unsigned char __b) {
6062 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
6065 static vector short __ATTRS_o_ai vec_rl(vector short __a,
6066 vector unsigned short __b) {
6067 return __builtin_altivec_vrlh(__a, __b);
6070 static vector unsigned short __ATTRS_o_ai vec_rl(vector unsigned short __a,
6071 vector unsigned short __b) {
6072 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
6075 static vector int __ATTRS_o_ai vec_rl(vector int __a, vector unsigned int __b) {
6076 return __builtin_altivec_vrlw(__a, __b);
6079 static vector unsigned int __ATTRS_o_ai vec_rl(vector unsigned int __a,
6080 vector unsigned int __b) {
6081 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
6084 #ifdef __POWER8_VECTOR__
6085 static vector signed long long __ATTRS_o_ai
6086 vec_rl(vector signed long long __a, vector unsigned long long __b) {
6087 return __builtin_altivec_vrld(__a, __b);
6090 static vector unsigned long long __ATTRS_o_ai
6091 vec_rl(vector unsigned long long __a, vector unsigned long long __b) {
6092 return __builtin_altivec_vrld(__a, __b);
6098 static vector signed char __ATTRS_o_ai vec_vrlb(vector signed char __a,
6099 vector unsigned char __b) {
6100 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
6103 static vector unsigned char __ATTRS_o_ai vec_vrlb(vector unsigned char __a,
6104 vector unsigned char __b) {
6105 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
6110 static vector short __ATTRS_o_ai vec_vrlh(vector short __a,
6111 vector unsigned short __b) {
6112 return __builtin_altivec_vrlh(__a, __b);
6115 static vector unsigned short __ATTRS_o_ai vec_vrlh(vector unsigned short __a,
6116 vector unsigned short __b) {
6117 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
6122 static vector int __ATTRS_o_ai vec_vrlw(vector int __a,
6123 vector unsigned int __b) {
6124 return __builtin_altivec_vrlw(__a, __b);
6127 static vector unsigned int __ATTRS_o_ai vec_vrlw(vector unsigned int __a,
6128 vector unsigned int __b) {
6129 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
6134 static vector float __ATTRS_o_ai vec_round(vector float __a) {
6136 return __builtin_vsx_xvrspi(__a);
6138 return __builtin_altivec_vrfin(__a);
6143 static vector double __ATTRS_o_ai vec_round(vector double __a) {
6144 return __builtin_vsx_xvrdpi(__a);
6149 static vector float __ATTRS_o_ai
6150 vec_rint(vector float __a) {
6151 return __builtin_vsx_xvrspic(__a);
6154 static vector double __ATTRS_o_ai
6155 vec_rint(vector double __a) {
6156 return __builtin_vsx_xvrdpic(__a);
6161 static vector float __ATTRS_o_ai vec_nearbyint(vector float __a) {
6162 return __builtin_vsx_xvrspi(__a);
6165 static vector double __ATTRS_o_ai vec_nearbyint(vector double __a) {
6166 return __builtin_vsx_xvrdpi(__a);
6172 static vector float __attribute__((__always_inline__))
6173 vec_vrfin(vector float __a) {
6174 return __builtin_altivec_vrfin(__a);
6180 static vector float __ATTRS_o_ai vec_sqrt(vector float __a) {
6181 return __builtin_vsx_xvsqrtsp(__a);
6184 static vector double __ATTRS_o_ai vec_sqrt(vector double __a) {
6185 return __builtin_vsx_xvsqrtdp(__a);
6191 static vector float __ATTRS_o_ai
6192 vec_rsqrte(vector float __a) {
6194 return __builtin_vsx_xvrsqrtesp(__a);
6196 return __builtin_altivec_vrsqrtefp(__a);
6201 static vector double __ATTRS_o_ai vec_rsqrte(vector double __a) {
6202 return __builtin_vsx_xvrsqrtedp(__a);
6208 static __vector float __attribute__((__always_inline__))
6209 vec_vrsqrtefp(vector float __a) {
6210 return __builtin_altivec_vrsqrtefp(__a);
6215 #define __builtin_altivec_vsel_4si vec_sel
6217 static vector signed char __ATTRS_o_ai vec_sel(vector signed char __a,
6218 vector signed char __b,
6219 vector unsigned char __c) {
6220 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
6223 static vector signed char __ATTRS_o_ai vec_sel(vector signed char __a,
6224 vector signed char __b,
6225 vector bool char __c) {
6226 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
6229 static vector unsigned char __ATTRS_o_ai vec_sel(vector unsigned char __a,
6230 vector unsigned char __b,
6231 vector unsigned char __c) {
6232 return (__a & ~__c) | (__b & __c);
6235 static vector unsigned char __ATTRS_o_ai vec_sel(vector unsigned char __a,
6236 vector unsigned char __b,
6237 vector bool char __c) {
6238 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
6241 static vector bool char __ATTRS_o_ai vec_sel(vector bool char __a,
6242 vector bool char __b,
6243 vector unsigned char __c) {
6244 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
6247 static vector bool char __ATTRS_o_ai vec_sel(vector bool char __a,
6248 vector bool char __b,
6249 vector bool char __c) {
6250 return (__a & ~__c) | (__b & __c);
6253 static vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b,
6254 vector unsigned short __c) {
6255 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
6258 static vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b,
6259 vector bool short __c) {
6260 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
6263 static vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a,
6264 vector unsigned short __b,
6265 vector unsigned short __c) {
6266 return (__a & ~__c) | (__b & __c);
6269 static vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a,
6270 vector unsigned short __b,
6271 vector bool short __c) {
6272 return (__a & ~(vector unsigned short)__c) |
6273 (__b & (vector unsigned short)__c);
6276 static vector bool short __ATTRS_o_ai vec_sel(vector bool short __a,
6277 vector bool short __b,
6278 vector unsigned short __c) {
6279 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
6282 static vector bool short __ATTRS_o_ai vec_sel(vector bool short __a,
6283 vector bool short __b,
6284 vector bool short __c) {
6285 return (__a & ~__c) | (__b & __c);
6288 static vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b,
6289 vector unsigned int __c) {
6290 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
6293 static vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b,
6294 vector bool int __c) {
6295 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
6298 static vector unsigned int __ATTRS_o_ai vec_sel(vector unsigned int __a,
6299 vector unsigned int __b,
6300 vector unsigned int __c) {
6301 return (__a & ~__c) | (__b & __c);
6304 static vector unsigned int __ATTRS_o_ai vec_sel(vector unsigned int __a,
6305 vector unsigned int __b,
6306 vector bool int __c) {
6307 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
6310 static vector bool int __ATTRS_o_ai vec_sel(vector bool int __a,
6311 vector bool int __b,
6312 vector unsigned int __c) {
6313 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
6316 static vector bool int __ATTRS_o_ai vec_sel(vector bool int __a,
6317 vector bool int __b,
6318 vector bool int __c) {
6319 return (__a & ~__c) | (__b & __c);
6322 static vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b,
6323 vector unsigned int __c) {
6324 vector int __res = ((vector int)__a & ~(vector int)__c) |
6325 ((vector int)__b & (vector int)__c);
6326 return (vector float)__res;
6329 static vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b,
6330 vector bool int __c) {
6331 vector int __res = ((vector int)__a & ~(vector int)__c) |
6332 ((vector int)__b & (vector int)__c);
6333 return (vector float)__res;
6337 static vector double __ATTRS_o_ai vec_sel(vector double __a, vector double __b,
6338 vector bool long long __c) {
6339 vector long long __res = ((vector long long)__a & ~(vector long long)__c) |
6340 ((vector long long)__b & (vector long long)__c);
6341 return (vector double)__res;
6344 static vector double __ATTRS_o_ai vec_sel(vector double __a, vector double __b,
6345 vector unsigned long long __c) {
6346 vector long long __res = ((vector long long)__a & ~(vector long long)__c) |
6347 ((vector long long)__b & (vector long long)__c);
6348 return (vector double)__res;
6354 static vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a,
6355 vector signed char __b,
6356 vector unsigned char __c) {
6357 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
6360 static vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a,
6361 vector signed char __b,
6362 vector bool char __c) {
6363 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
6366 static vector unsigned char __ATTRS_o_ai vec_vsel(vector unsigned char __a,
6367 vector unsigned char __b,
6368 vector unsigned char __c) {
6369 return (__a & ~__c) | (__b & __c);
6372 static vector unsigned char __ATTRS_o_ai vec_vsel(vector unsigned char __a,
6373 vector unsigned char __b,
6374 vector bool char __c) {
6375 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
6378 static vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a,
6379 vector bool char __b,
6380 vector unsigned char __c) {
6381 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
6384 static vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a,
6385 vector bool char __b,
6386 vector bool char __c) {
6387 return (__a & ~__c) | (__b & __c);
6390 static vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b,
6391 vector unsigned short __c) {
6392 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
6395 static vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b,
6396 vector bool short __c) {
6397 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
6400 static vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a,
6401 vector unsigned short __b,
6402 vector unsigned short __c) {
6403 return (__a & ~__c) | (__b & __c);
6406 static vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a,
6407 vector unsigned short __b,
6408 vector bool short __c) {
6409 return (__a & ~(vector unsigned short)__c) |
6410 (__b & (vector unsigned short)__c);
6413 static vector bool short __ATTRS_o_ai vec_vsel(vector bool short __a,
6414 vector bool short __b,
6415 vector unsigned short __c) {
6416 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
6419 static vector bool short __ATTRS_o_ai vec_vsel(vector bool short __a,
6420 vector bool short __b,
6421 vector bool short __c) {
6422 return (__a & ~__c) | (__b & __c);
6425 static vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b,
6426 vector unsigned int __c) {
6427 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
6430 static vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b,
6431 vector bool int __c) {
6432 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
6435 static vector unsigned int __ATTRS_o_ai vec_vsel(vector unsigned int __a,
6436 vector unsigned int __b,
6437 vector unsigned int __c) {
6438 return (__a & ~__c) | (__b & __c);
6441 static vector unsigned int __ATTRS_o_ai vec_vsel(vector unsigned int __a,
6442 vector unsigned int __b,
6443 vector bool int __c) {
6444 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
6447 static vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a,
6448 vector bool int __b,
6449 vector unsigned int __c) {
6450 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
6453 static vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a,
6454 vector bool int __b,
6455 vector bool int __c) {
6456 return (__a & ~__c) | (__b & __c);
6459 static vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b,
6460 vector unsigned int __c) {
6461 vector int __res = ((vector int)__a & ~(vector int)__c) |
6462 ((vector int)__b & (vector int)__c);
6463 return (vector float)__res;
6466 static vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b,
6467 vector bool int __c) {
6468 vector int __res = ((vector int)__a & ~(vector int)__c) |
6469 ((vector int)__b & (vector int)__c);
6470 return (vector float)__res;
6475 static vector signed char __ATTRS_o_ai vec_sl(vector signed char __a,
6476 vector unsigned char __b) {
6477 return __a << (vector signed char)__b;
6480 static vector unsigned char __ATTRS_o_ai vec_sl(vector unsigned char __a,
6481 vector unsigned char __b) {
6485 static vector short __ATTRS_o_ai vec_sl(vector short __a,
6486 vector unsigned short __b) {
6487 return __a << (vector short)__b;
6490 static vector unsigned short __ATTRS_o_ai vec_sl(vector unsigned short __a,
6491 vector unsigned short __b) {
6495 static vector int __ATTRS_o_ai vec_sl(vector int __a, vector unsigned int __b) {
6496 return __a << (vector int)__b;
6499 static vector unsigned int __ATTRS_o_ai vec_sl(vector unsigned int __a,
6500 vector unsigned int __b) {
6504 #ifdef __POWER8_VECTOR__
6505 static vector signed long long __ATTRS_o_ai
6506 vec_sl(vector signed long long __a, vector unsigned long long __b) {
6507 return __a << (vector long long)__b;
6510 static vector unsigned long long __ATTRS_o_ai
6511 vec_sl(vector unsigned long long __a, vector unsigned long long __b) {
6518 #define __builtin_altivec_vslb vec_vslb
6520 static vector signed char __ATTRS_o_ai vec_vslb(vector signed char __a,
6521 vector unsigned char __b) {
6522 return vec_sl(__a, __b);
6525 static vector unsigned char __ATTRS_o_ai vec_vslb(vector unsigned char __a,
6526 vector unsigned char __b) {
6527 return vec_sl(__a, __b);
6532 #define __builtin_altivec_vslh vec_vslh
6534 static vector short __ATTRS_o_ai vec_vslh(vector short __a,
6535 vector unsigned short __b) {
6536 return vec_sl(__a, __b);
6539 static vector unsigned short __ATTRS_o_ai vec_vslh(vector unsigned short __a,
6540 vector unsigned short __b) {
6541 return vec_sl(__a, __b);
6546 #define __builtin_altivec_vslw vec_vslw
6548 static vector int __ATTRS_o_ai vec_vslw(vector int __a,
6549 vector unsigned int __b) {
6550 return vec_sl(__a, __b);
6553 static vector unsigned int __ATTRS_o_ai vec_vslw(vector unsigned int __a,
6554 vector unsigned int __b) {
6555 return vec_sl(__a, __b);
6560 #define __builtin_altivec_vsldoi_4si vec_sld
6562 static vector signed char __ATTRS_o_ai vec_sld(vector signed char __a,
6563 vector signed char __b,
6564 unsigned const int __c) {
6565 unsigned char __d = __c & 0x0F;
6568 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6569 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6570 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6573 static vector unsigned char __ATTRS_o_ai vec_sld(vector unsigned char __a,
6574 vector unsigned char __b,
6575 unsigned const int __c) {
6576 unsigned char __d = __c & 0x0F;
6579 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6580 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6581 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6584 static vector bool char __ATTRS_o_ai vec_sld(vector bool char __a,
6585 vector bool char __b,
6586 unsigned const int __c) {
6587 unsigned char __d = __c & 0x0F;
6590 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6591 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6592 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6595 static vector signed short __ATTRS_o_ai vec_sld(vector signed short __a,
6596 vector signed short __b,
6597 unsigned const int __c) {
6598 unsigned char __d = __c & 0x0F;
6601 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6602 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6603 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6606 static vector unsigned short __ATTRS_o_ai vec_sld(vector unsigned short __a,
6607 vector unsigned short __b,
6608 unsigned const int __c) {
6609 unsigned char __d = __c & 0x0F;
6612 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6613 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6614 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6617 static vector bool short __ATTRS_o_ai vec_sld(vector bool short __a,
6618 vector bool short __b,
6619 unsigned const int __c) {
6620 unsigned char __d = __c & 0x0F;
6623 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6624 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6625 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6628 static vector pixel __ATTRS_o_ai vec_sld(vector pixel __a, vector pixel __b,
6629 unsigned const int __c) {
6630 unsigned char __d = __c & 0x0F;
6633 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6634 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6635 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6638 static vector signed int __ATTRS_o_ai vec_sld(vector signed int __a,
6639 vector signed int __b,
6640 unsigned const int __c) {
6641 unsigned char __d = __c & 0x0F;
6644 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6645 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6646 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6649 static vector unsigned int __ATTRS_o_ai vec_sld(vector unsigned int __a,
6650 vector unsigned int __b,
6651 unsigned const int __c) {
6652 unsigned char __d = __c & 0x0F;
6655 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6656 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6657 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6660 static vector bool int __ATTRS_o_ai vec_sld(vector bool int __a,
6661 vector bool int __b,
6662 unsigned const int __c) {
6663 unsigned char __d = __c & 0x0F;
6666 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6667 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6668 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6671 static vector float __ATTRS_o_ai vec_sld(vector float __a, vector float __b,
6672 unsigned const int __c) {
6673 unsigned char __d = __c & 0x0F;
6676 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6677 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6678 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6683 static vector signed char __ATTRS_o_ai vec_vsldoi(vector signed char __a,
6684 vector signed char __b,
6685 unsigned char __c) {
6688 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
6689 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
6690 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
6693 static vector unsigned char __ATTRS_o_ai vec_vsldoi(vector unsigned char __a,
6694 vector unsigned char __b,
6695 unsigned char __c) {
6698 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
6699 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
6700 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
6703 static vector short __ATTRS_o_ai vec_vsldoi(vector short __a, vector short __b,
6704 unsigned char __c) {
6707 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
6708 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
6709 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
6712 static vector unsigned short __ATTRS_o_ai vec_vsldoi(vector unsigned short __a,
6713 vector unsigned short __b,
6714 unsigned char __c) {
6717 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
6718 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
6719 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
6722 static vector pixel __ATTRS_o_ai vec_vsldoi(vector pixel __a, vector pixel __b,
6723 unsigned char __c) {
6726 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
6727 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
6728 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
6731 static vector int __ATTRS_o_ai vec_vsldoi(vector int __a, vector int __b,
6732 unsigned char __c) {
6735 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
6736 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
6737 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
6740 static vector unsigned int __ATTRS_o_ai vec_vsldoi(vector unsigned int __a,
6741 vector unsigned int __b,
6742 unsigned char __c) {
6745 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
6746 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
6747 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
6750 static vector float __ATTRS_o_ai vec_vsldoi(vector float __a, vector float __b,
6751 unsigned char __c) {
6754 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
6755 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
6756 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
6761 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
6762 vector unsigned char __b) {
6763 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
6767 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
6768 vector unsigned short __b) {
6769 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
6773 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
6774 vector unsigned int __b) {
6775 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
6779 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
6780 vector unsigned char __b) {
6781 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
6785 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
6786 vector unsigned short __b) {
6787 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
6791 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
6792 vector unsigned int __b) {
6793 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
6797 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
6798 vector unsigned char __b) {
6799 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
6803 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
6804 vector unsigned short __b) {
6805 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
6809 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
6810 vector unsigned int __b) {
6811 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
6815 static vector short __ATTRS_o_ai vec_sll(vector short __a,
6816 vector unsigned char __b) {
6817 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6820 static vector short __ATTRS_o_ai vec_sll(vector short __a,
6821 vector unsigned short __b) {
6822 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6825 static vector short __ATTRS_o_ai vec_sll(vector short __a,
6826 vector unsigned int __b) {
6827 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6830 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
6831 vector unsigned char __b) {
6832 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
6836 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
6837 vector unsigned short __b) {
6838 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
6842 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
6843 vector unsigned int __b) {
6844 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
6848 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
6849 vector unsigned char __b) {
6850 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
6854 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
6855 vector unsigned short __b) {
6856 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
6860 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
6861 vector unsigned int __b) {
6862 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
6866 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
6867 vector unsigned char __b) {
6868 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6871 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
6872 vector unsigned short __b) {
6873 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6876 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
6877 vector unsigned int __b) {
6878 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6881 static vector int __ATTRS_o_ai vec_sll(vector int __a,
6882 vector unsigned char __b) {
6883 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6886 static vector int __ATTRS_o_ai vec_sll(vector int __a,
6887 vector unsigned short __b) {
6888 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6891 static vector int __ATTRS_o_ai vec_sll(vector int __a,
6892 vector unsigned int __b) {
6893 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6896 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
6897 vector unsigned char __b) {
6898 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
6902 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
6903 vector unsigned short __b) {
6904 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
6908 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
6909 vector unsigned int __b) {
6910 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
6914 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
6915 vector unsigned char __b) {
6916 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
6920 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
6921 vector unsigned short __b) {
6922 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
6926 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
6927 vector unsigned int __b) {
6928 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
6934 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
6935 vector unsigned char __b) {
6936 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
6940 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
6941 vector unsigned short __b) {
6942 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
6946 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
6947 vector unsigned int __b) {
6948 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
6952 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
6953 vector unsigned char __b) {
6954 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
6958 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
6959 vector unsigned short __b) {
6960 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
6964 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
6965 vector unsigned int __b) {
6966 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
6970 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
6971 vector unsigned char __b) {
6972 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
6976 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
6977 vector unsigned short __b) {
6978 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
6982 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
6983 vector unsigned int __b) {
6984 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
6988 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
6989 vector unsigned char __b) {
6990 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6993 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
6994 vector unsigned short __b) {
6995 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6998 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
6999 vector unsigned int __b) {
7000 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7003 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
7004 vector unsigned char __b) {
7005 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7009 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
7010 vector unsigned short __b) {
7011 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7015 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
7016 vector unsigned int __b) {
7017 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7021 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
7022 vector unsigned char __b) {
7023 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7027 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
7028 vector unsigned short __b) {
7029 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7033 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
7034 vector unsigned int __b) {
7035 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7039 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
7040 vector unsigned char __b) {
7041 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7044 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
7045 vector unsigned short __b) {
7046 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7049 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
7050 vector unsigned int __b) {
7051 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7054 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
7055 vector unsigned char __b) {
7056 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7059 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
7060 vector unsigned short __b) {
7061 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7064 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
7065 vector unsigned int __b) {
7066 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7069 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
7070 vector unsigned char __b) {
7071 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7075 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
7076 vector unsigned short __b) {
7077 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7081 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
7082 vector unsigned int __b) {
7083 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7087 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
7088 vector unsigned char __b) {
7089 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7093 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
7094 vector unsigned short __b) {
7095 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7099 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
7100 vector unsigned int __b) {
7101 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7107 static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a,
7108 vector signed char __b) {
7109 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7113 static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a,
7114 vector unsigned char __b) {
7115 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7119 static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a,
7120 vector signed char __b) {
7121 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7125 static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a,
7126 vector unsigned char __b) {
7127 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7131 static vector short __ATTRS_o_ai vec_slo(vector short __a,
7132 vector signed char __b) {
7133 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7136 static vector short __ATTRS_o_ai vec_slo(vector short __a,
7137 vector unsigned char __b) {
7138 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7141 static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a,
7142 vector signed char __b) {
7143 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7147 static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a,
7148 vector unsigned char __b) {
7149 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7153 static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a,
7154 vector signed char __b) {
7155 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7158 static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a,
7159 vector unsigned char __b) {
7160 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7163 static vector int __ATTRS_o_ai vec_slo(vector int __a, vector signed char __b) {
7164 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7167 static vector int __ATTRS_o_ai vec_slo(vector int __a,
7168 vector unsigned char __b) {
7169 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7172 static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a,
7173 vector signed char __b) {
7174 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7178 static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a,
7179 vector unsigned char __b) {
7180 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7184 static vector float __ATTRS_o_ai vec_slo(vector float __a,
7185 vector signed char __b) {
7186 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7189 static vector float __ATTRS_o_ai vec_slo(vector float __a,
7190 vector unsigned char __b) {
7191 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7196 static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a,
7197 vector signed char __b) {
7198 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7202 static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a,
7203 vector unsigned char __b) {
7204 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7208 static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a,
7209 vector signed char __b) {
7210 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7214 static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a,
7215 vector unsigned char __b) {
7216 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7220 static vector short __ATTRS_o_ai vec_vslo(vector short __a,
7221 vector signed char __b) {
7222 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7225 static vector short __ATTRS_o_ai vec_vslo(vector short __a,
7226 vector unsigned char __b) {
7227 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7230 static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a,
7231 vector signed char __b) {
7232 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7236 static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a,
7237 vector unsigned char __b) {
7238 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7242 static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a,
7243 vector signed char __b) {
7244 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7247 static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a,
7248 vector unsigned char __b) {
7249 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7252 static vector int __ATTRS_o_ai vec_vslo(vector int __a,
7253 vector signed char __b) {
7254 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7257 static vector int __ATTRS_o_ai vec_vslo(vector int __a,
7258 vector unsigned char __b) {
7259 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7262 static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a,
7263 vector signed char __b) {
7264 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7268 static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a,
7269 vector unsigned char __b) {
7270 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7274 static vector float __ATTRS_o_ai vec_vslo(vector float __a,
7275 vector signed char __b) {
7276 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7279 static vector float __ATTRS_o_ai vec_vslo(vector float __a,
7280 vector unsigned char __b) {
7281 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7286 static vector signed char __ATTRS_o_ai vec_splat(vector signed char __a,
7287 unsigned const int __b) {
7288 return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F));
7291 static vector unsigned char __ATTRS_o_ai vec_splat(vector unsigned char __a,
7292 unsigned const int __b) {
7293 return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F));
7296 static vector bool char __ATTRS_o_ai vec_splat(vector bool char __a,
7297 unsigned const int __b) {
7298 return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F));
7301 static vector signed short __ATTRS_o_ai vec_splat(vector signed short __a,
7302 unsigned const int __b) {
7303 unsigned char b0 = (__b & 0x07) * 2;
7304 unsigned char b1 = b0 + 1;
7305 return vec_perm(__a, __a,
7306 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7307 b0, b1, b0, b1, b0, b1, b0, b1));
7310 static vector unsigned short __ATTRS_o_ai vec_splat(vector unsigned short __a,
7311 unsigned const int __b) {
7312 unsigned char b0 = (__b & 0x07) * 2;
7313 unsigned char b1 = b0 + 1;
7314 return vec_perm(__a, __a,
7315 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7316 b0, b1, b0, b1, b0, b1, b0, b1));
7319 static vector bool short __ATTRS_o_ai vec_splat(vector bool short __a,
7320 unsigned const int __b) {
7321 unsigned char b0 = (__b & 0x07) * 2;
7322 unsigned char b1 = b0 + 1;
7323 return vec_perm(__a, __a,
7324 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7325 b0, b1, b0, b1, b0, b1, b0, b1));
7328 static vector pixel __ATTRS_o_ai vec_splat(vector pixel __a,
7329 unsigned const int __b) {
7330 unsigned char b0 = (__b & 0x07) * 2;
7331 unsigned char b1 = b0 + 1;
7332 return vec_perm(__a, __a,
7333 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7334 b0, b1, b0, b1, b0, b1, b0, b1));
7337 static vector signed int __ATTRS_o_ai vec_splat(vector signed int __a,
7338 unsigned const int __b) {
7339 unsigned char b0 = (__b & 0x03) * 4;
7340 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7341 return vec_perm(__a, __a,
7342 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7343 b1, b2, b3, b0, b1, b2, b3));
7346 static vector unsigned int __ATTRS_o_ai vec_splat(vector unsigned int __a,
7347 unsigned const int __b) {
7348 unsigned char b0 = (__b & 0x03) * 4;
7349 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7350 return vec_perm(__a, __a,
7351 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7352 b1, b2, b3, b0, b1, b2, b3));
7355 static vector bool int __ATTRS_o_ai vec_splat(vector bool int __a,
7356 unsigned const int __b) {
7357 unsigned char b0 = (__b & 0x03) * 4;
7358 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7359 return vec_perm(__a, __a,
7360 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7361 b1, b2, b3, b0, b1, b2, b3));
7364 static vector float __ATTRS_o_ai vec_splat(vector float __a,
7365 unsigned const int __b) {
7366 unsigned char b0 = (__b & 0x03) * 4;
7367 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7368 return vec_perm(__a, __a,
7369 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7370 b1, b2, b3, b0, b1, b2, b3));
7374 static vector double __ATTRS_o_ai vec_splat(vector double __a,
7375 unsigned const int __b) {
7376 unsigned char b0 = (__b & 0x01) * 8;
7377 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7378 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7379 return vec_perm(__a, __a,
7380 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7381 b0, b1, b2, b3, b4, b5, b6, b7));
7383 static vector bool long long __ATTRS_o_ai vec_splat(vector bool long long __a,
7384 unsigned const int __b) {
7385 unsigned char b0 = (__b & 0x01) * 8;
7386 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7387 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7388 return vec_perm(__a, __a,
7389 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7390 b0, b1, b2, b3, b4, b5, b6, b7));
7392 static vector signed long long __ATTRS_o_ai
7393 vec_splat(vector signed long long __a, unsigned const int __b) {
7394 unsigned char b0 = (__b & 0x01) * 8;
7395 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7396 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7397 return vec_perm(__a, __a,
7398 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7399 b0, b1, b2, b3, b4, b5, b6, b7));
7401 static vector unsigned long long __ATTRS_o_ai
7402 vec_splat(vector unsigned long long __a, unsigned const int __b) {
7403 unsigned char b0 = (__b & 0x01) * 8;
7404 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7405 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7406 return vec_perm(__a, __a,
7407 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7408 b0, b1, b2, b3, b4, b5, b6, b7));
7414 #define __builtin_altivec_vspltb vec_vspltb
7416 static vector signed char __ATTRS_o_ai vec_vspltb(vector signed char __a,
7417 unsigned char __b) {
7418 return vec_perm(__a, __a, (vector unsigned char)(__b));
7421 static vector unsigned char __ATTRS_o_ai vec_vspltb(vector unsigned char __a,
7422 unsigned char __b) {
7423 return vec_perm(__a, __a, (vector unsigned char)(__b));
7426 static vector bool char __ATTRS_o_ai vec_vspltb(vector bool char __a,
7427 unsigned char __b) {
7428 return vec_perm(__a, __a, (vector unsigned char)(__b));
7433 #define __builtin_altivec_vsplth vec_vsplth
7435 static vector short __ATTRS_o_ai vec_vsplth(vector short __a,
7436 unsigned char __b) {
7438 unsigned char b1 = __b + 1;
7439 return vec_perm(__a, __a,
7440 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7441 __b, b1, __b, b1, __b, b1, __b, b1));
7444 static vector unsigned short __ATTRS_o_ai vec_vsplth(vector unsigned short __a,
7445 unsigned char __b) {
7447 unsigned char b1 = __b + 1;
7448 return vec_perm(__a, __a,
7449 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7450 __b, b1, __b, b1, __b, b1, __b, b1));
7453 static vector bool short __ATTRS_o_ai vec_vsplth(vector bool short __a,
7454 unsigned char __b) {
7456 unsigned char b1 = __b + 1;
7457 return vec_perm(__a, __a,
7458 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7459 __b, b1, __b, b1, __b, b1, __b, b1));
7462 static vector pixel __ATTRS_o_ai vec_vsplth(vector pixel __a,
7463 unsigned char __b) {
7465 unsigned char b1 = __b + 1;
7466 return vec_perm(__a, __a,
7467 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7468 __b, b1, __b, b1, __b, b1, __b, b1));
7473 #define __builtin_altivec_vspltw vec_vspltw
7475 static vector int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b) {
7477 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7478 return vec_perm(__a, __a,
7479 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7480 b1, b2, b3, __b, b1, b2, b3));
7483 static vector unsigned int __ATTRS_o_ai vec_vspltw(vector unsigned int __a,
7484 unsigned char __b) {
7486 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7487 return vec_perm(__a, __a,
7488 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7489 b1, b2, b3, __b, b1, b2, b3));
7492 static vector bool int __ATTRS_o_ai vec_vspltw(vector bool int __a,
7493 unsigned char __b) {
7495 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7496 return vec_perm(__a, __a,
7497 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7498 b1, b2, b3, __b, b1, b2, b3));
7501 static vector float __ATTRS_o_ai vec_vspltw(vector float __a,
7502 unsigned char __b) {
7504 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7505 return vec_perm(__a, __a,
7506 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7507 b1, b2, b3, __b, b1, b2, b3));
7512 #define __builtin_altivec_vspltisb vec_splat_s8
7514 // FIXME: parameter should be treated as 5-bit signed literal
7515 static vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a) {
7516 return (vector signed char)(__a);
7521 // FIXME: parameter should be treated as 5-bit signed literal
7522 static vector signed char __ATTRS_o_ai vec_vspltisb(signed char __a) {
7523 return (vector signed char)(__a);
7528 #define __builtin_altivec_vspltish vec_splat_s16
7530 // FIXME: parameter should be treated as 5-bit signed literal
7531 static vector short __ATTRS_o_ai vec_splat_s16(signed char __a) {
7532 return (vector short)(__a);
7537 // FIXME: parameter should be treated as 5-bit signed literal
7538 static vector short __ATTRS_o_ai vec_vspltish(signed char __a) {
7539 return (vector short)(__a);
7544 #define __builtin_altivec_vspltisw vec_splat_s32
7546 // FIXME: parameter should be treated as 5-bit signed literal
7547 static vector int __ATTRS_o_ai vec_splat_s32(signed char __a) {
7548 return (vector int)(__a);
7553 // FIXME: parameter should be treated as 5-bit signed literal
7554 static vector int __ATTRS_o_ai vec_vspltisw(signed char __a) {
7555 return (vector int)(__a);
7560 // FIXME: parameter should be treated as 5-bit signed literal
7561 static vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a) {
7562 return (vector unsigned char)(__a);
7567 // FIXME: parameter should be treated as 5-bit signed literal
7568 static vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a) {
7569 return (vector unsigned short)(__a);
7574 // FIXME: parameter should be treated as 5-bit signed literal
7575 static vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a) {
7576 return (vector unsigned int)(__a);
7581 static vector signed char __ATTRS_o_ai vec_sr(vector signed char __a,
7582 vector unsigned char __b) {
7583 vector unsigned char __res = (vector unsigned char)__a >> __b;
7584 return (vector signed char)__res;
7587 static vector unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a,
7588 vector unsigned char __b) {
7592 static vector signed short __ATTRS_o_ai vec_sr(vector signed short __a,
7593 vector unsigned short __b) {
7594 vector unsigned short __res = (vector unsigned short)__a >> __b;
7595 return (vector signed short)__res;
7598 static vector unsigned short __ATTRS_o_ai vec_sr(vector unsigned short __a,
7599 vector unsigned short __b) {
7603 static vector signed int __ATTRS_o_ai vec_sr(vector signed int __a,
7604 vector unsigned int __b) {
7605 vector unsigned int __res = (vector unsigned int)__a >> __b;
7606 return (vector signed int)__res;
7609 static vector unsigned int __ATTRS_o_ai vec_sr(vector unsigned int __a,
7610 vector unsigned int __b) {
7614 #ifdef __POWER8_VECTOR__
7615 static vector signed long long __ATTRS_o_ai
7616 vec_sr(vector signed long long __a, vector unsigned long long __b) {
7617 vector unsigned long long __res = (vector unsigned long long)__a >> __b;
7618 return (vector signed long long)__res;
7621 static vector unsigned long long __ATTRS_o_ai
7622 vec_sr(vector unsigned long long __a, vector unsigned long long __b) {
7629 #define __builtin_altivec_vsrb vec_vsrb
7631 static vector signed char __ATTRS_o_ai vec_vsrb(vector signed char __a,
7632 vector unsigned char __b) {
7633 return __a >> (vector signed char)__b;
7636 static vector unsigned char __ATTRS_o_ai vec_vsrb(vector unsigned char __a,
7637 vector unsigned char __b) {
7643 #define __builtin_altivec_vsrh vec_vsrh
7645 static vector short __ATTRS_o_ai vec_vsrh(vector short __a,
7646 vector unsigned short __b) {
7647 return __a >> (vector short)__b;
7650 static vector unsigned short __ATTRS_o_ai vec_vsrh(vector unsigned short __a,
7651 vector unsigned short __b) {
7657 #define __builtin_altivec_vsrw vec_vsrw
7659 static vector int __ATTRS_o_ai vec_vsrw(vector int __a,
7660 vector unsigned int __b) {
7661 return __a >> (vector int)__b;
7664 static vector unsigned int __ATTRS_o_ai vec_vsrw(vector unsigned int __a,
7665 vector unsigned int __b) {
7671 static vector signed char __ATTRS_o_ai vec_sra(vector signed char __a,
7672 vector unsigned char __b) {
7673 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
7676 static vector unsigned char __ATTRS_o_ai vec_sra(vector unsigned char __a,
7677 vector unsigned char __b) {
7678 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
7681 static vector short __ATTRS_o_ai vec_sra(vector short __a,
7682 vector unsigned short __b) {
7683 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
7686 static vector unsigned short __ATTRS_o_ai vec_sra(vector unsigned short __a,
7687 vector unsigned short __b) {
7688 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
7691 static vector int __ATTRS_o_ai vec_sra(vector int __a,
7692 vector unsigned int __b) {
7693 return __builtin_altivec_vsraw(__a, __b);
7696 static vector unsigned int __ATTRS_o_ai vec_sra(vector unsigned int __a,
7697 vector unsigned int __b) {
7698 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
7701 #ifdef __POWER8_VECTOR__
7702 static vector signed long long __ATTRS_o_ai
7703 vec_sra(vector signed long long __a, vector unsigned long long __b) {
7707 static vector unsigned long long __ATTRS_o_ai
7708 vec_sra(vector unsigned long long __a, vector unsigned long long __b) {
7709 return (vector unsigned long long)((vector signed long long)__a >> __b);
7715 static vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a,
7716 vector unsigned char __b) {
7717 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
7720 static vector unsigned char __ATTRS_o_ai vec_vsrab(vector unsigned char __a,
7721 vector unsigned char __b) {
7722 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
7727 static vector short __ATTRS_o_ai vec_vsrah(vector short __a,
7728 vector unsigned short __b) {
7729 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
7732 static vector unsigned short __ATTRS_o_ai vec_vsrah(vector unsigned short __a,
7733 vector unsigned short __b) {
7734 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
7739 static vector int __ATTRS_o_ai vec_vsraw(vector int __a,
7740 vector unsigned int __b) {
7741 return __builtin_altivec_vsraw(__a, __b);
7744 static vector unsigned int __ATTRS_o_ai vec_vsraw(vector unsigned int __a,
7745 vector unsigned int __b) {
7746 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
7751 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
7752 vector unsigned char __b) {
7753 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
7757 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
7758 vector unsigned short __b) {
7759 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
7763 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
7764 vector unsigned int __b) {
7765 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
7769 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
7770 vector unsigned char __b) {
7771 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
7775 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
7776 vector unsigned short __b) {
7777 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
7781 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
7782 vector unsigned int __b) {
7783 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
7787 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
7788 vector unsigned char __b) {
7789 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
7793 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
7794 vector unsigned short __b) {
7795 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
7799 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
7800 vector unsigned int __b) {
7801 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
7805 static vector short __ATTRS_o_ai vec_srl(vector short __a,
7806 vector unsigned char __b) {
7807 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7810 static vector short __ATTRS_o_ai vec_srl(vector short __a,
7811 vector unsigned short __b) {
7812 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7815 static vector short __ATTRS_o_ai vec_srl(vector short __a,
7816 vector unsigned int __b) {
7817 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7820 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
7821 vector unsigned char __b) {
7822 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
7826 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
7827 vector unsigned short __b) {
7828 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
7832 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
7833 vector unsigned int __b) {
7834 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
7838 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
7839 vector unsigned char __b) {
7840 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
7844 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
7845 vector unsigned short __b) {
7846 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
7850 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
7851 vector unsigned int __b) {
7852 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
7856 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
7857 vector unsigned char __b) {
7858 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7861 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
7862 vector unsigned short __b) {
7863 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7866 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
7867 vector unsigned int __b) {
7868 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7871 static vector int __ATTRS_o_ai vec_srl(vector int __a,
7872 vector unsigned char __b) {
7873 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7876 static vector int __ATTRS_o_ai vec_srl(vector int __a,
7877 vector unsigned short __b) {
7878 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7881 static vector int __ATTRS_o_ai vec_srl(vector int __a,
7882 vector unsigned int __b) {
7883 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7886 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
7887 vector unsigned char __b) {
7888 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
7892 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
7893 vector unsigned short __b) {
7894 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
7898 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
7899 vector unsigned int __b) {
7900 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
7904 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
7905 vector unsigned char __b) {
7906 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
7910 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
7911 vector unsigned short __b) {
7912 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
7916 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
7917 vector unsigned int __b) {
7918 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
7924 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
7925 vector unsigned char __b) {
7926 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
7930 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
7931 vector unsigned short __b) {
7932 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
7936 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
7937 vector unsigned int __b) {
7938 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
7942 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
7943 vector unsigned char __b) {
7944 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
7948 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
7949 vector unsigned short __b) {
7950 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
7954 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
7955 vector unsigned int __b) {
7956 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
7960 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
7961 vector unsigned char __b) {
7962 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
7966 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
7967 vector unsigned short __b) {
7968 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
7972 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
7973 vector unsigned int __b) {
7974 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
7978 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
7979 vector unsigned char __b) {
7980 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7983 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
7984 vector unsigned short __b) {
7985 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7988 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
7989 vector unsigned int __b) {
7990 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7993 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
7994 vector unsigned char __b) {
7995 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
7999 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
8000 vector unsigned short __b) {
8001 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8005 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
8006 vector unsigned int __b) {
8007 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8011 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
8012 vector unsigned char __b) {
8013 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8017 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
8018 vector unsigned short __b) {
8019 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8023 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
8024 vector unsigned int __b) {
8025 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8029 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
8030 vector unsigned char __b) {
8031 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8034 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
8035 vector unsigned short __b) {
8036 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8039 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
8040 vector unsigned int __b) {
8041 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8044 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
8045 vector unsigned char __b) {
8046 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8049 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
8050 vector unsigned short __b) {
8051 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8054 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
8055 vector unsigned int __b) {
8056 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8059 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
8060 vector unsigned char __b) {
8061 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8065 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
8066 vector unsigned short __b) {
8067 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8071 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
8072 vector unsigned int __b) {
8073 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8077 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
8078 vector unsigned char __b) {
8079 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8083 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
8084 vector unsigned short __b) {
8085 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8089 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
8090 vector unsigned int __b) {
8091 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8097 static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a,
8098 vector signed char __b) {
8099 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8103 static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a,
8104 vector unsigned char __b) {
8105 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8109 static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a,
8110 vector signed char __b) {
8111 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8115 static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a,
8116 vector unsigned char __b) {
8117 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8121 static vector short __ATTRS_o_ai vec_sro(vector short __a,
8122 vector signed char __b) {
8123 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8126 static vector short __ATTRS_o_ai vec_sro(vector short __a,
8127 vector unsigned char __b) {
8128 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8131 static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a,
8132 vector signed char __b) {
8133 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8137 static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a,
8138 vector unsigned char __b) {
8139 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8143 static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a,
8144 vector signed char __b) {
8145 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8148 static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a,
8149 vector unsigned char __b) {
8150 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8153 static vector int __ATTRS_o_ai vec_sro(vector int __a, vector signed char __b) {
8154 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8157 static vector int __ATTRS_o_ai vec_sro(vector int __a,
8158 vector unsigned char __b) {
8159 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8162 static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a,
8163 vector signed char __b) {
8164 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8168 static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a,
8169 vector unsigned char __b) {
8170 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8174 static vector float __ATTRS_o_ai vec_sro(vector float __a,
8175 vector signed char __b) {
8176 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8179 static vector float __ATTRS_o_ai vec_sro(vector float __a,
8180 vector unsigned char __b) {
8181 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8186 static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a,
8187 vector signed char __b) {
8188 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8192 static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a,
8193 vector unsigned char __b) {
8194 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8198 static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a,
8199 vector signed char __b) {
8200 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8204 static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a,
8205 vector unsigned char __b) {
8206 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8210 static vector short __ATTRS_o_ai vec_vsro(vector short __a,
8211 vector signed char __b) {
8212 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8215 static vector short __ATTRS_o_ai vec_vsro(vector short __a,
8216 vector unsigned char __b) {
8217 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8220 static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a,
8221 vector signed char __b) {
8222 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8226 static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a,
8227 vector unsigned char __b) {
8228 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8232 static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a,
8233 vector signed char __b) {
8234 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8237 static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a,
8238 vector unsigned char __b) {
8239 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8242 static vector int __ATTRS_o_ai vec_vsro(vector int __a,
8243 vector signed char __b) {
8244 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8247 static vector int __ATTRS_o_ai vec_vsro(vector int __a,
8248 vector unsigned char __b) {
8249 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8252 static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a,
8253 vector signed char __b) {
8254 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8258 static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a,
8259 vector unsigned char __b) {
8260 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8264 static vector float __ATTRS_o_ai vec_vsro(vector float __a,
8265 vector signed char __b) {
8266 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8269 static vector float __ATTRS_o_ai vec_vsro(vector float __a,
8270 vector unsigned char __b) {
8271 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8276 static void __ATTRS_o_ai vec_st(vector signed char __a, int __b,
8277 vector signed char *__c) {
8278 __builtin_altivec_stvx((vector int)__a, __b, __c);
8281 static void __ATTRS_o_ai vec_st(vector signed char __a, int __b,
8283 __builtin_altivec_stvx((vector int)__a, __b, __c);
8286 static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b,
8287 vector unsigned char *__c) {
8288 __builtin_altivec_stvx((vector int)__a, __b, __c);
8291 static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b,
8292 unsigned char *__c) {
8293 __builtin_altivec_stvx((vector int)__a, __b, __c);
8296 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
8298 __builtin_altivec_stvx((vector int)__a, __b, __c);
8301 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
8302 unsigned char *__c) {
8303 __builtin_altivec_stvx((vector int)__a, __b, __c);
8306 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
8307 vector bool char *__c) {
8308 __builtin_altivec_stvx((vector int)__a, __b, __c);
8311 static void __ATTRS_o_ai vec_st(vector short __a, int __b, vector short *__c) {
8312 __builtin_altivec_stvx((vector int)__a, __b, __c);
8315 static void __ATTRS_o_ai vec_st(vector short __a, int __b, short *__c) {
8316 __builtin_altivec_stvx((vector int)__a, __b, __c);
8319 static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b,
8320 vector unsigned short *__c) {
8321 __builtin_altivec_stvx((vector int)__a, __b, __c);
8324 static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b,
8325 unsigned short *__c) {
8326 __builtin_altivec_stvx((vector int)__a, __b, __c);
8329 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b, short *__c) {
8330 __builtin_altivec_stvx((vector int)__a, __b, __c);
8333 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b,
8334 unsigned short *__c) {
8335 __builtin_altivec_stvx((vector int)__a, __b, __c);
8338 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b,
8339 vector bool short *__c) {
8340 __builtin_altivec_stvx((vector int)__a, __b, __c);
8343 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, short *__c) {
8344 __builtin_altivec_stvx((vector int)__a, __b, __c);
8347 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b,
8348 unsigned short *__c) {
8349 __builtin_altivec_stvx((vector int)__a, __b, __c);
8352 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, vector pixel *__c) {
8353 __builtin_altivec_stvx((vector int)__a, __b, __c);
8356 static void __ATTRS_o_ai vec_st(vector int __a, int __b, vector int *__c) {
8357 __builtin_altivec_stvx(__a, __b, __c);
8360 static void __ATTRS_o_ai vec_st(vector int __a, int __b, int *__c) {
8361 __builtin_altivec_stvx(__a, __b, __c);
8364 static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b,
8365 vector unsigned int *__c) {
8366 __builtin_altivec_stvx((vector int)__a, __b, __c);
8369 static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b,
8370 unsigned int *__c) {
8371 __builtin_altivec_stvx((vector int)__a, __b, __c);
8374 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b, int *__c) {
8375 __builtin_altivec_stvx((vector int)__a, __b, __c);
8378 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b,
8379 unsigned int *__c) {
8380 __builtin_altivec_stvx((vector int)__a, __b, __c);
8383 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b,
8384 vector bool int *__c) {
8385 __builtin_altivec_stvx((vector int)__a, __b, __c);
8388 static void __ATTRS_o_ai vec_st(vector float __a, int __b, vector float *__c) {
8389 __builtin_altivec_stvx((vector int)__a, __b, __c);
8392 static void __ATTRS_o_ai vec_st(vector float __a, int __b, float *__c) {
8393 __builtin_altivec_stvx((vector int)__a, __b, __c);
8398 static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b,
8399 vector signed char *__c) {
8400 __builtin_altivec_stvx((vector int)__a, __b, __c);
8403 static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b,
8405 __builtin_altivec_stvx((vector int)__a, __b, __c);
8408 static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b,
8409 vector unsigned char *__c) {
8410 __builtin_altivec_stvx((vector int)__a, __b, __c);
8413 static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b,
8414 unsigned char *__c) {
8415 __builtin_altivec_stvx((vector int)__a, __b, __c);
8418 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
8420 __builtin_altivec_stvx((vector int)__a, __b, __c);
8423 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
8424 unsigned char *__c) {
8425 __builtin_altivec_stvx((vector int)__a, __b, __c);
8428 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
8429 vector bool char *__c) {
8430 __builtin_altivec_stvx((vector int)__a, __b, __c);
8433 static void __ATTRS_o_ai vec_stvx(vector short __a, int __b,
8434 vector short *__c) {
8435 __builtin_altivec_stvx((vector int)__a, __b, __c);
8438 static void __ATTRS_o_ai vec_stvx(vector short __a, int __b, short *__c) {
8439 __builtin_altivec_stvx((vector int)__a, __b, __c);
8442 static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b,
8443 vector unsigned short *__c) {
8444 __builtin_altivec_stvx((vector int)__a, __b, __c);
8447 static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b,
8448 unsigned short *__c) {
8449 __builtin_altivec_stvx((vector int)__a, __b, __c);
8452 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b, short *__c) {
8453 __builtin_altivec_stvx((vector int)__a, __b, __c);
8456 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b,
8457 unsigned short *__c) {
8458 __builtin_altivec_stvx((vector int)__a, __b, __c);
8461 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b,
8462 vector bool short *__c) {
8463 __builtin_altivec_stvx((vector int)__a, __b, __c);
8466 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b, short *__c) {
8467 __builtin_altivec_stvx((vector int)__a, __b, __c);
8470 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b,
8471 unsigned short *__c) {
8472 __builtin_altivec_stvx((vector int)__a, __b, __c);
8475 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b,
8476 vector pixel *__c) {
8477 __builtin_altivec_stvx((vector int)__a, __b, __c);
8480 static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, vector int *__c) {
8481 __builtin_altivec_stvx(__a, __b, __c);
8484 static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, int *__c) {
8485 __builtin_altivec_stvx(__a, __b, __c);
8488 static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b,
8489 vector unsigned int *__c) {
8490 __builtin_altivec_stvx((vector int)__a, __b, __c);
8493 static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b,
8494 unsigned int *__c) {
8495 __builtin_altivec_stvx((vector int)__a, __b, __c);
8498 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b, int *__c) {
8499 __builtin_altivec_stvx((vector int)__a, __b, __c);
8502 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b,
8503 unsigned int *__c) {
8504 __builtin_altivec_stvx((vector int)__a, __b, __c);
8507 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b,
8508 vector bool int *__c) {
8509 __builtin_altivec_stvx((vector int)__a, __b, __c);
8512 static void __ATTRS_o_ai vec_stvx(vector float __a, int __b,
8513 vector float *__c) {
8514 __builtin_altivec_stvx((vector int)__a, __b, __c);
8517 static void __ATTRS_o_ai vec_stvx(vector float __a, int __b, float *__c) {
8518 __builtin_altivec_stvx((vector int)__a, __b, __c);
8523 static void __ATTRS_o_ai vec_ste(vector signed char __a, int __b,
8525 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8528 static void __ATTRS_o_ai vec_ste(vector unsigned char __a, int __b,
8529 unsigned char *__c) {
8530 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8533 static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b,
8535 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8538 static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b,
8539 unsigned char *__c) {
8540 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8543 static void __ATTRS_o_ai vec_ste(vector short __a, int __b, short *__c) {
8544 __builtin_altivec_stvehx(__a, __b, __c);
8547 static void __ATTRS_o_ai vec_ste(vector unsigned short __a, int __b,
8548 unsigned short *__c) {
8549 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8552 static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b, short *__c) {
8553 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8556 static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b,
8557 unsigned short *__c) {
8558 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8561 static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b, short *__c) {
8562 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8565 static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b,
8566 unsigned short *__c) {
8567 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8570 static void __ATTRS_o_ai vec_ste(vector int __a, int __b, int *__c) {
8571 __builtin_altivec_stvewx(__a, __b, __c);
8574 static void __ATTRS_o_ai vec_ste(vector unsigned int __a, int __b,
8575 unsigned int *__c) {
8576 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8579 static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b, int *__c) {
8580 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8583 static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b,
8584 unsigned int *__c) {
8585 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8588 static void __ATTRS_o_ai vec_ste(vector float __a, int __b, float *__c) {
8589 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8594 static void __ATTRS_o_ai vec_stvebx(vector signed char __a, int __b,
8596 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8599 static void __ATTRS_o_ai vec_stvebx(vector unsigned char __a, int __b,
8600 unsigned char *__c) {
8601 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8604 static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b,
8606 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8609 static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b,
8610 unsigned char *__c) {
8611 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8616 static void __ATTRS_o_ai vec_stvehx(vector short __a, int __b, short *__c) {
8617 __builtin_altivec_stvehx(__a, __b, __c);
8620 static void __ATTRS_o_ai vec_stvehx(vector unsigned short __a, int __b,
8621 unsigned short *__c) {
8622 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8625 static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b,
8627 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8630 static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b,
8631 unsigned short *__c) {
8632 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8635 static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b, short *__c) {
8636 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8639 static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b,
8640 unsigned short *__c) {
8641 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8646 static void __ATTRS_o_ai vec_stvewx(vector int __a, int __b, int *__c) {
8647 __builtin_altivec_stvewx(__a, __b, __c);
8650 static void __ATTRS_o_ai vec_stvewx(vector unsigned int __a, int __b,
8651 unsigned int *__c) {
8652 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8655 static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b, int *__c) {
8656 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8659 static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b,
8660 unsigned int *__c) {
8661 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8664 static void __ATTRS_o_ai vec_stvewx(vector float __a, int __b, float *__c) {
8665 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8670 static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b,
8671 vector signed char *__c) {
8672 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8675 static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b,
8677 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8680 static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b,
8681 vector unsigned char *__c) {
8682 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8685 static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b,
8686 unsigned char *__c) {
8687 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8690 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
8692 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8695 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
8696 unsigned char *__c) {
8697 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8700 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
8701 vector bool char *__c) {
8702 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8705 static void __ATTRS_o_ai vec_stl(vector short __a, int __b, vector short *__c) {
8706 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8709 static void __ATTRS_o_ai vec_stl(vector short __a, int __b, short *__c) {
8710 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8713 static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b,
8714 vector unsigned short *__c) {
8715 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8718 static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b,
8719 unsigned short *__c) {
8720 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8723 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b, short *__c) {
8724 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8727 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b,
8728 unsigned short *__c) {
8729 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8732 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b,
8733 vector bool short *__c) {
8734 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8737 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, short *__c) {
8738 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8741 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b,
8742 unsigned short *__c) {
8743 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8746 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, vector pixel *__c) {
8747 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8750 static void __ATTRS_o_ai vec_stl(vector int __a, int __b, vector int *__c) {
8751 __builtin_altivec_stvxl(__a, __b, __c);
8754 static void __ATTRS_o_ai vec_stl(vector int __a, int __b, int *__c) {
8755 __builtin_altivec_stvxl(__a, __b, __c);
8758 static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b,
8759 vector unsigned int *__c) {
8760 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8763 static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b,
8764 unsigned int *__c) {
8765 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8768 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b, int *__c) {
8769 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8772 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b,
8773 unsigned int *__c) {
8774 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8777 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b,
8778 vector bool int *__c) {
8779 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8782 static void __ATTRS_o_ai vec_stl(vector float __a, int __b, vector float *__c) {
8783 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8786 static void __ATTRS_o_ai vec_stl(vector float __a, int __b, float *__c) {
8787 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8792 static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b,
8793 vector signed char *__c) {
8794 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8797 static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b,
8799 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8802 static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b,
8803 vector unsigned char *__c) {
8804 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8807 static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b,
8808 unsigned char *__c) {
8809 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8812 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
8814 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8817 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
8818 unsigned char *__c) {
8819 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8822 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
8823 vector bool char *__c) {
8824 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8827 static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b,
8828 vector short *__c) {
8829 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8832 static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b, short *__c) {
8833 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8836 static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b,
8837 vector unsigned short *__c) {
8838 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8841 static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b,
8842 unsigned short *__c) {
8843 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8846 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b, short *__c) {
8847 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8850 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b,
8851 unsigned short *__c) {
8852 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8855 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b,
8856 vector bool short *__c) {
8857 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8860 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b, short *__c) {
8861 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8864 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b,
8865 unsigned short *__c) {
8866 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8869 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b,
8870 vector pixel *__c) {
8871 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8874 static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, vector int *__c) {
8875 __builtin_altivec_stvxl(__a, __b, __c);
8878 static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, int *__c) {
8879 __builtin_altivec_stvxl(__a, __b, __c);
8882 static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b,
8883 vector unsigned int *__c) {
8884 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8887 static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b,
8888 unsigned int *__c) {
8889 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8892 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b, int *__c) {
8893 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8896 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b,
8897 unsigned int *__c) {
8898 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8901 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b,
8902 vector bool int *__c) {
8903 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8906 static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b,
8907 vector float *__c) {
8908 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8911 static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b, float *__c) {
8912 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8917 static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a,
8918 vector signed char __b) {
8922 static vector signed char __ATTRS_o_ai vec_sub(vector bool char __a,
8923 vector signed char __b) {
8924 return (vector signed char)__a - __b;
8927 static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a,
8928 vector bool char __b) {
8929 return __a - (vector signed char)__b;
8932 static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a,
8933 vector unsigned char __b) {
8937 static vector unsigned char __ATTRS_o_ai vec_sub(vector bool char __a,
8938 vector unsigned char __b) {
8939 return (vector unsigned char)__a - __b;
8942 static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a,
8943 vector bool char __b) {
8944 return __a - (vector unsigned char)__b;
8947 static vector short __ATTRS_o_ai vec_sub(vector short __a, vector short __b) {
8951 static vector short __ATTRS_o_ai vec_sub(vector bool short __a,
8953 return (vector short)__a - __b;
8956 static vector short __ATTRS_o_ai vec_sub(vector short __a,
8957 vector bool short __b) {
8958 return __a - (vector short)__b;
8961 static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a,
8962 vector unsigned short __b) {
8966 static vector unsigned short __ATTRS_o_ai vec_sub(vector bool short __a,
8967 vector unsigned short __b) {
8968 return (vector unsigned short)__a - __b;
8971 static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a,
8972 vector bool short __b) {
8973 return __a - (vector unsigned short)__b;
8976 static vector int __ATTRS_o_ai vec_sub(vector int __a, vector int __b) {
8980 static vector int __ATTRS_o_ai vec_sub(vector bool int __a, vector int __b) {
8981 return (vector int)__a - __b;
8984 static vector int __ATTRS_o_ai vec_sub(vector int __a, vector bool int __b) {
8985 return __a - (vector int)__b;
8988 static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a,
8989 vector unsigned int __b) {
8993 static vector unsigned int __ATTRS_o_ai vec_sub(vector bool int __a,
8994 vector unsigned int __b) {
8995 return (vector unsigned int)__a - __b;
8998 static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a,
8999 vector bool int __b) {
9000 return __a - (vector unsigned int)__b;
9003 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9004 static vector signed __int128 __ATTRS_o_ai vec_sub(vector signed __int128 __a,
9005 vector signed __int128 __b) {
9009 static vector unsigned __int128 __ATTRS_o_ai
9010 vec_sub(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9013 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9015 static vector float __ATTRS_o_ai vec_sub(vector float __a, vector float __b) {
9020 static vector double __ATTRS_o_ai
9021 vec_sub(vector double __a, vector double __b) {
9028 #define __builtin_altivec_vsububm vec_vsububm
9030 static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a,
9031 vector signed char __b) {
9035 static vector signed char __ATTRS_o_ai vec_vsububm(vector bool char __a,
9036 vector signed char __b) {
9037 return (vector signed char)__a - __b;
9040 static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a,
9041 vector bool char __b) {
9042 return __a - (vector signed char)__b;
9045 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a,
9046 vector unsigned char __b) {
9050 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector bool char __a,
9051 vector unsigned char __b) {
9052 return (vector unsigned char)__a - __b;
9055 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a,
9056 vector bool char __b) {
9057 return __a - (vector unsigned char)__b;
9062 #define __builtin_altivec_vsubuhm vec_vsubuhm
9064 static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a,
9069 static vector short __ATTRS_o_ai vec_vsubuhm(vector bool short __a,
9071 return (vector short)__a - __b;
9074 static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a,
9075 vector bool short __b) {
9076 return __a - (vector short)__b;
9079 static vector unsigned short __ATTRS_o_ai
9080 vec_vsubuhm(vector unsigned short __a, vector unsigned short __b) {
9084 static vector unsigned short __ATTRS_o_ai
9085 vec_vsubuhm(vector bool short __a, vector unsigned short __b) {
9086 return (vector unsigned short)__a - __b;
9089 static vector unsigned short __ATTRS_o_ai vec_vsubuhm(vector unsigned short __a,
9090 vector bool short __b) {
9091 return __a - (vector unsigned short)__b;
9096 #define __builtin_altivec_vsubuwm vec_vsubuwm
9098 static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b) {
9102 static vector int __ATTRS_o_ai vec_vsubuwm(vector bool int __a,
9104 return (vector int)__a - __b;
9107 static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a,
9108 vector bool int __b) {
9109 return __a - (vector int)__b;
9112 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a,
9113 vector unsigned int __b) {
9117 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector bool int __a,
9118 vector unsigned int __b) {
9119 return (vector unsigned int)__a - __b;
9122 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a,
9123 vector bool int __b) {
9124 return __a - (vector unsigned int)__b;
9129 #define __builtin_altivec_vsubfp vec_vsubfp
9131 static vector float __attribute__((__always_inline__))
9132 vec_vsubfp(vector float __a, vector float __b) {
9138 static vector unsigned int __ATTRS_o_ai vec_subc(vector unsigned int __a,
9139 vector unsigned int __b) {
9140 return __builtin_altivec_vsubcuw(__a, __b);
9143 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9144 static vector unsigned __int128 __ATTRS_o_ai
9145 vec_subc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9146 return __builtin_altivec_vsubcuq(__a, __b);
9149 static vector signed __int128 __ATTRS_o_ai
9150 vec_subc(vector signed __int128 __a, vector signed __int128 __b) {
9151 return __builtin_altivec_vsubcuq(__a, __b);
9153 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9157 static vector unsigned int __attribute__((__always_inline__))
9158 vec_vsubcuw(vector unsigned int __a, vector unsigned int __b) {
9159 return __builtin_altivec_vsubcuw(__a, __b);
9164 static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a,
9165 vector signed char __b) {
9166 return __builtin_altivec_vsubsbs(__a, __b);
9169 static vector signed char __ATTRS_o_ai vec_subs(vector bool char __a,
9170 vector signed char __b) {
9171 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
9174 static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a,
9175 vector bool char __b) {
9176 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
9179 static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a,
9180 vector unsigned char __b) {
9181 return __builtin_altivec_vsububs(__a, __b);
9184 static vector unsigned char __ATTRS_o_ai vec_subs(vector bool char __a,
9185 vector unsigned char __b) {
9186 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
9189 static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a,
9190 vector bool char __b) {
9191 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
9194 static vector short __ATTRS_o_ai vec_subs(vector short __a, vector short __b) {
9195 return __builtin_altivec_vsubshs(__a, __b);
9198 static vector short __ATTRS_o_ai vec_subs(vector bool short __a,
9200 return __builtin_altivec_vsubshs((vector short)__a, __b);
9203 static vector short __ATTRS_o_ai vec_subs(vector short __a,
9204 vector bool short __b) {
9205 return __builtin_altivec_vsubshs(__a, (vector short)__b);
9208 static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a,
9209 vector unsigned short __b) {
9210 return __builtin_altivec_vsubuhs(__a, __b);
9213 static vector unsigned short __ATTRS_o_ai vec_subs(vector bool short __a,
9214 vector unsigned short __b) {
9215 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
9218 static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a,
9219 vector bool short __b) {
9220 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
9223 static vector int __ATTRS_o_ai vec_subs(vector int __a, vector int __b) {
9224 return __builtin_altivec_vsubsws(__a, __b);
9227 static vector int __ATTRS_o_ai vec_subs(vector bool int __a, vector int __b) {
9228 return __builtin_altivec_vsubsws((vector int)__a, __b);
9231 static vector int __ATTRS_o_ai vec_subs(vector int __a, vector bool int __b) {
9232 return __builtin_altivec_vsubsws(__a, (vector int)__b);
9235 static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a,
9236 vector unsigned int __b) {
9237 return __builtin_altivec_vsubuws(__a, __b);
9240 static vector unsigned int __ATTRS_o_ai vec_subs(vector bool int __a,
9241 vector unsigned int __b) {
9242 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
9245 static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a,
9246 vector bool int __b) {
9247 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
9252 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a,
9253 vector signed char __b) {
9254 return __builtin_altivec_vsubsbs(__a, __b);
9257 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector bool char __a,
9258 vector signed char __b) {
9259 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
9262 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a,
9263 vector bool char __b) {
9264 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
9269 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a,
9270 vector unsigned char __b) {
9271 return __builtin_altivec_vsububs(__a, __b);
9274 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector bool char __a,
9275 vector unsigned char __b) {
9276 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
9279 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a,
9280 vector bool char __b) {
9281 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
9286 static vector short __ATTRS_o_ai vec_vsubshs(vector short __a,
9288 return __builtin_altivec_vsubshs(__a, __b);
9291 static vector short __ATTRS_o_ai vec_vsubshs(vector bool short __a,
9293 return __builtin_altivec_vsubshs((vector short)__a, __b);
9296 static vector short __ATTRS_o_ai vec_vsubshs(vector short __a,
9297 vector bool short __b) {
9298 return __builtin_altivec_vsubshs(__a, (vector short)__b);
9303 static vector unsigned short __ATTRS_o_ai
9304 vec_vsubuhs(vector unsigned short __a, vector unsigned short __b) {
9305 return __builtin_altivec_vsubuhs(__a, __b);
9308 static vector unsigned short __ATTRS_o_ai
9309 vec_vsubuhs(vector bool short __a, vector unsigned short __b) {
9310 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
9313 static vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a,
9314 vector bool short __b) {
9315 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
9320 static vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector int __b) {
9321 return __builtin_altivec_vsubsws(__a, __b);
9324 static vector int __ATTRS_o_ai vec_vsubsws(vector bool int __a,
9326 return __builtin_altivec_vsubsws((vector int)__a, __b);
9329 static vector int __ATTRS_o_ai vec_vsubsws(vector int __a,
9330 vector bool int __b) {
9331 return __builtin_altivec_vsubsws(__a, (vector int)__b);
9336 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a,
9337 vector unsigned int __b) {
9338 return __builtin_altivec_vsubuws(__a, __b);
9341 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector bool int __a,
9342 vector unsigned int __b) {
9343 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
9346 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a,
9347 vector bool int __b) {
9348 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
9351 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9354 static vector signed __int128 __ATTRS_o_ai
9355 vec_vsubuqm(vector signed __int128 __a, vector signed __int128 __b) {
9359 static vector unsigned __int128 __ATTRS_o_ai
9360 vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9366 static vector signed __int128 __ATTRS_o_ai
9367 vec_vsubeuqm(vector signed __int128 __a, vector signed __int128 __b,
9368 vector signed __int128 __c) {
9369 return __builtin_altivec_vsubeuqm(__a, __b, __c);
9372 static vector unsigned __int128 __ATTRS_o_ai
9373 vec_vsubeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
9374 vector unsigned __int128 __c) {
9375 return __builtin_altivec_vsubeuqm(__a, __b, __c);
9380 static vector signed __int128 __ATTRS_o_ai
9381 vec_vsubcuq(vector signed __int128 __a, vector signed __int128 __b) {
9382 return __builtin_altivec_vsubcuq(__a, __b);
9385 static vector unsigned __int128 __ATTRS_o_ai
9386 vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9387 return __builtin_altivec_vsubcuq(__a, __b);
9392 static vector signed __int128 __ATTRS_o_ai
9393 vec_vsubecuq(vector signed __int128 __a, vector signed __int128 __b,
9394 vector signed __int128 __c) {
9395 return __builtin_altivec_vsubecuq(__a, __b, __c);
9398 static vector unsigned __int128 __ATTRS_o_ai
9399 vec_vsubecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
9400 vector unsigned __int128 __c) {
9401 return __builtin_altivec_vsubecuq(__a, __b, __c);
9403 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9407 static vector int __ATTRS_o_ai vec_sum4s(vector signed char __a,
9409 return __builtin_altivec_vsum4sbs(__a, __b);
9412 static vector unsigned int __ATTRS_o_ai vec_sum4s(vector unsigned char __a,
9413 vector unsigned int __b) {
9414 return __builtin_altivec_vsum4ubs(__a, __b);
9417 static vector int __ATTRS_o_ai vec_sum4s(vector signed short __a,
9419 return __builtin_altivec_vsum4shs(__a, __b);
9424 static vector int __attribute__((__always_inline__))
9425 vec_vsum4sbs(vector signed char __a, vector int __b) {
9426 return __builtin_altivec_vsum4sbs(__a, __b);
9431 static vector unsigned int __attribute__((__always_inline__))
9432 vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b) {
9433 return __builtin_altivec_vsum4ubs(__a, __b);
9438 static vector int __attribute__((__always_inline__))
9439 vec_vsum4shs(vector signed short __a, vector int __b) {
9440 return __builtin_altivec_vsum4shs(__a, __b);
9445 /* The vsum2sws instruction has a big-endian bias, so that the second
9446 input vector and the result always reference big-endian elements
9447 1 and 3 (little-endian element 0 and 2). For ease of porting the
9448 programmer wants elements 1 and 3 in both cases, so for little
9449 endian we must perform some permutes. */
9451 static vector signed int __attribute__((__always_inline__))
9452 vec_sum2s(vector int __a, vector int __b) {
9453 #ifdef __LITTLE_ENDIAN__
9454 vector int __c = (vector signed int)vec_perm(
9455 __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9457 __c = __builtin_altivec_vsum2sws(__a, __c);
9458 return (vector signed int)vec_perm(
9459 __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9462 return __builtin_altivec_vsum2sws(__a, __b);
9468 static vector signed int __attribute__((__always_inline__))
9469 vec_vsum2sws(vector int __a, vector int __b) {
9470 #ifdef __LITTLE_ENDIAN__
9471 vector int __c = (vector signed int)vec_perm(
9472 __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9474 __c = __builtin_altivec_vsum2sws(__a, __c);
9475 return (vector signed int)vec_perm(
9476 __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9479 return __builtin_altivec_vsum2sws(__a, __b);
9485 /* The vsumsws instruction has a big-endian bias, so that the second
9486 input vector and the result always reference big-endian element 3
9487 (little-endian element 0). For ease of porting the programmer
9488 wants element 3 in both cases, so for little endian we must perform
9491 static vector signed int __attribute__((__always_inline__))
9492 vec_sums(vector signed int __a, vector signed int __b) {
9493 #ifdef __LITTLE_ENDIAN__
9494 __b = (vector signed int)vec_splat(__b, 3);
9495 __b = __builtin_altivec_vsumsws(__a, __b);
9496 return (vector signed int)(0, 0, 0, __b[0]);
9498 return __builtin_altivec_vsumsws(__a, __b);
9504 static vector signed int __attribute__((__always_inline__))
9505 vec_vsumsws(vector signed int __a, vector signed int __b) {
9506 #ifdef __LITTLE_ENDIAN__
9507 __b = (vector signed int)vec_splat(__b, 3);
9508 __b = __builtin_altivec_vsumsws(__a, __b);
9509 return (vector signed int)(0, 0, 0, __b[0]);
9511 return __builtin_altivec_vsumsws(__a, __b);
9517 static vector float __ATTRS_o_ai
9518 vec_trunc(vector float __a) {
9520 return __builtin_vsx_xvrspiz(__a);
9522 return __builtin_altivec_vrfiz(__a);
9527 static vector double __ATTRS_o_ai vec_trunc(vector double __a) {
9528 return __builtin_vsx_xvrdpiz(__a);
9534 static vector float __attribute__((__always_inline__))
9535 vec_vrfiz(vector float __a) {
9536 return __builtin_altivec_vrfiz(__a);
9541 /* The vector unpack instructions all have a big-endian bias, so for
9542 little endian we must reverse the meanings of "high" and "low." */
9544 static vector short __ATTRS_o_ai vec_unpackh(vector signed char __a) {
9545 #ifdef __LITTLE_ENDIAN__
9546 return __builtin_altivec_vupklsb((vector char)__a);
9548 return __builtin_altivec_vupkhsb((vector char)__a);
9552 static vector bool short __ATTRS_o_ai vec_unpackh(vector bool char __a) {
9553 #ifdef __LITTLE_ENDIAN__
9554 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9556 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9560 static vector int __ATTRS_o_ai vec_unpackh(vector short __a) {
9561 #ifdef __LITTLE_ENDIAN__
9562 return __builtin_altivec_vupklsh(__a);
9564 return __builtin_altivec_vupkhsh(__a);
9568 static vector bool int __ATTRS_o_ai vec_unpackh(vector bool short __a) {
9569 #ifdef __LITTLE_ENDIAN__
9570 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9572 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9576 static vector unsigned int __ATTRS_o_ai vec_unpackh(vector pixel __a) {
9577 #ifdef __LITTLE_ENDIAN__
9578 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9580 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9584 #ifdef __POWER8_VECTOR__
9585 static vector long long __ATTRS_o_ai vec_unpackh(vector int __a) {
9586 #ifdef __LITTLE_ENDIAN__
9587 return __builtin_altivec_vupklsw(__a);
9589 return __builtin_altivec_vupkhsw(__a);
9593 static vector bool long long __ATTRS_o_ai vec_unpackh(vector bool int __a) {
9594 #ifdef __LITTLE_ENDIAN__
9595 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9597 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9604 static vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a) {
9605 #ifdef __LITTLE_ENDIAN__
9606 return __builtin_altivec_vupklsb((vector char)__a);
9608 return __builtin_altivec_vupkhsb((vector char)__a);
9612 static vector bool short __ATTRS_o_ai vec_vupkhsb(vector bool char __a) {
9613 #ifdef __LITTLE_ENDIAN__
9614 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9616 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9622 static vector int __ATTRS_o_ai vec_vupkhsh(vector short __a) {
9623 #ifdef __LITTLE_ENDIAN__
9624 return __builtin_altivec_vupklsh(__a);
9626 return __builtin_altivec_vupkhsh(__a);
9630 static vector bool int __ATTRS_o_ai vec_vupkhsh(vector bool short __a) {
9631 #ifdef __LITTLE_ENDIAN__
9632 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9634 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9638 static vector unsigned int __ATTRS_o_ai vec_vupkhsh(vector pixel __a) {
9639 #ifdef __LITTLE_ENDIAN__
9640 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9642 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9648 #ifdef __POWER8_VECTOR__
9649 static vector long long __ATTRS_o_ai vec_vupkhsw(vector int __a) {
9650 #ifdef __LITTLE_ENDIAN__
9651 return __builtin_altivec_vupklsw(__a);
9653 return __builtin_altivec_vupkhsw(__a);
9657 static vector bool long long __ATTRS_o_ai vec_vupkhsw(vector bool int __a) {
9658 #ifdef __LITTLE_ENDIAN__
9659 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9661 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9668 static vector short __ATTRS_o_ai vec_unpackl(vector signed char __a) {
9669 #ifdef __LITTLE_ENDIAN__
9670 return __builtin_altivec_vupkhsb((vector char)__a);
9672 return __builtin_altivec_vupklsb((vector char)__a);
9676 static vector bool short __ATTRS_o_ai vec_unpackl(vector bool char __a) {
9677 #ifdef __LITTLE_ENDIAN__
9678 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9680 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9684 static vector int __ATTRS_o_ai vec_unpackl(vector short __a) {
9685 #ifdef __LITTLE_ENDIAN__
9686 return __builtin_altivec_vupkhsh(__a);
9688 return __builtin_altivec_vupklsh(__a);
9692 static vector bool int __ATTRS_o_ai vec_unpackl(vector bool short __a) {
9693 #ifdef __LITTLE_ENDIAN__
9694 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9696 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9700 static vector unsigned int __ATTRS_o_ai vec_unpackl(vector pixel __a) {
9701 #ifdef __LITTLE_ENDIAN__
9702 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9704 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9708 #ifdef __POWER8_VECTOR__
9709 static vector long long __ATTRS_o_ai vec_unpackl(vector int __a) {
9710 #ifdef __LITTLE_ENDIAN__
9711 return __builtin_altivec_vupkhsw(__a);
9713 return __builtin_altivec_vupklsw(__a);
9717 static vector bool long long __ATTRS_o_ai vec_unpackl(vector bool int __a) {
9718 #ifdef __LITTLE_ENDIAN__
9719 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9721 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9728 static vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a) {
9729 #ifdef __LITTLE_ENDIAN__
9730 return __builtin_altivec_vupkhsb((vector char)__a);
9732 return __builtin_altivec_vupklsb((vector char)__a);
9736 static vector bool short __ATTRS_o_ai vec_vupklsb(vector bool char __a) {
9737 #ifdef __LITTLE_ENDIAN__
9738 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9740 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9746 static vector int __ATTRS_o_ai vec_vupklsh(vector short __a) {
9747 #ifdef __LITTLE_ENDIAN__
9748 return __builtin_altivec_vupkhsh(__a);
9750 return __builtin_altivec_vupklsh(__a);
9754 static vector bool int __ATTRS_o_ai vec_vupklsh(vector bool short __a) {
9755 #ifdef __LITTLE_ENDIAN__
9756 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9758 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9762 static vector unsigned int __ATTRS_o_ai vec_vupklsh(vector pixel __a) {
9763 #ifdef __LITTLE_ENDIAN__
9764 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9766 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9772 #ifdef __POWER8_VECTOR__
9773 static vector long long __ATTRS_o_ai vec_vupklsw(vector int __a) {
9774 #ifdef __LITTLE_ENDIAN__
9775 return __builtin_altivec_vupkhsw(__a);
9777 return __builtin_altivec_vupklsw(__a);
9781 static vector bool long long __ATTRS_o_ai vec_vupklsw(vector bool int __a) {
9782 #ifdef __LITTLE_ENDIAN__
9783 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9785 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9794 static vector signed int __ATTRS_o_ai vec_vsx_ld(int __a,
9795 const vector signed int *__b) {
9796 return (vector signed int)__builtin_vsx_lxvw4x(__a, __b);
9799 static vector unsigned int __ATTRS_o_ai
9800 vec_vsx_ld(int __a, const vector unsigned int *__b) {
9801 return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b);
9804 static vector float __ATTRS_o_ai vec_vsx_ld(int __a, const vector float *__b) {
9805 return (vector float)__builtin_vsx_lxvw4x(__a, __b);
9808 static vector signed long long __ATTRS_o_ai
9809 vec_vsx_ld(int __a, const vector signed long long *__b) {
9810 return (vector signed long long)__builtin_vsx_lxvd2x(__a, __b);
9813 static vector unsigned long long __ATTRS_o_ai
9814 vec_vsx_ld(int __a, const vector unsigned long long *__b) {
9815 return (vector unsigned long long)__builtin_vsx_lxvd2x(__a, __b);
9818 static vector double __ATTRS_o_ai vec_vsx_ld(int __a,
9819 const vector double *__b) {
9820 return (vector double)__builtin_vsx_lxvd2x(__a, __b);
9829 static void __ATTRS_o_ai vec_vsx_st(vector signed int __a, int __b,
9830 vector signed int *__c) {
9831 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9834 static void __ATTRS_o_ai vec_vsx_st(vector unsigned int __a, int __b,
9835 vector unsigned int *__c) {
9836 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9839 static void __ATTRS_o_ai vec_vsx_st(vector float __a, int __b,
9840 vector float *__c) {
9841 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9844 static void __ATTRS_o_ai vec_vsx_st(vector signed long long __a, int __b,
9845 vector signed long long *__c) {
9846 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9849 static void __ATTRS_o_ai vec_vsx_st(vector unsigned long long __a, int __b,
9850 vector unsigned long long *__c) {
9851 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9854 static void __ATTRS_o_ai vec_vsx_st(vector double __a, int __b,
9855 vector double *__c) {
9856 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9863 #define __builtin_altivec_vxor vec_xor
9865 static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a,
9866 vector signed char __b) {
9870 static vector signed char __ATTRS_o_ai vec_xor(vector bool char __a,
9871 vector signed char __b) {
9872 return (vector signed char)__a ^ __b;
9875 static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a,
9876 vector bool char __b) {
9877 return __a ^ (vector signed char)__b;
9880 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
9881 vector unsigned char __b) {
9885 static vector unsigned char __ATTRS_o_ai vec_xor(vector bool char __a,
9886 vector unsigned char __b) {
9887 return (vector unsigned char)__a ^ __b;
9890 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
9891 vector bool char __b) {
9892 return __a ^ (vector unsigned char)__b;
9895 static vector bool char __ATTRS_o_ai vec_xor(vector bool char __a,
9896 vector bool char __b) {
9900 static vector short __ATTRS_o_ai vec_xor(vector short __a, vector short __b) {
9904 static vector short __ATTRS_o_ai vec_xor(vector bool short __a,
9906 return (vector short)__a ^ __b;
9909 static vector short __ATTRS_o_ai vec_xor(vector short __a,
9910 vector bool short __b) {
9911 return __a ^ (vector short)__b;
9914 static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a,
9915 vector unsigned short __b) {
9919 static vector unsigned short __ATTRS_o_ai vec_xor(vector bool short __a,
9920 vector unsigned short __b) {
9921 return (vector unsigned short)__a ^ __b;
9924 static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a,
9925 vector bool short __b) {
9926 return __a ^ (vector unsigned short)__b;
9929 static vector bool short __ATTRS_o_ai vec_xor(vector bool short __a,
9930 vector bool short __b) {
9934 static vector int __ATTRS_o_ai vec_xor(vector int __a, vector int __b) {
9938 static vector int __ATTRS_o_ai vec_xor(vector bool int __a, vector int __b) {
9939 return (vector int)__a ^ __b;
9942 static vector int __ATTRS_o_ai vec_xor(vector int __a, vector bool int __b) {
9943 return __a ^ (vector int)__b;
9946 static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a,
9947 vector unsigned int __b) {
9951 static vector unsigned int __ATTRS_o_ai vec_xor(vector bool int __a,
9952 vector unsigned int __b) {
9953 return (vector unsigned int)__a ^ __b;
9956 static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a,
9957 vector bool int __b) {
9958 return __a ^ (vector unsigned int)__b;
9961 static vector bool int __ATTRS_o_ai vec_xor(vector bool int __a,
9962 vector bool int __b) {
9966 static vector float __ATTRS_o_ai vec_xor(vector float __a, vector float __b) {
9967 vector unsigned int __res =
9968 (vector unsigned int)__a ^ (vector unsigned int)__b;
9969 return (vector float)__res;
9972 static vector float __ATTRS_o_ai vec_xor(vector bool int __a,
9974 vector unsigned int __res =
9975 (vector unsigned int)__a ^ (vector unsigned int)__b;
9976 return (vector float)__res;
9979 static vector float __ATTRS_o_ai vec_xor(vector float __a,
9980 vector bool int __b) {
9981 vector unsigned int __res =
9982 (vector unsigned int)__a ^ (vector unsigned int)__b;
9983 return (vector float)__res;
9987 static vector signed long long __ATTRS_o_ai
9988 vec_xor(vector signed long long __a, vector signed long long __b) {
9992 static vector signed long long __ATTRS_o_ai
9993 vec_xor(vector bool long long __a, vector signed long long __b) {
9994 return (vector signed long long)__a ^ __b;
9997 static vector signed long long __ATTRS_o_ai vec_xor(vector signed long long __a,
9998 vector bool long long __b) {
9999 return __a ^ (vector signed long long)__b;
10002 static vector unsigned long long __ATTRS_o_ai
10003 vec_xor(vector unsigned long long __a, vector unsigned long long __b) {
10007 static vector unsigned long long __ATTRS_o_ai
10008 vec_xor(vector bool long long __a, vector unsigned long long __b) {
10009 return (vector unsigned long long)__a ^ __b;
10012 static vector unsigned long long __ATTRS_o_ai
10013 vec_xor(vector unsigned long long __a, vector bool long long __b) {
10014 return __a ^ (vector unsigned long long)__b;
10017 static vector bool long long __ATTRS_o_ai vec_xor(vector bool long long __a,
10018 vector bool long long __b) {
10022 static vector double __ATTRS_o_ai
10023 vec_xor(vector double __a, vector double __b) {
10024 return (vector double)((vector unsigned long long)__a ^
10025 (vector unsigned long long)__b);
10028 static vector double __ATTRS_o_ai
10029 vec_xor(vector double __a, vector bool long long __b) {
10030 return (vector double)((vector unsigned long long)__a ^
10031 (vector unsigned long long) __b);
10034 static vector double __ATTRS_o_ai
10035 vec_xor(vector bool long long __a, vector double __b) {
10036 return (vector double)((vector unsigned long long)__a ^
10037 (vector unsigned long long)__b);
10043 static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a,
10044 vector signed char __b) {
10048 static vector signed char __ATTRS_o_ai vec_vxor(vector bool char __a,
10049 vector signed char __b) {
10050 return (vector signed char)__a ^ __b;
10053 static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a,
10054 vector bool char __b) {
10055 return __a ^ (vector signed char)__b;
10058 static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a,
10059 vector unsigned char __b) {
10063 static vector unsigned char __ATTRS_o_ai vec_vxor(vector bool char __a,
10064 vector unsigned char __b) {
10065 return (vector unsigned char)__a ^ __b;
10068 static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a,
10069 vector bool char __b) {
10070 return __a ^ (vector unsigned char)__b;
10073 static vector bool char __ATTRS_o_ai vec_vxor(vector bool char __a,
10074 vector bool char __b) {
10078 static vector short __ATTRS_o_ai vec_vxor(vector short __a, vector short __b) {
10082 static vector short __ATTRS_o_ai vec_vxor(vector bool short __a,
10083 vector short __b) {
10084 return (vector short)__a ^ __b;
10087 static vector short __ATTRS_o_ai vec_vxor(vector short __a,
10088 vector bool short __b) {
10089 return __a ^ (vector short)__b;
10092 static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a,
10093 vector unsigned short __b) {
10097 static vector unsigned short __ATTRS_o_ai vec_vxor(vector bool short __a,
10098 vector unsigned short __b) {
10099 return (vector unsigned short)__a ^ __b;
10102 static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a,
10103 vector bool short __b) {
10104 return __a ^ (vector unsigned short)__b;
10107 static vector bool short __ATTRS_o_ai vec_vxor(vector bool short __a,
10108 vector bool short __b) {
10112 static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector int __b) {
10116 static vector int __ATTRS_o_ai vec_vxor(vector bool int __a, vector int __b) {
10117 return (vector int)__a ^ __b;
10120 static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector bool int __b) {
10121 return __a ^ (vector int)__b;
10124 static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a,
10125 vector unsigned int __b) {
10129 static vector unsigned int __ATTRS_o_ai vec_vxor(vector bool int __a,
10130 vector unsigned int __b) {
10131 return (vector unsigned int)__a ^ __b;
10134 static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a,
10135 vector bool int __b) {
10136 return __a ^ (vector unsigned int)__b;
10139 static vector bool int __ATTRS_o_ai vec_vxor(vector bool int __a,
10140 vector bool int __b) {
10144 static vector float __ATTRS_o_ai vec_vxor(vector float __a, vector float __b) {
10145 vector unsigned int __res =
10146 (vector unsigned int)__a ^ (vector unsigned int)__b;
10147 return (vector float)__res;
10150 static vector float __ATTRS_o_ai vec_vxor(vector bool int __a,
10151 vector float __b) {
10152 vector unsigned int __res =
10153 (vector unsigned int)__a ^ (vector unsigned int)__b;
10154 return (vector float)__res;
10157 static vector float __ATTRS_o_ai vec_vxor(vector float __a,
10158 vector bool int __b) {
10159 vector unsigned int __res =
10160 (vector unsigned int)__a ^ (vector unsigned int)__b;
10161 return (vector float)__res;
10165 static vector signed long long __ATTRS_o_ai
10166 vec_vxor(vector signed long long __a, vector signed long long __b) {
10170 static vector signed long long __ATTRS_o_ai
10171 vec_vxor(vector bool long long __a, vector signed long long __b) {
10172 return (vector signed long long)__a ^ __b;
10175 static vector signed long long __ATTRS_o_ai
10176 vec_vxor(vector signed long long __a, vector bool long long __b) {
10177 return __a ^ (vector signed long long)__b;
10180 static vector unsigned long long __ATTRS_o_ai
10181 vec_vxor(vector unsigned long long __a, vector unsigned long long __b) {
10185 static vector unsigned long long __ATTRS_o_ai
10186 vec_vxor(vector bool long long __a, vector unsigned long long __b) {
10187 return (vector unsigned long long)__a ^ __b;
10190 static vector unsigned long long __ATTRS_o_ai
10191 vec_vxor(vector unsigned long long __a, vector bool long long __b) {
10192 return __a ^ (vector unsigned long long)__b;
10195 static vector bool long long __ATTRS_o_ai vec_vxor(vector bool long long __a,
10196 vector bool long long __b) {
10201 /* ------------------------ extensions for CBEA ----------------------------- */
10205 static signed char __ATTRS_o_ai vec_extract(vector signed char __a, int __b) {
10209 static unsigned char __ATTRS_o_ai vec_extract(vector unsigned char __a,
10214 static short __ATTRS_o_ai vec_extract(vector short __a, int __b) {
10218 static unsigned short __ATTRS_o_ai vec_extract(vector unsigned short __a,
10223 static int __ATTRS_o_ai vec_extract(vector int __a, int __b) {
10227 static unsigned int __ATTRS_o_ai vec_extract(vector unsigned int __a, int __b) {
10231 static float __ATTRS_o_ai vec_extract(vector float __a, int __b) {
10237 static vector signed char __ATTRS_o_ai vec_insert(signed char __a,
10238 vector signed char __b,
10244 static vector unsigned char __ATTRS_o_ai vec_insert(unsigned char __a,
10245 vector unsigned char __b,
10251 static vector short __ATTRS_o_ai vec_insert(short __a, vector short __b,
10257 static vector unsigned short __ATTRS_o_ai vec_insert(unsigned short __a,
10258 vector unsigned short __b,
10264 static vector int __ATTRS_o_ai vec_insert(int __a, vector int __b, int __c) {
10269 static vector unsigned int __ATTRS_o_ai vec_insert(unsigned int __a,
10270 vector unsigned int __b,
10276 static vector float __ATTRS_o_ai vec_insert(float __a, vector float __b,
10284 static vector signed char __ATTRS_o_ai vec_lvlx(int __a,
10285 const signed char *__b) {
10286 return vec_perm(vec_ld(__a, __b), (vector signed char)(0),
10287 vec_lvsl(__a, __b));
10290 static vector signed char __ATTRS_o_ai vec_lvlx(int __a,
10291 const vector signed char *__b) {
10292 return vec_perm(vec_ld(__a, __b), (vector signed char)(0),
10293 vec_lvsl(__a, (unsigned char *)__b));
10296 static vector unsigned char __ATTRS_o_ai vec_lvlx(int __a,
10297 const unsigned char *__b) {
10298 return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0),
10299 vec_lvsl(__a, __b));
10302 static vector unsigned char __ATTRS_o_ai
10303 vec_lvlx(int __a, const vector unsigned char *__b) {
10304 return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0),
10305 vec_lvsl(__a, (unsigned char *)__b));
10308 static vector bool char __ATTRS_o_ai vec_lvlx(int __a,
10309 const vector bool char *__b) {
10310 return vec_perm(vec_ld(__a, __b), (vector bool char)(0),
10311 vec_lvsl(__a, (unsigned char *)__b));
10314 static vector short __ATTRS_o_ai vec_lvlx(int __a, const short *__b) {
10315 return vec_perm(vec_ld(__a, __b), (vector short)(0), vec_lvsl(__a, __b));
10318 static vector short __ATTRS_o_ai vec_lvlx(int __a, const vector short *__b) {
10319 return vec_perm(vec_ld(__a, __b), (vector short)(0),
10320 vec_lvsl(__a, (unsigned char *)__b));
10323 static vector unsigned short __ATTRS_o_ai vec_lvlx(int __a,
10324 const unsigned short *__b) {
10325 return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0),
10326 vec_lvsl(__a, __b));
10329 static vector unsigned short __ATTRS_o_ai
10330 vec_lvlx(int __a, const vector unsigned short *__b) {
10331 return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0),
10332 vec_lvsl(__a, (unsigned char *)__b));
10335 static vector bool short __ATTRS_o_ai vec_lvlx(int __a,
10336 const vector bool short *__b) {
10337 return vec_perm(vec_ld(__a, __b), (vector bool short)(0),
10338 vec_lvsl(__a, (unsigned char *)__b));
10341 static vector pixel __ATTRS_o_ai vec_lvlx(int __a, const vector pixel *__b) {
10342 return vec_perm(vec_ld(__a, __b), (vector pixel)(0),
10343 vec_lvsl(__a, (unsigned char *)__b));
10346 static vector int __ATTRS_o_ai vec_lvlx(int __a, const int *__b) {
10347 return vec_perm(vec_ld(__a, __b), (vector int)(0), vec_lvsl(__a, __b));
10350 static vector int __ATTRS_o_ai vec_lvlx(int __a, const vector int *__b) {
10351 return vec_perm(vec_ld(__a, __b), (vector int)(0),
10352 vec_lvsl(__a, (unsigned char *)__b));
10355 static vector unsigned int __ATTRS_o_ai vec_lvlx(int __a,
10356 const unsigned int *__b) {
10357 return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0),
10358 vec_lvsl(__a, __b));
10361 static vector unsigned int __ATTRS_o_ai
10362 vec_lvlx(int __a, const vector unsigned int *__b) {
10363 return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0),
10364 vec_lvsl(__a, (unsigned char *)__b));
10367 static vector bool int __ATTRS_o_ai vec_lvlx(int __a,
10368 const vector bool int *__b) {
10369 return vec_perm(vec_ld(__a, __b), (vector bool int)(0),
10370 vec_lvsl(__a, (unsigned char *)__b));
10373 static vector float __ATTRS_o_ai vec_lvlx(int __a, const float *__b) {
10374 return vec_perm(vec_ld(__a, __b), (vector float)(0), vec_lvsl(__a, __b));
10377 static vector float __ATTRS_o_ai vec_lvlx(int __a, const vector float *__b) {
10378 return vec_perm(vec_ld(__a, __b), (vector float)(0),
10379 vec_lvsl(__a, (unsigned char *)__b));
10384 static vector signed char __ATTRS_o_ai vec_lvlxl(int __a,
10385 const signed char *__b) {
10386 return vec_perm(vec_ldl(__a, __b), (vector signed char)(0),
10387 vec_lvsl(__a, __b));
10390 static vector signed char __ATTRS_o_ai
10391 vec_lvlxl(int __a, const vector signed char *__b) {
10392 return vec_perm(vec_ldl(__a, __b), (vector signed char)(0),
10393 vec_lvsl(__a, (unsigned char *)__b));
10396 static vector unsigned char __ATTRS_o_ai vec_lvlxl(int __a,
10397 const unsigned char *__b) {
10398 return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0),
10399 vec_lvsl(__a, __b));
10402 static vector unsigned char __ATTRS_o_ai
10403 vec_lvlxl(int __a, const vector unsigned char *__b) {
10404 return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0),
10405 vec_lvsl(__a, (unsigned char *)__b));
10408 static vector bool char __ATTRS_o_ai vec_lvlxl(int __a,
10409 const vector bool char *__b) {
10410 return vec_perm(vec_ldl(__a, __b), (vector bool char)(0),
10411 vec_lvsl(__a, (unsigned char *)__b));
10414 static vector short __ATTRS_o_ai vec_lvlxl(int __a, const short *__b) {
10415 return vec_perm(vec_ldl(__a, __b), (vector short)(0), vec_lvsl(__a, __b));
10418 static vector short __ATTRS_o_ai vec_lvlxl(int __a, const vector short *__b) {
10419 return vec_perm(vec_ldl(__a, __b), (vector short)(0),
10420 vec_lvsl(__a, (unsigned char *)__b));
10423 static vector unsigned short __ATTRS_o_ai vec_lvlxl(int __a,
10424 const unsigned short *__b) {
10425 return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0),
10426 vec_lvsl(__a, __b));
10429 static vector unsigned short __ATTRS_o_ai
10430 vec_lvlxl(int __a, const vector unsigned short *__b) {
10431 return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0),
10432 vec_lvsl(__a, (unsigned char *)__b));
10435 static vector bool short __ATTRS_o_ai vec_lvlxl(int __a,
10436 const vector bool short *__b) {
10437 return vec_perm(vec_ldl(__a, __b), (vector bool short)(0),
10438 vec_lvsl(__a, (unsigned char *)__b));
10441 static vector pixel __ATTRS_o_ai vec_lvlxl(int __a, const vector pixel *__b) {
10442 return vec_perm(vec_ldl(__a, __b), (vector pixel)(0),
10443 vec_lvsl(__a, (unsigned char *)__b));
10446 static vector int __ATTRS_o_ai vec_lvlxl(int __a, const int *__b) {
10447 return vec_perm(vec_ldl(__a, __b), (vector int)(0), vec_lvsl(__a, __b));
10450 static vector int __ATTRS_o_ai vec_lvlxl(int __a, const vector int *__b) {
10451 return vec_perm(vec_ldl(__a, __b), (vector int)(0),
10452 vec_lvsl(__a, (unsigned char *)__b));
10455 static vector unsigned int __ATTRS_o_ai vec_lvlxl(int __a,
10456 const unsigned int *__b) {
10457 return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0),
10458 vec_lvsl(__a, __b));
10461 static vector unsigned int __ATTRS_o_ai
10462 vec_lvlxl(int __a, const vector unsigned int *__b) {
10463 return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0),
10464 vec_lvsl(__a, (unsigned char *)__b));
10467 static vector bool int __ATTRS_o_ai vec_lvlxl(int __a,
10468 const vector bool int *__b) {
10469 return vec_perm(vec_ldl(__a, __b), (vector bool int)(0),
10470 vec_lvsl(__a, (unsigned char *)__b));
10473 static vector float __ATTRS_o_ai vec_lvlxl(int __a, const float *__b) {
10474 return vec_perm(vec_ldl(__a, __b), (vector float)(0), vec_lvsl(__a, __b));
10477 static vector float __ATTRS_o_ai vec_lvlxl(int __a, vector float *__b) {
10478 return vec_perm(vec_ldl(__a, __b), (vector float)(0),
10479 vec_lvsl(__a, (unsigned char *)__b));
10484 static vector signed char __ATTRS_o_ai vec_lvrx(int __a,
10485 const signed char *__b) {
10486 return vec_perm((vector signed char)(0), vec_ld(__a, __b),
10487 vec_lvsl(__a, __b));
10490 static vector signed char __ATTRS_o_ai vec_lvrx(int __a,
10491 const vector signed char *__b) {
10492 return vec_perm((vector signed char)(0), vec_ld(__a, __b),
10493 vec_lvsl(__a, (unsigned char *)__b));
10496 static vector unsigned char __ATTRS_o_ai vec_lvrx(int __a,
10497 const unsigned char *__b) {
10498 return vec_perm((vector unsigned char)(0), vec_ld(__a, __b),
10499 vec_lvsl(__a, __b));
10502 static vector unsigned char __ATTRS_o_ai
10503 vec_lvrx(int __a, const vector unsigned char *__b) {
10504 return vec_perm((vector unsigned char)(0), vec_ld(__a, __b),
10505 vec_lvsl(__a, (unsigned char *)__b));
10508 static vector bool char __ATTRS_o_ai vec_lvrx(int __a,
10509 const vector bool char *__b) {
10510 return vec_perm((vector bool char)(0), vec_ld(__a, __b),
10511 vec_lvsl(__a, (unsigned char *)__b));
10514 static vector short __ATTRS_o_ai vec_lvrx(int __a, const short *__b) {
10515 return vec_perm((vector short)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
10518 static vector short __ATTRS_o_ai vec_lvrx(int __a, const vector short *__b) {
10519 return vec_perm((vector short)(0), vec_ld(__a, __b),
10520 vec_lvsl(__a, (unsigned char *)__b));
10523 static vector unsigned short __ATTRS_o_ai vec_lvrx(int __a,
10524 const unsigned short *__b) {
10525 return vec_perm((vector unsigned short)(0), vec_ld(__a, __b),
10526 vec_lvsl(__a, __b));
10529 static vector unsigned short __ATTRS_o_ai
10530 vec_lvrx(int __a, const vector unsigned short *__b) {
10531 return vec_perm((vector unsigned short)(0), vec_ld(__a, __b),
10532 vec_lvsl(__a, (unsigned char *)__b));
10535 static vector bool short __ATTRS_o_ai vec_lvrx(int __a,
10536 const vector bool short *__b) {
10537 return vec_perm((vector bool short)(0), vec_ld(__a, __b),
10538 vec_lvsl(__a, (unsigned char *)__b));
10541 static vector pixel __ATTRS_o_ai vec_lvrx(int __a, const vector pixel *__b) {
10542 return vec_perm((vector pixel)(0), vec_ld(__a, __b),
10543 vec_lvsl(__a, (unsigned char *)__b));
10546 static vector int __ATTRS_o_ai vec_lvrx(int __a, const int *__b) {
10547 return vec_perm((vector int)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
10550 static vector int __ATTRS_o_ai vec_lvrx(int __a, const vector int *__b) {
10551 return vec_perm((vector int)(0), vec_ld(__a, __b),
10552 vec_lvsl(__a, (unsigned char *)__b));
10555 static vector unsigned int __ATTRS_o_ai vec_lvrx(int __a,
10556 const unsigned int *__b) {
10557 return vec_perm((vector unsigned int)(0), vec_ld(__a, __b),
10558 vec_lvsl(__a, __b));
10561 static vector unsigned int __ATTRS_o_ai
10562 vec_lvrx(int __a, const vector unsigned int *__b) {
10563 return vec_perm((vector unsigned int)(0), vec_ld(__a, __b),
10564 vec_lvsl(__a, (unsigned char *)__b));
10567 static vector bool int __ATTRS_o_ai vec_lvrx(int __a,
10568 const vector bool int *__b) {
10569 return vec_perm((vector bool int)(0), vec_ld(__a, __b),
10570 vec_lvsl(__a, (unsigned char *)__b));
10573 static vector float __ATTRS_o_ai vec_lvrx(int __a, const float *__b) {
10574 return vec_perm((vector float)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
10577 static vector float __ATTRS_o_ai vec_lvrx(int __a, const vector float *__b) {
10578 return vec_perm((vector float)(0), vec_ld(__a, __b),
10579 vec_lvsl(__a, (unsigned char *)__b));
10584 static vector signed char __ATTRS_o_ai vec_lvrxl(int __a,
10585 const signed char *__b) {
10586 return vec_perm((vector signed char)(0), vec_ldl(__a, __b),
10587 vec_lvsl(__a, __b));
10590 static vector signed char __ATTRS_o_ai
10591 vec_lvrxl(int __a, const vector signed char *__b) {
10592 return vec_perm((vector signed char)(0), vec_ldl(__a, __b),
10593 vec_lvsl(__a, (unsigned char *)__b));
10596 static vector unsigned char __ATTRS_o_ai vec_lvrxl(int __a,
10597 const unsigned char *__b) {
10598 return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b),
10599 vec_lvsl(__a, __b));
10602 static vector unsigned char __ATTRS_o_ai
10603 vec_lvrxl(int __a, const vector unsigned char *__b) {
10604 return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b),
10605 vec_lvsl(__a, (unsigned char *)__b));
10608 static vector bool char __ATTRS_o_ai vec_lvrxl(int __a,
10609 const vector bool char *__b) {
10610 return vec_perm((vector bool char)(0), vec_ldl(__a, __b),
10611 vec_lvsl(__a, (unsigned char *)__b));
10614 static vector short __ATTRS_o_ai vec_lvrxl(int __a, const short *__b) {
10615 return vec_perm((vector short)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
10618 static vector short __ATTRS_o_ai vec_lvrxl(int __a, const vector short *__b) {
10619 return vec_perm((vector short)(0), vec_ldl(__a, __b),
10620 vec_lvsl(__a, (unsigned char *)__b));
10623 static vector unsigned short __ATTRS_o_ai vec_lvrxl(int __a,
10624 const unsigned short *__b) {
10625 return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b),
10626 vec_lvsl(__a, __b));
10629 static vector unsigned short __ATTRS_o_ai
10630 vec_lvrxl(int __a, const vector unsigned short *__b) {
10631 return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b),
10632 vec_lvsl(__a, (unsigned char *)__b));
10635 static vector bool short __ATTRS_o_ai vec_lvrxl(int __a,
10636 const vector bool short *__b) {
10637 return vec_perm((vector bool short)(0), vec_ldl(__a, __b),
10638 vec_lvsl(__a, (unsigned char *)__b));
10641 static vector pixel __ATTRS_o_ai vec_lvrxl(int __a, const vector pixel *__b) {
10642 return vec_perm((vector pixel)(0), vec_ldl(__a, __b),
10643 vec_lvsl(__a, (unsigned char *)__b));
10646 static vector int __ATTRS_o_ai vec_lvrxl(int __a, const int *__b) {
10647 return vec_perm((vector int)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
10650 static vector int __ATTRS_o_ai vec_lvrxl(int __a, const vector int *__b) {
10651 return vec_perm((vector int)(0), vec_ldl(__a, __b),
10652 vec_lvsl(__a, (unsigned char *)__b));
10655 static vector unsigned int __ATTRS_o_ai vec_lvrxl(int __a,
10656 const unsigned int *__b) {
10657 return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b),
10658 vec_lvsl(__a, __b));
10661 static vector unsigned int __ATTRS_o_ai
10662 vec_lvrxl(int __a, const vector unsigned int *__b) {
10663 return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b),
10664 vec_lvsl(__a, (unsigned char *)__b));
10667 static vector bool int __ATTRS_o_ai vec_lvrxl(int __a,
10668 const vector bool int *__b) {
10669 return vec_perm((vector bool int)(0), vec_ldl(__a, __b),
10670 vec_lvsl(__a, (unsigned char *)__b));
10673 static vector float __ATTRS_o_ai vec_lvrxl(int __a, const float *__b) {
10674 return vec_perm((vector float)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
10677 static vector float __ATTRS_o_ai vec_lvrxl(int __a, const vector float *__b) {
10678 return vec_perm((vector float)(0), vec_ldl(__a, __b),
10679 vec_lvsl(__a, (unsigned char *)__b));
10684 static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b,
10685 signed char *__c) {
10686 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10690 static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b,
10691 vector signed char *__c) {
10693 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10697 static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b,
10698 unsigned char *__c) {
10699 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10703 static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b,
10704 vector unsigned char *__c) {
10706 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10710 static void __ATTRS_o_ai vec_stvlx(vector bool char __a, int __b,
10711 vector bool char *__c) {
10713 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10717 static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b, short *__c) {
10718 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10722 static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b,
10723 vector short *__c) {
10725 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10729 static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b,
10730 unsigned short *__c) {
10731 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10735 static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b,
10736 vector unsigned short *__c) {
10738 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10742 static void __ATTRS_o_ai vec_stvlx(vector bool short __a, int __b,
10743 vector bool short *__c) {
10745 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10749 static void __ATTRS_o_ai vec_stvlx(vector pixel __a, int __b,
10750 vector pixel *__c) {
10752 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10756 static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, int *__c) {
10757 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10761 static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, vector int *__c) {
10763 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10767 static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b,
10768 unsigned int *__c) {
10769 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10773 static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b,
10774 vector unsigned int *__c) {
10776 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10780 static void __ATTRS_o_ai vec_stvlx(vector bool int __a, int __b,
10781 vector bool int *__c) {
10783 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10787 static void __ATTRS_o_ai vec_stvlx(vector float __a, int __b,
10788 vector float *__c) {
10790 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10796 static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b,
10797 signed char *__c) {
10798 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10802 static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b,
10803 vector signed char *__c) {
10805 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10809 static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b,
10810 unsigned char *__c) {
10811 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10815 static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b,
10816 vector unsigned char *__c) {
10818 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10822 static void __ATTRS_o_ai vec_stvlxl(vector bool char __a, int __b,
10823 vector bool char *__c) {
10825 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10829 static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b, short *__c) {
10830 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10834 static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b,
10835 vector short *__c) {
10837 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10841 static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b,
10842 unsigned short *__c) {
10843 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10847 static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b,
10848 vector unsigned short *__c) {
10850 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10854 static void __ATTRS_o_ai vec_stvlxl(vector bool short __a, int __b,
10855 vector bool short *__c) {
10857 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10861 static void __ATTRS_o_ai vec_stvlxl(vector pixel __a, int __b,
10862 vector pixel *__c) {
10864 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10868 static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, int *__c) {
10869 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10873 static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, vector int *__c) {
10875 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10879 static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b,
10880 unsigned int *__c) {
10881 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10885 static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b,
10886 vector unsigned int *__c) {
10888 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10892 static void __ATTRS_o_ai vec_stvlxl(vector bool int __a, int __b,
10893 vector bool int *__c) {
10895 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10899 static void __ATTRS_o_ai vec_stvlxl(vector float __a, int __b,
10900 vector float *__c) {
10902 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10908 static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b,
10909 signed char *__c) {
10910 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
10914 static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b,
10915 vector signed char *__c) {
10917 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10921 static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b,
10922 unsigned char *__c) {
10923 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
10927 static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b,
10928 vector unsigned char *__c) {
10930 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10934 static void __ATTRS_o_ai vec_stvrx(vector bool char __a, int __b,
10935 vector bool char *__c) {
10937 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10941 static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b, short *__c) {
10942 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
10946 static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b,
10947 vector short *__c) {
10949 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10953 static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b,
10954 unsigned short *__c) {
10955 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
10959 static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b,
10960 vector unsigned short *__c) {
10962 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10966 static void __ATTRS_o_ai vec_stvrx(vector bool short __a, int __b,
10967 vector bool short *__c) {
10969 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10973 static void __ATTRS_o_ai vec_stvrx(vector pixel __a, int __b,
10974 vector pixel *__c) {
10976 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10980 static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, int *__c) {
10981 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
10985 static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, vector int *__c) {
10987 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
10991 static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b,
10992 unsigned int *__c) {
10993 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
10997 static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b,
10998 vector unsigned int *__c) {
11000 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11004 static void __ATTRS_o_ai vec_stvrx(vector bool int __a, int __b,
11005 vector bool int *__c) {
11007 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11011 static void __ATTRS_o_ai vec_stvrx(vector float __a, int __b,
11012 vector float *__c) {
11014 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11020 static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b,
11021 signed char *__c) {
11022 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11026 static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b,
11027 vector signed char *__c) {
11029 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11033 static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b,
11034 unsigned char *__c) {
11035 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11039 static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b,
11040 vector unsigned char *__c) {
11042 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11046 static void __ATTRS_o_ai vec_stvrxl(vector bool char __a, int __b,
11047 vector bool char *__c) {
11049 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11053 static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b, short *__c) {
11054 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11058 static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b,
11059 vector short *__c) {
11061 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11065 static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b,
11066 unsigned short *__c) {
11067 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11071 static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b,
11072 vector unsigned short *__c) {
11074 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11078 static void __ATTRS_o_ai vec_stvrxl(vector bool short __a, int __b,
11079 vector bool short *__c) {
11081 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11085 static void __ATTRS_o_ai vec_stvrxl(vector pixel __a, int __b,
11086 vector pixel *__c) {
11088 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11092 static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, int *__c) {
11093 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11097 static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, vector int *__c) {
11099 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11103 static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b,
11104 unsigned int *__c) {
11105 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11109 static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b,
11110 vector unsigned int *__c) {
11112 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11116 static void __ATTRS_o_ai vec_stvrxl(vector bool int __a, int __b,
11117 vector bool int *__c) {
11119 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11123 static void __ATTRS_o_ai vec_stvrxl(vector float __a, int __b,
11124 vector float *__c) {
11126 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11132 static vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b) {
11133 vector signed char __res = (vector signed char)(0);
11138 static vector unsigned char __ATTRS_o_ai vec_promote(unsigned char __a,
11140 vector unsigned char __res = (vector unsigned char)(0);
11145 static vector short __ATTRS_o_ai vec_promote(short __a, int __b) {
11146 vector short __res = (vector short)(0);
11151 static vector unsigned short __ATTRS_o_ai vec_promote(unsigned short __a,
11153 vector unsigned short __res = (vector unsigned short)(0);
11158 static vector int __ATTRS_o_ai vec_promote(int __a, int __b) {
11159 vector int __res = (vector int)(0);
11164 static vector unsigned int __ATTRS_o_ai vec_promote(unsigned int __a, int __b) {
11165 vector unsigned int __res = (vector unsigned int)(0);
11170 static vector float __ATTRS_o_ai vec_promote(float __a, int __b) {
11171 vector float __res = (vector float)(0);
11178 static vector signed char __ATTRS_o_ai vec_splats(signed char __a) {
11179 return (vector signed char)(__a);
11182 static vector unsigned char __ATTRS_o_ai vec_splats(unsigned char __a) {
11183 return (vector unsigned char)(__a);
11186 static vector short __ATTRS_o_ai vec_splats(short __a) {
11187 return (vector short)(__a);
11190 static vector unsigned short __ATTRS_o_ai vec_splats(unsigned short __a) {
11191 return (vector unsigned short)(__a);
11194 static vector int __ATTRS_o_ai vec_splats(int __a) { return (vector int)(__a); }
11196 static vector unsigned int __ATTRS_o_ai vec_splats(unsigned int __a) {
11197 return (vector unsigned int)(__a);
11200 static vector float __ATTRS_o_ai vec_splats(float __a) {
11201 return (vector float)(__a);
11204 /* ----------------------------- predicates --------------------------------- */
11208 static int __ATTRS_o_ai vec_all_eq(vector signed char __a,
11209 vector signed char __b) {
11210 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11214 static int __ATTRS_o_ai vec_all_eq(vector signed char __a,
11215 vector bool char __b) {
11216 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11220 static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a,
11221 vector unsigned char __b) {
11222 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11226 static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a,
11227 vector bool char __b) {
11228 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11232 static int __ATTRS_o_ai vec_all_eq(vector bool char __a,
11233 vector signed char __b) {
11234 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11238 static int __ATTRS_o_ai vec_all_eq(vector bool char __a,
11239 vector unsigned char __b) {
11240 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11244 static int __ATTRS_o_ai vec_all_eq(vector bool char __a, vector bool char __b) {
11245 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11249 static int __ATTRS_o_ai vec_all_eq(vector short __a, vector short __b) {
11250 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, __b);
11253 static int __ATTRS_o_ai vec_all_eq(vector short __a, vector bool short __b) {
11254 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, (vector short)__b);
11257 static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a,
11258 vector unsigned short __b) {
11259 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11260 (vector short)__b);
11263 static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a,
11264 vector bool short __b) {
11265 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11266 (vector short)__b);
11269 static int __ATTRS_o_ai vec_all_eq(vector bool short __a, vector short __b) {
11270 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11271 (vector short)__b);
11274 static int __ATTRS_o_ai vec_all_eq(vector bool short __a,
11275 vector unsigned short __b) {
11276 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11277 (vector short)__b);
11280 static int __ATTRS_o_ai vec_all_eq(vector bool short __a,
11281 vector bool short __b) {
11282 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11283 (vector short)__b);
11286 static int __ATTRS_o_ai vec_all_eq(vector pixel __a, vector pixel __b) {
11287 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11288 (vector short)__b);
11291 static int __ATTRS_o_ai vec_all_eq(vector int __a, vector int __b) {
11292 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, __b);
11295 static int __ATTRS_o_ai vec_all_eq(vector int __a, vector bool int __b) {
11296 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, (vector int)__b);
11299 static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a,
11300 vector unsigned int __b) {
11301 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11305 static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a,
11306 vector bool int __b) {
11307 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11311 static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector int __b) {
11312 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11316 static int __ATTRS_o_ai vec_all_eq(vector bool int __a,
11317 vector unsigned int __b) {
11318 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11322 static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector bool int __b) {
11323 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11327 #ifdef __POWER8_VECTOR__
11328 static int __ATTRS_o_ai vec_all_eq(vector signed long long __a,
11329 vector signed long long __b) {
11330 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, __b);
11333 static int __ATTRS_o_ai vec_all_eq(vector long long __a,
11334 vector bool long long __b) {
11335 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, (vector long long)__b);
11338 static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a,
11339 vector unsigned long long __b) {
11340 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11341 (vector long long)__b);
11344 static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a,
11345 vector bool long long __b) {
11346 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11347 (vector long long)__b);
11350 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
11351 vector long long __b) {
11352 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11353 (vector long long)__b);
11356 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
11357 vector unsigned long long __b) {
11358 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11359 (vector long long)__b);
11362 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
11363 vector bool long long __b) {
11364 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11365 (vector long long)__b);
11369 static int __ATTRS_o_ai vec_all_eq(vector float __a, vector float __b) {
11370 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __b);
11375 static int __ATTRS_o_ai vec_all_ge(vector signed char __a,
11376 vector signed char __b) {
11377 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, __a);
11380 static int __ATTRS_o_ai vec_all_ge(vector signed char __a,
11381 vector bool char __b) {
11382 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__b, __a);
11385 static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a,
11386 vector unsigned char __b) {
11387 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, __a);
11390 static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a,
11391 vector bool char __b) {
11392 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, __a);
11395 static int __ATTRS_o_ai vec_all_ge(vector bool char __a,
11396 vector signed char __b) {
11397 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b,
11398 (vector unsigned char)__a);
11401 static int __ATTRS_o_ai vec_all_ge(vector bool char __a,
11402 vector unsigned char __b) {
11403 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, (vector unsigned char)__a);
11406 static int __ATTRS_o_ai vec_all_ge(vector bool char __a, vector bool char __b) {
11407 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b,
11408 (vector unsigned char)__a);
11411 static int __ATTRS_o_ai vec_all_ge(vector short __a, vector short __b) {
11412 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, __a);
11415 static int __ATTRS_o_ai vec_all_ge(vector short __a, vector bool short __b) {
11416 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)__b, __a);
11419 static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a,
11420 vector unsigned short __b) {
11421 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, __a);
11424 static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a,
11425 vector bool short __b) {
11426 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
11430 static int __ATTRS_o_ai vec_all_ge(vector bool short __a, vector short __b) {
11431 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
11432 (vector unsigned short)__a);
11435 static int __ATTRS_o_ai vec_all_ge(vector bool short __a,
11436 vector unsigned short __b) {
11437 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b,
11438 (vector unsigned short)__a);
11441 static int __ATTRS_o_ai vec_all_ge(vector bool short __a,
11442 vector bool short __b) {
11443 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
11444 (vector unsigned short)__a);
11447 static int __ATTRS_o_ai vec_all_ge(vector int __a, vector int __b) {
11448 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, __a);
11451 static int __ATTRS_o_ai vec_all_ge(vector int __a, vector bool int __b) {
11452 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)__b, __a);
11455 static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a,
11456 vector unsigned int __b) {
11457 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, __a);
11460 static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a,
11461 vector bool int __b) {
11462 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, __a);
11465 static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector int __b) {
11466 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b,
11467 (vector unsigned int)__a);
11470 static int __ATTRS_o_ai vec_all_ge(vector bool int __a,
11471 vector unsigned int __b) {
11472 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, (vector unsigned int)__a);
11475 static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector bool int __b) {
11476 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b,
11477 (vector unsigned int)__a);
11480 #ifdef __POWER8_VECTOR__
11481 static int __ATTRS_o_ai vec_all_ge(vector signed long long __a,
11482 vector signed long long __b) {
11483 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b, __a);
11485 static int __ATTRS_o_ai vec_all_ge(vector signed long long __a,
11486 vector bool long long __b) {
11487 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector signed long long)__b,
11491 static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a,
11492 vector unsigned long long __b) {
11493 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, __a);
11496 static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a,
11497 vector bool long long __b) {
11498 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
11502 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
11503 vector signed long long __b) {
11504 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
11505 (vector unsigned long long)__a);
11508 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
11509 vector unsigned long long __b) {
11510 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b,
11511 (vector unsigned long long)__a);
11514 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
11515 vector bool long long __b) {
11516 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
11517 (vector unsigned long long)__a);
11521 static int __ATTRS_o_ai vec_all_ge(vector float __a, vector float __b) {
11522 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __a, __b);
11527 static int __ATTRS_o_ai vec_all_gt(vector signed char __a,
11528 vector signed char __b) {
11529 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, __b);
11532 static int __ATTRS_o_ai vec_all_gt(vector signed char __a,
11533 vector bool char __b) {
11534 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, (vector signed char)__b);
11537 static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a,
11538 vector unsigned char __b) {
11539 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, __b);
11542 static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a,
11543 vector bool char __b) {
11544 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, (vector unsigned char)__b);
11547 static int __ATTRS_o_ai vec_all_gt(vector bool char __a,
11548 vector signed char __b) {
11549 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a,
11550 (vector unsigned char)__b);
11553 static int __ATTRS_o_ai vec_all_gt(vector bool char __a,
11554 vector unsigned char __b) {
11555 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, __b);
11558 static int __ATTRS_o_ai vec_all_gt(vector bool char __a, vector bool char __b) {
11559 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a,
11560 (vector unsigned char)__b);
11563 static int __ATTRS_o_ai vec_all_gt(vector short __a, vector short __b) {
11564 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, __b);
11567 static int __ATTRS_o_ai vec_all_gt(vector short __a, vector bool short __b) {
11568 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, (vector short)__b);
11571 static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a,
11572 vector unsigned short __b) {
11573 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, __b);
11576 static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a,
11577 vector bool short __b) {
11578 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a,
11579 (vector unsigned short)__b);
11582 static int __ATTRS_o_ai vec_all_gt(vector bool short __a, vector short __b) {
11583 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
11584 (vector unsigned short)__b);
11587 static int __ATTRS_o_ai vec_all_gt(vector bool short __a,
11588 vector unsigned short __b) {
11589 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
11593 static int __ATTRS_o_ai vec_all_gt(vector bool short __a,
11594 vector bool short __b) {
11595 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
11596 (vector unsigned short)__b);
11599 static int __ATTRS_o_ai vec_all_gt(vector int __a, vector int __b) {
11600 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, __b);
11603 static int __ATTRS_o_ai vec_all_gt(vector int __a, vector bool int __b) {
11604 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, (vector int)__b);
11607 static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a,
11608 vector unsigned int __b) {
11609 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, __b);
11612 static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a,
11613 vector bool int __b) {
11614 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, (vector unsigned int)__b);
11617 static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector int __b) {
11618 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a,
11619 (vector unsigned int)__b);
11622 static int __ATTRS_o_ai vec_all_gt(vector bool int __a,
11623 vector unsigned int __b) {
11624 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, __b);
11627 static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector bool int __b) {
11628 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a,
11629 (vector unsigned int)__b);
11632 #ifdef __POWER8_VECTOR__
11633 static int __ATTRS_o_ai vec_all_gt(vector signed long long __a,
11634 vector signed long long __b) {
11635 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, __b);
11637 static int __ATTRS_o_ai vec_all_gt(vector signed long long __a,
11638 vector bool long long __b) {
11639 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a,
11640 (vector signed long long)__b);
11643 static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a,
11644 vector unsigned long long __b) {
11645 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, __b);
11648 static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a,
11649 vector bool long long __b) {
11650 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a,
11651 (vector unsigned long long)__b);
11654 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
11655 vector signed long long __b) {
11656 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
11657 (vector unsigned long long)__b);
11660 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
11661 vector unsigned long long __b) {
11662 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
11666 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
11667 vector bool long long __b) {
11668 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
11669 (vector unsigned long long)__b);
11673 static int __ATTRS_o_ai vec_all_gt(vector float __a, vector float __b) {
11674 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __a, __b);
11679 static int __attribute__((__always_inline__))
11680 vec_all_in(vector float __a, vector float __b) {
11681 return __builtin_altivec_vcmpbfp_p(__CR6_EQ, __a, __b);
11686 static int __ATTRS_o_ai vec_all_le(vector signed char __a,
11687 vector signed char __b) {
11688 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, __b);
11691 static int __ATTRS_o_ai vec_all_le(vector signed char __a,
11692 vector bool char __b) {
11693 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, (vector signed char)__b);
11696 static int __ATTRS_o_ai vec_all_le(vector unsigned char __a,
11697 vector unsigned char __b) {
11698 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, __b);
11701 static int __ATTRS_o_ai vec_all_le(vector unsigned char __a,
11702 vector bool char __b) {
11703 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, (vector unsigned char)__b);
11706 static int __ATTRS_o_ai vec_all_le(vector bool char __a,
11707 vector signed char __b) {
11708 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a,
11709 (vector unsigned char)__b);
11712 static int __ATTRS_o_ai vec_all_le(vector bool char __a,
11713 vector unsigned char __b) {
11714 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, __b);
11717 static int __ATTRS_o_ai vec_all_le(vector bool char __a, vector bool char __b) {
11718 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a,
11719 (vector unsigned char)__b);
11722 static int __ATTRS_o_ai vec_all_le(vector short __a, vector short __b) {
11723 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, __b);
11726 static int __ATTRS_o_ai vec_all_le(vector short __a, vector bool short __b) {
11727 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, (vector short)__b);
11730 static int __ATTRS_o_ai vec_all_le(vector unsigned short __a,
11731 vector unsigned short __b) {
11732 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, __b);
11735 static int __ATTRS_o_ai vec_all_le(vector unsigned short __a,
11736 vector bool short __b) {
11737 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a,
11738 (vector unsigned short)__b);
11741 static int __ATTRS_o_ai vec_all_le(vector bool short __a, vector short __b) {
11742 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
11743 (vector unsigned short)__b);
11746 static int __ATTRS_o_ai vec_all_le(vector bool short __a,
11747 vector unsigned short __b) {
11748 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
11752 static int __ATTRS_o_ai vec_all_le(vector bool short __a,
11753 vector bool short __b) {
11754 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
11755 (vector unsigned short)__b);
11758 static int __ATTRS_o_ai vec_all_le(vector int __a, vector int __b) {
11759 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, __b);
11762 static int __ATTRS_o_ai vec_all_le(vector int __a, vector bool int __b) {
11763 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, (vector int)__b);
11766 static int __ATTRS_o_ai vec_all_le(vector unsigned int __a,
11767 vector unsigned int __b) {
11768 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, __b);
11771 static int __ATTRS_o_ai vec_all_le(vector unsigned int __a,
11772 vector bool int __b) {
11773 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, (vector unsigned int)__b);
11776 static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector int __b) {
11777 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a,
11778 (vector unsigned int)__b);
11781 static int __ATTRS_o_ai vec_all_le(vector bool int __a,
11782 vector unsigned int __b) {
11783 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, __b);
11786 static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector bool int __b) {
11787 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a,
11788 (vector unsigned int)__b);
11791 #ifdef __POWER8_VECTOR__
11792 static int __ATTRS_o_ai vec_all_le(vector signed long long __a,
11793 vector signed long long __b) {
11794 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, __b);
11797 static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a,
11798 vector unsigned long long __b) {
11799 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, __b);
11802 static int __ATTRS_o_ai vec_all_le(vector signed long long __a,
11803 vector bool long long __b) {
11804 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a,
11805 (vector signed long long)__b);
11808 static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a,
11809 vector bool long long __b) {
11810 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a,
11811 (vector unsigned long long)__b);
11814 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
11815 vector signed long long __b) {
11816 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
11817 (vector unsigned long long)__b);
11820 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
11821 vector unsigned long long __b) {
11822 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
11826 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
11827 vector bool long long __b) {
11828 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
11829 (vector unsigned long long)__b);
11833 static int __ATTRS_o_ai vec_all_le(vector float __a, vector float __b) {
11834 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __b, __a);
11839 static int __ATTRS_o_ai vec_all_lt(vector signed char __a,
11840 vector signed char __b) {
11841 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, __a);
11844 static int __ATTRS_o_ai vec_all_lt(vector signed char __a,
11845 vector bool char __b) {
11846 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__b, __a);
11849 static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a,
11850 vector unsigned char __b) {
11851 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, __a);
11854 static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a,
11855 vector bool char __b) {
11856 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, __a);
11859 static int __ATTRS_o_ai vec_all_lt(vector bool char __a,
11860 vector signed char __b) {
11861 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b,
11862 (vector unsigned char)__a);
11865 static int __ATTRS_o_ai vec_all_lt(vector bool char __a,
11866 vector unsigned char __b) {
11867 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, (vector unsigned char)__a);
11870 static int __ATTRS_o_ai vec_all_lt(vector bool char __a, vector bool char __b) {
11871 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b,
11872 (vector unsigned char)__a);
11875 static int __ATTRS_o_ai vec_all_lt(vector short __a, vector short __b) {
11876 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, __a);
11879 static int __ATTRS_o_ai vec_all_lt(vector short __a, vector bool short __b) {
11880 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)__b, __a);
11883 static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a,
11884 vector unsigned short __b) {
11885 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, __a);
11888 static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a,
11889 vector bool short __b) {
11890 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
11894 static int __ATTRS_o_ai vec_all_lt(vector bool short __a, vector short __b) {
11895 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
11896 (vector unsigned short)__a);
11899 static int __ATTRS_o_ai vec_all_lt(vector bool short __a,
11900 vector unsigned short __b) {
11901 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b,
11902 (vector unsigned short)__a);
11905 static int __ATTRS_o_ai vec_all_lt(vector bool short __a,
11906 vector bool short __b) {
11907 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
11908 (vector unsigned short)__a);
11911 static int __ATTRS_o_ai vec_all_lt(vector int __a, vector int __b) {
11912 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, __a);
11915 static int __ATTRS_o_ai vec_all_lt(vector int __a, vector bool int __b) {
11916 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)__b, __a);
11919 static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a,
11920 vector unsigned int __b) {
11921 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, __a);
11924 static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a,
11925 vector bool int __b) {
11926 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, __a);
11929 static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector int __b) {
11930 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b,
11931 (vector unsigned int)__a);
11934 static int __ATTRS_o_ai vec_all_lt(vector bool int __a,
11935 vector unsigned int __b) {
11936 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, (vector unsigned int)__a);
11939 static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector bool int __b) {
11940 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b,
11941 (vector unsigned int)__a);
11944 #ifdef __POWER8_VECTOR__
11945 static int __ATTRS_o_ai vec_all_lt(vector signed long long __a,
11946 vector signed long long __b) {
11947 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, __a);
11950 static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a,
11951 vector unsigned long long __b) {
11952 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, __a);
11955 static int __ATTRS_o_ai vec_all_lt(vector signed long long __a,
11956 vector bool long long __b) {
11957 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector signed long long)__b,
11961 static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a,
11962 vector bool long long __b) {
11963 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
11967 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
11968 vector signed long long __b) {
11969 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
11970 (vector unsigned long long)__a);
11973 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
11974 vector unsigned long long __b) {
11975 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b,
11976 (vector unsigned long long)__a);
11979 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
11980 vector bool long long __b) {
11981 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
11982 (vector unsigned long long)__a);
11986 static int __ATTRS_o_ai vec_all_lt(vector float __a, vector float __b) {
11987 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __b, __a);
11992 static int __attribute__((__always_inline__)) vec_all_nan(vector float __a) {
11993 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __a);
11998 static int __ATTRS_o_ai vec_all_ne(vector signed char __a,
11999 vector signed char __b) {
12000 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12004 static int __ATTRS_o_ai vec_all_ne(vector signed char __a,
12005 vector bool char __b) {
12006 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12010 static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a,
12011 vector unsigned char __b) {
12012 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12016 static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a,
12017 vector bool char __b) {
12018 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12022 static int __ATTRS_o_ai vec_all_ne(vector bool char __a,
12023 vector signed char __b) {
12024 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12028 static int __ATTRS_o_ai vec_all_ne(vector bool char __a,
12029 vector unsigned char __b) {
12030 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12034 static int __ATTRS_o_ai vec_all_ne(vector bool char __a, vector bool char __b) {
12035 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12039 static int __ATTRS_o_ai vec_all_ne(vector short __a, vector short __b) {
12040 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, __b);
12043 static int __ATTRS_o_ai vec_all_ne(vector short __a, vector bool short __b) {
12044 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, (vector short)__b);
12047 static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a,
12048 vector unsigned short __b) {
12049 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12050 (vector short)__b);
12053 static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a,
12054 vector bool short __b) {
12055 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12056 (vector short)__b);
12059 static int __ATTRS_o_ai vec_all_ne(vector bool short __a, vector short __b) {
12060 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12061 (vector short)__b);
12064 static int __ATTRS_o_ai vec_all_ne(vector bool short __a,
12065 vector unsigned short __b) {
12066 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12067 (vector short)__b);
12070 static int __ATTRS_o_ai vec_all_ne(vector bool short __a,
12071 vector bool short __b) {
12072 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12073 (vector short)__b);
12076 static int __ATTRS_o_ai vec_all_ne(vector pixel __a, vector pixel __b) {
12077 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12078 (vector short)__b);
12081 static int __ATTRS_o_ai vec_all_ne(vector int __a, vector int __b) {
12082 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, __b);
12085 static int __ATTRS_o_ai vec_all_ne(vector int __a, vector bool int __b) {
12086 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, (vector int)__b);
12089 static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a,
12090 vector unsigned int __b) {
12091 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12095 static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a,
12096 vector bool int __b) {
12097 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12101 static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector int __b) {
12102 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12106 static int __ATTRS_o_ai vec_all_ne(vector bool int __a,
12107 vector unsigned int __b) {
12108 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12112 static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector bool int __b) {
12113 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12117 #ifdef __POWER8_VECTOR__
12118 static int __ATTRS_o_ai vec_all_ne(vector signed long long __a,
12119 vector signed long long __b) {
12120 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, __b);
12123 static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a,
12124 vector unsigned long long __b) {
12125 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a,
12126 (vector long long)__b);
12129 static int __ATTRS_o_ai vec_all_ne(vector signed long long __a,
12130 vector bool long long __b) {
12131 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a,
12132 (vector signed long long)__b);
12135 static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a,
12136 vector bool long long __b) {
12137 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12138 (vector signed long long)__b);
12141 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
12142 vector signed long long __b) {
12143 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12144 (vector signed long long)__b);
12147 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
12148 vector unsigned long long __b) {
12149 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12150 (vector signed long long)__b);
12153 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
12154 vector bool long long __b) {
12155 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12156 (vector signed long long)__b);
12160 static int __ATTRS_o_ai vec_all_ne(vector float __a, vector float __b) {
12161 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __b);
12166 static int __attribute__((__always_inline__))
12167 vec_all_nge(vector float __a, vector float __b) {
12168 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __a, __b);
12173 static int __attribute__((__always_inline__))
12174 vec_all_ngt(vector float __a, vector float __b) {
12175 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __a, __b);
12180 static int __attribute__((__always_inline__))
12181 vec_all_nle(vector float __a, vector float __b) {
12182 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __b, __a);
12187 static int __attribute__((__always_inline__))
12188 vec_all_nlt(vector float __a, vector float __b) {
12189 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __b, __a);
12192 /* vec_all_numeric */
12194 static int __attribute__((__always_inline__))
12195 vec_all_numeric(vector float __a) {
12196 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __a);
12201 static int __ATTRS_o_ai vec_any_eq(vector signed char __a,
12202 vector signed char __b) {
12203 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12207 static int __ATTRS_o_ai vec_any_eq(vector signed char __a,
12208 vector bool char __b) {
12209 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12213 static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a,
12214 vector unsigned char __b) {
12215 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12219 static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a,
12220 vector bool char __b) {
12221 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12225 static int __ATTRS_o_ai vec_any_eq(vector bool char __a,
12226 vector signed char __b) {
12227 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12231 static int __ATTRS_o_ai vec_any_eq(vector bool char __a,
12232 vector unsigned char __b) {
12233 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12237 static int __ATTRS_o_ai vec_any_eq(vector bool char __a, vector bool char __b) {
12238 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12242 static int __ATTRS_o_ai vec_any_eq(vector short __a, vector short __b) {
12243 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, __b);
12246 static int __ATTRS_o_ai vec_any_eq(vector short __a, vector bool short __b) {
12247 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, (vector short)__b);
12250 static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a,
12251 vector unsigned short __b) {
12252 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12253 (vector short)__b);
12256 static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a,
12257 vector bool short __b) {
12258 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12259 (vector short)__b);
12262 static int __ATTRS_o_ai vec_any_eq(vector bool short __a, vector short __b) {
12263 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12264 (vector short)__b);
12267 static int __ATTRS_o_ai vec_any_eq(vector bool short __a,
12268 vector unsigned short __b) {
12269 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12270 (vector short)__b);
12273 static int __ATTRS_o_ai vec_any_eq(vector bool short __a,
12274 vector bool short __b) {
12275 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12276 (vector short)__b);
12279 static int __ATTRS_o_ai vec_any_eq(vector pixel __a, vector pixel __b) {
12280 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12281 (vector short)__b);
12284 static int __ATTRS_o_ai vec_any_eq(vector int __a, vector int __b) {
12285 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, __b);
12288 static int __ATTRS_o_ai vec_any_eq(vector int __a, vector bool int __b) {
12289 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, (vector int)__b);
12292 static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a,
12293 vector unsigned int __b) {
12294 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12298 static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a,
12299 vector bool int __b) {
12300 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12304 static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector int __b) {
12305 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12309 static int __ATTRS_o_ai vec_any_eq(vector bool int __a,
12310 vector unsigned int __b) {
12311 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12315 static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector bool int __b) {
12316 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12320 #ifdef __POWER8_VECTOR__
12321 static int __ATTRS_o_ai vec_any_eq(vector signed long long __a,
12322 vector signed long long __b) {
12323 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, __b);
12326 static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a,
12327 vector unsigned long long __b) {
12328 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a,
12329 (vector long long)__b);
12332 static int __ATTRS_o_ai vec_any_eq(vector signed long long __a,
12333 vector bool long long __b) {
12334 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a,
12335 (vector signed long long)__b);
12338 static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a,
12339 vector bool long long __b) {
12340 return __builtin_altivec_vcmpequd_p(
12341 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12344 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
12345 vector signed long long __b) {
12346 return __builtin_altivec_vcmpequd_p(
12347 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12350 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
12351 vector unsigned long long __b) {
12352 return __builtin_altivec_vcmpequd_p(
12353 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12356 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
12357 vector bool long long __b) {
12358 return __builtin_altivec_vcmpequd_p(
12359 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12363 static int __ATTRS_o_ai vec_any_eq(vector float __a, vector float __b) {
12364 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __b);
12369 static int __ATTRS_o_ai vec_any_ge(vector signed char __a,
12370 vector signed char __b) {
12371 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b, __a);
12374 static int __ATTRS_o_ai vec_any_ge(vector signed char __a,
12375 vector bool char __b) {
12376 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b,
12380 static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a,
12381 vector unsigned char __b) {
12382 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, __a);
12385 static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a,
12386 vector bool char __b) {
12387 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
12391 static int __ATTRS_o_ai vec_any_ge(vector bool char __a,
12392 vector signed char __b) {
12393 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
12394 (vector unsigned char)__a);
12397 static int __ATTRS_o_ai vec_any_ge(vector bool char __a,
12398 vector unsigned char __b) {
12399 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b,
12400 (vector unsigned char)__a);
12403 static int __ATTRS_o_ai vec_any_ge(vector bool char __a, vector bool char __b) {
12404 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
12405 (vector unsigned char)__a);
12408 static int __ATTRS_o_ai vec_any_ge(vector short __a, vector short __b) {
12409 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b, __a);
12412 static int __ATTRS_o_ai vec_any_ge(vector short __a, vector bool short __b) {
12413 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)__b, __a);
12416 static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a,
12417 vector unsigned short __b) {
12418 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, __a);
12421 static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a,
12422 vector bool short __b) {
12423 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
12427 static int __ATTRS_o_ai vec_any_ge(vector bool short __a, vector short __b) {
12428 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
12429 (vector unsigned short)__a);
12432 static int __ATTRS_o_ai vec_any_ge(vector bool short __a,
12433 vector unsigned short __b) {
12434 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b,
12435 (vector unsigned short)__a);
12438 static int __ATTRS_o_ai vec_any_ge(vector bool short __a,
12439 vector bool short __b) {
12440 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
12441 (vector unsigned short)__a);
12444 static int __ATTRS_o_ai vec_any_ge(vector int __a, vector int __b) {
12445 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b, __a);
12448 static int __ATTRS_o_ai vec_any_ge(vector int __a, vector bool int __b) {
12449 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)__b, __a);
12452 static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a,
12453 vector unsigned int __b) {
12454 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, __a);
12457 static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a,
12458 vector bool int __b) {
12459 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
12463 static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector int __b) {
12464 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
12465 (vector unsigned int)__a);
12468 static int __ATTRS_o_ai vec_any_ge(vector bool int __a,
12469 vector unsigned int __b) {
12470 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b,
12471 (vector unsigned int)__a);
12474 static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector bool int __b) {
12475 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
12476 (vector unsigned int)__a);
12479 #ifdef __POWER8_VECTOR__
12480 static int __ATTRS_o_ai vec_any_ge(vector signed long long __a,
12481 vector signed long long __b) {
12482 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b, __a);
12485 static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a,
12486 vector unsigned long long __b) {
12487 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, __a);
12490 static int __ATTRS_o_ai vec_any_ge(vector signed long long __a,
12491 vector bool long long __b) {
12492 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV,
12493 (vector signed long long)__b, __a);
12496 static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a,
12497 vector bool long long __b) {
12498 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12499 (vector unsigned long long)__b, __a);
12502 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
12503 vector signed long long __b) {
12504 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12505 (vector unsigned long long)__b,
12506 (vector unsigned long long)__a);
12509 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
12510 vector unsigned long long __b) {
12511 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b,
12512 (vector unsigned long long)__a);
12515 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
12516 vector bool long long __b) {
12517 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12518 (vector unsigned long long)__b,
12519 (vector unsigned long long)__a);
12523 static int __ATTRS_o_ai vec_any_ge(vector float __a, vector float __b) {
12524 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __a, __b);
12529 static int __ATTRS_o_ai vec_any_gt(vector signed char __a,
12530 vector signed char __b) {
12531 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, __b);
12534 static int __ATTRS_o_ai vec_any_gt(vector signed char __a,
12535 vector bool char __b) {
12536 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a,
12537 (vector signed char)__b);
12540 static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a,
12541 vector unsigned char __b) {
12542 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, __b);
12545 static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a,
12546 vector bool char __b) {
12547 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a,
12548 (vector unsigned char)__b);
12551 static int __ATTRS_o_ai vec_any_gt(vector bool char __a,
12552 vector signed char __b) {
12553 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
12554 (vector unsigned char)__b);
12557 static int __ATTRS_o_ai vec_any_gt(vector bool char __a,
12558 vector unsigned char __b) {
12559 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
12563 static int __ATTRS_o_ai vec_any_gt(vector bool char __a, vector bool char __b) {
12564 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
12565 (vector unsigned char)__b);
12568 static int __ATTRS_o_ai vec_any_gt(vector short __a, vector short __b) {
12569 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, __b);
12572 static int __ATTRS_o_ai vec_any_gt(vector short __a, vector bool short __b) {
12573 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, (vector short)__b);
12576 static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a,
12577 vector unsigned short __b) {
12578 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, __b);
12581 static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a,
12582 vector bool short __b) {
12583 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a,
12584 (vector unsigned short)__b);
12587 static int __ATTRS_o_ai vec_any_gt(vector bool short __a, vector short __b) {
12588 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
12589 (vector unsigned short)__b);
12592 static int __ATTRS_o_ai vec_any_gt(vector bool short __a,
12593 vector unsigned short __b) {
12594 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
12598 static int __ATTRS_o_ai vec_any_gt(vector bool short __a,
12599 vector bool short __b) {
12600 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
12601 (vector unsigned short)__b);
12604 static int __ATTRS_o_ai vec_any_gt(vector int __a, vector int __b) {
12605 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, __b);
12608 static int __ATTRS_o_ai vec_any_gt(vector int __a, vector bool int __b) {
12609 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, (vector int)__b);
12612 static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a,
12613 vector unsigned int __b) {
12614 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, __b);
12617 static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a,
12618 vector bool int __b) {
12619 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a,
12620 (vector unsigned int)__b);
12623 static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector int __b) {
12624 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
12625 (vector unsigned int)__b);
12628 static int __ATTRS_o_ai vec_any_gt(vector bool int __a,
12629 vector unsigned int __b) {
12630 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
12634 static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector bool int __b) {
12635 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
12636 (vector unsigned int)__b);
12639 #ifdef __POWER8_VECTOR__
12640 static int __ATTRS_o_ai vec_any_gt(vector signed long long __a,
12641 vector signed long long __b) {
12642 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, __b);
12645 static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a,
12646 vector unsigned long long __b) {
12647 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, __b);
12650 static int __ATTRS_o_ai vec_any_gt(vector signed long long __a,
12651 vector bool long long __b) {
12652 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a,
12653 (vector signed long long)__b);
12656 static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a,
12657 vector bool long long __b) {
12658 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a,
12659 (vector unsigned long long)__b);
12662 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
12663 vector signed long long __b) {
12664 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12665 (vector unsigned long long)__a,
12666 (vector unsigned long long)__b);
12669 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
12670 vector unsigned long long __b) {
12671 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12672 (vector unsigned long long)__a, __b);
12675 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
12676 vector bool long long __b) {
12677 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12678 (vector unsigned long long)__a,
12679 (vector unsigned long long)__b);
12683 static int __ATTRS_o_ai vec_any_gt(vector float __a, vector float __b) {
12684 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __a, __b);
12689 static int __ATTRS_o_ai vec_any_le(vector signed char __a,
12690 vector signed char __b) {
12691 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, __b);
12694 static int __ATTRS_o_ai vec_any_le(vector signed char __a,
12695 vector bool char __b) {
12696 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a,
12697 (vector signed char)__b);
12700 static int __ATTRS_o_ai vec_any_le(vector unsigned char __a,
12701 vector unsigned char __b) {
12702 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, __b);
12705 static int __ATTRS_o_ai vec_any_le(vector unsigned char __a,
12706 vector bool char __b) {
12707 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a,
12708 (vector unsigned char)__b);
12711 static int __ATTRS_o_ai vec_any_le(vector bool char __a,
12712 vector signed char __b) {
12713 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
12714 (vector unsigned char)__b);
12717 static int __ATTRS_o_ai vec_any_le(vector bool char __a,
12718 vector unsigned char __b) {
12719 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
12723 static int __ATTRS_o_ai vec_any_le(vector bool char __a, vector bool char __b) {
12724 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
12725 (vector unsigned char)__b);
12728 static int __ATTRS_o_ai vec_any_le(vector short __a, vector short __b) {
12729 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, __b);
12732 static int __ATTRS_o_ai vec_any_le(vector short __a, vector bool short __b) {
12733 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, (vector short)__b);
12736 static int __ATTRS_o_ai vec_any_le(vector unsigned short __a,
12737 vector unsigned short __b) {
12738 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, __b);
12741 static int __ATTRS_o_ai vec_any_le(vector unsigned short __a,
12742 vector bool short __b) {
12743 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a,
12744 (vector unsigned short)__b);
12747 static int __ATTRS_o_ai vec_any_le(vector bool short __a, vector short __b) {
12748 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
12749 (vector unsigned short)__b);
12752 static int __ATTRS_o_ai vec_any_le(vector bool short __a,
12753 vector unsigned short __b) {
12754 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
12758 static int __ATTRS_o_ai vec_any_le(vector bool short __a,
12759 vector bool short __b) {
12760 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
12761 (vector unsigned short)__b);
12764 static int __ATTRS_o_ai vec_any_le(vector int __a, vector int __b) {
12765 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, __b);
12768 static int __ATTRS_o_ai vec_any_le(vector int __a, vector bool int __b) {
12769 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, (vector int)__b);
12772 static int __ATTRS_o_ai vec_any_le(vector unsigned int __a,
12773 vector unsigned int __b) {
12774 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, __b);
12777 static int __ATTRS_o_ai vec_any_le(vector unsigned int __a,
12778 vector bool int __b) {
12779 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a,
12780 (vector unsigned int)__b);
12783 static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector int __b) {
12784 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
12785 (vector unsigned int)__b);
12788 static int __ATTRS_o_ai vec_any_le(vector bool int __a,
12789 vector unsigned int __b) {
12790 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
12794 static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector bool int __b) {
12795 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
12796 (vector unsigned int)__b);
12799 #ifdef __POWER8_VECTOR__
12800 static int __ATTRS_o_ai vec_any_le(vector signed long long __a,
12801 vector signed long long __b) {
12802 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, __b);
12805 static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a,
12806 vector unsigned long long __b) {
12807 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, __b);
12810 static int __ATTRS_o_ai vec_any_le(vector signed long long __a,
12811 vector bool long long __b) {
12812 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a,
12813 (vector signed long long)__b);
12816 static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a,
12817 vector bool long long __b) {
12818 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a,
12819 (vector unsigned long long)__b);
12822 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
12823 vector signed long long __b) {
12824 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12825 (vector unsigned long long)__a,
12826 (vector unsigned long long)__b);
12829 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
12830 vector unsigned long long __b) {
12831 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12832 (vector unsigned long long)__a, __b);
12835 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
12836 vector bool long long __b) {
12837 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12838 (vector unsigned long long)__a,
12839 (vector unsigned long long)__b);
12843 static int __ATTRS_o_ai vec_any_le(vector float __a, vector float __b) {
12844 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __b, __a);
12849 static int __ATTRS_o_ai vec_any_lt(vector signed char __a,
12850 vector signed char __b) {
12851 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b, __a);
12854 static int __ATTRS_o_ai vec_any_lt(vector signed char __a,
12855 vector bool char __b) {
12856 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b,
12860 static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a,
12861 vector unsigned char __b) {
12862 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, __a);
12865 static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a,
12866 vector bool char __b) {
12867 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
12871 static int __ATTRS_o_ai vec_any_lt(vector bool char __a,
12872 vector signed char __b) {
12873 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
12874 (vector unsigned char)__a);
12877 static int __ATTRS_o_ai vec_any_lt(vector bool char __a,
12878 vector unsigned char __b) {
12879 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b,
12880 (vector unsigned char)__a);
12883 static int __ATTRS_o_ai vec_any_lt(vector bool char __a, vector bool char __b) {
12884 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
12885 (vector unsigned char)__a);
12888 static int __ATTRS_o_ai vec_any_lt(vector short __a, vector short __b) {
12889 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b, __a);
12892 static int __ATTRS_o_ai vec_any_lt(vector short __a, vector bool short __b) {
12893 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)__b, __a);
12896 static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a,
12897 vector unsigned short __b) {
12898 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, __a);
12901 static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a,
12902 vector bool short __b) {
12903 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
12907 static int __ATTRS_o_ai vec_any_lt(vector bool short __a, vector short __b) {
12908 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
12909 (vector unsigned short)__a);
12912 static int __ATTRS_o_ai vec_any_lt(vector bool short __a,
12913 vector unsigned short __b) {
12914 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b,
12915 (vector unsigned short)__a);
12918 static int __ATTRS_o_ai vec_any_lt(vector bool short __a,
12919 vector bool short __b) {
12920 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
12921 (vector unsigned short)__a);
12924 static int __ATTRS_o_ai vec_any_lt(vector int __a, vector int __b) {
12925 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b, __a);
12928 static int __ATTRS_o_ai vec_any_lt(vector int __a, vector bool int __b) {
12929 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)__b, __a);
12932 static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a,
12933 vector unsigned int __b) {
12934 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, __a);
12937 static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a,
12938 vector bool int __b) {
12939 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
12943 static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector int __b) {
12944 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
12945 (vector unsigned int)__a);
12948 static int __ATTRS_o_ai vec_any_lt(vector bool int __a,
12949 vector unsigned int __b) {
12950 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b,
12951 (vector unsigned int)__a);
12954 static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector bool int __b) {
12955 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
12956 (vector unsigned int)__a);
12959 #ifdef __POWER8_VECTOR__
12960 static int __ATTRS_o_ai vec_any_lt(vector signed long long __a,
12961 vector signed long long __b) {
12962 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b, __a);
12965 static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a,
12966 vector unsigned long long __b) {
12967 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, __a);
12970 static int __ATTRS_o_ai vec_any_lt(vector signed long long __a,
12971 vector bool long long __b) {
12972 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV,
12973 (vector signed long long)__b, __a);
12976 static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a,
12977 vector bool long long __b) {
12978 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12979 (vector unsigned long long)__b, __a);
12982 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
12983 vector signed long long __b) {
12984 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12985 (vector unsigned long long)__b,
12986 (vector unsigned long long)__a);
12989 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
12990 vector unsigned long long __b) {
12991 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b,
12992 (vector unsigned long long)__a);
12995 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
12996 vector bool long long __b) {
12997 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12998 (vector unsigned long long)__b,
12999 (vector unsigned long long)__a);
13003 static int __ATTRS_o_ai vec_any_lt(vector float __a, vector float __b) {
13004 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __b, __a);
13009 static int __attribute__((__always_inline__)) vec_any_nan(vector float __a) {
13010 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __a);
13015 static int __ATTRS_o_ai vec_any_ne(vector signed char __a,
13016 vector signed char __b) {
13017 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13021 static int __ATTRS_o_ai vec_any_ne(vector signed char __a,
13022 vector bool char __b) {
13023 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13027 static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a,
13028 vector unsigned char __b) {
13029 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13033 static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a,
13034 vector bool char __b) {
13035 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13039 static int __ATTRS_o_ai vec_any_ne(vector bool char __a,
13040 vector signed char __b) {
13041 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13045 static int __ATTRS_o_ai vec_any_ne(vector bool char __a,
13046 vector unsigned char __b) {
13047 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13051 static int __ATTRS_o_ai vec_any_ne(vector bool char __a, vector bool char __b) {
13052 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13056 static int __ATTRS_o_ai vec_any_ne(vector short __a, vector short __b) {
13057 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, __b);
13060 static int __ATTRS_o_ai vec_any_ne(vector short __a, vector bool short __b) {
13061 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, (vector short)__b);
13064 static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a,
13065 vector unsigned short __b) {
13066 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13067 (vector short)__b);
13070 static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a,
13071 vector bool short __b) {
13072 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13073 (vector short)__b);
13076 static int __ATTRS_o_ai vec_any_ne(vector bool short __a, vector short __b) {
13077 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13078 (vector short)__b);
13081 static int __ATTRS_o_ai vec_any_ne(vector bool short __a,
13082 vector unsigned short __b) {
13083 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13084 (vector short)__b);
13087 static int __ATTRS_o_ai vec_any_ne(vector bool short __a,
13088 vector bool short __b) {
13089 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13090 (vector short)__b);
13093 static int __ATTRS_o_ai vec_any_ne(vector pixel __a, vector pixel __b) {
13094 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13095 (vector short)__b);
13098 static int __ATTRS_o_ai vec_any_ne(vector int __a, vector int __b) {
13099 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, __b);
13102 static int __ATTRS_o_ai vec_any_ne(vector int __a, vector bool int __b) {
13103 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, (vector int)__b);
13106 static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a,
13107 vector unsigned int __b) {
13108 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13112 static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a,
13113 vector bool int __b) {
13114 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13118 static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector int __b) {
13119 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13123 static int __ATTRS_o_ai vec_any_ne(vector bool int __a,
13124 vector unsigned int __b) {
13125 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13129 static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector bool int __b) {
13130 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13134 #ifdef __POWER8_VECTOR__
13135 static int __ATTRS_o_ai vec_any_ne(vector signed long long __a,
13136 vector signed long long __b) {
13137 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, __b);
13140 static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a,
13141 vector unsigned long long __b) {
13142 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a,
13143 (vector long long)__b);
13146 static int __ATTRS_o_ai vec_any_ne(vector signed long long __a,
13147 vector bool long long __b) {
13148 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a,
13149 (vector signed long long)__b);
13152 static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a,
13153 vector bool long long __b) {
13154 return __builtin_altivec_vcmpequd_p(
13155 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13158 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
13159 vector signed long long __b) {
13160 return __builtin_altivec_vcmpequd_p(
13161 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13164 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
13165 vector unsigned long long __b) {
13166 return __builtin_altivec_vcmpequd_p(
13167 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13170 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
13171 vector bool long long __b) {
13172 return __builtin_altivec_vcmpequd_p(
13173 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13177 static int __ATTRS_o_ai vec_any_ne(vector float __a, vector float __b) {
13178 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __b);
13183 static int __attribute__((__always_inline__))
13184 vec_any_nge(vector float __a, vector float __b) {
13185 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __a, __b);
13190 static int __attribute__((__always_inline__))
13191 vec_any_ngt(vector float __a, vector float __b) {
13192 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __a, __b);
13197 static int __attribute__((__always_inline__))
13198 vec_any_nle(vector float __a, vector float __b) {
13199 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __b, __a);
13204 static int __attribute__((__always_inline__))
13205 vec_any_nlt(vector float __a, vector float __b) {
13206 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __b, __a);
13209 /* vec_any_numeric */
13211 static int __attribute__((__always_inline__))
13212 vec_any_numeric(vector float __a) {
13213 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __a);
13218 static int __attribute__((__always_inline__))
13219 vec_any_out(vector float __a, vector float __b) {
13220 return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, __a, __b);
13223 /* Power 8 Crypto functions
13224 Note: We diverge from the current GCC implementation with regard
13225 to cryptography and related functions as follows:
13226 - Only the SHA and AES instructions and builtins are disabled by -mno-crypto
13227 - The remaining ones are only available on Power8 and up so
13228 require -mpower8-vector
13229 The justification for this is that export requirements require that
13230 Category:Vector.Crypto is optional (i.e. compliant hardware may not provide
13231 support). As a result, we need to be able to turn off support for those.
13232 The remaining ones (currently controlled by -mcrypto for GCC) still
13233 need to be provided on compliant hardware even if Vector.Crypto is not
13235 FIXME: the naming convention for the builtins will be adjusted due
13236 to the inconsistency (__builtin_crypto_ prefix on builtins that cannot be
13237 removed with -mno-crypto). This is under development.
13240 static vector unsigned long long __attribute__((__always_inline__))
13241 __builtin_crypto_vsbox(vector unsigned long long __a) {
13242 return __builtin_altivec_crypto_vsbox(__a);
13245 static vector unsigned long long __attribute__((__always_inline__))
13246 __builtin_crypto_vcipher(vector unsigned long long __a,
13247 vector unsigned long long __b) {
13248 return __builtin_altivec_crypto_vcipher(__a, __b);
13251 static vector unsigned long long __attribute__((__always_inline__))
13252 __builtin_crypto_vcipherlast(vector unsigned long long __a,
13253 vector unsigned long long __b) {
13254 return __builtin_altivec_crypto_vcipherlast(__a, __b);
13257 static vector unsigned long long __attribute__((__always_inline__))
13258 __builtin_crypto_vncipher(vector unsigned long long __a,
13259 vector unsigned long long __b) {
13260 return __builtin_altivec_crypto_vncipher(__a, __b);
13263 static vector unsigned long long __attribute__((__always_inline__))
13264 __builtin_crypto_vncipherlast(vector unsigned long long __a,
13265 vector unsigned long long __b) {
13266 return __builtin_altivec_crypto_vncipherlast(__a, __b);
13269 #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad
13270 #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw
13273 #ifdef __POWER8_VECTOR__
13274 static vector unsigned char __ATTRS_o_ai
13275 __builtin_crypto_vpermxor(vector unsigned char __a, vector unsigned char __b,
13276 vector unsigned char __c) {
13277 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
13280 static vector unsigned short __ATTRS_o_ai
13281 __builtin_crypto_vpermxor(vector unsigned short __a, vector unsigned short __b,
13282 vector unsigned short __c) {
13283 return (vector unsigned short)__builtin_altivec_crypto_vpermxor(
13284 (vector unsigned char)__a, (vector unsigned char)__b,
13285 (vector unsigned char)__c);
13288 static vector unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
13289 vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) {
13290 return (vector unsigned int)__builtin_altivec_crypto_vpermxor(
13291 (vector unsigned char)__a, (vector unsigned char)__b,
13292 (vector unsigned char)__c);
13295 static vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpermxor(
13296 vector unsigned long long __a, vector unsigned long long __b,
13297 vector unsigned long long __c) {
13298 return (vector unsigned long long)__builtin_altivec_crypto_vpermxor(
13299 (vector unsigned char)__a, (vector unsigned char)__b,
13300 (vector unsigned char)__c);
13303 static vector unsigned char __ATTRS_o_ai
13304 __builtin_crypto_vpmsumb(vector unsigned char __a, vector unsigned char __b) {
13305 return __builtin_altivec_crypto_vpmsumb(__a, __b);
13308 static vector unsigned short __ATTRS_o_ai
13309 __builtin_crypto_vpmsumb(vector unsigned short __a, vector unsigned short __b) {
13310 return __builtin_altivec_crypto_vpmsumh(__a, __b);
13313 static vector unsigned int __ATTRS_o_ai
13314 __builtin_crypto_vpmsumb(vector unsigned int __a, vector unsigned int __b) {
13315 return __builtin_altivec_crypto_vpmsumw(__a, __b);
13318 static vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpmsumb(
13319 vector unsigned long long __a, vector unsigned long long __b) {
13320 return __builtin_altivec_crypto_vpmsumd(__a, __b);
13323 static vector signed char __ATTRS_o_ai vec_vgbbd (vector signed char __a)
13325 return __builtin_altivec_vgbbd((vector unsigned char) __a);
13328 static vector unsigned char __ATTRS_o_ai vec_vgbbd (vector unsigned char __a)
13330 return __builtin_altivec_vgbbd(__a);
13333 static vector long long __ATTRS_o_ai
13334 vec_vbpermq (vector signed char __a, vector signed char __b)
13336 return __builtin_altivec_vbpermq((vector unsigned char) __a,
13337 (vector unsigned char) __b);
13340 static vector long long __ATTRS_o_ai
13341 vec_vbpermq (vector unsigned char __a, vector unsigned char __b)
13343 return __builtin_altivec_vbpermq(__a, __b);
13347 #undef __ATTRS_o_ai
13349 #endif /* __ALTIVEC_H */