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;
6566 #ifdef __LITTLE_ENDIAN__
6569 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6570 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6571 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6576 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6577 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6578 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6582 static vector unsigned char __ATTRS_o_ai vec_sld(vector unsigned char __a,
6583 vector unsigned char __b,
6584 unsigned const int __c) {
6585 unsigned char __d = __c & 0x0F;
6586 #ifdef __LITTLE_ENDIAN__
6589 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6590 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6591 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6596 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6597 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6598 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6602 static vector bool char __ATTRS_o_ai vec_sld(vector bool char __a,
6603 vector bool char __b,
6604 unsigned const int __c) {
6605 unsigned char __d = __c & 0x0F;
6606 #ifdef __LITTLE_ENDIAN__
6609 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6610 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6611 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6616 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6617 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6618 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6622 static vector signed short __ATTRS_o_ai vec_sld(vector signed short __a,
6623 vector signed short __b,
6624 unsigned const int __c) {
6625 unsigned char __d = __c & 0x0F;
6626 #ifdef __LITTLE_ENDIAN__
6629 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6630 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6631 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6636 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6637 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6638 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6642 static vector unsigned short __ATTRS_o_ai vec_sld(vector unsigned short __a,
6643 vector unsigned short __b,
6644 unsigned const int __c) {
6645 unsigned char __d = __c & 0x0F;
6646 #ifdef __LITTLE_ENDIAN__
6649 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6650 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6651 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6656 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6657 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6658 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6662 static vector bool short __ATTRS_o_ai vec_sld(vector bool short __a,
6663 vector bool short __b,
6664 unsigned const int __c) {
6665 unsigned char __d = __c & 0x0F;
6666 #ifdef __LITTLE_ENDIAN__
6669 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6670 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6671 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
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));
6682 static vector pixel __ATTRS_o_ai vec_sld(vector pixel __a, vector pixel __b,
6683 unsigned const int __c) {
6684 unsigned char __d = __c & 0x0F;
6685 #ifdef __LITTLE_ENDIAN__
6688 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6689 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6690 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6695 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6696 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6697 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6701 static vector signed int __ATTRS_o_ai vec_sld(vector signed int __a,
6702 vector signed int __b,
6703 unsigned const int __c) {
6704 unsigned char __d = __c & 0x0F;
6705 #ifdef __LITTLE_ENDIAN__
6708 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6709 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6710 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6715 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6716 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6717 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6721 static vector unsigned int __ATTRS_o_ai vec_sld(vector unsigned int __a,
6722 vector unsigned int __b,
6723 unsigned const int __c) {
6724 unsigned char __d = __c & 0x0F;
6725 #ifdef __LITTLE_ENDIAN__
6728 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6729 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6730 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6735 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6736 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6737 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6741 static vector bool int __ATTRS_o_ai vec_sld(vector bool int __a,
6742 vector bool int __b,
6743 unsigned const int __c) {
6744 unsigned char __d = __c & 0x0F;
6745 #ifdef __LITTLE_ENDIAN__
6748 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6749 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6750 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6755 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6756 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6757 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6761 static vector float __ATTRS_o_ai vec_sld(vector float __a, vector float __b,
6762 unsigned const int __c) {
6763 unsigned char __d = __c & 0x0F;
6764 #ifdef __LITTLE_ENDIAN__
6767 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6768 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6769 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6774 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6775 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6776 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6782 static vector signed char __ATTRS_o_ai vec_vsldoi(vector signed char __a,
6783 vector signed char __b,
6784 unsigned char __c) {
6785 unsigned char __d = __c & 0x0F;
6786 #ifdef __LITTLE_ENDIAN__
6789 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6790 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6791 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6796 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6797 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6798 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6802 static vector unsigned char __ATTRS_o_ai vec_vsldoi(vector unsigned char __a,
6803 vector unsigned char __b,
6804 unsigned char __c) {
6805 unsigned char __d = __c & 0x0F;
6806 #ifdef __LITTLE_ENDIAN__
6809 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6810 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6811 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6816 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6817 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6818 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6822 static vector short __ATTRS_o_ai vec_vsldoi(vector short __a, vector short __b,
6823 unsigned char __c) {
6824 unsigned char __d = __c & 0x0F;
6825 #ifdef __LITTLE_ENDIAN__
6828 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6829 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6830 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6835 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6836 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6837 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6841 static vector unsigned short __ATTRS_o_ai vec_vsldoi(vector unsigned short __a,
6842 vector unsigned short __b,
6843 unsigned char __c) {
6844 unsigned char __d = __c & 0x0F;
6845 #ifdef __LITTLE_ENDIAN__
6848 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6849 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6850 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6855 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6856 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6857 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6861 static vector pixel __ATTRS_o_ai vec_vsldoi(vector pixel __a, vector pixel __b,
6862 unsigned char __c) {
6863 unsigned char __d = __c & 0x0F;
6864 #ifdef __LITTLE_ENDIAN__
6867 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6868 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6869 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6874 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6875 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6876 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6880 static vector int __ATTRS_o_ai vec_vsldoi(vector int __a, vector int __b,
6881 unsigned char __c) {
6882 unsigned char __d = __c & 0x0F;
6883 #ifdef __LITTLE_ENDIAN__
6886 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6887 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6888 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6893 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6894 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6895 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6899 static vector unsigned int __ATTRS_o_ai vec_vsldoi(vector unsigned int __a,
6900 vector unsigned int __b,
6901 unsigned char __c) {
6902 unsigned char __d = __c & 0x0F;
6903 #ifdef __LITTLE_ENDIAN__
6906 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6907 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6908 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6913 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6914 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6915 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6919 static vector float __ATTRS_o_ai vec_vsldoi(vector float __a, vector float __b,
6920 unsigned char __c) {
6921 unsigned char __d = __c & 0x0F;
6922 #ifdef __LITTLE_ENDIAN__
6925 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6926 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6927 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6932 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6933 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6934 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6940 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
6941 vector unsigned char __b) {
6942 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
6946 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
6947 vector unsigned short __b) {
6948 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
6952 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
6953 vector unsigned int __b) {
6954 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
6958 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
6959 vector unsigned char __b) {
6960 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
6964 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
6965 vector unsigned short __b) {
6966 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
6970 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
6971 vector unsigned int __b) {
6972 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
6976 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
6977 vector unsigned char __b) {
6978 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
6982 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
6983 vector unsigned short __b) {
6984 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
6988 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
6989 vector unsigned int __b) {
6990 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
6994 static vector short __ATTRS_o_ai vec_sll(vector short __a,
6995 vector unsigned char __b) {
6996 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6999 static vector short __ATTRS_o_ai vec_sll(vector short __a,
7000 vector unsigned short __b) {
7001 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7004 static vector short __ATTRS_o_ai vec_sll(vector short __a,
7005 vector unsigned int __b) {
7006 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7009 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
7010 vector unsigned char __b) {
7011 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7015 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
7016 vector unsigned short __b) {
7017 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7021 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
7022 vector unsigned int __b) {
7023 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7027 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
7028 vector unsigned char __b) {
7029 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7033 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
7034 vector unsigned short __b) {
7035 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7039 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
7040 vector unsigned int __b) {
7041 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7045 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
7046 vector unsigned char __b) {
7047 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7050 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
7051 vector unsigned short __b) {
7052 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7055 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
7056 vector unsigned int __b) {
7057 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7060 static vector int __ATTRS_o_ai vec_sll(vector int __a,
7061 vector unsigned char __b) {
7062 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7065 static vector int __ATTRS_o_ai vec_sll(vector int __a,
7066 vector unsigned short __b) {
7067 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7070 static vector int __ATTRS_o_ai vec_sll(vector int __a,
7071 vector unsigned int __b) {
7072 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7075 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
7076 vector unsigned char __b) {
7077 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7081 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
7082 vector unsigned short __b) {
7083 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7087 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
7088 vector unsigned int __b) {
7089 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7093 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
7094 vector unsigned char __b) {
7095 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7099 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
7100 vector unsigned short __b) {
7101 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7105 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
7106 vector unsigned int __b) {
7107 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7113 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
7114 vector unsigned char __b) {
7115 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
7119 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
7120 vector unsigned short __b) {
7121 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
7125 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
7126 vector unsigned int __b) {
7127 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
7131 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
7132 vector unsigned char __b) {
7133 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
7137 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
7138 vector unsigned short __b) {
7139 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
7143 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
7144 vector unsigned int __b) {
7145 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
7149 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
7150 vector unsigned char __b) {
7151 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
7155 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
7156 vector unsigned short __b) {
7157 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
7161 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
7162 vector unsigned int __b) {
7163 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
7167 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
7168 vector unsigned char __b) {
7169 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7172 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
7173 vector unsigned short __b) {
7174 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7177 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
7178 vector unsigned int __b) {
7179 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7182 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
7183 vector unsigned char __b) {
7184 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7188 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
7189 vector unsigned short __b) {
7190 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7194 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
7195 vector unsigned int __b) {
7196 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7200 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
7201 vector unsigned char __b) {
7202 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7206 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
7207 vector unsigned short __b) {
7208 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7212 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
7213 vector unsigned int __b) {
7214 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7218 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
7219 vector unsigned char __b) {
7220 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7223 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
7224 vector unsigned short __b) {
7225 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7228 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
7229 vector unsigned int __b) {
7230 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7233 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
7234 vector unsigned char __b) {
7235 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7238 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
7239 vector unsigned short __b) {
7240 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7243 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
7244 vector unsigned int __b) {
7245 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7248 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
7249 vector unsigned char __b) {
7250 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7254 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
7255 vector unsigned short __b) {
7256 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7260 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
7261 vector unsigned int __b) {
7262 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7266 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
7267 vector unsigned char __b) {
7268 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7272 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
7273 vector unsigned short __b) {
7274 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7278 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
7279 vector unsigned int __b) {
7280 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7286 static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a,
7287 vector signed char __b) {
7288 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7292 static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a,
7293 vector unsigned char __b) {
7294 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7298 static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a,
7299 vector signed char __b) {
7300 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7304 static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a,
7305 vector unsigned char __b) {
7306 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7310 static vector short __ATTRS_o_ai vec_slo(vector short __a,
7311 vector signed char __b) {
7312 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7315 static vector short __ATTRS_o_ai vec_slo(vector short __a,
7316 vector unsigned char __b) {
7317 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7320 static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a,
7321 vector signed char __b) {
7322 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7326 static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a,
7327 vector unsigned char __b) {
7328 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7332 static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a,
7333 vector signed char __b) {
7334 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7337 static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a,
7338 vector unsigned char __b) {
7339 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7342 static vector int __ATTRS_o_ai vec_slo(vector int __a, vector signed char __b) {
7343 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7346 static vector int __ATTRS_o_ai vec_slo(vector int __a,
7347 vector unsigned char __b) {
7348 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7351 static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a,
7352 vector signed char __b) {
7353 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7357 static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a,
7358 vector unsigned char __b) {
7359 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7363 static vector float __ATTRS_o_ai vec_slo(vector float __a,
7364 vector signed char __b) {
7365 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7368 static vector float __ATTRS_o_ai vec_slo(vector float __a,
7369 vector unsigned char __b) {
7370 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7375 static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a,
7376 vector signed char __b) {
7377 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7381 static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a,
7382 vector unsigned char __b) {
7383 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7387 static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a,
7388 vector signed char __b) {
7389 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7393 static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a,
7394 vector unsigned char __b) {
7395 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7399 static vector short __ATTRS_o_ai vec_vslo(vector short __a,
7400 vector signed char __b) {
7401 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7404 static vector short __ATTRS_o_ai vec_vslo(vector short __a,
7405 vector unsigned char __b) {
7406 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7409 static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a,
7410 vector signed char __b) {
7411 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7415 static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a,
7416 vector unsigned char __b) {
7417 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7421 static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a,
7422 vector signed char __b) {
7423 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7426 static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a,
7427 vector unsigned char __b) {
7428 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7431 static vector int __ATTRS_o_ai vec_vslo(vector int __a,
7432 vector signed char __b) {
7433 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7436 static vector int __ATTRS_o_ai vec_vslo(vector int __a,
7437 vector unsigned char __b) {
7438 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7441 static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a,
7442 vector signed char __b) {
7443 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7447 static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a,
7448 vector unsigned char __b) {
7449 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7453 static vector float __ATTRS_o_ai vec_vslo(vector float __a,
7454 vector signed char __b) {
7455 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7458 static vector float __ATTRS_o_ai vec_vslo(vector float __a,
7459 vector unsigned char __b) {
7460 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7465 static vector signed char __ATTRS_o_ai vec_splat(vector signed char __a,
7466 unsigned const int __b) {
7467 return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F));
7470 static vector unsigned char __ATTRS_o_ai vec_splat(vector unsigned char __a,
7471 unsigned const int __b) {
7472 return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F));
7475 static vector bool char __ATTRS_o_ai vec_splat(vector bool char __a,
7476 unsigned const int __b) {
7477 return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F));
7480 static vector signed short __ATTRS_o_ai vec_splat(vector signed short __a,
7481 unsigned const int __b) {
7482 unsigned char b0 = (__b & 0x07) * 2;
7483 unsigned char b1 = b0 + 1;
7484 return vec_perm(__a, __a,
7485 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7486 b0, b1, b0, b1, b0, b1, b0, b1));
7489 static vector unsigned short __ATTRS_o_ai vec_splat(vector unsigned short __a,
7490 unsigned const int __b) {
7491 unsigned char b0 = (__b & 0x07) * 2;
7492 unsigned char b1 = b0 + 1;
7493 return vec_perm(__a, __a,
7494 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7495 b0, b1, b0, b1, b0, b1, b0, b1));
7498 static vector bool short __ATTRS_o_ai vec_splat(vector bool short __a,
7499 unsigned const int __b) {
7500 unsigned char b0 = (__b & 0x07) * 2;
7501 unsigned char b1 = b0 + 1;
7502 return vec_perm(__a, __a,
7503 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7504 b0, b1, b0, b1, b0, b1, b0, b1));
7507 static vector pixel __ATTRS_o_ai vec_splat(vector pixel __a,
7508 unsigned const int __b) {
7509 unsigned char b0 = (__b & 0x07) * 2;
7510 unsigned char b1 = b0 + 1;
7511 return vec_perm(__a, __a,
7512 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7513 b0, b1, b0, b1, b0, b1, b0, b1));
7516 static vector signed int __ATTRS_o_ai vec_splat(vector signed int __a,
7517 unsigned const int __b) {
7518 unsigned char b0 = (__b & 0x03) * 4;
7519 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7520 return vec_perm(__a, __a,
7521 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7522 b1, b2, b3, b0, b1, b2, b3));
7525 static vector unsigned int __ATTRS_o_ai vec_splat(vector unsigned int __a,
7526 unsigned const int __b) {
7527 unsigned char b0 = (__b & 0x03) * 4;
7528 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7529 return vec_perm(__a, __a,
7530 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7531 b1, b2, b3, b0, b1, b2, b3));
7534 static vector bool int __ATTRS_o_ai vec_splat(vector bool int __a,
7535 unsigned const int __b) {
7536 unsigned char b0 = (__b & 0x03) * 4;
7537 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7538 return vec_perm(__a, __a,
7539 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7540 b1, b2, b3, b0, b1, b2, b3));
7543 static vector float __ATTRS_o_ai vec_splat(vector float __a,
7544 unsigned const int __b) {
7545 unsigned char b0 = (__b & 0x03) * 4;
7546 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7547 return vec_perm(__a, __a,
7548 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7549 b1, b2, b3, b0, b1, b2, b3));
7553 static vector double __ATTRS_o_ai vec_splat(vector double __a,
7554 unsigned const int __b) {
7555 unsigned char b0 = (__b & 0x01) * 8;
7556 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7557 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7558 return vec_perm(__a, __a,
7559 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7560 b0, b1, b2, b3, b4, b5, b6, b7));
7562 static vector bool long long __ATTRS_o_ai vec_splat(vector bool long long __a,
7563 unsigned const int __b) {
7564 unsigned char b0 = (__b & 0x01) * 8;
7565 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7566 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7567 return vec_perm(__a, __a,
7568 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7569 b0, b1, b2, b3, b4, b5, b6, b7));
7571 static vector signed long long __ATTRS_o_ai
7572 vec_splat(vector signed long long __a, unsigned const int __b) {
7573 unsigned char b0 = (__b & 0x01) * 8;
7574 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7575 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7576 return vec_perm(__a, __a,
7577 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7578 b0, b1, b2, b3, b4, b5, b6, b7));
7580 static vector unsigned long long __ATTRS_o_ai
7581 vec_splat(vector unsigned long long __a, unsigned const int __b) {
7582 unsigned char b0 = (__b & 0x01) * 8;
7583 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7584 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7585 return vec_perm(__a, __a,
7586 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7587 b0, b1, b2, b3, b4, b5, b6, b7));
7593 #define __builtin_altivec_vspltb vec_vspltb
7595 static vector signed char __ATTRS_o_ai vec_vspltb(vector signed char __a,
7596 unsigned char __b) {
7597 return vec_perm(__a, __a, (vector unsigned char)(__b));
7600 static vector unsigned char __ATTRS_o_ai vec_vspltb(vector unsigned char __a,
7601 unsigned char __b) {
7602 return vec_perm(__a, __a, (vector unsigned char)(__b));
7605 static vector bool char __ATTRS_o_ai vec_vspltb(vector bool char __a,
7606 unsigned char __b) {
7607 return vec_perm(__a, __a, (vector unsigned char)(__b));
7612 #define __builtin_altivec_vsplth vec_vsplth
7614 static vector short __ATTRS_o_ai vec_vsplth(vector short __a,
7615 unsigned char __b) {
7617 unsigned char b1 = __b + 1;
7618 return vec_perm(__a, __a,
7619 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7620 __b, b1, __b, b1, __b, b1, __b, b1));
7623 static vector unsigned short __ATTRS_o_ai vec_vsplth(vector unsigned short __a,
7624 unsigned char __b) {
7626 unsigned char b1 = __b + 1;
7627 return vec_perm(__a, __a,
7628 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7629 __b, b1, __b, b1, __b, b1, __b, b1));
7632 static vector bool short __ATTRS_o_ai vec_vsplth(vector bool short __a,
7633 unsigned char __b) {
7635 unsigned char b1 = __b + 1;
7636 return vec_perm(__a, __a,
7637 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7638 __b, b1, __b, b1, __b, b1, __b, b1));
7641 static vector pixel __ATTRS_o_ai vec_vsplth(vector pixel __a,
7642 unsigned char __b) {
7644 unsigned char b1 = __b + 1;
7645 return vec_perm(__a, __a,
7646 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7647 __b, b1, __b, b1, __b, b1, __b, b1));
7652 #define __builtin_altivec_vspltw vec_vspltw
7654 static vector int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b) {
7656 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7657 return vec_perm(__a, __a,
7658 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7659 b1, b2, b3, __b, b1, b2, b3));
7662 static vector unsigned int __ATTRS_o_ai vec_vspltw(vector unsigned int __a,
7663 unsigned char __b) {
7665 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7666 return vec_perm(__a, __a,
7667 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7668 b1, b2, b3, __b, b1, b2, b3));
7671 static vector bool int __ATTRS_o_ai vec_vspltw(vector bool int __a,
7672 unsigned char __b) {
7674 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7675 return vec_perm(__a, __a,
7676 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7677 b1, b2, b3, __b, b1, b2, b3));
7680 static vector float __ATTRS_o_ai vec_vspltw(vector float __a,
7681 unsigned char __b) {
7683 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7684 return vec_perm(__a, __a,
7685 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7686 b1, b2, b3, __b, b1, b2, b3));
7691 #define __builtin_altivec_vspltisb vec_splat_s8
7693 // FIXME: parameter should be treated as 5-bit signed literal
7694 static vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a) {
7695 return (vector signed char)(__a);
7700 // FIXME: parameter should be treated as 5-bit signed literal
7701 static vector signed char __ATTRS_o_ai vec_vspltisb(signed char __a) {
7702 return (vector signed char)(__a);
7707 #define __builtin_altivec_vspltish vec_splat_s16
7709 // FIXME: parameter should be treated as 5-bit signed literal
7710 static vector short __ATTRS_o_ai vec_splat_s16(signed char __a) {
7711 return (vector short)(__a);
7716 // FIXME: parameter should be treated as 5-bit signed literal
7717 static vector short __ATTRS_o_ai vec_vspltish(signed char __a) {
7718 return (vector short)(__a);
7723 #define __builtin_altivec_vspltisw vec_splat_s32
7725 // FIXME: parameter should be treated as 5-bit signed literal
7726 static vector int __ATTRS_o_ai vec_splat_s32(signed char __a) {
7727 return (vector int)(__a);
7732 // FIXME: parameter should be treated as 5-bit signed literal
7733 static vector int __ATTRS_o_ai vec_vspltisw(signed char __a) {
7734 return (vector int)(__a);
7739 // FIXME: parameter should be treated as 5-bit signed literal
7740 static vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a) {
7741 return (vector unsigned char)(__a);
7746 // FIXME: parameter should be treated as 5-bit signed literal
7747 static vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a) {
7748 return (vector unsigned short)(__a);
7753 // FIXME: parameter should be treated as 5-bit signed literal
7754 static vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a) {
7755 return (vector unsigned int)(__a);
7760 static vector signed char __ATTRS_o_ai vec_sr(vector signed char __a,
7761 vector unsigned char __b) {
7762 vector unsigned char __res = (vector unsigned char)__a >> __b;
7763 return (vector signed char)__res;
7766 static vector unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a,
7767 vector unsigned char __b) {
7771 static vector signed short __ATTRS_o_ai vec_sr(vector signed short __a,
7772 vector unsigned short __b) {
7773 vector unsigned short __res = (vector unsigned short)__a >> __b;
7774 return (vector signed short)__res;
7777 static vector unsigned short __ATTRS_o_ai vec_sr(vector unsigned short __a,
7778 vector unsigned short __b) {
7782 static vector signed int __ATTRS_o_ai vec_sr(vector signed int __a,
7783 vector unsigned int __b) {
7784 vector unsigned int __res = (vector unsigned int)__a >> __b;
7785 return (vector signed int)__res;
7788 static vector unsigned int __ATTRS_o_ai vec_sr(vector unsigned int __a,
7789 vector unsigned int __b) {
7793 #ifdef __POWER8_VECTOR__
7794 static vector signed long long __ATTRS_o_ai
7795 vec_sr(vector signed long long __a, vector unsigned long long __b) {
7796 vector unsigned long long __res = (vector unsigned long long)__a >> __b;
7797 return (vector signed long long)__res;
7800 static vector unsigned long long __ATTRS_o_ai
7801 vec_sr(vector unsigned long long __a, vector unsigned long long __b) {
7808 #define __builtin_altivec_vsrb vec_vsrb
7810 static vector signed char __ATTRS_o_ai vec_vsrb(vector signed char __a,
7811 vector unsigned char __b) {
7812 return __a >> (vector signed char)__b;
7815 static vector unsigned char __ATTRS_o_ai vec_vsrb(vector unsigned char __a,
7816 vector unsigned char __b) {
7822 #define __builtin_altivec_vsrh vec_vsrh
7824 static vector short __ATTRS_o_ai vec_vsrh(vector short __a,
7825 vector unsigned short __b) {
7826 return __a >> (vector short)__b;
7829 static vector unsigned short __ATTRS_o_ai vec_vsrh(vector unsigned short __a,
7830 vector unsigned short __b) {
7836 #define __builtin_altivec_vsrw vec_vsrw
7838 static vector int __ATTRS_o_ai vec_vsrw(vector int __a,
7839 vector unsigned int __b) {
7840 return __a >> (vector int)__b;
7843 static vector unsigned int __ATTRS_o_ai vec_vsrw(vector unsigned int __a,
7844 vector unsigned int __b) {
7850 static vector signed char __ATTRS_o_ai vec_sra(vector signed char __a,
7851 vector unsigned char __b) {
7852 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
7855 static vector unsigned char __ATTRS_o_ai vec_sra(vector unsigned char __a,
7856 vector unsigned char __b) {
7857 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
7860 static vector short __ATTRS_o_ai vec_sra(vector short __a,
7861 vector unsigned short __b) {
7862 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
7865 static vector unsigned short __ATTRS_o_ai vec_sra(vector unsigned short __a,
7866 vector unsigned short __b) {
7867 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
7870 static vector int __ATTRS_o_ai vec_sra(vector int __a,
7871 vector unsigned int __b) {
7872 return __builtin_altivec_vsraw(__a, __b);
7875 static vector unsigned int __ATTRS_o_ai vec_sra(vector unsigned int __a,
7876 vector unsigned int __b) {
7877 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
7880 #ifdef __POWER8_VECTOR__
7881 static vector signed long long __ATTRS_o_ai
7882 vec_sra(vector signed long long __a, vector unsigned long long __b) {
7886 static vector unsigned long long __ATTRS_o_ai
7887 vec_sra(vector unsigned long long __a, vector unsigned long long __b) {
7888 return (vector unsigned long long)((vector signed long long)__a >> __b);
7894 static vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a,
7895 vector unsigned char __b) {
7896 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
7899 static vector unsigned char __ATTRS_o_ai vec_vsrab(vector unsigned char __a,
7900 vector unsigned char __b) {
7901 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
7906 static vector short __ATTRS_o_ai vec_vsrah(vector short __a,
7907 vector unsigned short __b) {
7908 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
7911 static vector unsigned short __ATTRS_o_ai vec_vsrah(vector unsigned short __a,
7912 vector unsigned short __b) {
7913 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
7918 static vector int __ATTRS_o_ai vec_vsraw(vector int __a,
7919 vector unsigned int __b) {
7920 return __builtin_altivec_vsraw(__a, __b);
7923 static vector unsigned int __ATTRS_o_ai vec_vsraw(vector unsigned int __a,
7924 vector unsigned int __b) {
7925 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
7930 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
7931 vector unsigned char __b) {
7932 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
7936 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
7937 vector unsigned short __b) {
7938 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
7942 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
7943 vector unsigned int __b) {
7944 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
7948 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
7949 vector unsigned char __b) {
7950 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
7954 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
7955 vector unsigned short __b) {
7956 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
7960 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
7961 vector unsigned int __b) {
7962 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
7966 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
7967 vector unsigned char __b) {
7968 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
7972 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
7973 vector unsigned short __b) {
7974 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
7978 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
7979 vector unsigned int __b) {
7980 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
7984 static vector short __ATTRS_o_ai vec_srl(vector short __a,
7985 vector unsigned char __b) {
7986 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7989 static vector short __ATTRS_o_ai vec_srl(vector short __a,
7990 vector unsigned short __b) {
7991 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7994 static vector short __ATTRS_o_ai vec_srl(vector short __a,
7995 vector unsigned int __b) {
7996 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7999 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
8000 vector unsigned char __b) {
8001 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8005 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
8006 vector unsigned short __b) {
8007 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8011 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
8012 vector unsigned int __b) {
8013 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8017 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
8018 vector unsigned char __b) {
8019 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8023 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
8024 vector unsigned short __b) {
8025 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8029 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
8030 vector unsigned int __b) {
8031 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8035 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
8036 vector unsigned char __b) {
8037 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8040 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
8041 vector unsigned short __b) {
8042 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8045 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
8046 vector unsigned int __b) {
8047 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8050 static vector int __ATTRS_o_ai vec_srl(vector int __a,
8051 vector unsigned char __b) {
8052 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8055 static vector int __ATTRS_o_ai vec_srl(vector int __a,
8056 vector unsigned short __b) {
8057 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8060 static vector int __ATTRS_o_ai vec_srl(vector int __a,
8061 vector unsigned int __b) {
8062 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8065 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
8066 vector unsigned char __b) {
8067 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8071 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
8072 vector unsigned short __b) {
8073 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8077 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
8078 vector unsigned int __b) {
8079 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8083 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
8084 vector unsigned char __b) {
8085 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8089 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
8090 vector unsigned short __b) {
8091 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8095 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
8096 vector unsigned int __b) {
8097 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8103 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
8104 vector unsigned char __b) {
8105 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
8109 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
8110 vector unsigned short __b) {
8111 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
8115 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
8116 vector unsigned int __b) {
8117 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
8121 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
8122 vector unsigned char __b) {
8123 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
8127 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
8128 vector unsigned short __b) {
8129 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
8133 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
8134 vector unsigned int __b) {
8135 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
8139 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
8140 vector unsigned char __b) {
8141 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
8145 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
8146 vector unsigned short __b) {
8147 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
8151 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
8152 vector unsigned int __b) {
8153 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
8157 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
8158 vector unsigned char __b) {
8159 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8162 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
8163 vector unsigned short __b) {
8164 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8167 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
8168 vector unsigned int __b) {
8169 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8172 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
8173 vector unsigned char __b) {
8174 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8178 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
8179 vector unsigned short __b) {
8180 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8184 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
8185 vector unsigned int __b) {
8186 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8190 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
8191 vector unsigned char __b) {
8192 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8196 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
8197 vector unsigned short __b) {
8198 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8202 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
8203 vector unsigned int __b) {
8204 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8208 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
8209 vector unsigned char __b) {
8210 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8213 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
8214 vector unsigned short __b) {
8215 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8218 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
8219 vector unsigned int __b) {
8220 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8223 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
8224 vector unsigned char __b) {
8225 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8228 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
8229 vector unsigned short __b) {
8230 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8233 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
8234 vector unsigned int __b) {
8235 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8238 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
8239 vector unsigned char __b) {
8240 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8244 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
8245 vector unsigned short __b) {
8246 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8250 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
8251 vector unsigned int __b) {
8252 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8256 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
8257 vector unsigned char __b) {
8258 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8262 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
8263 vector unsigned short __b) {
8264 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8268 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
8269 vector unsigned int __b) {
8270 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8276 static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a,
8277 vector signed char __b) {
8278 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8282 static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a,
8283 vector unsigned char __b) {
8284 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8288 static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a,
8289 vector signed char __b) {
8290 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8294 static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a,
8295 vector unsigned char __b) {
8296 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8300 static vector short __ATTRS_o_ai vec_sro(vector short __a,
8301 vector signed char __b) {
8302 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8305 static vector short __ATTRS_o_ai vec_sro(vector short __a,
8306 vector unsigned char __b) {
8307 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8310 static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a,
8311 vector signed char __b) {
8312 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8316 static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a,
8317 vector unsigned char __b) {
8318 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8322 static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a,
8323 vector signed char __b) {
8324 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8327 static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a,
8328 vector unsigned char __b) {
8329 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8332 static vector int __ATTRS_o_ai vec_sro(vector int __a, vector signed char __b) {
8333 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8336 static vector int __ATTRS_o_ai vec_sro(vector int __a,
8337 vector unsigned char __b) {
8338 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8341 static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a,
8342 vector signed char __b) {
8343 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8347 static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a,
8348 vector unsigned char __b) {
8349 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8353 static vector float __ATTRS_o_ai vec_sro(vector float __a,
8354 vector signed char __b) {
8355 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8358 static vector float __ATTRS_o_ai vec_sro(vector float __a,
8359 vector unsigned char __b) {
8360 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8365 static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a,
8366 vector signed char __b) {
8367 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8371 static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a,
8372 vector unsigned char __b) {
8373 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8377 static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a,
8378 vector signed char __b) {
8379 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8383 static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a,
8384 vector unsigned char __b) {
8385 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8389 static vector short __ATTRS_o_ai vec_vsro(vector short __a,
8390 vector signed char __b) {
8391 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8394 static vector short __ATTRS_o_ai vec_vsro(vector short __a,
8395 vector unsigned char __b) {
8396 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8399 static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a,
8400 vector signed char __b) {
8401 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8405 static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a,
8406 vector unsigned char __b) {
8407 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8411 static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a,
8412 vector signed char __b) {
8413 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8416 static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a,
8417 vector unsigned char __b) {
8418 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8421 static vector int __ATTRS_o_ai vec_vsro(vector int __a,
8422 vector signed char __b) {
8423 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8426 static vector int __ATTRS_o_ai vec_vsro(vector int __a,
8427 vector unsigned char __b) {
8428 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8431 static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a,
8432 vector signed char __b) {
8433 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8437 static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a,
8438 vector unsigned char __b) {
8439 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8443 static vector float __ATTRS_o_ai vec_vsro(vector float __a,
8444 vector signed char __b) {
8445 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8448 static vector float __ATTRS_o_ai vec_vsro(vector float __a,
8449 vector unsigned char __b) {
8450 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8455 static void __ATTRS_o_ai vec_st(vector signed char __a, int __b,
8456 vector signed char *__c) {
8457 __builtin_altivec_stvx((vector int)__a, __b, __c);
8460 static void __ATTRS_o_ai vec_st(vector signed char __a, int __b,
8462 __builtin_altivec_stvx((vector int)__a, __b, __c);
8465 static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b,
8466 vector unsigned char *__c) {
8467 __builtin_altivec_stvx((vector int)__a, __b, __c);
8470 static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b,
8471 unsigned char *__c) {
8472 __builtin_altivec_stvx((vector int)__a, __b, __c);
8475 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
8477 __builtin_altivec_stvx((vector int)__a, __b, __c);
8480 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
8481 unsigned char *__c) {
8482 __builtin_altivec_stvx((vector int)__a, __b, __c);
8485 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
8486 vector bool char *__c) {
8487 __builtin_altivec_stvx((vector int)__a, __b, __c);
8490 static void __ATTRS_o_ai vec_st(vector short __a, int __b, vector short *__c) {
8491 __builtin_altivec_stvx((vector int)__a, __b, __c);
8494 static void __ATTRS_o_ai vec_st(vector short __a, int __b, short *__c) {
8495 __builtin_altivec_stvx((vector int)__a, __b, __c);
8498 static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b,
8499 vector unsigned short *__c) {
8500 __builtin_altivec_stvx((vector int)__a, __b, __c);
8503 static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b,
8504 unsigned short *__c) {
8505 __builtin_altivec_stvx((vector int)__a, __b, __c);
8508 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b, short *__c) {
8509 __builtin_altivec_stvx((vector int)__a, __b, __c);
8512 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b,
8513 unsigned short *__c) {
8514 __builtin_altivec_stvx((vector int)__a, __b, __c);
8517 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b,
8518 vector bool short *__c) {
8519 __builtin_altivec_stvx((vector int)__a, __b, __c);
8522 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, short *__c) {
8523 __builtin_altivec_stvx((vector int)__a, __b, __c);
8526 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b,
8527 unsigned short *__c) {
8528 __builtin_altivec_stvx((vector int)__a, __b, __c);
8531 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, vector pixel *__c) {
8532 __builtin_altivec_stvx((vector int)__a, __b, __c);
8535 static void __ATTRS_o_ai vec_st(vector int __a, int __b, vector int *__c) {
8536 __builtin_altivec_stvx(__a, __b, __c);
8539 static void __ATTRS_o_ai vec_st(vector int __a, int __b, int *__c) {
8540 __builtin_altivec_stvx(__a, __b, __c);
8543 static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b,
8544 vector unsigned int *__c) {
8545 __builtin_altivec_stvx((vector int)__a, __b, __c);
8548 static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b,
8549 unsigned int *__c) {
8550 __builtin_altivec_stvx((vector int)__a, __b, __c);
8553 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b, int *__c) {
8554 __builtin_altivec_stvx((vector int)__a, __b, __c);
8557 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b,
8558 unsigned int *__c) {
8559 __builtin_altivec_stvx((vector int)__a, __b, __c);
8562 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b,
8563 vector bool int *__c) {
8564 __builtin_altivec_stvx((vector int)__a, __b, __c);
8567 static void __ATTRS_o_ai vec_st(vector float __a, int __b, vector float *__c) {
8568 __builtin_altivec_stvx((vector int)__a, __b, __c);
8571 static void __ATTRS_o_ai vec_st(vector float __a, int __b, float *__c) {
8572 __builtin_altivec_stvx((vector int)__a, __b, __c);
8577 static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b,
8578 vector signed char *__c) {
8579 __builtin_altivec_stvx((vector int)__a, __b, __c);
8582 static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b,
8584 __builtin_altivec_stvx((vector int)__a, __b, __c);
8587 static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b,
8588 vector unsigned char *__c) {
8589 __builtin_altivec_stvx((vector int)__a, __b, __c);
8592 static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b,
8593 unsigned char *__c) {
8594 __builtin_altivec_stvx((vector int)__a, __b, __c);
8597 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
8599 __builtin_altivec_stvx((vector int)__a, __b, __c);
8602 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
8603 unsigned char *__c) {
8604 __builtin_altivec_stvx((vector int)__a, __b, __c);
8607 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
8608 vector bool char *__c) {
8609 __builtin_altivec_stvx((vector int)__a, __b, __c);
8612 static void __ATTRS_o_ai vec_stvx(vector short __a, int __b,
8613 vector short *__c) {
8614 __builtin_altivec_stvx((vector int)__a, __b, __c);
8617 static void __ATTRS_o_ai vec_stvx(vector short __a, int __b, short *__c) {
8618 __builtin_altivec_stvx((vector int)__a, __b, __c);
8621 static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b,
8622 vector unsigned short *__c) {
8623 __builtin_altivec_stvx((vector int)__a, __b, __c);
8626 static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b,
8627 unsigned short *__c) {
8628 __builtin_altivec_stvx((vector int)__a, __b, __c);
8631 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b, short *__c) {
8632 __builtin_altivec_stvx((vector int)__a, __b, __c);
8635 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b,
8636 unsigned short *__c) {
8637 __builtin_altivec_stvx((vector int)__a, __b, __c);
8640 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b,
8641 vector bool short *__c) {
8642 __builtin_altivec_stvx((vector int)__a, __b, __c);
8645 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b, short *__c) {
8646 __builtin_altivec_stvx((vector int)__a, __b, __c);
8649 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b,
8650 unsigned short *__c) {
8651 __builtin_altivec_stvx((vector int)__a, __b, __c);
8654 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b,
8655 vector pixel *__c) {
8656 __builtin_altivec_stvx((vector int)__a, __b, __c);
8659 static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, vector int *__c) {
8660 __builtin_altivec_stvx(__a, __b, __c);
8663 static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, int *__c) {
8664 __builtin_altivec_stvx(__a, __b, __c);
8667 static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b,
8668 vector unsigned int *__c) {
8669 __builtin_altivec_stvx((vector int)__a, __b, __c);
8672 static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b,
8673 unsigned int *__c) {
8674 __builtin_altivec_stvx((vector int)__a, __b, __c);
8677 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b, int *__c) {
8678 __builtin_altivec_stvx((vector int)__a, __b, __c);
8681 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b,
8682 unsigned int *__c) {
8683 __builtin_altivec_stvx((vector int)__a, __b, __c);
8686 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b,
8687 vector bool int *__c) {
8688 __builtin_altivec_stvx((vector int)__a, __b, __c);
8691 static void __ATTRS_o_ai vec_stvx(vector float __a, int __b,
8692 vector float *__c) {
8693 __builtin_altivec_stvx((vector int)__a, __b, __c);
8696 static void __ATTRS_o_ai vec_stvx(vector float __a, int __b, float *__c) {
8697 __builtin_altivec_stvx((vector int)__a, __b, __c);
8702 static void __ATTRS_o_ai vec_ste(vector signed char __a, int __b,
8704 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8707 static void __ATTRS_o_ai vec_ste(vector unsigned char __a, int __b,
8708 unsigned char *__c) {
8709 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8712 static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b,
8714 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8717 static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b,
8718 unsigned char *__c) {
8719 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8722 static void __ATTRS_o_ai vec_ste(vector short __a, int __b, short *__c) {
8723 __builtin_altivec_stvehx(__a, __b, __c);
8726 static void __ATTRS_o_ai vec_ste(vector unsigned short __a, int __b,
8727 unsigned short *__c) {
8728 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8731 static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b, short *__c) {
8732 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8735 static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b,
8736 unsigned short *__c) {
8737 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8740 static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b, short *__c) {
8741 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8744 static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b,
8745 unsigned short *__c) {
8746 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8749 static void __ATTRS_o_ai vec_ste(vector int __a, int __b, int *__c) {
8750 __builtin_altivec_stvewx(__a, __b, __c);
8753 static void __ATTRS_o_ai vec_ste(vector unsigned int __a, int __b,
8754 unsigned int *__c) {
8755 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8758 static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b, int *__c) {
8759 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8762 static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b,
8763 unsigned int *__c) {
8764 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8767 static void __ATTRS_o_ai vec_ste(vector float __a, int __b, float *__c) {
8768 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8773 static void __ATTRS_o_ai vec_stvebx(vector signed char __a, int __b,
8775 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8778 static void __ATTRS_o_ai vec_stvebx(vector unsigned char __a, int __b,
8779 unsigned char *__c) {
8780 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8783 static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b,
8785 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8788 static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b,
8789 unsigned char *__c) {
8790 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8795 static void __ATTRS_o_ai vec_stvehx(vector short __a, int __b, short *__c) {
8796 __builtin_altivec_stvehx(__a, __b, __c);
8799 static void __ATTRS_o_ai vec_stvehx(vector unsigned short __a, int __b,
8800 unsigned short *__c) {
8801 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8804 static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b,
8806 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8809 static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b,
8810 unsigned short *__c) {
8811 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8814 static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b, short *__c) {
8815 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8818 static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b,
8819 unsigned short *__c) {
8820 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8825 static void __ATTRS_o_ai vec_stvewx(vector int __a, int __b, int *__c) {
8826 __builtin_altivec_stvewx(__a, __b, __c);
8829 static void __ATTRS_o_ai vec_stvewx(vector unsigned int __a, int __b,
8830 unsigned int *__c) {
8831 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8834 static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b, int *__c) {
8835 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8838 static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b,
8839 unsigned int *__c) {
8840 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8843 static void __ATTRS_o_ai vec_stvewx(vector float __a, int __b, float *__c) {
8844 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8849 static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b,
8850 vector signed char *__c) {
8851 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8854 static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b,
8856 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8859 static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b,
8860 vector unsigned char *__c) {
8861 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8864 static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b,
8865 unsigned char *__c) {
8866 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8869 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
8871 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8874 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
8875 unsigned char *__c) {
8876 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8879 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
8880 vector bool char *__c) {
8881 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8884 static void __ATTRS_o_ai vec_stl(vector short __a, int __b, vector short *__c) {
8885 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8888 static void __ATTRS_o_ai vec_stl(vector short __a, int __b, short *__c) {
8889 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8892 static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b,
8893 vector unsigned short *__c) {
8894 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8897 static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b,
8898 unsigned short *__c) {
8899 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8902 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b, short *__c) {
8903 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8906 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b,
8907 unsigned short *__c) {
8908 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8911 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b,
8912 vector bool short *__c) {
8913 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8916 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, short *__c) {
8917 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8920 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b,
8921 unsigned short *__c) {
8922 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8925 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, vector pixel *__c) {
8926 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8929 static void __ATTRS_o_ai vec_stl(vector int __a, int __b, vector int *__c) {
8930 __builtin_altivec_stvxl(__a, __b, __c);
8933 static void __ATTRS_o_ai vec_stl(vector int __a, int __b, int *__c) {
8934 __builtin_altivec_stvxl(__a, __b, __c);
8937 static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b,
8938 vector unsigned int *__c) {
8939 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8942 static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b,
8943 unsigned int *__c) {
8944 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8947 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b, int *__c) {
8948 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8951 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b,
8952 unsigned int *__c) {
8953 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8956 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b,
8957 vector bool int *__c) {
8958 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8961 static void __ATTRS_o_ai vec_stl(vector float __a, int __b, vector float *__c) {
8962 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8965 static void __ATTRS_o_ai vec_stl(vector float __a, int __b, float *__c) {
8966 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8971 static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b,
8972 vector signed char *__c) {
8973 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8976 static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b,
8978 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8981 static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b,
8982 vector unsigned char *__c) {
8983 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8986 static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b,
8987 unsigned char *__c) {
8988 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8991 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
8993 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8996 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
8997 unsigned char *__c) {
8998 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9001 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
9002 vector bool char *__c) {
9003 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9006 static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b,
9007 vector short *__c) {
9008 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9011 static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b, short *__c) {
9012 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9015 static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b,
9016 vector unsigned short *__c) {
9017 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9020 static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b,
9021 unsigned short *__c) {
9022 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9025 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b, short *__c) {
9026 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9029 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b,
9030 unsigned short *__c) {
9031 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9034 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b,
9035 vector bool short *__c) {
9036 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9039 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b, short *__c) {
9040 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9043 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b,
9044 unsigned short *__c) {
9045 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9048 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b,
9049 vector pixel *__c) {
9050 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9053 static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, vector int *__c) {
9054 __builtin_altivec_stvxl(__a, __b, __c);
9057 static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, int *__c) {
9058 __builtin_altivec_stvxl(__a, __b, __c);
9061 static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b,
9062 vector unsigned int *__c) {
9063 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9066 static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b,
9067 unsigned int *__c) {
9068 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9071 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b, int *__c) {
9072 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9075 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b,
9076 unsigned int *__c) {
9077 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9080 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b,
9081 vector bool int *__c) {
9082 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9085 static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b,
9086 vector float *__c) {
9087 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9090 static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b, float *__c) {
9091 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9096 static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a,
9097 vector signed char __b) {
9101 static vector signed char __ATTRS_o_ai vec_sub(vector bool char __a,
9102 vector signed char __b) {
9103 return (vector signed char)__a - __b;
9106 static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a,
9107 vector bool char __b) {
9108 return __a - (vector signed char)__b;
9111 static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a,
9112 vector unsigned char __b) {
9116 static vector unsigned char __ATTRS_o_ai vec_sub(vector bool char __a,
9117 vector unsigned char __b) {
9118 return (vector unsigned char)__a - __b;
9121 static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a,
9122 vector bool char __b) {
9123 return __a - (vector unsigned char)__b;
9126 static vector short __ATTRS_o_ai vec_sub(vector short __a, vector short __b) {
9130 static vector short __ATTRS_o_ai vec_sub(vector bool short __a,
9132 return (vector short)__a - __b;
9135 static vector short __ATTRS_o_ai vec_sub(vector short __a,
9136 vector bool short __b) {
9137 return __a - (vector short)__b;
9140 static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a,
9141 vector unsigned short __b) {
9145 static vector unsigned short __ATTRS_o_ai vec_sub(vector bool short __a,
9146 vector unsigned short __b) {
9147 return (vector unsigned short)__a - __b;
9150 static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a,
9151 vector bool short __b) {
9152 return __a - (vector unsigned short)__b;
9155 static vector int __ATTRS_o_ai vec_sub(vector int __a, vector int __b) {
9159 static vector int __ATTRS_o_ai vec_sub(vector bool int __a, vector int __b) {
9160 return (vector int)__a - __b;
9163 static vector int __ATTRS_o_ai vec_sub(vector int __a, vector bool int __b) {
9164 return __a - (vector int)__b;
9167 static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a,
9168 vector unsigned int __b) {
9172 static vector unsigned int __ATTRS_o_ai vec_sub(vector bool int __a,
9173 vector unsigned int __b) {
9174 return (vector unsigned int)__a - __b;
9177 static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a,
9178 vector bool int __b) {
9179 return __a - (vector unsigned int)__b;
9182 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9183 static vector signed __int128 __ATTRS_o_ai vec_sub(vector signed __int128 __a,
9184 vector signed __int128 __b) {
9188 static vector unsigned __int128 __ATTRS_o_ai
9189 vec_sub(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9192 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9194 static vector float __ATTRS_o_ai vec_sub(vector float __a, vector float __b) {
9199 static vector double __ATTRS_o_ai
9200 vec_sub(vector double __a, vector double __b) {
9207 #define __builtin_altivec_vsububm vec_vsububm
9209 static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a,
9210 vector signed char __b) {
9214 static vector signed char __ATTRS_o_ai vec_vsububm(vector bool char __a,
9215 vector signed char __b) {
9216 return (vector signed char)__a - __b;
9219 static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a,
9220 vector bool char __b) {
9221 return __a - (vector signed char)__b;
9224 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a,
9225 vector unsigned char __b) {
9229 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector bool char __a,
9230 vector unsigned char __b) {
9231 return (vector unsigned char)__a - __b;
9234 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a,
9235 vector bool char __b) {
9236 return __a - (vector unsigned char)__b;
9241 #define __builtin_altivec_vsubuhm vec_vsubuhm
9243 static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a,
9248 static vector short __ATTRS_o_ai vec_vsubuhm(vector bool short __a,
9250 return (vector short)__a - __b;
9253 static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a,
9254 vector bool short __b) {
9255 return __a - (vector short)__b;
9258 static vector unsigned short __ATTRS_o_ai
9259 vec_vsubuhm(vector unsigned short __a, vector unsigned short __b) {
9263 static vector unsigned short __ATTRS_o_ai
9264 vec_vsubuhm(vector bool short __a, vector unsigned short __b) {
9265 return (vector unsigned short)__a - __b;
9268 static vector unsigned short __ATTRS_o_ai vec_vsubuhm(vector unsigned short __a,
9269 vector bool short __b) {
9270 return __a - (vector unsigned short)__b;
9275 #define __builtin_altivec_vsubuwm vec_vsubuwm
9277 static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b) {
9281 static vector int __ATTRS_o_ai vec_vsubuwm(vector bool int __a,
9283 return (vector int)__a - __b;
9286 static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a,
9287 vector bool int __b) {
9288 return __a - (vector int)__b;
9291 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a,
9292 vector unsigned int __b) {
9296 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector bool int __a,
9297 vector unsigned int __b) {
9298 return (vector unsigned int)__a - __b;
9301 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a,
9302 vector bool int __b) {
9303 return __a - (vector unsigned int)__b;
9308 #define __builtin_altivec_vsubfp vec_vsubfp
9310 static vector float __attribute__((__always_inline__))
9311 vec_vsubfp(vector float __a, vector float __b) {
9317 static vector unsigned int __ATTRS_o_ai vec_subc(vector unsigned int __a,
9318 vector unsigned int __b) {
9319 return __builtin_altivec_vsubcuw(__a, __b);
9322 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9323 static vector unsigned __int128 __ATTRS_o_ai
9324 vec_subc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9325 return __builtin_altivec_vsubcuq(__a, __b);
9328 static vector signed __int128 __ATTRS_o_ai
9329 vec_subc(vector signed __int128 __a, vector signed __int128 __b) {
9330 return __builtin_altivec_vsubcuq(__a, __b);
9332 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9336 static vector unsigned int __attribute__((__always_inline__))
9337 vec_vsubcuw(vector unsigned int __a, vector unsigned int __b) {
9338 return __builtin_altivec_vsubcuw(__a, __b);
9343 static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a,
9344 vector signed char __b) {
9345 return __builtin_altivec_vsubsbs(__a, __b);
9348 static vector signed char __ATTRS_o_ai vec_subs(vector bool char __a,
9349 vector signed char __b) {
9350 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
9353 static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a,
9354 vector bool char __b) {
9355 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
9358 static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a,
9359 vector unsigned char __b) {
9360 return __builtin_altivec_vsububs(__a, __b);
9363 static vector unsigned char __ATTRS_o_ai vec_subs(vector bool char __a,
9364 vector unsigned char __b) {
9365 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
9368 static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a,
9369 vector bool char __b) {
9370 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
9373 static vector short __ATTRS_o_ai vec_subs(vector short __a, vector short __b) {
9374 return __builtin_altivec_vsubshs(__a, __b);
9377 static vector short __ATTRS_o_ai vec_subs(vector bool short __a,
9379 return __builtin_altivec_vsubshs((vector short)__a, __b);
9382 static vector short __ATTRS_o_ai vec_subs(vector short __a,
9383 vector bool short __b) {
9384 return __builtin_altivec_vsubshs(__a, (vector short)__b);
9387 static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a,
9388 vector unsigned short __b) {
9389 return __builtin_altivec_vsubuhs(__a, __b);
9392 static vector unsigned short __ATTRS_o_ai vec_subs(vector bool short __a,
9393 vector unsigned short __b) {
9394 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
9397 static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a,
9398 vector bool short __b) {
9399 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
9402 static vector int __ATTRS_o_ai vec_subs(vector int __a, vector int __b) {
9403 return __builtin_altivec_vsubsws(__a, __b);
9406 static vector int __ATTRS_o_ai vec_subs(vector bool int __a, vector int __b) {
9407 return __builtin_altivec_vsubsws((vector int)__a, __b);
9410 static vector int __ATTRS_o_ai vec_subs(vector int __a, vector bool int __b) {
9411 return __builtin_altivec_vsubsws(__a, (vector int)__b);
9414 static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a,
9415 vector unsigned int __b) {
9416 return __builtin_altivec_vsubuws(__a, __b);
9419 static vector unsigned int __ATTRS_o_ai vec_subs(vector bool int __a,
9420 vector unsigned int __b) {
9421 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
9424 static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a,
9425 vector bool int __b) {
9426 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
9431 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a,
9432 vector signed char __b) {
9433 return __builtin_altivec_vsubsbs(__a, __b);
9436 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector bool char __a,
9437 vector signed char __b) {
9438 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
9441 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a,
9442 vector bool char __b) {
9443 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
9448 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a,
9449 vector unsigned char __b) {
9450 return __builtin_altivec_vsububs(__a, __b);
9453 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector bool char __a,
9454 vector unsigned char __b) {
9455 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
9458 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a,
9459 vector bool char __b) {
9460 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
9465 static vector short __ATTRS_o_ai vec_vsubshs(vector short __a,
9467 return __builtin_altivec_vsubshs(__a, __b);
9470 static vector short __ATTRS_o_ai vec_vsubshs(vector bool short __a,
9472 return __builtin_altivec_vsubshs((vector short)__a, __b);
9475 static vector short __ATTRS_o_ai vec_vsubshs(vector short __a,
9476 vector bool short __b) {
9477 return __builtin_altivec_vsubshs(__a, (vector short)__b);
9482 static vector unsigned short __ATTRS_o_ai
9483 vec_vsubuhs(vector unsigned short __a, vector unsigned short __b) {
9484 return __builtin_altivec_vsubuhs(__a, __b);
9487 static vector unsigned short __ATTRS_o_ai
9488 vec_vsubuhs(vector bool short __a, vector unsigned short __b) {
9489 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
9492 static vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a,
9493 vector bool short __b) {
9494 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
9499 static vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector int __b) {
9500 return __builtin_altivec_vsubsws(__a, __b);
9503 static vector int __ATTRS_o_ai vec_vsubsws(vector bool int __a,
9505 return __builtin_altivec_vsubsws((vector int)__a, __b);
9508 static vector int __ATTRS_o_ai vec_vsubsws(vector int __a,
9509 vector bool int __b) {
9510 return __builtin_altivec_vsubsws(__a, (vector int)__b);
9515 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a,
9516 vector unsigned int __b) {
9517 return __builtin_altivec_vsubuws(__a, __b);
9520 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector bool int __a,
9521 vector unsigned int __b) {
9522 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
9525 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a,
9526 vector bool int __b) {
9527 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
9530 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9533 static vector signed __int128 __ATTRS_o_ai
9534 vec_vsubuqm(vector signed __int128 __a, vector signed __int128 __b) {
9538 static vector unsigned __int128 __ATTRS_o_ai
9539 vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9545 static vector signed __int128 __ATTRS_o_ai
9546 vec_vsubeuqm(vector signed __int128 __a, vector signed __int128 __b,
9547 vector signed __int128 __c) {
9548 return __builtin_altivec_vsubeuqm(__a, __b, __c);
9551 static vector unsigned __int128 __ATTRS_o_ai
9552 vec_vsubeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
9553 vector unsigned __int128 __c) {
9554 return __builtin_altivec_vsubeuqm(__a, __b, __c);
9559 static vector signed __int128 __ATTRS_o_ai
9560 vec_vsubcuq(vector signed __int128 __a, vector signed __int128 __b) {
9561 return __builtin_altivec_vsubcuq(__a, __b);
9564 static vector unsigned __int128 __ATTRS_o_ai
9565 vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9566 return __builtin_altivec_vsubcuq(__a, __b);
9571 static vector signed __int128 __ATTRS_o_ai
9572 vec_vsubecuq(vector signed __int128 __a, vector signed __int128 __b,
9573 vector signed __int128 __c) {
9574 return __builtin_altivec_vsubecuq(__a, __b, __c);
9577 static vector unsigned __int128 __ATTRS_o_ai
9578 vec_vsubecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
9579 vector unsigned __int128 __c) {
9580 return __builtin_altivec_vsubecuq(__a, __b, __c);
9582 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9586 static vector int __ATTRS_o_ai vec_sum4s(vector signed char __a,
9588 return __builtin_altivec_vsum4sbs(__a, __b);
9591 static vector unsigned int __ATTRS_o_ai vec_sum4s(vector unsigned char __a,
9592 vector unsigned int __b) {
9593 return __builtin_altivec_vsum4ubs(__a, __b);
9596 static vector int __ATTRS_o_ai vec_sum4s(vector signed short __a,
9598 return __builtin_altivec_vsum4shs(__a, __b);
9603 static vector int __attribute__((__always_inline__))
9604 vec_vsum4sbs(vector signed char __a, vector int __b) {
9605 return __builtin_altivec_vsum4sbs(__a, __b);
9610 static vector unsigned int __attribute__((__always_inline__))
9611 vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b) {
9612 return __builtin_altivec_vsum4ubs(__a, __b);
9617 static vector int __attribute__((__always_inline__))
9618 vec_vsum4shs(vector signed short __a, vector int __b) {
9619 return __builtin_altivec_vsum4shs(__a, __b);
9624 /* The vsum2sws instruction has a big-endian bias, so that the second
9625 input vector and the result always reference big-endian elements
9626 1 and 3 (little-endian element 0 and 2). For ease of porting the
9627 programmer wants elements 1 and 3 in both cases, so for little
9628 endian we must perform some permutes. */
9630 static vector signed int __attribute__((__always_inline__))
9631 vec_sum2s(vector int __a, vector int __b) {
9632 #ifdef __LITTLE_ENDIAN__
9633 vector int __c = (vector signed int)vec_perm(
9634 __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9636 __c = __builtin_altivec_vsum2sws(__a, __c);
9637 return (vector signed int)vec_perm(
9638 __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9641 return __builtin_altivec_vsum2sws(__a, __b);
9647 static vector signed int __attribute__((__always_inline__))
9648 vec_vsum2sws(vector int __a, vector int __b) {
9649 #ifdef __LITTLE_ENDIAN__
9650 vector int __c = (vector signed int)vec_perm(
9651 __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9653 __c = __builtin_altivec_vsum2sws(__a, __c);
9654 return (vector signed int)vec_perm(
9655 __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9658 return __builtin_altivec_vsum2sws(__a, __b);
9664 /* The vsumsws instruction has a big-endian bias, so that the second
9665 input vector and the result always reference big-endian element 3
9666 (little-endian element 0). For ease of porting the programmer
9667 wants element 3 in both cases, so for little endian we must perform
9670 static vector signed int __attribute__((__always_inline__))
9671 vec_sums(vector signed int __a, vector signed int __b) {
9672 #ifdef __LITTLE_ENDIAN__
9673 __b = (vector signed int)vec_splat(__b, 3);
9674 __b = __builtin_altivec_vsumsws(__a, __b);
9675 return (vector signed int)(0, 0, 0, __b[0]);
9677 return __builtin_altivec_vsumsws(__a, __b);
9683 static vector signed int __attribute__((__always_inline__))
9684 vec_vsumsws(vector signed int __a, vector signed int __b) {
9685 #ifdef __LITTLE_ENDIAN__
9686 __b = (vector signed int)vec_splat(__b, 3);
9687 __b = __builtin_altivec_vsumsws(__a, __b);
9688 return (vector signed int)(0, 0, 0, __b[0]);
9690 return __builtin_altivec_vsumsws(__a, __b);
9696 static vector float __ATTRS_o_ai
9697 vec_trunc(vector float __a) {
9699 return __builtin_vsx_xvrspiz(__a);
9701 return __builtin_altivec_vrfiz(__a);
9706 static vector double __ATTRS_o_ai vec_trunc(vector double __a) {
9707 return __builtin_vsx_xvrdpiz(__a);
9713 static vector float __attribute__((__always_inline__))
9714 vec_vrfiz(vector float __a) {
9715 return __builtin_altivec_vrfiz(__a);
9720 /* The vector unpack instructions all have a big-endian bias, so for
9721 little endian we must reverse the meanings of "high" and "low." */
9723 static vector short __ATTRS_o_ai vec_unpackh(vector signed char __a) {
9724 #ifdef __LITTLE_ENDIAN__
9725 return __builtin_altivec_vupklsb((vector char)__a);
9727 return __builtin_altivec_vupkhsb((vector char)__a);
9731 static vector bool short __ATTRS_o_ai vec_unpackh(vector bool char __a) {
9732 #ifdef __LITTLE_ENDIAN__
9733 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9735 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9739 static vector int __ATTRS_o_ai vec_unpackh(vector short __a) {
9740 #ifdef __LITTLE_ENDIAN__
9741 return __builtin_altivec_vupklsh(__a);
9743 return __builtin_altivec_vupkhsh(__a);
9747 static vector bool int __ATTRS_o_ai vec_unpackh(vector bool short __a) {
9748 #ifdef __LITTLE_ENDIAN__
9749 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9751 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9755 static vector unsigned int __ATTRS_o_ai vec_unpackh(vector pixel __a) {
9756 #ifdef __LITTLE_ENDIAN__
9757 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9759 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9763 #ifdef __POWER8_VECTOR__
9764 static vector long long __ATTRS_o_ai vec_unpackh(vector int __a) {
9765 #ifdef __LITTLE_ENDIAN__
9766 return __builtin_altivec_vupklsw(__a);
9768 return __builtin_altivec_vupkhsw(__a);
9772 static vector bool long long __ATTRS_o_ai vec_unpackh(vector bool int __a) {
9773 #ifdef __LITTLE_ENDIAN__
9774 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9776 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9783 static vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a) {
9784 #ifdef __LITTLE_ENDIAN__
9785 return __builtin_altivec_vupklsb((vector char)__a);
9787 return __builtin_altivec_vupkhsb((vector char)__a);
9791 static vector bool short __ATTRS_o_ai vec_vupkhsb(vector bool char __a) {
9792 #ifdef __LITTLE_ENDIAN__
9793 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9795 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9801 static vector int __ATTRS_o_ai vec_vupkhsh(vector short __a) {
9802 #ifdef __LITTLE_ENDIAN__
9803 return __builtin_altivec_vupklsh(__a);
9805 return __builtin_altivec_vupkhsh(__a);
9809 static vector bool int __ATTRS_o_ai vec_vupkhsh(vector bool short __a) {
9810 #ifdef __LITTLE_ENDIAN__
9811 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9813 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9817 static vector unsigned int __ATTRS_o_ai vec_vupkhsh(vector pixel __a) {
9818 #ifdef __LITTLE_ENDIAN__
9819 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9821 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9827 #ifdef __POWER8_VECTOR__
9828 static vector long long __ATTRS_o_ai vec_vupkhsw(vector int __a) {
9829 #ifdef __LITTLE_ENDIAN__
9830 return __builtin_altivec_vupklsw(__a);
9832 return __builtin_altivec_vupkhsw(__a);
9836 static vector bool long long __ATTRS_o_ai vec_vupkhsw(vector bool int __a) {
9837 #ifdef __LITTLE_ENDIAN__
9838 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9840 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9847 static vector short __ATTRS_o_ai vec_unpackl(vector signed char __a) {
9848 #ifdef __LITTLE_ENDIAN__
9849 return __builtin_altivec_vupkhsb((vector char)__a);
9851 return __builtin_altivec_vupklsb((vector char)__a);
9855 static vector bool short __ATTRS_o_ai vec_unpackl(vector bool char __a) {
9856 #ifdef __LITTLE_ENDIAN__
9857 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9859 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9863 static vector int __ATTRS_o_ai vec_unpackl(vector short __a) {
9864 #ifdef __LITTLE_ENDIAN__
9865 return __builtin_altivec_vupkhsh(__a);
9867 return __builtin_altivec_vupklsh(__a);
9871 static vector bool int __ATTRS_o_ai vec_unpackl(vector bool short __a) {
9872 #ifdef __LITTLE_ENDIAN__
9873 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9875 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9879 static vector unsigned int __ATTRS_o_ai vec_unpackl(vector pixel __a) {
9880 #ifdef __LITTLE_ENDIAN__
9881 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9883 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9887 #ifdef __POWER8_VECTOR__
9888 static vector long long __ATTRS_o_ai vec_unpackl(vector int __a) {
9889 #ifdef __LITTLE_ENDIAN__
9890 return __builtin_altivec_vupkhsw(__a);
9892 return __builtin_altivec_vupklsw(__a);
9896 static vector bool long long __ATTRS_o_ai vec_unpackl(vector bool int __a) {
9897 #ifdef __LITTLE_ENDIAN__
9898 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9900 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9907 static vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a) {
9908 #ifdef __LITTLE_ENDIAN__
9909 return __builtin_altivec_vupkhsb((vector char)__a);
9911 return __builtin_altivec_vupklsb((vector char)__a);
9915 static vector bool short __ATTRS_o_ai vec_vupklsb(vector bool char __a) {
9916 #ifdef __LITTLE_ENDIAN__
9917 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9919 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9925 static vector int __ATTRS_o_ai vec_vupklsh(vector short __a) {
9926 #ifdef __LITTLE_ENDIAN__
9927 return __builtin_altivec_vupkhsh(__a);
9929 return __builtin_altivec_vupklsh(__a);
9933 static vector bool int __ATTRS_o_ai vec_vupklsh(vector bool short __a) {
9934 #ifdef __LITTLE_ENDIAN__
9935 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9937 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9941 static vector unsigned int __ATTRS_o_ai vec_vupklsh(vector pixel __a) {
9942 #ifdef __LITTLE_ENDIAN__
9943 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9945 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9951 #ifdef __POWER8_VECTOR__
9952 static vector long long __ATTRS_o_ai vec_vupklsw(vector int __a) {
9953 #ifdef __LITTLE_ENDIAN__
9954 return __builtin_altivec_vupkhsw(__a);
9956 return __builtin_altivec_vupklsw(__a);
9960 static vector bool long long __ATTRS_o_ai vec_vupklsw(vector bool int __a) {
9961 #ifdef __LITTLE_ENDIAN__
9962 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9964 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9973 static vector signed int __ATTRS_o_ai vec_vsx_ld(int __a,
9974 const vector signed int *__b) {
9975 return (vector signed int)__builtin_vsx_lxvw4x(__a, __b);
9978 static vector unsigned int __ATTRS_o_ai
9979 vec_vsx_ld(int __a, const vector unsigned int *__b) {
9980 return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b);
9983 static vector float __ATTRS_o_ai vec_vsx_ld(int __a, const vector float *__b) {
9984 return (vector float)__builtin_vsx_lxvw4x(__a, __b);
9987 static vector signed long long __ATTRS_o_ai
9988 vec_vsx_ld(int __a, const vector signed long long *__b) {
9989 return (vector signed long long)__builtin_vsx_lxvd2x(__a, __b);
9992 static vector unsigned long long __ATTRS_o_ai
9993 vec_vsx_ld(int __a, const vector unsigned long long *__b) {
9994 return (vector unsigned long long)__builtin_vsx_lxvd2x(__a, __b);
9997 static vector double __ATTRS_o_ai vec_vsx_ld(int __a,
9998 const vector double *__b) {
9999 return (vector double)__builtin_vsx_lxvd2x(__a, __b);
10008 static void __ATTRS_o_ai vec_vsx_st(vector signed int __a, int __b,
10009 vector signed int *__c) {
10010 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
10013 static void __ATTRS_o_ai vec_vsx_st(vector unsigned int __a, int __b,
10014 vector unsigned int *__c) {
10015 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
10018 static void __ATTRS_o_ai vec_vsx_st(vector float __a, int __b,
10019 vector float *__c) {
10020 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
10023 static void __ATTRS_o_ai vec_vsx_st(vector signed long long __a, int __b,
10024 vector signed long long *__c) {
10025 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
10028 static void __ATTRS_o_ai vec_vsx_st(vector unsigned long long __a, int __b,
10029 vector unsigned long long *__c) {
10030 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
10033 static void __ATTRS_o_ai vec_vsx_st(vector double __a, int __b,
10034 vector double *__c) {
10035 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
10042 #define __builtin_altivec_vxor vec_xor
10044 static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a,
10045 vector signed char __b) {
10049 static vector signed char __ATTRS_o_ai vec_xor(vector bool char __a,
10050 vector signed char __b) {
10051 return (vector signed char)__a ^ __b;
10054 static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a,
10055 vector bool char __b) {
10056 return __a ^ (vector signed char)__b;
10059 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
10060 vector unsigned char __b) {
10064 static vector unsigned char __ATTRS_o_ai vec_xor(vector bool char __a,
10065 vector unsigned char __b) {
10066 return (vector unsigned char)__a ^ __b;
10069 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
10070 vector bool char __b) {
10071 return __a ^ (vector unsigned char)__b;
10074 static vector bool char __ATTRS_o_ai vec_xor(vector bool char __a,
10075 vector bool char __b) {
10079 static vector short __ATTRS_o_ai vec_xor(vector short __a, vector short __b) {
10083 static vector short __ATTRS_o_ai vec_xor(vector bool short __a,
10084 vector short __b) {
10085 return (vector short)__a ^ __b;
10088 static vector short __ATTRS_o_ai vec_xor(vector short __a,
10089 vector bool short __b) {
10090 return __a ^ (vector short)__b;
10093 static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a,
10094 vector unsigned short __b) {
10098 static vector unsigned short __ATTRS_o_ai vec_xor(vector bool short __a,
10099 vector unsigned short __b) {
10100 return (vector unsigned short)__a ^ __b;
10103 static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a,
10104 vector bool short __b) {
10105 return __a ^ (vector unsigned short)__b;
10108 static vector bool short __ATTRS_o_ai vec_xor(vector bool short __a,
10109 vector bool short __b) {
10113 static vector int __ATTRS_o_ai vec_xor(vector int __a, vector int __b) {
10117 static vector int __ATTRS_o_ai vec_xor(vector bool int __a, vector int __b) {
10118 return (vector int)__a ^ __b;
10121 static vector int __ATTRS_o_ai vec_xor(vector int __a, vector bool int __b) {
10122 return __a ^ (vector int)__b;
10125 static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a,
10126 vector unsigned int __b) {
10130 static vector unsigned int __ATTRS_o_ai vec_xor(vector bool int __a,
10131 vector unsigned int __b) {
10132 return (vector unsigned int)__a ^ __b;
10135 static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a,
10136 vector bool int __b) {
10137 return __a ^ (vector unsigned int)__b;
10140 static vector bool int __ATTRS_o_ai vec_xor(vector bool int __a,
10141 vector bool int __b) {
10145 static vector float __ATTRS_o_ai vec_xor(vector float __a, vector float __b) {
10146 vector unsigned int __res =
10147 (vector unsigned int)__a ^ (vector unsigned int)__b;
10148 return (vector float)__res;
10151 static vector float __ATTRS_o_ai vec_xor(vector bool int __a,
10152 vector float __b) {
10153 vector unsigned int __res =
10154 (vector unsigned int)__a ^ (vector unsigned int)__b;
10155 return (vector float)__res;
10158 static vector float __ATTRS_o_ai vec_xor(vector float __a,
10159 vector bool int __b) {
10160 vector unsigned int __res =
10161 (vector unsigned int)__a ^ (vector unsigned int)__b;
10162 return (vector float)__res;
10166 static vector signed long long __ATTRS_o_ai
10167 vec_xor(vector signed long long __a, vector signed long long __b) {
10171 static vector signed long long __ATTRS_o_ai
10172 vec_xor(vector bool long long __a, vector signed long long __b) {
10173 return (vector signed long long)__a ^ __b;
10176 static vector signed long long __ATTRS_o_ai vec_xor(vector signed long long __a,
10177 vector bool long long __b) {
10178 return __a ^ (vector signed long long)__b;
10181 static vector unsigned long long __ATTRS_o_ai
10182 vec_xor(vector unsigned long long __a, vector unsigned long long __b) {
10186 static vector unsigned long long __ATTRS_o_ai
10187 vec_xor(vector bool long long __a, vector unsigned long long __b) {
10188 return (vector unsigned long long)__a ^ __b;
10191 static vector unsigned long long __ATTRS_o_ai
10192 vec_xor(vector unsigned long long __a, vector bool long long __b) {
10193 return __a ^ (vector unsigned long long)__b;
10196 static vector bool long long __ATTRS_o_ai vec_xor(vector bool long long __a,
10197 vector bool long long __b) {
10201 static vector double __ATTRS_o_ai
10202 vec_xor(vector double __a, vector double __b) {
10203 return (vector double)((vector unsigned long long)__a ^
10204 (vector unsigned long long)__b);
10207 static vector double __ATTRS_o_ai
10208 vec_xor(vector double __a, vector bool long long __b) {
10209 return (vector double)((vector unsigned long long)__a ^
10210 (vector unsigned long long) __b);
10213 static vector double __ATTRS_o_ai
10214 vec_xor(vector bool long long __a, vector double __b) {
10215 return (vector double)((vector unsigned long long)__a ^
10216 (vector unsigned long long)__b);
10222 static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a,
10223 vector signed char __b) {
10227 static vector signed char __ATTRS_o_ai vec_vxor(vector bool char __a,
10228 vector signed char __b) {
10229 return (vector signed char)__a ^ __b;
10232 static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a,
10233 vector bool char __b) {
10234 return __a ^ (vector signed char)__b;
10237 static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a,
10238 vector unsigned char __b) {
10242 static vector unsigned char __ATTRS_o_ai vec_vxor(vector bool char __a,
10243 vector unsigned char __b) {
10244 return (vector unsigned char)__a ^ __b;
10247 static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a,
10248 vector bool char __b) {
10249 return __a ^ (vector unsigned char)__b;
10252 static vector bool char __ATTRS_o_ai vec_vxor(vector bool char __a,
10253 vector bool char __b) {
10257 static vector short __ATTRS_o_ai vec_vxor(vector short __a, vector short __b) {
10261 static vector short __ATTRS_o_ai vec_vxor(vector bool short __a,
10262 vector short __b) {
10263 return (vector short)__a ^ __b;
10266 static vector short __ATTRS_o_ai vec_vxor(vector short __a,
10267 vector bool short __b) {
10268 return __a ^ (vector short)__b;
10271 static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a,
10272 vector unsigned short __b) {
10276 static vector unsigned short __ATTRS_o_ai vec_vxor(vector bool short __a,
10277 vector unsigned short __b) {
10278 return (vector unsigned short)__a ^ __b;
10281 static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a,
10282 vector bool short __b) {
10283 return __a ^ (vector unsigned short)__b;
10286 static vector bool short __ATTRS_o_ai vec_vxor(vector bool short __a,
10287 vector bool short __b) {
10291 static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector int __b) {
10295 static vector int __ATTRS_o_ai vec_vxor(vector bool int __a, vector int __b) {
10296 return (vector int)__a ^ __b;
10299 static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector bool int __b) {
10300 return __a ^ (vector int)__b;
10303 static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a,
10304 vector unsigned int __b) {
10308 static vector unsigned int __ATTRS_o_ai vec_vxor(vector bool int __a,
10309 vector unsigned int __b) {
10310 return (vector unsigned int)__a ^ __b;
10313 static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a,
10314 vector bool int __b) {
10315 return __a ^ (vector unsigned int)__b;
10318 static vector bool int __ATTRS_o_ai vec_vxor(vector bool int __a,
10319 vector bool int __b) {
10323 static vector float __ATTRS_o_ai vec_vxor(vector float __a, vector float __b) {
10324 vector unsigned int __res =
10325 (vector unsigned int)__a ^ (vector unsigned int)__b;
10326 return (vector float)__res;
10329 static vector float __ATTRS_o_ai vec_vxor(vector bool int __a,
10330 vector float __b) {
10331 vector unsigned int __res =
10332 (vector unsigned int)__a ^ (vector unsigned int)__b;
10333 return (vector float)__res;
10336 static vector float __ATTRS_o_ai vec_vxor(vector float __a,
10337 vector bool int __b) {
10338 vector unsigned int __res =
10339 (vector unsigned int)__a ^ (vector unsigned int)__b;
10340 return (vector float)__res;
10344 static vector signed long long __ATTRS_o_ai
10345 vec_vxor(vector signed long long __a, vector signed long long __b) {
10349 static vector signed long long __ATTRS_o_ai
10350 vec_vxor(vector bool long long __a, vector signed long long __b) {
10351 return (vector signed long long)__a ^ __b;
10354 static vector signed long long __ATTRS_o_ai
10355 vec_vxor(vector signed long long __a, vector bool long long __b) {
10356 return __a ^ (vector signed long long)__b;
10359 static vector unsigned long long __ATTRS_o_ai
10360 vec_vxor(vector unsigned long long __a, vector unsigned long long __b) {
10364 static vector unsigned long long __ATTRS_o_ai
10365 vec_vxor(vector bool long long __a, vector unsigned long long __b) {
10366 return (vector unsigned long long)__a ^ __b;
10369 static vector unsigned long long __ATTRS_o_ai
10370 vec_vxor(vector unsigned long long __a, vector bool long long __b) {
10371 return __a ^ (vector unsigned long long)__b;
10374 static vector bool long long __ATTRS_o_ai vec_vxor(vector bool long long __a,
10375 vector bool long long __b) {
10380 /* ------------------------ extensions for CBEA ----------------------------- */
10384 static signed char __ATTRS_o_ai vec_extract(vector signed char __a, int __b) {
10388 static unsigned char __ATTRS_o_ai vec_extract(vector unsigned char __a,
10393 static short __ATTRS_o_ai vec_extract(vector short __a, int __b) {
10397 static unsigned short __ATTRS_o_ai vec_extract(vector unsigned short __a,
10402 static int __ATTRS_o_ai vec_extract(vector int __a, int __b) {
10406 static unsigned int __ATTRS_o_ai vec_extract(vector unsigned int __a, int __b) {
10410 static float __ATTRS_o_ai vec_extract(vector float __a, int __b) {
10416 static vector signed char __ATTRS_o_ai vec_insert(signed char __a,
10417 vector signed char __b,
10423 static vector unsigned char __ATTRS_o_ai vec_insert(unsigned char __a,
10424 vector unsigned char __b,
10430 static vector short __ATTRS_o_ai vec_insert(short __a, vector short __b,
10436 static vector unsigned short __ATTRS_o_ai vec_insert(unsigned short __a,
10437 vector unsigned short __b,
10443 static vector int __ATTRS_o_ai vec_insert(int __a, vector int __b, int __c) {
10448 static vector unsigned int __ATTRS_o_ai vec_insert(unsigned int __a,
10449 vector unsigned int __b,
10455 static vector float __ATTRS_o_ai vec_insert(float __a, vector float __b,
10463 static vector signed char __ATTRS_o_ai vec_lvlx(int __a,
10464 const signed char *__b) {
10465 return vec_perm(vec_ld(__a, __b), (vector signed char)(0),
10466 vec_lvsl(__a, __b));
10469 static vector signed char __ATTRS_o_ai vec_lvlx(int __a,
10470 const vector signed char *__b) {
10471 return vec_perm(vec_ld(__a, __b), (vector signed char)(0),
10472 vec_lvsl(__a, (unsigned char *)__b));
10475 static vector unsigned char __ATTRS_o_ai vec_lvlx(int __a,
10476 const unsigned char *__b) {
10477 return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0),
10478 vec_lvsl(__a, __b));
10481 static vector unsigned char __ATTRS_o_ai
10482 vec_lvlx(int __a, const vector unsigned char *__b) {
10483 return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0),
10484 vec_lvsl(__a, (unsigned char *)__b));
10487 static vector bool char __ATTRS_o_ai vec_lvlx(int __a,
10488 const vector bool char *__b) {
10489 return vec_perm(vec_ld(__a, __b), (vector bool char)(0),
10490 vec_lvsl(__a, (unsigned char *)__b));
10493 static vector short __ATTRS_o_ai vec_lvlx(int __a, const short *__b) {
10494 return vec_perm(vec_ld(__a, __b), (vector short)(0), vec_lvsl(__a, __b));
10497 static vector short __ATTRS_o_ai vec_lvlx(int __a, const vector short *__b) {
10498 return vec_perm(vec_ld(__a, __b), (vector short)(0),
10499 vec_lvsl(__a, (unsigned char *)__b));
10502 static vector unsigned short __ATTRS_o_ai vec_lvlx(int __a,
10503 const unsigned short *__b) {
10504 return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0),
10505 vec_lvsl(__a, __b));
10508 static vector unsigned short __ATTRS_o_ai
10509 vec_lvlx(int __a, const vector unsigned short *__b) {
10510 return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0),
10511 vec_lvsl(__a, (unsigned char *)__b));
10514 static vector bool short __ATTRS_o_ai vec_lvlx(int __a,
10515 const vector bool short *__b) {
10516 return vec_perm(vec_ld(__a, __b), (vector bool short)(0),
10517 vec_lvsl(__a, (unsigned char *)__b));
10520 static vector pixel __ATTRS_o_ai vec_lvlx(int __a, const vector pixel *__b) {
10521 return vec_perm(vec_ld(__a, __b), (vector pixel)(0),
10522 vec_lvsl(__a, (unsigned char *)__b));
10525 static vector int __ATTRS_o_ai vec_lvlx(int __a, const int *__b) {
10526 return vec_perm(vec_ld(__a, __b), (vector int)(0), vec_lvsl(__a, __b));
10529 static vector int __ATTRS_o_ai vec_lvlx(int __a, const vector int *__b) {
10530 return vec_perm(vec_ld(__a, __b), (vector int)(0),
10531 vec_lvsl(__a, (unsigned char *)__b));
10534 static vector unsigned int __ATTRS_o_ai vec_lvlx(int __a,
10535 const unsigned int *__b) {
10536 return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0),
10537 vec_lvsl(__a, __b));
10540 static vector unsigned int __ATTRS_o_ai
10541 vec_lvlx(int __a, const vector unsigned int *__b) {
10542 return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0),
10543 vec_lvsl(__a, (unsigned char *)__b));
10546 static vector bool int __ATTRS_o_ai vec_lvlx(int __a,
10547 const vector bool int *__b) {
10548 return vec_perm(vec_ld(__a, __b), (vector bool int)(0),
10549 vec_lvsl(__a, (unsigned char *)__b));
10552 static vector float __ATTRS_o_ai vec_lvlx(int __a, const float *__b) {
10553 return vec_perm(vec_ld(__a, __b), (vector float)(0), vec_lvsl(__a, __b));
10556 static vector float __ATTRS_o_ai vec_lvlx(int __a, const vector float *__b) {
10557 return vec_perm(vec_ld(__a, __b), (vector float)(0),
10558 vec_lvsl(__a, (unsigned char *)__b));
10563 static vector signed char __ATTRS_o_ai vec_lvlxl(int __a,
10564 const signed char *__b) {
10565 return vec_perm(vec_ldl(__a, __b), (vector signed char)(0),
10566 vec_lvsl(__a, __b));
10569 static vector signed char __ATTRS_o_ai
10570 vec_lvlxl(int __a, const vector signed char *__b) {
10571 return vec_perm(vec_ldl(__a, __b), (vector signed char)(0),
10572 vec_lvsl(__a, (unsigned char *)__b));
10575 static vector unsigned char __ATTRS_o_ai vec_lvlxl(int __a,
10576 const unsigned char *__b) {
10577 return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0),
10578 vec_lvsl(__a, __b));
10581 static vector unsigned char __ATTRS_o_ai
10582 vec_lvlxl(int __a, const vector unsigned char *__b) {
10583 return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0),
10584 vec_lvsl(__a, (unsigned char *)__b));
10587 static vector bool char __ATTRS_o_ai vec_lvlxl(int __a,
10588 const vector bool char *__b) {
10589 return vec_perm(vec_ldl(__a, __b), (vector bool char)(0),
10590 vec_lvsl(__a, (unsigned char *)__b));
10593 static vector short __ATTRS_o_ai vec_lvlxl(int __a, const short *__b) {
10594 return vec_perm(vec_ldl(__a, __b), (vector short)(0), vec_lvsl(__a, __b));
10597 static vector short __ATTRS_o_ai vec_lvlxl(int __a, const vector short *__b) {
10598 return vec_perm(vec_ldl(__a, __b), (vector short)(0),
10599 vec_lvsl(__a, (unsigned char *)__b));
10602 static vector unsigned short __ATTRS_o_ai vec_lvlxl(int __a,
10603 const unsigned short *__b) {
10604 return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0),
10605 vec_lvsl(__a, __b));
10608 static vector unsigned short __ATTRS_o_ai
10609 vec_lvlxl(int __a, const vector unsigned short *__b) {
10610 return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0),
10611 vec_lvsl(__a, (unsigned char *)__b));
10614 static vector bool short __ATTRS_o_ai vec_lvlxl(int __a,
10615 const vector bool short *__b) {
10616 return vec_perm(vec_ldl(__a, __b), (vector bool short)(0),
10617 vec_lvsl(__a, (unsigned char *)__b));
10620 static vector pixel __ATTRS_o_ai vec_lvlxl(int __a, const vector pixel *__b) {
10621 return vec_perm(vec_ldl(__a, __b), (vector pixel)(0),
10622 vec_lvsl(__a, (unsigned char *)__b));
10625 static vector int __ATTRS_o_ai vec_lvlxl(int __a, const int *__b) {
10626 return vec_perm(vec_ldl(__a, __b), (vector int)(0), vec_lvsl(__a, __b));
10629 static vector int __ATTRS_o_ai vec_lvlxl(int __a, const vector int *__b) {
10630 return vec_perm(vec_ldl(__a, __b), (vector int)(0),
10631 vec_lvsl(__a, (unsigned char *)__b));
10634 static vector unsigned int __ATTRS_o_ai vec_lvlxl(int __a,
10635 const unsigned int *__b) {
10636 return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0),
10637 vec_lvsl(__a, __b));
10640 static vector unsigned int __ATTRS_o_ai
10641 vec_lvlxl(int __a, const vector unsigned int *__b) {
10642 return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0),
10643 vec_lvsl(__a, (unsigned char *)__b));
10646 static vector bool int __ATTRS_o_ai vec_lvlxl(int __a,
10647 const vector bool int *__b) {
10648 return vec_perm(vec_ldl(__a, __b), (vector bool int)(0),
10649 vec_lvsl(__a, (unsigned char *)__b));
10652 static vector float __ATTRS_o_ai vec_lvlxl(int __a, const float *__b) {
10653 return vec_perm(vec_ldl(__a, __b), (vector float)(0), vec_lvsl(__a, __b));
10656 static vector float __ATTRS_o_ai vec_lvlxl(int __a, vector float *__b) {
10657 return vec_perm(vec_ldl(__a, __b), (vector float)(0),
10658 vec_lvsl(__a, (unsigned char *)__b));
10663 static vector signed char __ATTRS_o_ai vec_lvrx(int __a,
10664 const signed char *__b) {
10665 return vec_perm((vector signed char)(0), vec_ld(__a, __b),
10666 vec_lvsl(__a, __b));
10669 static vector signed char __ATTRS_o_ai vec_lvrx(int __a,
10670 const vector signed char *__b) {
10671 return vec_perm((vector signed char)(0), vec_ld(__a, __b),
10672 vec_lvsl(__a, (unsigned char *)__b));
10675 static vector unsigned char __ATTRS_o_ai vec_lvrx(int __a,
10676 const unsigned char *__b) {
10677 return vec_perm((vector unsigned char)(0), vec_ld(__a, __b),
10678 vec_lvsl(__a, __b));
10681 static vector unsigned char __ATTRS_o_ai
10682 vec_lvrx(int __a, const vector unsigned char *__b) {
10683 return vec_perm((vector unsigned char)(0), vec_ld(__a, __b),
10684 vec_lvsl(__a, (unsigned char *)__b));
10687 static vector bool char __ATTRS_o_ai vec_lvrx(int __a,
10688 const vector bool char *__b) {
10689 return vec_perm((vector bool char)(0), vec_ld(__a, __b),
10690 vec_lvsl(__a, (unsigned char *)__b));
10693 static vector short __ATTRS_o_ai vec_lvrx(int __a, const short *__b) {
10694 return vec_perm((vector short)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
10697 static vector short __ATTRS_o_ai vec_lvrx(int __a, const vector short *__b) {
10698 return vec_perm((vector short)(0), vec_ld(__a, __b),
10699 vec_lvsl(__a, (unsigned char *)__b));
10702 static vector unsigned short __ATTRS_o_ai vec_lvrx(int __a,
10703 const unsigned short *__b) {
10704 return vec_perm((vector unsigned short)(0), vec_ld(__a, __b),
10705 vec_lvsl(__a, __b));
10708 static vector unsigned short __ATTRS_o_ai
10709 vec_lvrx(int __a, const vector unsigned short *__b) {
10710 return vec_perm((vector unsigned short)(0), vec_ld(__a, __b),
10711 vec_lvsl(__a, (unsigned char *)__b));
10714 static vector bool short __ATTRS_o_ai vec_lvrx(int __a,
10715 const vector bool short *__b) {
10716 return vec_perm((vector bool short)(0), vec_ld(__a, __b),
10717 vec_lvsl(__a, (unsigned char *)__b));
10720 static vector pixel __ATTRS_o_ai vec_lvrx(int __a, const vector pixel *__b) {
10721 return vec_perm((vector pixel)(0), vec_ld(__a, __b),
10722 vec_lvsl(__a, (unsigned char *)__b));
10725 static vector int __ATTRS_o_ai vec_lvrx(int __a, const int *__b) {
10726 return vec_perm((vector int)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
10729 static vector int __ATTRS_o_ai vec_lvrx(int __a, const vector int *__b) {
10730 return vec_perm((vector int)(0), vec_ld(__a, __b),
10731 vec_lvsl(__a, (unsigned char *)__b));
10734 static vector unsigned int __ATTRS_o_ai vec_lvrx(int __a,
10735 const unsigned int *__b) {
10736 return vec_perm((vector unsigned int)(0), vec_ld(__a, __b),
10737 vec_lvsl(__a, __b));
10740 static vector unsigned int __ATTRS_o_ai
10741 vec_lvrx(int __a, const vector unsigned int *__b) {
10742 return vec_perm((vector unsigned int)(0), vec_ld(__a, __b),
10743 vec_lvsl(__a, (unsigned char *)__b));
10746 static vector bool int __ATTRS_o_ai vec_lvrx(int __a,
10747 const vector bool int *__b) {
10748 return vec_perm((vector bool int)(0), vec_ld(__a, __b),
10749 vec_lvsl(__a, (unsigned char *)__b));
10752 static vector float __ATTRS_o_ai vec_lvrx(int __a, const float *__b) {
10753 return vec_perm((vector float)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
10756 static vector float __ATTRS_o_ai vec_lvrx(int __a, const vector float *__b) {
10757 return vec_perm((vector float)(0), vec_ld(__a, __b),
10758 vec_lvsl(__a, (unsigned char *)__b));
10763 static vector signed char __ATTRS_o_ai vec_lvrxl(int __a,
10764 const signed char *__b) {
10765 return vec_perm((vector signed char)(0), vec_ldl(__a, __b),
10766 vec_lvsl(__a, __b));
10769 static vector signed char __ATTRS_o_ai
10770 vec_lvrxl(int __a, const vector signed char *__b) {
10771 return vec_perm((vector signed char)(0), vec_ldl(__a, __b),
10772 vec_lvsl(__a, (unsigned char *)__b));
10775 static vector unsigned char __ATTRS_o_ai vec_lvrxl(int __a,
10776 const unsigned char *__b) {
10777 return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b),
10778 vec_lvsl(__a, __b));
10781 static vector unsigned char __ATTRS_o_ai
10782 vec_lvrxl(int __a, const vector unsigned char *__b) {
10783 return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b),
10784 vec_lvsl(__a, (unsigned char *)__b));
10787 static vector bool char __ATTRS_o_ai vec_lvrxl(int __a,
10788 const vector bool char *__b) {
10789 return vec_perm((vector bool char)(0), vec_ldl(__a, __b),
10790 vec_lvsl(__a, (unsigned char *)__b));
10793 static vector short __ATTRS_o_ai vec_lvrxl(int __a, const short *__b) {
10794 return vec_perm((vector short)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
10797 static vector short __ATTRS_o_ai vec_lvrxl(int __a, const vector short *__b) {
10798 return vec_perm((vector short)(0), vec_ldl(__a, __b),
10799 vec_lvsl(__a, (unsigned char *)__b));
10802 static vector unsigned short __ATTRS_o_ai vec_lvrxl(int __a,
10803 const unsigned short *__b) {
10804 return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b),
10805 vec_lvsl(__a, __b));
10808 static vector unsigned short __ATTRS_o_ai
10809 vec_lvrxl(int __a, const vector unsigned short *__b) {
10810 return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b),
10811 vec_lvsl(__a, (unsigned char *)__b));
10814 static vector bool short __ATTRS_o_ai vec_lvrxl(int __a,
10815 const vector bool short *__b) {
10816 return vec_perm((vector bool short)(0), vec_ldl(__a, __b),
10817 vec_lvsl(__a, (unsigned char *)__b));
10820 static vector pixel __ATTRS_o_ai vec_lvrxl(int __a, const vector pixel *__b) {
10821 return vec_perm((vector pixel)(0), vec_ldl(__a, __b),
10822 vec_lvsl(__a, (unsigned char *)__b));
10825 static vector int __ATTRS_o_ai vec_lvrxl(int __a, const int *__b) {
10826 return vec_perm((vector int)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
10829 static vector int __ATTRS_o_ai vec_lvrxl(int __a, const vector int *__b) {
10830 return vec_perm((vector int)(0), vec_ldl(__a, __b),
10831 vec_lvsl(__a, (unsigned char *)__b));
10834 static vector unsigned int __ATTRS_o_ai vec_lvrxl(int __a,
10835 const unsigned int *__b) {
10836 return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b),
10837 vec_lvsl(__a, __b));
10840 static vector unsigned int __ATTRS_o_ai
10841 vec_lvrxl(int __a, const vector unsigned int *__b) {
10842 return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b),
10843 vec_lvsl(__a, (unsigned char *)__b));
10846 static vector bool int __ATTRS_o_ai vec_lvrxl(int __a,
10847 const vector bool int *__b) {
10848 return vec_perm((vector bool int)(0), vec_ldl(__a, __b),
10849 vec_lvsl(__a, (unsigned char *)__b));
10852 static vector float __ATTRS_o_ai vec_lvrxl(int __a, const float *__b) {
10853 return vec_perm((vector float)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
10856 static vector float __ATTRS_o_ai vec_lvrxl(int __a, const vector float *__b) {
10857 return vec_perm((vector float)(0), vec_ldl(__a, __b),
10858 vec_lvsl(__a, (unsigned char *)__b));
10863 static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b,
10864 signed char *__c) {
10865 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10869 static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b,
10870 vector signed char *__c) {
10872 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10876 static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b,
10877 unsigned char *__c) {
10878 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10882 static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b,
10883 vector unsigned char *__c) {
10885 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10889 static void __ATTRS_o_ai vec_stvlx(vector bool char __a, int __b,
10890 vector bool char *__c) {
10892 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10896 static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b, short *__c) {
10897 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10901 static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b,
10902 vector short *__c) {
10904 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10908 static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b,
10909 unsigned short *__c) {
10910 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10914 static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b,
10915 vector unsigned short *__c) {
10917 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10921 static void __ATTRS_o_ai vec_stvlx(vector bool short __a, int __b,
10922 vector bool short *__c) {
10924 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10928 static void __ATTRS_o_ai vec_stvlx(vector pixel __a, int __b,
10929 vector pixel *__c) {
10931 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10935 static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, int *__c) {
10936 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10940 static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, vector int *__c) {
10942 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10946 static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b,
10947 unsigned int *__c) {
10948 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10952 static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b,
10953 vector unsigned int *__c) {
10955 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10959 static void __ATTRS_o_ai vec_stvlx(vector bool int __a, int __b,
10960 vector bool int *__c) {
10962 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10966 static void __ATTRS_o_ai vec_stvlx(vector float __a, int __b,
10967 vector float *__c) {
10969 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10975 static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b,
10976 signed char *__c) {
10977 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10981 static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b,
10982 vector signed char *__c) {
10984 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
10988 static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b,
10989 unsigned char *__c) {
10990 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
10994 static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b,
10995 vector unsigned char *__c) {
10997 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11001 static void __ATTRS_o_ai vec_stvlxl(vector bool char __a, int __b,
11002 vector bool char *__c) {
11004 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11008 static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b, short *__c) {
11009 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11013 static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b,
11014 vector short *__c) {
11016 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11020 static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b,
11021 unsigned short *__c) {
11022 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11026 static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b,
11027 vector unsigned short *__c) {
11029 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11033 static void __ATTRS_o_ai vec_stvlxl(vector bool short __a, int __b,
11034 vector bool short *__c) {
11036 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11040 static void __ATTRS_o_ai vec_stvlxl(vector pixel __a, int __b,
11041 vector pixel *__c) {
11043 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11047 static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, int *__c) {
11048 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11052 static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, vector int *__c) {
11054 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11058 static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b,
11059 unsigned int *__c) {
11060 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11064 static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b,
11065 vector unsigned int *__c) {
11067 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11071 static void __ATTRS_o_ai vec_stvlxl(vector bool int __a, int __b,
11072 vector bool int *__c) {
11074 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11078 static void __ATTRS_o_ai vec_stvlxl(vector float __a, int __b,
11079 vector float *__c) {
11081 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11087 static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b,
11088 signed char *__c) {
11089 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11093 static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b,
11094 vector signed char *__c) {
11096 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11100 static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b,
11101 unsigned char *__c) {
11102 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11106 static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b,
11107 vector unsigned char *__c) {
11109 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11113 static void __ATTRS_o_ai vec_stvrx(vector bool char __a, int __b,
11114 vector bool char *__c) {
11116 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11120 static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b, short *__c) {
11121 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11125 static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b,
11126 vector short *__c) {
11128 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11132 static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b,
11133 unsigned short *__c) {
11134 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11138 static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b,
11139 vector unsigned short *__c) {
11141 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11145 static void __ATTRS_o_ai vec_stvrx(vector bool short __a, int __b,
11146 vector bool short *__c) {
11148 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11152 static void __ATTRS_o_ai vec_stvrx(vector pixel __a, int __b,
11153 vector pixel *__c) {
11155 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11159 static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, int *__c) {
11160 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11164 static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, vector int *__c) {
11166 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11170 static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b,
11171 unsigned int *__c) {
11172 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11176 static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b,
11177 vector unsigned int *__c) {
11179 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11183 static void __ATTRS_o_ai vec_stvrx(vector bool int __a, int __b,
11184 vector bool int *__c) {
11186 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11190 static void __ATTRS_o_ai vec_stvrx(vector float __a, int __b,
11191 vector float *__c) {
11193 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11199 static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b,
11200 signed char *__c) {
11201 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11205 static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b,
11206 vector signed char *__c) {
11208 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11212 static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b,
11213 unsigned char *__c) {
11214 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11218 static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b,
11219 vector unsigned char *__c) {
11221 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11225 static void __ATTRS_o_ai vec_stvrxl(vector bool char __a, int __b,
11226 vector bool char *__c) {
11228 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11232 static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b, short *__c) {
11233 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11237 static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b,
11238 vector short *__c) {
11240 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11244 static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b,
11245 unsigned short *__c) {
11246 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11250 static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b,
11251 vector unsigned short *__c) {
11253 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11257 static void __ATTRS_o_ai vec_stvrxl(vector bool short __a, int __b,
11258 vector bool short *__c) {
11260 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11264 static void __ATTRS_o_ai vec_stvrxl(vector pixel __a, int __b,
11265 vector pixel *__c) {
11267 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11271 static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, int *__c) {
11272 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11276 static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, vector int *__c) {
11278 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11282 static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b,
11283 unsigned int *__c) {
11284 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11288 static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b,
11289 vector unsigned int *__c) {
11291 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11295 static void __ATTRS_o_ai vec_stvrxl(vector bool int __a, int __b,
11296 vector bool int *__c) {
11298 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11302 static void __ATTRS_o_ai vec_stvrxl(vector float __a, int __b,
11303 vector float *__c) {
11305 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11311 static vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b) {
11312 vector signed char __res = (vector signed char)(0);
11317 static vector unsigned char __ATTRS_o_ai vec_promote(unsigned char __a,
11319 vector unsigned char __res = (vector unsigned char)(0);
11324 static vector short __ATTRS_o_ai vec_promote(short __a, int __b) {
11325 vector short __res = (vector short)(0);
11330 static vector unsigned short __ATTRS_o_ai vec_promote(unsigned short __a,
11332 vector unsigned short __res = (vector unsigned short)(0);
11337 static vector int __ATTRS_o_ai vec_promote(int __a, int __b) {
11338 vector int __res = (vector int)(0);
11343 static vector unsigned int __ATTRS_o_ai vec_promote(unsigned int __a, int __b) {
11344 vector unsigned int __res = (vector unsigned int)(0);
11349 static vector float __ATTRS_o_ai vec_promote(float __a, int __b) {
11350 vector float __res = (vector float)(0);
11357 static vector signed char __ATTRS_o_ai vec_splats(signed char __a) {
11358 return (vector signed char)(__a);
11361 static vector unsigned char __ATTRS_o_ai vec_splats(unsigned char __a) {
11362 return (vector unsigned char)(__a);
11365 static vector short __ATTRS_o_ai vec_splats(short __a) {
11366 return (vector short)(__a);
11369 static vector unsigned short __ATTRS_o_ai vec_splats(unsigned short __a) {
11370 return (vector unsigned short)(__a);
11373 static vector int __ATTRS_o_ai vec_splats(int __a) { return (vector int)(__a); }
11375 static vector unsigned int __ATTRS_o_ai vec_splats(unsigned int __a) {
11376 return (vector unsigned int)(__a);
11379 static vector float __ATTRS_o_ai vec_splats(float __a) {
11380 return (vector float)(__a);
11383 /* ----------------------------- predicates --------------------------------- */
11387 static int __ATTRS_o_ai vec_all_eq(vector signed char __a,
11388 vector signed char __b) {
11389 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11393 static int __ATTRS_o_ai vec_all_eq(vector signed char __a,
11394 vector bool char __b) {
11395 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11399 static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a,
11400 vector unsigned char __b) {
11401 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11405 static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a,
11406 vector bool char __b) {
11407 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11411 static int __ATTRS_o_ai vec_all_eq(vector bool char __a,
11412 vector signed char __b) {
11413 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11417 static int __ATTRS_o_ai vec_all_eq(vector bool char __a,
11418 vector unsigned char __b) {
11419 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11423 static int __ATTRS_o_ai vec_all_eq(vector bool char __a, vector bool char __b) {
11424 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11428 static int __ATTRS_o_ai vec_all_eq(vector short __a, vector short __b) {
11429 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, __b);
11432 static int __ATTRS_o_ai vec_all_eq(vector short __a, vector bool short __b) {
11433 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, (vector short)__b);
11436 static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a,
11437 vector unsigned short __b) {
11438 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11439 (vector short)__b);
11442 static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a,
11443 vector bool short __b) {
11444 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11445 (vector short)__b);
11448 static int __ATTRS_o_ai vec_all_eq(vector bool short __a, vector short __b) {
11449 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11450 (vector short)__b);
11453 static int __ATTRS_o_ai vec_all_eq(vector bool short __a,
11454 vector unsigned short __b) {
11455 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11456 (vector short)__b);
11459 static int __ATTRS_o_ai vec_all_eq(vector bool short __a,
11460 vector bool short __b) {
11461 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11462 (vector short)__b);
11465 static int __ATTRS_o_ai vec_all_eq(vector pixel __a, vector pixel __b) {
11466 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11467 (vector short)__b);
11470 static int __ATTRS_o_ai vec_all_eq(vector int __a, vector int __b) {
11471 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, __b);
11474 static int __ATTRS_o_ai vec_all_eq(vector int __a, vector bool int __b) {
11475 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, (vector int)__b);
11478 static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a,
11479 vector unsigned int __b) {
11480 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11484 static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a,
11485 vector bool int __b) {
11486 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11490 static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector int __b) {
11491 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11495 static int __ATTRS_o_ai vec_all_eq(vector bool int __a,
11496 vector unsigned int __b) {
11497 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11501 static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector bool int __b) {
11502 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11506 #ifdef __POWER8_VECTOR__
11507 static int __ATTRS_o_ai vec_all_eq(vector signed long long __a,
11508 vector signed long long __b) {
11509 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, __b);
11512 static int __ATTRS_o_ai vec_all_eq(vector long long __a,
11513 vector bool long long __b) {
11514 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, (vector long long)__b);
11517 static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a,
11518 vector unsigned long long __b) {
11519 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11520 (vector long long)__b);
11523 static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a,
11524 vector bool long long __b) {
11525 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11526 (vector long long)__b);
11529 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
11530 vector long long __b) {
11531 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11532 (vector long long)__b);
11535 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
11536 vector unsigned long long __b) {
11537 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11538 (vector long long)__b);
11541 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
11542 vector bool long long __b) {
11543 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11544 (vector long long)__b);
11548 static int __ATTRS_o_ai vec_all_eq(vector float __a, vector float __b) {
11549 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __b);
11554 static int __ATTRS_o_ai vec_all_ge(vector signed char __a,
11555 vector signed char __b) {
11556 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, __a);
11559 static int __ATTRS_o_ai vec_all_ge(vector signed char __a,
11560 vector bool char __b) {
11561 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__b, __a);
11564 static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a,
11565 vector unsigned char __b) {
11566 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, __a);
11569 static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a,
11570 vector bool char __b) {
11571 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, __a);
11574 static int __ATTRS_o_ai vec_all_ge(vector bool char __a,
11575 vector signed char __b) {
11576 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b,
11577 (vector unsigned char)__a);
11580 static int __ATTRS_o_ai vec_all_ge(vector bool char __a,
11581 vector unsigned char __b) {
11582 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, (vector unsigned char)__a);
11585 static int __ATTRS_o_ai vec_all_ge(vector bool char __a, vector bool char __b) {
11586 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b,
11587 (vector unsigned char)__a);
11590 static int __ATTRS_o_ai vec_all_ge(vector short __a, vector short __b) {
11591 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, __a);
11594 static int __ATTRS_o_ai vec_all_ge(vector short __a, vector bool short __b) {
11595 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)__b, __a);
11598 static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a,
11599 vector unsigned short __b) {
11600 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, __a);
11603 static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a,
11604 vector bool short __b) {
11605 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
11609 static int __ATTRS_o_ai vec_all_ge(vector bool short __a, vector short __b) {
11610 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
11611 (vector unsigned short)__a);
11614 static int __ATTRS_o_ai vec_all_ge(vector bool short __a,
11615 vector unsigned short __b) {
11616 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b,
11617 (vector unsigned short)__a);
11620 static int __ATTRS_o_ai vec_all_ge(vector bool short __a,
11621 vector bool short __b) {
11622 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
11623 (vector unsigned short)__a);
11626 static int __ATTRS_o_ai vec_all_ge(vector int __a, vector int __b) {
11627 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, __a);
11630 static int __ATTRS_o_ai vec_all_ge(vector int __a, vector bool int __b) {
11631 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)__b, __a);
11634 static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a,
11635 vector unsigned int __b) {
11636 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, __a);
11639 static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a,
11640 vector bool int __b) {
11641 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, __a);
11644 static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector int __b) {
11645 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b,
11646 (vector unsigned int)__a);
11649 static int __ATTRS_o_ai vec_all_ge(vector bool int __a,
11650 vector unsigned int __b) {
11651 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, (vector unsigned int)__a);
11654 static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector bool int __b) {
11655 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b,
11656 (vector unsigned int)__a);
11659 #ifdef __POWER8_VECTOR__
11660 static int __ATTRS_o_ai vec_all_ge(vector signed long long __a,
11661 vector signed long long __b) {
11662 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b, __a);
11664 static int __ATTRS_o_ai vec_all_ge(vector signed long long __a,
11665 vector bool long long __b) {
11666 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector signed long long)__b,
11670 static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a,
11671 vector unsigned long long __b) {
11672 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, __a);
11675 static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a,
11676 vector bool long long __b) {
11677 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
11681 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
11682 vector signed long long __b) {
11683 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
11684 (vector unsigned long long)__a);
11687 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
11688 vector unsigned long long __b) {
11689 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b,
11690 (vector unsigned long long)__a);
11693 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
11694 vector bool long long __b) {
11695 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
11696 (vector unsigned long long)__a);
11700 static int __ATTRS_o_ai vec_all_ge(vector float __a, vector float __b) {
11701 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __a, __b);
11706 static int __ATTRS_o_ai vec_all_gt(vector signed char __a,
11707 vector signed char __b) {
11708 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, __b);
11711 static int __ATTRS_o_ai vec_all_gt(vector signed char __a,
11712 vector bool char __b) {
11713 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, (vector signed char)__b);
11716 static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a,
11717 vector unsigned char __b) {
11718 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, __b);
11721 static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a,
11722 vector bool char __b) {
11723 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, (vector unsigned char)__b);
11726 static int __ATTRS_o_ai vec_all_gt(vector bool char __a,
11727 vector signed char __b) {
11728 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a,
11729 (vector unsigned char)__b);
11732 static int __ATTRS_o_ai vec_all_gt(vector bool char __a,
11733 vector unsigned char __b) {
11734 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, __b);
11737 static int __ATTRS_o_ai vec_all_gt(vector bool char __a, vector bool char __b) {
11738 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a,
11739 (vector unsigned char)__b);
11742 static int __ATTRS_o_ai vec_all_gt(vector short __a, vector short __b) {
11743 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, __b);
11746 static int __ATTRS_o_ai vec_all_gt(vector short __a, vector bool short __b) {
11747 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, (vector short)__b);
11750 static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a,
11751 vector unsigned short __b) {
11752 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, __b);
11755 static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a,
11756 vector bool short __b) {
11757 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a,
11758 (vector unsigned short)__b);
11761 static int __ATTRS_o_ai vec_all_gt(vector bool short __a, vector short __b) {
11762 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
11763 (vector unsigned short)__b);
11766 static int __ATTRS_o_ai vec_all_gt(vector bool short __a,
11767 vector unsigned short __b) {
11768 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
11772 static int __ATTRS_o_ai vec_all_gt(vector bool short __a,
11773 vector bool short __b) {
11774 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
11775 (vector unsigned short)__b);
11778 static int __ATTRS_o_ai vec_all_gt(vector int __a, vector int __b) {
11779 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, __b);
11782 static int __ATTRS_o_ai vec_all_gt(vector int __a, vector bool int __b) {
11783 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, (vector int)__b);
11786 static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a,
11787 vector unsigned int __b) {
11788 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, __b);
11791 static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a,
11792 vector bool int __b) {
11793 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, (vector unsigned int)__b);
11796 static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector int __b) {
11797 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a,
11798 (vector unsigned int)__b);
11801 static int __ATTRS_o_ai vec_all_gt(vector bool int __a,
11802 vector unsigned int __b) {
11803 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, __b);
11806 static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector bool int __b) {
11807 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a,
11808 (vector unsigned int)__b);
11811 #ifdef __POWER8_VECTOR__
11812 static int __ATTRS_o_ai vec_all_gt(vector signed long long __a,
11813 vector signed long long __b) {
11814 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, __b);
11816 static int __ATTRS_o_ai vec_all_gt(vector signed long long __a,
11817 vector bool long long __b) {
11818 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a,
11819 (vector signed long long)__b);
11822 static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a,
11823 vector unsigned long long __b) {
11824 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, __b);
11827 static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a,
11828 vector bool long long __b) {
11829 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a,
11830 (vector unsigned long long)__b);
11833 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
11834 vector signed long long __b) {
11835 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
11836 (vector unsigned long long)__b);
11839 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
11840 vector unsigned long long __b) {
11841 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
11845 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
11846 vector bool long long __b) {
11847 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
11848 (vector unsigned long long)__b);
11852 static int __ATTRS_o_ai vec_all_gt(vector float __a, vector float __b) {
11853 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __a, __b);
11858 static int __attribute__((__always_inline__))
11859 vec_all_in(vector float __a, vector float __b) {
11860 return __builtin_altivec_vcmpbfp_p(__CR6_EQ, __a, __b);
11865 static int __ATTRS_o_ai vec_all_le(vector signed char __a,
11866 vector signed char __b) {
11867 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, __b);
11870 static int __ATTRS_o_ai vec_all_le(vector signed char __a,
11871 vector bool char __b) {
11872 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, (vector signed char)__b);
11875 static int __ATTRS_o_ai vec_all_le(vector unsigned char __a,
11876 vector unsigned char __b) {
11877 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, __b);
11880 static int __ATTRS_o_ai vec_all_le(vector unsigned char __a,
11881 vector bool char __b) {
11882 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, (vector unsigned char)__b);
11885 static int __ATTRS_o_ai vec_all_le(vector bool char __a,
11886 vector signed char __b) {
11887 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a,
11888 (vector unsigned char)__b);
11891 static int __ATTRS_o_ai vec_all_le(vector bool char __a,
11892 vector unsigned char __b) {
11893 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, __b);
11896 static int __ATTRS_o_ai vec_all_le(vector bool char __a, vector bool char __b) {
11897 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a,
11898 (vector unsigned char)__b);
11901 static int __ATTRS_o_ai vec_all_le(vector short __a, vector short __b) {
11902 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, __b);
11905 static int __ATTRS_o_ai vec_all_le(vector short __a, vector bool short __b) {
11906 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, (vector short)__b);
11909 static int __ATTRS_o_ai vec_all_le(vector unsigned short __a,
11910 vector unsigned short __b) {
11911 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, __b);
11914 static int __ATTRS_o_ai vec_all_le(vector unsigned short __a,
11915 vector bool short __b) {
11916 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a,
11917 (vector unsigned short)__b);
11920 static int __ATTRS_o_ai vec_all_le(vector bool short __a, vector short __b) {
11921 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
11922 (vector unsigned short)__b);
11925 static int __ATTRS_o_ai vec_all_le(vector bool short __a,
11926 vector unsigned short __b) {
11927 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
11931 static int __ATTRS_o_ai vec_all_le(vector bool short __a,
11932 vector bool short __b) {
11933 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
11934 (vector unsigned short)__b);
11937 static int __ATTRS_o_ai vec_all_le(vector int __a, vector int __b) {
11938 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, __b);
11941 static int __ATTRS_o_ai vec_all_le(vector int __a, vector bool int __b) {
11942 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, (vector int)__b);
11945 static int __ATTRS_o_ai vec_all_le(vector unsigned int __a,
11946 vector unsigned int __b) {
11947 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, __b);
11950 static int __ATTRS_o_ai vec_all_le(vector unsigned int __a,
11951 vector bool int __b) {
11952 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, (vector unsigned int)__b);
11955 static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector int __b) {
11956 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a,
11957 (vector unsigned int)__b);
11960 static int __ATTRS_o_ai vec_all_le(vector bool int __a,
11961 vector unsigned int __b) {
11962 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, __b);
11965 static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector bool int __b) {
11966 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a,
11967 (vector unsigned int)__b);
11970 #ifdef __POWER8_VECTOR__
11971 static int __ATTRS_o_ai vec_all_le(vector signed long long __a,
11972 vector signed long long __b) {
11973 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, __b);
11976 static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a,
11977 vector unsigned long long __b) {
11978 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, __b);
11981 static int __ATTRS_o_ai vec_all_le(vector signed long long __a,
11982 vector bool long long __b) {
11983 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a,
11984 (vector signed long long)__b);
11987 static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a,
11988 vector bool long long __b) {
11989 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a,
11990 (vector unsigned long long)__b);
11993 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
11994 vector signed long long __b) {
11995 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
11996 (vector unsigned long long)__b);
11999 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
12000 vector unsigned long long __b) {
12001 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
12005 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
12006 vector bool long long __b) {
12007 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
12008 (vector unsigned long long)__b);
12012 static int __ATTRS_o_ai vec_all_le(vector float __a, vector float __b) {
12013 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __b, __a);
12018 static int __ATTRS_o_ai vec_all_lt(vector signed char __a,
12019 vector signed char __b) {
12020 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, __a);
12023 static int __ATTRS_o_ai vec_all_lt(vector signed char __a,
12024 vector bool char __b) {
12025 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__b, __a);
12028 static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a,
12029 vector unsigned char __b) {
12030 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, __a);
12033 static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a,
12034 vector bool char __b) {
12035 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, __a);
12038 static int __ATTRS_o_ai vec_all_lt(vector bool char __a,
12039 vector signed char __b) {
12040 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b,
12041 (vector unsigned char)__a);
12044 static int __ATTRS_o_ai vec_all_lt(vector bool char __a,
12045 vector unsigned char __b) {
12046 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, (vector unsigned char)__a);
12049 static int __ATTRS_o_ai vec_all_lt(vector bool char __a, vector bool char __b) {
12050 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b,
12051 (vector unsigned char)__a);
12054 static int __ATTRS_o_ai vec_all_lt(vector short __a, vector short __b) {
12055 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, __a);
12058 static int __ATTRS_o_ai vec_all_lt(vector short __a, vector bool short __b) {
12059 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)__b, __a);
12062 static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a,
12063 vector unsigned short __b) {
12064 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, __a);
12067 static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a,
12068 vector bool short __b) {
12069 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
12073 static int __ATTRS_o_ai vec_all_lt(vector bool short __a, vector short __b) {
12074 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
12075 (vector unsigned short)__a);
12078 static int __ATTRS_o_ai vec_all_lt(vector bool short __a,
12079 vector unsigned short __b) {
12080 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b,
12081 (vector unsigned short)__a);
12084 static int __ATTRS_o_ai vec_all_lt(vector bool short __a,
12085 vector bool short __b) {
12086 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
12087 (vector unsigned short)__a);
12090 static int __ATTRS_o_ai vec_all_lt(vector int __a, vector int __b) {
12091 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, __a);
12094 static int __ATTRS_o_ai vec_all_lt(vector int __a, vector bool int __b) {
12095 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)__b, __a);
12098 static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a,
12099 vector unsigned int __b) {
12100 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, __a);
12103 static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a,
12104 vector bool int __b) {
12105 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, __a);
12108 static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector int __b) {
12109 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b,
12110 (vector unsigned int)__a);
12113 static int __ATTRS_o_ai vec_all_lt(vector bool int __a,
12114 vector unsigned int __b) {
12115 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, (vector unsigned int)__a);
12118 static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector bool int __b) {
12119 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b,
12120 (vector unsigned int)__a);
12123 #ifdef __POWER8_VECTOR__
12124 static int __ATTRS_o_ai vec_all_lt(vector signed long long __a,
12125 vector signed long long __b) {
12126 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, __a);
12129 static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a,
12130 vector unsigned long long __b) {
12131 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, __a);
12134 static int __ATTRS_o_ai vec_all_lt(vector signed long long __a,
12135 vector bool long long __b) {
12136 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector signed long long)__b,
12140 static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a,
12141 vector bool long long __b) {
12142 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
12146 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
12147 vector signed long long __b) {
12148 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
12149 (vector unsigned long long)__a);
12152 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
12153 vector unsigned long long __b) {
12154 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b,
12155 (vector unsigned long long)__a);
12158 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
12159 vector bool long long __b) {
12160 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
12161 (vector unsigned long long)__a);
12165 static int __ATTRS_o_ai vec_all_lt(vector float __a, vector float __b) {
12166 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __b, __a);
12171 static int __attribute__((__always_inline__)) vec_all_nan(vector float __a) {
12172 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __a);
12177 static int __ATTRS_o_ai vec_all_ne(vector signed char __a,
12178 vector signed char __b) {
12179 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12183 static int __ATTRS_o_ai vec_all_ne(vector signed char __a,
12184 vector bool char __b) {
12185 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12189 static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a,
12190 vector unsigned char __b) {
12191 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12195 static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a,
12196 vector bool char __b) {
12197 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12201 static int __ATTRS_o_ai vec_all_ne(vector bool char __a,
12202 vector signed char __b) {
12203 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12207 static int __ATTRS_o_ai vec_all_ne(vector bool char __a,
12208 vector unsigned char __b) {
12209 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12213 static int __ATTRS_o_ai vec_all_ne(vector bool char __a, vector bool char __b) {
12214 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12218 static int __ATTRS_o_ai vec_all_ne(vector short __a, vector short __b) {
12219 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, __b);
12222 static int __ATTRS_o_ai vec_all_ne(vector short __a, vector bool short __b) {
12223 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, (vector short)__b);
12226 static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a,
12227 vector unsigned short __b) {
12228 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12229 (vector short)__b);
12232 static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a,
12233 vector bool short __b) {
12234 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12235 (vector short)__b);
12238 static int __ATTRS_o_ai vec_all_ne(vector bool short __a, vector short __b) {
12239 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12240 (vector short)__b);
12243 static int __ATTRS_o_ai vec_all_ne(vector bool short __a,
12244 vector unsigned short __b) {
12245 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12246 (vector short)__b);
12249 static int __ATTRS_o_ai vec_all_ne(vector bool short __a,
12250 vector bool short __b) {
12251 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12252 (vector short)__b);
12255 static int __ATTRS_o_ai vec_all_ne(vector pixel __a, vector pixel __b) {
12256 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12257 (vector short)__b);
12260 static int __ATTRS_o_ai vec_all_ne(vector int __a, vector int __b) {
12261 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, __b);
12264 static int __ATTRS_o_ai vec_all_ne(vector int __a, vector bool int __b) {
12265 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, (vector int)__b);
12268 static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a,
12269 vector unsigned int __b) {
12270 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12274 static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a,
12275 vector bool int __b) {
12276 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12280 static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector int __b) {
12281 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12285 static int __ATTRS_o_ai vec_all_ne(vector bool int __a,
12286 vector unsigned int __b) {
12287 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12291 static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector bool int __b) {
12292 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12296 #ifdef __POWER8_VECTOR__
12297 static int __ATTRS_o_ai vec_all_ne(vector signed long long __a,
12298 vector signed long long __b) {
12299 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, __b);
12302 static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a,
12303 vector unsigned long long __b) {
12304 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a,
12305 (vector long long)__b);
12308 static int __ATTRS_o_ai vec_all_ne(vector signed long long __a,
12309 vector bool long long __b) {
12310 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a,
12311 (vector signed long long)__b);
12314 static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a,
12315 vector bool long long __b) {
12316 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12317 (vector signed long long)__b);
12320 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
12321 vector signed long long __b) {
12322 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12323 (vector signed long long)__b);
12326 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
12327 vector unsigned long long __b) {
12328 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12329 (vector signed long long)__b);
12332 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
12333 vector bool long long __b) {
12334 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12335 (vector signed long long)__b);
12339 static int __ATTRS_o_ai vec_all_ne(vector float __a, vector float __b) {
12340 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __b);
12345 static int __attribute__((__always_inline__))
12346 vec_all_nge(vector float __a, vector float __b) {
12347 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __a, __b);
12352 static int __attribute__((__always_inline__))
12353 vec_all_ngt(vector float __a, vector float __b) {
12354 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __a, __b);
12359 static int __attribute__((__always_inline__))
12360 vec_all_nle(vector float __a, vector float __b) {
12361 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __b, __a);
12366 static int __attribute__((__always_inline__))
12367 vec_all_nlt(vector float __a, vector float __b) {
12368 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __b, __a);
12371 /* vec_all_numeric */
12373 static int __attribute__((__always_inline__))
12374 vec_all_numeric(vector float __a) {
12375 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __a);
12380 static int __ATTRS_o_ai vec_any_eq(vector signed char __a,
12381 vector signed char __b) {
12382 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12386 static int __ATTRS_o_ai vec_any_eq(vector signed char __a,
12387 vector bool char __b) {
12388 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12392 static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a,
12393 vector unsigned char __b) {
12394 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12398 static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a,
12399 vector bool char __b) {
12400 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12404 static int __ATTRS_o_ai vec_any_eq(vector bool char __a,
12405 vector signed char __b) {
12406 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12410 static int __ATTRS_o_ai vec_any_eq(vector bool char __a,
12411 vector unsigned char __b) {
12412 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12416 static int __ATTRS_o_ai vec_any_eq(vector bool char __a, vector bool char __b) {
12417 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12421 static int __ATTRS_o_ai vec_any_eq(vector short __a, vector short __b) {
12422 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, __b);
12425 static int __ATTRS_o_ai vec_any_eq(vector short __a, vector bool short __b) {
12426 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, (vector short)__b);
12429 static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a,
12430 vector unsigned short __b) {
12431 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12432 (vector short)__b);
12435 static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a,
12436 vector bool short __b) {
12437 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12438 (vector short)__b);
12441 static int __ATTRS_o_ai vec_any_eq(vector bool short __a, vector short __b) {
12442 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12443 (vector short)__b);
12446 static int __ATTRS_o_ai vec_any_eq(vector bool short __a,
12447 vector unsigned short __b) {
12448 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12449 (vector short)__b);
12452 static int __ATTRS_o_ai vec_any_eq(vector bool short __a,
12453 vector bool short __b) {
12454 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12455 (vector short)__b);
12458 static int __ATTRS_o_ai vec_any_eq(vector pixel __a, vector pixel __b) {
12459 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12460 (vector short)__b);
12463 static int __ATTRS_o_ai vec_any_eq(vector int __a, vector int __b) {
12464 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, __b);
12467 static int __ATTRS_o_ai vec_any_eq(vector int __a, vector bool int __b) {
12468 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, (vector int)__b);
12471 static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a,
12472 vector unsigned int __b) {
12473 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12477 static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a,
12478 vector bool int __b) {
12479 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12483 static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector int __b) {
12484 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12488 static int __ATTRS_o_ai vec_any_eq(vector bool int __a,
12489 vector unsigned int __b) {
12490 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12494 static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector bool int __b) {
12495 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12499 #ifdef __POWER8_VECTOR__
12500 static int __ATTRS_o_ai vec_any_eq(vector signed long long __a,
12501 vector signed long long __b) {
12502 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, __b);
12505 static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a,
12506 vector unsigned long long __b) {
12507 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a,
12508 (vector long long)__b);
12511 static int __ATTRS_o_ai vec_any_eq(vector signed long long __a,
12512 vector bool long long __b) {
12513 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a,
12514 (vector signed long long)__b);
12517 static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a,
12518 vector bool long long __b) {
12519 return __builtin_altivec_vcmpequd_p(
12520 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12523 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
12524 vector signed long long __b) {
12525 return __builtin_altivec_vcmpequd_p(
12526 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12529 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
12530 vector unsigned long long __b) {
12531 return __builtin_altivec_vcmpequd_p(
12532 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12535 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
12536 vector bool long long __b) {
12537 return __builtin_altivec_vcmpequd_p(
12538 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12542 static int __ATTRS_o_ai vec_any_eq(vector float __a, vector float __b) {
12543 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __b);
12548 static int __ATTRS_o_ai vec_any_ge(vector signed char __a,
12549 vector signed char __b) {
12550 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b, __a);
12553 static int __ATTRS_o_ai vec_any_ge(vector signed char __a,
12554 vector bool char __b) {
12555 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b,
12559 static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a,
12560 vector unsigned char __b) {
12561 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, __a);
12564 static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a,
12565 vector bool char __b) {
12566 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
12570 static int __ATTRS_o_ai vec_any_ge(vector bool char __a,
12571 vector signed char __b) {
12572 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
12573 (vector unsigned char)__a);
12576 static int __ATTRS_o_ai vec_any_ge(vector bool char __a,
12577 vector unsigned char __b) {
12578 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b,
12579 (vector unsigned char)__a);
12582 static int __ATTRS_o_ai vec_any_ge(vector bool char __a, vector bool char __b) {
12583 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
12584 (vector unsigned char)__a);
12587 static int __ATTRS_o_ai vec_any_ge(vector short __a, vector short __b) {
12588 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b, __a);
12591 static int __ATTRS_o_ai vec_any_ge(vector short __a, vector bool short __b) {
12592 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)__b, __a);
12595 static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a,
12596 vector unsigned short __b) {
12597 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, __a);
12600 static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a,
12601 vector bool short __b) {
12602 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
12606 static int __ATTRS_o_ai vec_any_ge(vector bool short __a, vector short __b) {
12607 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
12608 (vector unsigned short)__a);
12611 static int __ATTRS_o_ai vec_any_ge(vector bool short __a,
12612 vector unsigned short __b) {
12613 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b,
12614 (vector unsigned short)__a);
12617 static int __ATTRS_o_ai vec_any_ge(vector bool short __a,
12618 vector bool short __b) {
12619 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
12620 (vector unsigned short)__a);
12623 static int __ATTRS_o_ai vec_any_ge(vector int __a, vector int __b) {
12624 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b, __a);
12627 static int __ATTRS_o_ai vec_any_ge(vector int __a, vector bool int __b) {
12628 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)__b, __a);
12631 static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a,
12632 vector unsigned int __b) {
12633 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, __a);
12636 static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a,
12637 vector bool int __b) {
12638 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
12642 static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector int __b) {
12643 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
12644 (vector unsigned int)__a);
12647 static int __ATTRS_o_ai vec_any_ge(vector bool int __a,
12648 vector unsigned int __b) {
12649 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b,
12650 (vector unsigned int)__a);
12653 static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector bool int __b) {
12654 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
12655 (vector unsigned int)__a);
12658 #ifdef __POWER8_VECTOR__
12659 static int __ATTRS_o_ai vec_any_ge(vector signed long long __a,
12660 vector signed long long __b) {
12661 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b, __a);
12664 static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a,
12665 vector unsigned long long __b) {
12666 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, __a);
12669 static int __ATTRS_o_ai vec_any_ge(vector signed long long __a,
12670 vector bool long long __b) {
12671 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV,
12672 (vector signed long long)__b, __a);
12675 static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a,
12676 vector bool long long __b) {
12677 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12678 (vector unsigned long long)__b, __a);
12681 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
12682 vector signed long long __b) {
12683 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12684 (vector unsigned long long)__b,
12685 (vector unsigned long long)__a);
12688 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
12689 vector unsigned long long __b) {
12690 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b,
12691 (vector unsigned long long)__a);
12694 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
12695 vector bool long long __b) {
12696 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12697 (vector unsigned long long)__b,
12698 (vector unsigned long long)__a);
12702 static int __ATTRS_o_ai vec_any_ge(vector float __a, vector float __b) {
12703 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __a, __b);
12708 static int __ATTRS_o_ai vec_any_gt(vector signed char __a,
12709 vector signed char __b) {
12710 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, __b);
12713 static int __ATTRS_o_ai vec_any_gt(vector signed char __a,
12714 vector bool char __b) {
12715 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a,
12716 (vector signed char)__b);
12719 static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a,
12720 vector unsigned char __b) {
12721 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, __b);
12724 static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a,
12725 vector bool char __b) {
12726 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a,
12727 (vector unsigned char)__b);
12730 static int __ATTRS_o_ai vec_any_gt(vector bool char __a,
12731 vector signed char __b) {
12732 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
12733 (vector unsigned char)__b);
12736 static int __ATTRS_o_ai vec_any_gt(vector bool char __a,
12737 vector unsigned char __b) {
12738 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
12742 static int __ATTRS_o_ai vec_any_gt(vector bool char __a, vector bool char __b) {
12743 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
12744 (vector unsigned char)__b);
12747 static int __ATTRS_o_ai vec_any_gt(vector short __a, vector short __b) {
12748 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, __b);
12751 static int __ATTRS_o_ai vec_any_gt(vector short __a, vector bool short __b) {
12752 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, (vector short)__b);
12755 static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a,
12756 vector unsigned short __b) {
12757 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, __b);
12760 static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a,
12761 vector bool short __b) {
12762 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a,
12763 (vector unsigned short)__b);
12766 static int __ATTRS_o_ai vec_any_gt(vector bool short __a, vector short __b) {
12767 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
12768 (vector unsigned short)__b);
12771 static int __ATTRS_o_ai vec_any_gt(vector bool short __a,
12772 vector unsigned short __b) {
12773 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
12777 static int __ATTRS_o_ai vec_any_gt(vector bool short __a,
12778 vector bool short __b) {
12779 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
12780 (vector unsigned short)__b);
12783 static int __ATTRS_o_ai vec_any_gt(vector int __a, vector int __b) {
12784 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, __b);
12787 static int __ATTRS_o_ai vec_any_gt(vector int __a, vector bool int __b) {
12788 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, (vector int)__b);
12791 static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a,
12792 vector unsigned int __b) {
12793 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, __b);
12796 static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a,
12797 vector bool int __b) {
12798 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a,
12799 (vector unsigned int)__b);
12802 static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector int __b) {
12803 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
12804 (vector unsigned int)__b);
12807 static int __ATTRS_o_ai vec_any_gt(vector bool int __a,
12808 vector unsigned int __b) {
12809 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
12813 static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector bool int __b) {
12814 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
12815 (vector unsigned int)__b);
12818 #ifdef __POWER8_VECTOR__
12819 static int __ATTRS_o_ai vec_any_gt(vector signed long long __a,
12820 vector signed long long __b) {
12821 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, __b);
12824 static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a,
12825 vector unsigned long long __b) {
12826 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, __b);
12829 static int __ATTRS_o_ai vec_any_gt(vector signed long long __a,
12830 vector bool long long __b) {
12831 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a,
12832 (vector signed long long)__b);
12835 static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a,
12836 vector bool long long __b) {
12837 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a,
12838 (vector unsigned long long)__b);
12841 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
12842 vector signed long long __b) {
12843 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12844 (vector unsigned long long)__a,
12845 (vector unsigned long long)__b);
12848 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
12849 vector unsigned long long __b) {
12850 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12851 (vector unsigned long long)__a, __b);
12854 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
12855 vector bool long long __b) {
12856 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12857 (vector unsigned long long)__a,
12858 (vector unsigned long long)__b);
12862 static int __ATTRS_o_ai vec_any_gt(vector float __a, vector float __b) {
12863 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __a, __b);
12868 static int __ATTRS_o_ai vec_any_le(vector signed char __a,
12869 vector signed char __b) {
12870 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, __b);
12873 static int __ATTRS_o_ai vec_any_le(vector signed char __a,
12874 vector bool char __b) {
12875 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a,
12876 (vector signed char)__b);
12879 static int __ATTRS_o_ai vec_any_le(vector unsigned char __a,
12880 vector unsigned char __b) {
12881 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, __b);
12884 static int __ATTRS_o_ai vec_any_le(vector unsigned char __a,
12885 vector bool char __b) {
12886 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a,
12887 (vector unsigned char)__b);
12890 static int __ATTRS_o_ai vec_any_le(vector bool char __a,
12891 vector signed char __b) {
12892 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
12893 (vector unsigned char)__b);
12896 static int __ATTRS_o_ai vec_any_le(vector bool char __a,
12897 vector unsigned char __b) {
12898 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
12902 static int __ATTRS_o_ai vec_any_le(vector bool char __a, vector bool char __b) {
12903 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
12904 (vector unsigned char)__b);
12907 static int __ATTRS_o_ai vec_any_le(vector short __a, vector short __b) {
12908 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, __b);
12911 static int __ATTRS_o_ai vec_any_le(vector short __a, vector bool short __b) {
12912 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, (vector short)__b);
12915 static int __ATTRS_o_ai vec_any_le(vector unsigned short __a,
12916 vector unsigned short __b) {
12917 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, __b);
12920 static int __ATTRS_o_ai vec_any_le(vector unsigned short __a,
12921 vector bool short __b) {
12922 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a,
12923 (vector unsigned short)__b);
12926 static int __ATTRS_o_ai vec_any_le(vector bool short __a, vector short __b) {
12927 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
12928 (vector unsigned short)__b);
12931 static int __ATTRS_o_ai vec_any_le(vector bool short __a,
12932 vector unsigned short __b) {
12933 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
12937 static int __ATTRS_o_ai vec_any_le(vector bool short __a,
12938 vector bool short __b) {
12939 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
12940 (vector unsigned short)__b);
12943 static int __ATTRS_o_ai vec_any_le(vector int __a, vector int __b) {
12944 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, __b);
12947 static int __ATTRS_o_ai vec_any_le(vector int __a, vector bool int __b) {
12948 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, (vector int)__b);
12951 static int __ATTRS_o_ai vec_any_le(vector unsigned int __a,
12952 vector unsigned int __b) {
12953 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, __b);
12956 static int __ATTRS_o_ai vec_any_le(vector unsigned int __a,
12957 vector bool int __b) {
12958 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a,
12959 (vector unsigned int)__b);
12962 static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector int __b) {
12963 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
12964 (vector unsigned int)__b);
12967 static int __ATTRS_o_ai vec_any_le(vector bool int __a,
12968 vector unsigned int __b) {
12969 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
12973 static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector bool int __b) {
12974 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
12975 (vector unsigned int)__b);
12978 #ifdef __POWER8_VECTOR__
12979 static int __ATTRS_o_ai vec_any_le(vector signed long long __a,
12980 vector signed long long __b) {
12981 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, __b);
12984 static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a,
12985 vector unsigned long long __b) {
12986 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, __b);
12989 static int __ATTRS_o_ai vec_any_le(vector signed long long __a,
12990 vector bool long long __b) {
12991 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a,
12992 (vector signed long long)__b);
12995 static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a,
12996 vector bool long long __b) {
12997 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a,
12998 (vector unsigned long long)__b);
13001 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
13002 vector signed long long __b) {
13003 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
13004 (vector unsigned long long)__a,
13005 (vector unsigned long long)__b);
13008 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
13009 vector unsigned long long __b) {
13010 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
13011 (vector unsigned long long)__a, __b);
13014 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
13015 vector bool long long __b) {
13016 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
13017 (vector unsigned long long)__a,
13018 (vector unsigned long long)__b);
13022 static int __ATTRS_o_ai vec_any_le(vector float __a, vector float __b) {
13023 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __b, __a);
13028 static int __ATTRS_o_ai vec_any_lt(vector signed char __a,
13029 vector signed char __b) {
13030 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b, __a);
13033 static int __ATTRS_o_ai vec_any_lt(vector signed char __a,
13034 vector bool char __b) {
13035 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b,
13039 static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a,
13040 vector unsigned char __b) {
13041 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, __a);
13044 static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a,
13045 vector bool char __b) {
13046 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
13050 static int __ATTRS_o_ai vec_any_lt(vector bool char __a,
13051 vector signed char __b) {
13052 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
13053 (vector unsigned char)__a);
13056 static int __ATTRS_o_ai vec_any_lt(vector bool char __a,
13057 vector unsigned char __b) {
13058 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b,
13059 (vector unsigned char)__a);
13062 static int __ATTRS_o_ai vec_any_lt(vector bool char __a, vector bool char __b) {
13063 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
13064 (vector unsigned char)__a);
13067 static int __ATTRS_o_ai vec_any_lt(vector short __a, vector short __b) {
13068 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b, __a);
13071 static int __ATTRS_o_ai vec_any_lt(vector short __a, vector bool short __b) {
13072 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)__b, __a);
13075 static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a,
13076 vector unsigned short __b) {
13077 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, __a);
13080 static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a,
13081 vector bool short __b) {
13082 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
13086 static int __ATTRS_o_ai vec_any_lt(vector bool short __a, vector short __b) {
13087 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
13088 (vector unsigned short)__a);
13091 static int __ATTRS_o_ai vec_any_lt(vector bool short __a,
13092 vector unsigned short __b) {
13093 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b,
13094 (vector unsigned short)__a);
13097 static int __ATTRS_o_ai vec_any_lt(vector bool short __a,
13098 vector bool short __b) {
13099 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
13100 (vector unsigned short)__a);
13103 static int __ATTRS_o_ai vec_any_lt(vector int __a, vector int __b) {
13104 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b, __a);
13107 static int __ATTRS_o_ai vec_any_lt(vector int __a, vector bool int __b) {
13108 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)__b, __a);
13111 static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a,
13112 vector unsigned int __b) {
13113 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, __a);
13116 static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a,
13117 vector bool int __b) {
13118 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
13122 static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector int __b) {
13123 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
13124 (vector unsigned int)__a);
13127 static int __ATTRS_o_ai vec_any_lt(vector bool int __a,
13128 vector unsigned int __b) {
13129 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b,
13130 (vector unsigned int)__a);
13133 static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector bool int __b) {
13134 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
13135 (vector unsigned int)__a);
13138 #ifdef __POWER8_VECTOR__
13139 static int __ATTRS_o_ai vec_any_lt(vector signed long long __a,
13140 vector signed long long __b) {
13141 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b, __a);
13144 static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a,
13145 vector unsigned long long __b) {
13146 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, __a);
13149 static int __ATTRS_o_ai vec_any_lt(vector signed long long __a,
13150 vector bool long long __b) {
13151 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV,
13152 (vector signed long long)__b, __a);
13155 static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a,
13156 vector bool long long __b) {
13157 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13158 (vector unsigned long long)__b, __a);
13161 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
13162 vector signed long long __b) {
13163 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13164 (vector unsigned long long)__b,
13165 (vector unsigned long long)__a);
13168 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
13169 vector unsigned long long __b) {
13170 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b,
13171 (vector unsigned long long)__a);
13174 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
13175 vector bool long long __b) {
13176 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13177 (vector unsigned long long)__b,
13178 (vector unsigned long long)__a);
13182 static int __ATTRS_o_ai vec_any_lt(vector float __a, vector float __b) {
13183 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __b, __a);
13188 static int __attribute__((__always_inline__)) vec_any_nan(vector float __a) {
13189 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __a);
13194 static int __ATTRS_o_ai vec_any_ne(vector signed char __a,
13195 vector signed char __b) {
13196 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13200 static int __ATTRS_o_ai vec_any_ne(vector signed char __a,
13201 vector bool char __b) {
13202 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13206 static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a,
13207 vector unsigned char __b) {
13208 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13212 static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a,
13213 vector bool char __b) {
13214 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13218 static int __ATTRS_o_ai vec_any_ne(vector bool char __a,
13219 vector signed char __b) {
13220 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13224 static int __ATTRS_o_ai vec_any_ne(vector bool char __a,
13225 vector unsigned char __b) {
13226 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13230 static int __ATTRS_o_ai vec_any_ne(vector bool char __a, vector bool char __b) {
13231 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13235 static int __ATTRS_o_ai vec_any_ne(vector short __a, vector short __b) {
13236 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, __b);
13239 static int __ATTRS_o_ai vec_any_ne(vector short __a, vector bool short __b) {
13240 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, (vector short)__b);
13243 static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a,
13244 vector unsigned short __b) {
13245 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13246 (vector short)__b);
13249 static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a,
13250 vector bool short __b) {
13251 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13252 (vector short)__b);
13255 static int __ATTRS_o_ai vec_any_ne(vector bool short __a, vector short __b) {
13256 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13257 (vector short)__b);
13260 static int __ATTRS_o_ai vec_any_ne(vector bool short __a,
13261 vector unsigned short __b) {
13262 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13263 (vector short)__b);
13266 static int __ATTRS_o_ai vec_any_ne(vector bool short __a,
13267 vector bool short __b) {
13268 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13269 (vector short)__b);
13272 static int __ATTRS_o_ai vec_any_ne(vector pixel __a, vector pixel __b) {
13273 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13274 (vector short)__b);
13277 static int __ATTRS_o_ai vec_any_ne(vector int __a, vector int __b) {
13278 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, __b);
13281 static int __ATTRS_o_ai vec_any_ne(vector int __a, vector bool int __b) {
13282 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, (vector int)__b);
13285 static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a,
13286 vector unsigned int __b) {
13287 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13291 static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a,
13292 vector bool int __b) {
13293 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13297 static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector int __b) {
13298 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13302 static int __ATTRS_o_ai vec_any_ne(vector bool int __a,
13303 vector unsigned int __b) {
13304 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13308 static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector bool int __b) {
13309 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13313 #ifdef __POWER8_VECTOR__
13314 static int __ATTRS_o_ai vec_any_ne(vector signed long long __a,
13315 vector signed long long __b) {
13316 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, __b);
13319 static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a,
13320 vector unsigned long long __b) {
13321 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a,
13322 (vector long long)__b);
13325 static int __ATTRS_o_ai vec_any_ne(vector signed long long __a,
13326 vector bool long long __b) {
13327 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a,
13328 (vector signed long long)__b);
13331 static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a,
13332 vector bool long long __b) {
13333 return __builtin_altivec_vcmpequd_p(
13334 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13337 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
13338 vector signed long long __b) {
13339 return __builtin_altivec_vcmpequd_p(
13340 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13343 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
13344 vector unsigned long long __b) {
13345 return __builtin_altivec_vcmpequd_p(
13346 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13349 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
13350 vector bool long long __b) {
13351 return __builtin_altivec_vcmpequd_p(
13352 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13356 static int __ATTRS_o_ai vec_any_ne(vector float __a, vector float __b) {
13357 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __b);
13362 static int __attribute__((__always_inline__))
13363 vec_any_nge(vector float __a, vector float __b) {
13364 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __a, __b);
13369 static int __attribute__((__always_inline__))
13370 vec_any_ngt(vector float __a, vector float __b) {
13371 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __a, __b);
13376 static int __attribute__((__always_inline__))
13377 vec_any_nle(vector float __a, vector float __b) {
13378 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __b, __a);
13383 static int __attribute__((__always_inline__))
13384 vec_any_nlt(vector float __a, vector float __b) {
13385 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __b, __a);
13388 /* vec_any_numeric */
13390 static int __attribute__((__always_inline__))
13391 vec_any_numeric(vector float __a) {
13392 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __a);
13397 static int __attribute__((__always_inline__))
13398 vec_any_out(vector float __a, vector float __b) {
13399 return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, __a, __b);
13402 /* Power 8 Crypto functions
13403 Note: We diverge from the current GCC implementation with regard
13404 to cryptography and related functions as follows:
13405 - Only the SHA and AES instructions and builtins are disabled by -mno-crypto
13406 - The remaining ones are only available on Power8 and up so
13407 require -mpower8-vector
13408 The justification for this is that export requirements require that
13409 Category:Vector.Crypto is optional (i.e. compliant hardware may not provide
13410 support). As a result, we need to be able to turn off support for those.
13411 The remaining ones (currently controlled by -mcrypto for GCC) still
13412 need to be provided on compliant hardware even if Vector.Crypto is not
13414 FIXME: the naming convention for the builtins will be adjusted due
13415 to the inconsistency (__builtin_crypto_ prefix on builtins that cannot be
13416 removed with -mno-crypto). This is under development.
13419 static vector unsigned long long __attribute__((__always_inline__))
13420 __builtin_crypto_vsbox(vector unsigned long long __a) {
13421 return __builtin_altivec_crypto_vsbox(__a);
13424 static vector unsigned long long __attribute__((__always_inline__))
13425 __builtin_crypto_vcipher(vector unsigned long long __a,
13426 vector unsigned long long __b) {
13427 return __builtin_altivec_crypto_vcipher(__a, __b);
13430 static vector unsigned long long __attribute__((__always_inline__))
13431 __builtin_crypto_vcipherlast(vector unsigned long long __a,
13432 vector unsigned long long __b) {
13433 return __builtin_altivec_crypto_vcipherlast(__a, __b);
13436 static vector unsigned long long __attribute__((__always_inline__))
13437 __builtin_crypto_vncipher(vector unsigned long long __a,
13438 vector unsigned long long __b) {
13439 return __builtin_altivec_crypto_vncipher(__a, __b);
13442 static vector unsigned long long __attribute__((__always_inline__))
13443 __builtin_crypto_vncipherlast(vector unsigned long long __a,
13444 vector unsigned long long __b) {
13445 return __builtin_altivec_crypto_vncipherlast(__a, __b);
13448 #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad
13449 #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw
13452 #ifdef __POWER8_VECTOR__
13453 static vector unsigned char __ATTRS_o_ai
13454 __builtin_crypto_vpermxor(vector unsigned char __a, vector unsigned char __b,
13455 vector unsigned char __c) {
13456 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
13459 static vector unsigned short __ATTRS_o_ai
13460 __builtin_crypto_vpermxor(vector unsigned short __a, vector unsigned short __b,
13461 vector unsigned short __c) {
13462 return (vector unsigned short)__builtin_altivec_crypto_vpermxor(
13463 (vector unsigned char)__a, (vector unsigned char)__b,
13464 (vector unsigned char)__c);
13467 static vector unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
13468 vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) {
13469 return (vector unsigned int)__builtin_altivec_crypto_vpermxor(
13470 (vector unsigned char)__a, (vector unsigned char)__b,
13471 (vector unsigned char)__c);
13474 static vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpermxor(
13475 vector unsigned long long __a, vector unsigned long long __b,
13476 vector unsigned long long __c) {
13477 return (vector unsigned long long)__builtin_altivec_crypto_vpermxor(
13478 (vector unsigned char)__a, (vector unsigned char)__b,
13479 (vector unsigned char)__c);
13482 static vector unsigned char __ATTRS_o_ai
13483 __builtin_crypto_vpmsumb(vector unsigned char __a, vector unsigned char __b) {
13484 return __builtin_altivec_crypto_vpmsumb(__a, __b);
13487 static vector unsigned short __ATTRS_o_ai
13488 __builtin_crypto_vpmsumb(vector unsigned short __a, vector unsigned short __b) {
13489 return __builtin_altivec_crypto_vpmsumh(__a, __b);
13492 static vector unsigned int __ATTRS_o_ai
13493 __builtin_crypto_vpmsumb(vector unsigned int __a, vector unsigned int __b) {
13494 return __builtin_altivec_crypto_vpmsumw(__a, __b);
13497 static vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpmsumb(
13498 vector unsigned long long __a, vector unsigned long long __b) {
13499 return __builtin_altivec_crypto_vpmsumd(__a, __b);
13502 static vector signed char __ATTRS_o_ai vec_vgbbd (vector signed char __a)
13504 return __builtin_altivec_vgbbd((vector unsigned char) __a);
13507 static vector unsigned char __ATTRS_o_ai vec_vgbbd (vector unsigned char __a)
13509 return __builtin_altivec_vgbbd(__a);
13512 static vector long long __ATTRS_o_ai
13513 vec_vbpermq (vector signed char __a, vector signed char __b)
13515 return __builtin_altivec_vbpermq((vector unsigned char) __a,
13516 (vector unsigned char) __b);
13519 static vector long long __ATTRS_o_ai
13520 vec_vbpermq (vector unsigned char __a, vector unsigned char __b)
13522 return __builtin_altivec_vbpermq(__a, __b);
13526 #undef __ATTRS_o_ai
13528 #endif /* __ALTIVEC_H */