1 /*===---- altivec.h - Standard header for type generic math ---------------===*\
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 \*===----------------------------------------------------------------------===*/
27 #error "AltiVec support not enabled"
30 /* constants for mapping CR6 bits to predicate result. */
33 #define __CR6_EQ_REV 1
35 #define __CR6_LT_REV 3
37 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
39 static vector signed char __ATTRS_o_ai vec_perm(vector signed char __a,
40 vector signed char __b,
41 vector unsigned char __c);
43 static vector unsigned char __ATTRS_o_ai vec_perm(vector unsigned char __a,
44 vector unsigned char __b,
45 vector unsigned char __c);
47 static vector bool char __ATTRS_o_ai vec_perm(vector bool char __a,
49 vector unsigned char __c);
51 static vector short __ATTRS_o_ai vec_perm(vector short __a, vector short __b,
52 vector unsigned char __c);
54 static vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a,
55 vector unsigned short __b,
56 vector unsigned char __c);
58 static vector bool short __ATTRS_o_ai vec_perm(vector bool short __a,
59 vector bool short __b,
60 vector unsigned char __c);
62 static vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b,
63 vector unsigned char __c);
65 static vector int __ATTRS_o_ai vec_perm(vector int __a, vector int __b,
66 vector unsigned char __c);
68 static vector unsigned int __ATTRS_o_ai vec_perm(vector unsigned int __a,
69 vector unsigned int __b,
70 vector unsigned char __c);
72 static vector bool int __ATTRS_o_ai vec_perm(vector bool int __a,
74 vector unsigned char __c);
76 static vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b,
77 vector unsigned char __c);
80 static vector long long __ATTRS_o_ai vec_perm(vector long long __a,
82 vector unsigned char __c);
84 static vector unsigned long long __ATTRS_o_ai
85 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
86 vector unsigned char __c);
88 static vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b,
89 vector unsigned char __c);
92 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
93 vector unsigned char __b);
97 #define __builtin_altivec_abs_v16qi vec_abs
98 #define __builtin_altivec_abs_v8hi vec_abs
99 #define __builtin_altivec_abs_v4si vec_abs
101 static vector signed char __ATTRS_o_ai vec_abs(vector signed char __a) {
102 return __builtin_altivec_vmaxsb(__a, -__a);
105 static vector signed short __ATTRS_o_ai vec_abs(vector signed short __a) {
106 return __builtin_altivec_vmaxsh(__a, -__a);
109 static vector signed int __ATTRS_o_ai vec_abs(vector signed int __a) {
110 return __builtin_altivec_vmaxsw(__a, -__a);
113 static vector float __ATTRS_o_ai vec_abs(vector float __a) {
114 vector unsigned int __res =
115 (vector unsigned int)__a & (vector unsigned int)(0x7FFFFFFF);
116 return (vector float)__res;
121 #define __builtin_altivec_abss_v16qi vec_abss
122 #define __builtin_altivec_abss_v8hi vec_abss
123 #define __builtin_altivec_abss_v4si vec_abss
125 static vector signed char __ATTRS_o_ai vec_abss(vector signed char __a) {
126 return __builtin_altivec_vmaxsb(
127 __a, __builtin_altivec_vsubsbs((vector signed char)(0), __a));
130 static vector signed short __ATTRS_o_ai vec_abss(vector signed short __a) {
131 return __builtin_altivec_vmaxsh(
132 __a, __builtin_altivec_vsubshs((vector signed short)(0), __a));
135 static vector signed int __ATTRS_o_ai vec_abss(vector signed int __a) {
136 return __builtin_altivec_vmaxsw(
137 __a, __builtin_altivec_vsubsws((vector signed int)(0), __a));
142 static vector signed char __ATTRS_o_ai vec_add(vector signed char __a,
143 vector signed char __b) {
147 static vector signed char __ATTRS_o_ai vec_add(vector bool char __a,
148 vector signed char __b) {
149 return (vector signed char)__a + __b;
152 static vector signed char __ATTRS_o_ai vec_add(vector signed char __a,
153 vector bool char __b) {
154 return __a + (vector signed char)__b;
157 static vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a,
158 vector unsigned char __b) {
162 static vector unsigned char __ATTRS_o_ai vec_add(vector bool char __a,
163 vector unsigned char __b) {
164 return (vector unsigned char)__a + __b;
167 static vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a,
168 vector bool char __b) {
169 return __a + (vector unsigned char)__b;
172 static vector short __ATTRS_o_ai vec_add(vector short __a, vector short __b) {
176 static vector short __ATTRS_o_ai vec_add(vector bool short __a,
178 return (vector short)__a + __b;
181 static vector short __ATTRS_o_ai vec_add(vector short __a,
182 vector bool short __b) {
183 return __a + (vector short)__b;
186 static vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a,
187 vector unsigned short __b) {
191 static vector unsigned short __ATTRS_o_ai vec_add(vector bool short __a,
192 vector unsigned short __b) {
193 return (vector unsigned short)__a + __b;
196 static vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a,
197 vector bool short __b) {
198 return __a + (vector unsigned short)__b;
201 static vector int __ATTRS_o_ai vec_add(vector int __a, vector int __b) {
205 static vector int __ATTRS_o_ai vec_add(vector bool int __a, vector int __b) {
206 return (vector int)__a + __b;
209 static vector int __ATTRS_o_ai vec_add(vector int __a, vector bool int __b) {
210 return __a + (vector int)__b;
213 static vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a,
214 vector unsigned int __b) {
218 static vector unsigned int __ATTRS_o_ai vec_add(vector bool int __a,
219 vector unsigned int __b) {
220 return (vector unsigned int)__a + __b;
223 static vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a,
224 vector bool int __b) {
225 return __a + (vector unsigned int)__b;
228 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
229 static vector signed __int128 __ATTRS_o_ai vec_add(vector signed __int128 __a,
230 vector signed __int128 __b) {
234 static vector unsigned __int128 __ATTRS_o_ai
235 vec_add(vector unsigned __int128 __a, vector unsigned __int128 __b) {
238 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
240 static vector float __ATTRS_o_ai vec_add(vector float __a, vector float __b) {
246 #define __builtin_altivec_vaddubm vec_vaddubm
248 static vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a,
249 vector signed char __b) {
253 static vector signed char __ATTRS_o_ai vec_vaddubm(vector bool char __a,
254 vector signed char __b) {
255 return (vector signed char)__a + __b;
258 static vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a,
259 vector bool char __b) {
260 return __a + (vector signed char)__b;
263 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a,
264 vector unsigned char __b) {
268 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector bool char __a,
269 vector unsigned char __b) {
270 return (vector unsigned char)__a + __b;
273 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a,
274 vector bool char __b) {
275 return __a + (vector unsigned char)__b;
280 #define __builtin_altivec_vadduhm vec_vadduhm
282 static vector short __ATTRS_o_ai vec_vadduhm(vector short __a,
287 static vector short __ATTRS_o_ai vec_vadduhm(vector bool short __a,
289 return (vector short)__a + __b;
292 static vector short __ATTRS_o_ai vec_vadduhm(vector short __a,
293 vector bool short __b) {
294 return __a + (vector short)__b;
297 static vector unsigned short __ATTRS_o_ai
298 vec_vadduhm(vector unsigned short __a, vector unsigned short __b) {
302 static vector unsigned short __ATTRS_o_ai
303 vec_vadduhm(vector bool short __a, vector unsigned short __b) {
304 return (vector unsigned short)__a + __b;
307 static vector unsigned short __ATTRS_o_ai vec_vadduhm(vector unsigned short __a,
308 vector bool short __b) {
309 return __a + (vector unsigned short)__b;
314 #define __builtin_altivec_vadduwm vec_vadduwm
316 static vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector int __b) {
320 static vector int __ATTRS_o_ai vec_vadduwm(vector bool int __a,
322 return (vector int)__a + __b;
325 static vector int __ATTRS_o_ai vec_vadduwm(vector int __a,
326 vector bool int __b) {
327 return __a + (vector int)__b;
330 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a,
331 vector unsigned int __b) {
335 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector bool int __a,
336 vector unsigned int __b) {
337 return (vector unsigned int)__a + __b;
340 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a,
341 vector bool int __b) {
342 return __a + (vector unsigned int)__b;
347 #define __builtin_altivec_vaddfp vec_vaddfp
349 static vector float __attribute__((__always_inline__))
350 vec_vaddfp(vector float __a, vector float __b) {
356 static vector unsigned int __ATTRS_o_ai vec_addc(vector unsigned int __a,
357 vector unsigned int __b) {
358 return __builtin_altivec_vaddcuw(__a, __b);
361 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
362 static vector signed __int128 __ATTRS_o_ai
363 vec_addc(vector signed __int128 __a, vector signed __int128 __b) {
364 return __builtin_altivec_vaddcuq(__a, __b);
367 static vector unsigned __int128 __ATTRS_o_ai
368 vec_addc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
369 return __builtin_altivec_vaddcuq(__a, __b);
371 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
375 static vector unsigned int __attribute__((__always_inline__))
376 vec_vaddcuw(vector unsigned int __a, vector unsigned int __b) {
377 return __builtin_altivec_vaddcuw(__a, __b);
382 static vector signed char __ATTRS_o_ai vec_adds(vector signed char __a,
383 vector signed char __b) {
384 return __builtin_altivec_vaddsbs(__a, __b);
387 static vector signed char __ATTRS_o_ai vec_adds(vector bool char __a,
388 vector signed char __b) {
389 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
392 static vector signed char __ATTRS_o_ai vec_adds(vector signed char __a,
393 vector bool char __b) {
394 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
397 static vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a,
398 vector unsigned char __b) {
399 return __builtin_altivec_vaddubs(__a, __b);
402 static vector unsigned char __ATTRS_o_ai vec_adds(vector bool char __a,
403 vector unsigned char __b) {
404 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
407 static vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a,
408 vector bool char __b) {
409 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
412 static vector short __ATTRS_o_ai vec_adds(vector short __a, vector short __b) {
413 return __builtin_altivec_vaddshs(__a, __b);
416 static vector short __ATTRS_o_ai vec_adds(vector bool short __a,
418 return __builtin_altivec_vaddshs((vector short)__a, __b);
421 static vector short __ATTRS_o_ai vec_adds(vector short __a,
422 vector bool short __b) {
423 return __builtin_altivec_vaddshs(__a, (vector short)__b);
426 static vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a,
427 vector unsigned short __b) {
428 return __builtin_altivec_vadduhs(__a, __b);
431 static vector unsigned short __ATTRS_o_ai vec_adds(vector bool short __a,
432 vector unsigned short __b) {
433 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
436 static vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a,
437 vector bool short __b) {
438 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
441 static vector int __ATTRS_o_ai vec_adds(vector int __a, vector int __b) {
442 return __builtin_altivec_vaddsws(__a, __b);
445 static vector int __ATTRS_o_ai vec_adds(vector bool int __a, vector int __b) {
446 return __builtin_altivec_vaddsws((vector int)__a, __b);
449 static vector int __ATTRS_o_ai vec_adds(vector int __a, vector bool int __b) {
450 return __builtin_altivec_vaddsws(__a, (vector int)__b);
453 static vector unsigned int __ATTRS_o_ai vec_adds(vector unsigned int __a,
454 vector unsigned int __b) {
455 return __builtin_altivec_vadduws(__a, __b);
458 static vector unsigned int __ATTRS_o_ai vec_adds(vector bool int __a,
459 vector unsigned int __b) {
460 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
463 static vector unsigned int __ATTRS_o_ai vec_adds(vector unsigned int __a,
464 vector bool int __b) {
465 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
470 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a,
471 vector signed char __b) {
472 return __builtin_altivec_vaddsbs(__a, __b);
475 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector bool char __a,
476 vector signed char __b) {
477 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
480 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a,
481 vector bool char __b) {
482 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
487 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a,
488 vector unsigned char __b) {
489 return __builtin_altivec_vaddubs(__a, __b);
492 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector bool char __a,
493 vector unsigned char __b) {
494 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
497 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a,
498 vector bool char __b) {
499 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
504 static vector short __ATTRS_o_ai vec_vaddshs(vector short __a,
506 return __builtin_altivec_vaddshs(__a, __b);
509 static vector short __ATTRS_o_ai vec_vaddshs(vector bool short __a,
511 return __builtin_altivec_vaddshs((vector short)__a, __b);
514 static vector short __ATTRS_o_ai vec_vaddshs(vector short __a,
515 vector bool short __b) {
516 return __builtin_altivec_vaddshs(__a, (vector short)__b);
521 static vector unsigned short __ATTRS_o_ai
522 vec_vadduhs(vector unsigned short __a, vector unsigned short __b) {
523 return __builtin_altivec_vadduhs(__a, __b);
526 static vector unsigned short __ATTRS_o_ai
527 vec_vadduhs(vector bool short __a, vector unsigned short __b) {
528 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
531 static vector unsigned short __ATTRS_o_ai vec_vadduhs(vector unsigned short __a,
532 vector bool short __b) {
533 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
538 static vector int __ATTRS_o_ai vec_vaddsws(vector int __a, vector int __b) {
539 return __builtin_altivec_vaddsws(__a, __b);
542 static vector int __ATTRS_o_ai vec_vaddsws(vector bool int __a,
544 return __builtin_altivec_vaddsws((vector int)__a, __b);
547 static vector int __ATTRS_o_ai vec_vaddsws(vector int __a,
548 vector bool int __b) {
549 return __builtin_altivec_vaddsws(__a, (vector int)__b);
554 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a,
555 vector unsigned int __b) {
556 return __builtin_altivec_vadduws(__a, __b);
559 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector bool int __a,
560 vector unsigned int __b) {
561 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
564 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a,
565 vector bool int __b) {
566 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
569 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
572 static vector signed __int128 __ATTRS_o_ai
573 vec_vadduqm(vector signed __int128 __a, vector signed __int128 __b) {
577 static vector unsigned __int128 __ATTRS_o_ai
578 vec_vadduqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
584 static vector signed __int128 __ATTRS_o_ai
585 vec_vaddeuqm(vector signed __int128 __a, vector signed __int128 __b,
586 vector signed __int128 __c) {
587 return __builtin_altivec_vaddeuqm(__a, __b, __c);
590 static vector unsigned __int128 __ATTRS_o_ai
591 vec_vaddeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
592 vector unsigned __int128 __c) {
593 return __builtin_altivec_vaddeuqm(__a, __b, __c);
598 static vector signed __int128 __ATTRS_o_ai
599 vec_vaddcuq(vector signed __int128 __a, vector signed __int128 __b) {
600 return __builtin_altivec_vaddcuq(__a, __b);
603 static vector unsigned __int128 __ATTRS_o_ai
604 vec_vaddcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
605 return __builtin_altivec_vaddcuq(__a, __b);
610 static vector signed __int128 __ATTRS_o_ai
611 vec_vaddecuq(vector signed __int128 __a, vector signed __int128 __b,
612 vector signed __int128 __c) {
613 return __builtin_altivec_vaddecuq(__a, __b, __c);
616 static vector unsigned __int128 __ATTRS_o_ai
617 vec_vaddecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
618 vector unsigned __int128 __c) {
619 return __builtin_altivec_vaddecuq(__a, __b, __c);
621 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
625 #define __builtin_altivec_vand vec_and
627 static vector signed char __ATTRS_o_ai vec_and(vector signed char __a,
628 vector signed char __b) {
632 static vector signed char __ATTRS_o_ai vec_and(vector bool char __a,
633 vector signed char __b) {
634 return (vector signed char)__a & __b;
637 static vector signed char __ATTRS_o_ai vec_and(vector signed char __a,
638 vector bool char __b) {
639 return __a & (vector signed char)__b;
642 static vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a,
643 vector unsigned char __b) {
647 static vector unsigned char __ATTRS_o_ai vec_and(vector bool char __a,
648 vector unsigned char __b) {
649 return (vector unsigned char)__a & __b;
652 static vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a,
653 vector bool char __b) {
654 return __a & (vector unsigned char)__b;
657 static vector bool char __ATTRS_o_ai vec_and(vector bool char __a,
658 vector bool char __b) {
662 static vector short __ATTRS_o_ai vec_and(vector short __a, vector short __b) {
666 static vector short __ATTRS_o_ai vec_and(vector bool short __a,
668 return (vector short)__a & __b;
671 static vector short __ATTRS_o_ai vec_and(vector short __a,
672 vector bool short __b) {
673 return __a & (vector short)__b;
676 static vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a,
677 vector unsigned short __b) {
681 static vector unsigned short __ATTRS_o_ai vec_and(vector bool short __a,
682 vector unsigned short __b) {
683 return (vector unsigned short)__a & __b;
686 static vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a,
687 vector bool short __b) {
688 return __a & (vector unsigned short)__b;
691 static vector bool short __ATTRS_o_ai vec_and(vector bool short __a,
692 vector bool short __b) {
696 static vector int __ATTRS_o_ai vec_and(vector int __a, vector int __b) {
700 static vector int __ATTRS_o_ai vec_and(vector bool int __a, vector int __b) {
701 return (vector int)__a & __b;
704 static vector int __ATTRS_o_ai vec_and(vector int __a, vector bool int __b) {
705 return __a & (vector int)__b;
708 static vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a,
709 vector unsigned int __b) {
713 static vector unsigned int __ATTRS_o_ai vec_and(vector bool int __a,
714 vector unsigned int __b) {
715 return (vector unsigned int)__a & __b;
718 static vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a,
719 vector bool int __b) {
720 return __a & (vector unsigned int)__b;
723 static vector bool int __ATTRS_o_ai vec_and(vector bool int __a,
724 vector bool int __b) {
728 static vector float __ATTRS_o_ai vec_and(vector float __a, vector float __b) {
729 vector unsigned int __res =
730 (vector unsigned int)__a & (vector unsigned int)__b;
731 return (vector float)__res;
734 static vector float __ATTRS_o_ai vec_and(vector bool int __a,
736 vector unsigned int __res =
737 (vector unsigned int)__a & (vector unsigned int)__b;
738 return (vector float)__res;
741 static vector float __ATTRS_o_ai vec_and(vector float __a,
742 vector bool int __b) {
743 vector unsigned int __res =
744 (vector unsigned int)__a & (vector unsigned int)__b;
745 return (vector float)__res;
749 static vector signed long long __ATTRS_o_ai
750 vec_and(vector signed long long __a, vector signed long long __b) {
754 static vector signed long long __ATTRS_o_ai
755 vec_and(vector bool long long __a, vector signed long long __b) {
756 return (vector signed long long)__a & __b;
759 static vector signed long long __ATTRS_o_ai vec_and(vector signed long long __a,
760 vector bool long long __b) {
761 return __a & (vector signed long long)__b;
764 static vector unsigned long long __ATTRS_o_ai
765 vec_and(vector unsigned long long __a, vector unsigned long long __b) {
769 static vector unsigned long long __ATTRS_o_ai
770 vec_and(vector bool long long __a, vector unsigned long long __b) {
771 return (vector unsigned long long)__a & __b;
774 static vector unsigned long long __ATTRS_o_ai
775 vec_and(vector unsigned long long __a, vector bool long long __b) {
776 return __a & (vector unsigned long long)__b;
779 static vector bool long long __ATTRS_o_ai vec_and(vector bool long long __a,
780 vector bool long long __b) {
787 static vector signed char __ATTRS_o_ai vec_vand(vector signed char __a,
788 vector signed char __b) {
792 static vector signed char __ATTRS_o_ai vec_vand(vector bool char __a,
793 vector signed char __b) {
794 return (vector signed char)__a & __b;
797 static vector signed char __ATTRS_o_ai vec_vand(vector signed char __a,
798 vector bool char __b) {
799 return __a & (vector signed char)__b;
802 static vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a,
803 vector unsigned char __b) {
807 static vector unsigned char __ATTRS_o_ai vec_vand(vector bool char __a,
808 vector unsigned char __b) {
809 return (vector unsigned char)__a & __b;
812 static vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a,
813 vector bool char __b) {
814 return __a & (vector unsigned char)__b;
817 static vector bool char __ATTRS_o_ai vec_vand(vector bool char __a,
818 vector bool char __b) {
822 static vector short __ATTRS_o_ai vec_vand(vector short __a, vector short __b) {
826 static vector short __ATTRS_o_ai vec_vand(vector bool short __a,
828 return (vector short)__a & __b;
831 static vector short __ATTRS_o_ai vec_vand(vector short __a,
832 vector bool short __b) {
833 return __a & (vector short)__b;
836 static vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a,
837 vector unsigned short __b) {
841 static vector unsigned short __ATTRS_o_ai vec_vand(vector bool short __a,
842 vector unsigned short __b) {
843 return (vector unsigned short)__a & __b;
846 static vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a,
847 vector bool short __b) {
848 return __a & (vector unsigned short)__b;
851 static vector bool short __ATTRS_o_ai vec_vand(vector bool short __a,
852 vector bool short __b) {
856 static vector int __ATTRS_o_ai vec_vand(vector int __a, vector int __b) {
860 static vector int __ATTRS_o_ai vec_vand(vector bool int __a, vector int __b) {
861 return (vector int)__a & __b;
864 static vector int __ATTRS_o_ai vec_vand(vector int __a, vector bool int __b) {
865 return __a & (vector int)__b;
868 static vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a,
869 vector unsigned int __b) {
873 static vector unsigned int __ATTRS_o_ai vec_vand(vector bool int __a,
874 vector unsigned int __b) {
875 return (vector unsigned int)__a & __b;
878 static vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a,
879 vector bool int __b) {
880 return __a & (vector unsigned int)__b;
883 static vector bool int __ATTRS_o_ai vec_vand(vector bool int __a,
884 vector bool int __b) {
888 static vector float __ATTRS_o_ai vec_vand(vector float __a, vector float __b) {
889 vector unsigned int __res =
890 (vector unsigned int)__a & (vector unsigned int)__b;
891 return (vector float)__res;
894 static vector float __ATTRS_o_ai vec_vand(vector bool int __a,
896 vector unsigned int __res =
897 (vector unsigned int)__a & (vector unsigned int)__b;
898 return (vector float)__res;
901 static vector float __ATTRS_o_ai vec_vand(vector float __a,
902 vector bool int __b) {
903 vector unsigned int __res =
904 (vector unsigned int)__a & (vector unsigned int)__b;
905 return (vector float)__res;
909 static vector signed long long __ATTRS_o_ai
910 vec_vand(vector signed long long __a, vector signed long long __b) {
914 static vector signed long long __ATTRS_o_ai
915 vec_vand(vector bool long long __a, vector signed long long __b) {
916 return (vector signed long long)__a & __b;
919 static vector signed long long __ATTRS_o_ai
920 vec_vand(vector signed long long __a, vector bool long long __b) {
921 return __a & (vector signed long long)__b;
924 static vector unsigned long long __ATTRS_o_ai
925 vec_vand(vector unsigned long long __a, vector unsigned long long __b) {
929 static vector unsigned long long __ATTRS_o_ai
930 vec_vand(vector bool long long __a, vector unsigned long long __b) {
931 return (vector unsigned long long)__a & __b;
934 static vector unsigned long long __ATTRS_o_ai
935 vec_vand(vector unsigned long long __a, vector bool long long __b) {
936 return __a & (vector unsigned long long)__b;
939 static vector bool long long __ATTRS_o_ai vec_vand(vector bool long long __a,
940 vector bool long long __b) {
947 #define __builtin_altivec_vandc vec_andc
949 static vector signed char __ATTRS_o_ai vec_andc(vector signed char __a,
950 vector signed char __b) {
954 static vector signed char __ATTRS_o_ai vec_andc(vector bool char __a,
955 vector signed char __b) {
956 return (vector signed char)__a & ~__b;
959 static vector signed char __ATTRS_o_ai vec_andc(vector signed char __a,
960 vector bool char __b) {
961 return __a & ~(vector signed char)__b;
964 static vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a,
965 vector unsigned char __b) {
969 static vector unsigned char __ATTRS_o_ai vec_andc(vector bool char __a,
970 vector unsigned char __b) {
971 return (vector unsigned char)__a & ~__b;
974 static vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a,
975 vector bool char __b) {
976 return __a & ~(vector unsigned char)__b;
979 static vector bool char __ATTRS_o_ai vec_andc(vector bool char __a,
980 vector bool char __b) {
984 static vector short __ATTRS_o_ai vec_andc(vector short __a, vector short __b) {
988 static vector short __ATTRS_o_ai vec_andc(vector bool short __a,
990 return (vector short)__a & ~__b;
993 static vector short __ATTRS_o_ai vec_andc(vector short __a,
994 vector bool short __b) {
995 return __a & ~(vector short)__b;
998 static vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a,
999 vector unsigned short __b) {
1003 static vector unsigned short __ATTRS_o_ai vec_andc(vector bool short __a,
1004 vector unsigned short __b) {
1005 return (vector unsigned short)__a & ~__b;
1008 static vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a,
1009 vector bool short __b) {
1010 return __a & ~(vector unsigned short)__b;
1013 static vector bool short __ATTRS_o_ai vec_andc(vector bool short __a,
1014 vector bool short __b) {
1018 static vector int __ATTRS_o_ai vec_andc(vector int __a, vector int __b) {
1022 static vector int __ATTRS_o_ai vec_andc(vector bool int __a, vector int __b) {
1023 return (vector int)__a & ~__b;
1026 static vector int __ATTRS_o_ai vec_andc(vector int __a, vector bool int __b) {
1027 return __a & ~(vector int)__b;
1030 static vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a,
1031 vector unsigned int __b) {
1035 static vector unsigned int __ATTRS_o_ai vec_andc(vector bool int __a,
1036 vector unsigned int __b) {
1037 return (vector unsigned int)__a & ~__b;
1040 static vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a,
1041 vector bool int __b) {
1042 return __a & ~(vector unsigned int)__b;
1045 static vector bool int __ATTRS_o_ai vec_andc(vector bool int __a,
1046 vector bool int __b) {
1050 static vector float __ATTRS_o_ai vec_andc(vector float __a, vector float __b) {
1051 vector unsigned int __res =
1052 (vector unsigned int)__a & ~(vector unsigned int)__b;
1053 return (vector float)__res;
1056 static vector float __ATTRS_o_ai vec_andc(vector bool int __a,
1058 vector unsigned int __res =
1059 (vector unsigned int)__a & ~(vector unsigned int)__b;
1060 return (vector float)__res;
1063 static vector float __ATTRS_o_ai vec_andc(vector float __a,
1064 vector bool int __b) {
1065 vector unsigned int __res =
1066 (vector unsigned int)__a & ~(vector unsigned int)__b;
1067 return (vector float)__res;
1071 static vector signed long long __ATTRS_o_ai
1072 vec_andc(vector signed long long __a, vector signed long long __b) {
1076 static vector signed long long __ATTRS_o_ai
1077 vec_andc(vector bool long long __a, vector signed long long __b) {
1078 return (vector signed long long)__a & ~__b;
1081 static vector signed long long __ATTRS_o_ai
1082 vec_andc(vector signed long long __a, vector bool long long __b) {
1083 return __a & ~(vector signed long long)__b;
1086 static vector unsigned long long __ATTRS_o_ai
1087 vec_andc(vector unsigned long long __a, vector unsigned long long __b) {
1091 static vector unsigned long long __ATTRS_o_ai
1092 vec_andc(vector bool long long __a, vector unsigned long long __b) {
1093 return (vector unsigned long long)__a & ~__b;
1096 static vector unsigned long long __ATTRS_o_ai
1097 vec_andc(vector unsigned long long __a, vector bool long long __b) {
1098 return __a & ~(vector unsigned long long)__b;
1101 static vector bool long long __ATTRS_o_ai vec_andc(vector bool long long __a,
1102 vector bool long long __b) {
1109 static vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a,
1110 vector signed char __b) {
1114 static vector signed char __ATTRS_o_ai vec_vandc(vector bool char __a,
1115 vector signed char __b) {
1116 return (vector signed char)__a & ~__b;
1119 static vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a,
1120 vector bool char __b) {
1121 return __a & ~(vector signed char)__b;
1124 static vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a,
1125 vector unsigned char __b) {
1129 static vector unsigned char __ATTRS_o_ai vec_vandc(vector bool char __a,
1130 vector unsigned char __b) {
1131 return (vector unsigned char)__a & ~__b;
1134 static vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a,
1135 vector bool char __b) {
1136 return __a & ~(vector unsigned char)__b;
1139 static vector bool char __ATTRS_o_ai vec_vandc(vector bool char __a,
1140 vector bool char __b) {
1144 static vector short __ATTRS_o_ai vec_vandc(vector short __a, vector short __b) {
1148 static vector short __ATTRS_o_ai vec_vandc(vector bool short __a,
1150 return (vector short)__a & ~__b;
1153 static vector short __ATTRS_o_ai vec_vandc(vector short __a,
1154 vector bool short __b) {
1155 return __a & ~(vector short)__b;
1158 static vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a,
1159 vector unsigned short __b) {
1163 static vector unsigned short __ATTRS_o_ai vec_vandc(vector bool short __a,
1164 vector unsigned short __b) {
1165 return (vector unsigned short)__a & ~__b;
1168 static vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a,
1169 vector bool short __b) {
1170 return __a & ~(vector unsigned short)__b;
1173 static vector bool short __ATTRS_o_ai vec_vandc(vector bool short __a,
1174 vector bool short __b) {
1178 static vector int __ATTRS_o_ai vec_vandc(vector int __a, vector int __b) {
1182 static vector int __ATTRS_o_ai vec_vandc(vector bool int __a, vector int __b) {
1183 return (vector int)__a & ~__b;
1186 static vector int __ATTRS_o_ai vec_vandc(vector int __a, vector bool int __b) {
1187 return __a & ~(vector int)__b;
1190 static vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a,
1191 vector unsigned int __b) {
1195 static vector unsigned int __ATTRS_o_ai vec_vandc(vector bool int __a,
1196 vector unsigned int __b) {
1197 return (vector unsigned int)__a & ~__b;
1200 static vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a,
1201 vector bool int __b) {
1202 return __a & ~(vector unsigned int)__b;
1205 static vector bool int __ATTRS_o_ai vec_vandc(vector bool int __a,
1206 vector bool int __b) {
1210 static vector float __ATTRS_o_ai vec_vandc(vector float __a, vector float __b) {
1211 vector unsigned int __res =
1212 (vector unsigned int)__a & ~(vector unsigned int)__b;
1213 return (vector float)__res;
1216 static vector float __ATTRS_o_ai vec_vandc(vector bool int __a,
1218 vector unsigned int __res =
1219 (vector unsigned int)__a & ~(vector unsigned int)__b;
1220 return (vector float)__res;
1223 static vector float __ATTRS_o_ai vec_vandc(vector float __a,
1224 vector bool int __b) {
1225 vector unsigned int __res =
1226 (vector unsigned int)__a & ~(vector unsigned int)__b;
1227 return (vector float)__res;
1231 static vector signed long long __ATTRS_o_ai
1232 vec_vandc(vector signed long long __a, vector signed long long __b) {
1236 static vector signed long long __ATTRS_o_ai
1237 vec_vandc(vector bool long long __a, vector signed long long __b) {
1238 return (vector signed long long)__a & ~__b;
1241 static vector signed long long __ATTRS_o_ai
1242 vec_vandc(vector signed long long __a, vector bool long long __b) {
1243 return __a & ~(vector signed long long)__b;
1246 static vector unsigned long long __ATTRS_o_ai
1247 vec_vandc(vector unsigned long long __a, vector unsigned long long __b) {
1251 static vector unsigned long long __ATTRS_o_ai
1252 vec_vandc(vector bool long long __a, vector unsigned long long __b) {
1253 return (vector unsigned long long)__a & ~__b;
1256 static vector unsigned long long __ATTRS_o_ai
1257 vec_vandc(vector unsigned long long __a, vector bool long long __b) {
1258 return __a & ~(vector unsigned long long)__b;
1261 static vector bool long long __ATTRS_o_ai vec_vandc(vector bool long long __a,
1262 vector bool long long __b) {
1269 static vector signed char __ATTRS_o_ai vec_avg(vector signed char __a,
1270 vector signed char __b) {
1271 return __builtin_altivec_vavgsb(__a, __b);
1274 static vector unsigned char __ATTRS_o_ai vec_avg(vector unsigned char __a,
1275 vector unsigned char __b) {
1276 return __builtin_altivec_vavgub(__a, __b);
1279 static vector short __ATTRS_o_ai vec_avg(vector short __a, vector short __b) {
1280 return __builtin_altivec_vavgsh(__a, __b);
1283 static vector unsigned short __ATTRS_o_ai vec_avg(vector unsigned short __a,
1284 vector unsigned short __b) {
1285 return __builtin_altivec_vavguh(__a, __b);
1288 static vector int __ATTRS_o_ai vec_avg(vector int __a, vector int __b) {
1289 return __builtin_altivec_vavgsw(__a, __b);
1292 static vector unsigned int __ATTRS_o_ai vec_avg(vector unsigned int __a,
1293 vector unsigned int __b) {
1294 return __builtin_altivec_vavguw(__a, __b);
1299 static vector signed char __attribute__((__always_inline__))
1300 vec_vavgsb(vector signed char __a, vector signed char __b) {
1301 return __builtin_altivec_vavgsb(__a, __b);
1306 static vector unsigned char __attribute__((__always_inline__))
1307 vec_vavgub(vector unsigned char __a, vector unsigned char __b) {
1308 return __builtin_altivec_vavgub(__a, __b);
1313 static vector short __attribute__((__always_inline__))
1314 vec_vavgsh(vector short __a, vector short __b) {
1315 return __builtin_altivec_vavgsh(__a, __b);
1320 static vector unsigned short __attribute__((__always_inline__))
1321 vec_vavguh(vector unsigned short __a, vector unsigned short __b) {
1322 return __builtin_altivec_vavguh(__a, __b);
1327 static vector int __attribute__((__always_inline__))
1328 vec_vavgsw(vector int __a, vector int __b) {
1329 return __builtin_altivec_vavgsw(__a, __b);
1334 static vector unsigned int __attribute__((__always_inline__))
1335 vec_vavguw(vector unsigned int __a, vector unsigned int __b) {
1336 return __builtin_altivec_vavguw(__a, __b);
1341 static vector float __attribute__((__always_inline__))
1342 vec_ceil(vector float __a) {
1343 return __builtin_altivec_vrfip(__a);
1348 static vector float __attribute__((__always_inline__))
1349 vec_vrfip(vector float __a) {
1350 return __builtin_altivec_vrfip(__a);
1355 static vector int __attribute__((__always_inline__))
1356 vec_cmpb(vector float __a, vector float __b) {
1357 return __builtin_altivec_vcmpbfp(__a, __b);
1362 static vector int __attribute__((__always_inline__))
1363 vec_vcmpbfp(vector float __a, vector float __b) {
1364 return __builtin_altivec_vcmpbfp(__a, __b);
1369 static vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a,
1370 vector signed char __b) {
1371 return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a,
1375 static vector bool char __ATTRS_o_ai vec_cmpeq(vector unsigned char __a,
1376 vector unsigned char __b) {
1377 return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a,
1381 static vector bool short __ATTRS_o_ai vec_cmpeq(vector short __a,
1383 return (vector bool short)__builtin_altivec_vcmpequh(__a, __b);
1386 static vector bool short __ATTRS_o_ai vec_cmpeq(vector unsigned short __a,
1387 vector unsigned short __b) {
1388 return (vector bool short)__builtin_altivec_vcmpequh((vector short)__a,
1392 static vector bool int __ATTRS_o_ai vec_cmpeq(vector int __a, vector int __b) {
1393 return (vector bool int)__builtin_altivec_vcmpequw(__a, __b);
1396 static vector bool int __ATTRS_o_ai vec_cmpeq(vector unsigned int __a,
1397 vector unsigned int __b) {
1398 return (vector bool int)__builtin_altivec_vcmpequw((vector int)__a,
1402 #ifdef __POWER8_VECTOR__
1403 static vector bool long long __ATTRS_o_ai
1404 vec_cmpeq(vector signed long long __a, vector signed long long __b) {
1405 return (vector bool long long)__builtin_altivec_vcmpequd(__a, __b);
1408 static vector bool long long __ATTRS_o_ai
1409 vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) {
1410 return (vector bool long long)__builtin_altivec_vcmpequd(
1411 (vector long long)__a, (vector long long)__b);
1415 static vector bool int __ATTRS_o_ai vec_cmpeq(vector float __a,
1417 return (vector bool int)__builtin_altivec_vcmpeqfp(__a, __b);
1422 static vector bool int __attribute__((__always_inline__))
1423 vec_cmpge(vector float __a, vector float __b) {
1424 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1429 static vector bool int __attribute__((__always_inline__))
1430 vec_vcmpgefp(vector float __a, vector float __b) {
1431 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1436 static vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a,
1437 vector signed char __b) {
1438 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1441 static vector bool char __ATTRS_o_ai vec_cmpgt(vector unsigned char __a,
1442 vector unsigned char __b) {
1443 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1446 static vector bool short __ATTRS_o_ai vec_cmpgt(vector short __a,
1448 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1451 static vector bool short __ATTRS_o_ai vec_cmpgt(vector unsigned short __a,
1452 vector unsigned short __b) {
1453 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1456 static vector bool int __ATTRS_o_ai vec_cmpgt(vector int __a, vector int __b) {
1457 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1460 static vector bool int __ATTRS_o_ai vec_cmpgt(vector unsigned int __a,
1461 vector unsigned int __b) {
1462 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1465 #ifdef __POWER8_VECTOR__
1466 static vector bool long long __ATTRS_o_ai
1467 vec_cmpgt(vector signed long long __a, vector signed long long __b) {
1468 return (vector bool long long)__builtin_altivec_vcmpgtsd(__a, __b);
1471 static vector bool long long __ATTRS_o_ai
1472 vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) {
1473 return (vector bool long long)__builtin_altivec_vcmpgtud(__a, __b);
1477 static vector bool int __ATTRS_o_ai vec_cmpgt(vector float __a,
1479 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1484 static vector bool char __attribute__((__always_inline__))
1485 vec_vcmpgtsb(vector signed char __a, vector signed char __b) {
1486 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1491 static vector bool char __attribute__((__always_inline__))
1492 vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b) {
1493 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1498 static vector bool short __attribute__((__always_inline__))
1499 vec_vcmpgtsh(vector short __a, vector short __b) {
1500 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1505 static vector bool short __attribute__((__always_inline__))
1506 vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b) {
1507 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1512 static vector bool int __attribute__((__always_inline__))
1513 vec_vcmpgtsw(vector int __a, vector int __b) {
1514 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1519 static vector bool int __attribute__((__always_inline__))
1520 vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b) {
1521 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1526 static vector bool int __attribute__((__always_inline__))
1527 vec_vcmpgtfp(vector float __a, vector float __b) {
1528 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1533 static vector bool int __attribute__((__always_inline__))
1534 vec_cmple(vector float __a, vector float __b) {
1535 return (vector bool int)__builtin_altivec_vcmpgefp(__b, __a);
1540 static vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a,
1541 vector signed char __b) {
1542 return (vector bool char)__builtin_altivec_vcmpgtsb(__b, __a);
1545 static vector bool char __ATTRS_o_ai vec_cmplt(vector unsigned char __a,
1546 vector unsigned char __b) {
1547 return (vector bool char)__builtin_altivec_vcmpgtub(__b, __a);
1550 static vector bool short __ATTRS_o_ai vec_cmplt(vector short __a,
1552 return (vector bool short)__builtin_altivec_vcmpgtsh(__b, __a);
1555 static vector bool short __ATTRS_o_ai vec_cmplt(vector unsigned short __a,
1556 vector unsigned short __b) {
1557 return (vector bool short)__builtin_altivec_vcmpgtuh(__b, __a);
1560 static vector bool int __ATTRS_o_ai vec_cmplt(vector int __a, vector int __b) {
1561 return (vector bool int)__builtin_altivec_vcmpgtsw(__b, __a);
1564 static vector bool int __ATTRS_o_ai vec_cmplt(vector unsigned int __a,
1565 vector unsigned int __b) {
1566 return (vector bool int)__builtin_altivec_vcmpgtuw(__b, __a);
1569 static vector bool int __ATTRS_o_ai vec_cmplt(vector float __a,
1571 return (vector bool int)__builtin_altivec_vcmpgtfp(__b, __a);
1576 static vector float __ATTRS_o_ai vec_ctf(vector int __a, int __b) {
1577 return __builtin_altivec_vcfsx(__a, __b);
1580 static vector float __ATTRS_o_ai vec_ctf(vector unsigned int __a, int __b) {
1581 return __builtin_altivec_vcfux((vector int)__a, __b);
1586 static vector float __attribute__((__always_inline__))
1587 vec_vcfsx(vector int __a, int __b) {
1588 return __builtin_altivec_vcfsx(__a, __b);
1593 static vector float __attribute__((__always_inline__))
1594 vec_vcfux(vector unsigned int __a, int __b) {
1595 return __builtin_altivec_vcfux((vector int)__a, __b);
1600 static vector int __attribute__((__always_inline__))
1601 vec_cts(vector float __a, int __b) {
1602 return __builtin_altivec_vctsxs(__a, __b);
1607 static vector int __attribute__((__always_inline__))
1608 vec_vctsxs(vector float __a, int __b) {
1609 return __builtin_altivec_vctsxs(__a, __b);
1614 static vector unsigned int __attribute__((__always_inline__))
1615 vec_ctu(vector float __a, int __b) {
1616 return __builtin_altivec_vctuxs(__a, __b);
1621 static vector unsigned int __attribute__((__always_inline__))
1622 vec_vctuxs(vector float __a, int __b) {
1623 return __builtin_altivec_vctuxs(__a, __b);
1628 static vector float __ATTRS_o_ai vec_div(vector float __a, vector float __b) {
1629 return __builtin_vsx_xvdivsp(__a, __b);
1632 static vector double __ATTRS_o_ai vec_div(vector double __a,
1633 vector double __b) {
1634 return __builtin_vsx_xvdivdp(__a, __b);
1640 static void __attribute__((__always_inline__)) vec_dss(int __a) {
1641 __builtin_altivec_dss(__a);
1646 static void __attribute__((__always_inline__)) vec_dssall(void) {
1647 __builtin_altivec_dssall();
1652 static void __attribute__((__always_inline__))
1653 vec_dst(const void *__a, int __b, int __c) {
1654 __builtin_altivec_dst(__a, __b, __c);
1659 static void __attribute__((__always_inline__))
1660 vec_dstst(const void *__a, int __b, int __c) {
1661 __builtin_altivec_dstst(__a, __b, __c);
1666 static void __attribute__((__always_inline__))
1667 vec_dststt(const void *__a, int __b, int __c) {
1668 __builtin_altivec_dststt(__a, __b, __c);
1673 static void __attribute__((__always_inline__))
1674 vec_dstt(const void *__a, int __b, int __c) {
1675 __builtin_altivec_dstt(__a, __b, __c);
1680 static vector float __attribute__((__always_inline__))
1681 vec_expte(vector float __a) {
1682 return __builtin_altivec_vexptefp(__a);
1687 static vector float __attribute__((__always_inline__))
1688 vec_vexptefp(vector float __a) {
1689 return __builtin_altivec_vexptefp(__a);
1694 static vector float __attribute__((__always_inline__))
1695 vec_floor(vector float __a) {
1696 return __builtin_altivec_vrfim(__a);
1701 static vector float __attribute__((__always_inline__))
1702 vec_vrfim(vector float __a) {
1703 return __builtin_altivec_vrfim(__a);
1708 static vector signed char __ATTRS_o_ai vec_ld(int __a,
1709 const vector signed char *__b) {
1710 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1713 static vector signed char __ATTRS_o_ai vec_ld(int __a, const signed char *__b) {
1714 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1717 static vector unsigned char __ATTRS_o_ai
1718 vec_ld(int __a, const vector unsigned char *__b) {
1719 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1722 static vector unsigned char __ATTRS_o_ai vec_ld(int __a,
1723 const unsigned char *__b) {
1724 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1727 static vector bool char __ATTRS_o_ai vec_ld(int __a,
1728 const vector bool char *__b) {
1729 return (vector bool char)__builtin_altivec_lvx(__a, __b);
1732 static vector short __ATTRS_o_ai vec_ld(int __a, const vector short *__b) {
1733 return (vector short)__builtin_altivec_lvx(__a, __b);
1736 static vector short __ATTRS_o_ai vec_ld(int __a, const short *__b) {
1737 return (vector short)__builtin_altivec_lvx(__a, __b);
1740 static vector unsigned short __ATTRS_o_ai
1741 vec_ld(int __a, const vector unsigned short *__b) {
1742 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1745 static vector unsigned short __ATTRS_o_ai vec_ld(int __a,
1746 const unsigned short *__b) {
1747 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1750 static vector bool short __ATTRS_o_ai vec_ld(int __a,
1751 const vector bool short *__b) {
1752 return (vector bool short)__builtin_altivec_lvx(__a, __b);
1755 static vector pixel __ATTRS_o_ai vec_ld(int __a, const vector pixel *__b) {
1756 return (vector pixel)__builtin_altivec_lvx(__a, __b);
1759 static vector int __ATTRS_o_ai vec_ld(int __a, const vector int *__b) {
1760 return (vector int)__builtin_altivec_lvx(__a, __b);
1763 static vector int __ATTRS_o_ai vec_ld(int __a, const int *__b) {
1764 return (vector int)__builtin_altivec_lvx(__a, __b);
1767 static vector unsigned int __ATTRS_o_ai vec_ld(int __a,
1768 const vector unsigned int *__b) {
1769 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1772 static vector unsigned int __ATTRS_o_ai vec_ld(int __a,
1773 const unsigned int *__b) {
1774 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1777 static vector bool int __ATTRS_o_ai vec_ld(int __a,
1778 const vector bool int *__b) {
1779 return (vector bool int)__builtin_altivec_lvx(__a, __b);
1782 static vector float __ATTRS_o_ai vec_ld(int __a, const vector float *__b) {
1783 return (vector float)__builtin_altivec_lvx(__a, __b);
1786 static vector float __ATTRS_o_ai vec_ld(int __a, const float *__b) {
1787 return (vector float)__builtin_altivec_lvx(__a, __b);
1792 static vector signed char __ATTRS_o_ai vec_lvx(int __a,
1793 const vector signed char *__b) {
1794 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1797 static vector signed char __ATTRS_o_ai vec_lvx(int __a,
1798 const signed char *__b) {
1799 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1802 static vector unsigned char __ATTRS_o_ai
1803 vec_lvx(int __a, const vector unsigned char *__b) {
1804 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1807 static vector unsigned char __ATTRS_o_ai vec_lvx(int __a,
1808 const unsigned char *__b) {
1809 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1812 static vector bool char __ATTRS_o_ai vec_lvx(int __a,
1813 const vector bool char *__b) {
1814 return (vector bool char)__builtin_altivec_lvx(__a, __b);
1817 static vector short __ATTRS_o_ai vec_lvx(int __a, const vector short *__b) {
1818 return (vector short)__builtin_altivec_lvx(__a, __b);
1821 static vector short __ATTRS_o_ai vec_lvx(int __a, const short *__b) {
1822 return (vector short)__builtin_altivec_lvx(__a, __b);
1825 static vector unsigned short __ATTRS_o_ai
1826 vec_lvx(int __a, const vector unsigned short *__b) {
1827 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1830 static vector unsigned short __ATTRS_o_ai vec_lvx(int __a,
1831 const unsigned short *__b) {
1832 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1835 static vector bool short __ATTRS_o_ai vec_lvx(int __a,
1836 const vector bool short *__b) {
1837 return (vector bool short)__builtin_altivec_lvx(__a, __b);
1840 static vector pixel __ATTRS_o_ai vec_lvx(int __a, const vector pixel *__b) {
1841 return (vector pixel)__builtin_altivec_lvx(__a, __b);
1844 static vector int __ATTRS_o_ai vec_lvx(int __a, const vector int *__b) {
1845 return (vector int)__builtin_altivec_lvx(__a, __b);
1848 static vector int __ATTRS_o_ai vec_lvx(int __a, const int *__b) {
1849 return (vector int)__builtin_altivec_lvx(__a, __b);
1852 static vector unsigned int __ATTRS_o_ai
1853 vec_lvx(int __a, const vector unsigned int *__b) {
1854 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1857 static vector unsigned int __ATTRS_o_ai vec_lvx(int __a,
1858 const unsigned int *__b) {
1859 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1862 static vector bool int __ATTRS_o_ai vec_lvx(int __a,
1863 const vector bool int *__b) {
1864 return (vector bool int)__builtin_altivec_lvx(__a, __b);
1867 static vector float __ATTRS_o_ai vec_lvx(int __a, const vector float *__b) {
1868 return (vector float)__builtin_altivec_lvx(__a, __b);
1871 static vector float __ATTRS_o_ai vec_lvx(int __a, const float *__b) {
1872 return (vector float)__builtin_altivec_lvx(__a, __b);
1877 static vector signed char __ATTRS_o_ai vec_lde(int __a,
1878 const signed char *__b) {
1879 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
1882 static vector unsigned char __ATTRS_o_ai vec_lde(int __a,
1883 const unsigned char *__b) {
1884 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
1887 static vector short __ATTRS_o_ai vec_lde(int __a, const short *__b) {
1888 return (vector short)__builtin_altivec_lvehx(__a, __b);
1891 static vector unsigned short __ATTRS_o_ai vec_lde(int __a,
1892 const unsigned short *__b) {
1893 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
1896 static vector int __ATTRS_o_ai vec_lde(int __a, const int *__b) {
1897 return (vector int)__builtin_altivec_lvewx(__a, __b);
1900 static vector unsigned int __ATTRS_o_ai vec_lde(int __a,
1901 const unsigned int *__b) {
1902 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
1905 static vector float __ATTRS_o_ai vec_lde(int __a, const float *__b) {
1906 return (vector float)__builtin_altivec_lvewx(__a, __b);
1911 static vector signed char __ATTRS_o_ai vec_lvebx(int __a,
1912 const signed char *__b) {
1913 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
1916 static vector unsigned char __ATTRS_o_ai vec_lvebx(int __a,
1917 const unsigned char *__b) {
1918 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
1923 static vector short __ATTRS_o_ai vec_lvehx(int __a, const short *__b) {
1924 return (vector short)__builtin_altivec_lvehx(__a, __b);
1927 static vector unsigned short __ATTRS_o_ai vec_lvehx(int __a,
1928 const unsigned short *__b) {
1929 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
1934 static vector int __ATTRS_o_ai vec_lvewx(int __a, const int *__b) {
1935 return (vector int)__builtin_altivec_lvewx(__a, __b);
1938 static vector unsigned int __ATTRS_o_ai vec_lvewx(int __a,
1939 const unsigned int *__b) {
1940 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
1943 static vector float __ATTRS_o_ai vec_lvewx(int __a, const float *__b) {
1944 return (vector float)__builtin_altivec_lvewx(__a, __b);
1949 static vector signed char __ATTRS_o_ai vec_ldl(int __a,
1950 const vector signed char *__b) {
1951 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
1954 static vector signed char __ATTRS_o_ai vec_ldl(int __a,
1955 const signed char *__b) {
1956 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
1959 static vector unsigned char __ATTRS_o_ai
1960 vec_ldl(int __a, const vector unsigned char *__b) {
1961 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
1964 static vector unsigned char __ATTRS_o_ai vec_ldl(int __a,
1965 const unsigned char *__b) {
1966 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
1969 static vector bool char __ATTRS_o_ai vec_ldl(int __a,
1970 const vector bool char *__b) {
1971 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
1974 static vector short __ATTRS_o_ai vec_ldl(int __a, const vector short *__b) {
1975 return (vector short)__builtin_altivec_lvxl(__a, __b);
1978 static vector short __ATTRS_o_ai vec_ldl(int __a, const short *__b) {
1979 return (vector short)__builtin_altivec_lvxl(__a, __b);
1982 static vector unsigned short __ATTRS_o_ai
1983 vec_ldl(int __a, const vector unsigned short *__b) {
1984 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
1987 static vector unsigned short __ATTRS_o_ai vec_ldl(int __a,
1988 const unsigned short *__b) {
1989 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
1992 static vector bool short __ATTRS_o_ai vec_ldl(int __a,
1993 const vector bool short *__b) {
1994 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
1997 static vector pixel __ATTRS_o_ai vec_ldl(int __a, const vector pixel *__b) {
1998 return (vector pixel short)__builtin_altivec_lvxl(__a, __b);
2001 static vector int __ATTRS_o_ai vec_ldl(int __a, const vector int *__b) {
2002 return (vector int)__builtin_altivec_lvxl(__a, __b);
2005 static vector int __ATTRS_o_ai vec_ldl(int __a, const int *__b) {
2006 return (vector int)__builtin_altivec_lvxl(__a, __b);
2009 static vector unsigned int __ATTRS_o_ai
2010 vec_ldl(int __a, const vector unsigned int *__b) {
2011 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2014 static vector unsigned int __ATTRS_o_ai vec_ldl(int __a,
2015 const unsigned int *__b) {
2016 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2019 static vector bool int __ATTRS_o_ai vec_ldl(int __a,
2020 const vector bool int *__b) {
2021 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2024 static vector float __ATTRS_o_ai vec_ldl(int __a, const vector float *__b) {
2025 return (vector float)__builtin_altivec_lvxl(__a, __b);
2028 static vector float __ATTRS_o_ai vec_ldl(int __a, const float *__b) {
2029 return (vector float)__builtin_altivec_lvxl(__a, __b);
2034 static vector signed char __ATTRS_o_ai vec_lvxl(int __a,
2035 const vector signed char *__b) {
2036 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2039 static vector signed char __ATTRS_o_ai vec_lvxl(int __a,
2040 const signed char *__b) {
2041 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2044 static vector unsigned char __ATTRS_o_ai
2045 vec_lvxl(int __a, const vector unsigned char *__b) {
2046 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2049 static vector unsigned char __ATTRS_o_ai vec_lvxl(int __a,
2050 const unsigned char *__b) {
2051 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2054 static vector bool char __ATTRS_o_ai vec_lvxl(int __a,
2055 const vector bool char *__b) {
2056 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2059 static vector short __ATTRS_o_ai vec_lvxl(int __a, const vector short *__b) {
2060 return (vector short)__builtin_altivec_lvxl(__a, __b);
2063 static vector short __ATTRS_o_ai vec_lvxl(int __a, const short *__b) {
2064 return (vector short)__builtin_altivec_lvxl(__a, __b);
2067 static vector unsigned short __ATTRS_o_ai
2068 vec_lvxl(int __a, const vector unsigned short *__b) {
2069 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2072 static vector unsigned short __ATTRS_o_ai vec_lvxl(int __a,
2073 const unsigned short *__b) {
2074 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2077 static vector bool short __ATTRS_o_ai vec_lvxl(int __a,
2078 const vector bool short *__b) {
2079 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2082 static vector pixel __ATTRS_o_ai vec_lvxl(int __a, const vector pixel *__b) {
2083 return (vector pixel)__builtin_altivec_lvxl(__a, __b);
2086 static vector int __ATTRS_o_ai vec_lvxl(int __a, const vector int *__b) {
2087 return (vector int)__builtin_altivec_lvxl(__a, __b);
2090 static vector int __ATTRS_o_ai vec_lvxl(int __a, const int *__b) {
2091 return (vector int)__builtin_altivec_lvxl(__a, __b);
2094 static vector unsigned int __ATTRS_o_ai
2095 vec_lvxl(int __a, const vector unsigned int *__b) {
2096 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2099 static vector unsigned int __ATTRS_o_ai vec_lvxl(int __a,
2100 const unsigned int *__b) {
2101 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2104 static vector bool int __ATTRS_o_ai vec_lvxl(int __a,
2105 const vector bool int *__b) {
2106 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2109 static vector float __ATTRS_o_ai vec_lvxl(int __a, const vector float *__b) {
2110 return (vector float)__builtin_altivec_lvxl(__a, __b);
2113 static vector float __ATTRS_o_ai vec_lvxl(int __a, const float *__b) {
2114 return (vector float)__builtin_altivec_lvxl(__a, __b);
2119 static vector float __attribute__((__always_inline__))
2120 vec_loge(vector float __a) {
2121 return __builtin_altivec_vlogefp(__a);
2126 static vector float __attribute__((__always_inline__))
2127 vec_vlogefp(vector float __a) {
2128 return __builtin_altivec_vlogefp(__a);
2133 #ifdef __LITTLE_ENDIAN__
2134 static vector unsigned char __ATTRS_o_ai
2135 __attribute__((__deprecated__("use assignment for unaligned little endian \
2136 loads/stores"))) vec_lvsl(int __a, const signed char *__b) {
2137 vector unsigned char mask =
2138 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2139 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2140 7, 6, 5, 4, 3, 2, 1, 0};
2141 return vec_perm(mask, mask, reverse);
2144 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2145 const signed char *__b) {
2146 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2150 #ifdef __LITTLE_ENDIAN__
2151 static vector unsigned char __ATTRS_o_ai
2152 __attribute__((__deprecated__("use assignment for unaligned little endian \
2153 loads/stores"))) vec_lvsl(int __a, const unsigned char *__b) {
2154 vector unsigned char mask =
2155 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2156 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2157 7, 6, 5, 4, 3, 2, 1, 0};
2158 return vec_perm(mask, mask, reverse);
2161 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2162 const unsigned char *__b) {
2163 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2167 #ifdef __LITTLE_ENDIAN__
2168 static vector unsigned char __ATTRS_o_ai
2169 __attribute__((__deprecated__("use assignment for unaligned little endian \
2170 loads/stores"))) vec_lvsl(int __a, const short *__b) {
2171 vector unsigned char mask =
2172 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2173 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2174 7, 6, 5, 4, 3, 2, 1, 0};
2175 return vec_perm(mask, mask, reverse);
2178 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const short *__b) {
2179 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2183 #ifdef __LITTLE_ENDIAN__
2184 static vector unsigned char __ATTRS_o_ai
2185 __attribute__((__deprecated__("use assignment for unaligned little endian \
2186 loads/stores"))) vec_lvsl(int __a, const unsigned short *__b) {
2187 vector unsigned char mask =
2188 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2189 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2190 7, 6, 5, 4, 3, 2, 1, 0};
2191 return vec_perm(mask, mask, reverse);
2194 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2195 const unsigned short *__b) {
2196 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2200 #ifdef __LITTLE_ENDIAN__
2201 static vector unsigned char __ATTRS_o_ai
2202 __attribute__((__deprecated__("use assignment for unaligned little endian \
2203 loads/stores"))) vec_lvsl(int __a, const int *__b) {
2204 vector unsigned char mask =
2205 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2206 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2207 7, 6, 5, 4, 3, 2, 1, 0};
2208 return vec_perm(mask, mask, reverse);
2211 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const int *__b) {
2212 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2216 #ifdef __LITTLE_ENDIAN__
2217 static vector unsigned char __ATTRS_o_ai
2218 __attribute__((__deprecated__("use assignment for unaligned little endian \
2219 loads/stores"))) vec_lvsl(int __a, const unsigned int *__b) {
2220 vector unsigned char mask =
2221 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2222 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2223 7, 6, 5, 4, 3, 2, 1, 0};
2224 return vec_perm(mask, mask, reverse);
2227 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2228 const unsigned int *__b) {
2229 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2233 #ifdef __LITTLE_ENDIAN__
2234 static vector unsigned char __ATTRS_o_ai
2235 __attribute__((__deprecated__("use assignment for unaligned little endian \
2236 loads/stores"))) vec_lvsl(int __a, const float *__b) {
2237 vector unsigned char mask =
2238 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2239 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2240 7, 6, 5, 4, 3, 2, 1, 0};
2241 return vec_perm(mask, mask, reverse);
2244 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const float *__b) {
2245 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2251 #ifdef __LITTLE_ENDIAN__
2252 static vector unsigned char __ATTRS_o_ai
2253 __attribute__((__deprecated__("use assignment for unaligned little endian \
2254 loads/stores"))) vec_lvsr(int __a, const signed char *__b) {
2255 vector unsigned char mask =
2256 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2257 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2258 7, 6, 5, 4, 3, 2, 1, 0};
2259 return vec_perm(mask, mask, reverse);
2262 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2263 const signed char *__b) {
2264 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2268 #ifdef __LITTLE_ENDIAN__
2269 static vector unsigned char __ATTRS_o_ai
2270 __attribute__((__deprecated__("use assignment for unaligned little endian \
2271 loads/stores"))) vec_lvsr(int __a, const unsigned char *__b) {
2272 vector unsigned char mask =
2273 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2274 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2275 7, 6, 5, 4, 3, 2, 1, 0};
2276 return vec_perm(mask, mask, reverse);
2279 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2280 const unsigned char *__b) {
2281 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2285 #ifdef __LITTLE_ENDIAN__
2286 static vector unsigned char __ATTRS_o_ai
2287 __attribute__((__deprecated__("use assignment for unaligned little endian \
2288 loads/stores"))) vec_lvsr(int __a, const short *__b) {
2289 vector unsigned char mask =
2290 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2291 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2292 7, 6, 5, 4, 3, 2, 1, 0};
2293 return vec_perm(mask, mask, reverse);
2296 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const short *__b) {
2297 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2301 #ifdef __LITTLE_ENDIAN__
2302 static vector unsigned char __ATTRS_o_ai
2303 __attribute__((__deprecated__("use assignment for unaligned little endian \
2304 loads/stores"))) vec_lvsr(int __a, const unsigned short *__b) {
2305 vector unsigned char mask =
2306 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2307 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2308 7, 6, 5, 4, 3, 2, 1, 0};
2309 return vec_perm(mask, mask, reverse);
2312 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2313 const unsigned short *__b) {
2314 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2318 #ifdef __LITTLE_ENDIAN__
2319 static vector unsigned char __ATTRS_o_ai
2320 __attribute__((__deprecated__("use assignment for unaligned little endian \
2321 loads/stores"))) vec_lvsr(int __a, const int *__b) {
2322 vector unsigned char mask =
2323 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2324 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2325 7, 6, 5, 4, 3, 2, 1, 0};
2326 return vec_perm(mask, mask, reverse);
2329 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const int *__b) {
2330 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2334 #ifdef __LITTLE_ENDIAN__
2335 static vector unsigned char __ATTRS_o_ai
2336 __attribute__((__deprecated__("use assignment for unaligned little endian \
2337 loads/stores"))) vec_lvsr(int __a, const unsigned int *__b) {
2338 vector unsigned char mask =
2339 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2340 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2341 7, 6, 5, 4, 3, 2, 1, 0};
2342 return vec_perm(mask, mask, reverse);
2345 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2346 const unsigned int *__b) {
2347 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2351 #ifdef __LITTLE_ENDIAN__
2352 static vector unsigned char __ATTRS_o_ai
2353 __attribute__((__deprecated__("use assignment for unaligned little endian \
2354 loads/stores"))) vec_lvsr(int __a, const float *__b) {
2355 vector unsigned char mask =
2356 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2357 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2358 7, 6, 5, 4, 3, 2, 1, 0};
2359 return vec_perm(mask, mask, reverse);
2362 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const float *__b) {
2363 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2369 static vector float __attribute__((__always_inline__))
2370 vec_madd(vector float __a, vector float __b, vector float __c) {
2371 return __builtin_altivec_vmaddfp(__a, __b, __c);
2376 static vector float __attribute__((__always_inline__))
2377 vec_vmaddfp(vector float __a, vector float __b, vector float __c) {
2378 return __builtin_altivec_vmaddfp(__a, __b, __c);
2383 static vector signed short __attribute__((__always_inline__))
2384 vec_madds(vector signed short __a, vector signed short __b,
2385 vector signed short __c) {
2386 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2390 static vector signed short __attribute__((__always_inline__))
2391 vec_vmhaddshs(vector signed short __a, vector signed short __b,
2392 vector signed short __c) {
2393 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2398 static vector signed char __ATTRS_o_ai vec_max(vector signed char __a,
2399 vector signed char __b) {
2400 return __builtin_altivec_vmaxsb(__a, __b);
2403 static vector signed char __ATTRS_o_ai vec_max(vector bool char __a,
2404 vector signed char __b) {
2405 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2408 static vector signed char __ATTRS_o_ai vec_max(vector signed char __a,
2409 vector bool char __b) {
2410 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2413 static vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a,
2414 vector unsigned char __b) {
2415 return __builtin_altivec_vmaxub(__a, __b);
2418 static vector unsigned char __ATTRS_o_ai vec_max(vector bool char __a,
2419 vector unsigned char __b) {
2420 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2423 static vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a,
2424 vector bool char __b) {
2425 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2428 static vector short __ATTRS_o_ai vec_max(vector short __a, vector short __b) {
2429 return __builtin_altivec_vmaxsh(__a, __b);
2432 static vector short __ATTRS_o_ai vec_max(vector bool short __a,
2434 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2437 static vector short __ATTRS_o_ai vec_max(vector short __a,
2438 vector bool short __b) {
2439 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2442 static vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a,
2443 vector unsigned short __b) {
2444 return __builtin_altivec_vmaxuh(__a, __b);
2447 static vector unsigned short __ATTRS_o_ai vec_max(vector bool short __a,
2448 vector unsigned short __b) {
2449 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2452 static vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a,
2453 vector bool short __b) {
2454 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2457 static vector int __ATTRS_o_ai vec_max(vector int __a, vector int __b) {
2458 return __builtin_altivec_vmaxsw(__a, __b);
2461 static vector int __ATTRS_o_ai vec_max(vector bool int __a, vector int __b) {
2462 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2465 static vector int __ATTRS_o_ai vec_max(vector int __a, vector bool int __b) {
2466 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2469 static vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a,
2470 vector unsigned int __b) {
2471 return __builtin_altivec_vmaxuw(__a, __b);
2474 static vector unsigned int __ATTRS_o_ai vec_max(vector bool int __a,
2475 vector unsigned int __b) {
2476 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2479 static vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a,
2480 vector bool int __b) {
2481 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2484 #ifdef __POWER8_VECTOR__
2485 static vector signed long long __ATTRS_o_ai
2486 vec_max(vector signed long long __a, vector signed long long __b) {
2487 return __builtin_altivec_vmaxsd(__a, __b);
2490 static vector signed long long __ATTRS_o_ai
2491 vec_max(vector bool long long __a, vector signed long long __b) {
2492 return __builtin_altivec_vmaxsd((vector signed long long)__a, __b);
2495 static vector signed long long __ATTRS_o_ai vec_max(vector signed long long __a,
2496 vector bool long long __b) {
2497 return __builtin_altivec_vmaxsd(__a, (vector signed long long)__b);
2500 static vector unsigned long long __ATTRS_o_ai
2501 vec_max(vector unsigned long long __a, vector unsigned long long __b) {
2502 return __builtin_altivec_vmaxud(__a, __b);
2505 static vector unsigned long long __ATTRS_o_ai
2506 vec_max(vector bool long long __a, vector unsigned long long __b) {
2507 return __builtin_altivec_vmaxud((vector unsigned long long)__a, __b);
2510 static vector unsigned long long __ATTRS_o_ai
2511 vec_max(vector unsigned long long __a, vector bool long long __b) {
2512 return __builtin_altivec_vmaxud(__a, (vector unsigned long long)__b);
2516 static vector float __ATTRS_o_ai vec_max(vector float __a, vector float __b) {
2518 return __builtin_vsx_xvmaxsp(__a, __b);
2520 return __builtin_altivec_vmaxfp(__a, __b);
2525 static vector double __ATTRS_o_ai vec_max(vector double __a,
2526 vector double __b) {
2527 return __builtin_vsx_xvmaxdp(__a, __b);
2533 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a,
2534 vector signed char __b) {
2535 return __builtin_altivec_vmaxsb(__a, __b);
2538 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector bool char __a,
2539 vector signed char __b) {
2540 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2543 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a,
2544 vector bool char __b) {
2545 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2550 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a,
2551 vector unsigned char __b) {
2552 return __builtin_altivec_vmaxub(__a, __b);
2555 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector bool char __a,
2556 vector unsigned char __b) {
2557 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2560 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a,
2561 vector bool char __b) {
2562 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2567 static vector short __ATTRS_o_ai vec_vmaxsh(vector short __a,
2569 return __builtin_altivec_vmaxsh(__a, __b);
2572 static vector short __ATTRS_o_ai vec_vmaxsh(vector bool short __a,
2574 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2577 static vector short __ATTRS_o_ai vec_vmaxsh(vector short __a,
2578 vector bool short __b) {
2579 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2584 static vector unsigned short __ATTRS_o_ai
2585 vec_vmaxuh(vector unsigned short __a, vector unsigned short __b) {
2586 return __builtin_altivec_vmaxuh(__a, __b);
2589 static vector unsigned short __ATTRS_o_ai
2590 vec_vmaxuh(vector bool short __a, vector unsigned short __b) {
2591 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2594 static vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a,
2595 vector bool short __b) {
2596 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2601 static vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector int __b) {
2602 return __builtin_altivec_vmaxsw(__a, __b);
2605 static vector int __ATTRS_o_ai vec_vmaxsw(vector bool int __a, vector int __b) {
2606 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2609 static vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector bool int __b) {
2610 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2615 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a,
2616 vector unsigned int __b) {
2617 return __builtin_altivec_vmaxuw(__a, __b);
2620 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector bool int __a,
2621 vector unsigned int __b) {
2622 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2625 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a,
2626 vector bool int __b) {
2627 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2632 static vector float __attribute__((__always_inline__))
2633 vec_vmaxfp(vector float __a, vector float __b) {
2635 return __builtin_vsx_xvmaxsp(__a, __b);
2637 return __builtin_altivec_vmaxfp(__a, __b);
2643 static vector signed char __ATTRS_o_ai vec_mergeh(vector signed char __a,
2644 vector signed char __b) {
2645 return vec_perm(__a, __b,
2646 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2647 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2648 0x06, 0x16, 0x07, 0x17));
2651 static vector unsigned char __ATTRS_o_ai vec_mergeh(vector unsigned char __a,
2652 vector unsigned char __b) {
2653 return vec_perm(__a, __b,
2654 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2655 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2656 0x06, 0x16, 0x07, 0x17));
2659 static vector bool char __ATTRS_o_ai vec_mergeh(vector bool char __a,
2660 vector bool char __b) {
2661 return vec_perm(__a, __b,
2662 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2663 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2664 0x06, 0x16, 0x07, 0x17));
2667 static vector short __ATTRS_o_ai vec_mergeh(vector short __a,
2669 return vec_perm(__a, __b,
2670 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2671 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2672 0x06, 0x07, 0x16, 0x17));
2675 static vector unsigned short __ATTRS_o_ai
2676 vec_mergeh(vector unsigned short __a, vector unsigned short __b) {
2677 return vec_perm(__a, __b,
2678 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2679 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2680 0x06, 0x07, 0x16, 0x17));
2683 static vector bool short __ATTRS_o_ai vec_mergeh(vector bool short __a,
2684 vector bool short __b) {
2685 return vec_perm(__a, __b,
2686 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2687 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2688 0x06, 0x07, 0x16, 0x17));
2691 static vector pixel __ATTRS_o_ai vec_mergeh(vector pixel __a,
2693 return vec_perm(__a, __b,
2694 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2695 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2696 0x06, 0x07, 0x16, 0x17));
2699 static vector int __ATTRS_o_ai vec_mergeh(vector int __a, vector int __b) {
2700 return vec_perm(__a, __b,
2701 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2702 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2703 0x14, 0x15, 0x16, 0x17));
2706 static vector unsigned int __ATTRS_o_ai vec_mergeh(vector unsigned int __a,
2707 vector unsigned int __b) {
2708 return vec_perm(__a, __b,
2709 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2710 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2711 0x14, 0x15, 0x16, 0x17));
2714 static vector bool int __ATTRS_o_ai vec_mergeh(vector bool int __a,
2715 vector bool int __b) {
2716 return vec_perm(__a, __b,
2717 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2718 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2719 0x14, 0x15, 0x16, 0x17));
2722 static vector float __ATTRS_o_ai vec_mergeh(vector float __a,
2724 return vec_perm(__a, __b,
2725 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2726 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2727 0x14, 0x15, 0x16, 0x17));
2732 #define __builtin_altivec_vmrghb vec_vmrghb
2734 static vector signed char __ATTRS_o_ai vec_vmrghb(vector signed char __a,
2735 vector signed char __b) {
2736 return vec_perm(__a, __b,
2737 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2738 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2739 0x06, 0x16, 0x07, 0x17));
2742 static vector unsigned char __ATTRS_o_ai vec_vmrghb(vector unsigned char __a,
2743 vector unsigned char __b) {
2744 return vec_perm(__a, __b,
2745 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2746 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2747 0x06, 0x16, 0x07, 0x17));
2750 static vector bool char __ATTRS_o_ai vec_vmrghb(vector bool char __a,
2751 vector bool char __b) {
2752 return vec_perm(__a, __b,
2753 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
2754 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
2755 0x06, 0x16, 0x07, 0x17));
2760 #define __builtin_altivec_vmrghh vec_vmrghh
2762 static vector short __ATTRS_o_ai vec_vmrghh(vector short __a,
2764 return vec_perm(__a, __b,
2765 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2766 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2767 0x06, 0x07, 0x16, 0x17));
2770 static vector unsigned short __ATTRS_o_ai
2771 vec_vmrghh(vector unsigned short __a, vector unsigned short __b) {
2772 return vec_perm(__a, __b,
2773 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2774 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2775 0x06, 0x07, 0x16, 0x17));
2778 static vector bool short __ATTRS_o_ai vec_vmrghh(vector bool short __a,
2779 vector bool short __b) {
2780 return vec_perm(__a, __b,
2781 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2782 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2783 0x06, 0x07, 0x16, 0x17));
2786 static vector pixel __ATTRS_o_ai vec_vmrghh(vector pixel __a,
2788 return vec_perm(__a, __b,
2789 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
2790 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
2791 0x06, 0x07, 0x16, 0x17));
2796 #define __builtin_altivec_vmrghw vec_vmrghw
2798 static vector int __ATTRS_o_ai vec_vmrghw(vector int __a, vector int __b) {
2799 return vec_perm(__a, __b,
2800 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2801 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2802 0x14, 0x15, 0x16, 0x17));
2805 static vector unsigned int __ATTRS_o_ai vec_vmrghw(vector unsigned int __a,
2806 vector unsigned int __b) {
2807 return vec_perm(__a, __b,
2808 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2809 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2810 0x14, 0x15, 0x16, 0x17));
2813 static vector bool int __ATTRS_o_ai vec_vmrghw(vector bool int __a,
2814 vector bool int __b) {
2815 return vec_perm(__a, __b,
2816 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2817 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2818 0x14, 0x15, 0x16, 0x17));
2821 static vector float __ATTRS_o_ai vec_vmrghw(vector float __a,
2823 return vec_perm(__a, __b,
2824 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
2825 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
2826 0x14, 0x15, 0x16, 0x17));
2831 static vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a,
2832 vector signed char __b) {
2833 return vec_perm(__a, __b,
2834 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
2835 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
2836 0x0E, 0x1E, 0x0F, 0x1F));
2839 static vector unsigned char __ATTRS_o_ai vec_mergel(vector unsigned char __a,
2840 vector unsigned char __b) {
2841 return vec_perm(__a, __b,
2842 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
2843 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
2844 0x0E, 0x1E, 0x0F, 0x1F));
2847 static vector bool char __ATTRS_o_ai vec_mergel(vector bool char __a,
2848 vector bool char __b) {
2849 return vec_perm(__a, __b,
2850 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
2851 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
2852 0x0E, 0x1E, 0x0F, 0x1F));
2855 static vector short __ATTRS_o_ai vec_mergel(vector short __a,
2857 return vec_perm(__a, __b,
2858 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
2859 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
2860 0x0E, 0x0F, 0x1E, 0x1F));
2863 static vector unsigned short __ATTRS_o_ai
2864 vec_mergel(vector unsigned short __a, vector unsigned short __b) {
2865 return vec_perm(__a, __b,
2866 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
2867 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
2868 0x0E, 0x0F, 0x1E, 0x1F));
2871 static vector bool short __ATTRS_o_ai vec_mergel(vector bool short __a,
2872 vector bool short __b) {
2873 return vec_perm(__a, __b,
2874 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
2875 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
2876 0x0E, 0x0F, 0x1E, 0x1F));
2879 static vector pixel __ATTRS_o_ai vec_mergel(vector pixel __a,
2881 return vec_perm(__a, __b,
2882 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
2883 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
2884 0x0E, 0x0F, 0x1E, 0x1F));
2887 static vector int __ATTRS_o_ai vec_mergel(vector int __a, vector int __b) {
2888 return vec_perm(__a, __b,
2889 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
2890 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
2891 0x1C, 0x1D, 0x1E, 0x1F));
2894 static vector unsigned int __ATTRS_o_ai vec_mergel(vector unsigned int __a,
2895 vector unsigned int __b) {
2896 return vec_perm(__a, __b,
2897 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
2898 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
2899 0x1C, 0x1D, 0x1E, 0x1F));
2902 static vector bool int __ATTRS_o_ai vec_mergel(vector bool int __a,
2903 vector bool int __b) {
2904 return vec_perm(__a, __b,
2905 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
2906 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
2907 0x1C, 0x1D, 0x1E, 0x1F));
2910 static vector float __ATTRS_o_ai vec_mergel(vector float __a,
2912 return vec_perm(__a, __b,
2913 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
2914 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
2915 0x1C, 0x1D, 0x1E, 0x1F));
2920 #define __builtin_altivec_vmrglb vec_vmrglb
2922 static vector signed char __ATTRS_o_ai vec_vmrglb(vector signed char __a,
2923 vector signed char __b) {
2924 return vec_perm(__a, __b,
2925 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
2926 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
2927 0x0E, 0x1E, 0x0F, 0x1F));
2930 static vector unsigned char __ATTRS_o_ai vec_vmrglb(vector unsigned char __a,
2931 vector unsigned char __b) {
2932 return vec_perm(__a, __b,
2933 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
2934 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
2935 0x0E, 0x1E, 0x0F, 0x1F));
2938 static vector bool char __ATTRS_o_ai vec_vmrglb(vector bool char __a,
2939 vector bool char __b) {
2940 return vec_perm(__a, __b,
2941 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
2942 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
2943 0x0E, 0x1E, 0x0F, 0x1F));
2948 #define __builtin_altivec_vmrglh vec_vmrglh
2950 static vector short __ATTRS_o_ai vec_vmrglh(vector short __a,
2952 return vec_perm(__a, __b,
2953 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
2954 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
2955 0x0E, 0x0F, 0x1E, 0x1F));
2958 static vector unsigned short __ATTRS_o_ai
2959 vec_vmrglh(vector unsigned short __a, vector unsigned short __b) {
2960 return vec_perm(__a, __b,
2961 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
2962 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
2963 0x0E, 0x0F, 0x1E, 0x1F));
2966 static vector bool short __ATTRS_o_ai vec_vmrglh(vector bool short __a,
2967 vector bool short __b) {
2968 return vec_perm(__a, __b,
2969 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
2970 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
2971 0x0E, 0x0F, 0x1E, 0x1F));
2974 static vector pixel __ATTRS_o_ai vec_vmrglh(vector pixel __a,
2976 return vec_perm(__a, __b,
2977 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
2978 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
2979 0x0E, 0x0F, 0x1E, 0x1F));
2984 #define __builtin_altivec_vmrglw vec_vmrglw
2986 static vector int __ATTRS_o_ai vec_vmrglw(vector int __a, vector int __b) {
2987 return vec_perm(__a, __b,
2988 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
2989 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
2990 0x1C, 0x1D, 0x1E, 0x1F));
2993 static vector unsigned int __ATTRS_o_ai vec_vmrglw(vector unsigned int __a,
2994 vector unsigned int __b) {
2995 return vec_perm(__a, __b,
2996 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
2997 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
2998 0x1C, 0x1D, 0x1E, 0x1F));
3001 static vector bool int __ATTRS_o_ai vec_vmrglw(vector bool int __a,
3002 vector bool int __b) {
3003 return vec_perm(__a, __b,
3004 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3005 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3006 0x1C, 0x1D, 0x1E, 0x1F));
3009 static vector float __ATTRS_o_ai vec_vmrglw(vector float __a,
3011 return vec_perm(__a, __b,
3012 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3013 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3014 0x1C, 0x1D, 0x1E, 0x1F));
3019 static vector unsigned short __attribute__((__always_inline__))
3021 return __builtin_altivec_mfvscr();
3026 static vector signed char __ATTRS_o_ai vec_min(vector signed char __a,
3027 vector signed char __b) {
3028 return __builtin_altivec_vminsb(__a, __b);
3031 static vector signed char __ATTRS_o_ai vec_min(vector bool char __a,
3032 vector signed char __b) {
3033 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3036 static vector signed char __ATTRS_o_ai vec_min(vector signed char __a,
3037 vector bool char __b) {
3038 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3041 static vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a,
3042 vector unsigned char __b) {
3043 return __builtin_altivec_vminub(__a, __b);
3046 static vector unsigned char __ATTRS_o_ai vec_min(vector bool char __a,
3047 vector unsigned char __b) {
3048 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3051 static vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a,
3052 vector bool char __b) {
3053 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3056 static vector short __ATTRS_o_ai vec_min(vector short __a, vector short __b) {
3057 return __builtin_altivec_vminsh(__a, __b);
3060 static vector short __ATTRS_o_ai vec_min(vector bool short __a,
3062 return __builtin_altivec_vminsh((vector short)__a, __b);
3065 static vector short __ATTRS_o_ai vec_min(vector short __a,
3066 vector bool short __b) {
3067 return __builtin_altivec_vminsh(__a, (vector short)__b);
3070 static vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a,
3071 vector unsigned short __b) {
3072 return __builtin_altivec_vminuh(__a, __b);
3075 static vector unsigned short __ATTRS_o_ai vec_min(vector bool short __a,
3076 vector unsigned short __b) {
3077 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3080 static vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a,
3081 vector bool short __b) {
3082 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3085 static vector int __ATTRS_o_ai vec_min(vector int __a, vector int __b) {
3086 return __builtin_altivec_vminsw(__a, __b);
3089 static vector int __ATTRS_o_ai vec_min(vector bool int __a, vector int __b) {
3090 return __builtin_altivec_vminsw((vector int)__a, __b);
3093 static vector int __ATTRS_o_ai vec_min(vector int __a, vector bool int __b) {
3094 return __builtin_altivec_vminsw(__a, (vector int)__b);
3097 static vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a,
3098 vector unsigned int __b) {
3099 return __builtin_altivec_vminuw(__a, __b);
3102 static vector unsigned int __ATTRS_o_ai vec_min(vector bool int __a,
3103 vector unsigned int __b) {
3104 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3107 static vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a,
3108 vector bool int __b) {
3109 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3112 #ifdef __POWER8_VECTOR__
3113 static vector signed long long __ATTRS_o_ai
3114 vec_min(vector signed long long __a, vector signed long long __b) {
3115 return __builtin_altivec_vminsd(__a, __b);
3118 static vector signed long long __ATTRS_o_ai
3119 vec_min(vector bool long long __a, vector signed long long __b) {
3120 return __builtin_altivec_vminsd((vector signed long long)__a, __b);
3123 static vector signed long long __ATTRS_o_ai vec_min(vector signed long long __a,
3124 vector bool long long __b) {
3125 return __builtin_altivec_vminsd(__a, (vector signed long long)__b);
3128 static vector unsigned long long __ATTRS_o_ai
3129 vec_min(vector unsigned long long __a, vector unsigned long long __b) {
3130 return __builtin_altivec_vminud(__a, __b);
3133 static vector unsigned long long __ATTRS_o_ai
3134 vec_min(vector bool long long __a, vector unsigned long long __b) {
3135 return __builtin_altivec_vminud((vector unsigned long long)__a, __b);
3138 static vector unsigned long long __ATTRS_o_ai
3139 vec_min(vector unsigned long long __a, vector bool long long __b) {
3140 return __builtin_altivec_vminud(__a, (vector unsigned long long)__b);
3144 static vector float __ATTRS_o_ai vec_min(vector float __a, vector float __b) {
3146 return __builtin_vsx_xvminsp(__a, __b);
3148 return __builtin_altivec_vminfp(__a, __b);
3153 static vector double __ATTRS_o_ai vec_min(vector double __a,
3154 vector double __b) {
3155 return __builtin_vsx_xvmindp(__a, __b);
3161 static vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a,
3162 vector signed char __b) {
3163 return __builtin_altivec_vminsb(__a, __b);
3166 static vector signed char __ATTRS_o_ai vec_vminsb(vector bool char __a,
3167 vector signed char __b) {
3168 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3171 static vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a,
3172 vector bool char __b) {
3173 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3178 static vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a,
3179 vector unsigned char __b) {
3180 return __builtin_altivec_vminub(__a, __b);
3183 static vector unsigned char __ATTRS_o_ai vec_vminub(vector bool char __a,
3184 vector unsigned char __b) {
3185 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3188 static vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a,
3189 vector bool char __b) {
3190 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3195 static vector short __ATTRS_o_ai vec_vminsh(vector short __a,
3197 return __builtin_altivec_vminsh(__a, __b);
3200 static vector short __ATTRS_o_ai vec_vminsh(vector bool short __a,
3202 return __builtin_altivec_vminsh((vector short)__a, __b);
3205 static vector short __ATTRS_o_ai vec_vminsh(vector short __a,
3206 vector bool short __b) {
3207 return __builtin_altivec_vminsh(__a, (vector short)__b);
3212 static vector unsigned short __ATTRS_o_ai
3213 vec_vminuh(vector unsigned short __a, vector unsigned short __b) {
3214 return __builtin_altivec_vminuh(__a, __b);
3217 static vector unsigned short __ATTRS_o_ai
3218 vec_vminuh(vector bool short __a, vector unsigned short __b) {
3219 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3222 static vector unsigned short __ATTRS_o_ai vec_vminuh(vector unsigned short __a,
3223 vector bool short __b) {
3224 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3229 static vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector int __b) {
3230 return __builtin_altivec_vminsw(__a, __b);
3233 static vector int __ATTRS_o_ai vec_vminsw(vector bool int __a, vector int __b) {
3234 return __builtin_altivec_vminsw((vector int)__a, __b);
3237 static vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector bool int __b) {
3238 return __builtin_altivec_vminsw(__a, (vector int)__b);
3243 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a,
3244 vector unsigned int __b) {
3245 return __builtin_altivec_vminuw(__a, __b);
3248 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector bool int __a,
3249 vector unsigned int __b) {
3250 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3253 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a,
3254 vector bool int __b) {
3255 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3260 static vector float __attribute__((__always_inline__))
3261 vec_vminfp(vector float __a, vector float __b) {
3263 return __builtin_vsx_xvminsp(__a, __b);
3265 return __builtin_altivec_vminfp(__a, __b);
3271 #define __builtin_altivec_vmladduhm vec_mladd
3273 static vector short __ATTRS_o_ai vec_mladd(vector short __a, vector short __b,
3275 return __a * __b + __c;
3278 static vector short __ATTRS_o_ai vec_mladd(vector short __a,
3279 vector unsigned short __b,
3280 vector unsigned short __c) {
3281 return __a * (vector short)__b + (vector short)__c;
3284 static vector short __ATTRS_o_ai vec_mladd(vector unsigned short __a,
3285 vector short __b, vector short __c) {
3286 return (vector short)__a * __b + __c;
3289 static vector unsigned short __ATTRS_o_ai vec_mladd(vector unsigned short __a,
3290 vector unsigned short __b,
3291 vector unsigned short __c) {
3292 return __a * __b + __c;
3297 static vector short __ATTRS_o_ai vec_vmladduhm(vector short __a,
3300 return __a * __b + __c;
3303 static vector short __ATTRS_o_ai vec_vmladduhm(vector short __a,
3304 vector unsigned short __b,
3305 vector unsigned short __c) {
3306 return __a * (vector short)__b + (vector short)__c;
3309 static vector short __ATTRS_o_ai vec_vmladduhm(vector unsigned short __a,
3312 return (vector short)__a * __b + __c;
3315 static vector unsigned short __ATTRS_o_ai
3316 vec_vmladduhm(vector unsigned short __a, vector unsigned short __b,
3317 vector unsigned short __c) {
3318 return __a * __b + __c;
3323 static vector short __attribute__((__always_inline__))
3324 vec_mradds(vector short __a, vector short __b, vector short __c) {
3325 return __builtin_altivec_vmhraddshs(__a, __b, __c);
3328 /* vec_vmhraddshs */
3330 static vector short __attribute__((__always_inline__))
3331 vec_vmhraddshs(vector short __a, vector short __b, vector short __c) {
3332 return __builtin_altivec_vmhraddshs(__a, __b, __c);
3337 static vector int __ATTRS_o_ai vec_msum(vector signed char __a,
3338 vector unsigned char __b,
3340 return __builtin_altivec_vmsummbm(__a, __b, __c);
3343 static vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned char __a,
3344 vector unsigned char __b,
3345 vector unsigned int __c) {
3346 return __builtin_altivec_vmsumubm(__a, __b, __c);
3349 static vector int __ATTRS_o_ai vec_msum(vector short __a, vector short __b,
3351 return __builtin_altivec_vmsumshm(__a, __b, __c);
3354 static vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned short __a,
3355 vector unsigned short __b,
3356 vector unsigned int __c) {
3357 return __builtin_altivec_vmsumuhm(__a, __b, __c);
3362 static vector int __attribute__((__always_inline__))
3363 vec_vmsummbm(vector signed char __a, vector unsigned char __b, vector int __c) {
3364 return __builtin_altivec_vmsummbm(__a, __b, __c);
3369 static vector unsigned int __attribute__((__always_inline__))
3370 vec_vmsumubm(vector unsigned char __a, vector unsigned char __b,
3371 vector unsigned int __c) {
3372 return __builtin_altivec_vmsumubm(__a, __b, __c);
3377 static vector int __attribute__((__always_inline__))
3378 vec_vmsumshm(vector short __a, vector short __b, vector int __c) {
3379 return __builtin_altivec_vmsumshm(__a, __b, __c);
3384 static vector unsigned int __attribute__((__always_inline__))
3385 vec_vmsumuhm(vector unsigned short __a, vector unsigned short __b,
3386 vector unsigned int __c) {
3387 return __builtin_altivec_vmsumuhm(__a, __b, __c);
3392 static vector int __ATTRS_o_ai vec_msums(vector short __a, vector short __b,
3394 return __builtin_altivec_vmsumshs(__a, __b, __c);
3397 static vector unsigned int __ATTRS_o_ai vec_msums(vector unsigned short __a,
3398 vector unsigned short __b,
3399 vector unsigned int __c) {
3400 return __builtin_altivec_vmsumuhs(__a, __b, __c);
3405 static vector int __attribute__((__always_inline__))
3406 vec_vmsumshs(vector short __a, vector short __b, vector int __c) {
3407 return __builtin_altivec_vmsumshs(__a, __b, __c);
3412 static vector unsigned int __attribute__((__always_inline__))
3413 vec_vmsumuhs(vector unsigned short __a, vector unsigned short __b,
3414 vector unsigned int __c) {
3415 return __builtin_altivec_vmsumuhs(__a, __b, __c);
3420 static void __ATTRS_o_ai vec_mtvscr(vector signed char __a) {
3421 __builtin_altivec_mtvscr((vector int)__a);
3424 static void __ATTRS_o_ai vec_mtvscr(vector unsigned char __a) {
3425 __builtin_altivec_mtvscr((vector int)__a);
3428 static void __ATTRS_o_ai vec_mtvscr(vector bool char __a) {
3429 __builtin_altivec_mtvscr((vector int)__a);
3432 static void __ATTRS_o_ai vec_mtvscr(vector short __a) {
3433 __builtin_altivec_mtvscr((vector int)__a);
3436 static void __ATTRS_o_ai vec_mtvscr(vector unsigned short __a) {
3437 __builtin_altivec_mtvscr((vector int)__a);
3440 static void __ATTRS_o_ai vec_mtvscr(vector bool short __a) {
3441 __builtin_altivec_mtvscr((vector int)__a);
3444 static void __ATTRS_o_ai vec_mtvscr(vector pixel __a) {
3445 __builtin_altivec_mtvscr((vector int)__a);
3448 static void __ATTRS_o_ai vec_mtvscr(vector int __a) {
3449 __builtin_altivec_mtvscr((vector int)__a);
3452 static void __ATTRS_o_ai vec_mtvscr(vector unsigned int __a) {
3453 __builtin_altivec_mtvscr((vector int)__a);
3456 static void __ATTRS_o_ai vec_mtvscr(vector bool int __a) {
3457 __builtin_altivec_mtvscr((vector int)__a);
3460 static void __ATTRS_o_ai vec_mtvscr(vector float __a) {
3461 __builtin_altivec_mtvscr((vector int)__a);
3464 /* The vmulos* and vmules* instructions have a big endian bias, so
3465 we must reverse the meaning of "even" and "odd" for little endian. */
3469 static vector short __ATTRS_o_ai vec_mule(vector signed char __a,
3470 vector signed char __b) {
3471 #ifdef __LITTLE_ENDIAN__
3472 return __builtin_altivec_vmulosb(__a, __b);
3474 return __builtin_altivec_vmulesb(__a, __b);
3478 static vector unsigned short __ATTRS_o_ai vec_mule(vector unsigned char __a,
3479 vector unsigned char __b) {
3480 #ifdef __LITTLE_ENDIAN__
3481 return __builtin_altivec_vmuloub(__a, __b);
3483 return __builtin_altivec_vmuleub(__a, __b);
3487 static vector int __ATTRS_o_ai vec_mule(vector short __a, vector short __b) {
3488 #ifdef __LITTLE_ENDIAN__
3489 return __builtin_altivec_vmulosh(__a, __b);
3491 return __builtin_altivec_vmulesh(__a, __b);
3495 static vector unsigned int __ATTRS_o_ai vec_mule(vector unsigned short __a,
3496 vector unsigned short __b) {
3497 #ifdef __LITTLE_ENDIAN__
3498 return __builtin_altivec_vmulouh(__a, __b);
3500 return __builtin_altivec_vmuleuh(__a, __b);
3504 #ifdef __POWER8_VECTOR__
3505 static vector signed long long __ATTRS_o_ai vec_mule(vector signed int __a,
3506 vector signed int __b) {
3507 #ifdef __LITTLE_ENDIAN__
3508 return __builtin_altivec_vmulosw(__a, __b);
3510 return __builtin_altivec_vmulesw(__a, __b);
3514 static vector unsigned long long __ATTRS_o_ai
3515 vec_mule(vector unsigned int __a, vector unsigned int __b) {
3516 #ifdef __LITTLE_ENDIAN__
3517 return __builtin_altivec_vmulouw(__a, __b);
3519 return __builtin_altivec_vmuleuw(__a, __b);
3526 static vector short __attribute__((__always_inline__))
3527 vec_vmulesb(vector signed char __a, vector signed char __b) {
3528 #ifdef __LITTLE_ENDIAN__
3529 return __builtin_altivec_vmulosb(__a, __b);
3531 return __builtin_altivec_vmulesb(__a, __b);
3537 static vector unsigned short __attribute__((__always_inline__))
3538 vec_vmuleub(vector unsigned char __a, vector unsigned char __b) {
3539 #ifdef __LITTLE_ENDIAN__
3540 return __builtin_altivec_vmuloub(__a, __b);
3542 return __builtin_altivec_vmuleub(__a, __b);
3548 static vector int __attribute__((__always_inline__))
3549 vec_vmulesh(vector short __a, vector short __b) {
3550 #ifdef __LITTLE_ENDIAN__
3551 return __builtin_altivec_vmulosh(__a, __b);
3553 return __builtin_altivec_vmulesh(__a, __b);
3559 static vector unsigned int __attribute__((__always_inline__))
3560 vec_vmuleuh(vector unsigned short __a, vector unsigned short __b) {
3561 #ifdef __LITTLE_ENDIAN__
3562 return __builtin_altivec_vmulouh(__a, __b);
3564 return __builtin_altivec_vmuleuh(__a, __b);
3570 static vector short __ATTRS_o_ai vec_mulo(vector signed char __a,
3571 vector signed char __b) {
3572 #ifdef __LITTLE_ENDIAN__
3573 return __builtin_altivec_vmulesb(__a, __b);
3575 return __builtin_altivec_vmulosb(__a, __b);
3579 static vector unsigned short __ATTRS_o_ai vec_mulo(vector unsigned char __a,
3580 vector unsigned char __b) {
3581 #ifdef __LITTLE_ENDIAN__
3582 return __builtin_altivec_vmuleub(__a, __b);
3584 return __builtin_altivec_vmuloub(__a, __b);
3588 static vector int __ATTRS_o_ai vec_mulo(vector short __a, vector short __b) {
3589 #ifdef __LITTLE_ENDIAN__
3590 return __builtin_altivec_vmulesh(__a, __b);
3592 return __builtin_altivec_vmulosh(__a, __b);
3596 static vector unsigned int __ATTRS_o_ai vec_mulo(vector unsigned short __a,
3597 vector unsigned short __b) {
3598 #ifdef __LITTLE_ENDIAN__
3599 return __builtin_altivec_vmuleuh(__a, __b);
3601 return __builtin_altivec_vmulouh(__a, __b);
3605 #ifdef __POWER8_VECTOR__
3606 static vector signed long long __ATTRS_o_ai vec_mulo(vector signed int __a,
3607 vector signed int __b) {
3608 #ifdef __LITTLE_ENDIAN__
3609 return __builtin_altivec_vmulesw(__a, __b);
3611 return __builtin_altivec_vmulosw(__a, __b);
3615 static vector unsigned long long __ATTRS_o_ai
3616 vec_mulo(vector unsigned int __a, vector unsigned int __b) {
3617 #ifdef __LITTLE_ENDIAN__
3618 return __builtin_altivec_vmuleuw(__a, __b);
3620 return __builtin_altivec_vmulouw(__a, __b);
3627 static vector short __attribute__((__always_inline__))
3628 vec_vmulosb(vector signed char __a, vector signed char __b) {
3629 #ifdef __LITTLE_ENDIAN__
3630 return __builtin_altivec_vmulesb(__a, __b);
3632 return __builtin_altivec_vmulosb(__a, __b);
3638 static vector unsigned short __attribute__((__always_inline__))
3639 vec_vmuloub(vector unsigned char __a, vector unsigned char __b) {
3640 #ifdef __LITTLE_ENDIAN__
3641 return __builtin_altivec_vmuleub(__a, __b);
3643 return __builtin_altivec_vmuloub(__a, __b);
3649 static vector int __attribute__((__always_inline__))
3650 vec_vmulosh(vector short __a, vector short __b) {
3651 #ifdef __LITTLE_ENDIAN__
3652 return __builtin_altivec_vmulesh(__a, __b);
3654 return __builtin_altivec_vmulosh(__a, __b);
3660 static vector unsigned int __attribute__((__always_inline__))
3661 vec_vmulouh(vector unsigned short __a, vector unsigned short __b) {
3662 #ifdef __LITTLE_ENDIAN__
3663 return __builtin_altivec_vmuleuh(__a, __b);
3665 return __builtin_altivec_vmulouh(__a, __b);
3671 static vector float __attribute__((__always_inline__))
3672 vec_nmsub(vector float __a, vector float __b, vector float __c) {
3673 return __builtin_altivec_vnmsubfp(__a, __b, __c);
3678 static vector float __attribute__((__always_inline__))
3679 vec_vnmsubfp(vector float __a, vector float __b, vector float __c) {
3680 return __builtin_altivec_vnmsubfp(__a, __b, __c);
3685 #define __builtin_altivec_vnor vec_nor
3687 static vector signed char __ATTRS_o_ai vec_nor(vector signed char __a,
3688 vector signed char __b) {
3689 return ~(__a | __b);
3692 static vector unsigned char __ATTRS_o_ai vec_nor(vector unsigned char __a,
3693 vector unsigned char __b) {
3694 return ~(__a | __b);
3697 static vector bool char __ATTRS_o_ai vec_nor(vector bool char __a,
3698 vector bool char __b) {
3699 return ~(__a | __b);
3702 static vector short __ATTRS_o_ai vec_nor(vector short __a, vector short __b) {
3703 return ~(__a | __b);
3706 static vector unsigned short __ATTRS_o_ai vec_nor(vector unsigned short __a,
3707 vector unsigned short __b) {
3708 return ~(__a | __b);
3711 static vector bool short __ATTRS_o_ai vec_nor(vector bool short __a,
3712 vector bool short __b) {
3713 return ~(__a | __b);
3716 static vector int __ATTRS_o_ai vec_nor(vector int __a, vector int __b) {
3717 return ~(__a | __b);
3720 static vector unsigned int __ATTRS_o_ai vec_nor(vector unsigned int __a,
3721 vector unsigned int __b) {
3722 return ~(__a | __b);
3725 static vector bool int __ATTRS_o_ai vec_nor(vector bool int __a,
3726 vector bool int __b) {
3727 return ~(__a | __b);
3730 static vector float __ATTRS_o_ai vec_nor(vector float __a, vector float __b) {
3731 vector unsigned int __res =
3732 ~((vector unsigned int)__a | (vector unsigned int)__b);
3733 return (vector float)__res;
3738 static vector signed char __ATTRS_o_ai vec_vnor(vector signed char __a,
3739 vector signed char __b) {
3740 return ~(__a | __b);
3743 static vector unsigned char __ATTRS_o_ai vec_vnor(vector unsigned char __a,
3744 vector unsigned char __b) {
3745 return ~(__a | __b);
3748 static vector bool char __ATTRS_o_ai vec_vnor(vector bool char __a,
3749 vector bool char __b) {
3750 return ~(__a | __b);
3753 static vector short __ATTRS_o_ai vec_vnor(vector short __a, vector short __b) {
3754 return ~(__a | __b);
3757 static vector unsigned short __ATTRS_o_ai vec_vnor(vector unsigned short __a,
3758 vector unsigned short __b) {
3759 return ~(__a | __b);
3762 static vector bool short __ATTRS_o_ai vec_vnor(vector bool short __a,
3763 vector bool short __b) {
3764 return ~(__a | __b);
3767 static vector int __ATTRS_o_ai vec_vnor(vector int __a, vector int __b) {
3768 return ~(__a | __b);
3771 static vector unsigned int __ATTRS_o_ai vec_vnor(vector unsigned int __a,
3772 vector unsigned int __b) {
3773 return ~(__a | __b);
3776 static vector bool int __ATTRS_o_ai vec_vnor(vector bool int __a,
3777 vector bool int __b) {
3778 return ~(__a | __b);
3781 static vector float __ATTRS_o_ai vec_vnor(vector float __a, vector float __b) {
3782 vector unsigned int __res =
3783 ~((vector unsigned int)__a | (vector unsigned int)__b);
3784 return (vector float)__res;
3788 static vector signed long long __ATTRS_o_ai
3789 vec_nor(vector signed long long __a, vector signed long long __b) {
3790 return ~(__a | __b);
3793 static vector unsigned long long __ATTRS_o_ai
3794 vec_nor(vector unsigned long long __a, vector unsigned long long __b) {
3795 return ~(__a | __b);
3798 static vector bool long long __ATTRS_o_ai vec_nor(vector bool long long __a,
3799 vector bool long long __b) {
3800 return ~(__a | __b);
3806 #define __builtin_altivec_vor vec_or
3808 static vector signed char __ATTRS_o_ai vec_or(vector signed char __a,
3809 vector signed char __b) {
3813 static vector signed char __ATTRS_o_ai vec_or(vector bool char __a,
3814 vector signed char __b) {
3815 return (vector signed char)__a | __b;
3818 static vector signed char __ATTRS_o_ai vec_or(vector signed char __a,
3819 vector bool char __b) {
3820 return __a | (vector signed char)__b;
3823 static vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a,
3824 vector unsigned char __b) {
3828 static vector unsigned char __ATTRS_o_ai vec_or(vector bool char __a,
3829 vector unsigned char __b) {
3830 return (vector unsigned char)__a | __b;
3833 static vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a,
3834 vector bool char __b) {
3835 return __a | (vector unsigned char)__b;
3838 static vector bool char __ATTRS_o_ai vec_or(vector bool char __a,
3839 vector bool char __b) {
3843 static vector short __ATTRS_o_ai vec_or(vector short __a, vector short __b) {
3847 static vector short __ATTRS_o_ai vec_or(vector bool short __a,
3849 return (vector short)__a | __b;
3852 static vector short __ATTRS_o_ai vec_or(vector short __a,
3853 vector bool short __b) {
3854 return __a | (vector short)__b;
3857 static vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a,
3858 vector unsigned short __b) {
3862 static vector unsigned short __ATTRS_o_ai vec_or(vector bool short __a,
3863 vector unsigned short __b) {
3864 return (vector unsigned short)__a | __b;
3867 static vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a,
3868 vector bool short __b) {
3869 return __a | (vector unsigned short)__b;
3872 static vector bool short __ATTRS_o_ai vec_or(vector bool short __a,
3873 vector bool short __b) {
3877 static vector int __ATTRS_o_ai vec_or(vector int __a, vector int __b) {
3881 static vector int __ATTRS_o_ai vec_or(vector bool int __a, vector int __b) {
3882 return (vector int)__a | __b;
3885 static vector int __ATTRS_o_ai vec_or(vector int __a, vector bool int __b) {
3886 return __a | (vector int)__b;
3889 static vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a,
3890 vector unsigned int __b) {
3894 static vector unsigned int __ATTRS_o_ai vec_or(vector bool int __a,
3895 vector unsigned int __b) {
3896 return (vector unsigned int)__a | __b;
3899 static vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a,
3900 vector bool int __b) {
3901 return __a | (vector unsigned int)__b;
3904 static vector bool int __ATTRS_o_ai vec_or(vector bool int __a,
3905 vector bool int __b) {
3909 static vector float __ATTRS_o_ai vec_or(vector float __a, vector float __b) {
3910 vector unsigned int __res =
3911 (vector unsigned int)__a | (vector unsigned int)__b;
3912 return (vector float)__res;
3915 static vector float __ATTRS_o_ai vec_or(vector bool int __a, vector float __b) {
3916 vector unsigned int __res =
3917 (vector unsigned int)__a | (vector unsigned int)__b;
3918 return (vector float)__res;
3921 static vector float __ATTRS_o_ai vec_or(vector float __a, vector bool int __b) {
3922 vector unsigned int __res =
3923 (vector unsigned int)__a | (vector unsigned int)__b;
3924 return (vector float)__res;
3928 static vector signed long long __ATTRS_o_ai
3929 vec_or(vector signed long long __a, vector signed long long __b) {
3933 static vector signed long long __ATTRS_o_ai
3934 vec_or(vector bool long long __a, vector signed long long __b) {
3935 return (vector signed long long)__a | __b;
3938 static vector signed long long __ATTRS_o_ai vec_or(vector signed long long __a,
3939 vector bool long long __b) {
3940 return __a | (vector signed long long)__b;
3943 static vector unsigned long long __ATTRS_o_ai
3944 vec_or(vector unsigned long long __a, vector unsigned long long __b) {
3948 static vector unsigned long long __ATTRS_o_ai
3949 vec_or(vector bool long long __a, vector unsigned long long __b) {
3950 return (vector unsigned long long)__a | __b;
3953 static vector unsigned long long __ATTRS_o_ai
3954 vec_or(vector unsigned long long __a, vector bool long long __b) {
3955 return __a | (vector unsigned long long)__b;
3958 static vector bool long long __ATTRS_o_ai vec_or(vector bool long long __a,
3959 vector bool long long __b) {
3966 static vector signed char __ATTRS_o_ai vec_vor(vector signed char __a,
3967 vector signed char __b) {
3971 static vector signed char __ATTRS_o_ai vec_vor(vector bool char __a,
3972 vector signed char __b) {
3973 return (vector signed char)__a | __b;
3976 static vector signed char __ATTRS_o_ai vec_vor(vector signed char __a,
3977 vector bool char __b) {
3978 return __a | (vector signed char)__b;
3981 static vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a,
3982 vector unsigned char __b) {
3986 static vector unsigned char __ATTRS_o_ai vec_vor(vector bool char __a,
3987 vector unsigned char __b) {
3988 return (vector unsigned char)__a | __b;
3991 static vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a,
3992 vector bool char __b) {
3993 return __a | (vector unsigned char)__b;
3996 static vector bool char __ATTRS_o_ai vec_vor(vector bool char __a,
3997 vector bool char __b) {
4001 static vector short __ATTRS_o_ai vec_vor(vector short __a, vector short __b) {
4005 static vector short __ATTRS_o_ai vec_vor(vector bool short __a,
4007 return (vector short)__a | __b;
4010 static vector short __ATTRS_o_ai vec_vor(vector short __a,
4011 vector bool short __b) {
4012 return __a | (vector short)__b;
4015 static vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a,
4016 vector unsigned short __b) {
4020 static vector unsigned short __ATTRS_o_ai vec_vor(vector bool short __a,
4021 vector unsigned short __b) {
4022 return (vector unsigned short)__a | __b;
4025 static vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a,
4026 vector bool short __b) {
4027 return __a | (vector unsigned short)__b;
4030 static vector bool short __ATTRS_o_ai vec_vor(vector bool short __a,
4031 vector bool short __b) {
4035 static vector int __ATTRS_o_ai vec_vor(vector int __a, vector int __b) {
4039 static vector int __ATTRS_o_ai vec_vor(vector bool int __a, vector int __b) {
4040 return (vector int)__a | __b;
4043 static vector int __ATTRS_o_ai vec_vor(vector int __a, vector bool int __b) {
4044 return __a | (vector int)__b;
4047 static vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a,
4048 vector unsigned int __b) {
4052 static vector unsigned int __ATTRS_o_ai vec_vor(vector bool int __a,
4053 vector unsigned int __b) {
4054 return (vector unsigned int)__a | __b;
4057 static vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a,
4058 vector bool int __b) {
4059 return __a | (vector unsigned int)__b;
4062 static vector bool int __ATTRS_o_ai vec_vor(vector bool int __a,
4063 vector bool int __b) {
4067 static vector float __ATTRS_o_ai vec_vor(vector float __a, vector float __b) {
4068 vector unsigned int __res =
4069 (vector unsigned int)__a | (vector unsigned int)__b;
4070 return (vector float)__res;
4073 static vector float __ATTRS_o_ai vec_vor(vector bool int __a,
4075 vector unsigned int __res =
4076 (vector unsigned int)__a | (vector unsigned int)__b;
4077 return (vector float)__res;
4080 static vector float __ATTRS_o_ai vec_vor(vector float __a,
4081 vector bool int __b) {
4082 vector unsigned int __res =
4083 (vector unsigned int)__a | (vector unsigned int)__b;
4084 return (vector float)__res;
4088 static vector signed long long __ATTRS_o_ai
4089 vec_vor(vector signed long long __a, vector signed long long __b) {
4093 static vector signed long long __ATTRS_o_ai
4094 vec_vor(vector bool long long __a, vector signed long long __b) {
4095 return (vector signed long long)__a | __b;
4098 static vector signed long long __ATTRS_o_ai vec_vor(vector signed long long __a,
4099 vector bool long long __b) {
4100 return __a | (vector signed long long)__b;
4103 static vector unsigned long long __ATTRS_o_ai
4104 vec_vor(vector unsigned long long __a, vector unsigned long long __b) {
4108 static vector unsigned long long __ATTRS_o_ai
4109 vec_vor(vector bool long long __a, vector unsigned long long __b) {
4110 return (vector unsigned long long)__a | __b;
4113 static vector unsigned long long __ATTRS_o_ai
4114 vec_vor(vector unsigned long long __a, vector bool long long __b) {
4115 return __a | (vector unsigned long long)__b;
4118 static vector bool long long __ATTRS_o_ai vec_vor(vector bool long long __a,
4119 vector bool long long __b) {
4126 /* The various vector pack instructions have a big-endian bias, so for
4127 little endian we must handle reversed element numbering. */
4129 static vector signed char __ATTRS_o_ai vec_pack(vector signed short __a,
4130 vector signed short __b) {
4131 #ifdef __LITTLE_ENDIAN__
4132 return (vector signed char)vec_perm(
4134 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4135 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4137 return (vector signed char)vec_perm(
4139 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4140 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4144 static vector unsigned char __ATTRS_o_ai vec_pack(vector unsigned short __a,
4145 vector unsigned short __b) {
4146 #ifdef __LITTLE_ENDIAN__
4147 return (vector unsigned char)vec_perm(
4149 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4150 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4152 return (vector unsigned char)vec_perm(
4154 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4155 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4159 static vector bool char __ATTRS_o_ai vec_pack(vector bool short __a,
4160 vector bool short __b) {
4161 #ifdef __LITTLE_ENDIAN__
4162 return (vector bool char)vec_perm(
4164 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4165 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4167 return (vector bool char)vec_perm(
4169 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4170 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4174 static vector short __ATTRS_o_ai vec_pack(vector int __a, vector int __b) {
4175 #ifdef __LITTLE_ENDIAN__
4176 return (vector short)vec_perm(
4178 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4179 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4181 return (vector short)vec_perm(
4183 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4184 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4188 static vector unsigned short __ATTRS_o_ai vec_pack(vector unsigned int __a,
4189 vector unsigned int __b) {
4190 #ifdef __LITTLE_ENDIAN__
4191 return (vector unsigned short)vec_perm(
4193 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4194 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4196 return (vector unsigned short)vec_perm(
4198 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4199 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4203 static vector bool short __ATTRS_o_ai vec_pack(vector bool int __a,
4204 vector bool int __b) {
4205 #ifdef __LITTLE_ENDIAN__
4206 return (vector bool short)vec_perm(
4208 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4209 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4211 return (vector bool short)vec_perm(
4213 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4214 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4220 #define __builtin_altivec_vpkuhum vec_vpkuhum
4222 static vector signed char __ATTRS_o_ai vec_vpkuhum(vector signed short __a,
4223 vector signed short __b) {
4224 #ifdef __LITTLE_ENDIAN__
4225 return (vector signed char)vec_perm(
4227 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4228 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4230 return (vector signed char)vec_perm(
4232 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4233 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4237 static vector unsigned char __ATTRS_o_ai
4238 vec_vpkuhum(vector unsigned short __a, vector unsigned short __b) {
4239 #ifdef __LITTLE_ENDIAN__
4240 return (vector unsigned char)vec_perm(
4242 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4243 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4245 return (vector unsigned char)vec_perm(
4247 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4248 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4252 static vector bool char __ATTRS_o_ai vec_vpkuhum(vector bool short __a,
4253 vector bool short __b) {
4254 #ifdef __LITTLE_ENDIAN__
4255 return (vector bool char)vec_perm(
4257 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4258 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4260 return (vector bool char)vec_perm(
4262 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4263 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4269 #define __builtin_altivec_vpkuwum vec_vpkuwum
4271 static vector short __ATTRS_o_ai vec_vpkuwum(vector int __a, vector int __b) {
4272 #ifdef __LITTLE_ENDIAN__
4273 return (vector short)vec_perm(
4275 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4276 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4278 return (vector short)vec_perm(
4280 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4281 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4285 static vector unsigned short __ATTRS_o_ai vec_vpkuwum(vector unsigned int __a,
4286 vector unsigned int __b) {
4287 #ifdef __LITTLE_ENDIAN__
4288 return (vector unsigned short)vec_perm(
4290 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4291 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4293 return (vector unsigned short)vec_perm(
4295 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4296 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4300 static vector bool short __ATTRS_o_ai vec_vpkuwum(vector bool int __a,
4301 vector bool int __b) {
4302 #ifdef __LITTLE_ENDIAN__
4303 return (vector bool short)vec_perm(
4305 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4306 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4308 return (vector bool short)vec_perm(
4310 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4311 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4317 #ifdef __POWER8_VECTOR__
4318 #define __builtin_altivec_vpkudum vec_vpkudum
4320 static vector int __ATTRS_o_ai vec_vpkudum(vector long long __a,
4321 vector long long __b) {
4322 #ifdef __LITTLE_ENDIAN__
4323 return (vector int)vec_perm(
4325 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
4326 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
4328 return (vector int)vec_perm(
4330 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
4331 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
4335 static vector unsigned int __ATTRS_o_ai
4336 vec_vpkudum(vector unsigned long long __a, vector unsigned long long __b) {
4337 #ifdef __LITTLE_ENDIAN__
4338 return (vector unsigned int)vec_perm(
4340 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
4341 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
4343 return (vector unsigned int)vec_perm(
4345 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
4346 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
4350 static vector bool int __ATTRS_o_ai vec_vpkudum(vector bool long long __a,
4351 vector bool long long __b) {
4352 #ifdef __LITTLE_ENDIAN__
4353 return (vector bool int)vec_perm(
4354 (vector long long)__a, (vector long long)__b,
4355 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
4356 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
4358 return (vector bool int)vec_perm(
4359 (vector long long)__a, (vector long long)__b,
4360 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
4361 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
4368 static vector pixel __attribute__((__always_inline__))
4369 vec_packpx(vector unsigned int __a, vector unsigned int __b) {
4370 #ifdef __LITTLE_ENDIAN__
4371 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4373 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4379 static vector pixel __attribute__((__always_inline__))
4380 vec_vpkpx(vector unsigned int __a, vector unsigned int __b) {
4381 #ifdef __LITTLE_ENDIAN__
4382 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4384 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4390 static vector signed char __ATTRS_o_ai vec_packs(vector short __a,
4392 #ifdef __LITTLE_ENDIAN__
4393 return __builtin_altivec_vpkshss(__b, __a);
4395 return __builtin_altivec_vpkshss(__a, __b);
4399 static vector unsigned char __ATTRS_o_ai vec_packs(vector unsigned short __a,
4400 vector unsigned short __b) {
4401 #ifdef __LITTLE_ENDIAN__
4402 return __builtin_altivec_vpkuhus(__b, __a);
4404 return __builtin_altivec_vpkuhus(__a, __b);
4408 static vector signed short __ATTRS_o_ai vec_packs(vector int __a,
4410 #ifdef __LITTLE_ENDIAN__
4411 return __builtin_altivec_vpkswss(__b, __a);
4413 return __builtin_altivec_vpkswss(__a, __b);
4417 static vector unsigned short __ATTRS_o_ai vec_packs(vector unsigned int __a,
4418 vector unsigned int __b) {
4419 #ifdef __LITTLE_ENDIAN__
4420 return __builtin_altivec_vpkuwus(__b, __a);
4422 return __builtin_altivec_vpkuwus(__a, __b);
4426 #ifdef __POWER8_VECTOR__
4427 static vector int __ATTRS_o_ai vec_packs(vector long long __a,
4428 vector long long __b) {
4429 #ifdef __LITTLE_ENDIAN__
4430 return __builtin_altivec_vpksdss(__b, __a);
4432 return __builtin_altivec_vpksdss(__a, __b);
4436 static vector unsigned int __ATTRS_o_ai
4437 vec_packs(vector unsigned long long __a, vector unsigned long long __b) {
4438 #ifdef __LITTLE_ENDIAN__
4439 return __builtin_altivec_vpkudus(__b, __a);
4441 return __builtin_altivec_vpkudus(__a, __b);
4448 static vector signed char __attribute__((__always_inline__))
4449 vec_vpkshss(vector short __a, vector short __b) {
4450 #ifdef __LITTLE_ENDIAN__
4451 return __builtin_altivec_vpkshss(__b, __a);
4453 return __builtin_altivec_vpkshss(__a, __b);
4459 #ifdef __POWER8_VECTOR__
4460 static vector int __ATTRS_o_ai vec_vpksdss(vector long long __a,
4461 vector long long __b) {
4462 #ifdef __LITTLE_ENDIAN__
4463 return __builtin_altivec_vpksdss(__b, __a);
4465 return __builtin_altivec_vpksdss(__a, __b);
4472 static vector unsigned char __attribute__((__always_inline__))
4473 vec_vpkuhus(vector unsigned short __a, vector unsigned short __b) {
4474 #ifdef __LITTLE_ENDIAN__
4475 return __builtin_altivec_vpkuhus(__b, __a);
4477 return __builtin_altivec_vpkuhus(__a, __b);
4483 #ifdef __POWER8_VECTOR__
4484 static vector unsigned int __attribute__((__always_inline__))
4485 vec_vpkudus(vector unsigned long long __a, vector unsigned long long __b) {
4486 #ifdef __LITTLE_ENDIAN__
4487 return __builtin_altivec_vpkudus(__b, __a);
4489 return __builtin_altivec_vpkudus(__a, __b);
4496 static vector signed short __attribute__((__always_inline__))
4497 vec_vpkswss(vector int __a, vector int __b) {
4498 #ifdef __LITTLE_ENDIAN__
4499 return __builtin_altivec_vpkswss(__b, __a);
4501 return __builtin_altivec_vpkswss(__a, __b);
4507 static vector unsigned short __attribute__((__always_inline__))
4508 vec_vpkuwus(vector unsigned int __a, vector unsigned int __b) {
4509 #ifdef __LITTLE_ENDIAN__
4510 return __builtin_altivec_vpkuwus(__b, __a);
4512 return __builtin_altivec_vpkuwus(__a, __b);
4518 static vector unsigned char __ATTRS_o_ai vec_packsu(vector short __a,
4520 #ifdef __LITTLE_ENDIAN__
4521 return __builtin_altivec_vpkshus(__b, __a);
4523 return __builtin_altivec_vpkshus(__a, __b);
4527 static vector unsigned char __ATTRS_o_ai vec_packsu(vector unsigned short __a,
4528 vector unsigned short __b) {
4529 #ifdef __LITTLE_ENDIAN__
4530 return __builtin_altivec_vpkuhus(__b, __a);
4532 return __builtin_altivec_vpkuhus(__a, __b);
4536 static vector unsigned short __ATTRS_o_ai vec_packsu(vector int __a,
4538 #ifdef __LITTLE_ENDIAN__
4539 return __builtin_altivec_vpkswus(__b, __a);
4541 return __builtin_altivec_vpkswus(__a, __b);
4545 static vector unsigned short __ATTRS_o_ai vec_packsu(vector unsigned int __a,
4546 vector unsigned int __b) {
4547 #ifdef __LITTLE_ENDIAN__
4548 return __builtin_altivec_vpkuwus(__b, __a);
4550 return __builtin_altivec_vpkuwus(__a, __b);
4554 #ifdef __POWER8_VECTOR__
4555 static vector unsigned int __ATTRS_o_ai vec_packsu(vector long long __a,
4556 vector long long __b) {
4557 #ifdef __LITTLE_ENDIAN__
4558 return __builtin_altivec_vpksdus(__b, __a);
4560 return __builtin_altivec_vpksdus(__a, __b);
4564 static vector unsigned int __ATTRS_o_ai
4565 vec_packsu(vector unsigned long long __a, vector unsigned long long __b) {
4566 #ifdef __LITTLE_ENDIAN__
4567 return __builtin_altivec_vpkudus(__b, __a);
4569 return __builtin_altivec_vpkudus(__a, __b);
4576 static vector unsigned char __ATTRS_o_ai vec_vpkshus(vector short __a,
4578 #ifdef __LITTLE_ENDIAN__
4579 return __builtin_altivec_vpkshus(__b, __a);
4581 return __builtin_altivec_vpkshus(__a, __b);
4585 static vector unsigned char __ATTRS_o_ai
4586 vec_vpkshus(vector unsigned short __a, vector unsigned short __b) {
4587 #ifdef __LITTLE_ENDIAN__
4588 return __builtin_altivec_vpkuhus(__b, __a);
4590 return __builtin_altivec_vpkuhus(__a, __b);
4596 static vector unsigned short __ATTRS_o_ai vec_vpkswus(vector int __a,
4598 #ifdef __LITTLE_ENDIAN__
4599 return __builtin_altivec_vpkswus(__b, __a);
4601 return __builtin_altivec_vpkswus(__a, __b);
4605 static vector unsigned short __ATTRS_o_ai vec_vpkswus(vector unsigned int __a,
4606 vector unsigned int __b) {
4607 #ifdef __LITTLE_ENDIAN__
4608 return __builtin_altivec_vpkuwus(__b, __a);
4610 return __builtin_altivec_vpkuwus(__a, __b);
4616 #ifdef __POWER8_VECTOR__
4617 static vector unsigned int __ATTRS_o_ai vec_vpksdus(vector long long __a,
4618 vector long long __b) {
4619 #ifdef __LITTLE_ENDIAN__
4620 return __builtin_altivec_vpksdus(__b, __a);
4622 return __builtin_altivec_vpksdus(__a, __b);
4629 // The vperm instruction is defined architecturally with a big-endian bias.
4630 // For little endian, we swap the input operands and invert the permute
4631 // control vector. Only the rightmost 5 bits matter, so we could use
4632 // a vector of all 31s instead of all 255s to perform the inversion.
4633 // However, when the PCV is not a constant, using 255 has an advantage
4634 // in that the vec_xor can be recognized as a vec_nor (and for P8 and
4635 // later, possibly a vec_nand).
4637 static vector signed char __ATTRS_o_ai vec_perm(vector signed char __a,
4638 vector signed char __b,
4639 vector unsigned char __c) {
4640 #ifdef __LITTLE_ENDIAN__
4641 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4642 255, 255, 255, 255, 255, 255, 255, 255};
4643 __d = vec_xor(__c, __d);
4644 return (vector signed char)__builtin_altivec_vperm_4si((vector int)__b,
4645 (vector int)__a, __d);
4647 return (vector signed char)__builtin_altivec_vperm_4si((vector int)__a,
4648 (vector int)__b, __c);
4652 static vector unsigned char __ATTRS_o_ai vec_perm(vector unsigned char __a,
4653 vector unsigned char __b,
4654 vector unsigned char __c) {
4655 #ifdef __LITTLE_ENDIAN__
4656 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4657 255, 255, 255, 255, 255, 255, 255, 255};
4658 __d = vec_xor(__c, __d);
4659 return (vector unsigned char)__builtin_altivec_vperm_4si(
4660 (vector int)__b, (vector int)__a, __d);
4662 return (vector unsigned char)__builtin_altivec_vperm_4si(
4663 (vector int)__a, (vector int)__b, __c);
4667 static vector bool char __ATTRS_o_ai vec_perm(vector bool char __a,
4668 vector bool char __b,
4669 vector unsigned char __c) {
4670 #ifdef __LITTLE_ENDIAN__
4671 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4672 255, 255, 255, 255, 255, 255, 255, 255};
4673 __d = vec_xor(__c, __d);
4674 return (vector bool char)__builtin_altivec_vperm_4si((vector int)__b,
4675 (vector int)__a, __d);
4677 return (vector bool char)__builtin_altivec_vperm_4si((vector int)__a,
4678 (vector int)__b, __c);
4682 static vector short __ATTRS_o_ai vec_perm(vector short __a, vector short __b,
4683 vector unsigned char __c) {
4684 #ifdef __LITTLE_ENDIAN__
4685 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4686 255, 255, 255, 255, 255, 255, 255, 255};
4687 __d = vec_xor(__c, __d);
4688 return (vector short)__builtin_altivec_vperm_4si((vector int)__b,
4689 (vector int)__a, __d);
4691 return (vector short)__builtin_altivec_vperm_4si((vector int)__a,
4692 (vector int)__b, __c);
4696 static vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a,
4697 vector unsigned short __b,
4698 vector unsigned char __c) {
4699 #ifdef __LITTLE_ENDIAN__
4700 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4701 255, 255, 255, 255, 255, 255, 255, 255};
4702 __d = vec_xor(__c, __d);
4703 return (vector unsigned short)__builtin_altivec_vperm_4si(
4704 (vector int)__b, (vector int)__a, __d);
4706 return (vector unsigned short)__builtin_altivec_vperm_4si(
4707 (vector int)__a, (vector int)__b, __c);
4711 static vector bool short __ATTRS_o_ai vec_perm(vector bool short __a,
4712 vector bool short __b,
4713 vector unsigned char __c) {
4714 #ifdef __LITTLE_ENDIAN__
4715 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4716 255, 255, 255, 255, 255, 255, 255, 255};
4717 __d = vec_xor(__c, __d);
4718 return (vector bool short)__builtin_altivec_vperm_4si((vector int)__b,
4719 (vector int)__a, __d);
4721 return (vector bool short)__builtin_altivec_vperm_4si((vector int)__a,
4722 (vector int)__b, __c);
4726 static vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b,
4727 vector unsigned char __c) {
4728 #ifdef __LITTLE_ENDIAN__
4729 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4730 255, 255, 255, 255, 255, 255, 255, 255};
4731 __d = vec_xor(__c, __d);
4732 return (vector pixel)__builtin_altivec_vperm_4si((vector int)__b,
4733 (vector int)__a, __d);
4735 return (vector pixel)__builtin_altivec_vperm_4si((vector int)__a,
4736 (vector int)__b, __c);
4740 static vector int __ATTRS_o_ai vec_perm(vector int __a, vector int __b,
4741 vector unsigned char __c) {
4742 #ifdef __LITTLE_ENDIAN__
4743 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4744 255, 255, 255, 255, 255, 255, 255, 255};
4745 __d = vec_xor(__c, __d);
4746 return (vector int)__builtin_altivec_vperm_4si(__b, __a, __d);
4748 return (vector int)__builtin_altivec_vperm_4si(__a, __b, __c);
4752 static vector unsigned int __ATTRS_o_ai vec_perm(vector unsigned int __a,
4753 vector unsigned int __b,
4754 vector unsigned char __c) {
4755 #ifdef __LITTLE_ENDIAN__
4756 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4757 255, 255, 255, 255, 255, 255, 255, 255};
4758 __d = vec_xor(__c, __d);
4759 return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__b,
4760 (vector int)__a, __d);
4762 return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__a,
4763 (vector int)__b, __c);
4767 static vector bool int __ATTRS_o_ai vec_perm(vector bool int __a,
4768 vector bool int __b,
4769 vector unsigned char __c) {
4770 #ifdef __LITTLE_ENDIAN__
4771 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4772 255, 255, 255, 255, 255, 255, 255, 255};
4773 __d = vec_xor(__c, __d);
4774 return (vector bool int)__builtin_altivec_vperm_4si((vector int)__b,
4775 (vector int)__a, __d);
4777 return (vector bool int)__builtin_altivec_vperm_4si((vector int)__a,
4778 (vector int)__b, __c);
4782 static vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b,
4783 vector unsigned char __c) {
4784 #ifdef __LITTLE_ENDIAN__
4785 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4786 255, 255, 255, 255, 255, 255, 255, 255};
4787 __d = vec_xor(__c, __d);
4788 return (vector float)__builtin_altivec_vperm_4si((vector int)__b,
4789 (vector int)__a, __d);
4791 return (vector float)__builtin_altivec_vperm_4si((vector int)__a,
4792 (vector int)__b, __c);
4797 static vector long long __ATTRS_o_ai vec_perm(vector long long __a,
4798 vector long long __b,
4799 vector unsigned char __c) {
4800 #ifdef __LITTLE_ENDIAN__
4801 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4802 255, 255, 255, 255, 255, 255, 255, 255};
4803 __d = vec_xor(__c, __d);
4804 return (vector long long)__builtin_altivec_vperm_4si(__b, __a, __d);
4806 return (vector long long)__builtin_altivec_vperm_4si(__a, __b, __c);
4810 static vector unsigned long long __ATTRS_o_ai
4811 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
4812 vector unsigned char __c) {
4813 #ifdef __LITTLE_ENDIAN__
4814 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4815 255, 255, 255, 255, 255, 255, 255, 255};
4816 __d = vec_xor(__c, __d);
4817 return (vector unsigned long long)__builtin_altivec_vperm_4si(
4818 (vector int)__b, (vector int)__a, __d);
4820 return (vector unsigned long long)__builtin_altivec_vperm_4si(
4821 (vector int)__a, (vector int)__b, __c);
4825 static vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b,
4826 vector unsigned char __c) {
4827 #ifdef __LITTLE_ENDIAN__
4828 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
4829 255, 255, 255, 255, 255, 255, 255, 255};
4830 __d = vec_xor(__c, __d);
4831 return (vector double)__builtin_altivec_vperm_4si((vector int)__b,
4832 (vector int)__a, __d);
4834 return (vector double)__builtin_altivec_vperm_4si((vector int)__a,
4835 (vector int)__b, __c);
4842 static vector signed char __ATTRS_o_ai vec_vperm(vector signed char __a,
4843 vector signed char __b,
4844 vector unsigned char __c) {
4845 return vec_perm(__a, __b, __c);
4848 static vector unsigned char __ATTRS_o_ai vec_vperm(vector unsigned char __a,
4849 vector unsigned char __b,
4850 vector unsigned char __c) {
4851 return vec_perm(__a, __b, __c);
4854 static vector bool char __ATTRS_o_ai vec_vperm(vector bool char __a,
4855 vector bool char __b,
4856 vector unsigned char __c) {
4857 return vec_perm(__a, __b, __c);
4860 static vector short __ATTRS_o_ai vec_vperm(vector short __a, vector short __b,
4861 vector unsigned char __c) {
4862 return vec_perm(__a, __b, __c);
4865 static vector unsigned short __ATTRS_o_ai vec_vperm(vector unsigned short __a,
4866 vector unsigned short __b,
4867 vector unsigned char __c) {
4868 return vec_perm(__a, __b, __c);
4871 static vector bool short __ATTRS_o_ai vec_vperm(vector bool short __a,
4872 vector bool short __b,
4873 vector unsigned char __c) {
4874 return vec_perm(__a, __b, __c);
4877 static vector pixel __ATTRS_o_ai vec_vperm(vector pixel __a, vector pixel __b,
4878 vector unsigned char __c) {
4879 return vec_perm(__a, __b, __c);
4882 static vector int __ATTRS_o_ai vec_vperm(vector int __a, vector int __b,
4883 vector unsigned char __c) {
4884 return vec_perm(__a, __b, __c);
4887 static vector unsigned int __ATTRS_o_ai vec_vperm(vector unsigned int __a,
4888 vector unsigned int __b,
4889 vector unsigned char __c) {
4890 return vec_perm(__a, __b, __c);
4893 static vector bool int __ATTRS_o_ai vec_vperm(vector bool int __a,
4894 vector bool int __b,
4895 vector unsigned char __c) {
4896 return vec_perm(__a, __b, __c);
4899 static vector float __ATTRS_o_ai vec_vperm(vector float __a, vector float __b,
4900 vector unsigned char __c) {
4901 return vec_perm(__a, __b, __c);
4905 static vector long long __ATTRS_o_ai vec_vperm(vector long long __a,
4906 vector long long __b,
4907 vector unsigned char __c) {
4908 return vec_perm(__a, __b, __c);
4911 static vector unsigned long long __ATTRS_o_ai
4912 vec_vperm(vector unsigned long long __a, vector unsigned long long __b,
4913 vector unsigned char __c) {
4914 return vec_perm(__a, __b, __c);
4917 static vector double __ATTRS_o_ai vec_vperm(vector double __a,
4919 vector unsigned char __c) {
4920 return vec_perm(__a, __b, __c);
4926 static vector float __attribute__((__always_inline__))
4927 vec_re(vector float __a) {
4928 return __builtin_altivec_vrefp(__a);
4933 static vector float __attribute__((__always_inline__))
4934 vec_vrefp(vector float __a) {
4935 return __builtin_altivec_vrefp(__a);
4940 static vector signed char __ATTRS_o_ai vec_rl(vector signed char __a,
4941 vector unsigned char __b) {
4942 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
4945 static vector unsigned char __ATTRS_o_ai vec_rl(vector unsigned char __a,
4946 vector unsigned char __b) {
4947 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
4950 static vector short __ATTRS_o_ai vec_rl(vector short __a,
4951 vector unsigned short __b) {
4952 return __builtin_altivec_vrlh(__a, __b);
4955 static vector unsigned short __ATTRS_o_ai vec_rl(vector unsigned short __a,
4956 vector unsigned short __b) {
4957 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
4960 static vector int __ATTRS_o_ai vec_rl(vector int __a, vector unsigned int __b) {
4961 return __builtin_altivec_vrlw(__a, __b);
4964 static vector unsigned int __ATTRS_o_ai vec_rl(vector unsigned int __a,
4965 vector unsigned int __b) {
4966 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
4969 #ifdef __POWER8_VECTOR__
4970 static vector signed long long __ATTRS_o_ai
4971 vec_rl(vector signed long long __a, vector unsigned long long __b) {
4972 return __builtin_altivec_vrld(__a, __b);
4975 static vector unsigned long long __ATTRS_o_ai
4976 vec_rl(vector unsigned long long __a, vector unsigned long long __b) {
4977 return __builtin_altivec_vrld(__a, __b);
4983 static vector signed char __ATTRS_o_ai vec_vrlb(vector signed char __a,
4984 vector unsigned char __b) {
4985 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
4988 static vector unsigned char __ATTRS_o_ai vec_vrlb(vector unsigned char __a,
4989 vector unsigned char __b) {
4990 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
4995 static vector short __ATTRS_o_ai vec_vrlh(vector short __a,
4996 vector unsigned short __b) {
4997 return __builtin_altivec_vrlh(__a, __b);
5000 static vector unsigned short __ATTRS_o_ai vec_vrlh(vector unsigned short __a,
5001 vector unsigned short __b) {
5002 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
5007 static vector int __ATTRS_o_ai vec_vrlw(vector int __a,
5008 vector unsigned int __b) {
5009 return __builtin_altivec_vrlw(__a, __b);
5012 static vector unsigned int __ATTRS_o_ai vec_vrlw(vector unsigned int __a,
5013 vector unsigned int __b) {
5014 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
5019 static vector float __attribute__((__always_inline__))
5020 vec_round(vector float __a) {
5021 return __builtin_altivec_vrfin(__a);
5026 static vector float __attribute__((__always_inline__))
5027 vec_vrfin(vector float __a) {
5028 return __builtin_altivec_vrfin(__a);
5033 static __vector float __attribute__((__always_inline__))
5034 vec_rsqrte(vector float __a) {
5035 return __builtin_altivec_vrsqrtefp(__a);
5040 static __vector float __attribute__((__always_inline__))
5041 vec_vrsqrtefp(vector float __a) {
5042 return __builtin_altivec_vrsqrtefp(__a);
5047 #define __builtin_altivec_vsel_4si vec_sel
5049 static vector signed char __ATTRS_o_ai vec_sel(vector signed char __a,
5050 vector signed char __b,
5051 vector unsigned char __c) {
5052 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5055 static vector signed char __ATTRS_o_ai vec_sel(vector signed char __a,
5056 vector signed char __b,
5057 vector bool char __c) {
5058 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5061 static vector unsigned char __ATTRS_o_ai vec_sel(vector unsigned char __a,
5062 vector unsigned char __b,
5063 vector unsigned char __c) {
5064 return (__a & ~__c) | (__b & __c);
5067 static vector unsigned char __ATTRS_o_ai vec_sel(vector unsigned char __a,
5068 vector unsigned char __b,
5069 vector bool char __c) {
5070 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
5073 static vector bool char __ATTRS_o_ai vec_sel(vector bool char __a,
5074 vector bool char __b,
5075 vector unsigned char __c) {
5076 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
5079 static vector bool char __ATTRS_o_ai vec_sel(vector bool char __a,
5080 vector bool char __b,
5081 vector bool char __c) {
5082 return (__a & ~__c) | (__b & __c);
5085 static vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b,
5086 vector unsigned short __c) {
5087 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5090 static vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b,
5091 vector bool short __c) {
5092 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5095 static vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a,
5096 vector unsigned short __b,
5097 vector unsigned short __c) {
5098 return (__a & ~__c) | (__b & __c);
5101 static vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a,
5102 vector unsigned short __b,
5103 vector bool short __c) {
5104 return (__a & ~(vector unsigned short)__c) |
5105 (__b & (vector unsigned short)__c);
5108 static vector bool short __ATTRS_o_ai vec_sel(vector bool short __a,
5109 vector bool short __b,
5110 vector unsigned short __c) {
5111 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
5114 static vector bool short __ATTRS_o_ai vec_sel(vector bool short __a,
5115 vector bool short __b,
5116 vector bool short __c) {
5117 return (__a & ~__c) | (__b & __c);
5120 static vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b,
5121 vector unsigned int __c) {
5122 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5125 static vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b,
5126 vector bool int __c) {
5127 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5130 static vector unsigned int __ATTRS_o_ai vec_sel(vector unsigned int __a,
5131 vector unsigned int __b,
5132 vector unsigned int __c) {
5133 return (__a & ~__c) | (__b & __c);
5136 static vector unsigned int __ATTRS_o_ai vec_sel(vector unsigned int __a,
5137 vector unsigned int __b,
5138 vector bool int __c) {
5139 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
5142 static vector bool int __ATTRS_o_ai vec_sel(vector bool int __a,
5143 vector bool int __b,
5144 vector unsigned int __c) {
5145 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
5148 static vector bool int __ATTRS_o_ai vec_sel(vector bool int __a,
5149 vector bool int __b,
5150 vector bool int __c) {
5151 return (__a & ~__c) | (__b & __c);
5154 static vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b,
5155 vector unsigned int __c) {
5156 vector int __res = ((vector int)__a & ~(vector int)__c) |
5157 ((vector int)__b & (vector int)__c);
5158 return (vector float)__res;
5161 static vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b,
5162 vector bool int __c) {
5163 vector int __res = ((vector int)__a & ~(vector int)__c) |
5164 ((vector int)__b & (vector int)__c);
5165 return (vector float)__res;
5170 static vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a,
5171 vector signed char __b,
5172 vector unsigned char __c) {
5173 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5176 static vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a,
5177 vector signed char __b,
5178 vector bool char __c) {
5179 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5182 static vector unsigned char __ATTRS_o_ai vec_vsel(vector unsigned char __a,
5183 vector unsigned char __b,
5184 vector unsigned char __c) {
5185 return (__a & ~__c) | (__b & __c);
5188 static vector unsigned char __ATTRS_o_ai vec_vsel(vector unsigned char __a,
5189 vector unsigned char __b,
5190 vector bool char __c) {
5191 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
5194 static vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a,
5195 vector bool char __b,
5196 vector unsigned char __c) {
5197 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
5200 static vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a,
5201 vector bool char __b,
5202 vector bool char __c) {
5203 return (__a & ~__c) | (__b & __c);
5206 static vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b,
5207 vector unsigned short __c) {
5208 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5211 static vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b,
5212 vector bool short __c) {
5213 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5216 static vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a,
5217 vector unsigned short __b,
5218 vector unsigned short __c) {
5219 return (__a & ~__c) | (__b & __c);
5222 static vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a,
5223 vector unsigned short __b,
5224 vector bool short __c) {
5225 return (__a & ~(vector unsigned short)__c) |
5226 (__b & (vector unsigned short)__c);
5229 static vector bool short __ATTRS_o_ai vec_vsel(vector bool short __a,
5230 vector bool short __b,
5231 vector unsigned short __c) {
5232 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
5235 static vector bool short __ATTRS_o_ai vec_vsel(vector bool short __a,
5236 vector bool short __b,
5237 vector bool short __c) {
5238 return (__a & ~__c) | (__b & __c);
5241 static vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b,
5242 vector unsigned int __c) {
5243 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5246 static vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b,
5247 vector bool int __c) {
5248 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5251 static vector unsigned int __ATTRS_o_ai vec_vsel(vector unsigned int __a,
5252 vector unsigned int __b,
5253 vector unsigned int __c) {
5254 return (__a & ~__c) | (__b & __c);
5257 static vector unsigned int __ATTRS_o_ai vec_vsel(vector unsigned int __a,
5258 vector unsigned int __b,
5259 vector bool int __c) {
5260 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
5263 static vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a,
5264 vector bool int __b,
5265 vector unsigned int __c) {
5266 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
5269 static vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a,
5270 vector bool int __b,
5271 vector bool int __c) {
5272 return (__a & ~__c) | (__b & __c);
5275 static vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b,
5276 vector unsigned int __c) {
5277 vector int __res = ((vector int)__a & ~(vector int)__c) |
5278 ((vector int)__b & (vector int)__c);
5279 return (vector float)__res;
5282 static vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b,
5283 vector bool int __c) {
5284 vector int __res = ((vector int)__a & ~(vector int)__c) |
5285 ((vector int)__b & (vector int)__c);
5286 return (vector float)__res;
5291 static vector signed char __ATTRS_o_ai vec_sl(vector signed char __a,
5292 vector unsigned char __b) {
5293 return __a << (vector signed char)__b;
5296 static vector unsigned char __ATTRS_o_ai vec_sl(vector unsigned char __a,
5297 vector unsigned char __b) {
5301 static vector short __ATTRS_o_ai vec_sl(vector short __a,
5302 vector unsigned short __b) {
5303 return __a << (vector short)__b;
5306 static vector unsigned short __ATTRS_o_ai vec_sl(vector unsigned short __a,
5307 vector unsigned short __b) {
5311 static vector int __ATTRS_o_ai vec_sl(vector int __a, vector unsigned int __b) {
5312 return __a << (vector int)__b;
5315 static vector unsigned int __ATTRS_o_ai vec_sl(vector unsigned int __a,
5316 vector unsigned int __b) {
5320 #ifdef __POWER8_VECTOR__
5321 static vector signed long long __ATTRS_o_ai
5322 vec_sl(vector signed long long __a, vector unsigned long long __b) {
5323 return __a << (vector long long)__b;
5326 static vector unsigned long long __ATTRS_o_ai
5327 vec_sl(vector unsigned long long __a, vector unsigned long long __b) {
5334 #define __builtin_altivec_vslb vec_vslb
5336 static vector signed char __ATTRS_o_ai vec_vslb(vector signed char __a,
5337 vector unsigned char __b) {
5338 return vec_sl(__a, __b);
5341 static vector unsigned char __ATTRS_o_ai vec_vslb(vector unsigned char __a,
5342 vector unsigned char __b) {
5343 return vec_sl(__a, __b);
5348 #define __builtin_altivec_vslh vec_vslh
5350 static vector short __ATTRS_o_ai vec_vslh(vector short __a,
5351 vector unsigned short __b) {
5352 return vec_sl(__a, __b);
5355 static vector unsigned short __ATTRS_o_ai vec_vslh(vector unsigned short __a,
5356 vector unsigned short __b) {
5357 return vec_sl(__a, __b);
5362 #define __builtin_altivec_vslw vec_vslw
5364 static vector int __ATTRS_o_ai vec_vslw(vector int __a,
5365 vector unsigned int __b) {
5366 return vec_sl(__a, __b);
5369 static vector unsigned int __ATTRS_o_ai vec_vslw(vector unsigned int __a,
5370 vector unsigned int __b) {
5371 return vec_sl(__a, __b);
5376 #define __builtin_altivec_vsldoi_4si vec_sld
5378 static vector signed char __ATTRS_o_ai vec_sld(vector signed char __a,
5379 vector signed char __b,
5380 unsigned char __c) {
5383 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5384 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5385 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5388 static vector unsigned char __ATTRS_o_ai vec_sld(vector unsigned char __a,
5389 vector unsigned char __b,
5390 unsigned char __c) {
5393 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5394 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5395 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5398 static vector short __ATTRS_o_ai vec_sld(vector short __a, vector short __b,
5399 unsigned char __c) {
5402 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5403 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5404 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5407 static vector unsigned short __ATTRS_o_ai vec_sld(vector unsigned short __a,
5408 vector unsigned short __b,
5409 unsigned char __c) {
5412 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5413 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5414 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5417 static vector pixel __ATTRS_o_ai vec_sld(vector pixel __a, vector pixel __b,
5418 unsigned char __c) {
5421 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5422 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5423 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5426 static vector int __ATTRS_o_ai vec_sld(vector int __a, vector int __b,
5427 unsigned char __c) {
5430 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5431 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5432 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5435 static vector unsigned int __ATTRS_o_ai vec_sld(vector unsigned int __a,
5436 vector unsigned int __b,
5437 unsigned char __c) {
5440 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5441 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5442 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5445 static vector float __ATTRS_o_ai vec_sld(vector float __a, vector float __b,
5446 unsigned char __c) {
5449 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5450 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5451 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5456 static vector signed char __ATTRS_o_ai vec_vsldoi(vector signed char __a,
5457 vector signed char __b,
5458 unsigned char __c) {
5461 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5462 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5463 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5466 static vector unsigned char __ATTRS_o_ai vec_vsldoi(vector unsigned char __a,
5467 vector unsigned char __b,
5468 unsigned char __c) {
5471 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5472 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5473 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5476 static vector short __ATTRS_o_ai vec_vsldoi(vector short __a, vector short __b,
5477 unsigned char __c) {
5480 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5481 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5482 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5485 static vector unsigned short __ATTRS_o_ai vec_vsldoi(vector unsigned short __a,
5486 vector unsigned short __b,
5487 unsigned char __c) {
5490 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5491 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5492 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5495 static vector pixel __ATTRS_o_ai vec_vsldoi(vector pixel __a, vector pixel __b,
5496 unsigned char __c) {
5499 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5500 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5501 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5504 static vector int __ATTRS_o_ai vec_vsldoi(vector int __a, vector int __b,
5505 unsigned char __c) {
5508 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5509 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5510 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5513 static vector unsigned int __ATTRS_o_ai vec_vsldoi(vector unsigned int __a,
5514 vector unsigned int __b,
5515 unsigned char __c) {
5518 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5519 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5520 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5523 static vector float __ATTRS_o_ai vec_vsldoi(vector float __a, vector float __b,
5524 unsigned char __c) {
5527 (vector unsigned char)(__c, __c + 1, __c + 2, __c + 3, __c + 4, __c + 5,
5528 __c + 6, __c + 7, __c + 8, __c + 9, __c + 10,
5529 __c + 11, __c + 12, __c + 13, __c + 14, __c + 15));
5534 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
5535 vector unsigned char __b) {
5536 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5540 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
5541 vector unsigned short __b) {
5542 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5546 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
5547 vector unsigned int __b) {
5548 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5552 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
5553 vector unsigned char __b) {
5554 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5558 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
5559 vector unsigned short __b) {
5560 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5564 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
5565 vector unsigned int __b) {
5566 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5570 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
5571 vector unsigned char __b) {
5572 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5576 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
5577 vector unsigned short __b) {
5578 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5582 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
5583 vector unsigned int __b) {
5584 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5588 static vector short __ATTRS_o_ai vec_sll(vector short __a,
5589 vector unsigned char __b) {
5590 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5593 static vector short __ATTRS_o_ai vec_sll(vector short __a,
5594 vector unsigned short __b) {
5595 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5598 static vector short __ATTRS_o_ai vec_sll(vector short __a,
5599 vector unsigned int __b) {
5600 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5603 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
5604 vector unsigned char __b) {
5605 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
5609 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
5610 vector unsigned short __b) {
5611 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
5615 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
5616 vector unsigned int __b) {
5617 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
5621 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
5622 vector unsigned char __b) {
5623 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
5627 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
5628 vector unsigned short __b) {
5629 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
5633 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
5634 vector unsigned int __b) {
5635 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
5639 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
5640 vector unsigned char __b) {
5641 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5644 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
5645 vector unsigned short __b) {
5646 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5649 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
5650 vector unsigned int __b) {
5651 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5654 static vector int __ATTRS_o_ai vec_sll(vector int __a,
5655 vector unsigned char __b) {
5656 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5659 static vector int __ATTRS_o_ai vec_sll(vector int __a,
5660 vector unsigned short __b) {
5661 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5664 static vector int __ATTRS_o_ai vec_sll(vector int __a,
5665 vector unsigned int __b) {
5666 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5669 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
5670 vector unsigned char __b) {
5671 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
5675 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
5676 vector unsigned short __b) {
5677 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
5681 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
5682 vector unsigned int __b) {
5683 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
5687 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
5688 vector unsigned char __b) {
5689 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
5693 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
5694 vector unsigned short __b) {
5695 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
5699 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
5700 vector unsigned int __b) {
5701 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
5707 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
5708 vector unsigned char __b) {
5709 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5713 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
5714 vector unsigned short __b) {
5715 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5719 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
5720 vector unsigned int __b) {
5721 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
5725 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
5726 vector unsigned char __b) {
5727 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5731 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
5732 vector unsigned short __b) {
5733 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5737 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
5738 vector unsigned int __b) {
5739 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
5743 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
5744 vector unsigned char __b) {
5745 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5749 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
5750 vector unsigned short __b) {
5751 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5755 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
5756 vector unsigned int __b) {
5757 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
5761 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
5762 vector unsigned char __b) {
5763 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5766 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
5767 vector unsigned short __b) {
5768 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5771 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
5772 vector unsigned int __b) {
5773 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5776 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
5777 vector unsigned char __b) {
5778 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
5782 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
5783 vector unsigned short __b) {
5784 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
5788 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
5789 vector unsigned int __b) {
5790 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
5794 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
5795 vector unsigned char __b) {
5796 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
5800 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
5801 vector unsigned short __b) {
5802 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
5806 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
5807 vector unsigned int __b) {
5808 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
5812 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
5813 vector unsigned char __b) {
5814 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5817 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
5818 vector unsigned short __b) {
5819 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5822 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
5823 vector unsigned int __b) {
5824 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5827 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
5828 vector unsigned char __b) {
5829 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5832 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
5833 vector unsigned short __b) {
5834 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5837 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
5838 vector unsigned int __b) {
5839 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5842 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
5843 vector unsigned char __b) {
5844 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
5848 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
5849 vector unsigned short __b) {
5850 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
5854 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
5855 vector unsigned int __b) {
5856 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
5860 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
5861 vector unsigned char __b) {
5862 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
5866 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
5867 vector unsigned short __b) {
5868 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
5872 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
5873 vector unsigned int __b) {
5874 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
5880 static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a,
5881 vector signed char __b) {
5882 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
5886 static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a,
5887 vector unsigned char __b) {
5888 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
5892 static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a,
5893 vector signed char __b) {
5894 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
5898 static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a,
5899 vector unsigned char __b) {
5900 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
5904 static vector short __ATTRS_o_ai vec_slo(vector short __a,
5905 vector signed char __b) {
5906 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5909 static vector short __ATTRS_o_ai vec_slo(vector short __a,
5910 vector unsigned char __b) {
5911 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5914 static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a,
5915 vector signed char __b) {
5916 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
5920 static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a,
5921 vector unsigned char __b) {
5922 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
5926 static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a,
5927 vector signed char __b) {
5928 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5931 static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a,
5932 vector unsigned char __b) {
5933 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5936 static vector int __ATTRS_o_ai vec_slo(vector int __a, vector signed char __b) {
5937 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
5940 static vector int __ATTRS_o_ai vec_slo(vector int __a,
5941 vector unsigned char __b) {
5942 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
5945 static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a,
5946 vector signed char __b) {
5947 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
5951 static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a,
5952 vector unsigned char __b) {
5953 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
5957 static vector float __ATTRS_o_ai vec_slo(vector float __a,
5958 vector signed char __b) {
5959 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5962 static vector float __ATTRS_o_ai vec_slo(vector float __a,
5963 vector unsigned char __b) {
5964 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5969 static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a,
5970 vector signed char __b) {
5971 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
5975 static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a,
5976 vector unsigned char __b) {
5977 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
5981 static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a,
5982 vector signed char __b) {
5983 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
5987 static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a,
5988 vector unsigned char __b) {
5989 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
5993 static vector short __ATTRS_o_ai vec_vslo(vector short __a,
5994 vector signed char __b) {
5995 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5998 static vector short __ATTRS_o_ai vec_vslo(vector short __a,
5999 vector unsigned char __b) {
6000 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6003 static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a,
6004 vector signed char __b) {
6005 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
6009 static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a,
6010 vector unsigned char __b) {
6011 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
6015 static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a,
6016 vector signed char __b) {
6017 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6020 static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a,
6021 vector unsigned char __b) {
6022 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6025 static vector int __ATTRS_o_ai vec_vslo(vector int __a,
6026 vector signed char __b) {
6027 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6030 static vector int __ATTRS_o_ai vec_vslo(vector int __a,
6031 vector unsigned char __b) {
6032 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6035 static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a,
6036 vector signed char __b) {
6037 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
6041 static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a,
6042 vector unsigned char __b) {
6043 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
6047 static vector float __ATTRS_o_ai vec_vslo(vector float __a,
6048 vector signed char __b) {
6049 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6052 static vector float __ATTRS_o_ai vec_vslo(vector float __a,
6053 vector unsigned char __b) {
6054 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6059 static vector signed char __ATTRS_o_ai vec_splat(vector signed char __a,
6060 unsigned char __b) {
6061 return vec_perm(__a, __a, (vector unsigned char)(__b));
6064 static vector unsigned char __ATTRS_o_ai vec_splat(vector unsigned char __a,
6065 unsigned char __b) {
6066 return vec_perm(__a, __a, (vector unsigned char)(__b));
6069 static vector bool char __ATTRS_o_ai vec_splat(vector bool char __a,
6070 unsigned char __b) {
6071 return vec_perm(__a, __a, (vector unsigned char)(__b));
6074 static vector short __ATTRS_o_ai vec_splat(vector short __a,
6075 unsigned char __b) {
6077 unsigned char b1 = __b + 1;
6078 return vec_perm(__a, __a,
6079 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6080 __b, b1, __b, b1, __b, b1, __b, b1));
6083 static vector unsigned short __ATTRS_o_ai vec_splat(vector unsigned short __a,
6084 unsigned char __b) {
6086 unsigned char b1 = __b + 1;
6087 return vec_perm(__a, __a,
6088 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6089 __b, b1, __b, b1, __b, b1, __b, b1));
6092 static vector bool short __ATTRS_o_ai vec_splat(vector bool short __a,
6093 unsigned char __b) {
6095 unsigned char b1 = __b + 1;
6096 return vec_perm(__a, __a,
6097 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6098 __b, b1, __b, b1, __b, b1, __b, b1));
6101 static vector pixel __ATTRS_o_ai vec_splat(vector pixel __a,
6102 unsigned char __b) {
6104 unsigned char b1 = __b + 1;
6105 return vec_perm(__a, __a,
6106 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6107 __b, b1, __b, b1, __b, b1, __b, b1));
6110 static vector int __ATTRS_o_ai vec_splat(vector int __a, unsigned char __b) {
6112 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6113 return vec_perm(__a, __a,
6114 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6115 b1, b2, b3, __b, b1, b2, b3));
6118 static vector unsigned int __ATTRS_o_ai vec_splat(vector unsigned int __a,
6119 unsigned char __b) {
6121 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6122 return vec_perm(__a, __a,
6123 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6124 b1, b2, b3, __b, b1, b2, b3));
6127 static vector bool int __ATTRS_o_ai vec_splat(vector bool int __a,
6128 unsigned char __b) {
6130 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6131 return vec_perm(__a, __a,
6132 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6133 b1, b2, b3, __b, b1, b2, b3));
6136 static vector float __ATTRS_o_ai vec_splat(vector float __a,
6137 unsigned char __b) {
6139 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6140 return vec_perm(__a, __a,
6141 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6142 b1, b2, b3, __b, b1, b2, b3));
6147 #define __builtin_altivec_vspltb vec_vspltb
6149 static vector signed char __ATTRS_o_ai vec_vspltb(vector signed char __a,
6150 unsigned char __b) {
6151 return vec_perm(__a, __a, (vector unsigned char)(__b));
6154 static vector unsigned char __ATTRS_o_ai vec_vspltb(vector unsigned char __a,
6155 unsigned char __b) {
6156 return vec_perm(__a, __a, (vector unsigned char)(__b));
6159 static vector bool char __ATTRS_o_ai vec_vspltb(vector bool char __a,
6160 unsigned char __b) {
6161 return vec_perm(__a, __a, (vector unsigned char)(__b));
6166 #define __builtin_altivec_vsplth vec_vsplth
6168 static vector short __ATTRS_o_ai vec_vsplth(vector short __a,
6169 unsigned char __b) {
6171 unsigned char b1 = __b + 1;
6172 return vec_perm(__a, __a,
6173 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6174 __b, b1, __b, b1, __b, b1, __b, b1));
6177 static vector unsigned short __ATTRS_o_ai vec_vsplth(vector unsigned short __a,
6178 unsigned char __b) {
6180 unsigned char b1 = __b + 1;
6181 return vec_perm(__a, __a,
6182 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6183 __b, b1, __b, b1, __b, b1, __b, b1));
6186 static vector bool short __ATTRS_o_ai vec_vsplth(vector bool short __a,
6187 unsigned char __b) {
6189 unsigned char b1 = __b + 1;
6190 return vec_perm(__a, __a,
6191 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6192 __b, b1, __b, b1, __b, b1, __b, b1));
6195 static vector pixel __ATTRS_o_ai vec_vsplth(vector pixel __a,
6196 unsigned char __b) {
6198 unsigned char b1 = __b + 1;
6199 return vec_perm(__a, __a,
6200 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
6201 __b, b1, __b, b1, __b, b1, __b, b1));
6206 #define __builtin_altivec_vspltw vec_vspltw
6208 static vector int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b) {
6210 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6211 return vec_perm(__a, __a,
6212 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6213 b1, b2, b3, __b, b1, b2, b3));
6216 static vector unsigned int __ATTRS_o_ai vec_vspltw(vector unsigned int __a,
6217 unsigned char __b) {
6219 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6220 return vec_perm(__a, __a,
6221 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6222 b1, b2, b3, __b, b1, b2, b3));
6225 static vector bool int __ATTRS_o_ai vec_vspltw(vector bool int __a,
6226 unsigned char __b) {
6228 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6229 return vec_perm(__a, __a,
6230 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6231 b1, b2, b3, __b, b1, b2, b3));
6234 static vector float __ATTRS_o_ai vec_vspltw(vector float __a,
6235 unsigned char __b) {
6237 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
6238 return vec_perm(__a, __a,
6239 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
6240 b1, b2, b3, __b, b1, b2, b3));
6245 #define __builtin_altivec_vspltisb vec_splat_s8
6247 // FIXME: parameter should be treated as 5-bit signed literal
6248 static vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a) {
6249 return (vector signed char)(__a);
6254 // FIXME: parameter should be treated as 5-bit signed literal
6255 static vector signed char __ATTRS_o_ai vec_vspltisb(signed char __a) {
6256 return (vector signed char)(__a);
6261 #define __builtin_altivec_vspltish vec_splat_s16
6263 // FIXME: parameter should be treated as 5-bit signed literal
6264 static vector short __ATTRS_o_ai vec_splat_s16(signed char __a) {
6265 return (vector short)(__a);
6270 // FIXME: parameter should be treated as 5-bit signed literal
6271 static vector short __ATTRS_o_ai vec_vspltish(signed char __a) {
6272 return (vector short)(__a);
6277 #define __builtin_altivec_vspltisw vec_splat_s32
6279 // FIXME: parameter should be treated as 5-bit signed literal
6280 static vector int __ATTRS_o_ai vec_splat_s32(signed char __a) {
6281 return (vector int)(__a);
6286 // FIXME: parameter should be treated as 5-bit signed literal
6287 static vector int __ATTRS_o_ai vec_vspltisw(signed char __a) {
6288 return (vector int)(__a);
6293 // FIXME: parameter should be treated as 5-bit signed literal
6294 static vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a) {
6295 return (vector unsigned char)(__a);
6300 // FIXME: parameter should be treated as 5-bit signed literal
6301 static vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a) {
6302 return (vector unsigned short)(__a);
6307 // FIXME: parameter should be treated as 5-bit signed literal
6308 static vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a) {
6309 return (vector unsigned int)(__a);
6314 static vector signed char __ATTRS_o_ai vec_sr(vector signed char __a,
6315 vector unsigned char __b) {
6316 return __a >> (vector signed char)__b;
6319 static vector unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a,
6320 vector unsigned char __b) {
6324 static vector short __ATTRS_o_ai vec_sr(vector short __a,
6325 vector unsigned short __b) {
6326 return __a >> (vector short)__b;
6329 static vector unsigned short __ATTRS_o_ai vec_sr(vector unsigned short __a,
6330 vector unsigned short __b) {
6334 static vector int __ATTRS_o_ai vec_sr(vector int __a, vector unsigned int __b) {
6335 return __a >> (vector int)__b;
6338 static vector unsigned int __ATTRS_o_ai vec_sr(vector unsigned int __a,
6339 vector unsigned int __b) {
6343 #ifdef __POWER8_VECTOR__
6344 static vector signed long long __ATTRS_o_ai
6345 vec_sr(vector signed long long __a, vector unsigned long long __b) {
6346 return __a >> (vector long long)__b;
6349 static vector unsigned long long __ATTRS_o_ai
6350 vec_sr(vector unsigned long long __a, vector unsigned long long __b) {
6357 #define __builtin_altivec_vsrb vec_vsrb
6359 static vector signed char __ATTRS_o_ai vec_vsrb(vector signed char __a,
6360 vector unsigned char __b) {
6361 return __a >> (vector signed char)__b;
6364 static vector unsigned char __ATTRS_o_ai vec_vsrb(vector unsigned char __a,
6365 vector unsigned char __b) {
6371 #define __builtin_altivec_vsrh vec_vsrh
6373 static vector short __ATTRS_o_ai vec_vsrh(vector short __a,
6374 vector unsigned short __b) {
6375 return __a >> (vector short)__b;
6378 static vector unsigned short __ATTRS_o_ai vec_vsrh(vector unsigned short __a,
6379 vector unsigned short __b) {
6385 #define __builtin_altivec_vsrw vec_vsrw
6387 static vector int __ATTRS_o_ai vec_vsrw(vector int __a,
6388 vector unsigned int __b) {
6389 return __a >> (vector int)__b;
6392 static vector unsigned int __ATTRS_o_ai vec_vsrw(vector unsigned int __a,
6393 vector unsigned int __b) {
6399 static vector signed char __ATTRS_o_ai vec_sra(vector signed char __a,
6400 vector unsigned char __b) {
6401 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
6404 static vector unsigned char __ATTRS_o_ai vec_sra(vector unsigned char __a,
6405 vector unsigned char __b) {
6406 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
6409 static vector short __ATTRS_o_ai vec_sra(vector short __a,
6410 vector unsigned short __b) {
6411 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
6414 static vector unsigned short __ATTRS_o_ai vec_sra(vector unsigned short __a,
6415 vector unsigned short __b) {
6416 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
6419 static vector int __ATTRS_o_ai vec_sra(vector int __a,
6420 vector unsigned int __b) {
6421 return __builtin_altivec_vsraw(__a, __b);
6424 static vector unsigned int __ATTRS_o_ai vec_sra(vector unsigned int __a,
6425 vector unsigned int __b) {
6426 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
6429 #ifdef __POWER8_VECTOR__
6430 static vector signed long long __ATTRS_o_ai
6431 vec_sra(vector signed long long __a, vector unsigned long long __b) {
6435 static vector unsigned long long __ATTRS_o_ai
6436 vec_sra(vector unsigned long long __a, vector unsigned long long __b) {
6437 return (vector unsigned long long)((vector signed long long)__a >> __b);
6443 static vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a,
6444 vector unsigned char __b) {
6445 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
6448 static vector unsigned char __ATTRS_o_ai vec_vsrab(vector unsigned char __a,
6449 vector unsigned char __b) {
6450 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
6455 static vector short __ATTRS_o_ai vec_vsrah(vector short __a,
6456 vector unsigned short __b) {
6457 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
6460 static vector unsigned short __ATTRS_o_ai vec_vsrah(vector unsigned short __a,
6461 vector unsigned short __b) {
6462 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
6467 static vector int __ATTRS_o_ai vec_vsraw(vector int __a,
6468 vector unsigned int __b) {
6469 return __builtin_altivec_vsraw(__a, __b);
6472 static vector unsigned int __ATTRS_o_ai vec_vsraw(vector unsigned int __a,
6473 vector unsigned int __b) {
6474 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
6479 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
6480 vector unsigned char __b) {
6481 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6485 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
6486 vector unsigned short __b) {
6487 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6491 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
6492 vector unsigned int __b) {
6493 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6497 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
6498 vector unsigned char __b) {
6499 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6503 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
6504 vector unsigned short __b) {
6505 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6509 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
6510 vector unsigned int __b) {
6511 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6515 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
6516 vector unsigned char __b) {
6517 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6521 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
6522 vector unsigned short __b) {
6523 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6527 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
6528 vector unsigned int __b) {
6529 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6533 static vector short __ATTRS_o_ai vec_srl(vector short __a,
6534 vector unsigned char __b) {
6535 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6538 static vector short __ATTRS_o_ai vec_srl(vector short __a,
6539 vector unsigned short __b) {
6540 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6543 static vector short __ATTRS_o_ai vec_srl(vector short __a,
6544 vector unsigned int __b) {
6545 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6548 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
6549 vector unsigned char __b) {
6550 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6554 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
6555 vector unsigned short __b) {
6556 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6560 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
6561 vector unsigned int __b) {
6562 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6566 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
6567 vector unsigned char __b) {
6568 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6572 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
6573 vector unsigned short __b) {
6574 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6578 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
6579 vector unsigned int __b) {
6580 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6584 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
6585 vector unsigned char __b) {
6586 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6589 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
6590 vector unsigned short __b) {
6591 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6594 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
6595 vector unsigned int __b) {
6596 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6599 static vector int __ATTRS_o_ai vec_srl(vector int __a,
6600 vector unsigned char __b) {
6601 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6604 static vector int __ATTRS_o_ai vec_srl(vector int __a,
6605 vector unsigned short __b) {
6606 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6609 static vector int __ATTRS_o_ai vec_srl(vector int __a,
6610 vector unsigned int __b) {
6611 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6614 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
6615 vector unsigned char __b) {
6616 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
6620 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
6621 vector unsigned short __b) {
6622 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
6626 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
6627 vector unsigned int __b) {
6628 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
6632 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
6633 vector unsigned char __b) {
6634 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
6638 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
6639 vector unsigned short __b) {
6640 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
6644 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
6645 vector unsigned int __b) {
6646 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
6652 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
6653 vector unsigned char __b) {
6654 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6658 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
6659 vector unsigned short __b) {
6660 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6664 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
6665 vector unsigned int __b) {
6666 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
6670 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
6671 vector unsigned char __b) {
6672 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6676 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
6677 vector unsigned short __b) {
6678 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6682 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
6683 vector unsigned int __b) {
6684 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
6688 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
6689 vector unsigned char __b) {
6690 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6694 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
6695 vector unsigned short __b) {
6696 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6700 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
6701 vector unsigned int __b) {
6702 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
6706 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
6707 vector unsigned char __b) {
6708 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6711 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
6712 vector unsigned short __b) {
6713 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6716 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
6717 vector unsigned int __b) {
6718 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6721 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
6722 vector unsigned char __b) {
6723 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6727 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
6728 vector unsigned short __b) {
6729 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6733 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
6734 vector unsigned int __b) {
6735 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
6739 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
6740 vector unsigned char __b) {
6741 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6745 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
6746 vector unsigned short __b) {
6747 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6751 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
6752 vector unsigned int __b) {
6753 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
6757 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
6758 vector unsigned char __b) {
6759 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6762 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
6763 vector unsigned short __b) {
6764 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6767 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
6768 vector unsigned int __b) {
6769 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6772 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
6773 vector unsigned char __b) {
6774 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6777 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
6778 vector unsigned short __b) {
6779 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6782 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
6783 vector unsigned int __b) {
6784 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6787 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
6788 vector unsigned char __b) {
6789 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
6793 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
6794 vector unsigned short __b) {
6795 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
6799 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
6800 vector unsigned int __b) {
6801 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
6805 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
6806 vector unsigned char __b) {
6807 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
6811 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
6812 vector unsigned short __b) {
6813 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
6817 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
6818 vector unsigned int __b) {
6819 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
6825 static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a,
6826 vector signed char __b) {
6827 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
6831 static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a,
6832 vector unsigned char __b) {
6833 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
6837 static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a,
6838 vector signed char __b) {
6839 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
6843 static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a,
6844 vector unsigned char __b) {
6845 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
6849 static vector short __ATTRS_o_ai vec_sro(vector short __a,
6850 vector signed char __b) {
6851 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6854 static vector short __ATTRS_o_ai vec_sro(vector short __a,
6855 vector unsigned char __b) {
6856 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6859 static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a,
6860 vector signed char __b) {
6861 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
6865 static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a,
6866 vector unsigned char __b) {
6867 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
6871 static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a,
6872 vector signed char __b) {
6873 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6876 static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a,
6877 vector unsigned char __b) {
6878 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6881 static vector int __ATTRS_o_ai vec_sro(vector int __a, vector signed char __b) {
6882 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
6885 static vector int __ATTRS_o_ai vec_sro(vector int __a,
6886 vector unsigned char __b) {
6887 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
6890 static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a,
6891 vector signed char __b) {
6892 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
6896 static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a,
6897 vector unsigned char __b) {
6898 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
6902 static vector float __ATTRS_o_ai vec_sro(vector float __a,
6903 vector signed char __b) {
6904 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6907 static vector float __ATTRS_o_ai vec_sro(vector float __a,
6908 vector unsigned char __b) {
6909 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6914 static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a,
6915 vector signed char __b) {
6916 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
6920 static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a,
6921 vector unsigned char __b) {
6922 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
6926 static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a,
6927 vector signed char __b) {
6928 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
6932 static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a,
6933 vector unsigned char __b) {
6934 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
6938 static vector short __ATTRS_o_ai vec_vsro(vector short __a,
6939 vector signed char __b) {
6940 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6943 static vector short __ATTRS_o_ai vec_vsro(vector short __a,
6944 vector unsigned char __b) {
6945 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6948 static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a,
6949 vector signed char __b) {
6950 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
6954 static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a,
6955 vector unsigned char __b) {
6956 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
6960 static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a,
6961 vector signed char __b) {
6962 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6965 static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a,
6966 vector unsigned char __b) {
6967 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6970 static vector int __ATTRS_o_ai vec_vsro(vector int __a,
6971 vector signed char __b) {
6972 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
6975 static vector int __ATTRS_o_ai vec_vsro(vector int __a,
6976 vector unsigned char __b) {
6977 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
6980 static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a,
6981 vector signed char __b) {
6982 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
6986 static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a,
6987 vector unsigned char __b) {
6988 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
6992 static vector float __ATTRS_o_ai vec_vsro(vector float __a,
6993 vector signed char __b) {
6994 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6997 static vector float __ATTRS_o_ai vec_vsro(vector float __a,
6998 vector unsigned char __b) {
6999 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7004 static void __ATTRS_o_ai vec_st(vector signed char __a, int __b,
7005 vector signed char *__c) {
7006 __builtin_altivec_stvx((vector int)__a, __b, __c);
7009 static void __ATTRS_o_ai vec_st(vector signed char __a, int __b,
7011 __builtin_altivec_stvx((vector int)__a, __b, __c);
7014 static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b,
7015 vector unsigned char *__c) {
7016 __builtin_altivec_stvx((vector int)__a, __b, __c);
7019 static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b,
7020 unsigned char *__c) {
7021 __builtin_altivec_stvx((vector int)__a, __b, __c);
7024 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
7026 __builtin_altivec_stvx((vector int)__a, __b, __c);
7029 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
7030 unsigned char *__c) {
7031 __builtin_altivec_stvx((vector int)__a, __b, __c);
7034 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
7035 vector bool char *__c) {
7036 __builtin_altivec_stvx((vector int)__a, __b, __c);
7039 static void __ATTRS_o_ai vec_st(vector short __a, int __b, vector short *__c) {
7040 __builtin_altivec_stvx((vector int)__a, __b, __c);
7043 static void __ATTRS_o_ai vec_st(vector short __a, int __b, short *__c) {
7044 __builtin_altivec_stvx((vector int)__a, __b, __c);
7047 static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b,
7048 vector unsigned short *__c) {
7049 __builtin_altivec_stvx((vector int)__a, __b, __c);
7052 static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b,
7053 unsigned short *__c) {
7054 __builtin_altivec_stvx((vector int)__a, __b, __c);
7057 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b, short *__c) {
7058 __builtin_altivec_stvx((vector int)__a, __b, __c);
7061 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b,
7062 unsigned short *__c) {
7063 __builtin_altivec_stvx((vector int)__a, __b, __c);
7066 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b,
7067 vector bool short *__c) {
7068 __builtin_altivec_stvx((vector int)__a, __b, __c);
7071 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, short *__c) {
7072 __builtin_altivec_stvx((vector int)__a, __b, __c);
7075 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b,
7076 unsigned short *__c) {
7077 __builtin_altivec_stvx((vector int)__a, __b, __c);
7080 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, vector pixel *__c) {
7081 __builtin_altivec_stvx((vector int)__a, __b, __c);
7084 static void __ATTRS_o_ai vec_st(vector int __a, int __b, vector int *__c) {
7085 __builtin_altivec_stvx(__a, __b, __c);
7088 static void __ATTRS_o_ai vec_st(vector int __a, int __b, int *__c) {
7089 __builtin_altivec_stvx(__a, __b, __c);
7092 static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b,
7093 vector unsigned int *__c) {
7094 __builtin_altivec_stvx((vector int)__a, __b, __c);
7097 static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b,
7098 unsigned int *__c) {
7099 __builtin_altivec_stvx((vector int)__a, __b, __c);
7102 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b, int *__c) {
7103 __builtin_altivec_stvx((vector int)__a, __b, __c);
7106 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b,
7107 unsigned int *__c) {
7108 __builtin_altivec_stvx((vector int)__a, __b, __c);
7111 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b,
7112 vector bool int *__c) {
7113 __builtin_altivec_stvx((vector int)__a, __b, __c);
7116 static void __ATTRS_o_ai vec_st(vector float __a, int __b, vector float *__c) {
7117 __builtin_altivec_stvx((vector int)__a, __b, __c);
7120 static void __ATTRS_o_ai vec_st(vector float __a, int __b, float *__c) {
7121 __builtin_altivec_stvx((vector int)__a, __b, __c);
7126 static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b,
7127 vector signed char *__c) {
7128 __builtin_altivec_stvx((vector int)__a, __b, __c);
7131 static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b,
7133 __builtin_altivec_stvx((vector int)__a, __b, __c);
7136 static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b,
7137 vector unsigned char *__c) {
7138 __builtin_altivec_stvx((vector int)__a, __b, __c);
7141 static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b,
7142 unsigned char *__c) {
7143 __builtin_altivec_stvx((vector int)__a, __b, __c);
7146 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
7148 __builtin_altivec_stvx((vector int)__a, __b, __c);
7151 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
7152 unsigned char *__c) {
7153 __builtin_altivec_stvx((vector int)__a, __b, __c);
7156 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
7157 vector bool char *__c) {
7158 __builtin_altivec_stvx((vector int)__a, __b, __c);
7161 static void __ATTRS_o_ai vec_stvx(vector short __a, int __b,
7162 vector short *__c) {
7163 __builtin_altivec_stvx((vector int)__a, __b, __c);
7166 static void __ATTRS_o_ai vec_stvx(vector short __a, int __b, short *__c) {
7167 __builtin_altivec_stvx((vector int)__a, __b, __c);
7170 static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b,
7171 vector unsigned short *__c) {
7172 __builtin_altivec_stvx((vector int)__a, __b, __c);
7175 static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b,
7176 unsigned short *__c) {
7177 __builtin_altivec_stvx((vector int)__a, __b, __c);
7180 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b, short *__c) {
7181 __builtin_altivec_stvx((vector int)__a, __b, __c);
7184 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b,
7185 unsigned short *__c) {
7186 __builtin_altivec_stvx((vector int)__a, __b, __c);
7189 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b,
7190 vector bool short *__c) {
7191 __builtin_altivec_stvx((vector int)__a, __b, __c);
7194 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b, short *__c) {
7195 __builtin_altivec_stvx((vector int)__a, __b, __c);
7198 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b,
7199 unsigned short *__c) {
7200 __builtin_altivec_stvx((vector int)__a, __b, __c);
7203 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b,
7204 vector pixel *__c) {
7205 __builtin_altivec_stvx((vector int)__a, __b, __c);
7208 static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, vector int *__c) {
7209 __builtin_altivec_stvx(__a, __b, __c);
7212 static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, int *__c) {
7213 __builtin_altivec_stvx(__a, __b, __c);
7216 static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b,
7217 vector unsigned int *__c) {
7218 __builtin_altivec_stvx((vector int)__a, __b, __c);
7221 static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b,
7222 unsigned int *__c) {
7223 __builtin_altivec_stvx((vector int)__a, __b, __c);
7226 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b, int *__c) {
7227 __builtin_altivec_stvx((vector int)__a, __b, __c);
7230 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b,
7231 unsigned int *__c) {
7232 __builtin_altivec_stvx((vector int)__a, __b, __c);
7235 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b,
7236 vector bool int *__c) {
7237 __builtin_altivec_stvx((vector int)__a, __b, __c);
7240 static void __ATTRS_o_ai vec_stvx(vector float __a, int __b,
7241 vector float *__c) {
7242 __builtin_altivec_stvx((vector int)__a, __b, __c);
7245 static void __ATTRS_o_ai vec_stvx(vector float __a, int __b, float *__c) {
7246 __builtin_altivec_stvx((vector int)__a, __b, __c);
7251 static void __ATTRS_o_ai vec_ste(vector signed char __a, int __b,
7253 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7256 static void __ATTRS_o_ai vec_ste(vector unsigned char __a, int __b,
7257 unsigned char *__c) {
7258 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7261 static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b,
7263 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7266 static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b,
7267 unsigned char *__c) {
7268 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7271 static void __ATTRS_o_ai vec_ste(vector short __a, int __b, short *__c) {
7272 __builtin_altivec_stvehx(__a, __b, __c);
7275 static void __ATTRS_o_ai vec_ste(vector unsigned short __a, int __b,
7276 unsigned short *__c) {
7277 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7280 static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b, short *__c) {
7281 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7284 static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b,
7285 unsigned short *__c) {
7286 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7289 static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b, short *__c) {
7290 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7293 static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b,
7294 unsigned short *__c) {
7295 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7298 static void __ATTRS_o_ai vec_ste(vector int __a, int __b, int *__c) {
7299 __builtin_altivec_stvewx(__a, __b, __c);
7302 static void __ATTRS_o_ai vec_ste(vector unsigned int __a, int __b,
7303 unsigned int *__c) {
7304 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7307 static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b, int *__c) {
7308 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7311 static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b,
7312 unsigned int *__c) {
7313 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7316 static void __ATTRS_o_ai vec_ste(vector float __a, int __b, float *__c) {
7317 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7322 static void __ATTRS_o_ai vec_stvebx(vector signed char __a, int __b,
7324 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7327 static void __ATTRS_o_ai vec_stvebx(vector unsigned char __a, int __b,
7328 unsigned char *__c) {
7329 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7332 static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b,
7334 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7337 static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b,
7338 unsigned char *__c) {
7339 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7344 static void __ATTRS_o_ai vec_stvehx(vector short __a, int __b, short *__c) {
7345 __builtin_altivec_stvehx(__a, __b, __c);
7348 static void __ATTRS_o_ai vec_stvehx(vector unsigned short __a, int __b,
7349 unsigned short *__c) {
7350 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7353 static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b,
7355 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7358 static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b,
7359 unsigned short *__c) {
7360 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7363 static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b, short *__c) {
7364 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7367 static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b,
7368 unsigned short *__c) {
7369 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7374 static void __ATTRS_o_ai vec_stvewx(vector int __a, int __b, int *__c) {
7375 __builtin_altivec_stvewx(__a, __b, __c);
7378 static void __ATTRS_o_ai vec_stvewx(vector unsigned int __a, int __b,
7379 unsigned int *__c) {
7380 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7383 static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b, int *__c) {
7384 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7387 static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b,
7388 unsigned int *__c) {
7389 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7392 static void __ATTRS_o_ai vec_stvewx(vector float __a, int __b, float *__c) {
7393 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7398 static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b,
7399 vector signed char *__c) {
7400 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7403 static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b,
7405 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7408 static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b,
7409 vector unsigned char *__c) {
7410 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7413 static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b,
7414 unsigned char *__c) {
7415 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7418 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
7420 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7423 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
7424 unsigned char *__c) {
7425 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7428 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
7429 vector bool char *__c) {
7430 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7433 static void __ATTRS_o_ai vec_stl(vector short __a, int __b, vector short *__c) {
7434 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7437 static void __ATTRS_o_ai vec_stl(vector short __a, int __b, short *__c) {
7438 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7441 static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b,
7442 vector unsigned short *__c) {
7443 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7446 static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b,
7447 unsigned short *__c) {
7448 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7451 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b, short *__c) {
7452 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7455 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b,
7456 unsigned short *__c) {
7457 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7460 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b,
7461 vector bool short *__c) {
7462 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7465 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, short *__c) {
7466 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7469 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b,
7470 unsigned short *__c) {
7471 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7474 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, vector pixel *__c) {
7475 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7478 static void __ATTRS_o_ai vec_stl(vector int __a, int __b, vector int *__c) {
7479 __builtin_altivec_stvxl(__a, __b, __c);
7482 static void __ATTRS_o_ai vec_stl(vector int __a, int __b, int *__c) {
7483 __builtin_altivec_stvxl(__a, __b, __c);
7486 static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b,
7487 vector unsigned int *__c) {
7488 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7491 static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b,
7492 unsigned int *__c) {
7493 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7496 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b, int *__c) {
7497 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7500 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b,
7501 unsigned int *__c) {
7502 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7505 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b,
7506 vector bool int *__c) {
7507 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7510 static void __ATTRS_o_ai vec_stl(vector float __a, int __b, vector float *__c) {
7511 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7514 static void __ATTRS_o_ai vec_stl(vector float __a, int __b, float *__c) {
7515 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7520 static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b,
7521 vector signed char *__c) {
7522 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7525 static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b,
7527 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7530 static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b,
7531 vector unsigned char *__c) {
7532 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7535 static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b,
7536 unsigned char *__c) {
7537 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7540 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
7542 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7545 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
7546 unsigned char *__c) {
7547 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7550 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
7551 vector bool char *__c) {
7552 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7555 static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b,
7556 vector short *__c) {
7557 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7560 static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b, short *__c) {
7561 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7564 static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b,
7565 vector unsigned short *__c) {
7566 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7569 static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b,
7570 unsigned short *__c) {
7571 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7574 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b, short *__c) {
7575 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7578 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b,
7579 unsigned short *__c) {
7580 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7583 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b,
7584 vector bool short *__c) {
7585 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7588 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b, short *__c) {
7589 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7592 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b,
7593 unsigned short *__c) {
7594 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7597 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b,
7598 vector pixel *__c) {
7599 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7602 static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, vector int *__c) {
7603 __builtin_altivec_stvxl(__a, __b, __c);
7606 static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, int *__c) {
7607 __builtin_altivec_stvxl(__a, __b, __c);
7610 static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b,
7611 vector unsigned int *__c) {
7612 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7615 static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b,
7616 unsigned int *__c) {
7617 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7620 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b, int *__c) {
7621 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7624 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b,
7625 unsigned int *__c) {
7626 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7629 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b,
7630 vector bool int *__c) {
7631 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7634 static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b,
7635 vector float *__c) {
7636 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7639 static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b, float *__c) {
7640 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7645 static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a,
7646 vector signed char __b) {
7650 static vector signed char __ATTRS_o_ai vec_sub(vector bool char __a,
7651 vector signed char __b) {
7652 return (vector signed char)__a - __b;
7655 static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a,
7656 vector bool char __b) {
7657 return __a - (vector signed char)__b;
7660 static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a,
7661 vector unsigned char __b) {
7665 static vector unsigned char __ATTRS_o_ai vec_sub(vector bool char __a,
7666 vector unsigned char __b) {
7667 return (vector unsigned char)__a - __b;
7670 static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a,
7671 vector bool char __b) {
7672 return __a - (vector unsigned char)__b;
7675 static vector short __ATTRS_o_ai vec_sub(vector short __a, vector short __b) {
7679 static vector short __ATTRS_o_ai vec_sub(vector bool short __a,
7681 return (vector short)__a - __b;
7684 static vector short __ATTRS_o_ai vec_sub(vector short __a,
7685 vector bool short __b) {
7686 return __a - (vector short)__b;
7689 static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a,
7690 vector unsigned short __b) {
7694 static vector unsigned short __ATTRS_o_ai vec_sub(vector bool short __a,
7695 vector unsigned short __b) {
7696 return (vector unsigned short)__a - __b;
7699 static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a,
7700 vector bool short __b) {
7701 return __a - (vector unsigned short)__b;
7704 static vector int __ATTRS_o_ai vec_sub(vector int __a, vector int __b) {
7708 static vector int __ATTRS_o_ai vec_sub(vector bool int __a, vector int __b) {
7709 return (vector int)__a - __b;
7712 static vector int __ATTRS_o_ai vec_sub(vector int __a, vector bool int __b) {
7713 return __a - (vector int)__b;
7716 static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a,
7717 vector unsigned int __b) {
7721 static vector unsigned int __ATTRS_o_ai vec_sub(vector bool int __a,
7722 vector unsigned int __b) {
7723 return (vector unsigned int)__a - __b;
7726 static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a,
7727 vector bool int __b) {
7728 return __a - (vector unsigned int)__b;
7731 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
7732 static vector signed __int128 __ATTRS_o_ai vec_sub(vector signed __int128 __a,
7733 vector signed __int128 __b) {
7737 static vector unsigned __int128 __ATTRS_o_ai
7738 vec_sub(vector unsigned __int128 __a, vector unsigned __int128 __b) {
7741 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
7743 static vector float __ATTRS_o_ai vec_sub(vector float __a, vector float __b) {
7749 #define __builtin_altivec_vsububm vec_vsububm
7751 static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a,
7752 vector signed char __b) {
7756 static vector signed char __ATTRS_o_ai vec_vsububm(vector bool char __a,
7757 vector signed char __b) {
7758 return (vector signed char)__a - __b;
7761 static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a,
7762 vector bool char __b) {
7763 return __a - (vector signed char)__b;
7766 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a,
7767 vector unsigned char __b) {
7771 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector bool char __a,
7772 vector unsigned char __b) {
7773 return (vector unsigned char)__a - __b;
7776 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a,
7777 vector bool char __b) {
7778 return __a - (vector unsigned char)__b;
7783 #define __builtin_altivec_vsubuhm vec_vsubuhm
7785 static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a,
7790 static vector short __ATTRS_o_ai vec_vsubuhm(vector bool short __a,
7792 return (vector short)__a - __b;
7795 static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a,
7796 vector bool short __b) {
7797 return __a - (vector short)__b;
7800 static vector unsigned short __ATTRS_o_ai
7801 vec_vsubuhm(vector unsigned short __a, vector unsigned short __b) {
7805 static vector unsigned short __ATTRS_o_ai
7806 vec_vsubuhm(vector bool short __a, vector unsigned short __b) {
7807 return (vector unsigned short)__a - __b;
7810 static vector unsigned short __ATTRS_o_ai vec_vsubuhm(vector unsigned short __a,
7811 vector bool short __b) {
7812 return __a - (vector unsigned short)__b;
7817 #define __builtin_altivec_vsubuwm vec_vsubuwm
7819 static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b) {
7823 static vector int __ATTRS_o_ai vec_vsubuwm(vector bool int __a,
7825 return (vector int)__a - __b;
7828 static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a,
7829 vector bool int __b) {
7830 return __a - (vector int)__b;
7833 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a,
7834 vector unsigned int __b) {
7838 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector bool int __a,
7839 vector unsigned int __b) {
7840 return (vector unsigned int)__a - __b;
7843 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a,
7844 vector bool int __b) {
7845 return __a - (vector unsigned int)__b;
7850 #define __builtin_altivec_vsubfp vec_vsubfp
7852 static vector float __attribute__((__always_inline__))
7853 vec_vsubfp(vector float __a, vector float __b) {
7859 static vector unsigned int __ATTRS_o_ai vec_subc(vector unsigned int __a,
7860 vector unsigned int __b) {
7861 return __builtin_altivec_vsubcuw(__a, __b);
7864 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
7865 static vector unsigned __int128 __ATTRS_o_ai
7866 vec_subc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
7867 return __builtin_altivec_vsubcuq(__a, __b);
7870 static vector signed __int128 __ATTRS_o_ai
7871 vec_subc(vector signed __int128 __a, vector signed __int128 __b) {
7872 return __builtin_altivec_vsubcuq(__a, __b);
7874 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
7878 static vector unsigned int __attribute__((__always_inline__))
7879 vec_vsubcuw(vector unsigned int __a, vector unsigned int __b) {
7880 return __builtin_altivec_vsubcuw(__a, __b);
7885 static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a,
7886 vector signed char __b) {
7887 return __builtin_altivec_vsubsbs(__a, __b);
7890 static vector signed char __ATTRS_o_ai vec_subs(vector bool char __a,
7891 vector signed char __b) {
7892 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
7895 static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a,
7896 vector bool char __b) {
7897 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
7900 static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a,
7901 vector unsigned char __b) {
7902 return __builtin_altivec_vsububs(__a, __b);
7905 static vector unsigned char __ATTRS_o_ai vec_subs(vector bool char __a,
7906 vector unsigned char __b) {
7907 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
7910 static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a,
7911 vector bool char __b) {
7912 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
7915 static vector short __ATTRS_o_ai vec_subs(vector short __a, vector short __b) {
7916 return __builtin_altivec_vsubshs(__a, __b);
7919 static vector short __ATTRS_o_ai vec_subs(vector bool short __a,
7921 return __builtin_altivec_vsubshs((vector short)__a, __b);
7924 static vector short __ATTRS_o_ai vec_subs(vector short __a,
7925 vector bool short __b) {
7926 return __builtin_altivec_vsubshs(__a, (vector short)__b);
7929 static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a,
7930 vector unsigned short __b) {
7931 return __builtin_altivec_vsubuhs(__a, __b);
7934 static vector unsigned short __ATTRS_o_ai vec_subs(vector bool short __a,
7935 vector unsigned short __b) {
7936 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
7939 static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a,
7940 vector bool short __b) {
7941 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
7944 static vector int __ATTRS_o_ai vec_subs(vector int __a, vector int __b) {
7945 return __builtin_altivec_vsubsws(__a, __b);
7948 static vector int __ATTRS_o_ai vec_subs(vector bool int __a, vector int __b) {
7949 return __builtin_altivec_vsubsws((vector int)__a, __b);
7952 static vector int __ATTRS_o_ai vec_subs(vector int __a, vector bool int __b) {
7953 return __builtin_altivec_vsubsws(__a, (vector int)__b);
7956 static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a,
7957 vector unsigned int __b) {
7958 return __builtin_altivec_vsubuws(__a, __b);
7961 static vector unsigned int __ATTRS_o_ai vec_subs(vector bool int __a,
7962 vector unsigned int __b) {
7963 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
7966 static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a,
7967 vector bool int __b) {
7968 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
7973 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a,
7974 vector signed char __b) {
7975 return __builtin_altivec_vsubsbs(__a, __b);
7978 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector bool char __a,
7979 vector signed char __b) {
7980 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
7983 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a,
7984 vector bool char __b) {
7985 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
7990 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a,
7991 vector unsigned char __b) {
7992 return __builtin_altivec_vsububs(__a, __b);
7995 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector bool char __a,
7996 vector unsigned char __b) {
7997 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
8000 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a,
8001 vector bool char __b) {
8002 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
8007 static vector short __ATTRS_o_ai vec_vsubshs(vector short __a,
8009 return __builtin_altivec_vsubshs(__a, __b);
8012 static vector short __ATTRS_o_ai vec_vsubshs(vector bool short __a,
8014 return __builtin_altivec_vsubshs((vector short)__a, __b);
8017 static vector short __ATTRS_o_ai vec_vsubshs(vector short __a,
8018 vector bool short __b) {
8019 return __builtin_altivec_vsubshs(__a, (vector short)__b);
8024 static vector unsigned short __ATTRS_o_ai
8025 vec_vsubuhs(vector unsigned short __a, vector unsigned short __b) {
8026 return __builtin_altivec_vsubuhs(__a, __b);
8029 static vector unsigned short __ATTRS_o_ai
8030 vec_vsubuhs(vector bool short __a, vector unsigned short __b) {
8031 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
8034 static vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a,
8035 vector bool short __b) {
8036 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
8041 static vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector int __b) {
8042 return __builtin_altivec_vsubsws(__a, __b);
8045 static vector int __ATTRS_o_ai vec_vsubsws(vector bool int __a,
8047 return __builtin_altivec_vsubsws((vector int)__a, __b);
8050 static vector int __ATTRS_o_ai vec_vsubsws(vector int __a,
8051 vector bool int __b) {
8052 return __builtin_altivec_vsubsws(__a, (vector int)__b);
8057 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a,
8058 vector unsigned int __b) {
8059 return __builtin_altivec_vsubuws(__a, __b);
8062 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector bool int __a,
8063 vector unsigned int __b) {
8064 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
8067 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a,
8068 vector bool int __b) {
8069 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
8072 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
8075 static vector signed __int128 __ATTRS_o_ai
8076 vec_vsubuqm(vector signed __int128 __a, vector signed __int128 __b) {
8080 static vector unsigned __int128 __ATTRS_o_ai
8081 vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
8087 static vector signed __int128 __ATTRS_o_ai
8088 vec_vsubeuqm(vector signed __int128 __a, vector signed __int128 __b,
8089 vector signed __int128 __c) {
8090 return __builtin_altivec_vsubeuqm(__a, __b, __c);
8093 static vector unsigned __int128 __ATTRS_o_ai
8094 vec_vsubeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
8095 vector unsigned __int128 __c) {
8096 return __builtin_altivec_vsubeuqm(__a, __b, __c);
8101 static vector signed __int128 __ATTRS_o_ai
8102 vec_vsubcuq(vector signed __int128 __a, vector signed __int128 __b) {
8103 return __builtin_altivec_vsubcuq(__a, __b);
8106 static vector unsigned __int128 __ATTRS_o_ai
8107 vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
8108 return __builtin_altivec_vsubcuq(__a, __b);
8113 static vector signed __int128 __ATTRS_o_ai
8114 vec_vsubecuq(vector signed __int128 __a, vector signed __int128 __b,
8115 vector signed __int128 __c) {
8116 return __builtin_altivec_vsubecuq(__a, __b, __c);
8119 static vector unsigned __int128 __ATTRS_o_ai
8120 vec_vsubecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
8121 vector unsigned __int128 __c) {
8122 return __builtin_altivec_vsubecuq(__a, __b, __c);
8124 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
8128 static vector int __ATTRS_o_ai vec_sum4s(vector signed char __a,
8130 return __builtin_altivec_vsum4sbs(__a, __b);
8133 static vector unsigned int __ATTRS_o_ai vec_sum4s(vector unsigned char __a,
8134 vector unsigned int __b) {
8135 return __builtin_altivec_vsum4ubs(__a, __b);
8138 static vector int __ATTRS_o_ai vec_sum4s(vector signed short __a,
8140 return __builtin_altivec_vsum4shs(__a, __b);
8145 static vector int __attribute__((__always_inline__))
8146 vec_vsum4sbs(vector signed char __a, vector int __b) {
8147 return __builtin_altivec_vsum4sbs(__a, __b);
8152 static vector unsigned int __attribute__((__always_inline__))
8153 vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b) {
8154 return __builtin_altivec_vsum4ubs(__a, __b);
8159 static vector int __attribute__((__always_inline__))
8160 vec_vsum4shs(vector signed short __a, vector int __b) {
8161 return __builtin_altivec_vsum4shs(__a, __b);
8166 /* The vsum2sws instruction has a big-endian bias, so that the second
8167 input vector and the result always reference big-endian elements
8168 1 and 3 (little-endian element 0 and 2). For ease of porting the
8169 programmer wants elements 1 and 3 in both cases, so for little
8170 endian we must perform some permutes. */
8172 static vector signed int __attribute__((__always_inline__))
8173 vec_sum2s(vector int __a, vector int __b) {
8174 #ifdef __LITTLE_ENDIAN__
8175 vector int __c = (vector signed int)vec_perm(
8176 __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
8178 __c = __builtin_altivec_vsum2sws(__a, __c);
8179 return (vector signed int)vec_perm(
8180 __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
8183 return __builtin_altivec_vsum2sws(__a, __b);
8189 static vector signed int __attribute__((__always_inline__))
8190 vec_vsum2sws(vector int __a, vector int __b) {
8191 #ifdef __LITTLE_ENDIAN__
8192 vector int __c = (vector signed int)vec_perm(
8193 __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
8195 __c = __builtin_altivec_vsum2sws(__a, __c);
8196 return (vector signed int)vec_perm(
8197 __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
8200 return __builtin_altivec_vsum2sws(__a, __b);
8206 /* The vsumsws instruction has a big-endian bias, so that the second
8207 input vector and the result always reference big-endian element 3
8208 (little-endian element 0). For ease of porting the programmer
8209 wants element 3 in both cases, so for little endian we must perform
8212 static vector signed int __attribute__((__always_inline__))
8213 vec_sums(vector signed int __a, vector signed int __b) {
8214 #ifdef __LITTLE_ENDIAN__
8215 __b = (vector signed int)vec_splat(__b, 3);
8216 __b = __builtin_altivec_vsumsws(__a, __b);
8217 return (vector signed int)(0, 0, 0, __b[0]);
8219 return __builtin_altivec_vsumsws(__a, __b);
8225 static vector signed int __attribute__((__always_inline__))
8226 vec_vsumsws(vector signed int __a, vector signed int __b) {
8227 #ifdef __LITTLE_ENDIAN__
8228 __b = (vector signed int)vec_splat(__b, 3);
8229 __b = __builtin_altivec_vsumsws(__a, __b);
8230 return (vector signed int)(0, 0, 0, __b[0]);
8232 return __builtin_altivec_vsumsws(__a, __b);
8238 static vector float __attribute__((__always_inline__))
8239 vec_trunc(vector float __a) {
8240 return __builtin_altivec_vrfiz(__a);
8245 static vector float __attribute__((__always_inline__))
8246 vec_vrfiz(vector float __a) {
8247 return __builtin_altivec_vrfiz(__a);
8252 /* The vector unpack instructions all have a big-endian bias, so for
8253 little endian we must reverse the meanings of "high" and "low." */
8255 static vector short __ATTRS_o_ai vec_unpackh(vector signed char __a) {
8256 #ifdef __LITTLE_ENDIAN__
8257 return __builtin_altivec_vupklsb((vector char)__a);
8259 return __builtin_altivec_vupkhsb((vector char)__a);
8263 static vector bool short __ATTRS_o_ai vec_unpackh(vector bool char __a) {
8264 #ifdef __LITTLE_ENDIAN__
8265 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8267 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8271 static vector int __ATTRS_o_ai vec_unpackh(vector short __a) {
8272 #ifdef __LITTLE_ENDIAN__
8273 return __builtin_altivec_vupklsh(__a);
8275 return __builtin_altivec_vupkhsh(__a);
8279 static vector bool int __ATTRS_o_ai vec_unpackh(vector bool short __a) {
8280 #ifdef __LITTLE_ENDIAN__
8281 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8283 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8287 static vector unsigned int __ATTRS_o_ai vec_unpackh(vector pixel __a) {
8288 #ifdef __LITTLE_ENDIAN__
8289 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8291 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8295 #ifdef __POWER8_VECTOR__
8296 static vector long long __ATTRS_o_ai vec_unpackh(vector int __a) {
8297 #ifdef __LITTLE_ENDIAN__
8298 return __builtin_altivec_vupklsw(__a);
8300 return __builtin_altivec_vupkhsw(__a);
8304 static vector bool long long __ATTRS_o_ai vec_unpackh(vector bool int __a) {
8305 #ifdef __LITTLE_ENDIAN__
8306 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
8308 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
8315 static vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a) {
8316 #ifdef __LITTLE_ENDIAN__
8317 return __builtin_altivec_vupklsb((vector char)__a);
8319 return __builtin_altivec_vupkhsb((vector char)__a);
8323 static vector bool short __ATTRS_o_ai vec_vupkhsb(vector bool char __a) {
8324 #ifdef __LITTLE_ENDIAN__
8325 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8327 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8333 static vector int __ATTRS_o_ai vec_vupkhsh(vector short __a) {
8334 #ifdef __LITTLE_ENDIAN__
8335 return __builtin_altivec_vupklsh(__a);
8337 return __builtin_altivec_vupkhsh(__a);
8341 static vector bool int __ATTRS_o_ai vec_vupkhsh(vector bool short __a) {
8342 #ifdef __LITTLE_ENDIAN__
8343 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8345 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8349 static vector unsigned int __ATTRS_o_ai vec_vupkhsh(vector pixel __a) {
8350 #ifdef __LITTLE_ENDIAN__
8351 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8353 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8359 #ifdef __POWER8_VECTOR__
8360 static vector long long __ATTRS_o_ai vec_vupkhsw(vector int __a) {
8361 #ifdef __LITTLE_ENDIAN__
8362 return __builtin_altivec_vupklsw(__a);
8364 return __builtin_altivec_vupkhsw(__a);
8368 static vector bool long long __ATTRS_o_ai vec_vupkhsw(vector bool int __a) {
8369 #ifdef __LITTLE_ENDIAN__
8370 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
8372 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
8379 static vector short __ATTRS_o_ai vec_unpackl(vector signed char __a) {
8380 #ifdef __LITTLE_ENDIAN__
8381 return __builtin_altivec_vupkhsb((vector char)__a);
8383 return __builtin_altivec_vupklsb((vector char)__a);
8387 static vector bool short __ATTRS_o_ai vec_unpackl(vector bool char __a) {
8388 #ifdef __LITTLE_ENDIAN__
8389 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8391 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8395 static vector int __ATTRS_o_ai vec_unpackl(vector short __a) {
8396 #ifdef __LITTLE_ENDIAN__
8397 return __builtin_altivec_vupkhsh(__a);
8399 return __builtin_altivec_vupklsh(__a);
8403 static vector bool int __ATTRS_o_ai vec_unpackl(vector bool short __a) {
8404 #ifdef __LITTLE_ENDIAN__
8405 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8407 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8411 static vector unsigned int __ATTRS_o_ai vec_unpackl(vector pixel __a) {
8412 #ifdef __LITTLE_ENDIAN__
8413 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8415 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8419 #ifdef __POWER8_VECTOR__
8420 static vector long long __ATTRS_o_ai vec_unpackl(vector int __a) {
8421 #ifdef __LITTLE_ENDIAN__
8422 return __builtin_altivec_vupkhsw(__a);
8424 return __builtin_altivec_vupklsw(__a);
8428 static vector bool long long __ATTRS_o_ai vec_unpackl(vector bool int __a) {
8429 #ifdef __LITTLE_ENDIAN__
8430 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
8432 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
8439 static vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a) {
8440 #ifdef __LITTLE_ENDIAN__
8441 return __builtin_altivec_vupkhsb((vector char)__a);
8443 return __builtin_altivec_vupklsb((vector char)__a);
8447 static vector bool short __ATTRS_o_ai vec_vupklsb(vector bool char __a) {
8448 #ifdef __LITTLE_ENDIAN__
8449 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8451 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8457 static vector int __ATTRS_o_ai vec_vupklsh(vector short __a) {
8458 #ifdef __LITTLE_ENDIAN__
8459 return __builtin_altivec_vupkhsh(__a);
8461 return __builtin_altivec_vupklsh(__a);
8465 static vector bool int __ATTRS_o_ai vec_vupklsh(vector bool short __a) {
8466 #ifdef __LITTLE_ENDIAN__
8467 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8469 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8473 static vector unsigned int __ATTRS_o_ai vec_vupklsh(vector pixel __a) {
8474 #ifdef __LITTLE_ENDIAN__
8475 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8477 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8483 #ifdef __POWER8_VECTOR__
8484 static vector long long __ATTRS_o_ai vec_vupklsw(vector int __a) {
8485 #ifdef __LITTLE_ENDIAN__
8486 return __builtin_altivec_vupkhsw(__a);
8488 return __builtin_altivec_vupklsw(__a);
8492 static vector bool long long __ATTRS_o_ai vec_vupklsw(vector bool int __a) {
8493 #ifdef __LITTLE_ENDIAN__
8494 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
8496 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
8505 static vector signed int __ATTRS_o_ai vec_vsx_ld(int __a,
8506 const vector signed int *__b) {
8507 return (vector signed int)__builtin_vsx_lxvw4x(__a, __b);
8510 static vector unsigned int __ATTRS_o_ai
8511 vec_vsx_ld(int __a, const vector unsigned int *__b) {
8512 return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b);
8515 static vector float __ATTRS_o_ai vec_vsx_ld(int __a, const vector float *__b) {
8516 return (vector float)__builtin_vsx_lxvw4x(__a, __b);
8519 static vector signed long long __ATTRS_o_ai
8520 vec_vsx_ld(int __a, const vector signed long long *__b) {
8521 return (vector signed long long)__builtin_vsx_lxvd2x(__a, __b);
8524 static vector unsigned long long __ATTRS_o_ai
8525 vec_vsx_ld(int __a, const vector unsigned long long *__b) {
8526 return (vector unsigned long long)__builtin_vsx_lxvd2x(__a, __b);
8529 static vector double __ATTRS_o_ai vec_vsx_ld(int __a,
8530 const vector double *__b) {
8531 return (vector double)__builtin_vsx_lxvd2x(__a, __b);
8540 static void __ATTRS_o_ai vec_vsx_st(vector signed int __a, int __b,
8541 vector signed int *__c) {
8542 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
8545 static void __ATTRS_o_ai vec_vsx_st(vector unsigned int __a, int __b,
8546 vector unsigned int *__c) {
8547 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
8550 static void __ATTRS_o_ai vec_vsx_st(vector float __a, int __b,
8551 vector float *__c) {
8552 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
8555 static void __ATTRS_o_ai vec_vsx_st(vector signed long long __a, int __b,
8556 vector signed long long *__c) {
8557 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
8560 static void __ATTRS_o_ai vec_vsx_st(vector unsigned long long __a, int __b,
8561 vector unsigned long long *__c) {
8562 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
8565 static void __ATTRS_o_ai vec_vsx_st(vector double __a, int __b,
8566 vector double *__c) {
8567 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
8574 #define __builtin_altivec_vxor vec_xor
8576 static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a,
8577 vector signed char __b) {
8581 static vector signed char __ATTRS_o_ai vec_xor(vector bool char __a,
8582 vector signed char __b) {
8583 return (vector signed char)__a ^ __b;
8586 static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a,
8587 vector bool char __b) {
8588 return __a ^ (vector signed char)__b;
8591 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
8592 vector unsigned char __b) {
8596 static vector unsigned char __ATTRS_o_ai vec_xor(vector bool char __a,
8597 vector unsigned char __b) {
8598 return (vector unsigned char)__a ^ __b;
8601 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
8602 vector bool char __b) {
8603 return __a ^ (vector unsigned char)__b;
8606 static vector bool char __ATTRS_o_ai vec_xor(vector bool char __a,
8607 vector bool char __b) {
8611 static vector short __ATTRS_o_ai vec_xor(vector short __a, vector short __b) {
8615 static vector short __ATTRS_o_ai vec_xor(vector bool short __a,
8617 return (vector short)__a ^ __b;
8620 static vector short __ATTRS_o_ai vec_xor(vector short __a,
8621 vector bool short __b) {
8622 return __a ^ (vector short)__b;
8625 static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a,
8626 vector unsigned short __b) {
8630 static vector unsigned short __ATTRS_o_ai vec_xor(vector bool short __a,
8631 vector unsigned short __b) {
8632 return (vector unsigned short)__a ^ __b;
8635 static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a,
8636 vector bool short __b) {
8637 return __a ^ (vector unsigned short)__b;
8640 static vector bool short __ATTRS_o_ai vec_xor(vector bool short __a,
8641 vector bool short __b) {
8645 static vector int __ATTRS_o_ai vec_xor(vector int __a, vector int __b) {
8649 static vector int __ATTRS_o_ai vec_xor(vector bool int __a, vector int __b) {
8650 return (vector int)__a ^ __b;
8653 static vector int __ATTRS_o_ai vec_xor(vector int __a, vector bool int __b) {
8654 return __a ^ (vector int)__b;
8657 static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a,
8658 vector unsigned int __b) {
8662 static vector unsigned int __ATTRS_o_ai vec_xor(vector bool int __a,
8663 vector unsigned int __b) {
8664 return (vector unsigned int)__a ^ __b;
8667 static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a,
8668 vector bool int __b) {
8669 return __a ^ (vector unsigned int)__b;
8672 static vector bool int __ATTRS_o_ai vec_xor(vector bool int __a,
8673 vector bool int __b) {
8677 static vector float __ATTRS_o_ai vec_xor(vector float __a, vector float __b) {
8678 vector unsigned int __res =
8679 (vector unsigned int)__a ^ (vector unsigned int)__b;
8680 return (vector float)__res;
8683 static vector float __ATTRS_o_ai vec_xor(vector bool int __a,
8685 vector unsigned int __res =
8686 (vector unsigned int)__a ^ (vector unsigned int)__b;
8687 return (vector float)__res;
8690 static vector float __ATTRS_o_ai vec_xor(vector float __a,
8691 vector bool int __b) {
8692 vector unsigned int __res =
8693 (vector unsigned int)__a ^ (vector unsigned int)__b;
8694 return (vector float)__res;
8698 static vector signed long long __ATTRS_o_ai
8699 vec_xor(vector signed long long __a, vector signed long long __b) {
8703 static vector signed long long __ATTRS_o_ai
8704 vec_xor(vector bool long long __a, vector signed long long __b) {
8705 return (vector signed long long)__a ^ __b;
8708 static vector signed long long __ATTRS_o_ai vec_xor(vector signed long long __a,
8709 vector bool long long __b) {
8710 return __a ^ (vector signed long long)__b;
8713 static vector unsigned long long __ATTRS_o_ai
8714 vec_xor(vector unsigned long long __a, vector unsigned long long __b) {
8718 static vector unsigned long long __ATTRS_o_ai
8719 vec_xor(vector bool long long __a, vector unsigned long long __b) {
8720 return (vector unsigned long long)__a ^ __b;
8723 static vector unsigned long long __ATTRS_o_ai
8724 vec_xor(vector unsigned long long __a, vector bool long long __b) {
8725 return __a ^ (vector unsigned long long)__b;
8728 static vector bool long long __ATTRS_o_ai vec_xor(vector bool long long __a,
8729 vector bool long long __b) {
8736 static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a,
8737 vector signed char __b) {
8741 static vector signed char __ATTRS_o_ai vec_vxor(vector bool char __a,
8742 vector signed char __b) {
8743 return (vector signed char)__a ^ __b;
8746 static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a,
8747 vector bool char __b) {
8748 return __a ^ (vector signed char)__b;
8751 static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a,
8752 vector unsigned char __b) {
8756 static vector unsigned char __ATTRS_o_ai vec_vxor(vector bool char __a,
8757 vector unsigned char __b) {
8758 return (vector unsigned char)__a ^ __b;
8761 static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a,
8762 vector bool char __b) {
8763 return __a ^ (vector unsigned char)__b;
8766 static vector bool char __ATTRS_o_ai vec_vxor(vector bool char __a,
8767 vector bool char __b) {
8771 static vector short __ATTRS_o_ai vec_vxor(vector short __a, vector short __b) {
8775 static vector short __ATTRS_o_ai vec_vxor(vector bool short __a,
8777 return (vector short)__a ^ __b;
8780 static vector short __ATTRS_o_ai vec_vxor(vector short __a,
8781 vector bool short __b) {
8782 return __a ^ (vector short)__b;
8785 static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a,
8786 vector unsigned short __b) {
8790 static vector unsigned short __ATTRS_o_ai vec_vxor(vector bool short __a,
8791 vector unsigned short __b) {
8792 return (vector unsigned short)__a ^ __b;
8795 static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a,
8796 vector bool short __b) {
8797 return __a ^ (vector unsigned short)__b;
8800 static vector bool short __ATTRS_o_ai vec_vxor(vector bool short __a,
8801 vector bool short __b) {
8805 static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector int __b) {
8809 static vector int __ATTRS_o_ai vec_vxor(vector bool int __a, vector int __b) {
8810 return (vector int)__a ^ __b;
8813 static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector bool int __b) {
8814 return __a ^ (vector int)__b;
8817 static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a,
8818 vector unsigned int __b) {
8822 static vector unsigned int __ATTRS_o_ai vec_vxor(vector bool int __a,
8823 vector unsigned int __b) {
8824 return (vector unsigned int)__a ^ __b;
8827 static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a,
8828 vector bool int __b) {
8829 return __a ^ (vector unsigned int)__b;
8832 static vector bool int __ATTRS_o_ai vec_vxor(vector bool int __a,
8833 vector bool int __b) {
8837 static vector float __ATTRS_o_ai vec_vxor(vector float __a, vector float __b) {
8838 vector unsigned int __res =
8839 (vector unsigned int)__a ^ (vector unsigned int)__b;
8840 return (vector float)__res;
8843 static vector float __ATTRS_o_ai vec_vxor(vector bool int __a,
8845 vector unsigned int __res =
8846 (vector unsigned int)__a ^ (vector unsigned int)__b;
8847 return (vector float)__res;
8850 static vector float __ATTRS_o_ai vec_vxor(vector float __a,
8851 vector bool int __b) {
8852 vector unsigned int __res =
8853 (vector unsigned int)__a ^ (vector unsigned int)__b;
8854 return (vector float)__res;
8858 static vector signed long long __ATTRS_o_ai
8859 vec_vxor(vector signed long long __a, vector signed long long __b) {
8863 static vector signed long long __ATTRS_o_ai
8864 vec_vxor(vector bool long long __a, vector signed long long __b) {
8865 return (vector signed long long)__a ^ __b;
8868 static vector signed long long __ATTRS_o_ai
8869 vec_vxor(vector signed long long __a, vector bool long long __b) {
8870 return __a ^ (vector signed long long)__b;
8873 static vector unsigned long long __ATTRS_o_ai
8874 vec_vxor(vector unsigned long long __a, vector unsigned long long __b) {
8878 static vector unsigned long long __ATTRS_o_ai
8879 vec_vxor(vector bool long long __a, vector unsigned long long __b) {
8880 return (vector unsigned long long)__a ^ __b;
8883 static vector unsigned long long __ATTRS_o_ai
8884 vec_vxor(vector unsigned long long __a, vector bool long long __b) {
8885 return __a ^ (vector unsigned long long)__b;
8888 static vector bool long long __ATTRS_o_ai vec_vxor(vector bool long long __a,
8889 vector bool long long __b) {
8894 /* ------------------------ extensions for CBEA ----------------------------- */
8898 static signed char __ATTRS_o_ai vec_extract(vector signed char __a, int __b) {
8902 static unsigned char __ATTRS_o_ai vec_extract(vector unsigned char __a,
8907 static short __ATTRS_o_ai vec_extract(vector short __a, int __b) {
8911 static unsigned short __ATTRS_o_ai vec_extract(vector unsigned short __a,
8916 static int __ATTRS_o_ai vec_extract(vector int __a, int __b) {
8920 static unsigned int __ATTRS_o_ai vec_extract(vector unsigned int __a, int __b) {
8924 static float __ATTRS_o_ai vec_extract(vector float __a, int __b) {
8930 static vector signed char __ATTRS_o_ai vec_insert(signed char __a,
8931 vector signed char __b,
8937 static vector unsigned char __ATTRS_o_ai vec_insert(unsigned char __a,
8938 vector unsigned char __b,
8944 static vector short __ATTRS_o_ai vec_insert(short __a, vector short __b,
8950 static vector unsigned short __ATTRS_o_ai vec_insert(unsigned short __a,
8951 vector unsigned short __b,
8957 static vector int __ATTRS_o_ai vec_insert(int __a, vector int __b, int __c) {
8962 static vector unsigned int __ATTRS_o_ai vec_insert(unsigned int __a,
8963 vector unsigned int __b,
8969 static vector float __ATTRS_o_ai vec_insert(float __a, vector float __b,
8977 static vector signed char __ATTRS_o_ai vec_lvlx(int __a,
8978 const signed char *__b) {
8979 return vec_perm(vec_ld(__a, __b), (vector signed char)(0),
8980 vec_lvsl(__a, __b));
8983 static vector signed char __ATTRS_o_ai vec_lvlx(int __a,
8984 const vector signed char *__b) {
8985 return vec_perm(vec_ld(__a, __b), (vector signed char)(0),
8986 vec_lvsl(__a, (unsigned char *)__b));
8989 static vector unsigned char __ATTRS_o_ai vec_lvlx(int __a,
8990 const unsigned char *__b) {
8991 return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0),
8992 vec_lvsl(__a, __b));
8995 static vector unsigned char __ATTRS_o_ai
8996 vec_lvlx(int __a, const vector unsigned char *__b) {
8997 return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0),
8998 vec_lvsl(__a, (unsigned char *)__b));
9001 static vector bool char __ATTRS_o_ai vec_lvlx(int __a,
9002 const vector bool char *__b) {
9003 return vec_perm(vec_ld(__a, __b), (vector bool char)(0),
9004 vec_lvsl(__a, (unsigned char *)__b));
9007 static vector short __ATTRS_o_ai vec_lvlx(int __a, const short *__b) {
9008 return vec_perm(vec_ld(__a, __b), (vector short)(0), vec_lvsl(__a, __b));
9011 static vector short __ATTRS_o_ai vec_lvlx(int __a, const vector short *__b) {
9012 return vec_perm(vec_ld(__a, __b), (vector short)(0),
9013 vec_lvsl(__a, (unsigned char *)__b));
9016 static vector unsigned short __ATTRS_o_ai vec_lvlx(int __a,
9017 const unsigned short *__b) {
9018 return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0),
9019 vec_lvsl(__a, __b));
9022 static vector unsigned short __ATTRS_o_ai
9023 vec_lvlx(int __a, const vector unsigned short *__b) {
9024 return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0),
9025 vec_lvsl(__a, (unsigned char *)__b));
9028 static vector bool short __ATTRS_o_ai vec_lvlx(int __a,
9029 const vector bool short *__b) {
9030 return vec_perm(vec_ld(__a, __b), (vector bool short)(0),
9031 vec_lvsl(__a, (unsigned char *)__b));
9034 static vector pixel __ATTRS_o_ai vec_lvlx(int __a, const vector pixel *__b) {
9035 return vec_perm(vec_ld(__a, __b), (vector pixel)(0),
9036 vec_lvsl(__a, (unsigned char *)__b));
9039 static vector int __ATTRS_o_ai vec_lvlx(int __a, const int *__b) {
9040 return vec_perm(vec_ld(__a, __b), (vector int)(0), vec_lvsl(__a, __b));
9043 static vector int __ATTRS_o_ai vec_lvlx(int __a, const vector int *__b) {
9044 return vec_perm(vec_ld(__a, __b), (vector int)(0),
9045 vec_lvsl(__a, (unsigned char *)__b));
9048 static vector unsigned int __ATTRS_o_ai vec_lvlx(int __a,
9049 const unsigned int *__b) {
9050 return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0),
9051 vec_lvsl(__a, __b));
9054 static vector unsigned int __ATTRS_o_ai
9055 vec_lvlx(int __a, const vector unsigned int *__b) {
9056 return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0),
9057 vec_lvsl(__a, (unsigned char *)__b));
9060 static vector bool int __ATTRS_o_ai vec_lvlx(int __a,
9061 const vector bool int *__b) {
9062 return vec_perm(vec_ld(__a, __b), (vector bool int)(0),
9063 vec_lvsl(__a, (unsigned char *)__b));
9066 static vector float __ATTRS_o_ai vec_lvlx(int __a, const float *__b) {
9067 return vec_perm(vec_ld(__a, __b), (vector float)(0), vec_lvsl(__a, __b));
9070 static vector float __ATTRS_o_ai vec_lvlx(int __a, const vector float *__b) {
9071 return vec_perm(vec_ld(__a, __b), (vector float)(0),
9072 vec_lvsl(__a, (unsigned char *)__b));
9077 static vector signed char __ATTRS_o_ai vec_lvlxl(int __a,
9078 const signed char *__b) {
9079 return vec_perm(vec_ldl(__a, __b), (vector signed char)(0),
9080 vec_lvsl(__a, __b));
9083 static vector signed char __ATTRS_o_ai
9084 vec_lvlxl(int __a, const vector signed char *__b) {
9085 return vec_perm(vec_ldl(__a, __b), (vector signed char)(0),
9086 vec_lvsl(__a, (unsigned char *)__b));
9089 static vector unsigned char __ATTRS_o_ai vec_lvlxl(int __a,
9090 const unsigned char *__b) {
9091 return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0),
9092 vec_lvsl(__a, __b));
9095 static vector unsigned char __ATTRS_o_ai
9096 vec_lvlxl(int __a, const vector unsigned char *__b) {
9097 return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0),
9098 vec_lvsl(__a, (unsigned char *)__b));
9101 static vector bool char __ATTRS_o_ai vec_lvlxl(int __a,
9102 const vector bool char *__b) {
9103 return vec_perm(vec_ldl(__a, __b), (vector bool char)(0),
9104 vec_lvsl(__a, (unsigned char *)__b));
9107 static vector short __ATTRS_o_ai vec_lvlxl(int __a, const short *__b) {
9108 return vec_perm(vec_ldl(__a, __b), (vector short)(0), vec_lvsl(__a, __b));
9111 static vector short __ATTRS_o_ai vec_lvlxl(int __a, const vector short *__b) {
9112 return vec_perm(vec_ldl(__a, __b), (vector short)(0),
9113 vec_lvsl(__a, (unsigned char *)__b));
9116 static vector unsigned short __ATTRS_o_ai vec_lvlxl(int __a,
9117 const unsigned short *__b) {
9118 return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0),
9119 vec_lvsl(__a, __b));
9122 static vector unsigned short __ATTRS_o_ai
9123 vec_lvlxl(int __a, const vector unsigned short *__b) {
9124 return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0),
9125 vec_lvsl(__a, (unsigned char *)__b));
9128 static vector bool short __ATTRS_o_ai vec_lvlxl(int __a,
9129 const vector bool short *__b) {
9130 return vec_perm(vec_ldl(__a, __b), (vector bool short)(0),
9131 vec_lvsl(__a, (unsigned char *)__b));
9134 static vector pixel __ATTRS_o_ai vec_lvlxl(int __a, const vector pixel *__b) {
9135 return vec_perm(vec_ldl(__a, __b), (vector pixel)(0),
9136 vec_lvsl(__a, (unsigned char *)__b));
9139 static vector int __ATTRS_o_ai vec_lvlxl(int __a, const int *__b) {
9140 return vec_perm(vec_ldl(__a, __b), (vector int)(0), vec_lvsl(__a, __b));
9143 static vector int __ATTRS_o_ai vec_lvlxl(int __a, const vector int *__b) {
9144 return vec_perm(vec_ldl(__a, __b), (vector int)(0),
9145 vec_lvsl(__a, (unsigned char *)__b));
9148 static vector unsigned int __ATTRS_o_ai vec_lvlxl(int __a,
9149 const unsigned int *__b) {
9150 return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0),
9151 vec_lvsl(__a, __b));
9154 static vector unsigned int __ATTRS_o_ai
9155 vec_lvlxl(int __a, const vector unsigned int *__b) {
9156 return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0),
9157 vec_lvsl(__a, (unsigned char *)__b));
9160 static vector bool int __ATTRS_o_ai vec_lvlxl(int __a,
9161 const vector bool int *__b) {
9162 return vec_perm(vec_ldl(__a, __b), (vector bool int)(0),
9163 vec_lvsl(__a, (unsigned char *)__b));
9166 static vector float __ATTRS_o_ai vec_lvlxl(int __a, const float *__b) {
9167 return vec_perm(vec_ldl(__a, __b), (vector float)(0), vec_lvsl(__a, __b));
9170 static vector float __ATTRS_o_ai vec_lvlxl(int __a, vector float *__b) {
9171 return vec_perm(vec_ldl(__a, __b), (vector float)(0),
9172 vec_lvsl(__a, (unsigned char *)__b));
9177 static vector signed char __ATTRS_o_ai vec_lvrx(int __a,
9178 const signed char *__b) {
9179 return vec_perm((vector signed char)(0), vec_ld(__a, __b),
9180 vec_lvsl(__a, __b));
9183 static vector signed char __ATTRS_o_ai vec_lvrx(int __a,
9184 const vector signed char *__b) {
9185 return vec_perm((vector signed char)(0), vec_ld(__a, __b),
9186 vec_lvsl(__a, (unsigned char *)__b));
9189 static vector unsigned char __ATTRS_o_ai vec_lvrx(int __a,
9190 const unsigned char *__b) {
9191 return vec_perm((vector unsigned char)(0), vec_ld(__a, __b),
9192 vec_lvsl(__a, __b));
9195 static vector unsigned char __ATTRS_o_ai
9196 vec_lvrx(int __a, const vector unsigned char *__b) {
9197 return vec_perm((vector unsigned char)(0), vec_ld(__a, __b),
9198 vec_lvsl(__a, (unsigned char *)__b));
9201 static vector bool char __ATTRS_o_ai vec_lvrx(int __a,
9202 const vector bool char *__b) {
9203 return vec_perm((vector bool char)(0), vec_ld(__a, __b),
9204 vec_lvsl(__a, (unsigned char *)__b));
9207 static vector short __ATTRS_o_ai vec_lvrx(int __a, const short *__b) {
9208 return vec_perm((vector short)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
9211 static vector short __ATTRS_o_ai vec_lvrx(int __a, const vector short *__b) {
9212 return vec_perm((vector short)(0), vec_ld(__a, __b),
9213 vec_lvsl(__a, (unsigned char *)__b));
9216 static vector unsigned short __ATTRS_o_ai vec_lvrx(int __a,
9217 const unsigned short *__b) {
9218 return vec_perm((vector unsigned short)(0), vec_ld(__a, __b),
9219 vec_lvsl(__a, __b));
9222 static vector unsigned short __ATTRS_o_ai
9223 vec_lvrx(int __a, const vector unsigned short *__b) {
9224 return vec_perm((vector unsigned short)(0), vec_ld(__a, __b),
9225 vec_lvsl(__a, (unsigned char *)__b));
9228 static vector bool short __ATTRS_o_ai vec_lvrx(int __a,
9229 const vector bool short *__b) {
9230 return vec_perm((vector bool short)(0), vec_ld(__a, __b),
9231 vec_lvsl(__a, (unsigned char *)__b));
9234 static vector pixel __ATTRS_o_ai vec_lvrx(int __a, const vector pixel *__b) {
9235 return vec_perm((vector pixel)(0), vec_ld(__a, __b),
9236 vec_lvsl(__a, (unsigned char *)__b));
9239 static vector int __ATTRS_o_ai vec_lvrx(int __a, const int *__b) {
9240 return vec_perm((vector int)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
9243 static vector int __ATTRS_o_ai vec_lvrx(int __a, const vector int *__b) {
9244 return vec_perm((vector int)(0), vec_ld(__a, __b),
9245 vec_lvsl(__a, (unsigned char *)__b));
9248 static vector unsigned int __ATTRS_o_ai vec_lvrx(int __a,
9249 const unsigned int *__b) {
9250 return vec_perm((vector unsigned int)(0), vec_ld(__a, __b),
9251 vec_lvsl(__a, __b));
9254 static vector unsigned int __ATTRS_o_ai
9255 vec_lvrx(int __a, const vector unsigned int *__b) {
9256 return vec_perm((vector unsigned int)(0), vec_ld(__a, __b),
9257 vec_lvsl(__a, (unsigned char *)__b));
9260 static vector bool int __ATTRS_o_ai vec_lvrx(int __a,
9261 const vector bool int *__b) {
9262 return vec_perm((vector bool int)(0), vec_ld(__a, __b),
9263 vec_lvsl(__a, (unsigned char *)__b));
9266 static vector float __ATTRS_o_ai vec_lvrx(int __a, const float *__b) {
9267 return vec_perm((vector float)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
9270 static vector float __ATTRS_o_ai vec_lvrx(int __a, const vector float *__b) {
9271 return vec_perm((vector float)(0), vec_ld(__a, __b),
9272 vec_lvsl(__a, (unsigned char *)__b));
9277 static vector signed char __ATTRS_o_ai vec_lvrxl(int __a,
9278 const signed char *__b) {
9279 return vec_perm((vector signed char)(0), vec_ldl(__a, __b),
9280 vec_lvsl(__a, __b));
9283 static vector signed char __ATTRS_o_ai
9284 vec_lvrxl(int __a, const vector signed char *__b) {
9285 return vec_perm((vector signed char)(0), vec_ldl(__a, __b),
9286 vec_lvsl(__a, (unsigned char *)__b));
9289 static vector unsigned char __ATTRS_o_ai vec_lvrxl(int __a,
9290 const unsigned char *__b) {
9291 return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b),
9292 vec_lvsl(__a, __b));
9295 static vector unsigned char __ATTRS_o_ai
9296 vec_lvrxl(int __a, const vector unsigned char *__b) {
9297 return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b),
9298 vec_lvsl(__a, (unsigned char *)__b));
9301 static vector bool char __ATTRS_o_ai vec_lvrxl(int __a,
9302 const vector bool char *__b) {
9303 return vec_perm((vector bool char)(0), vec_ldl(__a, __b),
9304 vec_lvsl(__a, (unsigned char *)__b));
9307 static vector short __ATTRS_o_ai vec_lvrxl(int __a, const short *__b) {
9308 return vec_perm((vector short)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
9311 static vector short __ATTRS_o_ai vec_lvrxl(int __a, const vector short *__b) {
9312 return vec_perm((vector short)(0), vec_ldl(__a, __b),
9313 vec_lvsl(__a, (unsigned char *)__b));
9316 static vector unsigned short __ATTRS_o_ai vec_lvrxl(int __a,
9317 const unsigned short *__b) {
9318 return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b),
9319 vec_lvsl(__a, __b));
9322 static vector unsigned short __ATTRS_o_ai
9323 vec_lvrxl(int __a, const vector unsigned short *__b) {
9324 return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b),
9325 vec_lvsl(__a, (unsigned char *)__b));
9328 static vector bool short __ATTRS_o_ai vec_lvrxl(int __a,
9329 const vector bool short *__b) {
9330 return vec_perm((vector bool short)(0), vec_ldl(__a, __b),
9331 vec_lvsl(__a, (unsigned char *)__b));
9334 static vector pixel __ATTRS_o_ai vec_lvrxl(int __a, const vector pixel *__b) {
9335 return vec_perm((vector pixel)(0), vec_ldl(__a, __b),
9336 vec_lvsl(__a, (unsigned char *)__b));
9339 static vector int __ATTRS_o_ai vec_lvrxl(int __a, const int *__b) {
9340 return vec_perm((vector int)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
9343 static vector int __ATTRS_o_ai vec_lvrxl(int __a, const vector int *__b) {
9344 return vec_perm((vector int)(0), vec_ldl(__a, __b),
9345 vec_lvsl(__a, (unsigned char *)__b));
9348 static vector unsigned int __ATTRS_o_ai vec_lvrxl(int __a,
9349 const unsigned int *__b) {
9350 return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b),
9351 vec_lvsl(__a, __b));
9354 static vector unsigned int __ATTRS_o_ai
9355 vec_lvrxl(int __a, const vector unsigned int *__b) {
9356 return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b),
9357 vec_lvsl(__a, (unsigned char *)__b));
9360 static vector bool int __ATTRS_o_ai vec_lvrxl(int __a,
9361 const vector bool int *__b) {
9362 return vec_perm((vector bool int)(0), vec_ldl(__a, __b),
9363 vec_lvsl(__a, (unsigned char *)__b));
9366 static vector float __ATTRS_o_ai vec_lvrxl(int __a, const float *__b) {
9367 return vec_perm((vector float)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
9370 static vector float __ATTRS_o_ai vec_lvrxl(int __a, const vector float *__b) {
9371 return vec_perm((vector float)(0), vec_ldl(__a, __b),
9372 vec_lvsl(__a, (unsigned char *)__b));
9377 static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b,
9379 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9383 static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b,
9384 vector signed char *__c) {
9386 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9390 static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b,
9391 unsigned char *__c) {
9392 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9396 static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b,
9397 vector unsigned char *__c) {
9399 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9403 static void __ATTRS_o_ai vec_stvlx(vector bool char __a, int __b,
9404 vector bool char *__c) {
9406 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9410 static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b, short *__c) {
9411 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9415 static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b,
9416 vector short *__c) {
9418 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9422 static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b,
9423 unsigned short *__c) {
9424 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9428 static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b,
9429 vector unsigned short *__c) {
9431 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9435 static void __ATTRS_o_ai vec_stvlx(vector bool short __a, int __b,
9436 vector bool short *__c) {
9438 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9442 static void __ATTRS_o_ai vec_stvlx(vector pixel __a, int __b,
9443 vector pixel *__c) {
9445 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9449 static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, int *__c) {
9450 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9454 static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, vector int *__c) {
9456 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9460 static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b,
9461 unsigned int *__c) {
9462 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9466 static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b,
9467 vector unsigned int *__c) {
9469 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9473 static void __ATTRS_o_ai vec_stvlx(vector bool int __a, int __b,
9474 vector bool int *__c) {
9476 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9480 static void __ATTRS_o_ai vec_stvlx(vector float __a, int __b,
9481 vector float *__c) {
9483 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9489 static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b,
9491 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9495 static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b,
9496 vector signed char *__c) {
9498 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9502 static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b,
9503 unsigned char *__c) {
9504 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9508 static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b,
9509 vector unsigned char *__c) {
9511 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9515 static void __ATTRS_o_ai vec_stvlxl(vector bool char __a, int __b,
9516 vector bool char *__c) {
9518 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9522 static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b, short *__c) {
9523 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9527 static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b,
9528 vector short *__c) {
9530 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9534 static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b,
9535 unsigned short *__c) {
9536 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9540 static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b,
9541 vector unsigned short *__c) {
9543 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9547 static void __ATTRS_o_ai vec_stvlxl(vector bool short __a, int __b,
9548 vector bool short *__c) {
9550 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9554 static void __ATTRS_o_ai vec_stvlxl(vector pixel __a, int __b,
9555 vector pixel *__c) {
9557 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9561 static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, int *__c) {
9562 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9566 static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, vector int *__c) {
9568 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9572 static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b,
9573 unsigned int *__c) {
9574 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
9578 static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b,
9579 vector unsigned int *__c) {
9581 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9585 static void __ATTRS_o_ai vec_stvlxl(vector bool int __a, int __b,
9586 vector bool int *__c) {
9588 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9592 static void __ATTRS_o_ai vec_stvlxl(vector float __a, int __b,
9593 vector float *__c) {
9595 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
9601 static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b,
9603 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9607 static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b,
9608 vector signed char *__c) {
9610 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9614 static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b,
9615 unsigned char *__c) {
9616 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9620 static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b,
9621 vector unsigned char *__c) {
9623 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9627 static void __ATTRS_o_ai vec_stvrx(vector bool char __a, int __b,
9628 vector bool char *__c) {
9630 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9634 static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b, short *__c) {
9635 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9639 static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b,
9640 vector short *__c) {
9642 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9646 static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b,
9647 unsigned short *__c) {
9648 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9652 static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b,
9653 vector unsigned short *__c) {
9655 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9659 static void __ATTRS_o_ai vec_stvrx(vector bool short __a, int __b,
9660 vector bool short *__c) {
9662 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9666 static void __ATTRS_o_ai vec_stvrx(vector pixel __a, int __b,
9667 vector pixel *__c) {
9669 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9673 static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, int *__c) {
9674 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9678 static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, vector int *__c) {
9680 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9684 static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b,
9685 unsigned int *__c) {
9686 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9690 static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b,
9691 vector unsigned int *__c) {
9693 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9697 static void __ATTRS_o_ai vec_stvrx(vector bool int __a, int __b,
9698 vector bool int *__c) {
9700 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9704 static void __ATTRS_o_ai vec_stvrx(vector float __a, int __b,
9705 vector float *__c) {
9707 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9713 static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b,
9715 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9719 static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b,
9720 vector signed char *__c) {
9722 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9726 static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b,
9727 unsigned char *__c) {
9728 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9732 static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b,
9733 vector unsigned char *__c) {
9735 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9739 static void __ATTRS_o_ai vec_stvrxl(vector bool char __a, int __b,
9740 vector bool char *__c) {
9742 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9746 static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b, short *__c) {
9747 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9751 static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b,
9752 vector short *__c) {
9754 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9758 static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b,
9759 unsigned short *__c) {
9760 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9764 static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b,
9765 vector unsigned short *__c) {
9767 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9771 static void __ATTRS_o_ai vec_stvrxl(vector bool short __a, int __b,
9772 vector bool short *__c) {
9774 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9778 static void __ATTRS_o_ai vec_stvrxl(vector pixel __a, int __b,
9779 vector pixel *__c) {
9781 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9785 static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, int *__c) {
9786 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9790 static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, vector int *__c) {
9792 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9796 static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b,
9797 unsigned int *__c) {
9798 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
9802 static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b,
9803 vector unsigned int *__c) {
9805 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9809 static void __ATTRS_o_ai vec_stvrxl(vector bool int __a, int __b,
9810 vector bool int *__c) {
9812 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9816 static void __ATTRS_o_ai vec_stvrxl(vector float __a, int __b,
9817 vector float *__c) {
9819 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
9825 static vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b) {
9826 vector signed char __res = (vector signed char)(0);
9831 static vector unsigned char __ATTRS_o_ai vec_promote(unsigned char __a,
9833 vector unsigned char __res = (vector unsigned char)(0);
9838 static vector short __ATTRS_o_ai vec_promote(short __a, int __b) {
9839 vector short __res = (vector short)(0);
9844 static vector unsigned short __ATTRS_o_ai vec_promote(unsigned short __a,
9846 vector unsigned short __res = (vector unsigned short)(0);
9851 static vector int __ATTRS_o_ai vec_promote(int __a, int __b) {
9852 vector int __res = (vector int)(0);
9857 static vector unsigned int __ATTRS_o_ai vec_promote(unsigned int __a, int __b) {
9858 vector unsigned int __res = (vector unsigned int)(0);
9863 static vector float __ATTRS_o_ai vec_promote(float __a, int __b) {
9864 vector float __res = (vector float)(0);
9871 static vector signed char __ATTRS_o_ai vec_splats(signed char __a) {
9872 return (vector signed char)(__a);
9875 static vector unsigned char __ATTRS_o_ai vec_splats(unsigned char __a) {
9876 return (vector unsigned char)(__a);
9879 static vector short __ATTRS_o_ai vec_splats(short __a) {
9880 return (vector short)(__a);
9883 static vector unsigned short __ATTRS_o_ai vec_splats(unsigned short __a) {
9884 return (vector unsigned short)(__a);
9887 static vector int __ATTRS_o_ai vec_splats(int __a) { return (vector int)(__a); }
9889 static vector unsigned int __ATTRS_o_ai vec_splats(unsigned int __a) {
9890 return (vector unsigned int)(__a);
9893 static vector float __ATTRS_o_ai vec_splats(float __a) {
9894 return (vector float)(__a);
9897 /* ----------------------------- predicates --------------------------------- */
9901 static int __ATTRS_o_ai vec_all_eq(vector signed char __a,
9902 vector signed char __b) {
9903 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
9907 static int __ATTRS_o_ai vec_all_eq(vector signed char __a,
9908 vector bool char __b) {
9909 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
9913 static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a,
9914 vector unsigned char __b) {
9915 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
9919 static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a,
9920 vector bool char __b) {
9921 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
9925 static int __ATTRS_o_ai vec_all_eq(vector bool char __a,
9926 vector signed char __b) {
9927 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
9931 static int __ATTRS_o_ai vec_all_eq(vector bool char __a,
9932 vector unsigned char __b) {
9933 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
9937 static int __ATTRS_o_ai vec_all_eq(vector bool char __a, vector bool char __b) {
9938 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
9942 static int __ATTRS_o_ai vec_all_eq(vector short __a, vector short __b) {
9943 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, __b);
9946 static int __ATTRS_o_ai vec_all_eq(vector short __a, vector bool short __b) {
9947 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, (vector short)__b);
9950 static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a,
9951 vector unsigned short __b) {
9952 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
9956 static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a,
9957 vector bool short __b) {
9958 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
9962 static int __ATTRS_o_ai vec_all_eq(vector bool short __a, vector short __b) {
9963 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
9967 static int __ATTRS_o_ai vec_all_eq(vector bool short __a,
9968 vector unsigned short __b) {
9969 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
9973 static int __ATTRS_o_ai vec_all_eq(vector bool short __a,
9974 vector bool short __b) {
9975 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
9979 static int __ATTRS_o_ai vec_all_eq(vector pixel __a, vector pixel __b) {
9980 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
9984 static int __ATTRS_o_ai vec_all_eq(vector int __a, vector int __b) {
9985 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, __b);
9988 static int __ATTRS_o_ai vec_all_eq(vector int __a, vector bool int __b) {
9989 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, (vector int)__b);
9992 static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a,
9993 vector unsigned int __b) {
9994 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
9998 static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a,
9999 vector bool int __b) {
10000 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
10004 static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector int __b) {
10005 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
10009 static int __ATTRS_o_ai vec_all_eq(vector bool int __a,
10010 vector unsigned int __b) {
10011 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
10015 static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector bool int __b) {
10016 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
10020 #ifdef __POWER8_VECTOR__
10021 static int __ATTRS_o_ai vec_all_eq(vector signed long long __a,
10022 vector signed long long __b) {
10023 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, __b);
10026 static int __ATTRS_o_ai vec_all_eq(vector long long __a,
10027 vector bool long long __b) {
10028 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, (vector long long)__b);
10031 static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a,
10032 vector unsigned long long __b) {
10033 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
10034 (vector long long)__b);
10037 static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a,
10038 vector bool long long __b) {
10039 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
10040 (vector long long)__b);
10043 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
10044 vector long long __b) {
10045 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
10046 (vector long long)__b);
10049 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
10050 vector unsigned long long __b) {
10051 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
10052 (vector long long)__b);
10055 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
10056 vector bool long long __b) {
10057 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
10058 (vector long long)__b);
10062 static int __ATTRS_o_ai vec_all_eq(vector float __a, vector float __b) {
10063 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __b);
10068 static int __ATTRS_o_ai vec_all_ge(vector signed char __a,
10069 vector signed char __b) {
10070 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, __a);
10073 static int __ATTRS_o_ai vec_all_ge(vector signed char __a,
10074 vector bool char __b) {
10075 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__b, __a);
10078 static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a,
10079 vector unsigned char __b) {
10080 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, __a);
10083 static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a,
10084 vector bool char __b) {
10085 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, __a);
10088 static int __ATTRS_o_ai vec_all_ge(vector bool char __a,
10089 vector signed char __b) {
10090 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b,
10091 (vector unsigned char)__a);
10094 static int __ATTRS_o_ai vec_all_ge(vector bool char __a,
10095 vector unsigned char __b) {
10096 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, (vector unsigned char)__a);
10099 static int __ATTRS_o_ai vec_all_ge(vector bool char __a, vector bool char __b) {
10100 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b,
10101 (vector unsigned char)__a);
10104 static int __ATTRS_o_ai vec_all_ge(vector short __a, vector short __b) {
10105 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, __a);
10108 static int __ATTRS_o_ai vec_all_ge(vector short __a, vector bool short __b) {
10109 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)__b, __a);
10112 static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a,
10113 vector unsigned short __b) {
10114 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, __a);
10117 static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a,
10118 vector bool short __b) {
10119 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
10123 static int __ATTRS_o_ai vec_all_ge(vector bool short __a, vector short __b) {
10124 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
10125 (vector unsigned short)__a);
10128 static int __ATTRS_o_ai vec_all_ge(vector bool short __a,
10129 vector unsigned short __b) {
10130 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b,
10131 (vector unsigned short)__a);
10134 static int __ATTRS_o_ai vec_all_ge(vector bool short __a,
10135 vector bool short __b) {
10136 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
10137 (vector unsigned short)__a);
10140 static int __ATTRS_o_ai vec_all_ge(vector int __a, vector int __b) {
10141 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, __a);
10144 static int __ATTRS_o_ai vec_all_ge(vector int __a, vector bool int __b) {
10145 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)__b, __a);
10148 static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a,
10149 vector unsigned int __b) {
10150 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, __a);
10153 static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a,
10154 vector bool int __b) {
10155 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, __a);
10158 static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector int __b) {
10159 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b,
10160 (vector unsigned int)__a);
10163 static int __ATTRS_o_ai vec_all_ge(vector bool int __a,
10164 vector unsigned int __b) {
10165 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, (vector unsigned int)__a);
10168 static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector bool int __b) {
10169 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b,
10170 (vector unsigned int)__a);
10173 #ifdef __POWER8_VECTOR__
10174 static int __ATTRS_o_ai vec_all_ge(vector signed long long __a,
10175 vector signed long long __b) {
10176 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b, __a);
10178 static int __ATTRS_o_ai vec_all_ge(vector signed long long __a,
10179 vector bool long long __b) {
10180 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector signed long long)__b,
10184 static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a,
10185 vector unsigned long long __b) {
10186 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, __a);
10189 static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a,
10190 vector bool long long __b) {
10191 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
10195 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
10196 vector signed long long __b) {
10197 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
10198 (vector unsigned long long)__a);
10201 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
10202 vector unsigned long long __b) {
10203 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b,
10204 (vector unsigned long long)__a);
10207 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
10208 vector bool long long __b) {
10209 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
10210 (vector unsigned long long)__a);
10214 static int __ATTRS_o_ai vec_all_ge(vector float __a, vector float __b) {
10215 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __a, __b);
10220 static int __ATTRS_o_ai vec_all_gt(vector signed char __a,
10221 vector signed char __b) {
10222 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, __b);
10225 static int __ATTRS_o_ai vec_all_gt(vector signed char __a,
10226 vector bool char __b) {
10227 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, (vector signed char)__b);
10230 static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a,
10231 vector unsigned char __b) {
10232 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, __b);
10235 static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a,
10236 vector bool char __b) {
10237 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, (vector unsigned char)__b);
10240 static int __ATTRS_o_ai vec_all_gt(vector bool char __a,
10241 vector signed char __b) {
10242 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a,
10243 (vector unsigned char)__b);
10246 static int __ATTRS_o_ai vec_all_gt(vector bool char __a,
10247 vector unsigned char __b) {
10248 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, __b);
10251 static int __ATTRS_o_ai vec_all_gt(vector bool char __a, vector bool char __b) {
10252 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a,
10253 (vector unsigned char)__b);
10256 static int __ATTRS_o_ai vec_all_gt(vector short __a, vector short __b) {
10257 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, __b);
10260 static int __ATTRS_o_ai vec_all_gt(vector short __a, vector bool short __b) {
10261 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, (vector short)__b);
10264 static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a,
10265 vector unsigned short __b) {
10266 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, __b);
10269 static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a,
10270 vector bool short __b) {
10271 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a,
10272 (vector unsigned short)__b);
10275 static int __ATTRS_o_ai vec_all_gt(vector bool short __a, vector short __b) {
10276 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
10277 (vector unsigned short)__b);
10280 static int __ATTRS_o_ai vec_all_gt(vector bool short __a,
10281 vector unsigned short __b) {
10282 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
10286 static int __ATTRS_o_ai vec_all_gt(vector bool short __a,
10287 vector bool short __b) {
10288 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
10289 (vector unsigned short)__b);
10292 static int __ATTRS_o_ai vec_all_gt(vector int __a, vector int __b) {
10293 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, __b);
10296 static int __ATTRS_o_ai vec_all_gt(vector int __a, vector bool int __b) {
10297 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, (vector int)__b);
10300 static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a,
10301 vector unsigned int __b) {
10302 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, __b);
10305 static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a,
10306 vector bool int __b) {
10307 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, (vector unsigned int)__b);
10310 static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector int __b) {
10311 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a,
10312 (vector unsigned int)__b);
10315 static int __ATTRS_o_ai vec_all_gt(vector bool int __a,
10316 vector unsigned int __b) {
10317 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, __b);
10320 static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector bool int __b) {
10321 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a,
10322 (vector unsigned int)__b);
10325 #ifdef __POWER8_VECTOR__
10326 static int __ATTRS_o_ai vec_all_gt(vector signed long long __a,
10327 vector signed long long __b) {
10328 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, __b);
10330 static int __ATTRS_o_ai vec_all_gt(vector signed long long __a,
10331 vector bool long long __b) {
10332 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a,
10333 (vector signed long long)__b);
10336 static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a,
10337 vector unsigned long long __b) {
10338 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, __b);
10341 static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a,
10342 vector bool long long __b) {
10343 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a,
10344 (vector unsigned long long)__b);
10347 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
10348 vector signed long long __b) {
10349 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
10350 (vector unsigned long long)__b);
10353 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
10354 vector unsigned long long __b) {
10355 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
10359 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
10360 vector bool long long __b) {
10361 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
10362 (vector unsigned long long)__b);
10366 static int __ATTRS_o_ai vec_all_gt(vector float __a, vector float __b) {
10367 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __a, __b);
10372 static int __attribute__((__always_inline__))
10373 vec_all_in(vector float __a, vector float __b) {
10374 return __builtin_altivec_vcmpbfp_p(__CR6_EQ, __a, __b);
10379 static int __ATTRS_o_ai vec_all_le(vector signed char __a,
10380 vector signed char __b) {
10381 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, __b);
10384 static int __ATTRS_o_ai vec_all_le(vector signed char __a,
10385 vector bool char __b) {
10386 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, (vector signed char)__b);
10389 static int __ATTRS_o_ai vec_all_le(vector unsigned char __a,
10390 vector unsigned char __b) {
10391 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, __b);
10394 static int __ATTRS_o_ai vec_all_le(vector unsigned char __a,
10395 vector bool char __b) {
10396 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, (vector unsigned char)__b);
10399 static int __ATTRS_o_ai vec_all_le(vector bool char __a,
10400 vector signed char __b) {
10401 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a,
10402 (vector unsigned char)__b);
10405 static int __ATTRS_o_ai vec_all_le(vector bool char __a,
10406 vector unsigned char __b) {
10407 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, __b);
10410 static int __ATTRS_o_ai vec_all_le(vector bool char __a, vector bool char __b) {
10411 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a,
10412 (vector unsigned char)__b);
10415 static int __ATTRS_o_ai vec_all_le(vector short __a, vector short __b) {
10416 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, __b);
10419 static int __ATTRS_o_ai vec_all_le(vector short __a, vector bool short __b) {
10420 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, (vector short)__b);
10423 static int __ATTRS_o_ai vec_all_le(vector unsigned short __a,
10424 vector unsigned short __b) {
10425 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, __b);
10428 static int __ATTRS_o_ai vec_all_le(vector unsigned short __a,
10429 vector bool short __b) {
10430 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a,
10431 (vector unsigned short)__b);
10434 static int __ATTRS_o_ai vec_all_le(vector bool short __a, vector short __b) {
10435 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
10436 (vector unsigned short)__b);
10439 static int __ATTRS_o_ai vec_all_le(vector bool short __a,
10440 vector unsigned short __b) {
10441 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
10445 static int __ATTRS_o_ai vec_all_le(vector bool short __a,
10446 vector bool short __b) {
10447 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
10448 (vector unsigned short)__b);
10451 static int __ATTRS_o_ai vec_all_le(vector int __a, vector int __b) {
10452 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, __b);
10455 static int __ATTRS_o_ai vec_all_le(vector int __a, vector bool int __b) {
10456 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, (vector int)__b);
10459 static int __ATTRS_o_ai vec_all_le(vector unsigned int __a,
10460 vector unsigned int __b) {
10461 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, __b);
10464 static int __ATTRS_o_ai vec_all_le(vector unsigned int __a,
10465 vector bool int __b) {
10466 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, (vector unsigned int)__b);
10469 static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector int __b) {
10470 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a,
10471 (vector unsigned int)__b);
10474 static int __ATTRS_o_ai vec_all_le(vector bool int __a,
10475 vector unsigned int __b) {
10476 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, __b);
10479 static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector bool int __b) {
10480 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a,
10481 (vector unsigned int)__b);
10484 #ifdef __POWER8_VECTOR__
10485 static int __ATTRS_o_ai vec_all_le(vector signed long long __a,
10486 vector signed long long __b) {
10487 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, __b);
10490 static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a,
10491 vector unsigned long long __b) {
10492 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, __b);
10495 static int __ATTRS_o_ai vec_all_le(vector signed long long __a,
10496 vector bool long long __b) {
10497 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a,
10498 (vector signed long long)__b);
10501 static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a,
10502 vector bool long long __b) {
10503 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a,
10504 (vector unsigned long long)__b);
10507 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
10508 vector signed long long __b) {
10509 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
10510 (vector unsigned long long)__b);
10513 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
10514 vector unsigned long long __b) {
10515 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
10519 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
10520 vector bool long long __b) {
10521 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
10522 (vector unsigned long long)__b);
10526 static int __ATTRS_o_ai vec_all_le(vector float __a, vector float __b) {
10527 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __b, __a);
10532 static int __ATTRS_o_ai vec_all_lt(vector signed char __a,
10533 vector signed char __b) {
10534 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, __a);
10537 static int __ATTRS_o_ai vec_all_lt(vector signed char __a,
10538 vector bool char __b) {
10539 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__b, __a);
10542 static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a,
10543 vector unsigned char __b) {
10544 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, __a);
10547 static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a,
10548 vector bool char __b) {
10549 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, __a);
10552 static int __ATTRS_o_ai vec_all_lt(vector bool char __a,
10553 vector signed char __b) {
10554 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b,
10555 (vector unsigned char)__a);
10558 static int __ATTRS_o_ai vec_all_lt(vector bool char __a,
10559 vector unsigned char __b) {
10560 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, (vector unsigned char)__a);
10563 static int __ATTRS_o_ai vec_all_lt(vector bool char __a, vector bool char __b) {
10564 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b,
10565 (vector unsigned char)__a);
10568 static int __ATTRS_o_ai vec_all_lt(vector short __a, vector short __b) {
10569 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, __a);
10572 static int __ATTRS_o_ai vec_all_lt(vector short __a, vector bool short __b) {
10573 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)__b, __a);
10576 static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a,
10577 vector unsigned short __b) {
10578 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, __a);
10581 static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a,
10582 vector bool short __b) {
10583 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
10587 static int __ATTRS_o_ai vec_all_lt(vector bool short __a, vector short __b) {
10588 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
10589 (vector unsigned short)__a);
10592 static int __ATTRS_o_ai vec_all_lt(vector bool short __a,
10593 vector unsigned short __b) {
10594 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b,
10595 (vector unsigned short)__a);
10598 static int __ATTRS_o_ai vec_all_lt(vector bool short __a,
10599 vector bool short __b) {
10600 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
10601 (vector unsigned short)__a);
10604 static int __ATTRS_o_ai vec_all_lt(vector int __a, vector int __b) {
10605 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, __a);
10608 static int __ATTRS_o_ai vec_all_lt(vector int __a, vector bool int __b) {
10609 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)__b, __a);
10612 static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a,
10613 vector unsigned int __b) {
10614 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, __a);
10617 static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a,
10618 vector bool int __b) {
10619 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, __a);
10622 static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector int __b) {
10623 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b,
10624 (vector unsigned int)__a);
10627 static int __ATTRS_o_ai vec_all_lt(vector bool int __a,
10628 vector unsigned int __b) {
10629 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, (vector unsigned int)__a);
10632 static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector bool int __b) {
10633 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b,
10634 (vector unsigned int)__a);
10637 #ifdef __POWER8_VECTOR__
10638 static int __ATTRS_o_ai vec_all_lt(vector signed long long __a,
10639 vector signed long long __b) {
10640 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, __a);
10643 static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a,
10644 vector unsigned long long __b) {
10645 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, __a);
10648 static int __ATTRS_o_ai vec_all_lt(vector signed long long __a,
10649 vector bool long long __b) {
10650 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector signed long long)__b,
10654 static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a,
10655 vector bool long long __b) {
10656 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
10660 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
10661 vector signed long long __b) {
10662 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
10663 (vector unsigned long long)__a);
10666 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
10667 vector unsigned long long __b) {
10668 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b,
10669 (vector unsigned long long)__a);
10672 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
10673 vector bool long long __b) {
10674 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
10675 (vector unsigned long long)__a);
10679 static int __ATTRS_o_ai vec_all_lt(vector float __a, vector float __b) {
10680 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __b, __a);
10685 static int __attribute__((__always_inline__)) vec_all_nan(vector float __a) {
10686 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __a);
10691 static int __ATTRS_o_ai vec_all_ne(vector signed char __a,
10692 vector signed char __b) {
10693 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10697 static int __ATTRS_o_ai vec_all_ne(vector signed char __a,
10698 vector bool char __b) {
10699 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10703 static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a,
10704 vector unsigned char __b) {
10705 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10709 static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a,
10710 vector bool char __b) {
10711 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10715 static int __ATTRS_o_ai vec_all_ne(vector bool char __a,
10716 vector signed char __b) {
10717 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10721 static int __ATTRS_o_ai vec_all_ne(vector bool char __a,
10722 vector unsigned char __b) {
10723 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10727 static int __ATTRS_o_ai vec_all_ne(vector bool char __a, vector bool char __b) {
10728 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
10732 static int __ATTRS_o_ai vec_all_ne(vector short __a, vector short __b) {
10733 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, __b);
10736 static int __ATTRS_o_ai vec_all_ne(vector short __a, vector bool short __b) {
10737 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, (vector short)__b);
10740 static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a,
10741 vector unsigned short __b) {
10742 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10743 (vector short)__b);
10746 static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a,
10747 vector bool short __b) {
10748 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10749 (vector short)__b);
10752 static int __ATTRS_o_ai vec_all_ne(vector bool short __a, vector short __b) {
10753 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10754 (vector short)__b);
10757 static int __ATTRS_o_ai vec_all_ne(vector bool short __a,
10758 vector unsigned short __b) {
10759 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10760 (vector short)__b);
10763 static int __ATTRS_o_ai vec_all_ne(vector bool short __a,
10764 vector bool short __b) {
10765 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10766 (vector short)__b);
10769 static int __ATTRS_o_ai vec_all_ne(vector pixel __a, vector pixel __b) {
10770 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
10771 (vector short)__b);
10774 static int __ATTRS_o_ai vec_all_ne(vector int __a, vector int __b) {
10775 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, __b);
10778 static int __ATTRS_o_ai vec_all_ne(vector int __a, vector bool int __b) {
10779 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, (vector int)__b);
10782 static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a,
10783 vector unsigned int __b) {
10784 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
10788 static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a,
10789 vector bool int __b) {
10790 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
10794 static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector int __b) {
10795 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
10799 static int __ATTRS_o_ai vec_all_ne(vector bool int __a,
10800 vector unsigned int __b) {
10801 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
10805 static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector bool int __b) {
10806 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
10810 #ifdef __POWER8_VECTOR__
10811 static int __ATTRS_o_ai vec_all_ne(vector signed long long __a,
10812 vector signed long long __b) {
10813 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, __b);
10816 static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a,
10817 vector unsigned long long __b) {
10818 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a,
10819 (vector long long)__b);
10822 static int __ATTRS_o_ai vec_all_ne(vector signed long long __a,
10823 vector bool long long __b) {
10824 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a,
10825 (vector signed long long)__b);
10828 static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a,
10829 vector bool long long __b) {
10830 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
10831 (vector signed long long)__b);
10834 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
10835 vector signed long long __b) {
10836 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
10837 (vector signed long long)__b);
10840 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
10841 vector unsigned long long __b) {
10842 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
10843 (vector signed long long)__b);
10846 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
10847 vector bool long long __b) {
10848 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
10849 (vector signed long long)__b);
10853 static int __ATTRS_o_ai vec_all_ne(vector float __a, vector float __b) {
10854 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __b);
10859 static int __attribute__((__always_inline__))
10860 vec_all_nge(vector float __a, vector float __b) {
10861 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __a, __b);
10866 static int __attribute__((__always_inline__))
10867 vec_all_ngt(vector float __a, vector float __b) {
10868 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __a, __b);
10873 static int __attribute__((__always_inline__))
10874 vec_all_nle(vector float __a, vector float __b) {
10875 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __b, __a);
10880 static int __attribute__((__always_inline__))
10881 vec_all_nlt(vector float __a, vector float __b) {
10882 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __b, __a);
10885 /* vec_all_numeric */
10887 static int __attribute__((__always_inline__))
10888 vec_all_numeric(vector float __a) {
10889 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __a);
10894 static int __ATTRS_o_ai vec_any_eq(vector signed char __a,
10895 vector signed char __b) {
10896 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
10900 static int __ATTRS_o_ai vec_any_eq(vector signed char __a,
10901 vector bool char __b) {
10902 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
10906 static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a,
10907 vector unsigned char __b) {
10908 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
10912 static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a,
10913 vector bool char __b) {
10914 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
10918 static int __ATTRS_o_ai vec_any_eq(vector bool char __a,
10919 vector signed char __b) {
10920 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
10924 static int __ATTRS_o_ai vec_any_eq(vector bool char __a,
10925 vector unsigned char __b) {
10926 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
10930 static int __ATTRS_o_ai vec_any_eq(vector bool char __a, vector bool char __b) {
10931 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
10935 static int __ATTRS_o_ai vec_any_eq(vector short __a, vector short __b) {
10936 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, __b);
10939 static int __ATTRS_o_ai vec_any_eq(vector short __a, vector bool short __b) {
10940 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, (vector short)__b);
10943 static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a,
10944 vector unsigned short __b) {
10945 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
10946 (vector short)__b);
10949 static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a,
10950 vector bool short __b) {
10951 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
10952 (vector short)__b);
10955 static int __ATTRS_o_ai vec_any_eq(vector bool short __a, vector short __b) {
10956 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
10957 (vector short)__b);
10960 static int __ATTRS_o_ai vec_any_eq(vector bool short __a,
10961 vector unsigned short __b) {
10962 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
10963 (vector short)__b);
10966 static int __ATTRS_o_ai vec_any_eq(vector bool short __a,
10967 vector bool short __b) {
10968 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
10969 (vector short)__b);
10972 static int __ATTRS_o_ai vec_any_eq(vector pixel __a, vector pixel __b) {
10973 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
10974 (vector short)__b);
10977 static int __ATTRS_o_ai vec_any_eq(vector int __a, vector int __b) {
10978 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, __b);
10981 static int __ATTRS_o_ai vec_any_eq(vector int __a, vector bool int __b) {
10982 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, (vector int)__b);
10985 static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a,
10986 vector unsigned int __b) {
10987 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
10991 static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a,
10992 vector bool int __b) {
10993 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
10997 static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector int __b) {
10998 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
11002 static int __ATTRS_o_ai vec_any_eq(vector bool int __a,
11003 vector unsigned int __b) {
11004 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
11008 static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector bool int __b) {
11009 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
11013 #ifdef __POWER8_VECTOR__
11014 static int __ATTRS_o_ai vec_any_eq(vector signed long long __a,
11015 vector signed long long __b) {
11016 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, __b);
11019 static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a,
11020 vector unsigned long long __b) {
11021 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a,
11022 (vector long long)__b);
11025 static int __ATTRS_o_ai vec_any_eq(vector signed long long __a,
11026 vector bool long long __b) {
11027 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a,
11028 (vector signed long long)__b);
11031 static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a,
11032 vector bool long long __b) {
11033 return __builtin_altivec_vcmpequd_p(
11034 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
11037 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
11038 vector signed long long __b) {
11039 return __builtin_altivec_vcmpequd_p(
11040 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
11043 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
11044 vector unsigned long long __b) {
11045 return __builtin_altivec_vcmpequd_p(
11046 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
11049 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
11050 vector bool long long __b) {
11051 return __builtin_altivec_vcmpequd_p(
11052 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
11056 static int __ATTRS_o_ai vec_any_eq(vector float __a, vector float __b) {
11057 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __b);
11062 static int __ATTRS_o_ai vec_any_ge(vector signed char __a,
11063 vector signed char __b) {
11064 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b, __a);
11067 static int __ATTRS_o_ai vec_any_ge(vector signed char __a,
11068 vector bool char __b) {
11069 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b,
11073 static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a,
11074 vector unsigned char __b) {
11075 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, __a);
11078 static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a,
11079 vector bool char __b) {
11080 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
11084 static int __ATTRS_o_ai vec_any_ge(vector bool char __a,
11085 vector signed char __b) {
11086 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
11087 (vector unsigned char)__a);
11090 static int __ATTRS_o_ai vec_any_ge(vector bool char __a,
11091 vector unsigned char __b) {
11092 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b,
11093 (vector unsigned char)__a);
11096 static int __ATTRS_o_ai vec_any_ge(vector bool char __a, vector bool char __b) {
11097 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
11098 (vector unsigned char)__a);
11101 static int __ATTRS_o_ai vec_any_ge(vector short __a, vector short __b) {
11102 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b, __a);
11105 static int __ATTRS_o_ai vec_any_ge(vector short __a, vector bool short __b) {
11106 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)__b, __a);
11109 static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a,
11110 vector unsigned short __b) {
11111 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, __a);
11114 static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a,
11115 vector bool short __b) {
11116 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
11120 static int __ATTRS_o_ai vec_any_ge(vector bool short __a, vector short __b) {
11121 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
11122 (vector unsigned short)__a);
11125 static int __ATTRS_o_ai vec_any_ge(vector bool short __a,
11126 vector unsigned short __b) {
11127 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b,
11128 (vector unsigned short)__a);
11131 static int __ATTRS_o_ai vec_any_ge(vector bool short __a,
11132 vector bool short __b) {
11133 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
11134 (vector unsigned short)__a);
11137 static int __ATTRS_o_ai vec_any_ge(vector int __a, vector int __b) {
11138 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b, __a);
11141 static int __ATTRS_o_ai vec_any_ge(vector int __a, vector bool int __b) {
11142 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)__b, __a);
11145 static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a,
11146 vector unsigned int __b) {
11147 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, __a);
11150 static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a,
11151 vector bool int __b) {
11152 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
11156 static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector int __b) {
11157 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
11158 (vector unsigned int)__a);
11161 static int __ATTRS_o_ai vec_any_ge(vector bool int __a,
11162 vector unsigned int __b) {
11163 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b,
11164 (vector unsigned int)__a);
11167 static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector bool int __b) {
11168 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
11169 (vector unsigned int)__a);
11172 #ifdef __POWER8_VECTOR__
11173 static int __ATTRS_o_ai vec_any_ge(vector signed long long __a,
11174 vector signed long long __b) {
11175 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b, __a);
11178 static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a,
11179 vector unsigned long long __b) {
11180 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, __a);
11183 static int __ATTRS_o_ai vec_any_ge(vector signed long long __a,
11184 vector bool long long __b) {
11185 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV,
11186 (vector signed long long)__b, __a);
11189 static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a,
11190 vector bool long long __b) {
11191 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11192 (vector unsigned long long)__b, __a);
11195 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
11196 vector signed long long __b) {
11197 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11198 (vector unsigned long long)__b,
11199 (vector unsigned long long)__a);
11202 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
11203 vector unsigned long long __b) {
11204 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b,
11205 (vector unsigned long long)__a);
11208 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
11209 vector bool long long __b) {
11210 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11211 (vector unsigned long long)__b,
11212 (vector unsigned long long)__a);
11216 static int __ATTRS_o_ai vec_any_ge(vector float __a, vector float __b) {
11217 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __a, __b);
11222 static int __ATTRS_o_ai vec_any_gt(vector signed char __a,
11223 vector signed char __b) {
11224 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, __b);
11227 static int __ATTRS_o_ai vec_any_gt(vector signed char __a,
11228 vector bool char __b) {
11229 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a,
11230 (vector signed char)__b);
11233 static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a,
11234 vector unsigned char __b) {
11235 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, __b);
11238 static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a,
11239 vector bool char __b) {
11240 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a,
11241 (vector unsigned char)__b);
11244 static int __ATTRS_o_ai vec_any_gt(vector bool char __a,
11245 vector signed char __b) {
11246 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
11247 (vector unsigned char)__b);
11250 static int __ATTRS_o_ai vec_any_gt(vector bool char __a,
11251 vector unsigned char __b) {
11252 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
11256 static int __ATTRS_o_ai vec_any_gt(vector bool char __a, vector bool char __b) {
11257 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
11258 (vector unsigned char)__b);
11261 static int __ATTRS_o_ai vec_any_gt(vector short __a, vector short __b) {
11262 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, __b);
11265 static int __ATTRS_o_ai vec_any_gt(vector short __a, vector bool short __b) {
11266 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, (vector short)__b);
11269 static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a,
11270 vector unsigned short __b) {
11271 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, __b);
11274 static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a,
11275 vector bool short __b) {
11276 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a,
11277 (vector unsigned short)__b);
11280 static int __ATTRS_o_ai vec_any_gt(vector bool short __a, vector short __b) {
11281 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
11282 (vector unsigned short)__b);
11285 static int __ATTRS_o_ai vec_any_gt(vector bool short __a,
11286 vector unsigned short __b) {
11287 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
11291 static int __ATTRS_o_ai vec_any_gt(vector bool short __a,
11292 vector bool short __b) {
11293 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
11294 (vector unsigned short)__b);
11297 static int __ATTRS_o_ai vec_any_gt(vector int __a, vector int __b) {
11298 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, __b);
11301 static int __ATTRS_o_ai vec_any_gt(vector int __a, vector bool int __b) {
11302 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, (vector int)__b);
11305 static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a,
11306 vector unsigned int __b) {
11307 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, __b);
11310 static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a,
11311 vector bool int __b) {
11312 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a,
11313 (vector unsigned int)__b);
11316 static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector int __b) {
11317 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
11318 (vector unsigned int)__b);
11321 static int __ATTRS_o_ai vec_any_gt(vector bool int __a,
11322 vector unsigned int __b) {
11323 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
11327 static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector bool int __b) {
11328 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
11329 (vector unsigned int)__b);
11332 #ifdef __POWER8_VECTOR__
11333 static int __ATTRS_o_ai vec_any_gt(vector signed long long __a,
11334 vector signed long long __b) {
11335 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, __b);
11338 static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a,
11339 vector unsigned long long __b) {
11340 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, __b);
11343 static int __ATTRS_o_ai vec_any_gt(vector signed long long __a,
11344 vector bool long long __b) {
11345 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a,
11346 (vector signed long long)__b);
11349 static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a,
11350 vector bool long long __b) {
11351 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a,
11352 (vector unsigned long long)__b);
11355 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
11356 vector signed long long __b) {
11357 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11358 (vector unsigned long long)__a,
11359 (vector unsigned long long)__b);
11362 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
11363 vector unsigned long long __b) {
11364 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11365 (vector unsigned long long)__a, __b);
11368 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
11369 vector bool long long __b) {
11370 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11371 (vector unsigned long long)__a,
11372 (vector unsigned long long)__b);
11376 static int __ATTRS_o_ai vec_any_gt(vector float __a, vector float __b) {
11377 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __a, __b);
11382 static int __ATTRS_o_ai vec_any_le(vector signed char __a,
11383 vector signed char __b) {
11384 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, __b);
11387 static int __ATTRS_o_ai vec_any_le(vector signed char __a,
11388 vector bool char __b) {
11389 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a,
11390 (vector signed char)__b);
11393 static int __ATTRS_o_ai vec_any_le(vector unsigned char __a,
11394 vector unsigned char __b) {
11395 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, __b);
11398 static int __ATTRS_o_ai vec_any_le(vector unsigned char __a,
11399 vector bool char __b) {
11400 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a,
11401 (vector unsigned char)__b);
11404 static int __ATTRS_o_ai vec_any_le(vector bool char __a,
11405 vector signed char __b) {
11406 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
11407 (vector unsigned char)__b);
11410 static int __ATTRS_o_ai vec_any_le(vector bool char __a,
11411 vector unsigned char __b) {
11412 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
11416 static int __ATTRS_o_ai vec_any_le(vector bool char __a, vector bool char __b) {
11417 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
11418 (vector unsigned char)__b);
11421 static int __ATTRS_o_ai vec_any_le(vector short __a, vector short __b) {
11422 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, __b);
11425 static int __ATTRS_o_ai vec_any_le(vector short __a, vector bool short __b) {
11426 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, (vector short)__b);
11429 static int __ATTRS_o_ai vec_any_le(vector unsigned short __a,
11430 vector unsigned short __b) {
11431 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, __b);
11434 static int __ATTRS_o_ai vec_any_le(vector unsigned short __a,
11435 vector bool short __b) {
11436 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a,
11437 (vector unsigned short)__b);
11440 static int __ATTRS_o_ai vec_any_le(vector bool short __a, vector short __b) {
11441 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
11442 (vector unsigned short)__b);
11445 static int __ATTRS_o_ai vec_any_le(vector bool short __a,
11446 vector unsigned short __b) {
11447 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
11451 static int __ATTRS_o_ai vec_any_le(vector bool short __a,
11452 vector bool short __b) {
11453 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
11454 (vector unsigned short)__b);
11457 static int __ATTRS_o_ai vec_any_le(vector int __a, vector int __b) {
11458 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, __b);
11461 static int __ATTRS_o_ai vec_any_le(vector int __a, vector bool int __b) {
11462 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, (vector int)__b);
11465 static int __ATTRS_o_ai vec_any_le(vector unsigned int __a,
11466 vector unsigned int __b) {
11467 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, __b);
11470 static int __ATTRS_o_ai vec_any_le(vector unsigned int __a,
11471 vector bool int __b) {
11472 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a,
11473 (vector unsigned int)__b);
11476 static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector int __b) {
11477 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
11478 (vector unsigned int)__b);
11481 static int __ATTRS_o_ai vec_any_le(vector bool int __a,
11482 vector unsigned int __b) {
11483 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
11487 static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector bool int __b) {
11488 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
11489 (vector unsigned int)__b);
11492 #ifdef __POWER8_VECTOR__
11493 static int __ATTRS_o_ai vec_any_le(vector signed long long __a,
11494 vector signed long long __b) {
11495 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, __b);
11498 static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a,
11499 vector unsigned long long __b) {
11500 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, __b);
11503 static int __ATTRS_o_ai vec_any_le(vector signed long long __a,
11504 vector bool long long __b) {
11505 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a,
11506 (vector signed long long)__b);
11509 static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a,
11510 vector bool long long __b) {
11511 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a,
11512 (vector unsigned long long)__b);
11515 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
11516 vector signed long long __b) {
11517 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11518 (vector unsigned long long)__a,
11519 (vector unsigned long long)__b);
11522 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
11523 vector unsigned long long __b) {
11524 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11525 (vector unsigned long long)__a, __b);
11528 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
11529 vector bool long long __b) {
11530 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
11531 (vector unsigned long long)__a,
11532 (vector unsigned long long)__b);
11536 static int __ATTRS_o_ai vec_any_le(vector float __a, vector float __b) {
11537 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __b, __a);
11542 static int __ATTRS_o_ai vec_any_lt(vector signed char __a,
11543 vector signed char __b) {
11544 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b, __a);
11547 static int __ATTRS_o_ai vec_any_lt(vector signed char __a,
11548 vector bool char __b) {
11549 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b,
11553 static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a,
11554 vector unsigned char __b) {
11555 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, __a);
11558 static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a,
11559 vector bool char __b) {
11560 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
11564 static int __ATTRS_o_ai vec_any_lt(vector bool char __a,
11565 vector signed char __b) {
11566 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
11567 (vector unsigned char)__a);
11570 static int __ATTRS_o_ai vec_any_lt(vector bool char __a,
11571 vector unsigned char __b) {
11572 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b,
11573 (vector unsigned char)__a);
11576 static int __ATTRS_o_ai vec_any_lt(vector bool char __a, vector bool char __b) {
11577 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
11578 (vector unsigned char)__a);
11581 static int __ATTRS_o_ai vec_any_lt(vector short __a, vector short __b) {
11582 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b, __a);
11585 static int __ATTRS_o_ai vec_any_lt(vector short __a, vector bool short __b) {
11586 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)__b, __a);
11589 static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a,
11590 vector unsigned short __b) {
11591 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, __a);
11594 static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a,
11595 vector bool short __b) {
11596 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
11600 static int __ATTRS_o_ai vec_any_lt(vector bool short __a, vector short __b) {
11601 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
11602 (vector unsigned short)__a);
11605 static int __ATTRS_o_ai vec_any_lt(vector bool short __a,
11606 vector unsigned short __b) {
11607 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b,
11608 (vector unsigned short)__a);
11611 static int __ATTRS_o_ai vec_any_lt(vector bool short __a,
11612 vector bool short __b) {
11613 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
11614 (vector unsigned short)__a);
11617 static int __ATTRS_o_ai vec_any_lt(vector int __a, vector int __b) {
11618 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b, __a);
11621 static int __ATTRS_o_ai vec_any_lt(vector int __a, vector bool int __b) {
11622 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)__b, __a);
11625 static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a,
11626 vector unsigned int __b) {
11627 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, __a);
11630 static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a,
11631 vector bool int __b) {
11632 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
11636 static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector int __b) {
11637 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
11638 (vector unsigned int)__a);
11641 static int __ATTRS_o_ai vec_any_lt(vector bool int __a,
11642 vector unsigned int __b) {
11643 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b,
11644 (vector unsigned int)__a);
11647 static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector bool int __b) {
11648 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
11649 (vector unsigned int)__a);
11652 #ifdef __POWER8_VECTOR__
11653 static int __ATTRS_o_ai vec_any_lt(vector signed long long __a,
11654 vector signed long long __b) {
11655 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b, __a);
11658 static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a,
11659 vector unsigned long long __b) {
11660 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, __a);
11663 static int __ATTRS_o_ai vec_any_lt(vector signed long long __a,
11664 vector bool long long __b) {
11665 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV,
11666 (vector signed long long)__b, __a);
11669 static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a,
11670 vector bool long long __b) {
11671 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11672 (vector unsigned long long)__b, __a);
11675 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
11676 vector signed long long __b) {
11677 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11678 (vector unsigned long long)__b,
11679 (vector unsigned long long)__a);
11682 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
11683 vector unsigned long long __b) {
11684 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b,
11685 (vector unsigned long long)__a);
11688 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
11689 vector bool long long __b) {
11690 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
11691 (vector unsigned long long)__b,
11692 (vector unsigned long long)__a);
11696 static int __ATTRS_o_ai vec_any_lt(vector float __a, vector float __b) {
11697 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __b, __a);
11702 static int __attribute__((__always_inline__)) vec_any_nan(vector float __a) {
11703 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __a);
11708 static int __ATTRS_o_ai vec_any_ne(vector signed char __a,
11709 vector signed char __b) {
11710 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11714 static int __ATTRS_o_ai vec_any_ne(vector signed char __a,
11715 vector bool char __b) {
11716 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11720 static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a,
11721 vector unsigned char __b) {
11722 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11726 static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a,
11727 vector bool char __b) {
11728 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11732 static int __ATTRS_o_ai vec_any_ne(vector bool char __a,
11733 vector signed char __b) {
11734 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11738 static int __ATTRS_o_ai vec_any_ne(vector bool char __a,
11739 vector unsigned char __b) {
11740 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11744 static int __ATTRS_o_ai vec_any_ne(vector bool char __a, vector bool char __b) {
11745 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
11749 static int __ATTRS_o_ai vec_any_ne(vector short __a, vector short __b) {
11750 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, __b);
11753 static int __ATTRS_o_ai vec_any_ne(vector short __a, vector bool short __b) {
11754 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, (vector short)__b);
11757 static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a,
11758 vector unsigned short __b) {
11759 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
11760 (vector short)__b);
11763 static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a,
11764 vector bool short __b) {
11765 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
11766 (vector short)__b);
11769 static int __ATTRS_o_ai vec_any_ne(vector bool short __a, vector short __b) {
11770 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
11771 (vector short)__b);
11774 static int __ATTRS_o_ai vec_any_ne(vector bool short __a,
11775 vector unsigned short __b) {
11776 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
11777 (vector short)__b);
11780 static int __ATTRS_o_ai vec_any_ne(vector bool short __a,
11781 vector bool short __b) {
11782 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
11783 (vector short)__b);
11786 static int __ATTRS_o_ai vec_any_ne(vector pixel __a, vector pixel __b) {
11787 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
11788 (vector short)__b);
11791 static int __ATTRS_o_ai vec_any_ne(vector int __a, vector int __b) {
11792 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, __b);
11795 static int __ATTRS_o_ai vec_any_ne(vector int __a, vector bool int __b) {
11796 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, (vector int)__b);
11799 static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a,
11800 vector unsigned int __b) {
11801 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
11805 static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a,
11806 vector bool int __b) {
11807 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
11811 static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector int __b) {
11812 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
11816 static int __ATTRS_o_ai vec_any_ne(vector bool int __a,
11817 vector unsigned int __b) {
11818 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
11822 static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector bool int __b) {
11823 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
11827 #ifdef __POWER8_VECTOR__
11828 static int __ATTRS_o_ai vec_any_ne(vector signed long long __a,
11829 vector signed long long __b) {
11830 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, __b);
11833 static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a,
11834 vector unsigned long long __b) {
11835 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a,
11836 (vector long long)__b);
11839 static int __ATTRS_o_ai vec_any_ne(vector signed long long __a,
11840 vector bool long long __b) {
11841 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a,
11842 (vector signed long long)__b);
11845 static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a,
11846 vector bool long long __b) {
11847 return __builtin_altivec_vcmpequd_p(
11848 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
11851 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
11852 vector signed long long __b) {
11853 return __builtin_altivec_vcmpequd_p(
11854 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
11857 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
11858 vector unsigned long long __b) {
11859 return __builtin_altivec_vcmpequd_p(
11860 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
11863 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
11864 vector bool long long __b) {
11865 return __builtin_altivec_vcmpequd_p(
11866 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
11870 static int __ATTRS_o_ai vec_any_ne(vector float __a, vector float __b) {
11871 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __b);
11876 static int __attribute__((__always_inline__))
11877 vec_any_nge(vector float __a, vector float __b) {
11878 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __a, __b);
11883 static int __attribute__((__always_inline__))
11884 vec_any_ngt(vector float __a, vector float __b) {
11885 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __a, __b);
11890 static int __attribute__((__always_inline__))
11891 vec_any_nle(vector float __a, vector float __b) {
11892 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __b, __a);
11897 static int __attribute__((__always_inline__))
11898 vec_any_nlt(vector float __a, vector float __b) {
11899 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __b, __a);
11902 /* vec_any_numeric */
11904 static int __attribute__((__always_inline__))
11905 vec_any_numeric(vector float __a) {
11906 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __a);
11911 static int __attribute__((__always_inline__))
11912 vec_any_out(vector float __a, vector float __b) {
11913 return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, __a, __b);
11916 /* Power 8 Crypto functions
11917 Note: We diverge from the current GCC implementation with regard
11918 to cryptography and related functions as follows:
11919 - Only the SHA and AES instructions and builtins are disabled by -mno-crypto
11920 - The remaining ones are only available on Power8 and up so
11921 require -mpower8-vector
11922 The justification for this is that export requirements require that
11923 Category:Vector.Crypto is optional (i.e. compliant hardware may not provide
11924 support). As a result, we need to be able to turn off support for those.
11925 The remaining ones (currently controlled by -mcrypto for GCC) still
11926 need to be provided on compliant hardware even if Vector.Crypto is not
11928 FIXME: the naming convention for the builtins will be adjusted due
11929 to the inconsistency (__builtin_crypto_ prefix on builtins that cannot be
11930 removed with -mno-crypto). This is under development.
11933 static vector unsigned long long __attribute__((__always_inline__))
11934 __builtin_crypto_vsbox(vector unsigned long long __a) {
11935 return __builtin_altivec_crypto_vsbox(__a);
11938 static vector unsigned long long __attribute__((__always_inline__))
11939 __builtin_crypto_vcipher(vector unsigned long long __a,
11940 vector unsigned long long __b) {
11941 return __builtin_altivec_crypto_vcipher(__a, __b);
11944 static vector unsigned long long __attribute__((__always_inline__))
11945 __builtin_crypto_vcipherlast(vector unsigned long long __a,
11946 vector unsigned long long __b) {
11947 return __builtin_altivec_crypto_vcipherlast(__a, __b);
11950 static vector unsigned long long __attribute__((__always_inline__))
11951 __builtin_crypto_vncipher(vector unsigned long long __a,
11952 vector unsigned long long __b) {
11953 return __builtin_altivec_crypto_vncipher(__a, __b);
11956 static vector unsigned long long __attribute__((__always_inline__))
11957 __builtin_crypto_vncipherlast(vector unsigned long long __a,
11958 vector unsigned long long __b) {
11959 return __builtin_altivec_crypto_vncipherlast(__a, __b);
11962 #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad
11963 #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw
11966 #ifdef __POWER8_VECTOR__
11967 static vector unsigned char __ATTRS_o_ai
11968 __builtin_crypto_vpermxor(vector unsigned char __a, vector unsigned char __b,
11969 vector unsigned char __c) {
11970 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
11973 static vector unsigned short __ATTRS_o_ai
11974 __builtin_crypto_vpermxor(vector unsigned short __a, vector unsigned short __b,
11975 vector unsigned short __c) {
11976 return (vector unsigned short)__builtin_altivec_crypto_vpermxor(
11977 (vector unsigned char)__a, (vector unsigned char)__b,
11978 (vector unsigned char)__c);
11981 static vector unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
11982 vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) {
11983 return (vector unsigned int)__builtin_altivec_crypto_vpermxor(
11984 (vector unsigned char)__a, (vector unsigned char)__b,
11985 (vector unsigned char)__c);
11988 static vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpermxor(
11989 vector unsigned long long __a, vector unsigned long long __b,
11990 vector unsigned long long __c) {
11991 return (vector unsigned long long)__builtin_altivec_crypto_vpermxor(
11992 (vector unsigned char)__a, (vector unsigned char)__b,
11993 (vector unsigned char)__c);
11996 static vector unsigned char __ATTRS_o_ai
11997 __builtin_crypto_vpmsumb(vector unsigned char __a, vector unsigned char __b) {
11998 return __builtin_altivec_crypto_vpmsumb(__a, __b);
12001 static vector unsigned short __ATTRS_o_ai
12002 __builtin_crypto_vpmsumb(vector unsigned short __a, vector unsigned short __b) {
12003 return __builtin_altivec_crypto_vpmsumh(__a, __b);
12006 static vector unsigned int __ATTRS_o_ai
12007 __builtin_crypto_vpmsumb(vector unsigned int __a, vector unsigned int __b) {
12008 return __builtin_altivec_crypto_vpmsumw(__a, __b);
12011 static vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpmsumb(
12012 vector unsigned long long __a, vector unsigned long long __b) {
12013 return __builtin_altivec_crypto_vpmsumd(__a, __b);
12016 static vector signed char __ATTRS_o_ai vec_vgbbd (vector signed char __a)
12018 return __builtin_altivec_vgbbd((vector unsigned char) __a);
12021 static vector unsigned char __ATTRS_o_ai vec_vgbbd (vector unsigned char __a)
12023 return __builtin_altivec_vgbbd(__a);
12026 static vector long long __ATTRS_o_ai
12027 vec_vbpermq (vector signed char __a, vector signed char __b)
12029 return __builtin_altivec_vbpermq((vector unsigned char) __a,
12030 (vector unsigned char) __b);
12033 static vector long long __ATTRS_o_ai
12034 vec_vbpermq (vector unsigned char __a, vector unsigned char __b)
12036 return __builtin_altivec_vbpermq(__a, __b);
12040 #undef __ATTRS_o_ai
12042 #endif /* __ALTIVEC_H */