etc/services - sync with NetBSD-8
[minix.git] / external / bsd / llvm / dist / clang / lib / Headers / altivec.h
blob0ac0841ae4821b3232fdda6484166e059e68ccf5
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
19 * THE SOFTWARE.
21 \*===----------------------------------------------------------------------===*/
23 #ifndef __ALTIVEC_H
24 #define __ALTIVEC_H
26 #ifndef __ALTIVEC__
27 #error "AltiVec support not enabled"
28 #endif
30 /* constants for mapping CR6 bits to predicate result. */
32 #define __CR6_EQ 0
33 #define __CR6_EQ_REV 1
34 #define __CR6_LT 2
35 #define __CR6_LT_REV 3
37 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
39 static vector signed char __ATTRS_o_ai
40 vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c);
42 static vector unsigned char __ATTRS_o_ai
43 vec_perm(vector unsigned char __a,
44 vector unsigned char __b,
45 vector unsigned char __c);
47 static vector bool char __ATTRS_o_ai
48 vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c);
50 static vector short __ATTRS_o_ai
51 vec_perm(vector short __a, vector short __b, vector unsigned char __c);
53 static vector unsigned short __ATTRS_o_ai
54 vec_perm(vector unsigned short __a,
55 vector unsigned short __b,
56 vector unsigned char __c);
58 static vector bool short __ATTRS_o_ai
59 vec_perm(vector bool short __a, vector bool short __b, vector unsigned char __c);
61 static vector pixel __ATTRS_o_ai
62 vec_perm(vector pixel __a, vector pixel __b, vector unsigned char __c);
64 static vector int __ATTRS_o_ai
65 vec_perm(vector int __a, vector int __b, vector unsigned char __c);
67 static vector unsigned int __ATTRS_o_ai
68 vec_perm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c);
70 static vector bool int __ATTRS_o_ai
71 vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c);
73 static vector float __ATTRS_o_ai
74 vec_perm(vector float __a, vector float __b, vector unsigned char __c);
76 static vector unsigned char __ATTRS_o_ai
77 vec_xor(vector unsigned char __a, vector unsigned char __b);
79 /* vec_abs */
81 #define __builtin_altivec_abs_v16qi vec_abs
82 #define __builtin_altivec_abs_v8hi vec_abs
83 #define __builtin_altivec_abs_v4si vec_abs
85 static vector signed char __ATTRS_o_ai
86 vec_abs(vector signed char __a)
88 return __builtin_altivec_vmaxsb(__a, -__a);
91 static vector signed short __ATTRS_o_ai
92 vec_abs(vector signed short __a)
94 return __builtin_altivec_vmaxsh(__a, -__a);
97 static vector signed int __ATTRS_o_ai
98 vec_abs(vector signed int __a)
100 return __builtin_altivec_vmaxsw(__a, -__a);
103 static vector float __ATTRS_o_ai
104 vec_abs(vector float __a)
106 vector unsigned int __res = (vector unsigned int)__a
107 & (vector unsigned int)(0x7FFFFFFF);
108 return (vector float)__res;
111 /* vec_abss */
113 #define __builtin_altivec_abss_v16qi vec_abss
114 #define __builtin_altivec_abss_v8hi vec_abss
115 #define __builtin_altivec_abss_v4si vec_abss
117 static vector signed char __ATTRS_o_ai
118 vec_abss(vector signed char __a)
120 return __builtin_altivec_vmaxsb
121 (__a, __builtin_altivec_vsubsbs((vector signed char)(0), __a));
124 static vector signed short __ATTRS_o_ai
125 vec_abss(vector signed short __a)
127 return __builtin_altivec_vmaxsh
128 (__a, __builtin_altivec_vsubshs((vector signed short)(0), __a));
131 static vector signed int __ATTRS_o_ai
132 vec_abss(vector signed int __a)
134 return __builtin_altivec_vmaxsw
135 (__a, __builtin_altivec_vsubsws((vector signed int)(0), __a));
138 /* vec_add */
140 static vector signed char __ATTRS_o_ai
141 vec_add(vector signed char __a, vector signed char __b)
143 return __a + __b;
146 static vector signed char __ATTRS_o_ai
147 vec_add(vector bool char __a, vector signed char __b)
149 return (vector signed char)__a + __b;
152 static vector signed char __ATTRS_o_ai
153 vec_add(vector signed char __a, vector bool char __b)
155 return __a + (vector signed char)__b;
158 static vector unsigned char __ATTRS_o_ai
159 vec_add(vector unsigned char __a, vector unsigned char __b)
161 return __a + __b;
164 static vector unsigned char __ATTRS_o_ai
165 vec_add(vector bool char __a, vector unsigned char __b)
167 return (vector unsigned char)__a + __b;
170 static vector unsigned char __ATTRS_o_ai
171 vec_add(vector unsigned char __a, vector bool char __b)
173 return __a + (vector unsigned char)__b;
176 static vector short __ATTRS_o_ai
177 vec_add(vector short __a, vector short __b)
179 return __a + __b;
182 static vector short __ATTRS_o_ai
183 vec_add(vector bool short __a, vector short __b)
185 return (vector short)__a + __b;
188 static vector short __ATTRS_o_ai
189 vec_add(vector short __a, vector bool short __b)
191 return __a + (vector short)__b;
194 static vector unsigned short __ATTRS_o_ai
195 vec_add(vector unsigned short __a, vector unsigned short __b)
197 return __a + __b;
200 static vector unsigned short __ATTRS_o_ai
201 vec_add(vector bool short __a, vector unsigned short __b)
203 return (vector unsigned short)__a + __b;
206 static vector unsigned short __ATTRS_o_ai
207 vec_add(vector unsigned short __a, vector bool short __b)
209 return __a + (vector unsigned short)__b;
212 static vector int __ATTRS_o_ai
213 vec_add(vector int __a, vector int __b)
215 return __a + __b;
218 static vector int __ATTRS_o_ai
219 vec_add(vector bool int __a, vector int __b)
221 return (vector int)__a + __b;
224 static vector int __ATTRS_o_ai
225 vec_add(vector int __a, vector bool int __b)
227 return __a + (vector int)__b;
230 static vector unsigned int __ATTRS_o_ai
231 vec_add(vector unsigned int __a, vector unsigned int __b)
233 return __a + __b;
236 static vector unsigned int __ATTRS_o_ai
237 vec_add(vector bool int __a, vector unsigned int __b)
239 return (vector unsigned int)__a + __b;
242 static vector unsigned int __ATTRS_o_ai
243 vec_add(vector unsigned int __a, vector bool int __b)
245 return __a + (vector unsigned int)__b;
248 static vector float __ATTRS_o_ai
249 vec_add(vector float __a, vector float __b)
251 return __a + __b;
254 /* vec_vaddubm */
256 #define __builtin_altivec_vaddubm vec_vaddubm
258 static vector signed char __ATTRS_o_ai
259 vec_vaddubm(vector signed char __a, vector signed char __b)
261 return __a + __b;
264 static vector signed char __ATTRS_o_ai
265 vec_vaddubm(vector bool char __a, vector signed char __b)
267 return (vector signed char)__a + __b;
270 static vector signed char __ATTRS_o_ai
271 vec_vaddubm(vector signed char __a, vector bool char __b)
273 return __a + (vector signed char)__b;
276 static vector unsigned char __ATTRS_o_ai
277 vec_vaddubm(vector unsigned char __a, vector unsigned char __b)
279 return __a + __b;
282 static vector unsigned char __ATTRS_o_ai
283 vec_vaddubm(vector bool char __a, vector unsigned char __b)
285 return (vector unsigned char)__a + __b;
288 static vector unsigned char __ATTRS_o_ai
289 vec_vaddubm(vector unsigned char __a, vector bool char __b)
291 return __a + (vector unsigned char)__b;
294 /* vec_vadduhm */
296 #define __builtin_altivec_vadduhm vec_vadduhm
298 static vector short __ATTRS_o_ai
299 vec_vadduhm(vector short __a, vector short __b)
301 return __a + __b;
304 static vector short __ATTRS_o_ai
305 vec_vadduhm(vector bool short __a, vector short __b)
307 return (vector short)__a + __b;
310 static vector short __ATTRS_o_ai
311 vec_vadduhm(vector short __a, vector bool short __b)
313 return __a + (vector short)__b;
316 static vector unsigned short __ATTRS_o_ai
317 vec_vadduhm(vector unsigned short __a, vector unsigned short __b)
319 return __a + __b;
322 static vector unsigned short __ATTRS_o_ai
323 vec_vadduhm(vector bool short __a, vector unsigned short __b)
325 return (vector unsigned short)__a + __b;
328 static vector unsigned short __ATTRS_o_ai
329 vec_vadduhm(vector unsigned short __a, vector bool short __b)
331 return __a + (vector unsigned short)__b;
334 /* vec_vadduwm */
336 #define __builtin_altivec_vadduwm vec_vadduwm
338 static vector int __ATTRS_o_ai
339 vec_vadduwm(vector int __a, vector int __b)
341 return __a + __b;
344 static vector int __ATTRS_o_ai
345 vec_vadduwm(vector bool int __a, vector int __b)
347 return (vector int)__a + __b;
350 static vector int __ATTRS_o_ai
351 vec_vadduwm(vector int __a, vector bool int __b)
353 return __a + (vector int)__b;
356 static vector unsigned int __ATTRS_o_ai
357 vec_vadduwm(vector unsigned int __a, vector unsigned int __b)
359 return __a + __b;
362 static vector unsigned int __ATTRS_o_ai
363 vec_vadduwm(vector bool int __a, vector unsigned int __b)
365 return (vector unsigned int)__a + __b;
368 static vector unsigned int __ATTRS_o_ai
369 vec_vadduwm(vector unsigned int __a, vector bool int __b)
371 return __a + (vector unsigned int)__b;
374 /* vec_vaddfp */
376 #define __builtin_altivec_vaddfp vec_vaddfp
378 static vector float __attribute__((__always_inline__))
379 vec_vaddfp(vector float __a, vector float __b)
381 return __a + __b;
384 /* vec_addc */
386 static vector unsigned int __attribute__((__always_inline__))
387 vec_addc(vector unsigned int __a, vector unsigned int __b)
389 return __builtin_altivec_vaddcuw(__a, __b);
392 /* vec_vaddcuw */
394 static vector unsigned int __attribute__((__always_inline__))
395 vec_vaddcuw(vector unsigned int __a, vector unsigned int __b)
397 return __builtin_altivec_vaddcuw(__a, __b);
400 /* vec_adds */
402 static vector signed char __ATTRS_o_ai
403 vec_adds(vector signed char __a, vector signed char __b)
405 return __builtin_altivec_vaddsbs(__a, __b);
408 static vector signed char __ATTRS_o_ai
409 vec_adds(vector bool char __a, vector signed char __b)
411 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
414 static vector signed char __ATTRS_o_ai
415 vec_adds(vector signed char __a, vector bool char __b)
417 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
420 static vector unsigned char __ATTRS_o_ai
421 vec_adds(vector unsigned char __a, vector unsigned char __b)
423 return __builtin_altivec_vaddubs(__a, __b);
426 static vector unsigned char __ATTRS_o_ai
427 vec_adds(vector bool char __a, vector unsigned char __b)
429 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
432 static vector unsigned char __ATTRS_o_ai
433 vec_adds(vector unsigned char __a, vector bool char __b)
435 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
438 static vector short __ATTRS_o_ai
439 vec_adds(vector short __a, vector short __b)
441 return __builtin_altivec_vaddshs(__a, __b);
444 static vector short __ATTRS_o_ai
445 vec_adds(vector bool short __a, vector short __b)
447 return __builtin_altivec_vaddshs((vector short)__a, __b);
450 static vector short __ATTRS_o_ai
451 vec_adds(vector short __a, vector bool short __b)
453 return __builtin_altivec_vaddshs(__a, (vector short)__b);
456 static vector unsigned short __ATTRS_o_ai
457 vec_adds(vector unsigned short __a, vector unsigned short __b)
459 return __builtin_altivec_vadduhs(__a, __b);
462 static vector unsigned short __ATTRS_o_ai
463 vec_adds(vector bool short __a, vector unsigned short __b)
465 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
468 static vector unsigned short __ATTRS_o_ai
469 vec_adds(vector unsigned short __a, vector bool short __b)
471 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
474 static vector int __ATTRS_o_ai
475 vec_adds(vector int __a, vector int __b)
477 return __builtin_altivec_vaddsws(__a, __b);
480 static vector int __ATTRS_o_ai
481 vec_adds(vector bool int __a, vector int __b)
483 return __builtin_altivec_vaddsws((vector int)__a, __b);
486 static vector int __ATTRS_o_ai
487 vec_adds(vector int __a, vector bool int __b)
489 return __builtin_altivec_vaddsws(__a, (vector int)__b);
492 static vector unsigned int __ATTRS_o_ai
493 vec_adds(vector unsigned int __a, vector unsigned int __b)
495 return __builtin_altivec_vadduws(__a, __b);
498 static vector unsigned int __ATTRS_o_ai
499 vec_adds(vector bool int __a, vector unsigned int __b)
501 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
504 static vector unsigned int __ATTRS_o_ai
505 vec_adds(vector unsigned int __a, vector bool int __b)
507 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
510 /* vec_vaddsbs */
512 static vector signed char __ATTRS_o_ai
513 vec_vaddsbs(vector signed char __a, vector signed char __b)
515 return __builtin_altivec_vaddsbs(__a, __b);
518 static vector signed char __ATTRS_o_ai
519 vec_vaddsbs(vector bool char __a, vector signed char __b)
521 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
524 static vector signed char __ATTRS_o_ai
525 vec_vaddsbs(vector signed char __a, vector bool char __b)
527 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
530 /* vec_vaddubs */
532 static vector unsigned char __ATTRS_o_ai
533 vec_vaddubs(vector unsigned char __a, vector unsigned char __b)
535 return __builtin_altivec_vaddubs(__a, __b);
538 static vector unsigned char __ATTRS_o_ai
539 vec_vaddubs(vector bool char __a, vector unsigned char __b)
541 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
544 static vector unsigned char __ATTRS_o_ai
545 vec_vaddubs(vector unsigned char __a, vector bool char __b)
547 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
550 /* vec_vaddshs */
552 static vector short __ATTRS_o_ai
553 vec_vaddshs(vector short __a, vector short __b)
555 return __builtin_altivec_vaddshs(__a, __b);
558 static vector short __ATTRS_o_ai
559 vec_vaddshs(vector bool short __a, vector short __b)
561 return __builtin_altivec_vaddshs((vector short)__a, __b);
564 static vector short __ATTRS_o_ai
565 vec_vaddshs(vector short __a, vector bool short __b)
567 return __builtin_altivec_vaddshs(__a, (vector short)__b);
570 /* vec_vadduhs */
572 static vector unsigned short __ATTRS_o_ai
573 vec_vadduhs(vector unsigned short __a, vector unsigned short __b)
575 return __builtin_altivec_vadduhs(__a, __b);
578 static vector unsigned short __ATTRS_o_ai
579 vec_vadduhs(vector bool short __a, vector unsigned short __b)
581 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
584 static vector unsigned short __ATTRS_o_ai
585 vec_vadduhs(vector unsigned short __a, vector bool short __b)
587 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
590 /* vec_vaddsws */
592 static vector int __ATTRS_o_ai
593 vec_vaddsws(vector int __a, vector int __b)
595 return __builtin_altivec_vaddsws(__a, __b);
598 static vector int __ATTRS_o_ai
599 vec_vaddsws(vector bool int __a, vector int __b)
601 return __builtin_altivec_vaddsws((vector int)__a, __b);
604 static vector int __ATTRS_o_ai
605 vec_vaddsws(vector int __a, vector bool int __b)
607 return __builtin_altivec_vaddsws(__a, (vector int)__b);
610 /* vec_vadduws */
612 static vector unsigned int __ATTRS_o_ai
613 vec_vadduws(vector unsigned int __a, vector unsigned int __b)
615 return __builtin_altivec_vadduws(__a, __b);
618 static vector unsigned int __ATTRS_o_ai
619 vec_vadduws(vector bool int __a, vector unsigned int __b)
621 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
624 static vector unsigned int __ATTRS_o_ai
625 vec_vadduws(vector unsigned int __a, vector bool int __b)
627 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
630 /* vec_and */
632 #define __builtin_altivec_vand vec_and
634 static vector signed char __ATTRS_o_ai
635 vec_and(vector signed char __a, vector signed char __b)
637 return __a & __b;
640 static vector signed char __ATTRS_o_ai
641 vec_and(vector bool char __a, vector signed char __b)
643 return (vector signed char)__a & __b;
646 static vector signed char __ATTRS_o_ai
647 vec_and(vector signed char __a, vector bool char __b)
649 return __a & (vector signed char)__b;
652 static vector unsigned char __ATTRS_o_ai
653 vec_and(vector unsigned char __a, vector unsigned char __b)
655 return __a & __b;
658 static vector unsigned char __ATTRS_o_ai
659 vec_and(vector bool char __a, vector unsigned char __b)
661 return (vector unsigned char)__a & __b;
664 static vector unsigned char __ATTRS_o_ai
665 vec_and(vector unsigned char __a, vector bool char __b)
667 return __a & (vector unsigned char)__b;
670 static vector bool char __ATTRS_o_ai
671 vec_and(vector bool char __a, vector bool char __b)
673 return __a & __b;
676 static vector short __ATTRS_o_ai
677 vec_and(vector short __a, vector short __b)
679 return __a & __b;
682 static vector short __ATTRS_o_ai
683 vec_and(vector bool short __a, vector short __b)
685 return (vector short)__a & __b;
688 static vector short __ATTRS_o_ai
689 vec_and(vector short __a, vector bool short __b)
691 return __a & (vector short)__b;
694 static vector unsigned short __ATTRS_o_ai
695 vec_and(vector unsigned short __a, vector unsigned short __b)
697 return __a & __b;
700 static vector unsigned short __ATTRS_o_ai
701 vec_and(vector bool short __a, vector unsigned short __b)
703 return (vector unsigned short)__a & __b;
706 static vector unsigned short __ATTRS_o_ai
707 vec_and(vector unsigned short __a, vector bool short __b)
709 return __a & (vector unsigned short)__b;
712 static vector bool short __ATTRS_o_ai
713 vec_and(vector bool short __a, vector bool short __b)
715 return __a & __b;
718 static vector int __ATTRS_o_ai
719 vec_and(vector int __a, vector int __b)
721 return __a & __b;
724 static vector int __ATTRS_o_ai
725 vec_and(vector bool int __a, vector int __b)
727 return (vector int)__a & __b;
730 static vector int __ATTRS_o_ai
731 vec_and(vector int __a, vector bool int __b)
733 return __a & (vector int)__b;
736 static vector unsigned int __ATTRS_o_ai
737 vec_and(vector unsigned int __a, vector unsigned int __b)
739 return __a & __b;
742 static vector unsigned int __ATTRS_o_ai
743 vec_and(vector bool int __a, vector unsigned int __b)
745 return (vector unsigned int)__a & __b;
748 static vector unsigned int __ATTRS_o_ai
749 vec_and(vector unsigned int __a, vector bool int __b)
751 return __a & (vector unsigned int)__b;
754 static vector bool int __ATTRS_o_ai
755 vec_and(vector bool int __a, vector bool int __b)
757 return __a & __b;
760 static vector float __ATTRS_o_ai
761 vec_and(vector float __a, vector float __b)
763 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
764 return (vector float)__res;
767 static vector float __ATTRS_o_ai
768 vec_and(vector bool int __a, vector float __b)
770 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
771 return (vector float)__res;
774 static vector float __ATTRS_o_ai
775 vec_and(vector float __a, vector bool int __b)
777 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
778 return (vector float)__res;
781 /* vec_vand */
783 static vector signed char __ATTRS_o_ai
784 vec_vand(vector signed char __a, vector signed char __b)
786 return __a & __b;
789 static vector signed char __ATTRS_o_ai
790 vec_vand(vector bool char __a, vector signed char __b)
792 return (vector signed char)__a & __b;
795 static vector signed char __ATTRS_o_ai
796 vec_vand(vector signed char __a, vector bool char __b)
798 return __a & (vector signed char)__b;
801 static vector unsigned char __ATTRS_o_ai
802 vec_vand(vector unsigned char __a, vector unsigned char __b)
804 return __a & __b;
807 static vector unsigned char __ATTRS_o_ai
808 vec_vand(vector bool char __a, vector unsigned char __b)
810 return (vector unsigned char)__a & __b;
813 static vector unsigned char __ATTRS_o_ai
814 vec_vand(vector unsigned char __a, vector bool char __b)
816 return __a & (vector unsigned char)__b;
819 static vector bool char __ATTRS_o_ai
820 vec_vand(vector bool char __a, vector bool char __b)
822 return __a & __b;
825 static vector short __ATTRS_o_ai
826 vec_vand(vector short __a, vector short __b)
828 return __a & __b;
831 static vector short __ATTRS_o_ai
832 vec_vand(vector bool short __a, vector short __b)
834 return (vector short)__a & __b;
837 static vector short __ATTRS_o_ai
838 vec_vand(vector short __a, vector bool short __b)
840 return __a & (vector short)__b;
843 static vector unsigned short __ATTRS_o_ai
844 vec_vand(vector unsigned short __a, vector unsigned short __b)
846 return __a & __b;
849 static vector unsigned short __ATTRS_o_ai
850 vec_vand(vector bool short __a, vector unsigned short __b)
852 return (vector unsigned short)__a & __b;
855 static vector unsigned short __ATTRS_o_ai
856 vec_vand(vector unsigned short __a, vector bool short __b)
858 return __a & (vector unsigned short)__b;
861 static vector bool short __ATTRS_o_ai
862 vec_vand(vector bool short __a, vector bool short __b)
864 return __a & __b;
867 static vector int __ATTRS_o_ai
868 vec_vand(vector int __a, vector int __b)
870 return __a & __b;
873 static vector int __ATTRS_o_ai
874 vec_vand(vector bool int __a, vector int __b)
876 return (vector int)__a & __b;
879 static vector int __ATTRS_o_ai
880 vec_vand(vector int __a, vector bool int __b)
882 return __a & (vector int)__b;
885 static vector unsigned int __ATTRS_o_ai
886 vec_vand(vector unsigned int __a, vector unsigned int __b)
888 return __a & __b;
891 static vector unsigned int __ATTRS_o_ai
892 vec_vand(vector bool int __a, vector unsigned int __b)
894 return (vector unsigned int)__a & __b;
897 static vector unsigned int __ATTRS_o_ai
898 vec_vand(vector unsigned int __a, vector bool int __b)
900 return __a & (vector unsigned int)__b;
903 static vector bool int __ATTRS_o_ai
904 vec_vand(vector bool int __a, vector bool int __b)
906 return __a & __b;
909 static vector float __ATTRS_o_ai
910 vec_vand(vector float __a, vector float __b)
912 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
913 return (vector float)__res;
916 static vector float __ATTRS_o_ai
917 vec_vand(vector bool int __a, vector float __b)
919 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
920 return (vector float)__res;
923 static vector float __ATTRS_o_ai
924 vec_vand(vector float __a, vector bool int __b)
926 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
927 return (vector float)__res;
930 /* vec_andc */
932 #define __builtin_altivec_vandc vec_andc
934 static vector signed char __ATTRS_o_ai
935 vec_andc(vector signed char __a, vector signed char __b)
937 return __a & ~__b;
940 static vector signed char __ATTRS_o_ai
941 vec_andc(vector bool char __a, vector signed char __b)
943 return (vector signed char)__a & ~__b;
946 static vector signed char __ATTRS_o_ai
947 vec_andc(vector signed char __a, vector bool char __b)
949 return __a & ~(vector signed char)__b;
952 static vector unsigned char __ATTRS_o_ai
953 vec_andc(vector unsigned char __a, vector unsigned char __b)
955 return __a & ~__b;
958 static vector unsigned char __ATTRS_o_ai
959 vec_andc(vector bool char __a, vector unsigned char __b)
961 return (vector unsigned char)__a & ~__b;
964 static vector unsigned char __ATTRS_o_ai
965 vec_andc(vector unsigned char __a, vector bool char __b)
967 return __a & ~(vector unsigned char)__b;
970 static vector bool char __ATTRS_o_ai
971 vec_andc(vector bool char __a, vector bool char __b)
973 return __a & ~__b;
976 static vector short __ATTRS_o_ai
977 vec_andc(vector short __a, vector short __b)
979 return __a & ~__b;
982 static vector short __ATTRS_o_ai
983 vec_andc(vector bool short __a, vector short __b)
985 return (vector short)__a & ~__b;
988 static vector short __ATTRS_o_ai
989 vec_andc(vector short __a, vector bool short __b)
991 return __a & ~(vector short)__b;
994 static vector unsigned short __ATTRS_o_ai
995 vec_andc(vector unsigned short __a, vector unsigned short __b)
997 return __a & ~__b;
1000 static vector unsigned short __ATTRS_o_ai
1001 vec_andc(vector bool short __a, vector unsigned short __b)
1003 return (vector unsigned short)__a & ~__b;
1006 static vector unsigned short __ATTRS_o_ai
1007 vec_andc(vector unsigned short __a, vector bool short __b)
1009 return __a & ~(vector unsigned short)__b;
1012 static vector bool short __ATTRS_o_ai
1013 vec_andc(vector bool short __a, vector bool short __b)
1015 return __a & ~__b;
1018 static vector int __ATTRS_o_ai
1019 vec_andc(vector int __a, vector int __b)
1021 return __a & ~__b;
1024 static vector int __ATTRS_o_ai
1025 vec_andc(vector bool int __a, vector int __b)
1027 return (vector int)__a & ~__b;
1030 static vector int __ATTRS_o_ai
1031 vec_andc(vector int __a, vector bool int __b)
1033 return __a & ~(vector int)__b;
1036 static vector unsigned int __ATTRS_o_ai
1037 vec_andc(vector unsigned int __a, vector unsigned int __b)
1039 return __a & ~__b;
1042 static vector unsigned int __ATTRS_o_ai
1043 vec_andc(vector bool int __a, vector unsigned int __b)
1045 return (vector unsigned int)__a & ~__b;
1048 static vector unsigned int __ATTRS_o_ai
1049 vec_andc(vector unsigned int __a, vector bool int __b)
1051 return __a & ~(vector unsigned int)__b;
1054 static vector bool int __ATTRS_o_ai
1055 vec_andc(vector bool int __a, vector bool int __b)
1057 return __a & ~__b;
1060 static vector float __ATTRS_o_ai
1061 vec_andc(vector float __a, vector float __b)
1063 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1064 return (vector float)__res;
1067 static vector float __ATTRS_o_ai
1068 vec_andc(vector bool int __a, vector float __b)
1070 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1071 return (vector float)__res;
1074 static vector float __ATTRS_o_ai
1075 vec_andc(vector float __a, vector bool int __b)
1077 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1078 return (vector float)__res;
1081 /* vec_vandc */
1083 static vector signed char __ATTRS_o_ai
1084 vec_vandc(vector signed char __a, vector signed char __b)
1086 return __a & ~__b;
1089 static vector signed char __ATTRS_o_ai
1090 vec_vandc(vector bool char __a, vector signed char __b)
1092 return (vector signed char)__a & ~__b;
1095 static vector signed char __ATTRS_o_ai
1096 vec_vandc(vector signed char __a, vector bool char __b)
1098 return __a & ~(vector signed char)__b;
1101 static vector unsigned char __ATTRS_o_ai
1102 vec_vandc(vector unsigned char __a, vector unsigned char __b)
1104 return __a & ~__b;
1107 static vector unsigned char __ATTRS_o_ai
1108 vec_vandc(vector bool char __a, vector unsigned char __b)
1110 return (vector unsigned char)__a & ~__b;
1113 static vector unsigned char __ATTRS_o_ai
1114 vec_vandc(vector unsigned char __a, vector bool char __b)
1116 return __a & ~(vector unsigned char)__b;
1119 static vector bool char __ATTRS_o_ai
1120 vec_vandc(vector bool char __a, vector bool char __b)
1122 return __a & ~__b;
1125 static vector short __ATTRS_o_ai
1126 vec_vandc(vector short __a, vector short __b)
1128 return __a & ~__b;
1131 static vector short __ATTRS_o_ai
1132 vec_vandc(vector bool short __a, vector short __b)
1134 return (vector short)__a & ~__b;
1137 static vector short __ATTRS_o_ai
1138 vec_vandc(vector short __a, vector bool short __b)
1140 return __a & ~(vector short)__b;
1143 static vector unsigned short __ATTRS_o_ai
1144 vec_vandc(vector unsigned short __a, vector unsigned short __b)
1146 return __a & ~__b;
1149 static vector unsigned short __ATTRS_o_ai
1150 vec_vandc(vector bool short __a, vector unsigned short __b)
1152 return (vector unsigned short)__a & ~__b;
1155 static vector unsigned short __ATTRS_o_ai
1156 vec_vandc(vector unsigned short __a, vector bool short __b)
1158 return __a & ~(vector unsigned short)__b;
1161 static vector bool short __ATTRS_o_ai
1162 vec_vandc(vector bool short __a, vector bool short __b)
1164 return __a & ~__b;
1167 static vector int __ATTRS_o_ai
1168 vec_vandc(vector int __a, vector int __b)
1170 return __a & ~__b;
1173 static vector int __ATTRS_o_ai
1174 vec_vandc(vector bool int __a, vector int __b)
1176 return (vector int)__a & ~__b;
1179 static vector int __ATTRS_o_ai
1180 vec_vandc(vector int __a, vector bool int __b)
1182 return __a & ~(vector int)__b;
1185 static vector unsigned int __ATTRS_o_ai
1186 vec_vandc(vector unsigned int __a, vector unsigned int __b)
1188 return __a & ~__b;
1191 static vector unsigned int __ATTRS_o_ai
1192 vec_vandc(vector bool int __a, vector unsigned int __b)
1194 return (vector unsigned int)__a & ~__b;
1197 static vector unsigned int __ATTRS_o_ai
1198 vec_vandc(vector unsigned int __a, vector bool int __b)
1200 return __a & ~(vector unsigned int)__b;
1203 static vector bool int __ATTRS_o_ai
1204 vec_vandc(vector bool int __a, vector bool int __b)
1206 return __a & ~__b;
1209 static vector float __ATTRS_o_ai
1210 vec_vandc(vector float __a, vector float __b)
1212 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1213 return (vector float)__res;
1216 static vector float __ATTRS_o_ai
1217 vec_vandc(vector bool int __a, vector float __b)
1219 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1220 return (vector float)__res;
1223 static vector float __ATTRS_o_ai
1224 vec_vandc(vector float __a, vector bool int __b)
1226 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1227 return (vector float)__res;
1230 /* vec_avg */
1232 static vector signed char __ATTRS_o_ai
1233 vec_avg(vector signed char __a, vector signed char __b)
1235 return __builtin_altivec_vavgsb(__a, __b);
1238 static vector unsigned char __ATTRS_o_ai
1239 vec_avg(vector unsigned char __a, vector unsigned char __b)
1241 return __builtin_altivec_vavgub(__a, __b);
1244 static vector short __ATTRS_o_ai
1245 vec_avg(vector short __a, vector short __b)
1247 return __builtin_altivec_vavgsh(__a, __b);
1250 static vector unsigned short __ATTRS_o_ai
1251 vec_avg(vector unsigned short __a, vector unsigned short __b)
1253 return __builtin_altivec_vavguh(__a, __b);
1256 static vector int __ATTRS_o_ai
1257 vec_avg(vector int __a, vector int __b)
1259 return __builtin_altivec_vavgsw(__a, __b);
1262 static vector unsigned int __ATTRS_o_ai
1263 vec_avg(vector unsigned int __a, vector unsigned int __b)
1265 return __builtin_altivec_vavguw(__a, __b);
1268 /* vec_vavgsb */
1270 static vector signed char __attribute__((__always_inline__))
1271 vec_vavgsb(vector signed char __a, vector signed char __b)
1273 return __builtin_altivec_vavgsb(__a, __b);
1276 /* vec_vavgub */
1278 static vector unsigned char __attribute__((__always_inline__))
1279 vec_vavgub(vector unsigned char __a, vector unsigned char __b)
1281 return __builtin_altivec_vavgub(__a, __b);
1284 /* vec_vavgsh */
1286 static vector short __attribute__((__always_inline__))
1287 vec_vavgsh(vector short __a, vector short __b)
1289 return __builtin_altivec_vavgsh(__a, __b);
1292 /* vec_vavguh */
1294 static vector unsigned short __attribute__((__always_inline__))
1295 vec_vavguh(vector unsigned short __a, vector unsigned short __b)
1297 return __builtin_altivec_vavguh(__a, __b);
1300 /* vec_vavgsw */
1302 static vector int __attribute__((__always_inline__))
1303 vec_vavgsw(vector int __a, vector int __b)
1305 return __builtin_altivec_vavgsw(__a, __b);
1308 /* vec_vavguw */
1310 static vector unsigned int __attribute__((__always_inline__))
1311 vec_vavguw(vector unsigned int __a, vector unsigned int __b)
1313 return __builtin_altivec_vavguw(__a, __b);
1316 /* vec_ceil */
1318 static vector float __attribute__((__always_inline__))
1319 vec_ceil(vector float __a)
1321 return __builtin_altivec_vrfip(__a);
1324 /* vec_vrfip */
1326 static vector float __attribute__((__always_inline__))
1327 vec_vrfip(vector float __a)
1329 return __builtin_altivec_vrfip(__a);
1332 /* vec_cmpb */
1334 static vector int __attribute__((__always_inline__))
1335 vec_cmpb(vector float __a, vector float __b)
1337 return __builtin_altivec_vcmpbfp(__a, __b);
1340 /* vec_vcmpbfp */
1342 static vector int __attribute__((__always_inline__))
1343 vec_vcmpbfp(vector float __a, vector float __b)
1345 return __builtin_altivec_vcmpbfp(__a, __b);
1348 /* vec_cmpeq */
1350 static vector bool char __ATTRS_o_ai
1351 vec_cmpeq(vector signed char __a, vector signed char __b)
1353 return (vector bool char)
1354 __builtin_altivec_vcmpequb((vector char)__a, (vector char)__b);
1357 static vector bool char __ATTRS_o_ai
1358 vec_cmpeq(vector unsigned char __a, vector unsigned char __b)
1360 return (vector bool char)
1361 __builtin_altivec_vcmpequb((vector char)__a, (vector char)__b);
1364 static vector bool short __ATTRS_o_ai
1365 vec_cmpeq(vector short __a, vector short __b)
1367 return (vector bool short)__builtin_altivec_vcmpequh(__a, __b);
1370 static vector bool short __ATTRS_o_ai
1371 vec_cmpeq(vector unsigned short __a, vector unsigned short __b)
1373 return (vector bool short)
1374 __builtin_altivec_vcmpequh((vector short)__a, (vector short)__b);
1377 static vector bool int __ATTRS_o_ai
1378 vec_cmpeq(vector int __a, vector int __b)
1380 return (vector bool int)__builtin_altivec_vcmpequw(__a, __b);
1383 static vector bool int __ATTRS_o_ai
1384 vec_cmpeq(vector unsigned int __a, vector unsigned int __b)
1386 return (vector bool int)
1387 __builtin_altivec_vcmpequw((vector int)__a, (vector int)__b);
1390 static vector bool int __ATTRS_o_ai
1391 vec_cmpeq(vector float __a, vector float __b)
1393 return (vector bool int)__builtin_altivec_vcmpeqfp(__a, __b);
1396 /* vec_cmpge */
1398 static vector bool int __attribute__((__always_inline__))
1399 vec_cmpge(vector float __a, vector float __b)
1401 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1404 /* vec_vcmpgefp */
1406 static vector bool int __attribute__((__always_inline__))
1407 vec_vcmpgefp(vector float __a, vector float __b)
1409 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1412 /* vec_cmpgt */
1414 static vector bool char __ATTRS_o_ai
1415 vec_cmpgt(vector signed char __a, vector signed char __b)
1417 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1420 static vector bool char __ATTRS_o_ai
1421 vec_cmpgt(vector unsigned char __a, vector unsigned char __b)
1423 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1426 static vector bool short __ATTRS_o_ai
1427 vec_cmpgt(vector short __a, vector short __b)
1429 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1432 static vector bool short __ATTRS_o_ai
1433 vec_cmpgt(vector unsigned short __a, vector unsigned short __b)
1435 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1438 static vector bool int __ATTRS_o_ai
1439 vec_cmpgt(vector int __a, vector int __b)
1441 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1444 static vector bool int __ATTRS_o_ai
1445 vec_cmpgt(vector unsigned int __a, vector unsigned int __b)
1447 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1450 static vector bool int __ATTRS_o_ai
1451 vec_cmpgt(vector float __a, vector float __b)
1453 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1456 /* vec_vcmpgtsb */
1458 static vector bool char __attribute__((__always_inline__))
1459 vec_vcmpgtsb(vector signed char __a, vector signed char __b)
1461 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1464 /* vec_vcmpgtub */
1466 static vector bool char __attribute__((__always_inline__))
1467 vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b)
1469 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1472 /* vec_vcmpgtsh */
1474 static vector bool short __attribute__((__always_inline__))
1475 vec_vcmpgtsh(vector short __a, vector short __b)
1477 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1480 /* vec_vcmpgtuh */
1482 static vector bool short __attribute__((__always_inline__))
1483 vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b)
1485 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1488 /* vec_vcmpgtsw */
1490 static vector bool int __attribute__((__always_inline__))
1491 vec_vcmpgtsw(vector int __a, vector int __b)
1493 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1496 /* vec_vcmpgtuw */
1498 static vector bool int __attribute__((__always_inline__))
1499 vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b)
1501 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1504 /* vec_vcmpgtfp */
1506 static vector bool int __attribute__((__always_inline__))
1507 vec_vcmpgtfp(vector float __a, vector float __b)
1509 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1512 /* vec_cmple */
1514 static vector bool int __attribute__((__always_inline__))
1515 vec_cmple(vector float __a, vector float __b)
1517 return (vector bool int)__builtin_altivec_vcmpgefp(__b, __a);
1520 /* vec_cmplt */
1522 static vector bool char __ATTRS_o_ai
1523 vec_cmplt(vector signed char __a, vector signed char __b)
1525 return (vector bool char)__builtin_altivec_vcmpgtsb(__b, __a);
1528 static vector bool char __ATTRS_o_ai
1529 vec_cmplt(vector unsigned char __a, vector unsigned char __b)
1531 return (vector bool char)__builtin_altivec_vcmpgtub(__b, __a);
1534 static vector bool short __ATTRS_o_ai
1535 vec_cmplt(vector short __a, vector short __b)
1537 return (vector bool short)__builtin_altivec_vcmpgtsh(__b, __a);
1540 static vector bool short __ATTRS_o_ai
1541 vec_cmplt(vector unsigned short __a, vector unsigned short __b)
1543 return (vector bool short)__builtin_altivec_vcmpgtuh(__b, __a);
1546 static vector bool int __ATTRS_o_ai
1547 vec_cmplt(vector int __a, vector int __b)
1549 return (vector bool int)__builtin_altivec_vcmpgtsw(__b, __a);
1552 static vector bool int __ATTRS_o_ai
1553 vec_cmplt(vector unsigned int __a, vector unsigned int __b)
1555 return (vector bool int)__builtin_altivec_vcmpgtuw(__b, __a);
1558 static vector bool int __ATTRS_o_ai
1559 vec_cmplt(vector float __a, vector float __b)
1561 return (vector bool int)__builtin_altivec_vcmpgtfp(__b, __a);
1564 /* vec_ctf */
1566 static vector float __ATTRS_o_ai
1567 vec_ctf(vector int __a, int __b)
1569 return __builtin_altivec_vcfsx(__a, __b);
1572 static vector float __ATTRS_o_ai
1573 vec_ctf(vector unsigned int __a, int __b)
1575 return __builtin_altivec_vcfux((vector int)__a, __b);
1578 /* vec_vcfsx */
1580 static vector float __attribute__((__always_inline__))
1581 vec_vcfsx(vector int __a, int __b)
1583 return __builtin_altivec_vcfsx(__a, __b);
1586 /* vec_vcfux */
1588 static vector float __attribute__((__always_inline__))
1589 vec_vcfux(vector unsigned int __a, int __b)
1591 return __builtin_altivec_vcfux((vector int)__a, __b);
1594 /* vec_cts */
1596 static vector int __attribute__((__always_inline__))
1597 vec_cts(vector float __a, int __b)
1599 return __builtin_altivec_vctsxs(__a, __b);
1602 /* vec_vctsxs */
1604 static vector int __attribute__((__always_inline__))
1605 vec_vctsxs(vector float __a, int __b)
1607 return __builtin_altivec_vctsxs(__a, __b);
1610 /* vec_ctu */
1612 static vector unsigned int __attribute__((__always_inline__))
1613 vec_ctu(vector float __a, int __b)
1615 return __builtin_altivec_vctuxs(__a, __b);
1618 /* vec_vctuxs */
1620 static vector unsigned int __attribute__((__always_inline__))
1621 vec_vctuxs(vector float __a, int __b)
1623 return __builtin_altivec_vctuxs(__a, __b);
1626 /* vec_div */
1627 #ifdef __VSX__
1628 static vector float __ATTRS_o_ai
1629 vec_div(vector float __a, vector float __b)
1631 return __builtin_vsx_xvdivsp(__a, __b);
1634 static vector double __ATTRS_o_ai
1635 vec_div(vector double __a, vector double __b)
1637 return __builtin_vsx_xvdivdp(__a, __b);
1639 #endif
1641 /* vec_dss */
1643 static void __attribute__((__always_inline__))
1644 vec_dss(int __a)
1646 __builtin_altivec_dss(__a);
1649 /* vec_dssall */
1651 static void __attribute__((__always_inline__))
1652 vec_dssall(void)
1654 __builtin_altivec_dssall();
1657 /* vec_dst */
1659 static void __attribute__((__always_inline__))
1660 vec_dst(const void *__a, int __b, int __c)
1662 __builtin_altivec_dst(__a, __b, __c);
1665 /* vec_dstst */
1667 static void __attribute__((__always_inline__))
1668 vec_dstst(const void *__a, int __b, int __c)
1670 __builtin_altivec_dstst(__a, __b, __c);
1673 /* vec_dststt */
1675 static void __attribute__((__always_inline__))
1676 vec_dststt(const void *__a, int __b, int __c)
1678 __builtin_altivec_dststt(__a, __b, __c);
1681 /* vec_dstt */
1683 static void __attribute__((__always_inline__))
1684 vec_dstt(const void *__a, int __b, int __c)
1686 __builtin_altivec_dstt(__a, __b, __c);
1689 /* vec_expte */
1691 static vector float __attribute__((__always_inline__))
1692 vec_expte(vector float __a)
1694 return __builtin_altivec_vexptefp(__a);
1697 /* vec_vexptefp */
1699 static vector float __attribute__((__always_inline__))
1700 vec_vexptefp(vector float __a)
1702 return __builtin_altivec_vexptefp(__a);
1705 /* vec_floor */
1707 static vector float __attribute__((__always_inline__))
1708 vec_floor(vector float __a)
1710 return __builtin_altivec_vrfim(__a);
1713 /* vec_vrfim */
1715 static vector float __attribute__((__always_inline__))
1716 vec_vrfim(vector float __a)
1718 return __builtin_altivec_vrfim(__a);
1721 /* vec_ld */
1723 static vector signed char __ATTRS_o_ai
1724 vec_ld(int __a, const vector signed char *__b)
1726 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1729 static vector signed char __ATTRS_o_ai
1730 vec_ld(int __a, const signed char *__b)
1732 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1735 static vector unsigned char __ATTRS_o_ai
1736 vec_ld(int __a, const vector unsigned char *__b)
1738 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1741 static vector unsigned char __ATTRS_o_ai
1742 vec_ld(int __a, const unsigned char *__b)
1744 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1747 static vector bool char __ATTRS_o_ai
1748 vec_ld(int __a, const vector bool char *__b)
1750 return (vector bool char)__builtin_altivec_lvx(__a, __b);
1753 static vector short __ATTRS_o_ai
1754 vec_ld(int __a, const vector short *__b)
1756 return (vector short)__builtin_altivec_lvx(__a, __b);
1759 static vector short __ATTRS_o_ai
1760 vec_ld(int __a, const short *__b)
1762 return (vector short)__builtin_altivec_lvx(__a, __b);
1765 static vector unsigned short __ATTRS_o_ai
1766 vec_ld(int __a, const vector unsigned short *__b)
1768 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1771 static vector unsigned short __ATTRS_o_ai
1772 vec_ld(int __a, const unsigned short *__b)
1774 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1777 static vector bool short __ATTRS_o_ai
1778 vec_ld(int __a, const vector bool short *__b)
1780 return (vector bool short)__builtin_altivec_lvx(__a, __b);
1783 static vector pixel __ATTRS_o_ai
1784 vec_ld(int __a, const vector pixel *__b)
1786 return (vector pixel)__builtin_altivec_lvx(__a, __b);
1789 static vector int __ATTRS_o_ai
1790 vec_ld(int __a, const vector int *__b)
1792 return (vector int)__builtin_altivec_lvx(__a, __b);
1795 static vector int __ATTRS_o_ai
1796 vec_ld(int __a, const int *__b)
1798 return (vector int)__builtin_altivec_lvx(__a, __b);
1801 static vector unsigned int __ATTRS_o_ai
1802 vec_ld(int __a, const vector unsigned int *__b)
1804 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1807 static vector unsigned int __ATTRS_o_ai
1808 vec_ld(int __a, const unsigned int *__b)
1810 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1813 static vector bool int __ATTRS_o_ai
1814 vec_ld(int __a, const vector bool int *__b)
1816 return (vector bool int)__builtin_altivec_lvx(__a, __b);
1819 static vector float __ATTRS_o_ai
1820 vec_ld(int __a, const vector float *__b)
1822 return (vector float)__builtin_altivec_lvx(__a, __b);
1825 static vector float __ATTRS_o_ai
1826 vec_ld(int __a, const float *__b)
1828 return (vector float)__builtin_altivec_lvx(__a, __b);
1831 /* vec_lvx */
1833 static vector signed char __ATTRS_o_ai
1834 vec_lvx(int __a, const vector signed char *__b)
1836 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1839 static vector signed char __ATTRS_o_ai
1840 vec_lvx(int __a, const signed char *__b)
1842 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1845 static vector unsigned char __ATTRS_o_ai
1846 vec_lvx(int __a, const vector unsigned char *__b)
1848 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1851 static vector unsigned char __ATTRS_o_ai
1852 vec_lvx(int __a, const unsigned char *__b)
1854 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1857 static vector bool char __ATTRS_o_ai
1858 vec_lvx(int __a, const vector bool char *__b)
1860 return (vector bool char)__builtin_altivec_lvx(__a, __b);
1863 static vector short __ATTRS_o_ai
1864 vec_lvx(int __a, const vector short *__b)
1866 return (vector short)__builtin_altivec_lvx(__a, __b);
1869 static vector short __ATTRS_o_ai
1870 vec_lvx(int __a, const short *__b)
1872 return (vector short)__builtin_altivec_lvx(__a, __b);
1875 static vector unsigned short __ATTRS_o_ai
1876 vec_lvx(int __a, const vector unsigned short *__b)
1878 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1881 static vector unsigned short __ATTRS_o_ai
1882 vec_lvx(int __a, const unsigned short *__b)
1884 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1887 static vector bool short __ATTRS_o_ai
1888 vec_lvx(int __a, const vector bool short *__b)
1890 return (vector bool short)__builtin_altivec_lvx(__a, __b);
1893 static vector pixel __ATTRS_o_ai
1894 vec_lvx(int __a, const vector pixel *__b)
1896 return (vector pixel)__builtin_altivec_lvx(__a, __b);
1899 static vector int __ATTRS_o_ai
1900 vec_lvx(int __a, const vector int *__b)
1902 return (vector int)__builtin_altivec_lvx(__a, __b);
1905 static vector int __ATTRS_o_ai
1906 vec_lvx(int __a, const int *__b)
1908 return (vector int)__builtin_altivec_lvx(__a, __b);
1911 static vector unsigned int __ATTRS_o_ai
1912 vec_lvx(int __a, const vector unsigned int *__b)
1914 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1917 static vector unsigned int __ATTRS_o_ai
1918 vec_lvx(int __a, const unsigned int *__b)
1920 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1923 static vector bool int __ATTRS_o_ai
1924 vec_lvx(int __a, const vector bool int *__b)
1926 return (vector bool int)__builtin_altivec_lvx(__a, __b);
1929 static vector float __ATTRS_o_ai
1930 vec_lvx(int __a, const vector float *__b)
1932 return (vector float)__builtin_altivec_lvx(__a, __b);
1935 static vector float __ATTRS_o_ai
1936 vec_lvx(int __a, const float *__b)
1938 return (vector float)__builtin_altivec_lvx(__a, __b);
1941 /* vec_lde */
1943 static vector signed char __ATTRS_o_ai
1944 vec_lde(int __a, const signed char *__b)
1946 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
1949 static vector unsigned char __ATTRS_o_ai
1950 vec_lde(int __a, const unsigned char *__b)
1952 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
1955 static vector short __ATTRS_o_ai
1956 vec_lde(int __a, const short *__b)
1958 return (vector short)__builtin_altivec_lvehx(__a, __b);
1961 static vector unsigned short __ATTRS_o_ai
1962 vec_lde(int __a, const unsigned short *__b)
1964 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
1967 static vector int __ATTRS_o_ai
1968 vec_lde(int __a, const int *__b)
1970 return (vector int)__builtin_altivec_lvewx(__a, __b);
1973 static vector unsigned int __ATTRS_o_ai
1974 vec_lde(int __a, const unsigned int *__b)
1976 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
1979 static vector float __ATTRS_o_ai
1980 vec_lde(int __a, const float *__b)
1982 return (vector float)__builtin_altivec_lvewx(__a, __b);
1985 /* vec_lvebx */
1987 static vector signed char __ATTRS_o_ai
1988 vec_lvebx(int __a, const signed char *__b)
1990 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
1993 static vector unsigned char __ATTRS_o_ai
1994 vec_lvebx(int __a, const unsigned char *__b)
1996 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
1999 /* vec_lvehx */
2001 static vector short __ATTRS_o_ai
2002 vec_lvehx(int __a, const short *__b)
2004 return (vector short)__builtin_altivec_lvehx(__a, __b);
2007 static vector unsigned short __ATTRS_o_ai
2008 vec_lvehx(int __a, const unsigned short *__b)
2010 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
2013 /* vec_lvewx */
2015 static vector int __ATTRS_o_ai
2016 vec_lvewx(int __a, const int *__b)
2018 return (vector int)__builtin_altivec_lvewx(__a, __b);
2021 static vector unsigned int __ATTRS_o_ai
2022 vec_lvewx(int __a, const unsigned int *__b)
2024 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2027 static vector float __ATTRS_o_ai
2028 vec_lvewx(int __a, const float *__b)
2030 return (vector float)__builtin_altivec_lvewx(__a, __b);
2033 /* vec_ldl */
2035 static vector signed char __ATTRS_o_ai
2036 vec_ldl(int __a, const vector signed char *__b)
2038 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2041 static vector signed char __ATTRS_o_ai
2042 vec_ldl(int __a, const signed char *__b)
2044 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2047 static vector unsigned char __ATTRS_o_ai
2048 vec_ldl(int __a, const vector unsigned char *__b)
2050 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2053 static vector unsigned char __ATTRS_o_ai
2054 vec_ldl(int __a, const unsigned char *__b)
2056 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2059 static vector bool char __ATTRS_o_ai
2060 vec_ldl(int __a, const vector bool char *__b)
2062 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2065 static vector short __ATTRS_o_ai
2066 vec_ldl(int __a, const vector short *__b)
2068 return (vector short)__builtin_altivec_lvxl(__a, __b);
2071 static vector short __ATTRS_o_ai
2072 vec_ldl(int __a, const short *__b)
2074 return (vector short)__builtin_altivec_lvxl(__a, __b);
2077 static vector unsigned short __ATTRS_o_ai
2078 vec_ldl(int __a, const vector unsigned short *__b)
2080 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2083 static vector unsigned short __ATTRS_o_ai
2084 vec_ldl(int __a, const unsigned short *__b)
2086 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2089 static vector bool short __ATTRS_o_ai
2090 vec_ldl(int __a, const vector bool short *__b)
2092 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2095 static vector pixel __ATTRS_o_ai
2096 vec_ldl(int __a, const vector pixel *__b)
2098 return (vector pixel short)__builtin_altivec_lvxl(__a, __b);
2101 static vector int __ATTRS_o_ai
2102 vec_ldl(int __a, const vector int *__b)
2104 return (vector int)__builtin_altivec_lvxl(__a, __b);
2107 static vector int __ATTRS_o_ai
2108 vec_ldl(int __a, const int *__b)
2110 return (vector int)__builtin_altivec_lvxl(__a, __b);
2113 static vector unsigned int __ATTRS_o_ai
2114 vec_ldl(int __a, const vector unsigned int *__b)
2116 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2119 static vector unsigned int __ATTRS_o_ai
2120 vec_ldl(int __a, const unsigned int *__b)
2122 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2125 static vector bool int __ATTRS_o_ai
2126 vec_ldl(int __a, const vector bool int *__b)
2128 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2131 static vector float __ATTRS_o_ai
2132 vec_ldl(int __a, const vector float *__b)
2134 return (vector float)__builtin_altivec_lvxl(__a, __b);
2137 static vector float __ATTRS_o_ai
2138 vec_ldl(int __a, const float *__b)
2140 return (vector float)__builtin_altivec_lvxl(__a, __b);
2143 /* vec_lvxl */
2145 static vector signed char __ATTRS_o_ai
2146 vec_lvxl(int __a, const vector signed char *__b)
2148 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2151 static vector signed char __ATTRS_o_ai
2152 vec_lvxl(int __a, const signed char *__b)
2154 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2157 static vector unsigned char __ATTRS_o_ai
2158 vec_lvxl(int __a, const vector unsigned char *__b)
2160 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2163 static vector unsigned char __ATTRS_o_ai
2164 vec_lvxl(int __a, const unsigned char *__b)
2166 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2169 static vector bool char __ATTRS_o_ai
2170 vec_lvxl(int __a, const vector bool char *__b)
2172 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2175 static vector short __ATTRS_o_ai
2176 vec_lvxl(int __a, const vector short *__b)
2178 return (vector short)__builtin_altivec_lvxl(__a, __b);
2181 static vector short __ATTRS_o_ai
2182 vec_lvxl(int __a, const short *__b)
2184 return (vector short)__builtin_altivec_lvxl(__a, __b);
2187 static vector unsigned short __ATTRS_o_ai
2188 vec_lvxl(int __a, const vector unsigned short *__b)
2190 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2193 static vector unsigned short __ATTRS_o_ai
2194 vec_lvxl(int __a, const unsigned short *__b)
2196 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2199 static vector bool short __ATTRS_o_ai
2200 vec_lvxl(int __a, const vector bool short *__b)
2202 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2205 static vector pixel __ATTRS_o_ai
2206 vec_lvxl(int __a, const vector pixel *__b)
2208 return (vector pixel)__builtin_altivec_lvxl(__a, __b);
2211 static vector int __ATTRS_o_ai
2212 vec_lvxl(int __a, const vector int *__b)
2214 return (vector int)__builtin_altivec_lvxl(__a, __b);
2217 static vector int __ATTRS_o_ai
2218 vec_lvxl(int __a, const int *__b)
2220 return (vector int)__builtin_altivec_lvxl(__a, __b);
2223 static vector unsigned int __ATTRS_o_ai
2224 vec_lvxl(int __a, const vector unsigned int *__b)
2226 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2229 static vector unsigned int __ATTRS_o_ai
2230 vec_lvxl(int __a, const unsigned int *__b)
2232 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2235 static vector bool int __ATTRS_o_ai
2236 vec_lvxl(int __a, const vector bool int *__b)
2238 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2241 static vector float __ATTRS_o_ai
2242 vec_lvxl(int __a, const vector float *__b)
2244 return (vector float)__builtin_altivec_lvxl(__a, __b);
2247 static vector float __ATTRS_o_ai
2248 vec_lvxl(int __a, const float *__b)
2250 return (vector float)__builtin_altivec_lvxl(__a, __b);
2253 /* vec_loge */
2255 static vector float __attribute__((__always_inline__))
2256 vec_loge(vector float __a)
2258 return __builtin_altivec_vlogefp(__a);
2261 /* vec_vlogefp */
2263 static vector float __attribute__((__always_inline__))
2264 vec_vlogefp(vector float __a)
2266 return __builtin_altivec_vlogefp(__a);
2269 /* vec_lvsl */
2271 #ifdef __LITTLE_ENDIAN__
2272 static vector unsigned char __ATTRS_o_ai
2273 __attribute__((deprecated("use assignment for unaligned little endian \
2274 loads/stores")))
2275 vec_lvsl(int __a, const signed char *__b)
2277 vector unsigned char mask =
2278 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2279 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2280 return vec_perm(mask, mask, reverse);
2282 #else
2283 static vector unsigned char __ATTRS_o_ai
2284 vec_lvsl(int __a, const signed char *__b)
2286 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2288 #endif
2290 #ifdef __LITTLE_ENDIAN__
2291 static vector unsigned char __ATTRS_o_ai
2292 __attribute__((deprecated("use assignment for unaligned little endian \
2293 loads/stores")))
2294 vec_lvsl(int __a, const unsigned char *__b)
2296 vector unsigned char mask =
2297 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2298 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2299 return vec_perm(mask, mask, reverse);
2301 #else
2302 static vector unsigned char __ATTRS_o_ai
2303 vec_lvsl(int __a, const unsigned char *__b)
2305 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2307 #endif
2309 #ifdef __LITTLE_ENDIAN__
2310 static vector unsigned char __ATTRS_o_ai
2311 __attribute__((deprecated("use assignment for unaligned little endian \
2312 loads/stores")))
2313 vec_lvsl(int __a, const short *__b)
2315 vector unsigned char mask =
2316 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2317 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2318 return vec_perm(mask, mask, reverse);
2320 #else
2321 static vector unsigned char __ATTRS_o_ai
2322 vec_lvsl(int __a, const short *__b)
2324 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2326 #endif
2328 #ifdef __LITTLE_ENDIAN__
2329 static vector unsigned char __ATTRS_o_ai
2330 __attribute__((deprecated("use assignment for unaligned little endian \
2331 loads/stores")))
2332 vec_lvsl(int __a, const unsigned short *__b)
2334 vector unsigned char mask =
2335 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2336 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2337 return vec_perm(mask, mask, reverse);
2339 #else
2340 static vector unsigned char __ATTRS_o_ai
2341 vec_lvsl(int __a, const unsigned short *__b)
2343 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2345 #endif
2347 #ifdef __LITTLE_ENDIAN__
2348 static vector unsigned char __ATTRS_o_ai
2349 __attribute__((deprecated("use assignment for unaligned little endian \
2350 loads/stores")))
2351 vec_lvsl(int __a, const int *__b)
2353 vector unsigned char mask =
2354 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2355 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2356 return vec_perm(mask, mask, reverse);
2358 #else
2359 static vector unsigned char __ATTRS_o_ai
2360 vec_lvsl(int __a, const int *__b)
2362 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2364 #endif
2366 #ifdef __LITTLE_ENDIAN__
2367 static vector unsigned char __ATTRS_o_ai
2368 __attribute__((deprecated("use assignment for unaligned little endian \
2369 loads/stores")))
2370 vec_lvsl(int __a, const unsigned int *__b)
2372 vector unsigned char mask =
2373 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2374 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2375 return vec_perm(mask, mask, reverse);
2377 #else
2378 static vector unsigned char __ATTRS_o_ai
2379 vec_lvsl(int __a, const unsigned int *__b)
2381 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2383 #endif
2385 #ifdef __LITTLE_ENDIAN__
2386 static vector unsigned char __ATTRS_o_ai
2387 __attribute__((deprecated("use assignment for unaligned little endian \
2388 loads/stores")))
2389 vec_lvsl(int __a, const float *__b)
2391 vector unsigned char mask =
2392 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2393 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2394 return vec_perm(mask, mask, reverse);
2396 #else
2397 static vector unsigned char __ATTRS_o_ai
2398 vec_lvsl(int __a, const float *__b)
2400 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2402 #endif
2404 /* vec_lvsr */
2406 #ifdef __LITTLE_ENDIAN__
2407 static vector unsigned char __ATTRS_o_ai
2408 __attribute__((deprecated("use assignment for unaligned little endian \
2409 loads/stores")))
2410 vec_lvsr(int __a, const signed char *__b)
2412 vector unsigned char mask =
2413 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2414 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2415 return vec_perm(mask, mask, reverse);
2417 #else
2418 static vector unsigned char __ATTRS_o_ai
2419 vec_lvsr(int __a, const signed char *__b)
2421 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2423 #endif
2425 #ifdef __LITTLE_ENDIAN__
2426 static vector unsigned char __ATTRS_o_ai
2427 __attribute__((deprecated("use assignment for unaligned little endian \
2428 loads/stores")))
2429 vec_lvsr(int __a, const unsigned char *__b)
2431 vector unsigned char mask =
2432 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2433 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2434 return vec_perm(mask, mask, reverse);
2436 #else
2437 static vector unsigned char __ATTRS_o_ai
2438 vec_lvsr(int __a, const unsigned char *__b)
2440 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2442 #endif
2444 #ifdef __LITTLE_ENDIAN__
2445 static vector unsigned char __ATTRS_o_ai
2446 __attribute__((deprecated("use assignment for unaligned little endian \
2447 loads/stores")))
2448 vec_lvsr(int __a, const short *__b)
2450 vector unsigned char mask =
2451 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2452 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2453 return vec_perm(mask, mask, reverse);
2455 #else
2456 static vector unsigned char __ATTRS_o_ai
2457 vec_lvsr(int __a, const short *__b)
2459 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2461 #endif
2463 #ifdef __LITTLE_ENDIAN__
2464 static vector unsigned char __ATTRS_o_ai
2465 __attribute__((deprecated("use assignment for unaligned little endian \
2466 loads/stores")))
2467 vec_lvsr(int __a, const unsigned short *__b)
2469 vector unsigned char mask =
2470 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2471 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2472 return vec_perm(mask, mask, reverse);
2474 #else
2475 static vector unsigned char __ATTRS_o_ai
2476 vec_lvsr(int __a, const unsigned short *__b)
2478 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2480 #endif
2482 #ifdef __LITTLE_ENDIAN__
2483 static vector unsigned char __ATTRS_o_ai
2484 __attribute__((deprecated("use assignment for unaligned little endian \
2485 loads/stores")))
2486 vec_lvsr(int __a, const int *__b)
2488 vector unsigned char mask =
2489 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2490 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2491 return vec_perm(mask, mask, reverse);
2493 #else
2494 static vector unsigned char __ATTRS_o_ai
2495 vec_lvsr(int __a, const int *__b)
2497 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2499 #endif
2501 #ifdef __LITTLE_ENDIAN__
2502 static vector unsigned char __ATTRS_o_ai
2503 __attribute__((deprecated("use assignment for unaligned little endian \
2504 loads/stores")))
2505 vec_lvsr(int __a, const unsigned int *__b)
2507 vector unsigned char mask =
2508 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2509 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2510 return vec_perm(mask, mask, reverse);
2512 #else
2513 static vector unsigned char __ATTRS_o_ai
2514 vec_lvsr(int __a, const unsigned int *__b)
2516 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2518 #endif
2520 #ifdef __LITTLE_ENDIAN__
2521 static vector unsigned char __ATTRS_o_ai
2522 __attribute__((deprecated("use assignment for unaligned little endian \
2523 loads/stores")))
2524 vec_lvsr(int __a, const float *__b)
2526 vector unsigned char mask =
2527 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2528 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2529 return vec_perm(mask, mask, reverse);
2531 #else
2532 static vector unsigned char __ATTRS_o_ai
2533 vec_lvsr(int __a, const float *__b)
2535 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2537 #endif
2539 /* vec_madd */
2541 static vector float __attribute__((__always_inline__))
2542 vec_madd(vector float __a, vector float __b, vector float __c)
2544 return __builtin_altivec_vmaddfp(__a, __b, __c);
2547 /* vec_vmaddfp */
2549 static vector float __attribute__((__always_inline__))
2550 vec_vmaddfp(vector float __a, vector float __b, vector float __c)
2552 return __builtin_altivec_vmaddfp(__a, __b, __c);
2555 /* vec_madds */
2557 static vector signed short __attribute__((__always_inline__))
2558 vec_madds(vector signed short __a, vector signed short __b, vector signed short __c)
2560 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2563 /* vec_vmhaddshs */
2564 static vector signed short __attribute__((__always_inline__))
2565 vec_vmhaddshs(vector signed short __a,
2566 vector signed short __b,
2567 vector signed short __c)
2569 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2572 /* vec_max */
2574 static vector signed char __ATTRS_o_ai
2575 vec_max(vector signed char __a, vector signed char __b)
2577 return __builtin_altivec_vmaxsb(__a, __b);
2580 static vector signed char __ATTRS_o_ai
2581 vec_max(vector bool char __a, vector signed char __b)
2583 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2586 static vector signed char __ATTRS_o_ai
2587 vec_max(vector signed char __a, vector bool char __b)
2589 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2592 static vector unsigned char __ATTRS_o_ai
2593 vec_max(vector unsigned char __a, vector unsigned char __b)
2595 return __builtin_altivec_vmaxub(__a, __b);
2598 static vector unsigned char __ATTRS_o_ai
2599 vec_max(vector bool char __a, vector unsigned char __b)
2601 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2604 static vector unsigned char __ATTRS_o_ai
2605 vec_max(vector unsigned char __a, vector bool char __b)
2607 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2610 static vector short __ATTRS_o_ai
2611 vec_max(vector short __a, vector short __b)
2613 return __builtin_altivec_vmaxsh(__a, __b);
2616 static vector short __ATTRS_o_ai
2617 vec_max(vector bool short __a, vector short __b)
2619 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2622 static vector short __ATTRS_o_ai
2623 vec_max(vector short __a, vector bool short __b)
2625 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2628 static vector unsigned short __ATTRS_o_ai
2629 vec_max(vector unsigned short __a, vector unsigned short __b)
2631 return __builtin_altivec_vmaxuh(__a, __b);
2634 static vector unsigned short __ATTRS_o_ai
2635 vec_max(vector bool short __a, vector unsigned short __b)
2637 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2640 static vector unsigned short __ATTRS_o_ai
2641 vec_max(vector unsigned short __a, vector bool short __b)
2643 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2646 static vector int __ATTRS_o_ai
2647 vec_max(vector int __a, vector int __b)
2649 return __builtin_altivec_vmaxsw(__a, __b);
2652 static vector int __ATTRS_o_ai
2653 vec_max(vector bool int __a, vector int __b)
2655 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2658 static vector int __ATTRS_o_ai
2659 vec_max(vector int __a, vector bool int __b)
2661 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2664 static vector unsigned int __ATTRS_o_ai
2665 vec_max(vector unsigned int __a, vector unsigned int __b)
2667 return __builtin_altivec_vmaxuw(__a, __b);
2670 static vector unsigned int __ATTRS_o_ai
2671 vec_max(vector bool int __a, vector unsigned int __b)
2673 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2676 static vector unsigned int __ATTRS_o_ai
2677 vec_max(vector unsigned int __a, vector bool int __b)
2679 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2682 static vector float __ATTRS_o_ai
2683 vec_max(vector float __a, vector float __b)
2685 #ifdef __VSX__
2686 return __builtin_vsx_xvmaxsp(__a, __b);
2687 #else
2688 return __builtin_altivec_vmaxfp(__a, __b);
2689 #endif
2692 #ifdef __VSX__
2693 static vector double __ATTRS_o_ai
2694 vec_max(vector double __a, vector double __b)
2696 return __builtin_vsx_xvmaxdp(__a, __b);
2698 #endif
2700 /* vec_vmaxsb */
2702 static vector signed char __ATTRS_o_ai
2703 vec_vmaxsb(vector signed char __a, vector signed char __b)
2705 return __builtin_altivec_vmaxsb(__a, __b);
2708 static vector signed char __ATTRS_o_ai
2709 vec_vmaxsb(vector bool char __a, vector signed char __b)
2711 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2714 static vector signed char __ATTRS_o_ai
2715 vec_vmaxsb(vector signed char __a, vector bool char __b)
2717 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2720 /* vec_vmaxub */
2722 static vector unsigned char __ATTRS_o_ai
2723 vec_vmaxub(vector unsigned char __a, vector unsigned char __b)
2725 return __builtin_altivec_vmaxub(__a, __b);
2728 static vector unsigned char __ATTRS_o_ai
2729 vec_vmaxub(vector bool char __a, vector unsigned char __b)
2731 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2734 static vector unsigned char __ATTRS_o_ai
2735 vec_vmaxub(vector unsigned char __a, vector bool char __b)
2737 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2740 /* vec_vmaxsh */
2742 static vector short __ATTRS_o_ai
2743 vec_vmaxsh(vector short __a, vector short __b)
2745 return __builtin_altivec_vmaxsh(__a, __b);
2748 static vector short __ATTRS_o_ai
2749 vec_vmaxsh(vector bool short __a, vector short __b)
2751 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2754 static vector short __ATTRS_o_ai
2755 vec_vmaxsh(vector short __a, vector bool short __b)
2757 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2760 /* vec_vmaxuh */
2762 static vector unsigned short __ATTRS_o_ai
2763 vec_vmaxuh(vector unsigned short __a, vector unsigned short __b)
2765 return __builtin_altivec_vmaxuh(__a, __b);
2768 static vector unsigned short __ATTRS_o_ai
2769 vec_vmaxuh(vector bool short __a, vector unsigned short __b)
2771 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2774 static vector unsigned short __ATTRS_o_ai
2775 vec_vmaxuh(vector unsigned short __a, vector bool short __b)
2777 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2780 /* vec_vmaxsw */
2782 static vector int __ATTRS_o_ai
2783 vec_vmaxsw(vector int __a, vector int __b)
2785 return __builtin_altivec_vmaxsw(__a, __b);
2788 static vector int __ATTRS_o_ai
2789 vec_vmaxsw(vector bool int __a, vector int __b)
2791 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2794 static vector int __ATTRS_o_ai
2795 vec_vmaxsw(vector int __a, vector bool int __b)
2797 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2800 /* vec_vmaxuw */
2802 static vector unsigned int __ATTRS_o_ai
2803 vec_vmaxuw(vector unsigned int __a, vector unsigned int __b)
2805 return __builtin_altivec_vmaxuw(__a, __b);
2808 static vector unsigned int __ATTRS_o_ai
2809 vec_vmaxuw(vector bool int __a, vector unsigned int __b)
2811 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2814 static vector unsigned int __ATTRS_o_ai
2815 vec_vmaxuw(vector unsigned int __a, vector bool int __b)
2817 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2820 /* vec_vmaxfp */
2822 static vector float __attribute__((__always_inline__))
2823 vec_vmaxfp(vector float __a, vector float __b)
2825 #ifdef __VSX__
2826 return __builtin_vsx_xvmaxsp(__a, __b);
2827 #else
2828 return __builtin_altivec_vmaxfp(__a, __b);
2829 #endif
2832 /* vec_mergeh */
2834 static vector signed char __ATTRS_o_ai
2835 vec_mergeh(vector signed char __a, vector signed char __b)
2837 return vec_perm(__a, __b, (vector unsigned char)
2838 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2839 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2842 static vector unsigned char __ATTRS_o_ai
2843 vec_mergeh(vector unsigned char __a, vector unsigned char __b)
2845 return vec_perm(__a, __b, (vector unsigned char)
2846 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2847 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2850 static vector bool char __ATTRS_o_ai
2851 vec_mergeh(vector bool char __a, vector bool char __b)
2853 return vec_perm(__a, __b, (vector unsigned char)
2854 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2855 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2858 static vector short __ATTRS_o_ai
2859 vec_mergeh(vector short __a, vector short __b)
2861 return vec_perm(__a, __b, (vector unsigned char)
2862 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2863 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2866 static vector unsigned short __ATTRS_o_ai
2867 vec_mergeh(vector unsigned short __a, vector unsigned short __b)
2869 return vec_perm(__a, __b, (vector unsigned char)
2870 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2871 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2874 static vector bool short __ATTRS_o_ai
2875 vec_mergeh(vector bool short __a, vector bool short __b)
2877 return vec_perm(__a, __b, (vector unsigned char)
2878 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2879 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2882 static vector pixel __ATTRS_o_ai
2883 vec_mergeh(vector pixel __a, vector pixel __b)
2885 return vec_perm(__a, __b, (vector unsigned char)
2886 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2887 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2890 static vector int __ATTRS_o_ai
2891 vec_mergeh(vector int __a, vector int __b)
2893 return vec_perm(__a, __b, (vector unsigned char)
2894 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2895 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2898 static vector unsigned int __ATTRS_o_ai
2899 vec_mergeh(vector unsigned int __a, vector unsigned int __b)
2901 return vec_perm(__a, __b, (vector unsigned char)
2902 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2903 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2906 static vector bool int __ATTRS_o_ai
2907 vec_mergeh(vector bool int __a, vector bool int __b)
2909 return vec_perm(__a, __b, (vector unsigned char)
2910 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2911 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2914 static vector float __ATTRS_o_ai
2915 vec_mergeh(vector float __a, vector float __b)
2917 return vec_perm(__a, __b, (vector unsigned char)
2918 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2919 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2922 /* vec_vmrghb */
2924 #define __builtin_altivec_vmrghb vec_vmrghb
2926 static vector signed char __ATTRS_o_ai
2927 vec_vmrghb(vector signed char __a, vector signed char __b)
2929 return vec_perm(__a, __b, (vector unsigned char)
2930 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2931 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2934 static vector unsigned char __ATTRS_o_ai
2935 vec_vmrghb(vector unsigned char __a, vector unsigned char __b)
2937 return vec_perm(__a, __b, (vector unsigned char)
2938 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2939 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2942 static vector bool char __ATTRS_o_ai
2943 vec_vmrghb(vector bool char __a, vector bool char __b)
2945 return vec_perm(__a, __b, (vector unsigned char)
2946 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2947 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2950 /* vec_vmrghh */
2952 #define __builtin_altivec_vmrghh vec_vmrghh
2954 static vector short __ATTRS_o_ai
2955 vec_vmrghh(vector short __a, vector short __b)
2957 return vec_perm(__a, __b, (vector unsigned char)
2958 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2959 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2962 static vector unsigned short __ATTRS_o_ai
2963 vec_vmrghh(vector unsigned short __a, vector unsigned short __b)
2965 return vec_perm(__a, __b, (vector unsigned char)
2966 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2967 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2970 static vector bool short __ATTRS_o_ai
2971 vec_vmrghh(vector bool short __a, vector bool short __b)
2973 return vec_perm(__a, __b, (vector unsigned char)
2974 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2975 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2978 static vector pixel __ATTRS_o_ai
2979 vec_vmrghh(vector pixel __a, vector pixel __b)
2981 return vec_perm(__a, __b, (vector unsigned char)
2982 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2983 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2986 /* vec_vmrghw */
2988 #define __builtin_altivec_vmrghw vec_vmrghw
2990 static vector int __ATTRS_o_ai
2991 vec_vmrghw(vector int __a, vector int __b)
2993 return vec_perm(__a, __b, (vector unsigned char)
2994 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2995 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2998 static vector unsigned int __ATTRS_o_ai
2999 vec_vmrghw(vector unsigned int __a, vector unsigned int __b)
3001 return vec_perm(__a, __b, (vector unsigned char)
3002 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3003 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3006 static vector bool int __ATTRS_o_ai
3007 vec_vmrghw(vector bool int __a, vector bool int __b)
3009 return vec_perm(__a, __b, (vector unsigned char)
3010 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3011 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3014 static vector float __ATTRS_o_ai
3015 vec_vmrghw(vector float __a, vector float __b)
3017 return vec_perm(__a, __b, (vector unsigned char)
3018 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3019 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3022 /* vec_mergel */
3024 static vector signed char __ATTRS_o_ai
3025 vec_mergel(vector signed char __a, vector signed char __b)
3027 return vec_perm(__a, __b, (vector unsigned char)
3028 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3029 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3032 static vector unsigned char __ATTRS_o_ai
3033 vec_mergel(vector unsigned char __a, vector unsigned char __b)
3035 return vec_perm(__a, __b, (vector unsigned char)
3036 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3037 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3040 static vector bool char __ATTRS_o_ai
3041 vec_mergel(vector bool char __a, vector bool char __b)
3043 return vec_perm(__a, __b, (vector unsigned char)
3044 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3045 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3048 static vector short __ATTRS_o_ai
3049 vec_mergel(vector short __a, vector short __b)
3051 return vec_perm(__a, __b, (vector unsigned char)
3052 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3053 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3056 static vector unsigned short __ATTRS_o_ai
3057 vec_mergel(vector unsigned short __a, vector unsigned short __b)
3059 return vec_perm(__a, __b, (vector unsigned char)
3060 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3061 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3064 static vector bool short __ATTRS_o_ai
3065 vec_mergel(vector bool short __a, vector bool short __b)
3067 return vec_perm(__a, __b, (vector unsigned char)
3068 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3069 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3072 static vector pixel __ATTRS_o_ai
3073 vec_mergel(vector pixel __a, vector pixel __b)
3075 return vec_perm(__a, __b, (vector unsigned char)
3076 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3077 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3080 static vector int __ATTRS_o_ai
3081 vec_mergel(vector int __a, vector int __b)
3083 return vec_perm(__a, __b, (vector unsigned char)
3084 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3085 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3088 static vector unsigned int __ATTRS_o_ai
3089 vec_mergel(vector unsigned int __a, vector unsigned int __b)
3091 return vec_perm(__a, __b, (vector unsigned char)
3092 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3093 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3096 static vector bool int __ATTRS_o_ai
3097 vec_mergel(vector bool int __a, vector bool int __b)
3099 return vec_perm(__a, __b, (vector unsigned char)
3100 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3101 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3104 static vector float __ATTRS_o_ai
3105 vec_mergel(vector float __a, vector float __b)
3107 return vec_perm(__a, __b, (vector unsigned char)
3108 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3109 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3112 /* vec_vmrglb */
3114 #define __builtin_altivec_vmrglb vec_vmrglb
3116 static vector signed char __ATTRS_o_ai
3117 vec_vmrglb(vector signed char __a, vector signed char __b)
3119 return vec_perm(__a, __b, (vector unsigned char)
3120 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3121 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3124 static vector unsigned char __ATTRS_o_ai
3125 vec_vmrglb(vector unsigned char __a, vector unsigned char __b)
3127 return vec_perm(__a, __b, (vector unsigned char)
3128 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3129 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3132 static vector bool char __ATTRS_o_ai
3133 vec_vmrglb(vector bool char __a, vector bool char __b)
3135 return vec_perm(__a, __b, (vector unsigned char)
3136 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3137 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3140 /* vec_vmrglh */
3142 #define __builtin_altivec_vmrglh vec_vmrglh
3144 static vector short __ATTRS_o_ai
3145 vec_vmrglh(vector short __a, vector short __b)
3147 return vec_perm(__a, __b, (vector unsigned char)
3148 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3149 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3152 static vector unsigned short __ATTRS_o_ai
3153 vec_vmrglh(vector unsigned short __a, vector unsigned short __b)
3155 return vec_perm(__a, __b, (vector unsigned char)
3156 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3157 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3160 static vector bool short __ATTRS_o_ai
3161 vec_vmrglh(vector bool short __a, vector bool short __b)
3163 return vec_perm(__a, __b, (vector unsigned char)
3164 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3165 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3168 static vector pixel __ATTRS_o_ai
3169 vec_vmrglh(vector pixel __a, vector pixel __b)
3171 return vec_perm(__a, __b, (vector unsigned char)
3172 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3173 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3176 /* vec_vmrglw */
3178 #define __builtin_altivec_vmrglw vec_vmrglw
3180 static vector int __ATTRS_o_ai
3181 vec_vmrglw(vector int __a, vector int __b)
3183 return vec_perm(__a, __b, (vector unsigned char)
3184 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3185 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3188 static vector unsigned int __ATTRS_o_ai
3189 vec_vmrglw(vector unsigned int __a, vector unsigned int __b)
3191 return vec_perm(__a, __b, (vector unsigned char)
3192 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3193 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3196 static vector bool int __ATTRS_o_ai
3197 vec_vmrglw(vector bool int __a, vector bool int __b)
3199 return vec_perm(__a, __b, (vector unsigned char)
3200 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3201 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3204 static vector float __ATTRS_o_ai
3205 vec_vmrglw(vector float __a, vector float __b)
3207 return vec_perm(__a, __b, (vector unsigned char)
3208 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3209 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3212 /* vec_mfvscr */
3214 static vector unsigned short __attribute__((__always_inline__))
3215 vec_mfvscr(void)
3217 return __builtin_altivec_mfvscr();
3220 /* vec_min */
3222 static vector signed char __ATTRS_o_ai
3223 vec_min(vector signed char __a, vector signed char __b)
3225 return __builtin_altivec_vminsb(__a, __b);
3228 static vector signed char __ATTRS_o_ai
3229 vec_min(vector bool char __a, vector signed char __b)
3231 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3234 static vector signed char __ATTRS_o_ai
3235 vec_min(vector signed char __a, vector bool char __b)
3237 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3240 static vector unsigned char __ATTRS_o_ai
3241 vec_min(vector unsigned char __a, vector unsigned char __b)
3243 return __builtin_altivec_vminub(__a, __b);
3246 static vector unsigned char __ATTRS_o_ai
3247 vec_min(vector bool char __a, vector unsigned char __b)
3249 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3252 static vector unsigned char __ATTRS_o_ai
3253 vec_min(vector unsigned char __a, vector bool char __b)
3255 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3258 static vector short __ATTRS_o_ai
3259 vec_min(vector short __a, vector short __b)
3261 return __builtin_altivec_vminsh(__a, __b);
3264 static vector short __ATTRS_o_ai
3265 vec_min(vector bool short __a, vector short __b)
3267 return __builtin_altivec_vminsh((vector short)__a, __b);
3270 static vector short __ATTRS_o_ai
3271 vec_min(vector short __a, vector bool short __b)
3273 return __builtin_altivec_vminsh(__a, (vector short)__b);
3276 static vector unsigned short __ATTRS_o_ai
3277 vec_min(vector unsigned short __a, vector unsigned short __b)
3279 return __builtin_altivec_vminuh(__a, __b);
3282 static vector unsigned short __ATTRS_o_ai
3283 vec_min(vector bool short __a, vector unsigned short __b)
3285 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3288 static vector unsigned short __ATTRS_o_ai
3289 vec_min(vector unsigned short __a, vector bool short __b)
3291 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3294 static vector int __ATTRS_o_ai
3295 vec_min(vector int __a, vector int __b)
3297 return __builtin_altivec_vminsw(__a, __b);
3300 static vector int __ATTRS_o_ai
3301 vec_min(vector bool int __a, vector int __b)
3303 return __builtin_altivec_vminsw((vector int)__a, __b);
3306 static vector int __ATTRS_o_ai
3307 vec_min(vector int __a, vector bool int __b)
3309 return __builtin_altivec_vminsw(__a, (vector int)__b);
3312 static vector unsigned int __ATTRS_o_ai
3313 vec_min(vector unsigned int __a, vector unsigned int __b)
3315 return __builtin_altivec_vminuw(__a, __b);
3318 static vector unsigned int __ATTRS_o_ai
3319 vec_min(vector bool int __a, vector unsigned int __b)
3321 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3324 static vector unsigned int __ATTRS_o_ai
3325 vec_min(vector unsigned int __a, vector bool int __b)
3327 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3330 static vector float __ATTRS_o_ai
3331 vec_min(vector float __a, vector float __b)
3333 #ifdef __VSX__
3334 return __builtin_vsx_xvminsp(__a, __b);
3335 #else
3336 return __builtin_altivec_vminfp(__a, __b);
3337 #endif
3340 #ifdef __VSX__
3341 static vector double __ATTRS_o_ai
3342 vec_min(vector double __a, vector double __b)
3344 return __builtin_vsx_xvmindp(__a, __b);
3346 #endif
3348 /* vec_vminsb */
3350 static vector signed char __ATTRS_o_ai
3351 vec_vminsb(vector signed char __a, vector signed char __b)
3353 return __builtin_altivec_vminsb(__a, __b);
3356 static vector signed char __ATTRS_o_ai
3357 vec_vminsb(vector bool char __a, vector signed char __b)
3359 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3362 static vector signed char __ATTRS_o_ai
3363 vec_vminsb(vector signed char __a, vector bool char __b)
3365 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3368 /* vec_vminub */
3370 static vector unsigned char __ATTRS_o_ai
3371 vec_vminub(vector unsigned char __a, vector unsigned char __b)
3373 return __builtin_altivec_vminub(__a, __b);
3376 static vector unsigned char __ATTRS_o_ai
3377 vec_vminub(vector bool char __a, vector unsigned char __b)
3379 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3382 static vector unsigned char __ATTRS_o_ai
3383 vec_vminub(vector unsigned char __a, vector bool char __b)
3385 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3388 /* vec_vminsh */
3390 static vector short __ATTRS_o_ai
3391 vec_vminsh(vector short __a, vector short __b)
3393 return __builtin_altivec_vminsh(__a, __b);
3396 static vector short __ATTRS_o_ai
3397 vec_vminsh(vector bool short __a, vector short __b)
3399 return __builtin_altivec_vminsh((vector short)__a, __b);
3402 static vector short __ATTRS_o_ai
3403 vec_vminsh(vector short __a, vector bool short __b)
3405 return __builtin_altivec_vminsh(__a, (vector short)__b);
3408 /* vec_vminuh */
3410 static vector unsigned short __ATTRS_o_ai
3411 vec_vminuh(vector unsigned short __a, vector unsigned short __b)
3413 return __builtin_altivec_vminuh(__a, __b);
3416 static vector unsigned short __ATTRS_o_ai
3417 vec_vminuh(vector bool short __a, vector unsigned short __b)
3419 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3422 static vector unsigned short __ATTRS_o_ai
3423 vec_vminuh(vector unsigned short __a, vector bool short __b)
3425 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3428 /* vec_vminsw */
3430 static vector int __ATTRS_o_ai
3431 vec_vminsw(vector int __a, vector int __b)
3433 return __builtin_altivec_vminsw(__a, __b);
3436 static vector int __ATTRS_o_ai
3437 vec_vminsw(vector bool int __a, vector int __b)
3439 return __builtin_altivec_vminsw((vector int)__a, __b);
3442 static vector int __ATTRS_o_ai
3443 vec_vminsw(vector int __a, vector bool int __b)
3445 return __builtin_altivec_vminsw(__a, (vector int)__b);
3448 /* vec_vminuw */
3450 static vector unsigned int __ATTRS_o_ai
3451 vec_vminuw(vector unsigned int __a, vector unsigned int __b)
3453 return __builtin_altivec_vminuw(__a, __b);
3456 static vector unsigned int __ATTRS_o_ai
3457 vec_vminuw(vector bool int __a, vector unsigned int __b)
3459 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3462 static vector unsigned int __ATTRS_o_ai
3463 vec_vminuw(vector unsigned int __a, vector bool int __b)
3465 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3468 /* vec_vminfp */
3470 static vector float __attribute__((__always_inline__))
3471 vec_vminfp(vector float __a, vector float __b)
3473 #ifdef __VSX__
3474 return __builtin_vsx_xvminsp(__a, __b);
3475 #else
3476 return __builtin_altivec_vminfp(__a, __b);
3477 #endif
3480 /* vec_mladd */
3482 #define __builtin_altivec_vmladduhm vec_mladd
3484 static vector short __ATTRS_o_ai
3485 vec_mladd(vector short __a, vector short __b, vector short __c)
3487 return __a * __b + __c;
3490 static vector short __ATTRS_o_ai
3491 vec_mladd(vector short __a, vector unsigned short __b, vector unsigned short __c)
3493 return __a * (vector short)__b + (vector short)__c;
3496 static vector short __ATTRS_o_ai
3497 vec_mladd(vector unsigned short __a, vector short __b, vector short __c)
3499 return (vector short)__a * __b + __c;
3502 static vector unsigned short __ATTRS_o_ai
3503 vec_mladd(vector unsigned short __a,
3504 vector unsigned short __b,
3505 vector unsigned short __c)
3507 return __a * __b + __c;
3510 /* vec_vmladduhm */
3512 static vector short __ATTRS_o_ai
3513 vec_vmladduhm(vector short __a, vector short __b, vector short __c)
3515 return __a * __b + __c;
3518 static vector short __ATTRS_o_ai
3519 vec_vmladduhm(vector short __a, vector unsigned short __b, vector unsigned short __c)
3521 return __a * (vector short)__b + (vector short)__c;
3524 static vector short __ATTRS_o_ai
3525 vec_vmladduhm(vector unsigned short __a, vector short __b, vector short __c)
3527 return (vector short)__a * __b + __c;
3530 static vector unsigned short __ATTRS_o_ai
3531 vec_vmladduhm(vector unsigned short __a,
3532 vector unsigned short __b,
3533 vector unsigned short __c)
3535 return __a * __b + __c;
3538 /* vec_mradds */
3540 static vector short __attribute__((__always_inline__))
3541 vec_mradds(vector short __a, vector short __b, vector short __c)
3543 return __builtin_altivec_vmhraddshs(__a, __b, __c);
3546 /* vec_vmhraddshs */
3548 static vector short __attribute__((__always_inline__))
3549 vec_vmhraddshs(vector short __a, vector short __b, vector short __c)
3551 return __builtin_altivec_vmhraddshs(__a, __b, __c);
3554 /* vec_msum */
3556 static vector int __ATTRS_o_ai
3557 vec_msum(vector signed char __a, vector unsigned char __b, vector int __c)
3559 return __builtin_altivec_vmsummbm(__a, __b, __c);
3562 static vector unsigned int __ATTRS_o_ai
3563 vec_msum(vector unsigned char __a, vector unsigned char __b, vector unsigned int __c)
3565 return __builtin_altivec_vmsumubm(__a, __b, __c);
3568 static vector int __ATTRS_o_ai
3569 vec_msum(vector short __a, vector short __b, vector int __c)
3571 return __builtin_altivec_vmsumshm(__a, __b, __c);
3574 static vector unsigned int __ATTRS_o_ai
3575 vec_msum(vector unsigned short __a,
3576 vector unsigned short __b,
3577 vector unsigned int __c)
3579 return __builtin_altivec_vmsumuhm(__a, __b, __c);
3582 /* vec_vmsummbm */
3584 static vector int __attribute__((__always_inline__))
3585 vec_vmsummbm(vector signed char __a, vector unsigned char __b, vector int __c)
3587 return __builtin_altivec_vmsummbm(__a, __b, __c);
3590 /* vec_vmsumubm */
3592 static vector unsigned int __attribute__((__always_inline__))
3593 vec_vmsumubm(vector unsigned char __a,
3594 vector unsigned char __b,
3595 vector unsigned int __c)
3597 return __builtin_altivec_vmsumubm(__a, __b, __c);
3600 /* vec_vmsumshm */
3602 static vector int __attribute__((__always_inline__))
3603 vec_vmsumshm(vector short __a, vector short __b, vector int __c)
3605 return __builtin_altivec_vmsumshm(__a, __b, __c);
3608 /* vec_vmsumuhm */
3610 static vector unsigned int __attribute__((__always_inline__))
3611 vec_vmsumuhm(vector unsigned short __a,
3612 vector unsigned short __b,
3613 vector unsigned int __c)
3615 return __builtin_altivec_vmsumuhm(__a, __b, __c);
3618 /* vec_msums */
3620 static vector int __ATTRS_o_ai
3621 vec_msums(vector short __a, vector short __b, vector int __c)
3623 return __builtin_altivec_vmsumshs(__a, __b, __c);
3626 static vector unsigned int __ATTRS_o_ai
3627 vec_msums(vector unsigned short __a,
3628 vector unsigned short __b,
3629 vector unsigned int __c)
3631 return __builtin_altivec_vmsumuhs(__a, __b, __c);
3634 /* vec_vmsumshs */
3636 static vector int __attribute__((__always_inline__))
3637 vec_vmsumshs(vector short __a, vector short __b, vector int __c)
3639 return __builtin_altivec_vmsumshs(__a, __b, __c);
3642 /* vec_vmsumuhs */
3644 static vector unsigned int __attribute__((__always_inline__))
3645 vec_vmsumuhs(vector unsigned short __a,
3646 vector unsigned short __b,
3647 vector unsigned int __c)
3649 return __builtin_altivec_vmsumuhs(__a, __b, __c);
3652 /* vec_mtvscr */
3654 static void __ATTRS_o_ai
3655 vec_mtvscr(vector signed char __a)
3657 __builtin_altivec_mtvscr((vector int)__a);
3660 static void __ATTRS_o_ai
3661 vec_mtvscr(vector unsigned char __a)
3663 __builtin_altivec_mtvscr((vector int)__a);
3666 static void __ATTRS_o_ai
3667 vec_mtvscr(vector bool char __a)
3669 __builtin_altivec_mtvscr((vector int)__a);
3672 static void __ATTRS_o_ai
3673 vec_mtvscr(vector short __a)
3675 __builtin_altivec_mtvscr((vector int)__a);
3678 static void __ATTRS_o_ai
3679 vec_mtvscr(vector unsigned short __a)
3681 __builtin_altivec_mtvscr((vector int)__a);
3684 static void __ATTRS_o_ai
3685 vec_mtvscr(vector bool short __a)
3687 __builtin_altivec_mtvscr((vector int)__a);
3690 static void __ATTRS_o_ai
3691 vec_mtvscr(vector pixel __a)
3693 __builtin_altivec_mtvscr((vector int)__a);
3696 static void __ATTRS_o_ai
3697 vec_mtvscr(vector int __a)
3699 __builtin_altivec_mtvscr((vector int)__a);
3702 static void __ATTRS_o_ai
3703 vec_mtvscr(vector unsigned int __a)
3705 __builtin_altivec_mtvscr((vector int)__a);
3708 static void __ATTRS_o_ai
3709 vec_mtvscr(vector bool int __a)
3711 __builtin_altivec_mtvscr((vector int)__a);
3714 static void __ATTRS_o_ai
3715 vec_mtvscr(vector float __a)
3717 __builtin_altivec_mtvscr((vector int)__a);
3720 /* The vmulos* and vmules* instructions have a big endian bias, so
3721 we must reverse the meaning of "even" and "odd" for little endian. */
3723 /* vec_mule */
3725 static vector short __ATTRS_o_ai
3726 vec_mule(vector signed char __a, vector signed char __b)
3728 #ifdef __LITTLE_ENDIAN__
3729 return __builtin_altivec_vmulosb(__a, __b);
3730 #else
3731 return __builtin_altivec_vmulesb(__a, __b);
3732 #endif
3735 static vector unsigned short __ATTRS_o_ai
3736 vec_mule(vector unsigned char __a, vector unsigned char __b)
3738 #ifdef __LITTLE_ENDIAN__
3739 return __builtin_altivec_vmuloub(__a, __b);
3740 #else
3741 return __builtin_altivec_vmuleub(__a, __b);
3742 #endif
3745 static vector int __ATTRS_o_ai
3746 vec_mule(vector short __a, vector short __b)
3748 #ifdef __LITTLE_ENDIAN__
3749 return __builtin_altivec_vmulosh(__a, __b);
3750 #else
3751 return __builtin_altivec_vmulesh(__a, __b);
3752 #endif
3755 static vector unsigned int __ATTRS_o_ai
3756 vec_mule(vector unsigned short __a, vector unsigned short __b)
3758 #ifdef __LITTLE_ENDIAN__
3759 return __builtin_altivec_vmulouh(__a, __b);
3760 #else
3761 return __builtin_altivec_vmuleuh(__a, __b);
3762 #endif
3765 /* vec_vmulesb */
3767 static vector short __attribute__((__always_inline__))
3768 vec_vmulesb(vector signed char __a, vector signed char __b)
3770 #ifdef __LITTLE_ENDIAN__
3771 return __builtin_altivec_vmulosb(__a, __b);
3772 #else
3773 return __builtin_altivec_vmulesb(__a, __b);
3774 #endif
3777 /* vec_vmuleub */
3779 static vector unsigned short __attribute__((__always_inline__))
3780 vec_vmuleub(vector unsigned char __a, vector unsigned char __b)
3782 #ifdef __LITTLE_ENDIAN__
3783 return __builtin_altivec_vmuloub(__a, __b);
3784 #else
3785 return __builtin_altivec_vmuleub(__a, __b);
3786 #endif
3789 /* vec_vmulesh */
3791 static vector int __attribute__((__always_inline__))
3792 vec_vmulesh(vector short __a, vector short __b)
3794 #ifdef __LITTLE_ENDIAN__
3795 return __builtin_altivec_vmulosh(__a, __b);
3796 #else
3797 return __builtin_altivec_vmulesh(__a, __b);
3798 #endif
3801 /* vec_vmuleuh */
3803 static vector unsigned int __attribute__((__always_inline__))
3804 vec_vmuleuh(vector unsigned short __a, vector unsigned short __b)
3806 #ifdef __LITTLE_ENDIAN__
3807 return __builtin_altivec_vmulouh(__a, __b);
3808 #else
3809 return __builtin_altivec_vmuleuh(__a, __b);
3810 #endif
3813 /* vec_mulo */
3815 static vector short __ATTRS_o_ai
3816 vec_mulo(vector signed char __a, vector signed char __b)
3818 #ifdef __LITTLE_ENDIAN__
3819 return __builtin_altivec_vmulesb(__a, __b);
3820 #else
3821 return __builtin_altivec_vmulosb(__a, __b);
3822 #endif
3825 static vector unsigned short __ATTRS_o_ai
3826 vec_mulo(vector unsigned char __a, vector unsigned char __b)
3828 #ifdef __LITTLE_ENDIAN__
3829 return __builtin_altivec_vmuleub(__a, __b);
3830 #else
3831 return __builtin_altivec_vmuloub(__a, __b);
3832 #endif
3835 static vector int __ATTRS_o_ai
3836 vec_mulo(vector short __a, vector short __b)
3838 #ifdef __LITTLE_ENDIAN__
3839 return __builtin_altivec_vmulesh(__a, __b);
3840 #else
3841 return __builtin_altivec_vmulosh(__a, __b);
3842 #endif
3845 static vector unsigned int __ATTRS_o_ai
3846 vec_mulo(vector unsigned short __a, vector unsigned short __b)
3848 #ifdef __LITTLE_ENDIAN__
3849 return __builtin_altivec_vmuleuh(__a, __b);
3850 #else
3851 return __builtin_altivec_vmulouh(__a, __b);
3852 #endif
3855 /* vec_vmulosb */
3857 static vector short __attribute__((__always_inline__))
3858 vec_vmulosb(vector signed char __a, vector signed char __b)
3860 #ifdef __LITTLE_ENDIAN__
3861 return __builtin_altivec_vmulesb(__a, __b);
3862 #else
3863 return __builtin_altivec_vmulosb(__a, __b);
3864 #endif
3867 /* vec_vmuloub */
3869 static vector unsigned short __attribute__((__always_inline__))
3870 vec_vmuloub(vector unsigned char __a, vector unsigned char __b)
3872 #ifdef __LITTLE_ENDIAN__
3873 return __builtin_altivec_vmuleub(__a, __b);
3874 #else
3875 return __builtin_altivec_vmuloub(__a, __b);
3876 #endif
3879 /* vec_vmulosh */
3881 static vector int __attribute__((__always_inline__))
3882 vec_vmulosh(vector short __a, vector short __b)
3884 #ifdef __LITTLE_ENDIAN__
3885 return __builtin_altivec_vmulesh(__a, __b);
3886 #else
3887 return __builtin_altivec_vmulosh(__a, __b);
3888 #endif
3891 /* vec_vmulouh */
3893 static vector unsigned int __attribute__((__always_inline__))
3894 vec_vmulouh(vector unsigned short __a, vector unsigned short __b)
3896 #ifdef __LITTLE_ENDIAN__
3897 return __builtin_altivec_vmuleuh(__a, __b);
3898 #else
3899 return __builtin_altivec_vmulouh(__a, __b);
3900 #endif
3903 /* vec_nmsub */
3905 static vector float __attribute__((__always_inline__))
3906 vec_nmsub(vector float __a, vector float __b, vector float __c)
3908 return __builtin_altivec_vnmsubfp(__a, __b, __c);
3911 /* vec_vnmsubfp */
3913 static vector float __attribute__((__always_inline__))
3914 vec_vnmsubfp(vector float __a, vector float __b, vector float __c)
3916 return __builtin_altivec_vnmsubfp(__a, __b, __c);
3919 /* vec_nor */
3921 #define __builtin_altivec_vnor vec_nor
3923 static vector signed char __ATTRS_o_ai
3924 vec_nor(vector signed char __a, vector signed char __b)
3926 return ~(__a | __b);
3929 static vector unsigned char __ATTRS_o_ai
3930 vec_nor(vector unsigned char __a, vector unsigned char __b)
3932 return ~(__a | __b);
3935 static vector bool char __ATTRS_o_ai
3936 vec_nor(vector bool char __a, vector bool char __b)
3938 return ~(__a | __b);
3941 static vector short __ATTRS_o_ai
3942 vec_nor(vector short __a, vector short __b)
3944 return ~(__a | __b);
3947 static vector unsigned short __ATTRS_o_ai
3948 vec_nor(vector unsigned short __a, vector unsigned short __b)
3950 return ~(__a | __b);
3953 static vector bool short __ATTRS_o_ai
3954 vec_nor(vector bool short __a, vector bool short __b)
3956 return ~(__a | __b);
3959 static vector int __ATTRS_o_ai
3960 vec_nor(vector int __a, vector int __b)
3962 return ~(__a | __b);
3965 static vector unsigned int __ATTRS_o_ai
3966 vec_nor(vector unsigned int __a, vector unsigned int __b)
3968 return ~(__a | __b);
3971 static vector bool int __ATTRS_o_ai
3972 vec_nor(vector bool int __a, vector bool int __b)
3974 return ~(__a | __b);
3977 static vector float __ATTRS_o_ai
3978 vec_nor(vector float __a, vector float __b)
3980 vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b);
3981 return (vector float)__res;
3984 /* vec_vnor */
3986 static vector signed char __ATTRS_o_ai
3987 vec_vnor(vector signed char __a, vector signed char __b)
3989 return ~(__a | __b);
3992 static vector unsigned char __ATTRS_o_ai
3993 vec_vnor(vector unsigned char __a, vector unsigned char __b)
3995 return ~(__a | __b);
3998 static vector bool char __ATTRS_o_ai
3999 vec_vnor(vector bool char __a, vector bool char __b)
4001 return ~(__a | __b);
4004 static vector short __ATTRS_o_ai
4005 vec_vnor(vector short __a, vector short __b)
4007 return ~(__a | __b);
4010 static vector unsigned short __ATTRS_o_ai
4011 vec_vnor(vector unsigned short __a, vector unsigned short __b)
4013 return ~(__a | __b);
4016 static vector bool short __ATTRS_o_ai
4017 vec_vnor(vector bool short __a, vector bool short __b)
4019 return ~(__a | __b);
4022 static vector int __ATTRS_o_ai
4023 vec_vnor(vector int __a, vector int __b)
4025 return ~(__a | __b);
4028 static vector unsigned int __ATTRS_o_ai
4029 vec_vnor(vector unsigned int __a, vector unsigned int __b)
4031 return ~(__a | __b);
4034 static vector bool int __ATTRS_o_ai
4035 vec_vnor(vector bool int __a, vector bool int __b)
4037 return ~(__a | __b);
4040 static vector float __ATTRS_o_ai
4041 vec_vnor(vector float __a, vector float __b)
4043 vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b);
4044 return (vector float)__res;
4047 /* vec_or */
4049 #define __builtin_altivec_vor vec_or
4051 static vector signed char __ATTRS_o_ai
4052 vec_or(vector signed char __a, vector signed char __b)
4054 return __a | __b;
4057 static vector signed char __ATTRS_o_ai
4058 vec_or(vector bool char __a, vector signed char __b)
4060 return (vector signed char)__a | __b;
4063 static vector signed char __ATTRS_o_ai
4064 vec_or(vector signed char __a, vector bool char __b)
4066 return __a | (vector signed char)__b;
4069 static vector unsigned char __ATTRS_o_ai
4070 vec_or(vector unsigned char __a, vector unsigned char __b)
4072 return __a | __b;
4075 static vector unsigned char __ATTRS_o_ai
4076 vec_or(vector bool char __a, vector unsigned char __b)
4078 return (vector unsigned char)__a | __b;
4081 static vector unsigned char __ATTRS_o_ai
4082 vec_or(vector unsigned char __a, vector bool char __b)
4084 return __a | (vector unsigned char)__b;
4087 static vector bool char __ATTRS_o_ai
4088 vec_or(vector bool char __a, vector bool char __b)
4090 return __a | __b;
4093 static vector short __ATTRS_o_ai
4094 vec_or(vector short __a, vector short __b)
4096 return __a | __b;
4099 static vector short __ATTRS_o_ai
4100 vec_or(vector bool short __a, vector short __b)
4102 return (vector short)__a | __b;
4105 static vector short __ATTRS_o_ai
4106 vec_or(vector short __a, vector bool short __b)
4108 return __a | (vector short)__b;
4111 static vector unsigned short __ATTRS_o_ai
4112 vec_or(vector unsigned short __a, vector unsigned short __b)
4114 return __a | __b;
4117 static vector unsigned short __ATTRS_o_ai
4118 vec_or(vector bool short __a, vector unsigned short __b)
4120 return (vector unsigned short)__a | __b;
4123 static vector unsigned short __ATTRS_o_ai
4124 vec_or(vector unsigned short __a, vector bool short __b)
4126 return __a | (vector unsigned short)__b;
4129 static vector bool short __ATTRS_o_ai
4130 vec_or(vector bool short __a, vector bool short __b)
4132 return __a | __b;
4135 static vector int __ATTRS_o_ai
4136 vec_or(vector int __a, vector int __b)
4138 return __a | __b;
4141 static vector int __ATTRS_o_ai
4142 vec_or(vector bool int __a, vector int __b)
4144 return (vector int)__a | __b;
4147 static vector int __ATTRS_o_ai
4148 vec_or(vector int __a, vector bool int __b)
4150 return __a | (vector int)__b;
4153 static vector unsigned int __ATTRS_o_ai
4154 vec_or(vector unsigned int __a, vector unsigned int __b)
4156 return __a | __b;
4159 static vector unsigned int __ATTRS_o_ai
4160 vec_or(vector bool int __a, vector unsigned int __b)
4162 return (vector unsigned int)__a | __b;
4165 static vector unsigned int __ATTRS_o_ai
4166 vec_or(vector unsigned int __a, vector bool int __b)
4168 return __a | (vector unsigned int)__b;
4171 static vector bool int __ATTRS_o_ai
4172 vec_or(vector bool int __a, vector bool int __b)
4174 return __a | __b;
4177 static vector float __ATTRS_o_ai
4178 vec_or(vector float __a, vector float __b)
4180 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4181 return (vector float)__res;
4184 static vector float __ATTRS_o_ai
4185 vec_or(vector bool int __a, vector float __b)
4187 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4188 return (vector float)__res;
4191 static vector float __ATTRS_o_ai
4192 vec_or(vector float __a, vector bool int __b)
4194 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4195 return (vector float)__res;
4198 /* vec_vor */
4200 static vector signed char __ATTRS_o_ai
4201 vec_vor(vector signed char __a, vector signed char __b)
4203 return __a | __b;
4206 static vector signed char __ATTRS_o_ai
4207 vec_vor(vector bool char __a, vector signed char __b)
4209 return (vector signed char)__a | __b;
4212 static vector signed char __ATTRS_o_ai
4213 vec_vor(vector signed char __a, vector bool char __b)
4215 return __a | (vector signed char)__b;
4218 static vector unsigned char __ATTRS_o_ai
4219 vec_vor(vector unsigned char __a, vector unsigned char __b)
4221 return __a | __b;
4224 static vector unsigned char __ATTRS_o_ai
4225 vec_vor(vector bool char __a, vector unsigned char __b)
4227 return (vector unsigned char)__a | __b;
4230 static vector unsigned char __ATTRS_o_ai
4231 vec_vor(vector unsigned char __a, vector bool char __b)
4233 return __a | (vector unsigned char)__b;
4236 static vector bool char __ATTRS_o_ai
4237 vec_vor(vector bool char __a, vector bool char __b)
4239 return __a | __b;
4242 static vector short __ATTRS_o_ai
4243 vec_vor(vector short __a, vector short __b)
4245 return __a | __b;
4248 static vector short __ATTRS_o_ai
4249 vec_vor(vector bool short __a, vector short __b)
4251 return (vector short)__a | __b;
4254 static vector short __ATTRS_o_ai
4255 vec_vor(vector short __a, vector bool short __b)
4257 return __a | (vector short)__b;
4260 static vector unsigned short __ATTRS_o_ai
4261 vec_vor(vector unsigned short __a, vector unsigned short __b)
4263 return __a | __b;
4266 static vector unsigned short __ATTRS_o_ai
4267 vec_vor(vector bool short __a, vector unsigned short __b)
4269 return (vector unsigned short)__a | __b;
4272 static vector unsigned short __ATTRS_o_ai
4273 vec_vor(vector unsigned short __a, vector bool short __b)
4275 return __a | (vector unsigned short)__b;
4278 static vector bool short __ATTRS_o_ai
4279 vec_vor(vector bool short __a, vector bool short __b)
4281 return __a | __b;
4284 static vector int __ATTRS_o_ai
4285 vec_vor(vector int __a, vector int __b)
4287 return __a | __b;
4290 static vector int __ATTRS_o_ai
4291 vec_vor(vector bool int __a, vector int __b)
4293 return (vector int)__a | __b;
4296 static vector int __ATTRS_o_ai
4297 vec_vor(vector int __a, vector bool int __b)
4299 return __a | (vector int)__b;
4302 static vector unsigned int __ATTRS_o_ai
4303 vec_vor(vector unsigned int __a, vector unsigned int __b)
4305 return __a | __b;
4308 static vector unsigned int __ATTRS_o_ai
4309 vec_vor(vector bool int __a, vector unsigned int __b)
4311 return (vector unsigned int)__a | __b;
4314 static vector unsigned int __ATTRS_o_ai
4315 vec_vor(vector unsigned int __a, vector bool int __b)
4317 return __a | (vector unsigned int)__b;
4320 static vector bool int __ATTRS_o_ai
4321 vec_vor(vector bool int __a, vector bool int __b)
4323 return __a | __b;
4326 static vector float __ATTRS_o_ai
4327 vec_vor(vector float __a, vector float __b)
4329 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4330 return (vector float)__res;
4333 static vector float __ATTRS_o_ai
4334 vec_vor(vector bool int __a, vector float __b)
4336 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4337 return (vector float)__res;
4340 static vector float __ATTRS_o_ai
4341 vec_vor(vector float __a, vector bool int __b)
4343 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4344 return (vector float)__res;
4347 /* vec_pack */
4349 /* The various vector pack instructions have a big-endian bias, so for
4350 little endian we must handle reversed element numbering. */
4352 static vector signed char __ATTRS_o_ai
4353 vec_pack(vector signed short __a, vector signed short __b)
4355 #ifdef __LITTLE_ENDIAN__
4356 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4357 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4358 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4359 #else
4360 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4361 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4362 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4363 #endif
4366 static vector unsigned char __ATTRS_o_ai
4367 vec_pack(vector unsigned short __a, vector unsigned short __b)
4369 #ifdef __LITTLE_ENDIAN__
4370 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4371 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4372 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4373 #else
4374 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4375 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4376 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4377 #endif
4380 static vector bool char __ATTRS_o_ai
4381 vec_pack(vector bool short __a, vector bool short __b)
4383 #ifdef __LITTLE_ENDIAN__
4384 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4385 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4386 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4387 #else
4388 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4389 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4390 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4391 #endif
4394 static vector short __ATTRS_o_ai
4395 vec_pack(vector int __a, vector int __b)
4397 #ifdef __LITTLE_ENDIAN__
4398 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4399 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4400 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4401 #else
4402 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4403 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4404 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4405 #endif
4408 static vector unsigned short __ATTRS_o_ai
4409 vec_pack(vector unsigned int __a, vector unsigned int __b)
4411 #ifdef __LITTLE_ENDIAN__
4412 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4413 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4414 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4415 #else
4416 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4417 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4418 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4419 #endif
4422 static vector bool short __ATTRS_o_ai
4423 vec_pack(vector bool int __a, vector bool int __b)
4425 #ifdef __LITTLE_ENDIAN__
4426 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4427 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4428 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4429 #else
4430 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4431 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4432 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4433 #endif
4436 /* vec_vpkuhum */
4438 #define __builtin_altivec_vpkuhum vec_vpkuhum
4440 static vector signed char __ATTRS_o_ai
4441 vec_vpkuhum(vector signed short __a, vector signed short __b)
4443 #ifdef __LITTLE_ENDIAN__
4444 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4445 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4446 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4447 #else
4448 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4449 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4450 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4451 #endif
4454 static vector unsigned char __ATTRS_o_ai
4455 vec_vpkuhum(vector unsigned short __a, vector unsigned short __b)
4457 #ifdef __LITTLE_ENDIAN__
4458 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4459 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4460 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4461 #else
4462 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4463 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4464 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4465 #endif
4468 static vector bool char __ATTRS_o_ai
4469 vec_vpkuhum(vector bool short __a, vector bool short __b)
4471 #ifdef __LITTLE_ENDIAN__
4472 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4473 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4474 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4475 #else
4476 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4477 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4478 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4479 #endif
4482 /* vec_vpkuwum */
4484 #define __builtin_altivec_vpkuwum vec_vpkuwum
4486 static vector short __ATTRS_o_ai
4487 vec_vpkuwum(vector int __a, vector int __b)
4489 #ifdef __LITTLE_ENDIAN__
4490 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4491 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4492 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4493 #else
4494 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4495 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4496 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4497 #endif
4500 static vector unsigned short __ATTRS_o_ai
4501 vec_vpkuwum(vector unsigned int __a, vector unsigned int __b)
4503 #ifdef __LITTLE_ENDIAN__
4504 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4505 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4506 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4507 #else
4508 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4509 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4510 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4511 #endif
4514 static vector bool short __ATTRS_o_ai
4515 vec_vpkuwum(vector bool int __a, vector bool int __b)
4517 #ifdef __LITTLE_ENDIAN__
4518 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4519 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4520 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4521 #else
4522 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4523 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4524 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4525 #endif
4528 /* vec_packpx */
4530 static vector pixel __attribute__((__always_inline__))
4531 vec_packpx(vector unsigned int __a, vector unsigned int __b)
4533 #ifdef __LITTLE_ENDIAN__
4534 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4535 #else
4536 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4537 #endif
4540 /* vec_vpkpx */
4542 static vector pixel __attribute__((__always_inline__))
4543 vec_vpkpx(vector unsigned int __a, vector unsigned int __b)
4545 #ifdef __LITTLE_ENDIAN__
4546 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4547 #else
4548 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4549 #endif
4552 /* vec_packs */
4554 static vector signed char __ATTRS_o_ai
4555 vec_packs(vector short __a, vector short __b)
4557 #ifdef __LITTLE_ENDIAN__
4558 return __builtin_altivec_vpkshss(__b, __a);
4559 #else
4560 return __builtin_altivec_vpkshss(__a, __b);
4561 #endif
4564 static vector unsigned char __ATTRS_o_ai
4565 vec_packs(vector unsigned short __a, vector unsigned short __b)
4567 #ifdef __LITTLE_ENDIAN__
4568 return __builtin_altivec_vpkuhus(__b, __a);
4569 #else
4570 return __builtin_altivec_vpkuhus(__a, __b);
4571 #endif
4574 static vector signed short __ATTRS_o_ai
4575 vec_packs(vector int __a, vector int __b)
4577 #ifdef __LITTLE_ENDIAN__
4578 return __builtin_altivec_vpkswss(__b, __a);
4579 #else
4580 return __builtin_altivec_vpkswss(__a, __b);
4581 #endif
4584 static vector unsigned short __ATTRS_o_ai
4585 vec_packs(vector unsigned int __a, vector unsigned int __b)
4587 #ifdef __LITTLE_ENDIAN__
4588 return __builtin_altivec_vpkuwus(__b, __a);
4589 #else
4590 return __builtin_altivec_vpkuwus(__a, __b);
4591 #endif
4594 /* vec_vpkshss */
4596 static vector signed char __attribute__((__always_inline__))
4597 vec_vpkshss(vector short __a, vector short __b)
4599 #ifdef __LITTLE_ENDIAN__
4600 return __builtin_altivec_vpkshss(__b, __a);
4601 #else
4602 return __builtin_altivec_vpkshss(__a, __b);
4603 #endif
4606 /* vec_vpkuhus */
4608 static vector unsigned char __attribute__((__always_inline__))
4609 vec_vpkuhus(vector unsigned short __a, vector unsigned short __b)
4611 #ifdef __LITTLE_ENDIAN__
4612 return __builtin_altivec_vpkuhus(__b, __a);
4613 #else
4614 return __builtin_altivec_vpkuhus(__a, __b);
4615 #endif
4618 /* vec_vpkswss */
4620 static vector signed short __attribute__((__always_inline__))
4621 vec_vpkswss(vector int __a, vector int __b)
4623 #ifdef __LITTLE_ENDIAN__
4624 return __builtin_altivec_vpkswss(__b, __a);
4625 #else
4626 return __builtin_altivec_vpkswss(__a, __b);
4627 #endif
4630 /* vec_vpkuwus */
4632 static vector unsigned short __attribute__((__always_inline__))
4633 vec_vpkuwus(vector unsigned int __a, vector unsigned int __b)
4635 #ifdef __LITTLE_ENDIAN__
4636 return __builtin_altivec_vpkuwus(__b, __a);
4637 #else
4638 return __builtin_altivec_vpkuwus(__a, __b);
4639 #endif
4642 /* vec_packsu */
4644 static vector unsigned char __ATTRS_o_ai
4645 vec_packsu(vector short __a, vector short __b)
4647 #ifdef __LITTLE_ENDIAN__
4648 return __builtin_altivec_vpkshus(__b, __a);
4649 #else
4650 return __builtin_altivec_vpkshus(__a, __b);
4651 #endif
4654 static vector unsigned char __ATTRS_o_ai
4655 vec_packsu(vector unsigned short __a, vector unsigned short __b)
4657 #ifdef __LITTLE_ENDIAN__
4658 return __builtin_altivec_vpkuhus(__b, __a);
4659 #else
4660 return __builtin_altivec_vpkuhus(__a, __b);
4661 #endif
4664 static vector unsigned short __ATTRS_o_ai
4665 vec_packsu(vector int __a, vector int __b)
4667 #ifdef __LITTLE_ENDIAN__
4668 return __builtin_altivec_vpkswus(__b, __a);
4669 #else
4670 return __builtin_altivec_vpkswus(__a, __b);
4671 #endif
4674 static vector unsigned short __ATTRS_o_ai
4675 vec_packsu(vector unsigned int __a, vector unsigned int __b)
4677 #ifdef __LITTLE_ENDIAN__
4678 return __builtin_altivec_vpkuwus(__b, __a);
4679 #else
4680 return __builtin_altivec_vpkuwus(__a, __b);
4681 #endif
4684 /* vec_vpkshus */
4686 static vector unsigned char __ATTRS_o_ai
4687 vec_vpkshus(vector short __a, vector short __b)
4689 #ifdef __LITTLE_ENDIAN__
4690 return __builtin_altivec_vpkshus(__b, __a);
4691 #else
4692 return __builtin_altivec_vpkshus(__a, __b);
4693 #endif
4696 static vector unsigned char __ATTRS_o_ai
4697 vec_vpkshus(vector unsigned short __a, vector unsigned short __b)
4699 #ifdef __LITTLE_ENDIAN__
4700 return __builtin_altivec_vpkuhus(__b, __a);
4701 #else
4702 return __builtin_altivec_vpkuhus(__a, __b);
4703 #endif
4706 /* vec_vpkswus */
4708 static vector unsigned short __ATTRS_o_ai
4709 vec_vpkswus(vector int __a, vector int __b)
4711 #ifdef __LITTLE_ENDIAN__
4712 return __builtin_altivec_vpkswus(__b, __a);
4713 #else
4714 return __builtin_altivec_vpkswus(__a, __b);
4715 #endif
4718 static vector unsigned short __ATTRS_o_ai
4719 vec_vpkswus(vector unsigned int __a, vector unsigned int __b)
4721 #ifdef __LITTLE_ENDIAN__
4722 return __builtin_altivec_vpkuwus(__b, __a);
4723 #else
4724 return __builtin_altivec_vpkuwus(__a, __b);
4725 #endif
4728 /* vec_perm */
4730 // The vperm instruction is defined architecturally with a big-endian bias.
4731 // For little endian, we swap the input operands and invert the permute
4732 // control vector. Only the rightmost 5 bits matter, so we could use
4733 // a vector of all 31s instead of all 255s to perform the inversion.
4734 // However, when the PCV is not a constant, using 255 has an advantage
4735 // in that the vec_xor can be recognized as a vec_nor (and for P8 and
4736 // later, possibly a vec_nand).
4738 static vector signed char __ATTRS_o_ai
4739 vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c)
4741 #ifdef __LITTLE_ENDIAN__
4742 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4743 255,255,255,255,255,255,255,255};
4744 __d = vec_xor(__c, __d);
4745 return (vector signed char)
4746 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4747 #else
4748 return (vector signed char)
4749 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4750 #endif
4753 static vector unsigned char __ATTRS_o_ai
4754 vec_perm(vector unsigned char __a,
4755 vector unsigned char __b,
4756 vector unsigned char __c)
4758 #ifdef __LITTLE_ENDIAN__
4759 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4760 255,255,255,255,255,255,255,255};
4761 __d = vec_xor(__c, __d);
4762 return (vector unsigned char)
4763 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4764 #else
4765 return (vector unsigned char)
4766 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4767 #endif
4770 static vector bool char __ATTRS_o_ai
4771 vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c)
4773 #ifdef __LITTLE_ENDIAN__
4774 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4775 255,255,255,255,255,255,255,255};
4776 __d = vec_xor(__c, __d);
4777 return (vector bool char)
4778 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4779 #else
4780 return (vector bool char)
4781 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4782 #endif
4785 static vector short __ATTRS_o_ai
4786 vec_perm(vector short __a, vector short __b, vector unsigned char __c)
4788 #ifdef __LITTLE_ENDIAN__
4789 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4790 255,255,255,255,255,255,255,255};
4791 __d = vec_xor(__c, __d);
4792 return (vector short)
4793 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4794 #else
4795 return (vector short)
4796 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4797 #endif
4800 static vector unsigned short __ATTRS_o_ai
4801 vec_perm(vector unsigned short __a,
4802 vector unsigned short __b,
4803 vector unsigned char __c)
4805 #ifdef __LITTLE_ENDIAN__
4806 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4807 255,255,255,255,255,255,255,255};
4808 __d = vec_xor(__c, __d);
4809 return (vector unsigned short)
4810 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4811 #else
4812 return (vector unsigned short)
4813 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4814 #endif
4817 static vector bool short __ATTRS_o_ai
4818 vec_perm(vector bool short __a, vector bool short __b, vector unsigned char __c)
4820 #ifdef __LITTLE_ENDIAN__
4821 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4822 255,255,255,255,255,255,255,255};
4823 __d = vec_xor(__c, __d);
4824 return (vector bool short)
4825 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4826 #else
4827 return (vector bool short)
4828 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4829 #endif
4832 static vector pixel __ATTRS_o_ai
4833 vec_perm(vector pixel __a, vector pixel __b, vector unsigned char __c)
4835 #ifdef __LITTLE_ENDIAN__
4836 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4837 255,255,255,255,255,255,255,255};
4838 __d = vec_xor(__c, __d);
4839 return (vector pixel)
4840 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4841 #else
4842 return (vector pixel)
4843 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4844 #endif
4847 static vector int __ATTRS_o_ai
4848 vec_perm(vector int __a, vector int __b, vector unsigned char __c)
4850 #ifdef __LITTLE_ENDIAN__
4851 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4852 255,255,255,255,255,255,255,255};
4853 __d = vec_xor(__c, __d);
4854 return (vector int)__builtin_altivec_vperm_4si(__b, __a, __d);
4855 #else
4856 return (vector int)__builtin_altivec_vperm_4si(__a, __b, __c);
4857 #endif
4860 static vector unsigned int __ATTRS_o_ai
4861 vec_perm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c)
4863 #ifdef __LITTLE_ENDIAN__
4864 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4865 255,255,255,255,255,255,255,255};
4866 __d = vec_xor(__c, __d);
4867 return (vector unsigned int)
4868 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4869 #else
4870 return (vector unsigned int)
4871 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4872 #endif
4875 static vector bool int __ATTRS_o_ai
4876 vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c)
4878 #ifdef __LITTLE_ENDIAN__
4879 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4880 255,255,255,255,255,255,255,255};
4881 __d = vec_xor(__c, __d);
4882 return (vector bool int)
4883 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4884 #else
4885 return (vector bool int)
4886 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4887 #endif
4890 static vector float __ATTRS_o_ai
4891 vec_perm(vector float __a, vector float __b, vector unsigned char __c)
4893 #ifdef __LITTLE_ENDIAN__
4894 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4895 255,255,255,255,255,255,255,255};
4896 __d = vec_xor(__c, __d);
4897 return (vector float)
4898 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4899 #else
4900 return (vector float)
4901 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4902 #endif
4905 #ifdef __VSX__
4906 static vector long long __ATTRS_o_ai
4907 vec_perm(vector long long __a, vector long long __b, vector unsigned char __c)
4909 #ifdef __LITTLE_ENDIAN__
4910 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4911 255,255,255,255,255,255,255,255};
4912 __d = vec_xor(__c, __d);
4913 return (vector long long)__builtin_altivec_vperm_4si(__b, __a, __d);
4914 #else
4915 return (vector long long)__builtin_altivec_vperm_4si(__a, __b, __c);
4916 #endif
4919 static vector unsigned long long __ATTRS_o_ai
4920 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
4921 vector unsigned char __c)
4923 #ifdef __LITTLE_ENDIAN__
4924 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4925 255,255,255,255,255,255,255,255};
4926 __d = vec_xor(__c, __d);
4927 return (vector unsigned long long)
4928 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4929 #else
4930 return (vector unsigned long long)
4931 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4932 #endif
4935 static vector double __ATTRS_o_ai
4936 vec_perm(vector double __a, vector double __b, vector unsigned char __c)
4938 #ifdef __LITTLE_ENDIAN__
4939 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4940 255,255,255,255,255,255,255,255};
4941 __d = vec_xor(__c, __d);
4942 return (vector double)
4943 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4944 #else
4945 return (vector double)
4946 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4947 #endif
4949 #endif
4951 /* vec_vperm */
4953 static vector signed char __ATTRS_o_ai
4954 vec_vperm(vector signed char __a, vector signed char __b, vector unsigned char __c)
4956 return vec_perm(__a, __b, __c);
4959 static vector unsigned char __ATTRS_o_ai
4960 vec_vperm(vector unsigned char __a,
4961 vector unsigned char __b,
4962 vector unsigned char __c)
4964 return vec_perm(__a, __b, __c);
4967 static vector bool char __ATTRS_o_ai
4968 vec_vperm(vector bool char __a, vector bool char __b, vector unsigned char __c)
4970 return vec_perm(__a, __b, __c);
4973 static vector short __ATTRS_o_ai
4974 vec_vperm(vector short __a, vector short __b, vector unsigned char __c)
4976 return vec_perm(__a, __b, __c);
4979 static vector unsigned short __ATTRS_o_ai
4980 vec_vperm(vector unsigned short __a,
4981 vector unsigned short __b,
4982 vector unsigned char __c)
4984 return vec_perm(__a, __b, __c);
4987 static vector bool short __ATTRS_o_ai
4988 vec_vperm(vector bool short __a, vector bool short __b, vector unsigned char __c)
4990 return vec_perm(__a, __b, __c);
4993 static vector pixel __ATTRS_o_ai
4994 vec_vperm(vector pixel __a, vector pixel __b, vector unsigned char __c)
4996 return vec_perm(__a, __b, __c);
4999 static vector int __ATTRS_o_ai
5000 vec_vperm(vector int __a, vector int __b, vector unsigned char __c)
5002 return vec_perm(__a, __b, __c);
5005 static vector unsigned int __ATTRS_o_ai
5006 vec_vperm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c)
5008 return vec_perm(__a, __b, __c);
5011 static vector bool int __ATTRS_o_ai
5012 vec_vperm(vector bool int __a, vector bool int __b, vector unsigned char __c)
5014 return vec_perm(__a, __b, __c);
5017 static vector float __ATTRS_o_ai
5018 vec_vperm(vector float __a, vector float __b, vector unsigned char __c)
5020 return vec_perm(__a, __b, __c);
5023 #ifdef __VSX__
5024 static vector long long __ATTRS_o_ai
5025 vec_vperm(vector long long __a, vector long long __b, vector unsigned char __c)
5027 return vec_perm(__a, __b, __c);
5030 static vector unsigned long long __ATTRS_o_ai
5031 vec_vperm(vector unsigned long long __a, vector unsigned long long __b,
5032 vector unsigned char __c)
5034 return vec_perm(__a, __b, __c);
5037 static vector double __ATTRS_o_ai
5038 vec_vperm(vector double __a, vector double __b, vector unsigned char __c)
5040 return vec_perm(__a, __b, __c);
5042 #endif
5044 /* vec_re */
5046 static vector float __attribute__((__always_inline__))
5047 vec_re(vector float __a)
5049 return __builtin_altivec_vrefp(__a);
5052 /* vec_vrefp */
5054 static vector float __attribute__((__always_inline__))
5055 vec_vrefp(vector float __a)
5057 return __builtin_altivec_vrefp(__a);
5060 /* vec_rl */
5062 static vector signed char __ATTRS_o_ai
5063 vec_rl(vector signed char __a, vector unsigned char __b)
5065 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
5068 static vector unsigned char __ATTRS_o_ai
5069 vec_rl(vector unsigned char __a, vector unsigned char __b)
5071 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
5074 static vector short __ATTRS_o_ai
5075 vec_rl(vector short __a, vector unsigned short __b)
5077 return __builtin_altivec_vrlh(__a, __b);
5080 static vector unsigned short __ATTRS_o_ai
5081 vec_rl(vector unsigned short __a, vector unsigned short __b)
5083 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
5086 static vector int __ATTRS_o_ai
5087 vec_rl(vector int __a, vector unsigned int __b)
5089 return __builtin_altivec_vrlw(__a, __b);
5092 static vector unsigned int __ATTRS_o_ai
5093 vec_rl(vector unsigned int __a, vector unsigned int __b)
5095 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
5098 /* vec_vrlb */
5100 static vector signed char __ATTRS_o_ai
5101 vec_vrlb(vector signed char __a, vector unsigned char __b)
5103 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
5106 static vector unsigned char __ATTRS_o_ai
5107 vec_vrlb(vector unsigned char __a, vector unsigned char __b)
5109 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
5112 /* vec_vrlh */
5114 static vector short __ATTRS_o_ai
5115 vec_vrlh(vector short __a, vector unsigned short __b)
5117 return __builtin_altivec_vrlh(__a, __b);
5120 static vector unsigned short __ATTRS_o_ai
5121 vec_vrlh(vector unsigned short __a, vector unsigned short __b)
5123 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
5126 /* vec_vrlw */
5128 static vector int __ATTRS_o_ai
5129 vec_vrlw(vector int __a, vector unsigned int __b)
5131 return __builtin_altivec_vrlw(__a, __b);
5134 static vector unsigned int __ATTRS_o_ai
5135 vec_vrlw(vector unsigned int __a, vector unsigned int __b)
5137 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
5140 /* vec_round */
5142 static vector float __attribute__((__always_inline__))
5143 vec_round(vector float __a)
5145 return __builtin_altivec_vrfin(__a);
5148 /* vec_vrfin */
5150 static vector float __attribute__((__always_inline__))
5151 vec_vrfin(vector float __a)
5153 return __builtin_altivec_vrfin(__a);
5156 /* vec_rsqrte */
5158 static __vector float __attribute__((__always_inline__))
5159 vec_rsqrte(vector float __a)
5161 return __builtin_altivec_vrsqrtefp(__a);
5164 /* vec_vrsqrtefp */
5166 static __vector float __attribute__((__always_inline__))
5167 vec_vrsqrtefp(vector float __a)
5169 return __builtin_altivec_vrsqrtefp(__a);
5172 /* vec_sel */
5174 #define __builtin_altivec_vsel_4si vec_sel
5176 static vector signed char __ATTRS_o_ai
5177 vec_sel(vector signed char __a, vector signed char __b, vector unsigned char __c)
5179 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5182 static vector signed char __ATTRS_o_ai
5183 vec_sel(vector signed char __a, vector signed char __b, vector bool char __c)
5185 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5188 static vector unsigned char __ATTRS_o_ai
5189 vec_sel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c)
5191 return (__a & ~__c) | (__b & __c);
5194 static vector unsigned char __ATTRS_o_ai
5195 vec_sel(vector unsigned char __a, vector unsigned char __b, vector bool char __c)
5197 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
5200 static vector bool char __ATTRS_o_ai
5201 vec_sel(vector bool char __a, vector bool char __b, vector unsigned char __c)
5203 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
5206 static vector bool char __ATTRS_o_ai
5207 vec_sel(vector bool char __a, vector bool char __b, vector bool char __c)
5209 return (__a & ~__c) | (__b & __c);
5212 static vector short __ATTRS_o_ai
5213 vec_sel(vector short __a, vector short __b, vector unsigned short __c)
5215 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5218 static vector short __ATTRS_o_ai
5219 vec_sel(vector short __a, vector short __b, vector bool short __c)
5221 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5224 static vector unsigned short __ATTRS_o_ai
5225 vec_sel(vector unsigned short __a,
5226 vector unsigned short __b,
5227 vector unsigned short __c)
5229 return (__a & ~__c) | (__b & __c);
5232 static vector unsigned short __ATTRS_o_ai
5233 vec_sel(vector unsigned short __a, vector unsigned short __b, vector bool short __c)
5235 return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c);
5238 static vector bool short __ATTRS_o_ai
5239 vec_sel(vector bool short __a, vector bool short __b, vector unsigned short __c)
5241 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
5244 static vector bool short __ATTRS_o_ai
5245 vec_sel(vector bool short __a, vector bool short __b, vector bool short __c)
5247 return (__a & ~__c) | (__b & __c);
5250 static vector int __ATTRS_o_ai
5251 vec_sel(vector int __a, vector int __b, vector unsigned int __c)
5253 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5256 static vector int __ATTRS_o_ai
5257 vec_sel(vector int __a, vector int __b, vector bool int __c)
5259 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5262 static vector unsigned int __ATTRS_o_ai
5263 vec_sel(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c)
5265 return (__a & ~__c) | (__b & __c);
5268 static vector unsigned int __ATTRS_o_ai
5269 vec_sel(vector unsigned int __a, vector unsigned int __b, vector bool int __c)
5271 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
5274 static vector bool int __ATTRS_o_ai
5275 vec_sel(vector bool int __a, vector bool int __b, vector unsigned int __c)
5277 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
5280 static vector bool int __ATTRS_o_ai
5281 vec_sel(vector bool int __a, vector bool int __b, vector bool int __c)
5283 return (__a & ~__c) | (__b & __c);
5286 static vector float __ATTRS_o_ai
5287 vec_sel(vector float __a, vector float __b, vector unsigned int __c)
5289 vector int __res = ((vector int)__a & ~(vector int)__c)
5290 | ((vector int)__b & (vector int)__c);
5291 return (vector float)__res;
5294 static vector float __ATTRS_o_ai
5295 vec_sel(vector float __a, vector float __b, vector bool int __c)
5297 vector int __res = ((vector int)__a & ~(vector int)__c)
5298 | ((vector int)__b & (vector int)__c);
5299 return (vector float)__res;
5302 /* vec_vsel */
5304 static vector signed char __ATTRS_o_ai
5305 vec_vsel(vector signed char __a, vector signed char __b, vector unsigned char __c)
5307 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5310 static vector signed char __ATTRS_o_ai
5311 vec_vsel(vector signed char __a, vector signed char __b, vector bool char __c)
5313 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5316 static vector unsigned char __ATTRS_o_ai
5317 vec_vsel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c)
5319 return (__a & ~__c) | (__b & __c);
5322 static vector unsigned char __ATTRS_o_ai
5323 vec_vsel(vector unsigned char __a, vector unsigned char __b, vector bool char __c)
5325 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
5328 static vector bool char __ATTRS_o_ai
5329 vec_vsel(vector bool char __a, vector bool char __b, vector unsigned char __c)
5331 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
5334 static vector bool char __ATTRS_o_ai
5335 vec_vsel(vector bool char __a, vector bool char __b, vector bool char __c)
5337 return (__a & ~__c) | (__b & __c);
5340 static vector short __ATTRS_o_ai
5341 vec_vsel(vector short __a, vector short __b, vector unsigned short __c)
5343 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5346 static vector short __ATTRS_o_ai
5347 vec_vsel(vector short __a, vector short __b, vector bool short __c)
5349 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5352 static vector unsigned short __ATTRS_o_ai
5353 vec_vsel(vector unsigned short __a,
5354 vector unsigned short __b,
5355 vector unsigned short __c)
5357 return (__a & ~__c) | (__b & __c);
5360 static vector unsigned short __ATTRS_o_ai
5361 vec_vsel(vector unsigned short __a, vector unsigned short __b, vector bool short __c)
5363 return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c);
5366 static vector bool short __ATTRS_o_ai
5367 vec_vsel(vector bool short __a, vector bool short __b, vector unsigned short __c)
5369 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
5372 static vector bool short __ATTRS_o_ai
5373 vec_vsel(vector bool short __a, vector bool short __b, vector bool short __c)
5375 return (__a & ~__c) | (__b & __c);
5378 static vector int __ATTRS_o_ai
5379 vec_vsel(vector int __a, vector int __b, vector unsigned int __c)
5381 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5384 static vector int __ATTRS_o_ai
5385 vec_vsel(vector int __a, vector int __b, vector bool int __c)
5387 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5390 static vector unsigned int __ATTRS_o_ai
5391 vec_vsel(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c)
5393 return (__a & ~__c) | (__b & __c);
5396 static vector unsigned int __ATTRS_o_ai
5397 vec_vsel(vector unsigned int __a, vector unsigned int __b, vector bool int __c)
5399 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
5402 static vector bool int __ATTRS_o_ai
5403 vec_vsel(vector bool int __a, vector bool int __b, vector unsigned int __c)
5405 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
5408 static vector bool int __ATTRS_o_ai
5409 vec_vsel(vector bool int __a, vector bool int __b, vector bool int __c)
5411 return (__a & ~__c) | (__b & __c);
5414 static vector float __ATTRS_o_ai
5415 vec_vsel(vector float __a, vector float __b, vector unsigned int __c)
5417 vector int __res = ((vector int)__a & ~(vector int)__c)
5418 | ((vector int)__b & (vector int)__c);
5419 return (vector float)__res;
5422 static vector float __ATTRS_o_ai
5423 vec_vsel(vector float __a, vector float __b, vector bool int __c)
5425 vector int __res = ((vector int)__a & ~(vector int)__c)
5426 | ((vector int)__b & (vector int)__c);
5427 return (vector float)__res;
5430 /* vec_sl */
5432 static vector signed char __ATTRS_o_ai
5433 vec_sl(vector signed char __a, vector unsigned char __b)
5435 return __a << (vector signed char)__b;
5438 static vector unsigned char __ATTRS_o_ai
5439 vec_sl(vector unsigned char __a, vector unsigned char __b)
5441 return __a << __b;
5444 static vector short __ATTRS_o_ai
5445 vec_sl(vector short __a, vector unsigned short __b)
5447 return __a << (vector short)__b;
5450 static vector unsigned short __ATTRS_o_ai
5451 vec_sl(vector unsigned short __a, vector unsigned short __b)
5453 return __a << __b;
5456 static vector int __ATTRS_o_ai
5457 vec_sl(vector int __a, vector unsigned int __b)
5459 return __a << (vector int)__b;
5462 static vector unsigned int __ATTRS_o_ai
5463 vec_sl(vector unsigned int __a, vector unsigned int __b)
5465 return __a << __b;
5468 /* vec_vslb */
5470 #define __builtin_altivec_vslb vec_vslb
5472 static vector signed char __ATTRS_o_ai
5473 vec_vslb(vector signed char __a, vector unsigned char __b)
5475 return vec_sl(__a, __b);
5478 static vector unsigned char __ATTRS_o_ai
5479 vec_vslb(vector unsigned char __a, vector unsigned char __b)
5481 return vec_sl(__a, __b);
5484 /* vec_vslh */
5486 #define __builtin_altivec_vslh vec_vslh
5488 static vector short __ATTRS_o_ai
5489 vec_vslh(vector short __a, vector unsigned short __b)
5491 return vec_sl(__a, __b);
5494 static vector unsigned short __ATTRS_o_ai
5495 vec_vslh(vector unsigned short __a, vector unsigned short __b)
5497 return vec_sl(__a, __b);
5500 /* vec_vslw */
5502 #define __builtin_altivec_vslw vec_vslw
5504 static vector int __ATTRS_o_ai
5505 vec_vslw(vector int __a, vector unsigned int __b)
5507 return vec_sl(__a, __b);
5510 static vector unsigned int __ATTRS_o_ai
5511 vec_vslw(vector unsigned int __a, vector unsigned int __b)
5513 return vec_sl(__a, __b);
5516 /* vec_sld */
5518 #define __builtin_altivec_vsldoi_4si vec_sld
5520 static vector signed char __ATTRS_o_ai
5521 vec_sld(vector signed char __a, vector signed char __b, unsigned char __c)
5523 return vec_perm(__a, __b, (vector unsigned char)
5524 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5525 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5528 static vector unsigned char __ATTRS_o_ai
5529 vec_sld(vector unsigned char __a, vector unsigned char __b, unsigned char __c)
5531 return vec_perm(__a, __b, (vector unsigned char)
5532 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5533 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5536 static vector short __ATTRS_o_ai
5537 vec_sld(vector short __a, vector short __b, unsigned char __c)
5539 return vec_perm(__a, __b, (vector unsigned char)
5540 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5541 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5544 static vector unsigned short __ATTRS_o_ai
5545 vec_sld(vector unsigned short __a, vector unsigned short __b, unsigned char __c)
5547 return vec_perm(__a, __b, (vector unsigned char)
5548 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5549 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5552 static vector pixel __ATTRS_o_ai
5553 vec_sld(vector pixel __a, vector pixel __b, unsigned char __c)
5555 return vec_perm(__a, __b, (vector unsigned char)
5556 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5557 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5560 static vector int __ATTRS_o_ai
5561 vec_sld(vector int __a, vector int __b, unsigned char __c)
5563 return vec_perm(__a, __b, (vector unsigned char)
5564 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5565 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5568 static vector unsigned int __ATTRS_o_ai
5569 vec_sld(vector unsigned int __a, vector unsigned int __b, unsigned char __c)
5571 return vec_perm(__a, __b, (vector unsigned char)
5572 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5573 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5576 static vector float __ATTRS_o_ai
5577 vec_sld(vector float __a, vector float __b, unsigned char __c)
5579 return vec_perm(__a, __b, (vector unsigned char)
5580 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5581 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5584 /* vec_vsldoi */
5586 static vector signed char __ATTRS_o_ai
5587 vec_vsldoi(vector signed char __a, vector signed char __b, unsigned char __c)
5589 return vec_perm(__a, __b, (vector unsigned char)
5590 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5591 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5594 static vector unsigned char __ATTRS_o_ai
5595 vec_vsldoi(vector unsigned char __a, vector unsigned char __b, unsigned char __c)
5597 return vec_perm(__a, __b, (vector unsigned char)
5598 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5599 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5602 static vector short __ATTRS_o_ai
5603 vec_vsldoi(vector short __a, vector short __b, unsigned char __c)
5605 return vec_perm(__a, __b, (vector unsigned char)
5606 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5607 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5610 static vector unsigned short __ATTRS_o_ai
5611 vec_vsldoi(vector unsigned short __a, vector unsigned short __b, unsigned char __c)
5613 return vec_perm(__a, __b, (vector unsigned char)
5614 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5615 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5618 static vector pixel __ATTRS_o_ai
5619 vec_vsldoi(vector pixel __a, vector pixel __b, unsigned char __c)
5621 return vec_perm(__a, __b, (vector unsigned char)
5622 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5623 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5626 static vector int __ATTRS_o_ai
5627 vec_vsldoi(vector int __a, vector int __b, unsigned char __c)
5629 return vec_perm(__a, __b, (vector unsigned char)
5630 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5631 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5634 static vector unsigned int __ATTRS_o_ai
5635 vec_vsldoi(vector unsigned int __a, vector unsigned int __b, unsigned char __c)
5637 return vec_perm(__a, __b, (vector unsigned char)
5638 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5639 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5642 static vector float __ATTRS_o_ai
5643 vec_vsldoi(vector float __a, vector float __b, unsigned char __c)
5645 return vec_perm(__a, __b, (vector unsigned char)
5646 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5647 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5650 /* vec_sll */
5652 static vector signed char __ATTRS_o_ai
5653 vec_sll(vector signed char __a, vector unsigned char __b)
5655 return (vector signed char)
5656 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5659 static vector signed char __ATTRS_o_ai
5660 vec_sll(vector signed char __a, vector unsigned short __b)
5662 return (vector signed char)
5663 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5666 static vector signed char __ATTRS_o_ai
5667 vec_sll(vector signed char __a, vector unsigned int __b)
5669 return (vector signed char)
5670 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5673 static vector unsigned char __ATTRS_o_ai
5674 vec_sll(vector unsigned char __a, vector unsigned char __b)
5676 return (vector unsigned char)
5677 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5680 static vector unsigned char __ATTRS_o_ai
5681 vec_sll(vector unsigned char __a, vector unsigned short __b)
5683 return (vector unsigned char)
5684 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5687 static vector unsigned char __ATTRS_o_ai
5688 vec_sll(vector unsigned char __a, vector unsigned int __b)
5690 return (vector unsigned char)
5691 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5694 static vector bool char __ATTRS_o_ai
5695 vec_sll(vector bool char __a, vector unsigned char __b)
5697 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5700 static vector bool char __ATTRS_o_ai
5701 vec_sll(vector bool char __a, vector unsigned short __b)
5703 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5706 static vector bool char __ATTRS_o_ai
5707 vec_sll(vector bool char __a, vector unsigned int __b)
5709 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5712 static vector short __ATTRS_o_ai
5713 vec_sll(vector short __a, vector unsigned char __b)
5715 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5718 static vector short __ATTRS_o_ai
5719 vec_sll(vector short __a, vector unsigned short __b)
5721 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5724 static vector short __ATTRS_o_ai
5725 vec_sll(vector short __a, vector unsigned int __b)
5727 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5730 static vector unsigned short __ATTRS_o_ai
5731 vec_sll(vector unsigned short __a, vector unsigned char __b)
5733 return (vector unsigned short)
5734 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5737 static vector unsigned short __ATTRS_o_ai
5738 vec_sll(vector unsigned short __a, vector unsigned short __b)
5740 return (vector unsigned short)
5741 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5744 static vector unsigned short __ATTRS_o_ai
5745 vec_sll(vector unsigned short __a, vector unsigned int __b)
5747 return (vector unsigned short)
5748 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5751 static vector bool short __ATTRS_o_ai
5752 vec_sll(vector bool short __a, vector unsigned char __b)
5754 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5757 static vector bool short __ATTRS_o_ai
5758 vec_sll(vector bool short __a, vector unsigned short __b)
5760 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5763 static vector bool short __ATTRS_o_ai
5764 vec_sll(vector bool short __a, vector unsigned int __b)
5766 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5769 static vector pixel __ATTRS_o_ai
5770 vec_sll(vector pixel __a, vector unsigned char __b)
5772 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5775 static vector pixel __ATTRS_o_ai
5776 vec_sll(vector pixel __a, vector unsigned short __b)
5778 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5781 static vector pixel __ATTRS_o_ai
5782 vec_sll(vector pixel __a, vector unsigned int __b)
5784 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5787 static vector int __ATTRS_o_ai
5788 vec_sll(vector int __a, vector unsigned char __b)
5790 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5793 static vector int __ATTRS_o_ai
5794 vec_sll(vector int __a, vector unsigned short __b)
5796 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5799 static vector int __ATTRS_o_ai
5800 vec_sll(vector int __a, vector unsigned int __b)
5802 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5805 static vector unsigned int __ATTRS_o_ai
5806 vec_sll(vector unsigned int __a, vector unsigned char __b)
5808 return (vector unsigned int)
5809 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5812 static vector unsigned int __ATTRS_o_ai
5813 vec_sll(vector unsigned int __a, vector unsigned short __b)
5815 return (vector unsigned int)
5816 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5819 static vector unsigned int __ATTRS_o_ai
5820 vec_sll(vector unsigned int __a, vector unsigned int __b)
5822 return (vector unsigned int)
5823 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5826 static vector bool int __ATTRS_o_ai
5827 vec_sll(vector bool int __a, vector unsigned char __b)
5829 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5832 static vector bool int __ATTRS_o_ai
5833 vec_sll(vector bool int __a, vector unsigned short __b)
5835 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5838 static vector bool int __ATTRS_o_ai
5839 vec_sll(vector bool int __a, vector unsigned int __b)
5841 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5844 /* vec_vsl */
5846 static vector signed char __ATTRS_o_ai
5847 vec_vsl(vector signed char __a, vector unsigned char __b)
5849 return (vector signed char)
5850 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5853 static vector signed char __ATTRS_o_ai
5854 vec_vsl(vector signed char __a, vector unsigned short __b)
5856 return (vector signed char)
5857 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5860 static vector signed char __ATTRS_o_ai
5861 vec_vsl(vector signed char __a, vector unsigned int __b)
5863 return (vector signed char)
5864 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5867 static vector unsigned char __ATTRS_o_ai
5868 vec_vsl(vector unsigned char __a, vector unsigned char __b)
5870 return (vector unsigned char)
5871 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5874 static vector unsigned char __ATTRS_o_ai
5875 vec_vsl(vector unsigned char __a, vector unsigned short __b)
5877 return (vector unsigned char)
5878 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5881 static vector unsigned char __ATTRS_o_ai
5882 vec_vsl(vector unsigned char __a, vector unsigned int __b)
5884 return (vector unsigned char)
5885 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5888 static vector bool char __ATTRS_o_ai
5889 vec_vsl(vector bool char __a, vector unsigned char __b)
5891 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5894 static vector bool char __ATTRS_o_ai
5895 vec_vsl(vector bool char __a, vector unsigned short __b)
5897 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5900 static vector bool char __ATTRS_o_ai
5901 vec_vsl(vector bool char __a, vector unsigned int __b)
5903 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5906 static vector short __ATTRS_o_ai
5907 vec_vsl(vector short __a, vector unsigned char __b)
5909 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5912 static vector short __ATTRS_o_ai
5913 vec_vsl(vector short __a, vector unsigned short __b)
5915 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5918 static vector short __ATTRS_o_ai
5919 vec_vsl(vector short __a, vector unsigned int __b)
5921 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5924 static vector unsigned short __ATTRS_o_ai
5925 vec_vsl(vector unsigned short __a, vector unsigned char __b)
5927 return (vector unsigned short)
5928 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5931 static vector unsigned short __ATTRS_o_ai
5932 vec_vsl(vector unsigned short __a, vector unsigned short __b)
5934 return (vector unsigned short)
5935 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5938 static vector unsigned short __ATTRS_o_ai
5939 vec_vsl(vector unsigned short __a, vector unsigned int __b)
5941 return (vector unsigned short)
5942 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5945 static vector bool short __ATTRS_o_ai
5946 vec_vsl(vector bool short __a, vector unsigned char __b)
5948 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5951 static vector bool short __ATTRS_o_ai
5952 vec_vsl(vector bool short __a, vector unsigned short __b)
5954 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5957 static vector bool short __ATTRS_o_ai
5958 vec_vsl(vector bool short __a, vector unsigned int __b)
5960 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5963 static vector pixel __ATTRS_o_ai
5964 vec_vsl(vector pixel __a, vector unsigned char __b)
5966 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5969 static vector pixel __ATTRS_o_ai
5970 vec_vsl(vector pixel __a, vector unsigned short __b)
5972 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5975 static vector pixel __ATTRS_o_ai
5976 vec_vsl(vector pixel __a, vector unsigned int __b)
5978 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5981 static vector int __ATTRS_o_ai
5982 vec_vsl(vector int __a, vector unsigned char __b)
5984 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5987 static vector int __ATTRS_o_ai
5988 vec_vsl(vector int __a, vector unsigned short __b)
5990 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5993 static vector int __ATTRS_o_ai
5994 vec_vsl(vector int __a, vector unsigned int __b)
5996 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5999 static vector unsigned int __ATTRS_o_ai
6000 vec_vsl(vector unsigned int __a, vector unsigned char __b)
6002 return (vector unsigned int)
6003 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6006 static vector unsigned int __ATTRS_o_ai
6007 vec_vsl(vector unsigned int __a, vector unsigned short __b)
6009 return (vector unsigned int)
6010 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6013 static vector unsigned int __ATTRS_o_ai
6014 vec_vsl(vector unsigned int __a, vector unsigned int __b)
6016 return (vector unsigned int)
6017 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6020 static vector bool int __ATTRS_o_ai
6021 vec_vsl(vector bool int __a, vector unsigned char __b)
6023 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6026 static vector bool int __ATTRS_o_ai
6027 vec_vsl(vector bool int __a, vector unsigned short __b)
6029 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6032 static vector bool int __ATTRS_o_ai
6033 vec_vsl(vector bool int __a, vector unsigned int __b)
6035 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6038 /* vec_slo */
6040 static vector signed char __ATTRS_o_ai
6041 vec_slo(vector signed char __a, vector signed char __b)
6043 return (vector signed char)
6044 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6047 static vector signed char __ATTRS_o_ai
6048 vec_slo(vector signed char __a, vector unsigned char __b)
6050 return (vector signed char)
6051 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6054 static vector unsigned char __ATTRS_o_ai
6055 vec_slo(vector unsigned char __a, vector signed char __b)
6057 return (vector unsigned char)
6058 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6061 static vector unsigned char __ATTRS_o_ai
6062 vec_slo(vector unsigned char __a, vector unsigned char __b)
6064 return (vector unsigned char)
6065 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6068 static vector short __ATTRS_o_ai
6069 vec_slo(vector short __a, vector signed char __b)
6071 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6074 static vector short __ATTRS_o_ai
6075 vec_slo(vector short __a, vector unsigned char __b)
6077 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6080 static vector unsigned short __ATTRS_o_ai
6081 vec_slo(vector unsigned short __a, vector signed char __b)
6083 return (vector unsigned short)
6084 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6087 static vector unsigned short __ATTRS_o_ai
6088 vec_slo(vector unsigned short __a, vector unsigned char __b)
6090 return (vector unsigned short)
6091 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6094 static vector pixel __ATTRS_o_ai
6095 vec_slo(vector pixel __a, vector signed char __b)
6097 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6100 static vector pixel __ATTRS_o_ai
6101 vec_slo(vector pixel __a, vector unsigned char __b)
6103 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6106 static vector int __ATTRS_o_ai
6107 vec_slo(vector int __a, vector signed char __b)
6109 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6112 static vector int __ATTRS_o_ai
6113 vec_slo(vector int __a, vector unsigned char __b)
6115 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6118 static vector unsigned int __ATTRS_o_ai
6119 vec_slo(vector unsigned int __a, vector signed char __b)
6121 return (vector unsigned int)
6122 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6125 static vector unsigned int __ATTRS_o_ai
6126 vec_slo(vector unsigned int __a, vector unsigned char __b)
6128 return (vector unsigned int)
6129 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6132 static vector float __ATTRS_o_ai
6133 vec_slo(vector float __a, vector signed char __b)
6135 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6138 static vector float __ATTRS_o_ai
6139 vec_slo(vector float __a, vector unsigned char __b)
6141 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6144 /* vec_vslo */
6146 static vector signed char __ATTRS_o_ai
6147 vec_vslo(vector signed char __a, vector signed char __b)
6149 return (vector signed char)
6150 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6153 static vector signed char __ATTRS_o_ai
6154 vec_vslo(vector signed char __a, vector unsigned char __b)
6156 return (vector signed char)
6157 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6160 static vector unsigned char __ATTRS_o_ai
6161 vec_vslo(vector unsigned char __a, vector signed char __b)
6163 return (vector unsigned char)
6164 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6167 static vector unsigned char __ATTRS_o_ai
6168 vec_vslo(vector unsigned char __a, vector unsigned char __b)
6170 return (vector unsigned char)
6171 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6174 static vector short __ATTRS_o_ai
6175 vec_vslo(vector short __a, vector signed char __b)
6177 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6180 static vector short __ATTRS_o_ai
6181 vec_vslo(vector short __a, vector unsigned char __b)
6183 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6186 static vector unsigned short __ATTRS_o_ai
6187 vec_vslo(vector unsigned short __a, vector signed char __b)
6189 return (vector unsigned short)
6190 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6193 static vector unsigned short __ATTRS_o_ai
6194 vec_vslo(vector unsigned short __a, vector unsigned char __b)
6196 return (vector unsigned short)
6197 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6200 static vector pixel __ATTRS_o_ai
6201 vec_vslo(vector pixel __a, vector signed char __b)
6203 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6206 static vector pixel __ATTRS_o_ai
6207 vec_vslo(vector pixel __a, vector unsigned char __b)
6209 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6212 static vector int __ATTRS_o_ai
6213 vec_vslo(vector int __a, vector signed char __b)
6215 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6218 static vector int __ATTRS_o_ai
6219 vec_vslo(vector int __a, vector unsigned char __b)
6221 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6224 static vector unsigned int __ATTRS_o_ai
6225 vec_vslo(vector unsigned int __a, vector signed char __b)
6227 return (vector unsigned int)
6228 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6231 static vector unsigned int __ATTRS_o_ai
6232 vec_vslo(vector unsigned int __a, vector unsigned char __b)
6234 return (vector unsigned int)
6235 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6238 static vector float __ATTRS_o_ai
6239 vec_vslo(vector float __a, vector signed char __b)
6241 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6244 static vector float __ATTRS_o_ai
6245 vec_vslo(vector float __a, vector unsigned char __b)
6247 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6250 /* vec_splat */
6252 static vector signed char __ATTRS_o_ai
6253 vec_splat(vector signed char __a, unsigned char __b)
6255 return vec_perm(__a, __a, (vector unsigned char)(__b));
6258 static vector unsigned char __ATTRS_o_ai
6259 vec_splat(vector unsigned char __a, unsigned char __b)
6261 return vec_perm(__a, __a, (vector unsigned char)(__b));
6264 static vector bool char __ATTRS_o_ai
6265 vec_splat(vector bool char __a, unsigned char __b)
6267 return vec_perm(__a, __a, (vector unsigned char)(__b));
6270 static vector short __ATTRS_o_ai
6271 vec_splat(vector short __a, unsigned char __b)
6273 __b *= 2;
6274 unsigned char b1=__b+1;
6275 return vec_perm(__a, __a, (vector unsigned char)
6276 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6279 static vector unsigned short __ATTRS_o_ai
6280 vec_splat(vector unsigned short __a, unsigned char __b)
6282 __b *= 2;
6283 unsigned char b1=__b+1;
6284 return vec_perm(__a, __a, (vector unsigned char)
6285 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6288 static vector bool short __ATTRS_o_ai
6289 vec_splat(vector bool short __a, unsigned char __b)
6291 __b *= 2;
6292 unsigned char b1=__b+1;
6293 return vec_perm(__a, __a, (vector unsigned char)
6294 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6297 static vector pixel __ATTRS_o_ai
6298 vec_splat(vector pixel __a, unsigned char __b)
6300 __b *= 2;
6301 unsigned char b1=__b+1;
6302 return vec_perm(__a, __a, (vector unsigned char)
6303 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6306 static vector int __ATTRS_o_ai
6307 vec_splat(vector int __a, unsigned char __b)
6309 __b *= 4;
6310 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6311 return vec_perm(__a, __a, (vector unsigned char)
6312 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6315 static vector unsigned int __ATTRS_o_ai
6316 vec_splat(vector unsigned int __a, unsigned char __b)
6318 __b *= 4;
6319 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6320 return vec_perm(__a, __a, (vector unsigned char)
6321 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6324 static vector bool int __ATTRS_o_ai
6325 vec_splat(vector bool int __a, unsigned char __b)
6327 __b *= 4;
6328 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6329 return vec_perm(__a, __a, (vector unsigned char)
6330 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6333 static vector float __ATTRS_o_ai
6334 vec_splat(vector float __a, unsigned char __b)
6336 __b *= 4;
6337 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6338 return vec_perm(__a, __a, (vector unsigned char)
6339 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6342 /* vec_vspltb */
6344 #define __builtin_altivec_vspltb vec_vspltb
6346 static vector signed char __ATTRS_o_ai
6347 vec_vspltb(vector signed char __a, unsigned char __b)
6349 return vec_perm(__a, __a, (vector unsigned char)(__b));
6352 static vector unsigned char __ATTRS_o_ai
6353 vec_vspltb(vector unsigned char __a, unsigned char __b)
6355 return vec_perm(__a, __a, (vector unsigned char)(__b));
6358 static vector bool char __ATTRS_o_ai
6359 vec_vspltb(vector bool char __a, unsigned char __b)
6361 return vec_perm(__a, __a, (vector unsigned char)(__b));
6364 /* vec_vsplth */
6366 #define __builtin_altivec_vsplth vec_vsplth
6368 static vector short __ATTRS_o_ai
6369 vec_vsplth(vector short __a, unsigned char __b)
6371 __b *= 2;
6372 unsigned char b1=__b+1;
6373 return vec_perm(__a, __a, (vector unsigned char)
6374 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6377 static vector unsigned short __ATTRS_o_ai
6378 vec_vsplth(vector unsigned short __a, unsigned char __b)
6380 __b *= 2;
6381 unsigned char b1=__b+1;
6382 return vec_perm(__a, __a, (vector unsigned char)
6383 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6386 static vector bool short __ATTRS_o_ai
6387 vec_vsplth(vector bool short __a, unsigned char __b)
6389 __b *= 2;
6390 unsigned char b1=__b+1;
6391 return vec_perm(__a, __a, (vector unsigned char)
6392 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6395 static vector pixel __ATTRS_o_ai
6396 vec_vsplth(vector pixel __a, unsigned char __b)
6398 __b *= 2;
6399 unsigned char b1=__b+1;
6400 return vec_perm(__a, __a, (vector unsigned char)
6401 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6404 /* vec_vspltw */
6406 #define __builtin_altivec_vspltw vec_vspltw
6408 static vector int __ATTRS_o_ai
6409 vec_vspltw(vector int __a, unsigned char __b)
6411 __b *= 4;
6412 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6413 return vec_perm(__a, __a, (vector unsigned char)
6414 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6417 static vector unsigned int __ATTRS_o_ai
6418 vec_vspltw(vector unsigned int __a, unsigned char __b)
6420 __b *= 4;
6421 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6422 return vec_perm(__a, __a, (vector unsigned char)
6423 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6426 static vector bool int __ATTRS_o_ai
6427 vec_vspltw(vector bool int __a, unsigned char __b)
6429 __b *= 4;
6430 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6431 return vec_perm(__a, __a, (vector unsigned char)
6432 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6435 static vector float __ATTRS_o_ai
6436 vec_vspltw(vector float __a, unsigned char __b)
6438 __b *= 4;
6439 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6440 return vec_perm(__a, __a, (vector unsigned char)
6441 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6444 /* vec_splat_s8 */
6446 #define __builtin_altivec_vspltisb vec_splat_s8
6448 // FIXME: parameter should be treated as 5-bit signed literal
6449 static vector signed char __ATTRS_o_ai
6450 vec_splat_s8(signed char __a)
6452 return (vector signed char)(__a);
6455 /* vec_vspltisb */
6457 // FIXME: parameter should be treated as 5-bit signed literal
6458 static vector signed char __ATTRS_o_ai
6459 vec_vspltisb(signed char __a)
6461 return (vector signed char)(__a);
6464 /* vec_splat_s16 */
6466 #define __builtin_altivec_vspltish vec_splat_s16
6468 // FIXME: parameter should be treated as 5-bit signed literal
6469 static vector short __ATTRS_o_ai
6470 vec_splat_s16(signed char __a)
6472 return (vector short)(__a);
6475 /* vec_vspltish */
6477 // FIXME: parameter should be treated as 5-bit signed literal
6478 static vector short __ATTRS_o_ai
6479 vec_vspltish(signed char __a)
6481 return (vector short)(__a);
6484 /* vec_splat_s32 */
6486 #define __builtin_altivec_vspltisw vec_splat_s32
6488 // FIXME: parameter should be treated as 5-bit signed literal
6489 static vector int __ATTRS_o_ai
6490 vec_splat_s32(signed char __a)
6492 return (vector int)(__a);
6495 /* vec_vspltisw */
6497 // FIXME: parameter should be treated as 5-bit signed literal
6498 static vector int __ATTRS_o_ai
6499 vec_vspltisw(signed char __a)
6501 return (vector int)(__a);
6504 /* vec_splat_u8 */
6506 // FIXME: parameter should be treated as 5-bit signed literal
6507 static vector unsigned char __ATTRS_o_ai
6508 vec_splat_u8(unsigned char __a)
6510 return (vector unsigned char)(__a);
6513 /* vec_splat_u16 */
6515 // FIXME: parameter should be treated as 5-bit signed literal
6516 static vector unsigned short __ATTRS_o_ai
6517 vec_splat_u16(signed char __a)
6519 return (vector unsigned short)(__a);
6522 /* vec_splat_u32 */
6524 // FIXME: parameter should be treated as 5-bit signed literal
6525 static vector unsigned int __ATTRS_o_ai
6526 vec_splat_u32(signed char __a)
6528 return (vector unsigned int)(__a);
6531 /* vec_sr */
6533 static vector signed char __ATTRS_o_ai
6534 vec_sr(vector signed char __a, vector unsigned char __b)
6536 return __a >> (vector signed char)__b;
6539 static vector unsigned char __ATTRS_o_ai
6540 vec_sr(vector unsigned char __a, vector unsigned char __b)
6542 return __a >> __b;
6545 static vector short __ATTRS_o_ai
6546 vec_sr(vector short __a, vector unsigned short __b)
6548 return __a >> (vector short)__b;
6551 static vector unsigned short __ATTRS_o_ai
6552 vec_sr(vector unsigned short __a, vector unsigned short __b)
6554 return __a >> __b;
6557 static vector int __ATTRS_o_ai
6558 vec_sr(vector int __a, vector unsigned int __b)
6560 return __a >> (vector int)__b;
6563 static vector unsigned int __ATTRS_o_ai
6564 vec_sr(vector unsigned int __a, vector unsigned int __b)
6566 return __a >> __b;
6569 /* vec_vsrb */
6571 #define __builtin_altivec_vsrb vec_vsrb
6573 static vector signed char __ATTRS_o_ai
6574 vec_vsrb(vector signed char __a, vector unsigned char __b)
6576 return __a >> (vector signed char)__b;
6579 static vector unsigned char __ATTRS_o_ai
6580 vec_vsrb(vector unsigned char __a, vector unsigned char __b)
6582 return __a >> __b;
6585 /* vec_vsrh */
6587 #define __builtin_altivec_vsrh vec_vsrh
6589 static vector short __ATTRS_o_ai
6590 vec_vsrh(vector short __a, vector unsigned short __b)
6592 return __a >> (vector short)__b;
6595 static vector unsigned short __ATTRS_o_ai
6596 vec_vsrh(vector unsigned short __a, vector unsigned short __b)
6598 return __a >> __b;
6601 /* vec_vsrw */
6603 #define __builtin_altivec_vsrw vec_vsrw
6605 static vector int __ATTRS_o_ai
6606 vec_vsrw(vector int __a, vector unsigned int __b)
6608 return __a >> (vector int)__b;
6611 static vector unsigned int __ATTRS_o_ai
6612 vec_vsrw(vector unsigned int __a, vector unsigned int __b)
6614 return __a >> __b;
6617 /* vec_sra */
6619 static vector signed char __ATTRS_o_ai
6620 vec_sra(vector signed char __a, vector unsigned char __b)
6622 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
6625 static vector unsigned char __ATTRS_o_ai
6626 vec_sra(vector unsigned char __a, vector unsigned char __b)
6628 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
6631 static vector short __ATTRS_o_ai
6632 vec_sra(vector short __a, vector unsigned short __b)
6634 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
6637 static vector unsigned short __ATTRS_o_ai
6638 vec_sra(vector unsigned short __a, vector unsigned short __b)
6640 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
6643 static vector int __ATTRS_o_ai
6644 vec_sra(vector int __a, vector unsigned int __b)
6646 return __builtin_altivec_vsraw(__a, __b);
6649 static vector unsigned int __ATTRS_o_ai
6650 vec_sra(vector unsigned int __a, vector unsigned int __b)
6652 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
6655 /* vec_vsrab */
6657 static vector signed char __ATTRS_o_ai
6658 vec_vsrab(vector signed char __a, vector unsigned char __b)
6660 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
6663 static vector unsigned char __ATTRS_o_ai
6664 vec_vsrab(vector unsigned char __a, vector unsigned char __b)
6666 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
6669 /* vec_vsrah */
6671 static vector short __ATTRS_o_ai
6672 vec_vsrah(vector short __a, vector unsigned short __b)
6674 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
6677 static vector unsigned short __ATTRS_o_ai
6678 vec_vsrah(vector unsigned short __a, vector unsigned short __b)
6680 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
6683 /* vec_vsraw */
6685 static vector int __ATTRS_o_ai
6686 vec_vsraw(vector int __a, vector unsigned int __b)
6688 return __builtin_altivec_vsraw(__a, __b);
6691 static vector unsigned int __ATTRS_o_ai
6692 vec_vsraw(vector unsigned int __a, vector unsigned int __b)
6694 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
6697 /* vec_srl */
6699 static vector signed char __ATTRS_o_ai
6700 vec_srl(vector signed char __a, vector unsigned char __b)
6702 return (vector signed char)
6703 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6706 static vector signed char __ATTRS_o_ai
6707 vec_srl(vector signed char __a, vector unsigned short __b)
6709 return (vector signed char)
6710 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6713 static vector signed char __ATTRS_o_ai
6714 vec_srl(vector signed char __a, vector unsigned int __b)
6716 return (vector signed char)
6717 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6720 static vector unsigned char __ATTRS_o_ai
6721 vec_srl(vector unsigned char __a, vector unsigned char __b)
6723 return (vector unsigned char)
6724 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6727 static vector unsigned char __ATTRS_o_ai
6728 vec_srl(vector unsigned char __a, vector unsigned short __b)
6730 return (vector unsigned char)
6731 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6734 static vector unsigned char __ATTRS_o_ai
6735 vec_srl(vector unsigned char __a, vector unsigned int __b)
6737 return (vector unsigned char)
6738 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6741 static vector bool char __ATTRS_o_ai
6742 vec_srl(vector bool char __a, vector unsigned char __b)
6744 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6747 static vector bool char __ATTRS_o_ai
6748 vec_srl(vector bool char __a, vector unsigned short __b)
6750 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6753 static vector bool char __ATTRS_o_ai
6754 vec_srl(vector bool char __a, vector unsigned int __b)
6756 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6759 static vector short __ATTRS_o_ai
6760 vec_srl(vector short __a, vector unsigned char __b)
6762 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6765 static vector short __ATTRS_o_ai
6766 vec_srl(vector short __a, vector unsigned short __b)
6768 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6771 static vector short __ATTRS_o_ai
6772 vec_srl(vector short __a, vector unsigned int __b)
6774 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6777 static vector unsigned short __ATTRS_o_ai
6778 vec_srl(vector unsigned short __a, vector unsigned char __b)
6780 return (vector unsigned short)
6781 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6784 static vector unsigned short __ATTRS_o_ai
6785 vec_srl(vector unsigned short __a, vector unsigned short __b)
6787 return (vector unsigned short)
6788 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6791 static vector unsigned short __ATTRS_o_ai
6792 vec_srl(vector unsigned short __a, vector unsigned int __b)
6794 return (vector unsigned short)
6795 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6798 static vector bool short __ATTRS_o_ai
6799 vec_srl(vector bool short __a, vector unsigned char __b)
6801 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6804 static vector bool short __ATTRS_o_ai
6805 vec_srl(vector bool short __a, vector unsigned short __b)
6807 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6810 static vector bool short __ATTRS_o_ai
6811 vec_srl(vector bool short __a, vector unsigned int __b)
6813 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6816 static vector pixel __ATTRS_o_ai
6817 vec_srl(vector pixel __a, vector unsigned char __b)
6819 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6822 static vector pixel __ATTRS_o_ai
6823 vec_srl(vector pixel __a, vector unsigned short __b)
6825 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6828 static vector pixel __ATTRS_o_ai
6829 vec_srl(vector pixel __a, vector unsigned int __b)
6831 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6834 static vector int __ATTRS_o_ai
6835 vec_srl(vector int __a, vector unsigned char __b)
6837 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6840 static vector int __ATTRS_o_ai
6841 vec_srl(vector int __a, vector unsigned short __b)
6843 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6846 static vector int __ATTRS_o_ai
6847 vec_srl(vector int __a, vector unsigned int __b)
6849 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6852 static vector unsigned int __ATTRS_o_ai
6853 vec_srl(vector unsigned int __a, vector unsigned char __b)
6855 return (vector unsigned int)
6856 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6859 static vector unsigned int __ATTRS_o_ai
6860 vec_srl(vector unsigned int __a, vector unsigned short __b)
6862 return (vector unsigned int)
6863 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6866 static vector unsigned int __ATTRS_o_ai
6867 vec_srl(vector unsigned int __a, vector unsigned int __b)
6869 return (vector unsigned int)
6870 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6873 static vector bool int __ATTRS_o_ai
6874 vec_srl(vector bool int __a, vector unsigned char __b)
6876 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6879 static vector bool int __ATTRS_o_ai
6880 vec_srl(vector bool int __a, vector unsigned short __b)
6882 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6885 static vector bool int __ATTRS_o_ai
6886 vec_srl(vector bool int __a, vector unsigned int __b)
6888 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6891 /* vec_vsr */
6893 static vector signed char __ATTRS_o_ai
6894 vec_vsr(vector signed char __a, vector unsigned char __b)
6896 return (vector signed char)
6897 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6900 static vector signed char __ATTRS_o_ai
6901 vec_vsr(vector signed char __a, vector unsigned short __b)
6903 return (vector signed char)
6904 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6907 static vector signed char __ATTRS_o_ai
6908 vec_vsr(vector signed char __a, vector unsigned int __b)
6910 return (vector signed char)
6911 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6914 static vector unsigned char __ATTRS_o_ai
6915 vec_vsr(vector unsigned char __a, vector unsigned char __b)
6917 return (vector unsigned char)
6918 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6921 static vector unsigned char __ATTRS_o_ai
6922 vec_vsr(vector unsigned char __a, vector unsigned short __b)
6924 return (vector unsigned char)
6925 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6928 static vector unsigned char __ATTRS_o_ai
6929 vec_vsr(vector unsigned char __a, vector unsigned int __b)
6931 return (vector unsigned char)
6932 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6935 static vector bool char __ATTRS_o_ai
6936 vec_vsr(vector bool char __a, vector unsigned char __b)
6938 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6941 static vector bool char __ATTRS_o_ai
6942 vec_vsr(vector bool char __a, vector unsigned short __b)
6944 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6947 static vector bool char __ATTRS_o_ai
6948 vec_vsr(vector bool char __a, vector unsigned int __b)
6950 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6953 static vector short __ATTRS_o_ai
6954 vec_vsr(vector short __a, vector unsigned char __b)
6956 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6959 static vector short __ATTRS_o_ai
6960 vec_vsr(vector short __a, vector unsigned short __b)
6962 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6965 static vector short __ATTRS_o_ai
6966 vec_vsr(vector short __a, vector unsigned int __b)
6968 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6971 static vector unsigned short __ATTRS_o_ai
6972 vec_vsr(vector unsigned short __a, vector unsigned char __b)
6974 return (vector unsigned short)
6975 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6978 static vector unsigned short __ATTRS_o_ai
6979 vec_vsr(vector unsigned short __a, vector unsigned short __b)
6981 return (vector unsigned short)
6982 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6985 static vector unsigned short __ATTRS_o_ai
6986 vec_vsr(vector unsigned short __a, vector unsigned int __b)
6988 return (vector unsigned short)
6989 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6992 static vector bool short __ATTRS_o_ai
6993 vec_vsr(vector bool short __a, vector unsigned char __b)
6995 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6998 static vector bool short __ATTRS_o_ai
6999 vec_vsr(vector bool short __a, vector unsigned short __b)
7001 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7004 static vector bool short __ATTRS_o_ai
7005 vec_vsr(vector bool short __a, vector unsigned int __b)
7007 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7010 static vector pixel __ATTRS_o_ai
7011 vec_vsr(vector pixel __a, vector unsigned char __b)
7013 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7016 static vector pixel __ATTRS_o_ai
7017 vec_vsr(vector pixel __a, vector unsigned short __b)
7019 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7022 static vector pixel __ATTRS_o_ai
7023 vec_vsr(vector pixel __a, vector unsigned int __b)
7025 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7028 static vector int __ATTRS_o_ai
7029 vec_vsr(vector int __a, vector unsigned char __b)
7031 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7034 static vector int __ATTRS_o_ai
7035 vec_vsr(vector int __a, vector unsigned short __b)
7037 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7040 static vector int __ATTRS_o_ai
7041 vec_vsr(vector int __a, vector unsigned int __b)
7043 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7046 static vector unsigned int __ATTRS_o_ai
7047 vec_vsr(vector unsigned int __a, vector unsigned char __b)
7049 return (vector unsigned int)
7050 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7053 static vector unsigned int __ATTRS_o_ai
7054 vec_vsr(vector unsigned int __a, vector unsigned short __b)
7056 return (vector unsigned int)
7057 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7060 static vector unsigned int __ATTRS_o_ai
7061 vec_vsr(vector unsigned int __a, vector unsigned int __b)
7063 return (vector unsigned int)
7064 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7067 static vector bool int __ATTRS_o_ai
7068 vec_vsr(vector bool int __a, vector unsigned char __b)
7070 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7073 static vector bool int __ATTRS_o_ai
7074 vec_vsr(vector bool int __a, vector unsigned short __b)
7076 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7079 static vector bool int __ATTRS_o_ai
7080 vec_vsr(vector bool int __a, vector unsigned int __b)
7082 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7085 /* vec_sro */
7087 static vector signed char __ATTRS_o_ai
7088 vec_sro(vector signed char __a, vector signed char __b)
7090 return (vector signed char)
7091 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7094 static vector signed char __ATTRS_o_ai
7095 vec_sro(vector signed char __a, vector unsigned char __b)
7097 return (vector signed char)
7098 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7101 static vector unsigned char __ATTRS_o_ai
7102 vec_sro(vector unsigned char __a, vector signed char __b)
7104 return (vector unsigned char)
7105 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7108 static vector unsigned char __ATTRS_o_ai
7109 vec_sro(vector unsigned char __a, vector unsigned char __b)
7111 return (vector unsigned char)
7112 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7115 static vector short __ATTRS_o_ai
7116 vec_sro(vector short __a, vector signed char __b)
7118 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7121 static vector short __ATTRS_o_ai
7122 vec_sro(vector short __a, vector unsigned char __b)
7124 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7127 static vector unsigned short __ATTRS_o_ai
7128 vec_sro(vector unsigned short __a, vector signed char __b)
7130 return (vector unsigned short)
7131 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7134 static vector unsigned short __ATTRS_o_ai
7135 vec_sro(vector unsigned short __a, vector unsigned char __b)
7137 return (vector unsigned short)
7138 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7141 static vector pixel __ATTRS_o_ai
7142 vec_sro(vector pixel __a, vector signed char __b)
7144 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7147 static vector pixel __ATTRS_o_ai
7148 vec_sro(vector pixel __a, vector unsigned char __b)
7150 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7153 static vector int __ATTRS_o_ai
7154 vec_sro(vector int __a, vector signed char __b)
7156 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7159 static vector int __ATTRS_o_ai
7160 vec_sro(vector int __a, vector unsigned char __b)
7162 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7165 static vector unsigned int __ATTRS_o_ai
7166 vec_sro(vector unsigned int __a, vector signed char __b)
7168 return (vector unsigned int)
7169 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7172 static vector unsigned int __ATTRS_o_ai
7173 vec_sro(vector unsigned int __a, vector unsigned char __b)
7175 return (vector unsigned int)
7176 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7179 static vector float __ATTRS_o_ai
7180 vec_sro(vector float __a, vector signed char __b)
7182 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7185 static vector float __ATTRS_o_ai
7186 vec_sro(vector float __a, vector unsigned char __b)
7188 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7191 /* vec_vsro */
7193 static vector signed char __ATTRS_o_ai
7194 vec_vsro(vector signed char __a, vector signed char __b)
7196 return (vector signed char)
7197 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7200 static vector signed char __ATTRS_o_ai
7201 vec_vsro(vector signed char __a, vector unsigned char __b)
7203 return (vector signed char)
7204 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7207 static vector unsigned char __ATTRS_o_ai
7208 vec_vsro(vector unsigned char __a, vector signed char __b)
7210 return (vector unsigned char)
7211 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7214 static vector unsigned char __ATTRS_o_ai
7215 vec_vsro(vector unsigned char __a, vector unsigned char __b)
7217 return (vector unsigned char)
7218 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7221 static vector short __ATTRS_o_ai
7222 vec_vsro(vector short __a, vector signed char __b)
7224 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7227 static vector short __ATTRS_o_ai
7228 vec_vsro(vector short __a, vector unsigned char __b)
7230 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7233 static vector unsigned short __ATTRS_o_ai
7234 vec_vsro(vector unsigned short __a, vector signed char __b)
7236 return (vector unsigned short)
7237 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7240 static vector unsigned short __ATTRS_o_ai
7241 vec_vsro(vector unsigned short __a, vector unsigned char __b)
7243 return (vector unsigned short)
7244 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7247 static vector pixel __ATTRS_o_ai
7248 vec_vsro(vector pixel __a, vector signed char __b)
7250 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7253 static vector pixel __ATTRS_o_ai
7254 vec_vsro(vector pixel __a, vector unsigned char __b)
7256 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7259 static vector int __ATTRS_o_ai
7260 vec_vsro(vector int __a, vector signed char __b)
7262 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7265 static vector int __ATTRS_o_ai
7266 vec_vsro(vector int __a, vector unsigned char __b)
7268 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7271 static vector unsigned int __ATTRS_o_ai
7272 vec_vsro(vector unsigned int __a, vector signed char __b)
7274 return (vector unsigned int)
7275 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7278 static vector unsigned int __ATTRS_o_ai
7279 vec_vsro(vector unsigned int __a, vector unsigned char __b)
7281 return (vector unsigned int)
7282 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7285 static vector float __ATTRS_o_ai
7286 vec_vsro(vector float __a, vector signed char __b)
7288 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7291 static vector float __ATTRS_o_ai
7292 vec_vsro(vector float __a, vector unsigned char __b)
7294 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7297 /* vec_st */
7299 static void __ATTRS_o_ai
7300 vec_st(vector signed char __a, int __b, vector signed char *__c)
7302 __builtin_altivec_stvx((vector int)__a, __b, __c);
7305 static void __ATTRS_o_ai
7306 vec_st(vector signed char __a, int __b, signed char *__c)
7308 __builtin_altivec_stvx((vector int)__a, __b, __c);
7311 static void __ATTRS_o_ai
7312 vec_st(vector unsigned char __a, int __b, vector unsigned char *__c)
7314 __builtin_altivec_stvx((vector int)__a, __b, __c);
7317 static void __ATTRS_o_ai
7318 vec_st(vector unsigned char __a, int __b, unsigned char *__c)
7320 __builtin_altivec_stvx((vector int)__a, __b, __c);
7323 static void __ATTRS_o_ai
7324 vec_st(vector bool char __a, int __b, signed char *__c)
7326 __builtin_altivec_stvx((vector int)__a, __b, __c);
7329 static void __ATTRS_o_ai
7330 vec_st(vector bool char __a, int __b, unsigned char *__c)
7332 __builtin_altivec_stvx((vector int)__a, __b, __c);
7335 static void __ATTRS_o_ai
7336 vec_st(vector bool char __a, int __b, vector bool char *__c)
7338 __builtin_altivec_stvx((vector int)__a, __b, __c);
7341 static void __ATTRS_o_ai
7342 vec_st(vector short __a, int __b, vector short *__c)
7344 __builtin_altivec_stvx((vector int)__a, __b, __c);
7347 static void __ATTRS_o_ai
7348 vec_st(vector short __a, int __b, short *__c)
7350 __builtin_altivec_stvx((vector int)__a, __b, __c);
7353 static void __ATTRS_o_ai
7354 vec_st(vector unsigned short __a, int __b, vector unsigned short *__c)
7356 __builtin_altivec_stvx((vector int)__a, __b, __c);
7359 static void __ATTRS_o_ai
7360 vec_st(vector unsigned short __a, int __b, unsigned short *__c)
7362 __builtin_altivec_stvx((vector int)__a, __b, __c);
7365 static void __ATTRS_o_ai
7366 vec_st(vector bool short __a, int __b, short *__c)
7368 __builtin_altivec_stvx((vector int)__a, __b, __c);
7371 static void __ATTRS_o_ai
7372 vec_st(vector bool short __a, int __b, unsigned short *__c)
7374 __builtin_altivec_stvx((vector int)__a, __b, __c);
7377 static void __ATTRS_o_ai
7378 vec_st(vector bool short __a, int __b, vector bool short *__c)
7380 __builtin_altivec_stvx((vector int)__a, __b, __c);
7383 static void __ATTRS_o_ai
7384 vec_st(vector pixel __a, int __b, short *__c)
7386 __builtin_altivec_stvx((vector int)__a, __b, __c);
7389 static void __ATTRS_o_ai
7390 vec_st(vector pixel __a, int __b, unsigned short *__c)
7392 __builtin_altivec_stvx((vector int)__a, __b, __c);
7395 static void __ATTRS_o_ai
7396 vec_st(vector pixel __a, int __b, vector pixel *__c)
7398 __builtin_altivec_stvx((vector int)__a, __b, __c);
7401 static void __ATTRS_o_ai
7402 vec_st(vector int __a, int __b, vector int *__c)
7404 __builtin_altivec_stvx(__a, __b, __c);
7407 static void __ATTRS_o_ai
7408 vec_st(vector int __a, int __b, int *__c)
7410 __builtin_altivec_stvx(__a, __b, __c);
7413 static void __ATTRS_o_ai
7414 vec_st(vector unsigned int __a, int __b, vector unsigned int *__c)
7416 __builtin_altivec_stvx((vector int)__a, __b, __c);
7419 static void __ATTRS_o_ai
7420 vec_st(vector unsigned int __a, int __b, unsigned int *__c)
7422 __builtin_altivec_stvx((vector int)__a, __b, __c);
7425 static void __ATTRS_o_ai
7426 vec_st(vector bool int __a, int __b, int *__c)
7428 __builtin_altivec_stvx((vector int)__a, __b, __c);
7431 static void __ATTRS_o_ai
7432 vec_st(vector bool int __a, int __b, unsigned int *__c)
7434 __builtin_altivec_stvx((vector int)__a, __b, __c);
7437 static void __ATTRS_o_ai
7438 vec_st(vector bool int __a, int __b, vector bool int *__c)
7440 __builtin_altivec_stvx((vector int)__a, __b, __c);
7443 static void __ATTRS_o_ai
7444 vec_st(vector float __a, int __b, vector float *__c)
7446 __builtin_altivec_stvx((vector int)__a, __b, __c);
7449 static void __ATTRS_o_ai
7450 vec_st(vector float __a, int __b, float *__c)
7452 __builtin_altivec_stvx((vector int)__a, __b, __c);
7455 /* vec_stvx */
7457 static void __ATTRS_o_ai
7458 vec_stvx(vector signed char __a, int __b, vector signed char *__c)
7460 __builtin_altivec_stvx((vector int)__a, __b, __c);
7463 static void __ATTRS_o_ai
7464 vec_stvx(vector signed char __a, int __b, signed char *__c)
7466 __builtin_altivec_stvx((vector int)__a, __b, __c);
7469 static void __ATTRS_o_ai
7470 vec_stvx(vector unsigned char __a, int __b, vector unsigned char *__c)
7472 __builtin_altivec_stvx((vector int)__a, __b, __c);
7475 static void __ATTRS_o_ai
7476 vec_stvx(vector unsigned char __a, int __b, unsigned char *__c)
7478 __builtin_altivec_stvx((vector int)__a, __b, __c);
7481 static void __ATTRS_o_ai
7482 vec_stvx(vector bool char __a, int __b, signed char *__c)
7484 __builtin_altivec_stvx((vector int)__a, __b, __c);
7487 static void __ATTRS_o_ai
7488 vec_stvx(vector bool char __a, int __b, unsigned char *__c)
7490 __builtin_altivec_stvx((vector int)__a, __b, __c);
7493 static void __ATTRS_o_ai
7494 vec_stvx(vector bool char __a, int __b, vector bool char *__c)
7496 __builtin_altivec_stvx((vector int)__a, __b, __c);
7499 static void __ATTRS_o_ai
7500 vec_stvx(vector short __a, int __b, vector short *__c)
7502 __builtin_altivec_stvx((vector int)__a, __b, __c);
7505 static void __ATTRS_o_ai
7506 vec_stvx(vector short __a, int __b, short *__c)
7508 __builtin_altivec_stvx((vector int)__a, __b, __c);
7511 static void __ATTRS_o_ai
7512 vec_stvx(vector unsigned short __a, int __b, vector unsigned short *__c)
7514 __builtin_altivec_stvx((vector int)__a, __b, __c);
7517 static void __ATTRS_o_ai
7518 vec_stvx(vector unsigned short __a, int __b, unsigned short *__c)
7520 __builtin_altivec_stvx((vector int)__a, __b, __c);
7523 static void __ATTRS_o_ai
7524 vec_stvx(vector bool short __a, int __b, short *__c)
7526 __builtin_altivec_stvx((vector int)__a, __b, __c);
7529 static void __ATTRS_o_ai
7530 vec_stvx(vector bool short __a, int __b, unsigned short *__c)
7532 __builtin_altivec_stvx((vector int)__a, __b, __c);
7535 static void __ATTRS_o_ai
7536 vec_stvx(vector bool short __a, int __b, vector bool short *__c)
7538 __builtin_altivec_stvx((vector int)__a, __b, __c);
7541 static void __ATTRS_o_ai
7542 vec_stvx(vector pixel __a, int __b, short *__c)
7544 __builtin_altivec_stvx((vector int)__a, __b, __c);
7547 static void __ATTRS_o_ai
7548 vec_stvx(vector pixel __a, int __b, unsigned short *__c)
7550 __builtin_altivec_stvx((vector int)__a, __b, __c);
7553 static void __ATTRS_o_ai
7554 vec_stvx(vector pixel __a, int __b, vector pixel *__c)
7556 __builtin_altivec_stvx((vector int)__a, __b, __c);
7559 static void __ATTRS_o_ai
7560 vec_stvx(vector int __a, int __b, vector int *__c)
7562 __builtin_altivec_stvx(__a, __b, __c);
7565 static void __ATTRS_o_ai
7566 vec_stvx(vector int __a, int __b, int *__c)
7568 __builtin_altivec_stvx(__a, __b, __c);
7571 static void __ATTRS_o_ai
7572 vec_stvx(vector unsigned int __a, int __b, vector unsigned int *__c)
7574 __builtin_altivec_stvx((vector int)__a, __b, __c);
7577 static void __ATTRS_o_ai
7578 vec_stvx(vector unsigned int __a, int __b, unsigned int *__c)
7580 __builtin_altivec_stvx((vector int)__a, __b, __c);
7583 static void __ATTRS_o_ai
7584 vec_stvx(vector bool int __a, int __b, int *__c)
7586 __builtin_altivec_stvx((vector int)__a, __b, __c);
7589 static void __ATTRS_o_ai
7590 vec_stvx(vector bool int __a, int __b, unsigned int *__c)
7592 __builtin_altivec_stvx((vector int)__a, __b, __c);
7595 static void __ATTRS_o_ai
7596 vec_stvx(vector bool int __a, int __b, vector bool int *__c)
7598 __builtin_altivec_stvx((vector int)__a, __b, __c);
7601 static void __ATTRS_o_ai
7602 vec_stvx(vector float __a, int __b, vector float *__c)
7604 __builtin_altivec_stvx((vector int)__a, __b, __c);
7607 static void __ATTRS_o_ai
7608 vec_stvx(vector float __a, int __b, float *__c)
7610 __builtin_altivec_stvx((vector int)__a, __b, __c);
7613 /* vec_ste */
7615 static void __ATTRS_o_ai
7616 vec_ste(vector signed char __a, int __b, signed char *__c)
7618 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7621 static void __ATTRS_o_ai
7622 vec_ste(vector unsigned char __a, int __b, unsigned char *__c)
7624 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7627 static void __ATTRS_o_ai
7628 vec_ste(vector bool char __a, int __b, signed char *__c)
7630 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7633 static void __ATTRS_o_ai
7634 vec_ste(vector bool char __a, int __b, unsigned char *__c)
7636 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7639 static void __ATTRS_o_ai
7640 vec_ste(vector short __a, int __b, short *__c)
7642 __builtin_altivec_stvehx(__a, __b, __c);
7645 static void __ATTRS_o_ai
7646 vec_ste(vector unsigned short __a, int __b, unsigned short *__c)
7648 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7651 static void __ATTRS_o_ai
7652 vec_ste(vector bool short __a, int __b, short *__c)
7654 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7657 static void __ATTRS_o_ai
7658 vec_ste(vector bool short __a, int __b, unsigned short *__c)
7660 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7663 static void __ATTRS_o_ai
7664 vec_ste(vector pixel __a, int __b, short *__c)
7666 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7669 static void __ATTRS_o_ai
7670 vec_ste(vector pixel __a, int __b, unsigned short *__c)
7672 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7675 static void __ATTRS_o_ai
7676 vec_ste(vector int __a, int __b, int *__c)
7678 __builtin_altivec_stvewx(__a, __b, __c);
7681 static void __ATTRS_o_ai
7682 vec_ste(vector unsigned int __a, int __b, unsigned int *__c)
7684 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7687 static void __ATTRS_o_ai
7688 vec_ste(vector bool int __a, int __b, int *__c)
7690 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7693 static void __ATTRS_o_ai
7694 vec_ste(vector bool int __a, int __b, unsigned int *__c)
7696 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7699 static void __ATTRS_o_ai
7700 vec_ste(vector float __a, int __b, float *__c)
7702 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7705 /* vec_stvebx */
7707 static void __ATTRS_o_ai
7708 vec_stvebx(vector signed char __a, int __b, signed char *__c)
7710 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7713 static void __ATTRS_o_ai
7714 vec_stvebx(vector unsigned char __a, int __b, unsigned char *__c)
7716 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7719 static void __ATTRS_o_ai
7720 vec_stvebx(vector bool char __a, int __b, signed char *__c)
7722 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7725 static void __ATTRS_o_ai
7726 vec_stvebx(vector bool char __a, int __b, unsigned char *__c)
7728 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7731 /* vec_stvehx */
7733 static void __ATTRS_o_ai
7734 vec_stvehx(vector short __a, int __b, short *__c)
7736 __builtin_altivec_stvehx(__a, __b, __c);
7739 static void __ATTRS_o_ai
7740 vec_stvehx(vector unsigned short __a, int __b, unsigned short *__c)
7742 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7745 static void __ATTRS_o_ai
7746 vec_stvehx(vector bool short __a, int __b, short *__c)
7748 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7751 static void __ATTRS_o_ai
7752 vec_stvehx(vector bool short __a, int __b, unsigned short *__c)
7754 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7757 static void __ATTRS_o_ai
7758 vec_stvehx(vector pixel __a, int __b, short *__c)
7760 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7763 static void __ATTRS_o_ai
7764 vec_stvehx(vector pixel __a, int __b, unsigned short *__c)
7766 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7769 /* vec_stvewx */
7771 static void __ATTRS_o_ai
7772 vec_stvewx(vector int __a, int __b, int *__c)
7774 __builtin_altivec_stvewx(__a, __b, __c);
7777 static void __ATTRS_o_ai
7778 vec_stvewx(vector unsigned int __a, int __b, unsigned int *__c)
7780 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7783 static void __ATTRS_o_ai
7784 vec_stvewx(vector bool int __a, int __b, int *__c)
7786 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7789 static void __ATTRS_o_ai
7790 vec_stvewx(vector bool int __a, int __b, unsigned int *__c)
7792 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7795 static void __ATTRS_o_ai
7796 vec_stvewx(vector float __a, int __b, float *__c)
7798 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7801 /* vec_stl */
7803 static void __ATTRS_o_ai
7804 vec_stl(vector signed char __a, int __b, vector signed char *__c)
7806 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7809 static void __ATTRS_o_ai
7810 vec_stl(vector signed char __a, int __b, signed char *__c)
7812 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7815 static void __ATTRS_o_ai
7816 vec_stl(vector unsigned char __a, int __b, vector unsigned char *__c)
7818 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7821 static void __ATTRS_o_ai
7822 vec_stl(vector unsigned char __a, int __b, unsigned char *__c)
7824 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7827 static void __ATTRS_o_ai
7828 vec_stl(vector bool char __a, int __b, signed char *__c)
7830 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7833 static void __ATTRS_o_ai
7834 vec_stl(vector bool char __a, int __b, unsigned char *__c)
7836 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7839 static void __ATTRS_o_ai
7840 vec_stl(vector bool char __a, int __b, vector bool char *__c)
7842 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7845 static void __ATTRS_o_ai
7846 vec_stl(vector short __a, int __b, vector short *__c)
7848 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7851 static void __ATTRS_o_ai
7852 vec_stl(vector short __a, int __b, short *__c)
7854 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7857 static void __ATTRS_o_ai
7858 vec_stl(vector unsigned short __a, int __b, vector unsigned short *__c)
7860 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7863 static void __ATTRS_o_ai
7864 vec_stl(vector unsigned short __a, int __b, unsigned short *__c)
7866 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7869 static void __ATTRS_o_ai
7870 vec_stl(vector bool short __a, int __b, short *__c)
7872 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7875 static void __ATTRS_o_ai
7876 vec_stl(vector bool short __a, int __b, unsigned short *__c)
7878 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7881 static void __ATTRS_o_ai
7882 vec_stl(vector bool short __a, int __b, vector bool short *__c)
7884 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7887 static void __ATTRS_o_ai
7888 vec_stl(vector pixel __a, int __b, short *__c)
7890 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7893 static void __ATTRS_o_ai
7894 vec_stl(vector pixel __a, int __b, unsigned short *__c)
7896 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7899 static void __ATTRS_o_ai
7900 vec_stl(vector pixel __a, int __b, vector pixel *__c)
7902 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7905 static void __ATTRS_o_ai
7906 vec_stl(vector int __a, int __b, vector int *__c)
7908 __builtin_altivec_stvxl(__a, __b, __c);
7911 static void __ATTRS_o_ai
7912 vec_stl(vector int __a, int __b, int *__c)
7914 __builtin_altivec_stvxl(__a, __b, __c);
7917 static void __ATTRS_o_ai
7918 vec_stl(vector unsigned int __a, int __b, vector unsigned int *__c)
7920 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7923 static void __ATTRS_o_ai
7924 vec_stl(vector unsigned int __a, int __b, unsigned int *__c)
7926 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7929 static void __ATTRS_o_ai
7930 vec_stl(vector bool int __a, int __b, int *__c)
7932 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7935 static void __ATTRS_o_ai
7936 vec_stl(vector bool int __a, int __b, unsigned int *__c)
7938 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7941 static void __ATTRS_o_ai
7942 vec_stl(vector bool int __a, int __b, vector bool int *__c)
7944 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7947 static void __ATTRS_o_ai
7948 vec_stl(vector float __a, int __b, vector float *__c)
7950 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7953 static void __ATTRS_o_ai
7954 vec_stl(vector float __a, int __b, float *__c)
7956 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7959 /* vec_stvxl */
7961 static void __ATTRS_o_ai
7962 vec_stvxl(vector signed char __a, int __b, vector signed char *__c)
7964 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7967 static void __ATTRS_o_ai
7968 vec_stvxl(vector signed char __a, int __b, signed char *__c)
7970 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7973 static void __ATTRS_o_ai
7974 vec_stvxl(vector unsigned char __a, int __b, vector unsigned char *__c)
7976 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7979 static void __ATTRS_o_ai
7980 vec_stvxl(vector unsigned char __a, int __b, unsigned char *__c)
7982 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7985 static void __ATTRS_o_ai
7986 vec_stvxl(vector bool char __a, int __b, signed char *__c)
7988 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7991 static void __ATTRS_o_ai
7992 vec_stvxl(vector bool char __a, int __b, unsigned char *__c)
7994 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7997 static void __ATTRS_o_ai
7998 vec_stvxl(vector bool char __a, int __b, vector bool char *__c)
8000 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8003 static void __ATTRS_o_ai
8004 vec_stvxl(vector short __a, int __b, vector short *__c)
8006 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8009 static void __ATTRS_o_ai
8010 vec_stvxl(vector short __a, int __b, short *__c)
8012 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8015 static void __ATTRS_o_ai
8016 vec_stvxl(vector unsigned short __a, int __b, vector unsigned short *__c)
8018 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8021 static void __ATTRS_o_ai
8022 vec_stvxl(vector unsigned short __a, int __b, unsigned short *__c)
8024 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8027 static void __ATTRS_o_ai
8028 vec_stvxl(vector bool short __a, int __b, short *__c)
8030 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8033 static void __ATTRS_o_ai
8034 vec_stvxl(vector bool short __a, int __b, unsigned short *__c)
8036 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8039 static void __ATTRS_o_ai
8040 vec_stvxl(vector bool short __a, int __b, vector bool short *__c)
8042 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8045 static void __ATTRS_o_ai
8046 vec_stvxl(vector pixel __a, int __b, short *__c)
8048 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8051 static void __ATTRS_o_ai
8052 vec_stvxl(vector pixel __a, int __b, unsigned short *__c)
8054 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8057 static void __ATTRS_o_ai
8058 vec_stvxl(vector pixel __a, int __b, vector pixel *__c)
8060 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8063 static void __ATTRS_o_ai
8064 vec_stvxl(vector int __a, int __b, vector int *__c)
8066 __builtin_altivec_stvxl(__a, __b, __c);
8069 static void __ATTRS_o_ai
8070 vec_stvxl(vector int __a, int __b, int *__c)
8072 __builtin_altivec_stvxl(__a, __b, __c);
8075 static void __ATTRS_o_ai
8076 vec_stvxl(vector unsigned int __a, int __b, vector unsigned int *__c)
8078 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8081 static void __ATTRS_o_ai
8082 vec_stvxl(vector unsigned int __a, int __b, unsigned int *__c)
8084 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8087 static void __ATTRS_o_ai
8088 vec_stvxl(vector bool int __a, int __b, int *__c)
8090 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8093 static void __ATTRS_o_ai
8094 vec_stvxl(vector bool int __a, int __b, unsigned int *__c)
8096 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8099 static void __ATTRS_o_ai
8100 vec_stvxl(vector bool int __a, int __b, vector bool int *__c)
8102 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8105 static void __ATTRS_o_ai
8106 vec_stvxl(vector float __a, int __b, vector float *__c)
8108 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8111 static void __ATTRS_o_ai
8112 vec_stvxl(vector float __a, int __b, float *__c)
8114 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8117 /* vec_sub */
8119 static vector signed char __ATTRS_o_ai
8120 vec_sub(vector signed char __a, vector signed char __b)
8122 return __a - __b;
8125 static vector signed char __ATTRS_o_ai
8126 vec_sub(vector bool char __a, vector signed char __b)
8128 return (vector signed char)__a - __b;
8131 static vector signed char __ATTRS_o_ai
8132 vec_sub(vector signed char __a, vector bool char __b)
8134 return __a - (vector signed char)__b;
8137 static vector unsigned char __ATTRS_o_ai
8138 vec_sub(vector unsigned char __a, vector unsigned char __b)
8140 return __a - __b;
8143 static vector unsigned char __ATTRS_o_ai
8144 vec_sub(vector bool char __a, vector unsigned char __b)
8146 return (vector unsigned char)__a - __b;
8149 static vector unsigned char __ATTRS_o_ai
8150 vec_sub(vector unsigned char __a, vector bool char __b)
8152 return __a - (vector unsigned char)__b;
8155 static vector short __ATTRS_o_ai
8156 vec_sub(vector short __a, vector short __b)
8158 return __a - __b;
8161 static vector short __ATTRS_o_ai
8162 vec_sub(vector bool short __a, vector short __b)
8164 return (vector short)__a - __b;
8167 static vector short __ATTRS_o_ai
8168 vec_sub(vector short __a, vector bool short __b)
8170 return __a - (vector short)__b;
8173 static vector unsigned short __ATTRS_o_ai
8174 vec_sub(vector unsigned short __a, vector unsigned short __b)
8176 return __a - __b;
8179 static vector unsigned short __ATTRS_o_ai
8180 vec_sub(vector bool short __a, vector unsigned short __b)
8182 return (vector unsigned short)__a - __b;
8185 static vector unsigned short __ATTRS_o_ai
8186 vec_sub(vector unsigned short __a, vector bool short __b)
8188 return __a - (vector unsigned short)__b;
8191 static vector int __ATTRS_o_ai
8192 vec_sub(vector int __a, vector int __b)
8194 return __a - __b;
8197 static vector int __ATTRS_o_ai
8198 vec_sub(vector bool int __a, vector int __b)
8200 return (vector int)__a - __b;
8203 static vector int __ATTRS_o_ai
8204 vec_sub(vector int __a, vector bool int __b)
8206 return __a - (vector int)__b;
8209 static vector unsigned int __ATTRS_o_ai
8210 vec_sub(vector unsigned int __a, vector unsigned int __b)
8212 return __a - __b;
8215 static vector unsigned int __ATTRS_o_ai
8216 vec_sub(vector bool int __a, vector unsigned int __b)
8218 return (vector unsigned int)__a - __b;
8221 static vector unsigned int __ATTRS_o_ai
8222 vec_sub(vector unsigned int __a, vector bool int __b)
8224 return __a - (vector unsigned int)__b;
8227 static vector float __ATTRS_o_ai
8228 vec_sub(vector float __a, vector float __b)
8230 return __a - __b;
8233 /* vec_vsububm */
8235 #define __builtin_altivec_vsububm vec_vsububm
8237 static vector signed char __ATTRS_o_ai
8238 vec_vsububm(vector signed char __a, vector signed char __b)
8240 return __a - __b;
8243 static vector signed char __ATTRS_o_ai
8244 vec_vsububm(vector bool char __a, vector signed char __b)
8246 return (vector signed char)__a - __b;
8249 static vector signed char __ATTRS_o_ai
8250 vec_vsububm(vector signed char __a, vector bool char __b)
8252 return __a - (vector signed char)__b;
8255 static vector unsigned char __ATTRS_o_ai
8256 vec_vsububm(vector unsigned char __a, vector unsigned char __b)
8258 return __a - __b;
8261 static vector unsigned char __ATTRS_o_ai
8262 vec_vsububm(vector bool char __a, vector unsigned char __b)
8264 return (vector unsigned char)__a - __b;
8267 static vector unsigned char __ATTRS_o_ai
8268 vec_vsububm(vector unsigned char __a, vector bool char __b)
8270 return __a - (vector unsigned char)__b;
8273 /* vec_vsubuhm */
8275 #define __builtin_altivec_vsubuhm vec_vsubuhm
8277 static vector short __ATTRS_o_ai
8278 vec_vsubuhm(vector short __a, vector short __b)
8280 return __a - __b;
8283 static vector short __ATTRS_o_ai
8284 vec_vsubuhm(vector bool short __a, vector short __b)
8286 return (vector short)__a - __b;
8289 static vector short __ATTRS_o_ai
8290 vec_vsubuhm(vector short __a, vector bool short __b)
8292 return __a - (vector short)__b;
8295 static vector unsigned short __ATTRS_o_ai
8296 vec_vsubuhm(vector unsigned short __a, vector unsigned short __b)
8298 return __a - __b;
8301 static vector unsigned short __ATTRS_o_ai
8302 vec_vsubuhm(vector bool short __a, vector unsigned short __b)
8304 return (vector unsigned short)__a - __b;
8307 static vector unsigned short __ATTRS_o_ai
8308 vec_vsubuhm(vector unsigned short __a, vector bool short __b)
8310 return __a - (vector unsigned short)__b;
8313 /* vec_vsubuwm */
8315 #define __builtin_altivec_vsubuwm vec_vsubuwm
8317 static vector int __ATTRS_o_ai
8318 vec_vsubuwm(vector int __a, vector int __b)
8320 return __a - __b;
8323 static vector int __ATTRS_o_ai
8324 vec_vsubuwm(vector bool int __a, vector int __b)
8326 return (vector int)__a - __b;
8329 static vector int __ATTRS_o_ai
8330 vec_vsubuwm(vector int __a, vector bool int __b)
8332 return __a - (vector int)__b;
8335 static vector unsigned int __ATTRS_o_ai
8336 vec_vsubuwm(vector unsigned int __a, vector unsigned int __b)
8338 return __a - __b;
8341 static vector unsigned int __ATTRS_o_ai
8342 vec_vsubuwm(vector bool int __a, vector unsigned int __b)
8344 return (vector unsigned int)__a - __b;
8347 static vector unsigned int __ATTRS_o_ai
8348 vec_vsubuwm(vector unsigned int __a, vector bool int __b)
8350 return __a - (vector unsigned int)__b;
8353 /* vec_vsubfp */
8355 #define __builtin_altivec_vsubfp vec_vsubfp
8357 static vector float __attribute__((__always_inline__))
8358 vec_vsubfp(vector float __a, vector float __b)
8360 return __a - __b;
8363 /* vec_subc */
8365 static vector unsigned int __attribute__((__always_inline__))
8366 vec_subc(vector unsigned int __a, vector unsigned int __b)
8368 return __builtin_altivec_vsubcuw(__a, __b);
8371 /* vec_vsubcuw */
8373 static vector unsigned int __attribute__((__always_inline__))
8374 vec_vsubcuw(vector unsigned int __a, vector unsigned int __b)
8376 return __builtin_altivec_vsubcuw(__a, __b);
8379 /* vec_subs */
8381 static vector signed char __ATTRS_o_ai
8382 vec_subs(vector signed char __a, vector signed char __b)
8384 return __builtin_altivec_vsubsbs(__a, __b);
8387 static vector signed char __ATTRS_o_ai
8388 vec_subs(vector bool char __a, vector signed char __b)
8390 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
8393 static vector signed char __ATTRS_o_ai
8394 vec_subs(vector signed char __a, vector bool char __b)
8396 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
8399 static vector unsigned char __ATTRS_o_ai
8400 vec_subs(vector unsigned char __a, vector unsigned char __b)
8402 return __builtin_altivec_vsububs(__a, __b);
8405 static vector unsigned char __ATTRS_o_ai
8406 vec_subs(vector bool char __a, vector unsigned char __b)
8408 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
8411 static vector unsigned char __ATTRS_o_ai
8412 vec_subs(vector unsigned char __a, vector bool char __b)
8414 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
8417 static vector short __ATTRS_o_ai
8418 vec_subs(vector short __a, vector short __b)
8420 return __builtin_altivec_vsubshs(__a, __b);
8423 static vector short __ATTRS_o_ai
8424 vec_subs(vector bool short __a, vector short __b)
8426 return __builtin_altivec_vsubshs((vector short)__a, __b);
8429 static vector short __ATTRS_o_ai
8430 vec_subs(vector short __a, vector bool short __b)
8432 return __builtin_altivec_vsubshs(__a, (vector short)__b);
8435 static vector unsigned short __ATTRS_o_ai
8436 vec_subs(vector unsigned short __a, vector unsigned short __b)
8438 return __builtin_altivec_vsubuhs(__a, __b);
8441 static vector unsigned short __ATTRS_o_ai
8442 vec_subs(vector bool short __a, vector unsigned short __b)
8444 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
8447 static vector unsigned short __ATTRS_o_ai
8448 vec_subs(vector unsigned short __a, vector bool short __b)
8450 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
8453 static vector int __ATTRS_o_ai
8454 vec_subs(vector int __a, vector int __b)
8456 return __builtin_altivec_vsubsws(__a, __b);
8459 static vector int __ATTRS_o_ai
8460 vec_subs(vector bool int __a, vector int __b)
8462 return __builtin_altivec_vsubsws((vector int)__a, __b);
8465 static vector int __ATTRS_o_ai
8466 vec_subs(vector int __a, vector bool int __b)
8468 return __builtin_altivec_vsubsws(__a, (vector int)__b);
8471 static vector unsigned int __ATTRS_o_ai
8472 vec_subs(vector unsigned int __a, vector unsigned int __b)
8474 return __builtin_altivec_vsubuws(__a, __b);
8477 static vector unsigned int __ATTRS_o_ai
8478 vec_subs(vector bool int __a, vector unsigned int __b)
8480 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
8483 static vector unsigned int __ATTRS_o_ai
8484 vec_subs(vector unsigned int __a, vector bool int __b)
8486 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
8489 /* vec_vsubsbs */
8491 static vector signed char __ATTRS_o_ai
8492 vec_vsubsbs(vector signed char __a, vector signed char __b)
8494 return __builtin_altivec_vsubsbs(__a, __b);
8497 static vector signed char __ATTRS_o_ai
8498 vec_vsubsbs(vector bool char __a, vector signed char __b)
8500 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
8503 static vector signed char __ATTRS_o_ai
8504 vec_vsubsbs(vector signed char __a, vector bool char __b)
8506 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
8509 /* vec_vsububs */
8511 static vector unsigned char __ATTRS_o_ai
8512 vec_vsububs(vector unsigned char __a, vector unsigned char __b)
8514 return __builtin_altivec_vsububs(__a, __b);
8517 static vector unsigned char __ATTRS_o_ai
8518 vec_vsububs(vector bool char __a, vector unsigned char __b)
8520 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
8523 static vector unsigned char __ATTRS_o_ai
8524 vec_vsububs(vector unsigned char __a, vector bool char __b)
8526 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
8529 /* vec_vsubshs */
8531 static vector short __ATTRS_o_ai
8532 vec_vsubshs(vector short __a, vector short __b)
8534 return __builtin_altivec_vsubshs(__a, __b);
8537 static vector short __ATTRS_o_ai
8538 vec_vsubshs(vector bool short __a, vector short __b)
8540 return __builtin_altivec_vsubshs((vector short)__a, __b);
8543 static vector short __ATTRS_o_ai
8544 vec_vsubshs(vector short __a, vector bool short __b)
8546 return __builtin_altivec_vsubshs(__a, (vector short)__b);
8549 /* vec_vsubuhs */
8551 static vector unsigned short __ATTRS_o_ai
8552 vec_vsubuhs(vector unsigned short __a, vector unsigned short __b)
8554 return __builtin_altivec_vsubuhs(__a, __b);
8557 static vector unsigned short __ATTRS_o_ai
8558 vec_vsubuhs(vector bool short __a, vector unsigned short __b)
8560 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
8563 static vector unsigned short __ATTRS_o_ai
8564 vec_vsubuhs(vector unsigned short __a, vector bool short __b)
8566 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
8569 /* vec_vsubsws */
8571 static vector int __ATTRS_o_ai
8572 vec_vsubsws(vector int __a, vector int __b)
8574 return __builtin_altivec_vsubsws(__a, __b);
8577 static vector int __ATTRS_o_ai
8578 vec_vsubsws(vector bool int __a, vector int __b)
8580 return __builtin_altivec_vsubsws((vector int)__a, __b);
8583 static vector int __ATTRS_o_ai
8584 vec_vsubsws(vector int __a, vector bool int __b)
8586 return __builtin_altivec_vsubsws(__a, (vector int)__b);
8589 /* vec_vsubuws */
8591 static vector unsigned int __ATTRS_o_ai
8592 vec_vsubuws(vector unsigned int __a, vector unsigned int __b)
8594 return __builtin_altivec_vsubuws(__a, __b);
8597 static vector unsigned int __ATTRS_o_ai
8598 vec_vsubuws(vector bool int __a, vector unsigned int __b)
8600 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
8603 static vector unsigned int __ATTRS_o_ai
8604 vec_vsubuws(vector unsigned int __a, vector bool int __b)
8606 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
8609 /* vec_sum4s */
8611 static vector int __ATTRS_o_ai
8612 vec_sum4s(vector signed char __a, vector int __b)
8614 return __builtin_altivec_vsum4sbs(__a, __b);
8617 static vector unsigned int __ATTRS_o_ai
8618 vec_sum4s(vector unsigned char __a, vector unsigned int __b)
8620 return __builtin_altivec_vsum4ubs(__a, __b);
8623 static vector int __ATTRS_o_ai
8624 vec_sum4s(vector signed short __a, vector int __b)
8626 return __builtin_altivec_vsum4shs(__a, __b);
8629 /* vec_vsum4sbs */
8631 static vector int __attribute__((__always_inline__))
8632 vec_vsum4sbs(vector signed char __a, vector int __b)
8634 return __builtin_altivec_vsum4sbs(__a, __b);
8637 /* vec_vsum4ubs */
8639 static vector unsigned int __attribute__((__always_inline__))
8640 vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b)
8642 return __builtin_altivec_vsum4ubs(__a, __b);
8645 /* vec_vsum4shs */
8647 static vector int __attribute__((__always_inline__))
8648 vec_vsum4shs(vector signed short __a, vector int __b)
8650 return __builtin_altivec_vsum4shs(__a, __b);
8653 /* vec_sum2s */
8655 /* The vsum2sws instruction has a big-endian bias, so that the second
8656 input vector and the result always reference big-endian elements
8657 1 and 3 (little-endian element 0 and 2). For ease of porting the
8658 programmer wants elements 1 and 3 in both cases, so for little
8659 endian we must perform some permutes. */
8661 static vector signed int __attribute__((__always_inline__))
8662 vec_sum2s(vector int __a, vector int __b)
8664 #ifdef __LITTLE_ENDIAN__
8665 vector int __c = (vector signed int)
8666 vec_perm(__b, __b, (vector unsigned char)
8667 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8668 __c = __builtin_altivec_vsum2sws(__a, __c);
8669 return (vector signed int)
8670 vec_perm(__c, __c, (vector unsigned char)
8671 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8672 #else
8673 return __builtin_altivec_vsum2sws(__a, __b);
8674 #endif
8677 /* vec_vsum2sws */
8679 static vector signed int __attribute__((__always_inline__))
8680 vec_vsum2sws(vector int __a, vector int __b)
8682 #ifdef __LITTLE_ENDIAN__
8683 vector int __c = (vector signed int)
8684 vec_perm(__b, __b, (vector unsigned char)
8685 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8686 __c = __builtin_altivec_vsum2sws(__a, __c);
8687 return (vector signed int)
8688 vec_perm(__c, __c, (vector unsigned char)
8689 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8690 #else
8691 return __builtin_altivec_vsum2sws(__a, __b);
8692 #endif
8695 /* vec_sums */
8697 /* The vsumsws instruction has a big-endian bias, so that the second
8698 input vector and the result always reference big-endian element 3
8699 (little-endian element 0). For ease of porting the programmer
8700 wants element 3 in both cases, so for little endian we must perform
8701 some permutes. */
8703 static vector signed int __attribute__((__always_inline__))
8704 vec_sums(vector signed int __a, vector signed int __b)
8706 #ifdef __LITTLE_ENDIAN__
8707 __b = (vector signed int)vec_splat(__b, 3);
8708 __b = __builtin_altivec_vsumsws(__a, __b);
8709 return (vector signed int)(0, 0, 0, __b[0]);
8710 #else
8711 return __builtin_altivec_vsumsws(__a, __b);
8712 #endif
8715 /* vec_vsumsws */
8717 static vector signed int __attribute__((__always_inline__))
8718 vec_vsumsws(vector signed int __a, vector signed int __b)
8720 #ifdef __LITTLE_ENDIAN__
8721 __b = (vector signed int)vec_splat(__b, 3);
8722 __b = __builtin_altivec_vsumsws(__a, __b);
8723 return (vector signed int)(0, 0, 0, __b[0]);
8724 #else
8725 return __builtin_altivec_vsumsws(__a, __b);
8726 #endif
8729 /* vec_trunc */
8731 static vector float __attribute__((__always_inline__))
8732 vec_trunc(vector float __a)
8734 return __builtin_altivec_vrfiz(__a);
8737 /* vec_vrfiz */
8739 static vector float __attribute__((__always_inline__))
8740 vec_vrfiz(vector float __a)
8742 return __builtin_altivec_vrfiz(__a);
8745 /* vec_unpackh */
8747 /* The vector unpack instructions all have a big-endian bias, so for
8748 little endian we must reverse the meanings of "high" and "low." */
8750 static vector short __ATTRS_o_ai
8751 vec_unpackh(vector signed char __a)
8753 #ifdef __LITTLE_ENDIAN__
8754 return __builtin_altivec_vupklsb((vector char)__a);
8755 #else
8756 return __builtin_altivec_vupkhsb((vector char)__a);
8757 #endif
8760 static vector bool short __ATTRS_o_ai
8761 vec_unpackh(vector bool char __a)
8763 #ifdef __LITTLE_ENDIAN__
8764 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8765 #else
8766 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8767 #endif
8770 static vector int __ATTRS_o_ai
8771 vec_unpackh(vector short __a)
8773 #ifdef __LITTLE_ENDIAN__
8774 return __builtin_altivec_vupklsh(__a);
8775 #else
8776 return __builtin_altivec_vupkhsh(__a);
8777 #endif
8780 static vector bool int __ATTRS_o_ai
8781 vec_unpackh(vector bool short __a)
8783 #ifdef __LITTLE_ENDIAN__
8784 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8785 #else
8786 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8787 #endif
8790 static vector unsigned int __ATTRS_o_ai
8791 vec_unpackh(vector pixel __a)
8793 #ifdef __LITTLE_ENDIAN__
8794 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8795 #else
8796 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8797 #endif
8800 /* vec_vupkhsb */
8802 static vector short __ATTRS_o_ai
8803 vec_vupkhsb(vector signed char __a)
8805 #ifdef __LITTLE_ENDIAN__
8806 return __builtin_altivec_vupklsb((vector char)__a);
8807 #else
8808 return __builtin_altivec_vupkhsb((vector char)__a);
8809 #endif
8812 static vector bool short __ATTRS_o_ai
8813 vec_vupkhsb(vector bool char __a)
8815 #ifdef __LITTLE_ENDIAN__
8816 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8817 #else
8818 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8819 #endif
8822 /* vec_vupkhsh */
8824 static vector int __ATTRS_o_ai
8825 vec_vupkhsh(vector short __a)
8827 #ifdef __LITTLE_ENDIAN__
8828 return __builtin_altivec_vupklsh(__a);
8829 #else
8830 return __builtin_altivec_vupkhsh(__a);
8831 #endif
8834 static vector bool int __ATTRS_o_ai
8835 vec_vupkhsh(vector bool short __a)
8837 #ifdef __LITTLE_ENDIAN__
8838 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8839 #else
8840 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8841 #endif
8844 static vector unsigned int __ATTRS_o_ai
8845 vec_vupkhsh(vector pixel __a)
8847 #ifdef __LITTLE_ENDIAN__
8848 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8849 #else
8850 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8851 #endif
8854 /* vec_unpackl */
8856 static vector short __ATTRS_o_ai
8857 vec_unpackl(vector signed char __a)
8859 #ifdef __LITTLE_ENDIAN__
8860 return __builtin_altivec_vupkhsb((vector char)__a);
8861 #else
8862 return __builtin_altivec_vupklsb((vector char)__a);
8863 #endif
8866 static vector bool short __ATTRS_o_ai
8867 vec_unpackl(vector bool char __a)
8869 #ifdef __LITTLE_ENDIAN__
8870 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8871 #else
8872 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8873 #endif
8876 static vector int __ATTRS_o_ai
8877 vec_unpackl(vector short __a)
8879 #ifdef __LITTLE_ENDIAN__
8880 return __builtin_altivec_vupkhsh(__a);
8881 #else
8882 return __builtin_altivec_vupklsh(__a);
8883 #endif
8886 static vector bool int __ATTRS_o_ai
8887 vec_unpackl(vector bool short __a)
8889 #ifdef __LITTLE_ENDIAN__
8890 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8891 #else
8892 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8893 #endif
8896 static vector unsigned int __ATTRS_o_ai
8897 vec_unpackl(vector pixel __a)
8899 #ifdef __LITTLE_ENDIAN__
8900 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8901 #else
8902 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8903 #endif
8906 /* vec_vupklsb */
8908 static vector short __ATTRS_o_ai
8909 vec_vupklsb(vector signed char __a)
8911 #ifdef __LITTLE_ENDIAN__
8912 return __builtin_altivec_vupkhsb((vector char)__a);
8913 #else
8914 return __builtin_altivec_vupklsb((vector char)__a);
8915 #endif
8918 static vector bool short __ATTRS_o_ai
8919 vec_vupklsb(vector bool char __a)
8921 #ifdef __LITTLE_ENDIAN__
8922 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8923 #else
8924 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8925 #endif
8928 /* vec_vupklsh */
8930 static vector int __ATTRS_o_ai
8931 vec_vupklsh(vector short __a)
8933 #ifdef __LITTLE_ENDIAN__
8934 return __builtin_altivec_vupkhsh(__a);
8935 #else
8936 return __builtin_altivec_vupklsh(__a);
8937 #endif
8940 static vector bool int __ATTRS_o_ai
8941 vec_vupklsh(vector bool short __a)
8943 #ifdef __LITTLE_ENDIAN__
8944 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8945 #else
8946 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8947 #endif
8950 static vector unsigned int __ATTRS_o_ai
8951 vec_vupklsh(vector pixel __a)
8953 #ifdef __LITTLE_ENDIAN__
8954 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8955 #else
8956 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8957 #endif
8960 /* vec_vsx_ld */
8962 #ifdef __VSX__
8964 static vector signed int __ATTRS_o_ai
8965 vec_vsx_ld(int __a, const vector signed int *__b)
8967 return (vector signed int)__builtin_vsx_lxvw4x(__a, __b);
8970 static vector unsigned int __ATTRS_o_ai
8971 vec_vsx_ld(int __a, const vector unsigned int *__b)
8973 return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b);
8976 static vector float __ATTRS_o_ai
8977 vec_vsx_ld(int __a, const vector float *__b)
8979 return (vector float)__builtin_vsx_lxvw4x(__a, __b);
8982 static vector signed long long __ATTRS_o_ai
8983 vec_vsx_ld(int __a, const vector signed long long *__b)
8985 return (vector signed long long)__builtin_vsx_lxvd2x(__a, __b);
8988 static vector unsigned long long __ATTRS_o_ai
8989 vec_vsx_ld(int __a, const vector unsigned long long *__b)
8991 return (vector unsigned long long)__builtin_vsx_lxvd2x(__a, __b);
8994 static vector double __ATTRS_o_ai
8995 vec_vsx_ld(int __a, const vector double *__b)
8997 return (vector double)__builtin_vsx_lxvd2x(__a, __b);
9000 #endif
9002 /* vec_vsx_st */
9004 #ifdef __VSX__
9006 static void __ATTRS_o_ai
9007 vec_vsx_st(vector signed int __a, int __b, vector signed int *__c)
9009 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9012 static void __ATTRS_o_ai
9013 vec_vsx_st(vector unsigned int __a, int __b, vector unsigned int *__c)
9015 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9018 static void __ATTRS_o_ai
9019 vec_vsx_st(vector float __a, int __b, vector float *__c)
9021 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9024 static void __ATTRS_o_ai
9025 vec_vsx_st(vector signed long long __a, int __b, vector signed long long *__c)
9027 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9030 static void __ATTRS_o_ai
9031 vec_vsx_st(vector unsigned long long __a, int __b,
9032 vector unsigned long long *__c)
9034 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9037 static void __ATTRS_o_ai
9038 vec_vsx_st(vector double __a, int __b, vector double *__c)
9040 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9043 #endif
9045 /* vec_xor */
9047 #define __builtin_altivec_vxor vec_xor
9049 static vector signed char __ATTRS_o_ai
9050 vec_xor(vector signed char __a, vector signed char __b)
9052 return __a ^ __b;
9055 static vector signed char __ATTRS_o_ai
9056 vec_xor(vector bool char __a, vector signed char __b)
9058 return (vector signed char)__a ^ __b;
9061 static vector signed char __ATTRS_o_ai
9062 vec_xor(vector signed char __a, vector bool char __b)
9064 return __a ^ (vector signed char)__b;
9067 static vector unsigned char __ATTRS_o_ai
9068 vec_xor(vector unsigned char __a, vector unsigned char __b)
9070 return __a ^ __b;
9073 static vector unsigned char __ATTRS_o_ai
9074 vec_xor(vector bool char __a, vector unsigned char __b)
9076 return (vector unsigned char)__a ^ __b;
9079 static vector unsigned char __ATTRS_o_ai
9080 vec_xor(vector unsigned char __a, vector bool char __b)
9082 return __a ^ (vector unsigned char)__b;
9085 static vector bool char __ATTRS_o_ai
9086 vec_xor(vector bool char __a, vector bool char __b)
9088 return __a ^ __b;
9091 static vector short __ATTRS_o_ai
9092 vec_xor(vector short __a, vector short __b)
9094 return __a ^ __b;
9097 static vector short __ATTRS_o_ai
9098 vec_xor(vector bool short __a, vector short __b)
9100 return (vector short)__a ^ __b;
9103 static vector short __ATTRS_o_ai
9104 vec_xor(vector short __a, vector bool short __b)
9106 return __a ^ (vector short)__b;
9109 static vector unsigned short __ATTRS_o_ai
9110 vec_xor(vector unsigned short __a, vector unsigned short __b)
9112 return __a ^ __b;
9115 static vector unsigned short __ATTRS_o_ai
9116 vec_xor(vector bool short __a, vector unsigned short __b)
9118 return (vector unsigned short)__a ^ __b;
9121 static vector unsigned short __ATTRS_o_ai
9122 vec_xor(vector unsigned short __a, vector bool short __b)
9124 return __a ^ (vector unsigned short)__b;
9127 static vector bool short __ATTRS_o_ai
9128 vec_xor(vector bool short __a, vector bool short __b)
9130 return __a ^ __b;
9133 static vector int __ATTRS_o_ai
9134 vec_xor(vector int __a, vector int __b)
9136 return __a ^ __b;
9139 static vector int __ATTRS_o_ai
9140 vec_xor(vector bool int __a, vector int __b)
9142 return (vector int)__a ^ __b;
9145 static vector int __ATTRS_o_ai
9146 vec_xor(vector int __a, vector bool int __b)
9148 return __a ^ (vector int)__b;
9151 static vector unsigned int __ATTRS_o_ai
9152 vec_xor(vector unsigned int __a, vector unsigned int __b)
9154 return __a ^ __b;
9157 static vector unsigned int __ATTRS_o_ai
9158 vec_xor(vector bool int __a, vector unsigned int __b)
9160 return (vector unsigned int)__a ^ __b;
9163 static vector unsigned int __ATTRS_o_ai
9164 vec_xor(vector unsigned int __a, vector bool int __b)
9166 return __a ^ (vector unsigned int)__b;
9169 static vector bool int __ATTRS_o_ai
9170 vec_xor(vector bool int __a, vector bool int __b)
9172 return __a ^ __b;
9175 static vector float __ATTRS_o_ai
9176 vec_xor(vector float __a, vector float __b)
9178 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9179 return (vector float)__res;
9182 static vector float __ATTRS_o_ai
9183 vec_xor(vector bool int __a, vector float __b)
9185 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9186 return (vector float)__res;
9189 static vector float __ATTRS_o_ai
9190 vec_xor(vector float __a, vector bool int __b)
9192 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9193 return (vector float)__res;
9196 /* vec_vxor */
9198 static vector signed char __ATTRS_o_ai
9199 vec_vxor(vector signed char __a, vector signed char __b)
9201 return __a ^ __b;
9204 static vector signed char __ATTRS_o_ai
9205 vec_vxor(vector bool char __a, vector signed char __b)
9207 return (vector signed char)__a ^ __b;
9210 static vector signed char __ATTRS_o_ai
9211 vec_vxor(vector signed char __a, vector bool char __b)
9213 return __a ^ (vector signed char)__b;
9216 static vector unsigned char __ATTRS_o_ai
9217 vec_vxor(vector unsigned char __a, vector unsigned char __b)
9219 return __a ^ __b;
9222 static vector unsigned char __ATTRS_o_ai
9223 vec_vxor(vector bool char __a, vector unsigned char __b)
9225 return (vector unsigned char)__a ^ __b;
9228 static vector unsigned char __ATTRS_o_ai
9229 vec_vxor(vector unsigned char __a, vector bool char __b)
9231 return __a ^ (vector unsigned char)__b;
9234 static vector bool char __ATTRS_o_ai
9235 vec_vxor(vector bool char __a, vector bool char __b)
9237 return __a ^ __b;
9240 static vector short __ATTRS_o_ai
9241 vec_vxor(vector short __a, vector short __b)
9243 return __a ^ __b;
9246 static vector short __ATTRS_o_ai
9247 vec_vxor(vector bool short __a, vector short __b)
9249 return (vector short)__a ^ __b;
9252 static vector short __ATTRS_o_ai
9253 vec_vxor(vector short __a, vector bool short __b)
9255 return __a ^ (vector short)__b;
9258 static vector unsigned short __ATTRS_o_ai
9259 vec_vxor(vector unsigned short __a, vector unsigned short __b)
9261 return __a ^ __b;
9264 static vector unsigned short __ATTRS_o_ai
9265 vec_vxor(vector bool short __a, vector unsigned short __b)
9267 return (vector unsigned short)__a ^ __b;
9270 static vector unsigned short __ATTRS_o_ai
9271 vec_vxor(vector unsigned short __a, vector bool short __b)
9273 return __a ^ (vector unsigned short)__b;
9276 static vector bool short __ATTRS_o_ai
9277 vec_vxor(vector bool short __a, vector bool short __b)
9279 return __a ^ __b;
9282 static vector int __ATTRS_o_ai
9283 vec_vxor(vector int __a, vector int __b)
9285 return __a ^ __b;
9288 static vector int __ATTRS_o_ai
9289 vec_vxor(vector bool int __a, vector int __b)
9291 return (vector int)__a ^ __b;
9294 static vector int __ATTRS_o_ai
9295 vec_vxor(vector int __a, vector bool int __b)
9297 return __a ^ (vector int)__b;
9300 static vector unsigned int __ATTRS_o_ai
9301 vec_vxor(vector unsigned int __a, vector unsigned int __b)
9303 return __a ^ __b;
9306 static vector unsigned int __ATTRS_o_ai
9307 vec_vxor(vector bool int __a, vector unsigned int __b)
9309 return (vector unsigned int)__a ^ __b;
9312 static vector unsigned int __ATTRS_o_ai
9313 vec_vxor(vector unsigned int __a, vector bool int __b)
9315 return __a ^ (vector unsigned int)__b;
9318 static vector bool int __ATTRS_o_ai
9319 vec_vxor(vector bool int __a, vector bool int __b)
9321 return __a ^ __b;
9324 static vector float __ATTRS_o_ai
9325 vec_vxor(vector float __a, vector float __b)
9327 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9328 return (vector float)__res;
9331 static vector float __ATTRS_o_ai
9332 vec_vxor(vector bool int __a, vector float __b)
9334 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9335 return (vector float)__res;
9338 static vector float __ATTRS_o_ai
9339 vec_vxor(vector float __a, vector bool int __b)
9341 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9342 return (vector float)__res;
9345 /* ------------------------ extensions for CBEA ----------------------------- */
9347 /* vec_extract */
9349 static signed char __ATTRS_o_ai
9350 vec_extract(vector signed char __a, int __b)
9352 return __a[__b];
9355 static unsigned char __ATTRS_o_ai
9356 vec_extract(vector unsigned char __a, int __b)
9358 return __a[__b];
9361 static short __ATTRS_o_ai
9362 vec_extract(vector short __a, int __b)
9364 return __a[__b];
9367 static unsigned short __ATTRS_o_ai
9368 vec_extract(vector unsigned short __a, int __b)
9370 return __a[__b];
9373 static int __ATTRS_o_ai
9374 vec_extract(vector int __a, int __b)
9376 return __a[__b];
9379 static unsigned int __ATTRS_o_ai
9380 vec_extract(vector unsigned int __a, int __b)
9382 return __a[__b];
9385 static float __ATTRS_o_ai
9386 vec_extract(vector float __a, int __b)
9388 return __a[__b];
9391 /* vec_insert */
9393 static vector signed char __ATTRS_o_ai
9394 vec_insert(signed char __a, vector signed char __b, int __c)
9396 __b[__c] = __a;
9397 return __b;
9400 static vector unsigned char __ATTRS_o_ai
9401 vec_insert(unsigned char __a, vector unsigned char __b, int __c)
9403 __b[__c] = __a;
9404 return __b;
9407 static vector short __ATTRS_o_ai
9408 vec_insert(short __a, vector short __b, int __c)
9410 __b[__c] = __a;
9411 return __b;
9414 static vector unsigned short __ATTRS_o_ai
9415 vec_insert(unsigned short __a, vector unsigned short __b, int __c)
9417 __b[__c] = __a;
9418 return __b;
9421 static vector int __ATTRS_o_ai
9422 vec_insert(int __a, vector int __b, int __c)
9424 __b[__c] = __a;
9425 return __b;
9428 static vector unsigned int __ATTRS_o_ai
9429 vec_insert(unsigned int __a, vector unsigned int __b, int __c)
9431 __b[__c] = __a;
9432 return __b;
9435 static vector float __ATTRS_o_ai
9436 vec_insert(float __a, vector float __b, int __c)
9438 __b[__c] = __a;
9439 return __b;
9442 /* vec_lvlx */
9444 static vector signed char __ATTRS_o_ai
9445 vec_lvlx(int __a, const signed char *__b)
9447 return vec_perm(vec_ld(__a, __b),
9448 (vector signed char)(0),
9449 vec_lvsl(__a, __b));
9452 static vector signed char __ATTRS_o_ai
9453 vec_lvlx(int __a, const vector signed char *__b)
9455 return vec_perm(vec_ld(__a, __b),
9456 (vector signed char)(0),
9457 vec_lvsl(__a, (unsigned char *)__b));
9460 static vector unsigned char __ATTRS_o_ai
9461 vec_lvlx(int __a, const unsigned char *__b)
9463 return vec_perm(vec_ld(__a, __b),
9464 (vector unsigned char)(0),
9465 vec_lvsl(__a, __b));
9468 static vector unsigned char __ATTRS_o_ai
9469 vec_lvlx(int __a, const vector unsigned char *__b)
9471 return vec_perm(vec_ld(__a, __b),
9472 (vector unsigned char)(0),
9473 vec_lvsl(__a, (unsigned char *)__b));
9476 static vector bool char __ATTRS_o_ai
9477 vec_lvlx(int __a, const vector bool char *__b)
9479 return vec_perm(vec_ld(__a, __b),
9480 (vector bool char)(0),
9481 vec_lvsl(__a, (unsigned char *)__b));
9484 static vector short __ATTRS_o_ai
9485 vec_lvlx(int __a, const short *__b)
9487 return vec_perm(vec_ld(__a, __b),
9488 (vector short)(0),
9489 vec_lvsl(__a, __b));
9492 static vector short __ATTRS_o_ai
9493 vec_lvlx(int __a, const vector short *__b)
9495 return vec_perm(vec_ld(__a, __b),
9496 (vector short)(0),
9497 vec_lvsl(__a, (unsigned char *)__b));
9500 static vector unsigned short __ATTRS_o_ai
9501 vec_lvlx(int __a, const unsigned short *__b)
9503 return vec_perm(vec_ld(__a, __b),
9504 (vector unsigned short)(0),
9505 vec_lvsl(__a, __b));
9508 static vector unsigned short __ATTRS_o_ai
9509 vec_lvlx(int __a, const vector unsigned short *__b)
9511 return vec_perm(vec_ld(__a, __b),
9512 (vector unsigned short)(0),
9513 vec_lvsl(__a, (unsigned char *)__b));
9516 static vector bool short __ATTRS_o_ai
9517 vec_lvlx(int __a, const vector bool short *__b)
9519 return vec_perm(vec_ld(__a, __b),
9520 (vector bool short)(0),
9521 vec_lvsl(__a, (unsigned char *)__b));
9524 static vector pixel __ATTRS_o_ai
9525 vec_lvlx(int __a, const vector pixel *__b)
9527 return vec_perm(vec_ld(__a, __b),
9528 (vector pixel)(0),
9529 vec_lvsl(__a, (unsigned char *)__b));
9532 static vector int __ATTRS_o_ai
9533 vec_lvlx(int __a, const int *__b)
9535 return vec_perm(vec_ld(__a, __b),
9536 (vector int)(0),
9537 vec_lvsl(__a, __b));
9540 static vector int __ATTRS_o_ai
9541 vec_lvlx(int __a, const vector int *__b)
9543 return vec_perm(vec_ld(__a, __b),
9544 (vector int)(0),
9545 vec_lvsl(__a, (unsigned char *)__b));
9548 static vector unsigned int __ATTRS_o_ai
9549 vec_lvlx(int __a, const unsigned int *__b)
9551 return vec_perm(vec_ld(__a, __b),
9552 (vector unsigned int)(0),
9553 vec_lvsl(__a, __b));
9556 static vector unsigned int __ATTRS_o_ai
9557 vec_lvlx(int __a, const vector unsigned int *__b)
9559 return vec_perm(vec_ld(__a, __b),
9560 (vector unsigned int)(0),
9561 vec_lvsl(__a, (unsigned char *)__b));
9564 static vector bool int __ATTRS_o_ai
9565 vec_lvlx(int __a, const vector bool int *__b)
9567 return vec_perm(vec_ld(__a, __b),
9568 (vector bool int)(0),
9569 vec_lvsl(__a, (unsigned char *)__b));
9572 static vector float __ATTRS_o_ai
9573 vec_lvlx(int __a, const float *__b)
9575 return vec_perm(vec_ld(__a, __b),
9576 (vector float)(0),
9577 vec_lvsl(__a, __b));
9580 static vector float __ATTRS_o_ai
9581 vec_lvlx(int __a, const vector float *__b)
9583 return vec_perm(vec_ld(__a, __b),
9584 (vector float)(0),
9585 vec_lvsl(__a, (unsigned char *)__b));
9588 /* vec_lvlxl */
9590 static vector signed char __ATTRS_o_ai
9591 vec_lvlxl(int __a, const signed char *__b)
9593 return vec_perm(vec_ldl(__a, __b),
9594 (vector signed char)(0),
9595 vec_lvsl(__a, __b));
9598 static vector signed char __ATTRS_o_ai
9599 vec_lvlxl(int __a, const vector signed char *__b)
9601 return vec_perm(vec_ldl(__a, __b),
9602 (vector signed char)(0),
9603 vec_lvsl(__a, (unsigned char *)__b));
9606 static vector unsigned char __ATTRS_o_ai
9607 vec_lvlxl(int __a, const unsigned char *__b)
9609 return vec_perm(vec_ldl(__a, __b),
9610 (vector unsigned char)(0),
9611 vec_lvsl(__a, __b));
9614 static vector unsigned char __ATTRS_o_ai
9615 vec_lvlxl(int __a, const vector unsigned char *__b)
9617 return vec_perm(vec_ldl(__a, __b),
9618 (vector unsigned char)(0),
9619 vec_lvsl(__a, (unsigned char *)__b));
9622 static vector bool char __ATTRS_o_ai
9623 vec_lvlxl(int __a, const vector bool char *__b)
9625 return vec_perm(vec_ldl(__a, __b),
9626 (vector bool char)(0),
9627 vec_lvsl(__a, (unsigned char *)__b));
9630 static vector short __ATTRS_o_ai
9631 vec_lvlxl(int __a, const short *__b)
9633 return vec_perm(vec_ldl(__a, __b),
9634 (vector short)(0),
9635 vec_lvsl(__a, __b));
9638 static vector short __ATTRS_o_ai
9639 vec_lvlxl(int __a, const vector short *__b)
9641 return vec_perm(vec_ldl(__a, __b),
9642 (vector short)(0),
9643 vec_lvsl(__a, (unsigned char *)__b));
9646 static vector unsigned short __ATTRS_o_ai
9647 vec_lvlxl(int __a, const unsigned short *__b)
9649 return vec_perm(vec_ldl(__a, __b),
9650 (vector unsigned short)(0),
9651 vec_lvsl(__a, __b));
9654 static vector unsigned short __ATTRS_o_ai
9655 vec_lvlxl(int __a, const vector unsigned short *__b)
9657 return vec_perm(vec_ldl(__a, __b),
9658 (vector unsigned short)(0),
9659 vec_lvsl(__a, (unsigned char *)__b));
9662 static vector bool short __ATTRS_o_ai
9663 vec_lvlxl(int __a, const vector bool short *__b)
9665 return vec_perm(vec_ldl(__a, __b),
9666 (vector bool short)(0),
9667 vec_lvsl(__a, (unsigned char *)__b));
9670 static vector pixel __ATTRS_o_ai
9671 vec_lvlxl(int __a, const vector pixel *__b)
9673 return vec_perm(vec_ldl(__a, __b),
9674 (vector pixel)(0),
9675 vec_lvsl(__a, (unsigned char *)__b));
9678 static vector int __ATTRS_o_ai
9679 vec_lvlxl(int __a, const int *__b)
9681 return vec_perm(vec_ldl(__a, __b),
9682 (vector int)(0),
9683 vec_lvsl(__a, __b));
9686 static vector int __ATTRS_o_ai
9687 vec_lvlxl(int __a, const vector int *__b)
9689 return vec_perm(vec_ldl(__a, __b),
9690 (vector int)(0),
9691 vec_lvsl(__a, (unsigned char *)__b));
9694 static vector unsigned int __ATTRS_o_ai
9695 vec_lvlxl(int __a, const unsigned int *__b)
9697 return vec_perm(vec_ldl(__a, __b),
9698 (vector unsigned int)(0),
9699 vec_lvsl(__a, __b));
9702 static vector unsigned int __ATTRS_o_ai
9703 vec_lvlxl(int __a, const vector unsigned int *__b)
9705 return vec_perm(vec_ldl(__a, __b),
9706 (vector unsigned int)(0),
9707 vec_lvsl(__a, (unsigned char *)__b));
9710 static vector bool int __ATTRS_o_ai
9711 vec_lvlxl(int __a, const vector bool int *__b)
9713 return vec_perm(vec_ldl(__a, __b),
9714 (vector bool int)(0),
9715 vec_lvsl(__a, (unsigned char *)__b));
9718 static vector float __ATTRS_o_ai
9719 vec_lvlxl(int __a, const float *__b)
9721 return vec_perm(vec_ldl(__a, __b),
9722 (vector float)(0),
9723 vec_lvsl(__a, __b));
9726 static vector float __ATTRS_o_ai
9727 vec_lvlxl(int __a, vector float *__b)
9729 return vec_perm(vec_ldl(__a, __b),
9730 (vector float)(0),
9731 vec_lvsl(__a, (unsigned char *)__b));
9734 /* vec_lvrx */
9736 static vector signed char __ATTRS_o_ai
9737 vec_lvrx(int __a, const signed char *__b)
9739 return vec_perm((vector signed char)(0),
9740 vec_ld(__a, __b),
9741 vec_lvsl(__a, __b));
9744 static vector signed char __ATTRS_o_ai
9745 vec_lvrx(int __a, const vector signed char *__b)
9747 return vec_perm((vector signed char)(0),
9748 vec_ld(__a, __b),
9749 vec_lvsl(__a, (unsigned char *)__b));
9752 static vector unsigned char __ATTRS_o_ai
9753 vec_lvrx(int __a, const unsigned char *__b)
9755 return vec_perm((vector unsigned char)(0),
9756 vec_ld(__a, __b),
9757 vec_lvsl(__a, __b));
9760 static vector unsigned char __ATTRS_o_ai
9761 vec_lvrx(int __a, const vector unsigned char *__b)
9763 return vec_perm((vector unsigned char)(0),
9764 vec_ld(__a, __b),
9765 vec_lvsl(__a, (unsigned char *)__b));
9768 static vector bool char __ATTRS_o_ai
9769 vec_lvrx(int __a, const vector bool char *__b)
9771 return vec_perm((vector bool char)(0),
9772 vec_ld(__a, __b),
9773 vec_lvsl(__a, (unsigned char *)__b));
9776 static vector short __ATTRS_o_ai
9777 vec_lvrx(int __a, const short *__b)
9779 return vec_perm((vector short)(0),
9780 vec_ld(__a, __b),
9781 vec_lvsl(__a, __b));
9784 static vector short __ATTRS_o_ai
9785 vec_lvrx(int __a, const vector short *__b)
9787 return vec_perm((vector short)(0),
9788 vec_ld(__a, __b),
9789 vec_lvsl(__a, (unsigned char *)__b));
9792 static vector unsigned short __ATTRS_o_ai
9793 vec_lvrx(int __a, const unsigned short *__b)
9795 return vec_perm((vector unsigned short)(0),
9796 vec_ld(__a, __b),
9797 vec_lvsl(__a, __b));
9800 static vector unsigned short __ATTRS_o_ai
9801 vec_lvrx(int __a, const vector unsigned short *__b)
9803 return vec_perm((vector unsigned short)(0),
9804 vec_ld(__a, __b),
9805 vec_lvsl(__a, (unsigned char *)__b));
9808 static vector bool short __ATTRS_o_ai
9809 vec_lvrx(int __a, const vector bool short *__b)
9811 return vec_perm((vector bool short)(0),
9812 vec_ld(__a, __b),
9813 vec_lvsl(__a, (unsigned char *)__b));
9816 static vector pixel __ATTRS_o_ai
9817 vec_lvrx(int __a, const vector pixel *__b)
9819 return vec_perm((vector pixel)(0),
9820 vec_ld(__a, __b),
9821 vec_lvsl(__a, (unsigned char *)__b));
9824 static vector int __ATTRS_o_ai
9825 vec_lvrx(int __a, const int *__b)
9827 return vec_perm((vector int)(0),
9828 vec_ld(__a, __b),
9829 vec_lvsl(__a, __b));
9832 static vector int __ATTRS_o_ai
9833 vec_lvrx(int __a, const vector int *__b)
9835 return vec_perm((vector int)(0),
9836 vec_ld(__a, __b),
9837 vec_lvsl(__a, (unsigned char *)__b));
9840 static vector unsigned int __ATTRS_o_ai
9841 vec_lvrx(int __a, const unsigned int *__b)
9843 return vec_perm((vector unsigned int)(0),
9844 vec_ld(__a, __b),
9845 vec_lvsl(__a, __b));
9848 static vector unsigned int __ATTRS_o_ai
9849 vec_lvrx(int __a, const vector unsigned int *__b)
9851 return vec_perm((vector unsigned int)(0),
9852 vec_ld(__a, __b),
9853 vec_lvsl(__a, (unsigned char *)__b));
9856 static vector bool int __ATTRS_o_ai
9857 vec_lvrx(int __a, const vector bool int *__b)
9859 return vec_perm((vector bool int)(0),
9860 vec_ld(__a, __b),
9861 vec_lvsl(__a, (unsigned char *)__b));
9864 static vector float __ATTRS_o_ai
9865 vec_lvrx(int __a, const float *__b)
9867 return vec_perm((vector float)(0),
9868 vec_ld(__a, __b),
9869 vec_lvsl(__a, __b));
9872 static vector float __ATTRS_o_ai
9873 vec_lvrx(int __a, const vector float *__b)
9875 return vec_perm((vector float)(0),
9876 vec_ld(__a, __b),
9877 vec_lvsl(__a, (unsigned char *)__b));
9880 /* vec_lvrxl */
9882 static vector signed char __ATTRS_o_ai
9883 vec_lvrxl(int __a, const signed char *__b)
9885 return vec_perm((vector signed char)(0),
9886 vec_ldl(__a, __b),
9887 vec_lvsl(__a, __b));
9890 static vector signed char __ATTRS_o_ai
9891 vec_lvrxl(int __a, const vector signed char *__b)
9893 return vec_perm((vector signed char)(0),
9894 vec_ldl(__a, __b),
9895 vec_lvsl(__a, (unsigned char *)__b));
9898 static vector unsigned char __ATTRS_o_ai
9899 vec_lvrxl(int __a, const unsigned char *__b)
9901 return vec_perm((vector unsigned char)(0),
9902 vec_ldl(__a, __b),
9903 vec_lvsl(__a, __b));
9906 static vector unsigned char __ATTRS_o_ai
9907 vec_lvrxl(int __a, const vector unsigned char *__b)
9909 return vec_perm((vector unsigned char)(0),
9910 vec_ldl(__a, __b),
9911 vec_lvsl(__a, (unsigned char *)__b));
9914 static vector bool char __ATTRS_o_ai
9915 vec_lvrxl(int __a, const vector bool char *__b)
9917 return vec_perm((vector bool char)(0),
9918 vec_ldl(__a, __b),
9919 vec_lvsl(__a, (unsigned char *)__b));
9922 static vector short __ATTRS_o_ai
9923 vec_lvrxl(int __a, const short *__b)
9925 return vec_perm((vector short)(0),
9926 vec_ldl(__a, __b),
9927 vec_lvsl(__a, __b));
9930 static vector short __ATTRS_o_ai
9931 vec_lvrxl(int __a, const vector short *__b)
9933 return vec_perm((vector short)(0),
9934 vec_ldl(__a, __b),
9935 vec_lvsl(__a, (unsigned char *)__b));
9938 static vector unsigned short __ATTRS_o_ai
9939 vec_lvrxl(int __a, const unsigned short *__b)
9941 return vec_perm((vector unsigned short)(0),
9942 vec_ldl(__a, __b),
9943 vec_lvsl(__a, __b));
9946 static vector unsigned short __ATTRS_o_ai
9947 vec_lvrxl(int __a, const vector unsigned short *__b)
9949 return vec_perm((vector unsigned short)(0),
9950 vec_ldl(__a, __b),
9951 vec_lvsl(__a, (unsigned char *)__b));
9954 static vector bool short __ATTRS_o_ai
9955 vec_lvrxl(int __a, const vector bool short *__b)
9957 return vec_perm((vector bool short)(0),
9958 vec_ldl(__a, __b),
9959 vec_lvsl(__a, (unsigned char *)__b));
9962 static vector pixel __ATTRS_o_ai
9963 vec_lvrxl(int __a, const vector pixel *__b)
9965 return vec_perm((vector pixel)(0),
9966 vec_ldl(__a, __b),
9967 vec_lvsl(__a, (unsigned char *)__b));
9970 static vector int __ATTRS_o_ai
9971 vec_lvrxl(int __a, const int *__b)
9973 return vec_perm((vector int)(0),
9974 vec_ldl(__a, __b),
9975 vec_lvsl(__a, __b));
9978 static vector int __ATTRS_o_ai
9979 vec_lvrxl(int __a, const vector int *__b)
9981 return vec_perm((vector int)(0),
9982 vec_ldl(__a, __b),
9983 vec_lvsl(__a, (unsigned char *)__b));
9986 static vector unsigned int __ATTRS_o_ai
9987 vec_lvrxl(int __a, const unsigned int *__b)
9989 return vec_perm((vector unsigned int)(0),
9990 vec_ldl(__a, __b),
9991 vec_lvsl(__a, __b));
9994 static vector unsigned int __ATTRS_o_ai
9995 vec_lvrxl(int __a, const vector unsigned int *__b)
9997 return vec_perm((vector unsigned int)(0),
9998 vec_ldl(__a, __b),
9999 vec_lvsl(__a, (unsigned char *)__b));
10002 static vector bool int __ATTRS_o_ai
10003 vec_lvrxl(int __a, const vector bool int *__b)
10005 return vec_perm((vector bool int)(0),
10006 vec_ldl(__a, __b),
10007 vec_lvsl(__a, (unsigned char *)__b));
10010 static vector float __ATTRS_o_ai
10011 vec_lvrxl(int __a, const float *__b)
10013 return vec_perm((vector float)(0),
10014 vec_ldl(__a, __b),
10015 vec_lvsl(__a, __b));
10018 static vector float __ATTRS_o_ai
10019 vec_lvrxl(int __a, const vector float *__b)
10021 return vec_perm((vector float)(0),
10022 vec_ldl(__a, __b),
10023 vec_lvsl(__a, (unsigned char *)__b));
10026 /* vec_stvlx */
10028 static void __ATTRS_o_ai
10029 vec_stvlx(vector signed char __a, int __b, signed char *__c)
10031 return vec_st(vec_perm(vec_lvrx(__b, __c),
10032 __a,
10033 vec_lvsr(__b, __c)),
10034 __b, __c);
10037 static void __ATTRS_o_ai
10038 vec_stvlx(vector signed char __a, int __b, vector signed char *__c)
10040 return vec_st(vec_perm(vec_lvrx(__b, __c),
10041 __a,
10042 vec_lvsr(__b, (unsigned char *)__c)),
10043 __b, __c);
10046 static void __ATTRS_o_ai
10047 vec_stvlx(vector unsigned char __a, int __b, unsigned char *__c)
10049 return vec_st(vec_perm(vec_lvrx(__b, __c),
10050 __a,
10051 vec_lvsr(__b, __c)),
10052 __b, __c);
10055 static void __ATTRS_o_ai
10056 vec_stvlx(vector unsigned char __a, int __b, vector unsigned char *__c)
10058 return vec_st(vec_perm(vec_lvrx(__b, __c),
10059 __a,
10060 vec_lvsr(__b, (unsigned char *)__c)),
10061 __b, __c);
10064 static void __ATTRS_o_ai
10065 vec_stvlx(vector bool char __a, int __b, vector bool char *__c)
10067 return vec_st(vec_perm(vec_lvrx(__b, __c),
10068 __a,
10069 vec_lvsr(__b, (unsigned char *)__c)),
10070 __b, __c);
10073 static void __ATTRS_o_ai
10074 vec_stvlx(vector short __a, int __b, short *__c)
10076 return vec_st(vec_perm(vec_lvrx(__b, __c),
10077 __a,
10078 vec_lvsr(__b, __c)),
10079 __b, __c);
10082 static void __ATTRS_o_ai
10083 vec_stvlx(vector short __a, int __b, vector short *__c)
10085 return vec_st(vec_perm(vec_lvrx(__b, __c),
10086 __a,
10087 vec_lvsr(__b, (unsigned char *)__c)),
10088 __b, __c);
10091 static void __ATTRS_o_ai
10092 vec_stvlx(vector unsigned short __a, int __b, unsigned short *__c)
10094 return vec_st(vec_perm(vec_lvrx(__b, __c),
10095 __a,
10096 vec_lvsr(__b, __c)),
10097 __b, __c);
10100 static void __ATTRS_o_ai
10101 vec_stvlx(vector unsigned short __a, int __b, vector unsigned short *__c)
10103 return vec_st(vec_perm(vec_lvrx(__b, __c),
10104 __a,
10105 vec_lvsr(__b, (unsigned char *)__c)),
10106 __b, __c);
10109 static void __ATTRS_o_ai
10110 vec_stvlx(vector bool short __a, int __b, vector bool short *__c)
10112 return vec_st(vec_perm(vec_lvrx(__b, __c),
10113 __a,
10114 vec_lvsr(__b, (unsigned char *)__c)),
10115 __b, __c);
10118 static void __ATTRS_o_ai
10119 vec_stvlx(vector pixel __a, int __b, vector pixel *__c)
10121 return vec_st(vec_perm(vec_lvrx(__b, __c),
10122 __a,
10123 vec_lvsr(__b, (unsigned char *)__c)),
10124 __b, __c);
10127 static void __ATTRS_o_ai
10128 vec_stvlx(vector int __a, int __b, int *__c)
10130 return vec_st(vec_perm(vec_lvrx(__b, __c),
10131 __a,
10132 vec_lvsr(__b, __c)),
10133 __b, __c);
10136 static void __ATTRS_o_ai
10137 vec_stvlx(vector int __a, int __b, vector int *__c)
10139 return vec_st(vec_perm(vec_lvrx(__b, __c),
10140 __a,
10141 vec_lvsr(__b, (unsigned char *)__c)),
10142 __b, __c);
10145 static void __ATTRS_o_ai
10146 vec_stvlx(vector unsigned int __a, int __b, unsigned int *__c)
10148 return vec_st(vec_perm(vec_lvrx(__b, __c),
10149 __a,
10150 vec_lvsr(__b, __c)),
10151 __b, __c);
10154 static void __ATTRS_o_ai
10155 vec_stvlx(vector unsigned int __a, int __b, vector unsigned int *__c)
10157 return vec_st(vec_perm(vec_lvrx(__b, __c),
10158 __a,
10159 vec_lvsr(__b, (unsigned char *)__c)),
10160 __b, __c);
10163 static void __ATTRS_o_ai
10164 vec_stvlx(vector bool int __a, int __b, vector bool int *__c)
10166 return vec_st(vec_perm(vec_lvrx(__b, __c),
10167 __a,
10168 vec_lvsr(__b, (unsigned char *)__c)),
10169 __b, __c);
10172 static void __ATTRS_o_ai
10173 vec_stvlx(vector float __a, int __b, vector float *__c)
10175 return vec_st(vec_perm(vec_lvrx(__b, __c),
10176 __a,
10177 vec_lvsr(__b, (unsigned char *)__c)),
10178 __b, __c);
10181 /* vec_stvlxl */
10183 static void __ATTRS_o_ai
10184 vec_stvlxl(vector signed char __a, int __b, signed char *__c)
10186 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10187 __a,
10188 vec_lvsr(__b, __c)),
10189 __b, __c);
10192 static void __ATTRS_o_ai
10193 vec_stvlxl(vector signed char __a, int __b, vector signed char *__c)
10195 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10196 __a,
10197 vec_lvsr(__b, (unsigned char *)__c)),
10198 __b, __c);
10201 static void __ATTRS_o_ai
10202 vec_stvlxl(vector unsigned char __a, int __b, unsigned char *__c)
10204 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10205 __a,
10206 vec_lvsr(__b, __c)),
10207 __b, __c);
10210 static void __ATTRS_o_ai
10211 vec_stvlxl(vector unsigned char __a, int __b, vector unsigned char *__c)
10213 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10214 __a,
10215 vec_lvsr(__b, (unsigned char *)__c)),
10216 __b, __c);
10219 static void __ATTRS_o_ai
10220 vec_stvlxl(vector bool char __a, int __b, vector bool char *__c)
10222 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10223 __a,
10224 vec_lvsr(__b, (unsigned char *)__c)),
10225 __b, __c);
10228 static void __ATTRS_o_ai
10229 vec_stvlxl(vector short __a, int __b, short *__c)
10231 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10232 __a,
10233 vec_lvsr(__b, __c)),
10234 __b, __c);
10237 static void __ATTRS_o_ai
10238 vec_stvlxl(vector short __a, int __b, vector short *__c)
10240 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10241 __a,
10242 vec_lvsr(__b, (unsigned char *)__c)),
10243 __b, __c);
10246 static void __ATTRS_o_ai
10247 vec_stvlxl(vector unsigned short __a, int __b, unsigned short *__c)
10249 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10250 __a,
10251 vec_lvsr(__b, __c)),
10252 __b, __c);
10255 static void __ATTRS_o_ai
10256 vec_stvlxl(vector unsigned short __a, int __b, vector unsigned short *__c)
10258 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10259 __a,
10260 vec_lvsr(__b, (unsigned char *)__c)),
10261 __b, __c);
10264 static void __ATTRS_o_ai
10265 vec_stvlxl(vector bool short __a, int __b, vector bool short *__c)
10267 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10268 __a,
10269 vec_lvsr(__b, (unsigned char *)__c)),
10270 __b, __c);
10273 static void __ATTRS_o_ai
10274 vec_stvlxl(vector pixel __a, int __b, vector pixel *__c)
10276 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10277 __a,
10278 vec_lvsr(__b, (unsigned char *)__c)),
10279 __b, __c);
10282 static void __ATTRS_o_ai
10283 vec_stvlxl(vector int __a, int __b, int *__c)
10285 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10286 __a,
10287 vec_lvsr(__b, __c)),
10288 __b, __c);
10291 static void __ATTRS_o_ai
10292 vec_stvlxl(vector int __a, int __b, vector int *__c)
10294 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10295 __a,
10296 vec_lvsr(__b, (unsigned char *)__c)),
10297 __b, __c);
10300 static void __ATTRS_o_ai
10301 vec_stvlxl(vector unsigned int __a, int __b, unsigned int *__c)
10303 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10304 __a,
10305 vec_lvsr(__b, __c)),
10306 __b, __c);
10309 static void __ATTRS_o_ai
10310 vec_stvlxl(vector unsigned int __a, int __b, vector unsigned int *__c)
10312 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10313 __a,
10314 vec_lvsr(__b, (unsigned char *)__c)),
10315 __b, __c);
10318 static void __ATTRS_o_ai
10319 vec_stvlxl(vector bool int __a, int __b, vector bool int *__c)
10321 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10322 __a,
10323 vec_lvsr(__b, (unsigned char *)__c)),
10324 __b, __c);
10327 static void __ATTRS_o_ai
10328 vec_stvlxl(vector float __a, int __b, vector float *__c)
10330 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10331 __a,
10332 vec_lvsr(__b, (unsigned char *)__c)),
10333 __b, __c);
10336 /* vec_stvrx */
10338 static void __ATTRS_o_ai
10339 vec_stvrx(vector signed char __a, int __b, signed char *__c)
10341 return vec_st(vec_perm(__a,
10342 vec_lvlx(__b, __c),
10343 vec_lvsr(__b, __c)),
10344 __b, __c);
10347 static void __ATTRS_o_ai
10348 vec_stvrx(vector signed char __a, int __b, vector signed char *__c)
10350 return vec_st(vec_perm(__a,
10351 vec_lvlx(__b, __c),
10352 vec_lvsr(__b, (unsigned char *)__c)),
10353 __b, __c);
10356 static void __ATTRS_o_ai
10357 vec_stvrx(vector unsigned char __a, int __b, unsigned char *__c)
10359 return vec_st(vec_perm(__a,
10360 vec_lvlx(__b, __c),
10361 vec_lvsr(__b, __c)),
10362 __b, __c);
10365 static void __ATTRS_o_ai
10366 vec_stvrx(vector unsigned char __a, int __b, vector unsigned char *__c)
10368 return vec_st(vec_perm(__a,
10369 vec_lvlx(__b, __c),
10370 vec_lvsr(__b, (unsigned char *)__c)),
10371 __b, __c);
10374 static void __ATTRS_o_ai
10375 vec_stvrx(vector bool char __a, int __b, vector bool char *__c)
10377 return vec_st(vec_perm(__a,
10378 vec_lvlx(__b, __c),
10379 vec_lvsr(__b, (unsigned char *)__c)),
10380 __b, __c);
10383 static void __ATTRS_o_ai
10384 vec_stvrx(vector short __a, int __b, short *__c)
10386 return vec_st(vec_perm(__a,
10387 vec_lvlx(__b, __c),
10388 vec_lvsr(__b, __c)),
10389 __b, __c);
10392 static void __ATTRS_o_ai
10393 vec_stvrx(vector short __a, int __b, vector short *__c)
10395 return vec_st(vec_perm(__a,
10396 vec_lvlx(__b, __c),
10397 vec_lvsr(__b, (unsigned char *)__c)),
10398 __b, __c);
10401 static void __ATTRS_o_ai
10402 vec_stvrx(vector unsigned short __a, int __b, unsigned short *__c)
10404 return vec_st(vec_perm(__a,
10405 vec_lvlx(__b, __c),
10406 vec_lvsr(__b, __c)),
10407 __b, __c);
10410 static void __ATTRS_o_ai
10411 vec_stvrx(vector unsigned short __a, int __b, vector unsigned short *__c)
10413 return vec_st(vec_perm(__a,
10414 vec_lvlx(__b, __c),
10415 vec_lvsr(__b, (unsigned char *)__c)),
10416 __b, __c);
10419 static void __ATTRS_o_ai
10420 vec_stvrx(vector bool short __a, int __b, vector bool short *__c)
10422 return vec_st(vec_perm(__a,
10423 vec_lvlx(__b, __c),
10424 vec_lvsr(__b, (unsigned char *)__c)),
10425 __b, __c);
10428 static void __ATTRS_o_ai
10429 vec_stvrx(vector pixel __a, int __b, vector pixel *__c)
10431 return vec_st(vec_perm(__a,
10432 vec_lvlx(__b, __c),
10433 vec_lvsr(__b, (unsigned char *)__c)),
10434 __b, __c);
10437 static void __ATTRS_o_ai
10438 vec_stvrx(vector int __a, int __b, int *__c)
10440 return vec_st(vec_perm(__a,
10441 vec_lvlx(__b, __c),
10442 vec_lvsr(__b, __c)),
10443 __b, __c);
10446 static void __ATTRS_o_ai
10447 vec_stvrx(vector int __a, int __b, vector int *__c)
10449 return vec_st(vec_perm(__a,
10450 vec_lvlx(__b, __c),
10451 vec_lvsr(__b, (unsigned char *)__c)),
10452 __b, __c);
10455 static void __ATTRS_o_ai
10456 vec_stvrx(vector unsigned int __a, int __b, unsigned int *__c)
10458 return vec_st(vec_perm(__a,
10459 vec_lvlx(__b, __c),
10460 vec_lvsr(__b, __c)),
10461 __b, __c);
10464 static void __ATTRS_o_ai
10465 vec_stvrx(vector unsigned int __a, int __b, vector unsigned int *__c)
10467 return vec_st(vec_perm(__a,
10468 vec_lvlx(__b, __c),
10469 vec_lvsr(__b, (unsigned char *)__c)),
10470 __b, __c);
10473 static void __ATTRS_o_ai
10474 vec_stvrx(vector bool int __a, int __b, vector bool int *__c)
10476 return vec_st(vec_perm(__a,
10477 vec_lvlx(__b, __c),
10478 vec_lvsr(__b, (unsigned char *)__c)),
10479 __b, __c);
10482 static void __ATTRS_o_ai
10483 vec_stvrx(vector float __a, int __b, vector float *__c)
10485 return vec_st(vec_perm(__a,
10486 vec_lvlx(__b, __c),
10487 vec_lvsr(__b, (unsigned char *)__c)),
10488 __b, __c);
10491 /* vec_stvrxl */
10493 static void __ATTRS_o_ai
10494 vec_stvrxl(vector signed char __a, int __b, signed char *__c)
10496 return vec_stl(vec_perm(__a,
10497 vec_lvlx(__b, __c),
10498 vec_lvsr(__b, __c)),
10499 __b, __c);
10502 static void __ATTRS_o_ai
10503 vec_stvrxl(vector signed char __a, int __b, vector signed char *__c)
10505 return vec_stl(vec_perm(__a,
10506 vec_lvlx(__b, __c),
10507 vec_lvsr(__b, (unsigned char *)__c)),
10508 __b, __c);
10511 static void __ATTRS_o_ai
10512 vec_stvrxl(vector unsigned char __a, int __b, unsigned char *__c)
10514 return vec_stl(vec_perm(__a,
10515 vec_lvlx(__b, __c),
10516 vec_lvsr(__b, __c)),
10517 __b, __c);
10520 static void __ATTRS_o_ai
10521 vec_stvrxl(vector unsigned char __a, int __b, vector unsigned char *__c)
10523 return vec_stl(vec_perm(__a,
10524 vec_lvlx(__b, __c),
10525 vec_lvsr(__b, (unsigned char *)__c)),
10526 __b, __c);
10529 static void __ATTRS_o_ai
10530 vec_stvrxl(vector bool char __a, int __b, vector bool char *__c)
10532 return vec_stl(vec_perm(__a,
10533 vec_lvlx(__b, __c),
10534 vec_lvsr(__b, (unsigned char *)__c)),
10535 __b, __c);
10538 static void __ATTRS_o_ai
10539 vec_stvrxl(vector short __a, int __b, short *__c)
10541 return vec_stl(vec_perm(__a,
10542 vec_lvlx(__b, __c),
10543 vec_lvsr(__b, __c)),
10544 __b, __c);
10547 static void __ATTRS_o_ai
10548 vec_stvrxl(vector short __a, int __b, vector short *__c)
10550 return vec_stl(vec_perm(__a,
10551 vec_lvlx(__b, __c),
10552 vec_lvsr(__b, (unsigned char *)__c)),
10553 __b, __c);
10556 static void __ATTRS_o_ai
10557 vec_stvrxl(vector unsigned short __a, int __b, unsigned short *__c)
10559 return vec_stl(vec_perm(__a,
10560 vec_lvlx(__b, __c),
10561 vec_lvsr(__b, __c)),
10562 __b, __c);
10565 static void __ATTRS_o_ai
10566 vec_stvrxl(vector unsigned short __a, int __b, vector unsigned short *__c)
10568 return vec_stl(vec_perm(__a,
10569 vec_lvlx(__b, __c),
10570 vec_lvsr(__b, (unsigned char *)__c)),
10571 __b, __c);
10574 static void __ATTRS_o_ai
10575 vec_stvrxl(vector bool short __a, int __b, vector bool short *__c)
10577 return vec_stl(vec_perm(__a,
10578 vec_lvlx(__b, __c),
10579 vec_lvsr(__b, (unsigned char *)__c)),
10580 __b, __c);
10583 static void __ATTRS_o_ai
10584 vec_stvrxl(vector pixel __a, int __b, vector pixel *__c)
10586 return vec_stl(vec_perm(__a,
10587 vec_lvlx(__b, __c),
10588 vec_lvsr(__b, (unsigned char *)__c)),
10589 __b, __c);
10592 static void __ATTRS_o_ai
10593 vec_stvrxl(vector int __a, int __b, int *__c)
10595 return vec_stl(vec_perm(__a,
10596 vec_lvlx(__b, __c),
10597 vec_lvsr(__b, __c)),
10598 __b, __c);
10601 static void __ATTRS_o_ai
10602 vec_stvrxl(vector int __a, int __b, vector int *__c)
10604 return vec_stl(vec_perm(__a,
10605 vec_lvlx(__b, __c),
10606 vec_lvsr(__b, (unsigned char *)__c)),
10607 __b, __c);
10610 static void __ATTRS_o_ai
10611 vec_stvrxl(vector unsigned int __a, int __b, unsigned int *__c)
10613 return vec_stl(vec_perm(__a,
10614 vec_lvlx(__b, __c),
10615 vec_lvsr(__b, __c)),
10616 __b, __c);
10619 static void __ATTRS_o_ai
10620 vec_stvrxl(vector unsigned int __a, int __b, vector unsigned int *__c)
10622 return vec_stl(vec_perm(__a,
10623 vec_lvlx(__b, __c),
10624 vec_lvsr(__b, (unsigned char *)__c)),
10625 __b, __c);
10628 static void __ATTRS_o_ai
10629 vec_stvrxl(vector bool int __a, int __b, vector bool int *__c)
10631 return vec_stl(vec_perm(__a,
10632 vec_lvlx(__b, __c),
10633 vec_lvsr(__b, (unsigned char *)__c)),
10634 __b, __c);
10637 static void __ATTRS_o_ai
10638 vec_stvrxl(vector float __a, int __b, vector float *__c)
10640 return vec_stl(vec_perm(__a,
10641 vec_lvlx(__b, __c),
10642 vec_lvsr(__b, (unsigned char *)__c)),
10643 __b, __c);
10646 /* vec_promote */
10648 static vector signed char __ATTRS_o_ai
10649 vec_promote(signed char __a, int __b)
10651 vector signed char __res = (vector signed char)(0);
10652 __res[__b] = __a;
10653 return __res;
10656 static vector unsigned char __ATTRS_o_ai
10657 vec_promote(unsigned char __a, int __b)
10659 vector unsigned char __res = (vector unsigned char)(0);
10660 __res[__b] = __a;
10661 return __res;
10664 static vector short __ATTRS_o_ai
10665 vec_promote(short __a, int __b)
10667 vector short __res = (vector short)(0);
10668 __res[__b] = __a;
10669 return __res;
10672 static vector unsigned short __ATTRS_o_ai
10673 vec_promote(unsigned short __a, int __b)
10675 vector unsigned short __res = (vector unsigned short)(0);
10676 __res[__b] = __a;
10677 return __res;
10680 static vector int __ATTRS_o_ai
10681 vec_promote(int __a, int __b)
10683 vector int __res = (vector int)(0);
10684 __res[__b] = __a;
10685 return __res;
10688 static vector unsigned int __ATTRS_o_ai
10689 vec_promote(unsigned int __a, int __b)
10691 vector unsigned int __res = (vector unsigned int)(0);
10692 __res[__b] = __a;
10693 return __res;
10696 static vector float __ATTRS_o_ai
10697 vec_promote(float __a, int __b)
10699 vector float __res = (vector float)(0);
10700 __res[__b] = __a;
10701 return __res;
10704 /* vec_splats */
10706 static vector signed char __ATTRS_o_ai
10707 vec_splats(signed char __a)
10709 return (vector signed char)(__a);
10712 static vector unsigned char __ATTRS_o_ai
10713 vec_splats(unsigned char __a)
10715 return (vector unsigned char)(__a);
10718 static vector short __ATTRS_o_ai
10719 vec_splats(short __a)
10721 return (vector short)(__a);
10724 static vector unsigned short __ATTRS_o_ai
10725 vec_splats(unsigned short __a)
10727 return (vector unsigned short)(__a);
10730 static vector int __ATTRS_o_ai
10731 vec_splats(int __a)
10733 return (vector int)(__a);
10736 static vector unsigned int __ATTRS_o_ai
10737 vec_splats(unsigned int __a)
10739 return (vector unsigned int)(__a);
10742 static vector float __ATTRS_o_ai
10743 vec_splats(float __a)
10745 return (vector float)(__a);
10748 /* ----------------------------- predicates --------------------------------- */
10750 /* vec_all_eq */
10752 static int __ATTRS_o_ai
10753 vec_all_eq(vector signed char __a, vector signed char __b)
10755 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10758 static int __ATTRS_o_ai
10759 vec_all_eq(vector signed char __a, vector bool char __b)
10761 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10764 static int __ATTRS_o_ai
10765 vec_all_eq(vector unsigned char __a, vector unsigned char __b)
10767 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10770 static int __ATTRS_o_ai
10771 vec_all_eq(vector unsigned char __a, vector bool char __b)
10773 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10776 static int __ATTRS_o_ai
10777 vec_all_eq(vector bool char __a, vector signed char __b)
10779 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10782 static int __ATTRS_o_ai
10783 vec_all_eq(vector bool char __a, vector unsigned char __b)
10785 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10788 static int __ATTRS_o_ai
10789 vec_all_eq(vector bool char __a, vector bool char __b)
10791 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10794 static int __ATTRS_o_ai
10795 vec_all_eq(vector short __a, vector short __b)
10797 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, __b);
10800 static int __ATTRS_o_ai
10801 vec_all_eq(vector short __a, vector bool short __b)
10803 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, (vector short)__b);
10806 static int __ATTRS_o_ai
10807 vec_all_eq(vector unsigned short __a, vector unsigned short __b)
10809 return
10810 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10813 static int __ATTRS_o_ai
10814 vec_all_eq(vector unsigned short __a, vector bool short __b)
10816 return
10817 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10820 static int __ATTRS_o_ai
10821 vec_all_eq(vector bool short __a, vector short __b)
10823 return
10824 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10827 static int __ATTRS_o_ai
10828 vec_all_eq(vector bool short __a, vector unsigned short __b)
10830 return
10831 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10834 static int __ATTRS_o_ai
10835 vec_all_eq(vector bool short __a, vector bool short __b)
10837 return
10838 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10841 static int __ATTRS_o_ai
10842 vec_all_eq(vector pixel __a, vector pixel __b)
10844 return
10845 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10848 static int __ATTRS_o_ai
10849 vec_all_eq(vector int __a, vector int __b)
10851 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, __b);
10854 static int __ATTRS_o_ai
10855 vec_all_eq(vector int __a, vector bool int __b)
10857 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, (vector int)__b);
10860 static int __ATTRS_o_ai
10861 vec_all_eq(vector unsigned int __a, vector unsigned int __b)
10863 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
10866 static int __ATTRS_o_ai
10867 vec_all_eq(vector unsigned int __a, vector bool int __b)
10869 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
10872 static int __ATTRS_o_ai
10873 vec_all_eq(vector bool int __a, vector int __b)
10875 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
10878 static int __ATTRS_o_ai
10879 vec_all_eq(vector bool int __a, vector unsigned int __b)
10881 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
10884 static int __ATTRS_o_ai
10885 vec_all_eq(vector bool int __a, vector bool int __b)
10887 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
10890 static int __ATTRS_o_ai
10891 vec_all_eq(vector float __a, vector float __b)
10893 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __b);
10896 /* vec_all_ge */
10898 static int __ATTRS_o_ai
10899 vec_all_ge(vector signed char __a, vector signed char __b)
10901 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, __a);
10904 static int __ATTRS_o_ai
10905 vec_all_ge(vector signed char __a, vector bool char __b)
10907 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__b, __a);
10910 static int __ATTRS_o_ai
10911 vec_all_ge(vector unsigned char __a, vector unsigned char __b)
10913 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, __a);
10916 static int __ATTRS_o_ai
10917 vec_all_ge(vector unsigned char __a, vector bool char __b)
10919 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, __a);
10922 static int __ATTRS_o_ai
10923 vec_all_ge(vector bool char __a, vector signed char __b)
10925 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
10926 (vector unsigned char)__b,
10927 (vector unsigned char)__a);
10930 static int __ATTRS_o_ai
10931 vec_all_ge(vector bool char __a, vector unsigned char __b)
10933 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, (vector unsigned char)__a);
10936 static int __ATTRS_o_ai
10937 vec_all_ge(vector bool char __a, vector bool char __b)
10939 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
10940 (vector unsigned char)__b,
10941 (vector unsigned char)__a);
10944 static int __ATTRS_o_ai
10945 vec_all_ge(vector short __a, vector short __b)
10947 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, __a);
10950 static int __ATTRS_o_ai
10951 vec_all_ge(vector short __a, vector bool short __b)
10953 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)__b, __a);
10956 static int __ATTRS_o_ai
10957 vec_all_ge(vector unsigned short __a, vector unsigned short __b)
10959 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, __a);
10962 static int __ATTRS_o_ai
10963 vec_all_ge(vector unsigned short __a, vector bool short __b)
10965 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b, __a);
10968 static int __ATTRS_o_ai
10969 vec_all_ge(vector bool short __a, vector short __b)
10971 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
10972 (vector unsigned short)__b,
10973 (vector unsigned short)__a);
10976 static int __ATTRS_o_ai
10977 vec_all_ge(vector bool short __a, vector unsigned short __b)
10979 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, (vector unsigned short)__a);
10982 static int __ATTRS_o_ai
10983 vec_all_ge(vector bool short __a, vector bool short __b)
10985 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
10986 (vector unsigned short)__b,
10987 (vector unsigned short)__a);
10990 static int __ATTRS_o_ai
10991 vec_all_ge(vector int __a, vector int __b)
10993 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, __a);
10996 static int __ATTRS_o_ai
10997 vec_all_ge(vector int __a, vector bool int __b)
10999 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)__b, __a);
11002 static int __ATTRS_o_ai
11003 vec_all_ge(vector unsigned int __a, vector unsigned int __b)
11005 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, __a);
11008 static int __ATTRS_o_ai
11009 vec_all_ge(vector unsigned int __a, vector bool int __b)
11011 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, __a);
11014 static int __ATTRS_o_ai
11015 vec_all_ge(vector bool int __a, vector int __b)
11017 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
11018 (vector unsigned int)__b,
11019 (vector unsigned int)__a);
11022 static int __ATTRS_o_ai
11023 vec_all_ge(vector bool int __a, vector unsigned int __b)
11025 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, (vector unsigned int)__a);
11028 static int __ATTRS_o_ai
11029 vec_all_ge(vector bool int __a, vector bool int __b)
11031 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
11032 (vector unsigned int)__b,
11033 (vector unsigned int)__a);
11036 static int __ATTRS_o_ai
11037 vec_all_ge(vector float __a, vector float __b)
11039 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __a, __b);
11042 /* vec_all_gt */
11044 static int __ATTRS_o_ai
11045 vec_all_gt(vector signed char __a, vector signed char __b)
11047 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, __b);
11050 static int __ATTRS_o_ai
11051 vec_all_gt(vector signed char __a, vector bool char __b)
11053 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, (vector signed char)__b);
11056 static int __ATTRS_o_ai
11057 vec_all_gt(vector unsigned char __a, vector unsigned char __b)
11059 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, __b);
11062 static int __ATTRS_o_ai
11063 vec_all_gt(vector unsigned char __a, vector bool char __b)
11065 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, (vector unsigned char)__b);
11068 static int __ATTRS_o_ai
11069 vec_all_gt(vector bool char __a, vector signed char __b)
11071 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
11072 (vector unsigned char)__a,
11073 (vector unsigned char)__b);
11076 static int __ATTRS_o_ai
11077 vec_all_gt(vector bool char __a, vector unsigned char __b)
11079 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, __b);
11082 static int __ATTRS_o_ai
11083 vec_all_gt(vector bool char __a, vector bool char __b)
11085 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
11086 (vector unsigned char)__a,
11087 (vector unsigned char)__b);
11090 static int __ATTRS_o_ai
11091 vec_all_gt(vector short __a, vector short __b)
11093 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, __b);
11096 static int __ATTRS_o_ai
11097 vec_all_gt(vector short __a, vector bool short __b)
11099 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, (vector short)__b);
11102 static int __ATTRS_o_ai
11103 vec_all_gt(vector unsigned short __a, vector unsigned short __b)
11105 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, __b);
11108 static int __ATTRS_o_ai
11109 vec_all_gt(vector unsigned short __a, vector bool short __b)
11111 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, (vector unsigned short)__b);
11114 static int __ATTRS_o_ai
11115 vec_all_gt(vector bool short __a, vector short __b)
11117 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11118 (vector unsigned short)__a,
11119 (vector unsigned short)__b);
11122 static int __ATTRS_o_ai
11123 vec_all_gt(vector bool short __a, vector unsigned short __b)
11125 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a, __b);
11128 static int __ATTRS_o_ai
11129 vec_all_gt(vector bool short __a, vector bool short __b)
11131 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11132 (vector unsigned short)__a,
11133 (vector unsigned short)__b);
11136 static int __ATTRS_o_ai
11137 vec_all_gt(vector int __a, vector int __b)
11139 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, __b);
11142 static int __ATTRS_o_ai
11143 vec_all_gt(vector int __a, vector bool int __b)
11145 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, (vector int)__b);
11148 static int __ATTRS_o_ai
11149 vec_all_gt(vector unsigned int __a, vector unsigned int __b)
11151 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, __b);
11154 static int __ATTRS_o_ai
11155 vec_all_gt(vector unsigned int __a, vector bool int __b)
11157 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, (vector unsigned int)__b);
11160 static int __ATTRS_o_ai
11161 vec_all_gt(vector bool int __a, vector int __b)
11163 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11164 (vector unsigned int)__a,
11165 (vector unsigned int)__b);
11168 static int __ATTRS_o_ai
11169 vec_all_gt(vector bool int __a, vector unsigned int __b)
11171 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, __b);
11174 static int __ATTRS_o_ai
11175 vec_all_gt(vector bool int __a, vector bool int __b)
11177 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11178 (vector unsigned int)__a,
11179 (vector unsigned int)__b);
11182 static int __ATTRS_o_ai
11183 vec_all_gt(vector float __a, vector float __b)
11185 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __a, __b);
11188 /* vec_all_in */
11190 static int __attribute__((__always_inline__))
11191 vec_all_in(vector float __a, vector float __b)
11193 return __builtin_altivec_vcmpbfp_p(__CR6_EQ, __a, __b);
11196 /* vec_all_le */
11198 static int __ATTRS_o_ai
11199 vec_all_le(vector signed char __a, vector signed char __b)
11201 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, __b);
11204 static int __ATTRS_o_ai
11205 vec_all_le(vector signed char __a, vector bool char __b)
11207 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, (vector signed char)__b);
11210 static int __ATTRS_o_ai
11211 vec_all_le(vector unsigned char __a, vector unsigned char __b)
11213 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, __b);
11216 static int __ATTRS_o_ai
11217 vec_all_le(vector unsigned char __a, vector bool char __b)
11219 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, (vector unsigned char)__b);
11222 static int __ATTRS_o_ai
11223 vec_all_le(vector bool char __a, vector signed char __b)
11225 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
11226 (vector unsigned char)__a,
11227 (vector unsigned char)__b);
11230 static int __ATTRS_o_ai
11231 vec_all_le(vector bool char __a, vector unsigned char __b)
11233 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, __b);
11236 static int __ATTRS_o_ai
11237 vec_all_le(vector bool char __a, vector bool char __b)
11239 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
11240 (vector unsigned char)__a,
11241 (vector unsigned char)__b);
11244 static int __ATTRS_o_ai
11245 vec_all_le(vector short __a, vector short __b)
11247 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, __b);
11250 static int __ATTRS_o_ai
11251 vec_all_le(vector short __a, vector bool short __b)
11253 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, (vector short)__b);
11256 static int __ATTRS_o_ai
11257 vec_all_le(vector unsigned short __a, vector unsigned short __b)
11259 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, __b);
11262 static int __ATTRS_o_ai
11263 vec_all_le(vector unsigned short __a, vector bool short __b)
11265 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, (vector unsigned short)__b);
11268 static int __ATTRS_o_ai
11269 vec_all_le(vector bool short __a, vector short __b)
11271 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
11272 (vector unsigned short)__a,
11273 (vector unsigned short)__b);
11276 static int __ATTRS_o_ai
11277 vec_all_le(vector bool short __a, vector unsigned short __b)
11279 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a, __b);
11282 static int __ATTRS_o_ai
11283 vec_all_le(vector bool short __a, vector bool short __b)
11285 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
11286 (vector unsigned short)__a,
11287 (vector unsigned short)__b);
11290 static int __ATTRS_o_ai
11291 vec_all_le(vector int __a, vector int __b)
11293 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, __b);
11296 static int __ATTRS_o_ai
11297 vec_all_le(vector int __a, vector bool int __b)
11299 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, (vector int)__b);
11302 static int __ATTRS_o_ai
11303 vec_all_le(vector unsigned int __a, vector unsigned int __b)
11305 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, __b);
11308 static int __ATTRS_o_ai
11309 vec_all_le(vector unsigned int __a, vector bool int __b)
11311 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, (vector unsigned int)__b);
11314 static int __ATTRS_o_ai
11315 vec_all_le(vector bool int __a, vector int __b)
11317 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
11318 (vector unsigned int)__a,
11319 (vector unsigned int)__b);
11322 static int __ATTRS_o_ai
11323 vec_all_le(vector bool int __a, vector unsigned int __b)
11325 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, __b);
11328 static int __ATTRS_o_ai
11329 vec_all_le(vector bool int __a, vector bool int __b)
11331 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
11332 (vector unsigned int)__a,
11333 (vector unsigned int)__b);
11336 static int __ATTRS_o_ai
11337 vec_all_le(vector float __a, vector float __b)
11339 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __b, __a);
11342 /* vec_all_lt */
11344 static int __ATTRS_o_ai
11345 vec_all_lt(vector signed char __a, vector signed char __b)
11347 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, __a);
11350 static int __ATTRS_o_ai
11351 vec_all_lt(vector signed char __a, vector bool char __b)
11353 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__b, __a);
11356 static int __ATTRS_o_ai
11357 vec_all_lt(vector unsigned char __a, vector unsigned char __b)
11359 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, __a);
11362 static int __ATTRS_o_ai
11363 vec_all_lt(vector unsigned char __a, vector bool char __b)
11365 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, __a);
11368 static int __ATTRS_o_ai
11369 vec_all_lt(vector bool char __a, vector signed char __b)
11371 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
11372 (vector unsigned char)__b,
11373 (vector unsigned char)__a);
11376 static int __ATTRS_o_ai
11377 vec_all_lt(vector bool char __a, vector unsigned char __b)
11379 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, (vector unsigned char)__a);
11382 static int __ATTRS_o_ai
11383 vec_all_lt(vector bool char __a, vector bool char __b)
11385 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
11386 (vector unsigned char)__b,
11387 (vector unsigned char)__a);
11390 static int __ATTRS_o_ai
11391 vec_all_lt(vector short __a, vector short __b)
11393 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, __a);
11396 static int __ATTRS_o_ai
11397 vec_all_lt(vector short __a, vector bool short __b)
11399 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)__b, __a);
11402 static int __ATTRS_o_ai
11403 vec_all_lt(vector unsigned short __a, vector unsigned short __b)
11405 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, __a);
11408 static int __ATTRS_o_ai
11409 vec_all_lt(vector unsigned short __a, vector bool short __b)
11411 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b, __a);
11414 static int __ATTRS_o_ai
11415 vec_all_lt(vector bool short __a, vector short __b)
11417 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11418 (vector unsigned short)__b,
11419 (vector unsigned short)__a);
11422 static int __ATTRS_o_ai
11423 vec_all_lt(vector bool short __a, vector unsigned short __b)
11425 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, (vector unsigned short)__a);
11428 static int __ATTRS_o_ai
11429 vec_all_lt(vector bool short __a, vector bool short __b)
11431 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11432 (vector unsigned short)__b,
11433 (vector unsigned short)__a);
11436 static int __ATTRS_o_ai
11437 vec_all_lt(vector int __a, vector int __b)
11439 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, __a);
11442 static int __ATTRS_o_ai
11443 vec_all_lt(vector int __a, vector bool int __b)
11445 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)__b, __a);
11448 static int __ATTRS_o_ai
11449 vec_all_lt(vector unsigned int __a, vector unsigned int __b)
11451 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, __a);
11454 static int __ATTRS_o_ai
11455 vec_all_lt(vector unsigned int __a, vector bool int __b)
11457 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, __a);
11460 static int __ATTRS_o_ai
11461 vec_all_lt(vector bool int __a, vector int __b)
11463 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11464 (vector unsigned int)__b,
11465 (vector unsigned int)__a);
11468 static int __ATTRS_o_ai
11469 vec_all_lt(vector bool int __a, vector unsigned int __b)
11471 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, (vector unsigned int)__a);
11474 static int __ATTRS_o_ai
11475 vec_all_lt(vector bool int __a, vector bool int __b)
11477 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11478 (vector unsigned int)__b,
11479 (vector unsigned int)__a);
11482 static int __ATTRS_o_ai
11483 vec_all_lt(vector float __a, vector float __b)
11485 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __b, __a);
11488 /* vec_all_nan */
11490 static int __attribute__((__always_inline__))
11491 vec_all_nan(vector float __a)
11493 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __a);
11496 /* vec_all_ne */
11498 static int __ATTRS_o_ai
11499 vec_all_ne(vector signed char __a, vector signed char __b)
11501 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11504 static int __ATTRS_o_ai
11505 vec_all_ne(vector signed char __a, vector bool char __b)
11507 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11510 static int __ATTRS_o_ai
11511 vec_all_ne(vector unsigned char __a, vector unsigned char __b)
11513 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11516 static int __ATTRS_o_ai
11517 vec_all_ne(vector unsigned char __a, vector bool char __b)
11519 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11522 static int __ATTRS_o_ai
11523 vec_all_ne(vector bool char __a, vector signed char __b)
11525 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11528 static int __ATTRS_o_ai
11529 vec_all_ne(vector bool char __a, vector unsigned char __b)
11531 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11534 static int __ATTRS_o_ai
11535 vec_all_ne(vector bool char __a, vector bool char __b)
11537 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11540 static int __ATTRS_o_ai
11541 vec_all_ne(vector short __a, vector short __b)
11543 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, __b);
11546 static int __ATTRS_o_ai
11547 vec_all_ne(vector short __a, vector bool short __b)
11549 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, (vector short)__b);
11552 static int __ATTRS_o_ai
11553 vec_all_ne(vector unsigned short __a, vector unsigned short __b)
11555 return
11556 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11559 static int __ATTRS_o_ai
11560 vec_all_ne(vector unsigned short __a, vector bool short __b)
11562 return
11563 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11566 static int __ATTRS_o_ai
11567 vec_all_ne(vector bool short __a, vector short __b)
11569 return
11570 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11573 static int __ATTRS_o_ai
11574 vec_all_ne(vector bool short __a, vector unsigned short __b)
11576 return
11577 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11580 static int __ATTRS_o_ai
11581 vec_all_ne(vector bool short __a, vector bool short __b)
11583 return
11584 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11587 static int __ATTRS_o_ai
11588 vec_all_ne(vector pixel __a, vector pixel __b)
11590 return
11591 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11594 static int __ATTRS_o_ai
11595 vec_all_ne(vector int __a, vector int __b)
11597 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, __b);
11600 static int __ATTRS_o_ai
11601 vec_all_ne(vector int __a, vector bool int __b)
11603 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, (vector int)__b);
11606 static int __ATTRS_o_ai
11607 vec_all_ne(vector unsigned int __a, vector unsigned int __b)
11609 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
11612 static int __ATTRS_o_ai
11613 vec_all_ne(vector unsigned int __a, vector bool int __b)
11615 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
11618 static int __ATTRS_o_ai
11619 vec_all_ne(vector bool int __a, vector int __b)
11621 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
11624 static int __ATTRS_o_ai
11625 vec_all_ne(vector bool int __a, vector unsigned int __b)
11627 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
11630 static int __ATTRS_o_ai
11631 vec_all_ne(vector bool int __a, vector bool int __b)
11633 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
11636 static int __ATTRS_o_ai
11637 vec_all_ne(vector float __a, vector float __b)
11639 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __b);
11642 /* vec_all_nge */
11644 static int __attribute__((__always_inline__))
11645 vec_all_nge(vector float __a, vector float __b)
11647 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __a, __b);
11650 /* vec_all_ngt */
11652 static int __attribute__((__always_inline__))
11653 vec_all_ngt(vector float __a, vector float __b)
11655 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __a, __b);
11658 /* vec_all_nle */
11660 static int __attribute__((__always_inline__))
11661 vec_all_nle(vector float __a, vector float __b)
11663 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __b, __a);
11666 /* vec_all_nlt */
11668 static int __attribute__((__always_inline__))
11669 vec_all_nlt(vector float __a, vector float __b)
11671 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __b, __a);
11674 /* vec_all_numeric */
11676 static int __attribute__((__always_inline__))
11677 vec_all_numeric(vector float __a)
11679 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __a);
11682 /* vec_any_eq */
11684 static int __ATTRS_o_ai
11685 vec_any_eq(vector signed char __a, vector signed char __b)
11687 return
11688 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11691 static int __ATTRS_o_ai
11692 vec_any_eq(vector signed char __a, vector bool char __b)
11694 return
11695 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11698 static int __ATTRS_o_ai
11699 vec_any_eq(vector unsigned char __a, vector unsigned char __b)
11701 return
11702 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11705 static int __ATTRS_o_ai
11706 vec_any_eq(vector unsigned char __a, vector bool char __b)
11708 return
11709 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11712 static int __ATTRS_o_ai
11713 vec_any_eq(vector bool char __a, vector signed char __b)
11715 return
11716 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11719 static int __ATTRS_o_ai
11720 vec_any_eq(vector bool char __a, vector unsigned char __b)
11722 return
11723 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11726 static int __ATTRS_o_ai
11727 vec_any_eq(vector bool char __a, vector bool char __b)
11729 return
11730 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11733 static int __ATTRS_o_ai
11734 vec_any_eq(vector short __a, vector short __b)
11736 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, __b);
11739 static int __ATTRS_o_ai
11740 vec_any_eq(vector short __a, vector bool short __b)
11742 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, (vector short)__b);
11745 static int __ATTRS_o_ai
11746 vec_any_eq(vector unsigned short __a, vector unsigned short __b)
11748 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
11749 (vector short)__a,
11750 (vector short)__b);
11753 static int __ATTRS_o_ai
11754 vec_any_eq(vector unsigned short __a, vector bool short __b)
11756 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
11757 (vector short)__a,
11758 (vector short)__b);
11761 static int __ATTRS_o_ai
11762 vec_any_eq(vector bool short __a, vector short __b)
11764 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
11765 (vector short)__a,
11766 (vector short)__b);
11769 static int __ATTRS_o_ai
11770 vec_any_eq(vector bool short __a, vector unsigned short __b)
11772 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
11773 (vector short)__a,
11774 (vector short)__b);
11777 static int __ATTRS_o_ai
11778 vec_any_eq(vector bool short __a, vector bool short __b)
11780 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
11781 (vector short)__a,
11782 (vector short)__b);
11785 static int __ATTRS_o_ai
11786 vec_any_eq(vector pixel __a, vector pixel __b)
11788 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
11789 (vector short)__a,
11790 (vector short)__b);
11793 static int __ATTRS_o_ai
11794 vec_any_eq(vector int __a, vector int __b)
11796 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, __b);
11799 static int __ATTRS_o_ai
11800 vec_any_eq(vector int __a, vector bool int __b)
11802 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, (vector int)__b);
11805 static int __ATTRS_o_ai
11806 vec_any_eq(vector unsigned int __a, vector unsigned int __b)
11808 return
11809 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
11812 static int __ATTRS_o_ai
11813 vec_any_eq(vector unsigned int __a, vector bool int __b)
11815 return
11816 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
11819 static int __ATTRS_o_ai
11820 vec_any_eq(vector bool int __a, vector int __b)
11822 return
11823 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
11826 static int __ATTRS_o_ai
11827 vec_any_eq(vector bool int __a, vector unsigned int __b)
11829 return
11830 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
11833 static int __ATTRS_o_ai
11834 vec_any_eq(vector bool int __a, vector bool int __b)
11836 return
11837 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
11840 static int __ATTRS_o_ai
11841 vec_any_eq(vector float __a, vector float __b)
11843 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __b);
11846 /* vec_any_ge */
11848 static int __ATTRS_o_ai
11849 vec_any_ge(vector signed char __a, vector signed char __b)
11851 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b, __a);
11854 static int __ATTRS_o_ai
11855 vec_any_ge(vector signed char __a, vector bool char __b)
11857 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b, __a);
11860 static int __ATTRS_o_ai
11861 vec_any_ge(vector unsigned char __a, vector unsigned char __b)
11863 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, __a);
11866 static int __ATTRS_o_ai
11867 vec_any_ge(vector unsigned char __a, vector bool char __b)
11869 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b, __a);
11872 static int __ATTRS_o_ai
11873 vec_any_ge(vector bool char __a, vector signed char __b)
11875 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
11876 (vector unsigned char)__b,
11877 (vector unsigned char)__a);
11880 static int __ATTRS_o_ai
11881 vec_any_ge(vector bool char __a, vector unsigned char __b)
11883 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, (vector unsigned char)__a);
11886 static int __ATTRS_o_ai
11887 vec_any_ge(vector bool char __a, vector bool char __b)
11889 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
11890 (vector unsigned char)__b,
11891 (vector unsigned char)__a);
11894 static int __ATTRS_o_ai
11895 vec_any_ge(vector short __a, vector short __b)
11897 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b, __a);
11900 static int __ATTRS_o_ai
11901 vec_any_ge(vector short __a, vector bool short __b)
11903 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)__b, __a);
11906 static int __ATTRS_o_ai
11907 vec_any_ge(vector unsigned short __a, vector unsigned short __b)
11909 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, __a);
11912 static int __ATTRS_o_ai
11913 vec_any_ge(vector unsigned short __a, vector bool short __b)
11915 return
11916 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b, __a);
11919 static int __ATTRS_o_ai
11920 vec_any_ge(vector bool short __a, vector short __b)
11922 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
11923 (vector unsigned short)__b,
11924 (vector unsigned short)__a);
11927 static int __ATTRS_o_ai
11928 vec_any_ge(vector bool short __a, vector unsigned short __b)
11930 return
11931 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, (vector unsigned short)__a);
11934 static int __ATTRS_o_ai
11935 vec_any_ge(vector bool short __a, vector bool short __b)
11937 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
11938 (vector unsigned short)__b,
11939 (vector unsigned short)__a);
11942 static int __ATTRS_o_ai
11943 vec_any_ge(vector int __a, vector int __b)
11945 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b, __a);
11948 static int __ATTRS_o_ai
11949 vec_any_ge(vector int __a, vector bool int __b)
11951 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)__b, __a);
11954 static int __ATTRS_o_ai
11955 vec_any_ge(vector unsigned int __a, vector unsigned int __b)
11957 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, __a);
11960 static int __ATTRS_o_ai
11961 vec_any_ge(vector unsigned int __a, vector bool int __b)
11963 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b, __a);
11966 static int __ATTRS_o_ai
11967 vec_any_ge(vector bool int __a, vector int __b)
11969 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
11970 (vector unsigned int)__b,
11971 (vector unsigned int)__a);
11974 static int __ATTRS_o_ai
11975 vec_any_ge(vector bool int __a, vector unsigned int __b)
11977 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, (vector unsigned int)__a);
11980 static int __ATTRS_o_ai
11981 vec_any_ge(vector bool int __a, vector bool int __b)
11983 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
11984 (vector unsigned int)__b,
11985 (vector unsigned int)__a);
11988 static int __ATTRS_o_ai
11989 vec_any_ge(vector float __a, vector float __b)
11991 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __a, __b);
11994 /* vec_any_gt */
11996 static int __ATTRS_o_ai
11997 vec_any_gt(vector signed char __a, vector signed char __b)
11999 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, __b);
12002 static int __ATTRS_o_ai
12003 vec_any_gt(vector signed char __a, vector bool char __b)
12005 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, (vector signed char)__b);
12008 static int __ATTRS_o_ai
12009 vec_any_gt(vector unsigned char __a, vector unsigned char __b)
12011 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, __b);
12014 static int __ATTRS_o_ai
12015 vec_any_gt(vector unsigned char __a, vector bool char __b)
12017 return
12018 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, (vector unsigned char)__b);
12021 static int __ATTRS_o_ai
12022 vec_any_gt(vector bool char __a, vector signed char __b)
12024 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
12025 (vector unsigned char)__a,
12026 (vector unsigned char)__b);
12029 static int __ATTRS_o_ai
12030 vec_any_gt(vector bool char __a, vector unsigned char __b)
12032 return
12033 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a, __b);
12036 static int __ATTRS_o_ai
12037 vec_any_gt(vector bool char __a, vector bool char __b)
12039 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
12040 (vector unsigned char)__a,
12041 (vector unsigned char)__b);
12044 static int __ATTRS_o_ai
12045 vec_any_gt(vector short __a, vector short __b)
12047 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, __b);
12050 static int __ATTRS_o_ai
12051 vec_any_gt(vector short __a, vector bool short __b)
12053 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, (vector short)__b);
12056 static int __ATTRS_o_ai
12057 vec_any_gt(vector unsigned short __a, vector unsigned short __b)
12059 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, __b);
12062 static int __ATTRS_o_ai
12063 vec_any_gt(vector unsigned short __a, vector bool short __b)
12065 return
12066 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, (vector unsigned short)__b);
12069 static int __ATTRS_o_ai
12070 vec_any_gt(vector bool short __a, vector short __b)
12072 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
12073 (vector unsigned short)__a,
12074 (vector unsigned short)__b);
12077 static int __ATTRS_o_ai
12078 vec_any_gt(vector bool short __a, vector unsigned short __b)
12080 return
12081 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a, __b);
12084 static int __ATTRS_o_ai
12085 vec_any_gt(vector bool short __a, vector bool short __b)
12087 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
12088 (vector unsigned short)__a,
12089 (vector unsigned short)__b);
12092 static int __ATTRS_o_ai
12093 vec_any_gt(vector int __a, vector int __b)
12095 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, __b);
12098 static int __ATTRS_o_ai
12099 vec_any_gt(vector int __a, vector bool int __b)
12101 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, (vector int)__b);
12104 static int __ATTRS_o_ai
12105 vec_any_gt(vector unsigned int __a, vector unsigned int __b)
12107 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, __b);
12110 static int __ATTRS_o_ai
12111 vec_any_gt(vector unsigned int __a, vector bool int __b)
12113 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, (vector unsigned int)__b);
12116 static int __ATTRS_o_ai
12117 vec_any_gt(vector bool int __a, vector int __b)
12119 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
12120 (vector unsigned int)__a,
12121 (vector unsigned int)__b);
12124 static int __ATTRS_o_ai
12125 vec_any_gt(vector bool int __a, vector unsigned int __b)
12127 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a, __b);
12130 static int __ATTRS_o_ai
12131 vec_any_gt(vector bool int __a, vector bool int __b)
12133 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
12134 (vector unsigned int)__a,
12135 (vector unsigned int)__b);
12138 static int __ATTRS_o_ai
12139 vec_any_gt(vector float __a, vector float __b)
12141 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __a, __b);
12144 /* vec_any_le */
12146 static int __ATTRS_o_ai
12147 vec_any_le(vector signed char __a, vector signed char __b)
12149 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, __b);
12152 static int __ATTRS_o_ai
12153 vec_any_le(vector signed char __a, vector bool char __b)
12155 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, (vector signed char)__b);
12158 static int __ATTRS_o_ai
12159 vec_any_le(vector unsigned char __a, vector unsigned char __b)
12161 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, __b);
12164 static int __ATTRS_o_ai
12165 vec_any_le(vector unsigned char __a, vector bool char __b)
12167 return
12168 __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, (vector unsigned char)__b);
12171 static int __ATTRS_o_ai
12172 vec_any_le(vector bool char __a, vector signed char __b)
12174 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
12175 (vector unsigned char)__a,
12176 (vector unsigned char)__b);
12179 static int __ATTRS_o_ai
12180 vec_any_le(vector bool char __a, vector unsigned char __b)
12182 return
12183 __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a, __b);
12186 static int __ATTRS_o_ai
12187 vec_any_le(vector bool char __a, vector bool char __b)
12189 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
12190 (vector unsigned char)__a,
12191 (vector unsigned char)__b);
12194 static int __ATTRS_o_ai
12195 vec_any_le(vector short __a, vector short __b)
12197 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, __b);
12200 static int __ATTRS_o_ai
12201 vec_any_le(vector short __a, vector bool short __b)
12203 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, (vector short)__b);
12206 static int __ATTRS_o_ai
12207 vec_any_le(vector unsigned short __a, vector unsigned short __b)
12209 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, __b);
12212 static int __ATTRS_o_ai
12213 vec_any_le(vector unsigned short __a, vector bool short __b)
12215 return
12216 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, (vector unsigned short)__b);
12219 static int __ATTRS_o_ai
12220 vec_any_le(vector bool short __a, vector short __b)
12222 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
12223 (vector unsigned short)__a,
12224 (vector unsigned short)__b);
12227 static int __ATTRS_o_ai
12228 vec_any_le(vector bool short __a, vector unsigned short __b)
12230 return
12231 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a, __b);
12234 static int __ATTRS_o_ai
12235 vec_any_le(vector bool short __a, vector bool short __b)
12237 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
12238 (vector unsigned short)__a,
12239 (vector unsigned short)__b);
12242 static int __ATTRS_o_ai
12243 vec_any_le(vector int __a, vector int __b)
12245 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, __b);
12248 static int __ATTRS_o_ai
12249 vec_any_le(vector int __a, vector bool int __b)
12251 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, (vector int)__b);
12254 static int __ATTRS_o_ai
12255 vec_any_le(vector unsigned int __a, vector unsigned int __b)
12257 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, __b);
12260 static int __ATTRS_o_ai
12261 vec_any_le(vector unsigned int __a, vector bool int __b)
12263 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, (vector unsigned int)__b);
12266 static int __ATTRS_o_ai
12267 vec_any_le(vector bool int __a, vector int __b)
12269 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
12270 (vector unsigned int)__a,
12271 (vector unsigned int)__b);
12274 static int __ATTRS_o_ai
12275 vec_any_le(vector bool int __a, vector unsigned int __b)
12277 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a, __b);
12280 static int __ATTRS_o_ai
12281 vec_any_le(vector bool int __a, vector bool int __b)
12283 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
12284 (vector unsigned int)__a,
12285 (vector unsigned int)__b);
12288 static int __ATTRS_o_ai
12289 vec_any_le(vector float __a, vector float __b)
12291 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __b, __a);
12294 /* vec_any_lt */
12296 static int __ATTRS_o_ai
12297 vec_any_lt(vector signed char __a, vector signed char __b)
12299 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b, __a);
12302 static int __ATTRS_o_ai
12303 vec_any_lt(vector signed char __a, vector bool char __b)
12305 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b, __a);
12308 static int __ATTRS_o_ai
12309 vec_any_lt(vector unsigned char __a, vector unsigned char __b)
12311 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, __a);
12314 static int __ATTRS_o_ai
12315 vec_any_lt(vector unsigned char __a, vector bool char __b)
12317 return
12318 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b, __a);
12321 static int __ATTRS_o_ai
12322 vec_any_lt(vector bool char __a, vector signed char __b)
12324 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
12325 (vector unsigned char)__b,
12326 (vector unsigned char)__a);
12329 static int __ATTRS_o_ai
12330 vec_any_lt(vector bool char __a, vector unsigned char __b)
12332 return
12333 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, (vector unsigned char)__a);
12336 static int __ATTRS_o_ai
12337 vec_any_lt(vector bool char __a, vector bool char __b)
12339 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
12340 (vector unsigned char)__b,
12341 (vector unsigned char)__a);
12344 static int __ATTRS_o_ai
12345 vec_any_lt(vector short __a, vector short __b)
12347 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b, __a);
12350 static int __ATTRS_o_ai
12351 vec_any_lt(vector short __a, vector bool short __b)
12353 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)__b, __a);
12356 static int __ATTRS_o_ai
12357 vec_any_lt(vector unsigned short __a, vector unsigned short __b)
12359 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, __a);
12362 static int __ATTRS_o_ai
12363 vec_any_lt(vector unsigned short __a, vector bool short __b)
12365 return
12366 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b, __a);
12369 static int __ATTRS_o_ai
12370 vec_any_lt(vector bool short __a, vector short __b)
12372 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
12373 (vector unsigned short)__b,
12374 (vector unsigned short)__a);
12377 static int __ATTRS_o_ai
12378 vec_any_lt(vector bool short __a, vector unsigned short __b)
12380 return
12381 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, (vector unsigned short)__a);
12384 static int __ATTRS_o_ai
12385 vec_any_lt(vector bool short __a, vector bool short __b)
12387 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
12388 (vector unsigned short)__b,
12389 (vector unsigned short)__a);
12392 static int __ATTRS_o_ai
12393 vec_any_lt(vector int __a, vector int __b)
12395 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b, __a);
12398 static int __ATTRS_o_ai
12399 vec_any_lt(vector int __a, vector bool int __b)
12401 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)__b, __a);
12404 static int __ATTRS_o_ai
12405 vec_any_lt(vector unsigned int __a, vector unsigned int __b)
12407 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, __a);
12410 static int __ATTRS_o_ai
12411 vec_any_lt(vector unsigned int __a, vector bool int __b)
12413 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b, __a);
12416 static int __ATTRS_o_ai
12417 vec_any_lt(vector bool int __a, vector int __b)
12419 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
12420 (vector unsigned int)__b,
12421 (vector unsigned int)__a);
12424 static int __ATTRS_o_ai
12425 vec_any_lt(vector bool int __a, vector unsigned int __b)
12427 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, (vector unsigned int)__a);
12430 static int __ATTRS_o_ai
12431 vec_any_lt(vector bool int __a, vector bool int __b)
12433 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
12434 (vector unsigned int)__b,
12435 (vector unsigned int)__a);
12438 static int __ATTRS_o_ai
12439 vec_any_lt(vector float __a, vector float __b)
12441 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __b, __a);
12444 /* vec_any_nan */
12446 static int __attribute__((__always_inline__))
12447 vec_any_nan(vector float __a)
12449 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __a);
12452 /* vec_any_ne */
12454 static int __ATTRS_o_ai
12455 vec_any_ne(vector signed char __a, vector signed char __b)
12457 return
12458 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12461 static int __ATTRS_o_ai
12462 vec_any_ne(vector signed char __a, vector bool char __b)
12464 return
12465 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12468 static int __ATTRS_o_ai
12469 vec_any_ne(vector unsigned char __a, vector unsigned char __b)
12471 return
12472 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12475 static int __ATTRS_o_ai
12476 vec_any_ne(vector unsigned char __a, vector bool char __b)
12478 return
12479 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12482 static int __ATTRS_o_ai
12483 vec_any_ne(vector bool char __a, vector signed char __b)
12485 return
12486 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12489 static int __ATTRS_o_ai
12490 vec_any_ne(vector bool char __a, vector unsigned char __b)
12492 return
12493 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12496 static int __ATTRS_o_ai
12497 vec_any_ne(vector bool char __a, vector bool char __b)
12499 return
12500 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12503 static int __ATTRS_o_ai
12504 vec_any_ne(vector short __a, vector short __b)
12506 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, __b);
12509 static int __ATTRS_o_ai
12510 vec_any_ne(vector short __a, vector bool short __b)
12512 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, (vector short)__b);
12515 static int __ATTRS_o_ai
12516 vec_any_ne(vector unsigned short __a, vector unsigned short __b)
12518 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
12519 (vector short)__a,
12520 (vector short)__b);
12523 static int __ATTRS_o_ai
12524 vec_any_ne(vector unsigned short __a, vector bool short __b)
12526 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
12527 (vector short)__a,
12528 (vector short)__b);
12531 static int __ATTRS_o_ai
12532 vec_any_ne(vector bool short __a, vector short __b)
12534 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
12535 (vector short)__a,
12536 (vector short)__b);
12539 static int __ATTRS_o_ai
12540 vec_any_ne(vector bool short __a, vector unsigned short __b)
12542 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
12543 (vector short)__a,
12544 (vector short)__b);
12547 static int __ATTRS_o_ai
12548 vec_any_ne(vector bool short __a, vector bool short __b)
12550 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
12551 (vector short)__a,
12552 (vector short)__b);
12555 static int __ATTRS_o_ai
12556 vec_any_ne(vector pixel __a, vector pixel __b)
12558 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
12559 (vector short)__a,
12560 (vector short)__b);
12563 static int __ATTRS_o_ai
12564 vec_any_ne(vector int __a, vector int __b)
12566 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, __b);
12569 static int __ATTRS_o_ai
12570 vec_any_ne(vector int __a, vector bool int __b)
12572 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, (vector int)__b);
12575 static int __ATTRS_o_ai
12576 vec_any_ne(vector unsigned int __a, vector unsigned int __b)
12578 return
12579 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
12582 static int __ATTRS_o_ai
12583 vec_any_ne(vector unsigned int __a, vector bool int __b)
12585 return
12586 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
12589 static int __ATTRS_o_ai
12590 vec_any_ne(vector bool int __a, vector int __b)
12592 return
12593 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
12596 static int __ATTRS_o_ai
12597 vec_any_ne(vector bool int __a, vector unsigned int __b)
12599 return
12600 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
12603 static int __ATTRS_o_ai
12604 vec_any_ne(vector bool int __a, vector bool int __b)
12606 return
12607 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
12610 static int __ATTRS_o_ai
12611 vec_any_ne(vector float __a, vector float __b)
12613 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __b);
12616 /* vec_any_nge */
12618 static int __attribute__((__always_inline__))
12619 vec_any_nge(vector float __a, vector float __b)
12621 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __a, __b);
12624 /* vec_any_ngt */
12626 static int __attribute__((__always_inline__))
12627 vec_any_ngt(vector float __a, vector float __b)
12629 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __a, __b);
12632 /* vec_any_nle */
12634 static int __attribute__((__always_inline__))
12635 vec_any_nle(vector float __a, vector float __b)
12637 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __b, __a);
12640 /* vec_any_nlt */
12642 static int __attribute__((__always_inline__))
12643 vec_any_nlt(vector float __a, vector float __b)
12645 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __b, __a);
12648 /* vec_any_numeric */
12650 static int __attribute__((__always_inline__))
12651 vec_any_numeric(vector float __a)
12653 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __a);
12656 /* vec_any_out */
12658 static int __attribute__((__always_inline__))
12659 vec_any_out(vector float __a, vector float __b)
12661 return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, __a, __b);
12664 #undef __ATTRS_o_ai
12666 #endif /* __ALTIVEC_H */