1 /*===---- altivec.h - Standard header for type generic math ---------------===*\
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 \*===----------------------------------------------------------------------===*/
27 #error "AltiVec support not enabled"
30 /* constants for mapping CR6 bits to predicate result. */
33 #define __CR6_EQ_REV 1
35 #define __CR6_LT_REV 3
37 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
39 static vector signed char __ATTRS_o_ai
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);
77 static vector long long __ATTRS_o_ai
78 vec_perm(vector long long __a, vector long long __b, vector unsigned char __c);
80 static vector unsigned long long __ATTRS_o_ai
81 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
82 vector unsigned char __c);
84 static vector double __ATTRS_o_ai
85 vec_perm(vector double __a, vector double __b, vector unsigned char __c);
88 static vector unsigned char __ATTRS_o_ai
89 vec_xor(vector unsigned char __a, vector unsigned char __b);
93 #define __builtin_altivec_abs_v16qi vec_abs
94 #define __builtin_altivec_abs_v8hi vec_abs
95 #define __builtin_altivec_abs_v4si vec_abs
97 static vector signed char __ATTRS_o_ai
98 vec_abs(vector signed char __a)
100 return __builtin_altivec_vmaxsb(__a, -__a);
103 static vector signed short __ATTRS_o_ai
104 vec_abs(vector signed short __a)
106 return __builtin_altivec_vmaxsh(__a, -__a);
109 static vector signed int __ATTRS_o_ai
110 vec_abs(vector signed int __a)
112 return __builtin_altivec_vmaxsw(__a, -__a);
115 static vector float __ATTRS_o_ai
116 vec_abs(vector float __a)
118 vector unsigned int __res = (vector unsigned int)__a
119 & (vector unsigned int)(0x7FFFFFFF);
120 return (vector float)__res;
125 #define __builtin_altivec_abss_v16qi vec_abss
126 #define __builtin_altivec_abss_v8hi vec_abss
127 #define __builtin_altivec_abss_v4si vec_abss
129 static vector signed char __ATTRS_o_ai
130 vec_abss(vector signed char __a)
132 return __builtin_altivec_vmaxsb
133 (__a, __builtin_altivec_vsubsbs((vector signed char)(0), __a));
136 static vector signed short __ATTRS_o_ai
137 vec_abss(vector signed short __a)
139 return __builtin_altivec_vmaxsh
140 (__a, __builtin_altivec_vsubshs((vector signed short)(0), __a));
143 static vector signed int __ATTRS_o_ai
144 vec_abss(vector signed int __a)
146 return __builtin_altivec_vmaxsw
147 (__a, __builtin_altivec_vsubsws((vector signed int)(0), __a));
152 static vector signed char __ATTRS_o_ai
153 vec_add(vector signed char __a, vector signed char __b)
158 static vector signed char __ATTRS_o_ai
159 vec_add(vector bool char __a, vector signed char __b)
161 return (vector signed char)__a + __b;
164 static vector signed char __ATTRS_o_ai
165 vec_add(vector signed char __a, vector bool char __b)
167 return __a + (vector signed char)__b;
170 static vector unsigned char __ATTRS_o_ai
171 vec_add(vector unsigned char __a, vector unsigned char __b)
176 static vector unsigned char __ATTRS_o_ai
177 vec_add(vector bool char __a, vector unsigned char __b)
179 return (vector unsigned char)__a + __b;
182 static vector unsigned char __ATTRS_o_ai
183 vec_add(vector unsigned char __a, vector bool char __b)
185 return __a + (vector unsigned char)__b;
188 static vector short __ATTRS_o_ai
189 vec_add(vector short __a, vector short __b)
194 static vector short __ATTRS_o_ai
195 vec_add(vector bool short __a, vector short __b)
197 return (vector short)__a + __b;
200 static vector short __ATTRS_o_ai
201 vec_add(vector short __a, vector bool short __b)
203 return __a + (vector short)__b;
206 static vector unsigned short __ATTRS_o_ai
207 vec_add(vector unsigned short __a, vector unsigned short __b)
212 static vector unsigned short __ATTRS_o_ai
213 vec_add(vector bool short __a, vector unsigned short __b)
215 return (vector unsigned short)__a + __b;
218 static vector unsigned short __ATTRS_o_ai
219 vec_add(vector unsigned short __a, vector bool short __b)
221 return __a + (vector unsigned short)__b;
224 static vector int __ATTRS_o_ai
225 vec_add(vector int __a, vector int __b)
230 static vector int __ATTRS_o_ai
231 vec_add(vector bool int __a, vector int __b)
233 return (vector int)__a + __b;
236 static vector int __ATTRS_o_ai
237 vec_add(vector int __a, vector bool int __b)
239 return __a + (vector int)__b;
242 static vector unsigned int __ATTRS_o_ai
243 vec_add(vector unsigned int __a, vector unsigned int __b)
248 static vector unsigned int __ATTRS_o_ai
249 vec_add(vector bool int __a, vector unsigned int __b)
251 return (vector unsigned int)__a + __b;
254 static vector unsigned int __ATTRS_o_ai
255 vec_add(vector unsigned int __a, vector bool int __b)
257 return __a + (vector unsigned int)__b;
260 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
261 static vector signed __int128 __ATTRS_o_ai
262 vec_add(vector signed __int128 __a, vector signed __int128 __b)
267 static vector unsigned __int128 __ATTRS_o_ai
268 vec_add(vector unsigned __int128 __a, vector unsigned __int128 __b)
272 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
274 static vector float __ATTRS_o_ai
275 vec_add(vector float __a, vector float __b)
282 #define __builtin_altivec_vaddubm vec_vaddubm
284 static vector signed char __ATTRS_o_ai
285 vec_vaddubm(vector signed char __a, vector signed char __b)
290 static vector signed char __ATTRS_o_ai
291 vec_vaddubm(vector bool char __a, vector signed char __b)
293 return (vector signed char)__a + __b;
296 static vector signed char __ATTRS_o_ai
297 vec_vaddubm(vector signed char __a, vector bool char __b)
299 return __a + (vector signed char)__b;
302 static vector unsigned char __ATTRS_o_ai
303 vec_vaddubm(vector unsigned char __a, vector unsigned char __b)
308 static vector unsigned char __ATTRS_o_ai
309 vec_vaddubm(vector bool char __a, vector unsigned char __b)
311 return (vector unsigned char)__a + __b;
314 static vector unsigned char __ATTRS_o_ai
315 vec_vaddubm(vector unsigned char __a, vector bool char __b)
317 return __a + (vector unsigned char)__b;
322 #define __builtin_altivec_vadduhm vec_vadduhm
324 static vector short __ATTRS_o_ai
325 vec_vadduhm(vector short __a, vector short __b)
330 static vector short __ATTRS_o_ai
331 vec_vadduhm(vector bool short __a, vector short __b)
333 return (vector short)__a + __b;
336 static vector short __ATTRS_o_ai
337 vec_vadduhm(vector short __a, vector bool short __b)
339 return __a + (vector short)__b;
342 static vector unsigned short __ATTRS_o_ai
343 vec_vadduhm(vector unsigned short __a, vector unsigned short __b)
348 static vector unsigned short __ATTRS_o_ai
349 vec_vadduhm(vector bool short __a, vector unsigned short __b)
351 return (vector unsigned short)__a + __b;
354 static vector unsigned short __ATTRS_o_ai
355 vec_vadduhm(vector unsigned short __a, vector bool short __b)
357 return __a + (vector unsigned short)__b;
362 #define __builtin_altivec_vadduwm vec_vadduwm
364 static vector int __ATTRS_o_ai
365 vec_vadduwm(vector int __a, vector int __b)
370 static vector int __ATTRS_o_ai
371 vec_vadduwm(vector bool int __a, vector int __b)
373 return (vector int)__a + __b;
376 static vector int __ATTRS_o_ai
377 vec_vadduwm(vector int __a, vector bool int __b)
379 return __a + (vector int)__b;
382 static vector unsigned int __ATTRS_o_ai
383 vec_vadduwm(vector unsigned int __a, vector unsigned int __b)
388 static vector unsigned int __ATTRS_o_ai
389 vec_vadduwm(vector bool int __a, vector unsigned int __b)
391 return (vector unsigned int)__a + __b;
394 static vector unsigned int __ATTRS_o_ai
395 vec_vadduwm(vector unsigned int __a, vector bool int __b)
397 return __a + (vector unsigned int)__b;
402 #define __builtin_altivec_vaddfp vec_vaddfp
404 static vector float __attribute__((__always_inline__))
405 vec_vaddfp(vector float __a, vector float __b)
412 static vector unsigned int __ATTRS_o_ai
413 vec_addc(vector unsigned int __a, vector unsigned int __b)
415 return __builtin_altivec_vaddcuw(__a, __b);
418 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
419 static vector signed __int128 __ATTRS_o_ai
420 vec_addc(vector signed __int128 __a, vector signed __int128 __b) {
421 return __builtin_altivec_vaddcuq(__a, __b);
424 static vector unsigned __int128 __ATTRS_o_ai
425 vec_addc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
426 return __builtin_altivec_vaddcuq(__a, __b);
428 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
432 static vector unsigned int __attribute__((__always_inline__))
433 vec_vaddcuw(vector unsigned int __a, vector unsigned int __b)
435 return __builtin_altivec_vaddcuw(__a, __b);
440 static vector signed char __ATTRS_o_ai
441 vec_adds(vector signed char __a, vector signed char __b)
443 return __builtin_altivec_vaddsbs(__a, __b);
446 static vector signed char __ATTRS_o_ai
447 vec_adds(vector bool char __a, vector signed char __b)
449 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
452 static vector signed char __ATTRS_o_ai
453 vec_adds(vector signed char __a, vector bool char __b)
455 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
458 static vector unsigned char __ATTRS_o_ai
459 vec_adds(vector unsigned char __a, vector unsigned char __b)
461 return __builtin_altivec_vaddubs(__a, __b);
464 static vector unsigned char __ATTRS_o_ai
465 vec_adds(vector bool char __a, vector unsigned char __b)
467 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
470 static vector unsigned char __ATTRS_o_ai
471 vec_adds(vector unsigned char __a, vector bool char __b)
473 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
476 static vector short __ATTRS_o_ai
477 vec_adds(vector short __a, vector short __b)
479 return __builtin_altivec_vaddshs(__a, __b);
482 static vector short __ATTRS_o_ai
483 vec_adds(vector bool short __a, vector short __b)
485 return __builtin_altivec_vaddshs((vector short)__a, __b);
488 static vector short __ATTRS_o_ai
489 vec_adds(vector short __a, vector bool short __b)
491 return __builtin_altivec_vaddshs(__a, (vector short)__b);
494 static vector unsigned short __ATTRS_o_ai
495 vec_adds(vector unsigned short __a, vector unsigned short __b)
497 return __builtin_altivec_vadduhs(__a, __b);
500 static vector unsigned short __ATTRS_o_ai
501 vec_adds(vector bool short __a, vector unsigned short __b)
503 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
506 static vector unsigned short __ATTRS_o_ai
507 vec_adds(vector unsigned short __a, vector bool short __b)
509 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
512 static vector int __ATTRS_o_ai
513 vec_adds(vector int __a, vector int __b)
515 return __builtin_altivec_vaddsws(__a, __b);
518 static vector int __ATTRS_o_ai
519 vec_adds(vector bool int __a, vector int __b)
521 return __builtin_altivec_vaddsws((vector int)__a, __b);
524 static vector int __ATTRS_o_ai
525 vec_adds(vector int __a, vector bool int __b)
527 return __builtin_altivec_vaddsws(__a, (vector int)__b);
530 static vector unsigned int __ATTRS_o_ai
531 vec_adds(vector unsigned int __a, vector unsigned int __b)
533 return __builtin_altivec_vadduws(__a, __b);
536 static vector unsigned int __ATTRS_o_ai
537 vec_adds(vector bool int __a, vector unsigned int __b)
539 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
542 static vector unsigned int __ATTRS_o_ai
543 vec_adds(vector unsigned int __a, vector bool int __b)
545 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
550 static vector signed char __ATTRS_o_ai
551 vec_vaddsbs(vector signed char __a, vector signed char __b)
553 return __builtin_altivec_vaddsbs(__a, __b);
556 static vector signed char __ATTRS_o_ai
557 vec_vaddsbs(vector bool char __a, vector signed char __b)
559 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
562 static vector signed char __ATTRS_o_ai
563 vec_vaddsbs(vector signed char __a, vector bool char __b)
565 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
570 static vector unsigned char __ATTRS_o_ai
571 vec_vaddubs(vector unsigned char __a, vector unsigned char __b)
573 return __builtin_altivec_vaddubs(__a, __b);
576 static vector unsigned char __ATTRS_o_ai
577 vec_vaddubs(vector bool char __a, vector unsigned char __b)
579 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
582 static vector unsigned char __ATTRS_o_ai
583 vec_vaddubs(vector unsigned char __a, vector bool char __b)
585 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
590 static vector short __ATTRS_o_ai
591 vec_vaddshs(vector short __a, vector short __b)
593 return __builtin_altivec_vaddshs(__a, __b);
596 static vector short __ATTRS_o_ai
597 vec_vaddshs(vector bool short __a, vector short __b)
599 return __builtin_altivec_vaddshs((vector short)__a, __b);
602 static vector short __ATTRS_o_ai
603 vec_vaddshs(vector short __a, vector bool short __b)
605 return __builtin_altivec_vaddshs(__a, (vector short)__b);
610 static vector unsigned short __ATTRS_o_ai
611 vec_vadduhs(vector unsigned short __a, vector unsigned short __b)
613 return __builtin_altivec_vadduhs(__a, __b);
616 static vector unsigned short __ATTRS_o_ai
617 vec_vadduhs(vector bool short __a, vector unsigned short __b)
619 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
622 static vector unsigned short __ATTRS_o_ai
623 vec_vadduhs(vector unsigned short __a, vector bool short __b)
625 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
630 static vector int __ATTRS_o_ai
631 vec_vaddsws(vector int __a, vector int __b)
633 return __builtin_altivec_vaddsws(__a, __b);
636 static vector int __ATTRS_o_ai
637 vec_vaddsws(vector bool int __a, vector int __b)
639 return __builtin_altivec_vaddsws((vector int)__a, __b);
642 static vector int __ATTRS_o_ai
643 vec_vaddsws(vector int __a, vector bool int __b)
645 return __builtin_altivec_vaddsws(__a, (vector int)__b);
650 static vector unsigned int __ATTRS_o_ai
651 vec_vadduws(vector unsigned int __a, vector unsigned int __b)
653 return __builtin_altivec_vadduws(__a, __b);
656 static vector unsigned int __ATTRS_o_ai
657 vec_vadduws(vector bool int __a, vector unsigned int __b)
659 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
662 static vector unsigned int __ATTRS_o_ai
663 vec_vadduws(vector unsigned int __a, vector bool int __b)
665 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
668 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
671 static vector signed __int128 __ATTRS_o_ai
672 vec_vadduqm(vector signed __int128 __a, vector signed __int128 __b)
677 static vector unsigned __int128 __ATTRS_o_ai
678 vec_vadduqm(vector unsigned __int128 __a, vector unsigned __int128 __b)
685 static vector signed __int128 __ATTRS_o_ai
686 vec_vaddeuqm(vector signed __int128 __a, vector signed __int128 __b,
687 vector signed __int128 __c) {
688 return __builtin_altivec_vaddeuqm(__a, __b, __c);
691 static vector unsigned __int128 __ATTRS_o_ai
692 vec_vaddeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
693 vector unsigned __int128 __c) {
694 return __builtin_altivec_vaddeuqm(__a, __b, __c);
699 static vector signed __int128 __ATTRS_o_ai
700 vec_vaddcuq(vector signed __int128 __a, vector signed __int128 __b)
702 return __builtin_altivec_vaddcuq(__a, __b);
705 static vector unsigned __int128 __ATTRS_o_ai
706 vec_vaddcuq(vector unsigned __int128 __a, vector unsigned __int128 __b)
708 return __builtin_altivec_vaddcuq(__a, __b);
713 static vector signed __int128 __ATTRS_o_ai
714 vec_vaddecuq(vector signed __int128 __a, vector signed __int128 __b,
715 vector signed __int128 __c) {
716 return __builtin_altivec_vaddecuq(__a, __b, __c);
719 static vector unsigned __int128 __ATTRS_o_ai
720 vec_vaddecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
721 vector unsigned __int128 __c) {
722 return __builtin_altivec_vaddecuq(__a, __b, __c);
724 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
728 #define __builtin_altivec_vand vec_and
730 static vector signed char __ATTRS_o_ai
731 vec_and(vector signed char __a, vector signed char __b)
736 static vector signed char __ATTRS_o_ai
737 vec_and(vector bool char __a, vector signed char __b)
739 return (vector signed char)__a & __b;
742 static vector signed char __ATTRS_o_ai
743 vec_and(vector signed char __a, vector bool char __b)
745 return __a & (vector signed char)__b;
748 static vector unsigned char __ATTRS_o_ai
749 vec_and(vector unsigned char __a, vector unsigned char __b)
754 static vector unsigned char __ATTRS_o_ai
755 vec_and(vector bool char __a, vector unsigned char __b)
757 return (vector unsigned char)__a & __b;
760 static vector unsigned char __ATTRS_o_ai
761 vec_and(vector unsigned char __a, vector bool char __b)
763 return __a & (vector unsigned char)__b;
766 static vector bool char __ATTRS_o_ai
767 vec_and(vector bool char __a, vector bool char __b)
772 static vector short __ATTRS_o_ai
773 vec_and(vector short __a, vector short __b)
778 static vector short __ATTRS_o_ai
779 vec_and(vector bool short __a, vector short __b)
781 return (vector short)__a & __b;
784 static vector short __ATTRS_o_ai
785 vec_and(vector short __a, vector bool short __b)
787 return __a & (vector short)__b;
790 static vector unsigned short __ATTRS_o_ai
791 vec_and(vector unsigned short __a, vector unsigned short __b)
796 static vector unsigned short __ATTRS_o_ai
797 vec_and(vector bool short __a, vector unsigned short __b)
799 return (vector unsigned short)__a & __b;
802 static vector unsigned short __ATTRS_o_ai
803 vec_and(vector unsigned short __a, vector bool short __b)
805 return __a & (vector unsigned short)__b;
808 static vector bool short __ATTRS_o_ai
809 vec_and(vector bool short __a, vector bool short __b)
814 static vector int __ATTRS_o_ai
815 vec_and(vector int __a, vector int __b)
820 static vector int __ATTRS_o_ai
821 vec_and(vector bool int __a, vector int __b)
823 return (vector int)__a & __b;
826 static vector int __ATTRS_o_ai
827 vec_and(vector int __a, vector bool int __b)
829 return __a & (vector int)__b;
832 static vector unsigned int __ATTRS_o_ai
833 vec_and(vector unsigned int __a, vector unsigned int __b)
838 static vector unsigned int __ATTRS_o_ai
839 vec_and(vector bool int __a, vector unsigned int __b)
841 return (vector unsigned int)__a & __b;
844 static vector unsigned int __ATTRS_o_ai
845 vec_and(vector unsigned int __a, vector bool int __b)
847 return __a & (vector unsigned int)__b;
850 static vector bool int __ATTRS_o_ai
851 vec_and(vector bool int __a, vector bool int __b)
856 static vector float __ATTRS_o_ai
857 vec_and(vector float __a, vector float __b)
859 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
860 return (vector float)__res;
863 static vector float __ATTRS_o_ai
864 vec_and(vector bool int __a, vector float __b)
866 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
867 return (vector float)__res;
870 static vector float __ATTRS_o_ai
871 vec_and(vector float __a, vector bool int __b)
873 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
874 return (vector float)__res;
879 static vector signed char __ATTRS_o_ai
880 vec_vand(vector signed char __a, vector signed char __b)
885 static vector signed char __ATTRS_o_ai
886 vec_vand(vector bool char __a, vector signed char __b)
888 return (vector signed char)__a & __b;
891 static vector signed char __ATTRS_o_ai
892 vec_vand(vector signed char __a, vector bool char __b)
894 return __a & (vector signed char)__b;
897 static vector unsigned char __ATTRS_o_ai
898 vec_vand(vector unsigned char __a, vector unsigned char __b)
903 static vector unsigned char __ATTRS_o_ai
904 vec_vand(vector bool char __a, vector unsigned char __b)
906 return (vector unsigned char)__a & __b;
909 static vector unsigned char __ATTRS_o_ai
910 vec_vand(vector unsigned char __a, vector bool char __b)
912 return __a & (vector unsigned char)__b;
915 static vector bool char __ATTRS_o_ai
916 vec_vand(vector bool char __a, vector bool char __b)
921 static vector short __ATTRS_o_ai
922 vec_vand(vector short __a, vector short __b)
927 static vector short __ATTRS_o_ai
928 vec_vand(vector bool short __a, vector short __b)
930 return (vector short)__a & __b;
933 static vector short __ATTRS_o_ai
934 vec_vand(vector short __a, vector bool short __b)
936 return __a & (vector short)__b;
939 static vector unsigned short __ATTRS_o_ai
940 vec_vand(vector unsigned short __a, vector unsigned short __b)
945 static vector unsigned short __ATTRS_o_ai
946 vec_vand(vector bool short __a, vector unsigned short __b)
948 return (vector unsigned short)__a & __b;
951 static vector unsigned short __ATTRS_o_ai
952 vec_vand(vector unsigned short __a, vector bool short __b)
954 return __a & (vector unsigned short)__b;
957 static vector bool short __ATTRS_o_ai
958 vec_vand(vector bool short __a, vector bool short __b)
963 static vector int __ATTRS_o_ai
964 vec_vand(vector int __a, vector int __b)
969 static vector int __ATTRS_o_ai
970 vec_vand(vector bool int __a, vector int __b)
972 return (vector int)__a & __b;
975 static vector int __ATTRS_o_ai
976 vec_vand(vector int __a, vector bool int __b)
978 return __a & (vector int)__b;
981 static vector unsigned int __ATTRS_o_ai
982 vec_vand(vector unsigned int __a, vector unsigned int __b)
987 static vector unsigned int __ATTRS_o_ai
988 vec_vand(vector bool int __a, vector unsigned int __b)
990 return (vector unsigned int)__a & __b;
993 static vector unsigned int __ATTRS_o_ai
994 vec_vand(vector unsigned int __a, vector bool int __b)
996 return __a & (vector unsigned int)__b;
999 static vector bool int __ATTRS_o_ai
1000 vec_vand(vector bool int __a, vector bool int __b)
1005 static vector float __ATTRS_o_ai
1006 vec_vand(vector float __a, vector float __b)
1008 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
1009 return (vector float)__res;
1012 static vector float __ATTRS_o_ai
1013 vec_vand(vector bool int __a, vector float __b)
1015 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
1016 return (vector float)__res;
1019 static vector float __ATTRS_o_ai
1020 vec_vand(vector float __a, vector bool int __b)
1022 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
1023 return (vector float)__res;
1028 #define __builtin_altivec_vandc vec_andc
1030 static vector signed char __ATTRS_o_ai
1031 vec_andc(vector signed char __a, vector signed char __b)
1036 static vector signed char __ATTRS_o_ai
1037 vec_andc(vector bool char __a, vector signed char __b)
1039 return (vector signed char)__a & ~__b;
1042 static vector signed char __ATTRS_o_ai
1043 vec_andc(vector signed char __a, vector bool char __b)
1045 return __a & ~(vector signed char)__b;
1048 static vector unsigned char __ATTRS_o_ai
1049 vec_andc(vector unsigned char __a, vector unsigned char __b)
1054 static vector unsigned char __ATTRS_o_ai
1055 vec_andc(vector bool char __a, vector unsigned char __b)
1057 return (vector unsigned char)__a & ~__b;
1060 static vector unsigned char __ATTRS_o_ai
1061 vec_andc(vector unsigned char __a, vector bool char __b)
1063 return __a & ~(vector unsigned char)__b;
1066 static vector bool char __ATTRS_o_ai
1067 vec_andc(vector bool char __a, vector bool char __b)
1072 static vector short __ATTRS_o_ai
1073 vec_andc(vector short __a, vector short __b)
1078 static vector short __ATTRS_o_ai
1079 vec_andc(vector bool short __a, vector short __b)
1081 return (vector short)__a & ~__b;
1084 static vector short __ATTRS_o_ai
1085 vec_andc(vector short __a, vector bool short __b)
1087 return __a & ~(vector short)__b;
1090 static vector unsigned short __ATTRS_o_ai
1091 vec_andc(vector unsigned short __a, vector unsigned short __b)
1096 static vector unsigned short __ATTRS_o_ai
1097 vec_andc(vector bool short __a, vector unsigned short __b)
1099 return (vector unsigned short)__a & ~__b;
1102 static vector unsigned short __ATTRS_o_ai
1103 vec_andc(vector unsigned short __a, vector bool short __b)
1105 return __a & ~(vector unsigned short)__b;
1108 static vector bool short __ATTRS_o_ai
1109 vec_andc(vector bool short __a, vector bool short __b)
1114 static vector int __ATTRS_o_ai
1115 vec_andc(vector int __a, vector int __b)
1120 static vector int __ATTRS_o_ai
1121 vec_andc(vector bool int __a, vector int __b)
1123 return (vector int)__a & ~__b;
1126 static vector int __ATTRS_o_ai
1127 vec_andc(vector int __a, vector bool int __b)
1129 return __a & ~(vector int)__b;
1132 static vector unsigned int __ATTRS_o_ai
1133 vec_andc(vector unsigned int __a, vector unsigned int __b)
1138 static vector unsigned int __ATTRS_o_ai
1139 vec_andc(vector bool int __a, vector unsigned int __b)
1141 return (vector unsigned int)__a & ~__b;
1144 static vector unsigned int __ATTRS_o_ai
1145 vec_andc(vector unsigned int __a, vector bool int __b)
1147 return __a & ~(vector unsigned int)__b;
1150 static vector bool int __ATTRS_o_ai
1151 vec_andc(vector bool int __a, vector bool int __b)
1156 static vector float __ATTRS_o_ai
1157 vec_andc(vector float __a, vector float __b)
1159 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1160 return (vector float)__res;
1163 static vector float __ATTRS_o_ai
1164 vec_andc(vector bool int __a, vector float __b)
1166 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1167 return (vector float)__res;
1170 static vector float __ATTRS_o_ai
1171 vec_andc(vector float __a, vector bool int __b)
1173 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1174 return (vector float)__res;
1179 static vector signed char __ATTRS_o_ai
1180 vec_vandc(vector signed char __a, vector signed char __b)
1185 static vector signed char __ATTRS_o_ai
1186 vec_vandc(vector bool char __a, vector signed char __b)
1188 return (vector signed char)__a & ~__b;
1191 static vector signed char __ATTRS_o_ai
1192 vec_vandc(vector signed char __a, vector bool char __b)
1194 return __a & ~(vector signed char)__b;
1197 static vector unsigned char __ATTRS_o_ai
1198 vec_vandc(vector unsigned char __a, vector unsigned char __b)
1203 static vector unsigned char __ATTRS_o_ai
1204 vec_vandc(vector bool char __a, vector unsigned char __b)
1206 return (vector unsigned char)__a & ~__b;
1209 static vector unsigned char __ATTRS_o_ai
1210 vec_vandc(vector unsigned char __a, vector bool char __b)
1212 return __a & ~(vector unsigned char)__b;
1215 static vector bool char __ATTRS_o_ai
1216 vec_vandc(vector bool char __a, vector bool char __b)
1221 static vector short __ATTRS_o_ai
1222 vec_vandc(vector short __a, vector short __b)
1227 static vector short __ATTRS_o_ai
1228 vec_vandc(vector bool short __a, vector short __b)
1230 return (vector short)__a & ~__b;
1233 static vector short __ATTRS_o_ai
1234 vec_vandc(vector short __a, vector bool short __b)
1236 return __a & ~(vector short)__b;
1239 static vector unsigned short __ATTRS_o_ai
1240 vec_vandc(vector unsigned short __a, vector unsigned short __b)
1245 static vector unsigned short __ATTRS_o_ai
1246 vec_vandc(vector bool short __a, vector unsigned short __b)
1248 return (vector unsigned short)__a & ~__b;
1251 static vector unsigned short __ATTRS_o_ai
1252 vec_vandc(vector unsigned short __a, vector bool short __b)
1254 return __a & ~(vector unsigned short)__b;
1257 static vector bool short __ATTRS_o_ai
1258 vec_vandc(vector bool short __a, vector bool short __b)
1263 static vector int __ATTRS_o_ai
1264 vec_vandc(vector int __a, vector int __b)
1269 static vector int __ATTRS_o_ai
1270 vec_vandc(vector bool int __a, vector int __b)
1272 return (vector int)__a & ~__b;
1275 static vector int __ATTRS_o_ai
1276 vec_vandc(vector int __a, vector bool int __b)
1278 return __a & ~(vector int)__b;
1281 static vector unsigned int __ATTRS_o_ai
1282 vec_vandc(vector unsigned int __a, vector unsigned int __b)
1287 static vector unsigned int __ATTRS_o_ai
1288 vec_vandc(vector bool int __a, vector unsigned int __b)
1290 return (vector unsigned int)__a & ~__b;
1293 static vector unsigned int __ATTRS_o_ai
1294 vec_vandc(vector unsigned int __a, vector bool int __b)
1296 return __a & ~(vector unsigned int)__b;
1299 static vector bool int __ATTRS_o_ai
1300 vec_vandc(vector bool int __a, vector bool int __b)
1305 static vector float __ATTRS_o_ai
1306 vec_vandc(vector float __a, vector float __b)
1308 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1309 return (vector float)__res;
1312 static vector float __ATTRS_o_ai
1313 vec_vandc(vector bool int __a, vector float __b)
1315 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1316 return (vector float)__res;
1319 static vector float __ATTRS_o_ai
1320 vec_vandc(vector float __a, vector bool int __b)
1322 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1323 return (vector float)__res;
1328 static vector signed char __ATTRS_o_ai
1329 vec_avg(vector signed char __a, vector signed char __b)
1331 return __builtin_altivec_vavgsb(__a, __b);
1334 static vector unsigned char __ATTRS_o_ai
1335 vec_avg(vector unsigned char __a, vector unsigned char __b)
1337 return __builtin_altivec_vavgub(__a, __b);
1340 static vector short __ATTRS_o_ai
1341 vec_avg(vector short __a, vector short __b)
1343 return __builtin_altivec_vavgsh(__a, __b);
1346 static vector unsigned short __ATTRS_o_ai
1347 vec_avg(vector unsigned short __a, vector unsigned short __b)
1349 return __builtin_altivec_vavguh(__a, __b);
1352 static vector int __ATTRS_o_ai
1353 vec_avg(vector int __a, vector int __b)
1355 return __builtin_altivec_vavgsw(__a, __b);
1358 static vector unsigned int __ATTRS_o_ai
1359 vec_avg(vector unsigned int __a, vector unsigned int __b)
1361 return __builtin_altivec_vavguw(__a, __b);
1366 static vector signed char __attribute__((__always_inline__))
1367 vec_vavgsb(vector signed char __a, vector signed char __b)
1369 return __builtin_altivec_vavgsb(__a, __b);
1374 static vector unsigned char __attribute__((__always_inline__))
1375 vec_vavgub(vector unsigned char __a, vector unsigned char __b)
1377 return __builtin_altivec_vavgub(__a, __b);
1382 static vector short __attribute__((__always_inline__))
1383 vec_vavgsh(vector short __a, vector short __b)
1385 return __builtin_altivec_vavgsh(__a, __b);
1390 static vector unsigned short __attribute__((__always_inline__))
1391 vec_vavguh(vector unsigned short __a, vector unsigned short __b)
1393 return __builtin_altivec_vavguh(__a, __b);
1398 static vector int __attribute__((__always_inline__))
1399 vec_vavgsw(vector int __a, vector int __b)
1401 return __builtin_altivec_vavgsw(__a, __b);
1406 static vector unsigned int __attribute__((__always_inline__))
1407 vec_vavguw(vector unsigned int __a, vector unsigned int __b)
1409 return __builtin_altivec_vavguw(__a, __b);
1414 static vector float __attribute__((__always_inline__))
1415 vec_ceil(vector float __a)
1417 return __builtin_altivec_vrfip(__a);
1422 static vector float __attribute__((__always_inline__))
1423 vec_vrfip(vector float __a)
1425 return __builtin_altivec_vrfip(__a);
1430 static vector int __attribute__((__always_inline__))
1431 vec_cmpb(vector float __a, vector float __b)
1433 return __builtin_altivec_vcmpbfp(__a, __b);
1438 static vector int __attribute__((__always_inline__))
1439 vec_vcmpbfp(vector float __a, vector float __b)
1441 return __builtin_altivec_vcmpbfp(__a, __b);
1446 static vector bool char __ATTRS_o_ai
1447 vec_cmpeq(vector signed char __a, vector signed char __b)
1449 return (vector bool char)
1450 __builtin_altivec_vcmpequb((vector char)__a, (vector char)__b);
1453 static vector bool char __ATTRS_o_ai
1454 vec_cmpeq(vector unsigned char __a, vector unsigned char __b)
1456 return (vector bool char)
1457 __builtin_altivec_vcmpequb((vector char)__a, (vector char)__b);
1460 static vector bool short __ATTRS_o_ai
1461 vec_cmpeq(vector short __a, vector short __b)
1463 return (vector bool short)__builtin_altivec_vcmpequh(__a, __b);
1466 static vector bool short __ATTRS_o_ai
1467 vec_cmpeq(vector unsigned short __a, vector unsigned short __b)
1469 return (vector bool short)
1470 __builtin_altivec_vcmpequh((vector short)__a, (vector short)__b);
1473 static vector bool int __ATTRS_o_ai
1474 vec_cmpeq(vector int __a, vector int __b)
1476 return (vector bool int)__builtin_altivec_vcmpequw(__a, __b);
1479 static vector bool int __ATTRS_o_ai
1480 vec_cmpeq(vector unsigned int __a, vector unsigned int __b)
1482 return (vector bool int)
1483 __builtin_altivec_vcmpequw((vector int)__a, (vector int)__b);
1486 #ifdef __POWER8_VECTOR__
1487 static vector bool long long __ATTRS_o_ai
1488 vec_cmpeq(vector signed long long __a, vector signed long long __b)
1490 return (vector bool long long) __builtin_altivec_vcmpequd(__a, __b);
1493 static vector bool long long __ATTRS_o_ai
1494 vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b)
1496 return (vector bool long long)
1497 __builtin_altivec_vcmpequd((vector long long)__a, (vector long long) __b);
1501 static vector bool int __ATTRS_o_ai
1502 vec_cmpeq(vector float __a, vector float __b)
1504 return (vector bool int)__builtin_altivec_vcmpeqfp(__a, __b);
1509 static vector bool int __attribute__((__always_inline__))
1510 vec_cmpge(vector float __a, vector float __b)
1512 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1517 static vector bool int __attribute__((__always_inline__))
1518 vec_vcmpgefp(vector float __a, vector float __b)
1520 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1525 static vector bool char __ATTRS_o_ai
1526 vec_cmpgt(vector signed char __a, vector signed char __b)
1528 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1531 static vector bool char __ATTRS_o_ai
1532 vec_cmpgt(vector unsigned char __a, vector unsigned char __b)
1534 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1537 static vector bool short __ATTRS_o_ai
1538 vec_cmpgt(vector short __a, vector short __b)
1540 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1543 static vector bool short __ATTRS_o_ai
1544 vec_cmpgt(vector unsigned short __a, vector unsigned short __b)
1546 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1549 static vector bool int __ATTRS_o_ai
1550 vec_cmpgt(vector int __a, vector int __b)
1552 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1555 static vector bool int __ATTRS_o_ai
1556 vec_cmpgt(vector unsigned int __a, vector unsigned int __b)
1558 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1561 #ifdef __POWER8_VECTOR__
1562 static vector bool long long __ATTRS_o_ai
1563 vec_cmpgt(vector signed long long __a, vector signed long long __b)
1565 return (vector bool long long)__builtin_altivec_vcmpgtsd(__a, __b);
1568 static vector bool long long __ATTRS_o_ai
1569 vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b)
1571 return (vector bool long long)__builtin_altivec_vcmpgtud(__a, __b);
1575 static vector bool int __ATTRS_o_ai
1576 vec_cmpgt(vector float __a, vector float __b)
1578 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1583 static vector bool char __attribute__((__always_inline__))
1584 vec_vcmpgtsb(vector signed char __a, vector signed char __b)
1586 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1591 static vector bool char __attribute__((__always_inline__))
1592 vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b)
1594 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1599 static vector bool short __attribute__((__always_inline__))
1600 vec_vcmpgtsh(vector short __a, vector short __b)
1602 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1607 static vector bool short __attribute__((__always_inline__))
1608 vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b)
1610 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1615 static vector bool int __attribute__((__always_inline__))
1616 vec_vcmpgtsw(vector int __a, vector int __b)
1618 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1623 static vector bool int __attribute__((__always_inline__))
1624 vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b)
1626 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1631 static vector bool int __attribute__((__always_inline__))
1632 vec_vcmpgtfp(vector float __a, vector float __b)
1634 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1639 static vector bool int __attribute__((__always_inline__))
1640 vec_cmple(vector float __a, vector float __b)
1642 return (vector bool int)__builtin_altivec_vcmpgefp(__b, __a);
1647 static vector bool char __ATTRS_o_ai
1648 vec_cmplt(vector signed char __a, vector signed char __b)
1650 return (vector bool char)__builtin_altivec_vcmpgtsb(__b, __a);
1653 static vector bool char __ATTRS_o_ai
1654 vec_cmplt(vector unsigned char __a, vector unsigned char __b)
1656 return (vector bool char)__builtin_altivec_vcmpgtub(__b, __a);
1659 static vector bool short __ATTRS_o_ai
1660 vec_cmplt(vector short __a, vector short __b)
1662 return (vector bool short)__builtin_altivec_vcmpgtsh(__b, __a);
1665 static vector bool short __ATTRS_o_ai
1666 vec_cmplt(vector unsigned short __a, vector unsigned short __b)
1668 return (vector bool short)__builtin_altivec_vcmpgtuh(__b, __a);
1671 static vector bool int __ATTRS_o_ai
1672 vec_cmplt(vector int __a, vector int __b)
1674 return (vector bool int)__builtin_altivec_vcmpgtsw(__b, __a);
1677 static vector bool int __ATTRS_o_ai
1678 vec_cmplt(vector unsigned int __a, vector unsigned int __b)
1680 return (vector bool int)__builtin_altivec_vcmpgtuw(__b, __a);
1683 static vector bool int __ATTRS_o_ai
1684 vec_cmplt(vector float __a, vector float __b)
1686 return (vector bool int)__builtin_altivec_vcmpgtfp(__b, __a);
1691 static vector float __ATTRS_o_ai
1692 vec_ctf(vector int __a, int __b)
1694 return __builtin_altivec_vcfsx(__a, __b);
1697 static vector float __ATTRS_o_ai
1698 vec_ctf(vector unsigned int __a, int __b)
1700 return __builtin_altivec_vcfux((vector int)__a, __b);
1705 static vector float __attribute__((__always_inline__))
1706 vec_vcfsx(vector int __a, int __b)
1708 return __builtin_altivec_vcfsx(__a, __b);
1713 static vector float __attribute__((__always_inline__))
1714 vec_vcfux(vector unsigned int __a, int __b)
1716 return __builtin_altivec_vcfux((vector int)__a, __b);
1721 static vector int __attribute__((__always_inline__))
1722 vec_cts(vector float __a, int __b)
1724 return __builtin_altivec_vctsxs(__a, __b);
1729 static vector int __attribute__((__always_inline__))
1730 vec_vctsxs(vector float __a, int __b)
1732 return __builtin_altivec_vctsxs(__a, __b);
1737 static vector unsigned int __attribute__((__always_inline__))
1738 vec_ctu(vector float __a, int __b)
1740 return __builtin_altivec_vctuxs(__a, __b);
1745 static vector unsigned int __attribute__((__always_inline__))
1746 vec_vctuxs(vector float __a, int __b)
1748 return __builtin_altivec_vctuxs(__a, __b);
1753 static vector float __ATTRS_o_ai
1754 vec_div(vector float __a, vector float __b)
1756 return __builtin_vsx_xvdivsp(__a, __b);
1759 static vector double __ATTRS_o_ai
1760 vec_div(vector double __a, vector double __b)
1762 return __builtin_vsx_xvdivdp(__a, __b);
1768 static void __attribute__((__always_inline__))
1771 __builtin_altivec_dss(__a);
1776 static void __attribute__((__always_inline__))
1779 __builtin_altivec_dssall();
1784 static void __attribute__((__always_inline__))
1785 vec_dst(const void *__a, int __b, int __c)
1787 __builtin_altivec_dst(__a, __b, __c);
1792 static void __attribute__((__always_inline__))
1793 vec_dstst(const void *__a, int __b, int __c)
1795 __builtin_altivec_dstst(__a, __b, __c);
1800 static void __attribute__((__always_inline__))
1801 vec_dststt(const void *__a, int __b, int __c)
1803 __builtin_altivec_dststt(__a, __b, __c);
1808 static void __attribute__((__always_inline__))
1809 vec_dstt(const void *__a, int __b, int __c)
1811 __builtin_altivec_dstt(__a, __b, __c);
1816 static vector float __attribute__((__always_inline__))
1817 vec_expte(vector float __a)
1819 return __builtin_altivec_vexptefp(__a);
1824 static vector float __attribute__((__always_inline__))
1825 vec_vexptefp(vector float __a)
1827 return __builtin_altivec_vexptefp(__a);
1832 static vector float __attribute__((__always_inline__))
1833 vec_floor(vector float __a)
1835 return __builtin_altivec_vrfim(__a);
1840 static vector float __attribute__((__always_inline__))
1841 vec_vrfim(vector float __a)
1843 return __builtin_altivec_vrfim(__a);
1848 static vector signed char __ATTRS_o_ai
1849 vec_ld(int __a, const vector signed char *__b)
1851 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1854 static vector signed char __ATTRS_o_ai
1855 vec_ld(int __a, const signed char *__b)
1857 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1860 static vector unsigned char __ATTRS_o_ai
1861 vec_ld(int __a, const vector unsigned char *__b)
1863 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1866 static vector unsigned char __ATTRS_o_ai
1867 vec_ld(int __a, const unsigned char *__b)
1869 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1872 static vector bool char __ATTRS_o_ai
1873 vec_ld(int __a, const vector bool char *__b)
1875 return (vector bool char)__builtin_altivec_lvx(__a, __b);
1878 static vector short __ATTRS_o_ai
1879 vec_ld(int __a, const vector short *__b)
1881 return (vector short)__builtin_altivec_lvx(__a, __b);
1884 static vector short __ATTRS_o_ai
1885 vec_ld(int __a, const short *__b)
1887 return (vector short)__builtin_altivec_lvx(__a, __b);
1890 static vector unsigned short __ATTRS_o_ai
1891 vec_ld(int __a, const vector unsigned short *__b)
1893 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1896 static vector unsigned short __ATTRS_o_ai
1897 vec_ld(int __a, const unsigned short *__b)
1899 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1902 static vector bool short __ATTRS_o_ai
1903 vec_ld(int __a, const vector bool short *__b)
1905 return (vector bool short)__builtin_altivec_lvx(__a, __b);
1908 static vector pixel __ATTRS_o_ai
1909 vec_ld(int __a, const vector pixel *__b)
1911 return (vector pixel)__builtin_altivec_lvx(__a, __b);
1914 static vector int __ATTRS_o_ai
1915 vec_ld(int __a, const vector int *__b)
1917 return (vector int)__builtin_altivec_lvx(__a, __b);
1920 static vector int __ATTRS_o_ai
1921 vec_ld(int __a, const int *__b)
1923 return (vector int)__builtin_altivec_lvx(__a, __b);
1926 static vector unsigned int __ATTRS_o_ai
1927 vec_ld(int __a, const vector unsigned int *__b)
1929 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1932 static vector unsigned int __ATTRS_o_ai
1933 vec_ld(int __a, const unsigned int *__b)
1935 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1938 static vector bool int __ATTRS_o_ai
1939 vec_ld(int __a, const vector bool int *__b)
1941 return (vector bool int)__builtin_altivec_lvx(__a, __b);
1944 static vector float __ATTRS_o_ai
1945 vec_ld(int __a, const vector float *__b)
1947 return (vector float)__builtin_altivec_lvx(__a, __b);
1950 static vector float __ATTRS_o_ai
1951 vec_ld(int __a, const float *__b)
1953 return (vector float)__builtin_altivec_lvx(__a, __b);
1958 static vector signed char __ATTRS_o_ai
1959 vec_lvx(int __a, const vector signed char *__b)
1961 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1964 static vector signed char __ATTRS_o_ai
1965 vec_lvx(int __a, const signed char *__b)
1967 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1970 static vector unsigned char __ATTRS_o_ai
1971 vec_lvx(int __a, const vector unsigned char *__b)
1973 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1976 static vector unsigned char __ATTRS_o_ai
1977 vec_lvx(int __a, const unsigned char *__b)
1979 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1982 static vector bool char __ATTRS_o_ai
1983 vec_lvx(int __a, const vector bool char *__b)
1985 return (vector bool char)__builtin_altivec_lvx(__a, __b);
1988 static vector short __ATTRS_o_ai
1989 vec_lvx(int __a, const vector short *__b)
1991 return (vector short)__builtin_altivec_lvx(__a, __b);
1994 static vector short __ATTRS_o_ai
1995 vec_lvx(int __a, const short *__b)
1997 return (vector short)__builtin_altivec_lvx(__a, __b);
2000 static vector unsigned short __ATTRS_o_ai
2001 vec_lvx(int __a, const vector unsigned short *__b)
2003 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
2006 static vector unsigned short __ATTRS_o_ai
2007 vec_lvx(int __a, const unsigned short *__b)
2009 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
2012 static vector bool short __ATTRS_o_ai
2013 vec_lvx(int __a, const vector bool short *__b)
2015 return (vector bool short)__builtin_altivec_lvx(__a, __b);
2018 static vector pixel __ATTRS_o_ai
2019 vec_lvx(int __a, const vector pixel *__b)
2021 return (vector pixel)__builtin_altivec_lvx(__a, __b);
2024 static vector int __ATTRS_o_ai
2025 vec_lvx(int __a, const vector int *__b)
2027 return (vector int)__builtin_altivec_lvx(__a, __b);
2030 static vector int __ATTRS_o_ai
2031 vec_lvx(int __a, const int *__b)
2033 return (vector int)__builtin_altivec_lvx(__a, __b);
2036 static vector unsigned int __ATTRS_o_ai
2037 vec_lvx(int __a, const vector unsigned int *__b)
2039 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2042 static vector unsigned int __ATTRS_o_ai
2043 vec_lvx(int __a, const unsigned int *__b)
2045 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2048 static vector bool int __ATTRS_o_ai
2049 vec_lvx(int __a, const vector bool int *__b)
2051 return (vector bool int)__builtin_altivec_lvx(__a, __b);
2054 static vector float __ATTRS_o_ai
2055 vec_lvx(int __a, const vector float *__b)
2057 return (vector float)__builtin_altivec_lvx(__a, __b);
2060 static vector float __ATTRS_o_ai
2061 vec_lvx(int __a, const float *__b)
2063 return (vector float)__builtin_altivec_lvx(__a, __b);
2068 static vector signed char __ATTRS_o_ai
2069 vec_lde(int __a, const signed char *__b)
2071 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
2074 static vector unsigned char __ATTRS_o_ai
2075 vec_lde(int __a, const unsigned char *__b)
2077 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
2080 static vector short __ATTRS_o_ai
2081 vec_lde(int __a, const short *__b)
2083 return (vector short)__builtin_altivec_lvehx(__a, __b);
2086 static vector unsigned short __ATTRS_o_ai
2087 vec_lde(int __a, const unsigned short *__b)
2089 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
2092 static vector int __ATTRS_o_ai
2093 vec_lde(int __a, const int *__b)
2095 return (vector int)__builtin_altivec_lvewx(__a, __b);
2098 static vector unsigned int __ATTRS_o_ai
2099 vec_lde(int __a, const unsigned int *__b)
2101 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2104 static vector float __ATTRS_o_ai
2105 vec_lde(int __a, const float *__b)
2107 return (vector float)__builtin_altivec_lvewx(__a, __b);
2112 static vector signed char __ATTRS_o_ai
2113 vec_lvebx(int __a, const signed char *__b)
2115 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
2118 static vector unsigned char __ATTRS_o_ai
2119 vec_lvebx(int __a, const unsigned char *__b)
2121 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
2126 static vector short __ATTRS_o_ai
2127 vec_lvehx(int __a, const short *__b)
2129 return (vector short)__builtin_altivec_lvehx(__a, __b);
2132 static vector unsigned short __ATTRS_o_ai
2133 vec_lvehx(int __a, const unsigned short *__b)
2135 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
2140 static vector int __ATTRS_o_ai
2141 vec_lvewx(int __a, const int *__b)
2143 return (vector int)__builtin_altivec_lvewx(__a, __b);
2146 static vector unsigned int __ATTRS_o_ai
2147 vec_lvewx(int __a, const unsigned int *__b)
2149 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2152 static vector float __ATTRS_o_ai
2153 vec_lvewx(int __a, const float *__b)
2155 return (vector float)__builtin_altivec_lvewx(__a, __b);
2160 static vector signed char __ATTRS_o_ai
2161 vec_ldl(int __a, const vector signed char *__b)
2163 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2166 static vector signed char __ATTRS_o_ai
2167 vec_ldl(int __a, const signed char *__b)
2169 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2172 static vector unsigned char __ATTRS_o_ai
2173 vec_ldl(int __a, const vector unsigned char *__b)
2175 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2178 static vector unsigned char __ATTRS_o_ai
2179 vec_ldl(int __a, const unsigned char *__b)
2181 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2184 static vector bool char __ATTRS_o_ai
2185 vec_ldl(int __a, const vector bool char *__b)
2187 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2190 static vector short __ATTRS_o_ai
2191 vec_ldl(int __a, const vector short *__b)
2193 return (vector short)__builtin_altivec_lvxl(__a, __b);
2196 static vector short __ATTRS_o_ai
2197 vec_ldl(int __a, const short *__b)
2199 return (vector short)__builtin_altivec_lvxl(__a, __b);
2202 static vector unsigned short __ATTRS_o_ai
2203 vec_ldl(int __a, const vector unsigned short *__b)
2205 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2208 static vector unsigned short __ATTRS_o_ai
2209 vec_ldl(int __a, const unsigned short *__b)
2211 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2214 static vector bool short __ATTRS_o_ai
2215 vec_ldl(int __a, const vector bool short *__b)
2217 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2220 static vector pixel __ATTRS_o_ai
2221 vec_ldl(int __a, const vector pixel *__b)
2223 return (vector pixel short)__builtin_altivec_lvxl(__a, __b);
2226 static vector int __ATTRS_o_ai
2227 vec_ldl(int __a, const vector int *__b)
2229 return (vector int)__builtin_altivec_lvxl(__a, __b);
2232 static vector int __ATTRS_o_ai
2233 vec_ldl(int __a, const int *__b)
2235 return (vector int)__builtin_altivec_lvxl(__a, __b);
2238 static vector unsigned int __ATTRS_o_ai
2239 vec_ldl(int __a, const vector unsigned int *__b)
2241 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2244 static vector unsigned int __ATTRS_o_ai
2245 vec_ldl(int __a, const unsigned int *__b)
2247 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2250 static vector bool int __ATTRS_o_ai
2251 vec_ldl(int __a, const vector bool int *__b)
2253 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2256 static vector float __ATTRS_o_ai
2257 vec_ldl(int __a, const vector float *__b)
2259 return (vector float)__builtin_altivec_lvxl(__a, __b);
2262 static vector float __ATTRS_o_ai
2263 vec_ldl(int __a, const float *__b)
2265 return (vector float)__builtin_altivec_lvxl(__a, __b);
2270 static vector signed char __ATTRS_o_ai
2271 vec_lvxl(int __a, const vector signed char *__b)
2273 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2276 static vector signed char __ATTRS_o_ai
2277 vec_lvxl(int __a, const signed char *__b)
2279 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2282 static vector unsigned char __ATTRS_o_ai
2283 vec_lvxl(int __a, const vector unsigned char *__b)
2285 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2288 static vector unsigned char __ATTRS_o_ai
2289 vec_lvxl(int __a, const unsigned char *__b)
2291 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2294 static vector bool char __ATTRS_o_ai
2295 vec_lvxl(int __a, const vector bool char *__b)
2297 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2300 static vector short __ATTRS_o_ai
2301 vec_lvxl(int __a, const vector short *__b)
2303 return (vector short)__builtin_altivec_lvxl(__a, __b);
2306 static vector short __ATTRS_o_ai
2307 vec_lvxl(int __a, const short *__b)
2309 return (vector short)__builtin_altivec_lvxl(__a, __b);
2312 static vector unsigned short __ATTRS_o_ai
2313 vec_lvxl(int __a, const vector unsigned short *__b)
2315 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2318 static vector unsigned short __ATTRS_o_ai
2319 vec_lvxl(int __a, const unsigned short *__b)
2321 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2324 static vector bool short __ATTRS_o_ai
2325 vec_lvxl(int __a, const vector bool short *__b)
2327 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2330 static vector pixel __ATTRS_o_ai
2331 vec_lvxl(int __a, const vector pixel *__b)
2333 return (vector pixel)__builtin_altivec_lvxl(__a, __b);
2336 static vector int __ATTRS_o_ai
2337 vec_lvxl(int __a, const vector int *__b)
2339 return (vector int)__builtin_altivec_lvxl(__a, __b);
2342 static vector int __ATTRS_o_ai
2343 vec_lvxl(int __a, const int *__b)
2345 return (vector int)__builtin_altivec_lvxl(__a, __b);
2348 static vector unsigned int __ATTRS_o_ai
2349 vec_lvxl(int __a, const vector unsigned int *__b)
2351 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2354 static vector unsigned int __ATTRS_o_ai
2355 vec_lvxl(int __a, const unsigned int *__b)
2357 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2360 static vector bool int __ATTRS_o_ai
2361 vec_lvxl(int __a, const vector bool int *__b)
2363 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2366 static vector float __ATTRS_o_ai
2367 vec_lvxl(int __a, const vector float *__b)
2369 return (vector float)__builtin_altivec_lvxl(__a, __b);
2372 static vector float __ATTRS_o_ai
2373 vec_lvxl(int __a, const float *__b)
2375 return (vector float)__builtin_altivec_lvxl(__a, __b);
2380 static vector float __attribute__((__always_inline__))
2381 vec_loge(vector float __a)
2383 return __builtin_altivec_vlogefp(__a);
2388 static vector float __attribute__((__always_inline__))
2389 vec_vlogefp(vector float __a)
2391 return __builtin_altivec_vlogefp(__a);
2396 #ifdef __LITTLE_ENDIAN__
2397 static vector unsigned char __ATTRS_o_ai
2398 __attribute__((__deprecated__("use assignment for unaligned little endian \
2400 vec_lvsl(int __a, const signed char *__b)
2402 vector unsigned char mask =
2403 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2404 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2405 return vec_perm(mask, mask, reverse);
2408 static vector unsigned char __ATTRS_o_ai
2409 vec_lvsl(int __a, const signed char *__b)
2411 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2415 #ifdef __LITTLE_ENDIAN__
2416 static vector unsigned char __ATTRS_o_ai
2417 __attribute__((__deprecated__("use assignment for unaligned little endian \
2419 vec_lvsl(int __a, const unsigned char *__b)
2421 vector unsigned char mask =
2422 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2423 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2424 return vec_perm(mask, mask, reverse);
2427 static vector unsigned char __ATTRS_o_ai
2428 vec_lvsl(int __a, const unsigned char *__b)
2430 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2434 #ifdef __LITTLE_ENDIAN__
2435 static vector unsigned char __ATTRS_o_ai
2436 __attribute__((__deprecated__("use assignment for unaligned little endian \
2438 vec_lvsl(int __a, const short *__b)
2440 vector unsigned char mask =
2441 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2442 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2443 return vec_perm(mask, mask, reverse);
2446 static vector unsigned char __ATTRS_o_ai
2447 vec_lvsl(int __a, const short *__b)
2449 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2453 #ifdef __LITTLE_ENDIAN__
2454 static vector unsigned char __ATTRS_o_ai
2455 __attribute__((__deprecated__("use assignment for unaligned little endian \
2457 vec_lvsl(int __a, const unsigned short *__b)
2459 vector unsigned char mask =
2460 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2461 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2462 return vec_perm(mask, mask, reverse);
2465 static vector unsigned char __ATTRS_o_ai
2466 vec_lvsl(int __a, const unsigned short *__b)
2468 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2472 #ifdef __LITTLE_ENDIAN__
2473 static vector unsigned char __ATTRS_o_ai
2474 __attribute__((__deprecated__("use assignment for unaligned little endian \
2476 vec_lvsl(int __a, const int *__b)
2478 vector unsigned char mask =
2479 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2480 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2481 return vec_perm(mask, mask, reverse);
2484 static vector unsigned char __ATTRS_o_ai
2485 vec_lvsl(int __a, const int *__b)
2487 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2491 #ifdef __LITTLE_ENDIAN__
2492 static vector unsigned char __ATTRS_o_ai
2493 __attribute__((__deprecated__("use assignment for unaligned little endian \
2495 vec_lvsl(int __a, const unsigned int *__b)
2497 vector unsigned char mask =
2498 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2499 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2500 return vec_perm(mask, mask, reverse);
2503 static vector unsigned char __ATTRS_o_ai
2504 vec_lvsl(int __a, const unsigned int *__b)
2506 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2510 #ifdef __LITTLE_ENDIAN__
2511 static vector unsigned char __ATTRS_o_ai
2512 __attribute__((__deprecated__("use assignment for unaligned little endian \
2514 vec_lvsl(int __a, const float *__b)
2516 vector unsigned char mask =
2517 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2518 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2519 return vec_perm(mask, mask, reverse);
2522 static vector unsigned char __ATTRS_o_ai
2523 vec_lvsl(int __a, const float *__b)
2525 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2531 #ifdef __LITTLE_ENDIAN__
2532 static vector unsigned char __ATTRS_o_ai
2533 __attribute__((__deprecated__("use assignment for unaligned little endian \
2535 vec_lvsr(int __a, const signed char *__b)
2537 vector unsigned char mask =
2538 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2539 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2540 return vec_perm(mask, mask, reverse);
2543 static vector unsigned char __ATTRS_o_ai
2544 vec_lvsr(int __a, const signed char *__b)
2546 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2550 #ifdef __LITTLE_ENDIAN__
2551 static vector unsigned char __ATTRS_o_ai
2552 __attribute__((__deprecated__("use assignment for unaligned little endian \
2554 vec_lvsr(int __a, const unsigned char *__b)
2556 vector unsigned char mask =
2557 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2558 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2559 return vec_perm(mask, mask, reverse);
2562 static vector unsigned char __ATTRS_o_ai
2563 vec_lvsr(int __a, const unsigned char *__b)
2565 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2569 #ifdef __LITTLE_ENDIAN__
2570 static vector unsigned char __ATTRS_o_ai
2571 __attribute__((__deprecated__("use assignment for unaligned little endian \
2573 vec_lvsr(int __a, const short *__b)
2575 vector unsigned char mask =
2576 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2577 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2578 return vec_perm(mask, mask, reverse);
2581 static vector unsigned char __ATTRS_o_ai
2582 vec_lvsr(int __a, const short *__b)
2584 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2588 #ifdef __LITTLE_ENDIAN__
2589 static vector unsigned char __ATTRS_o_ai
2590 __attribute__((__deprecated__("use assignment for unaligned little endian \
2592 vec_lvsr(int __a, const unsigned short *__b)
2594 vector unsigned char mask =
2595 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2596 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2597 return vec_perm(mask, mask, reverse);
2600 static vector unsigned char __ATTRS_o_ai
2601 vec_lvsr(int __a, const unsigned short *__b)
2603 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2607 #ifdef __LITTLE_ENDIAN__
2608 static vector unsigned char __ATTRS_o_ai
2609 __attribute__((__deprecated__("use assignment for unaligned little endian \
2611 vec_lvsr(int __a, const int *__b)
2613 vector unsigned char mask =
2614 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2615 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2616 return vec_perm(mask, mask, reverse);
2619 static vector unsigned char __ATTRS_o_ai
2620 vec_lvsr(int __a, const int *__b)
2622 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2626 #ifdef __LITTLE_ENDIAN__
2627 static vector unsigned char __ATTRS_o_ai
2628 __attribute__((__deprecated__("use assignment for unaligned little endian \
2630 vec_lvsr(int __a, const unsigned int *__b)
2632 vector unsigned char mask =
2633 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2634 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2635 return vec_perm(mask, mask, reverse);
2638 static vector unsigned char __ATTRS_o_ai
2639 vec_lvsr(int __a, const unsigned int *__b)
2641 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2645 #ifdef __LITTLE_ENDIAN__
2646 static vector unsigned char __ATTRS_o_ai
2647 __attribute__((__deprecated__("use assignment for unaligned little endian \
2649 vec_lvsr(int __a, const float *__b)
2651 vector unsigned char mask =
2652 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2653 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2654 return vec_perm(mask, mask, reverse);
2657 static vector unsigned char __ATTRS_o_ai
2658 vec_lvsr(int __a, const float *__b)
2660 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2666 static vector float __attribute__((__always_inline__))
2667 vec_madd(vector float __a, vector float __b, vector float __c)
2669 return __builtin_altivec_vmaddfp(__a, __b, __c);
2674 static vector float __attribute__((__always_inline__))
2675 vec_vmaddfp(vector float __a, vector float __b, vector float __c)
2677 return __builtin_altivec_vmaddfp(__a, __b, __c);
2682 static vector signed short __attribute__((__always_inline__))
2683 vec_madds(vector signed short __a, vector signed short __b, vector signed short __c)
2685 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2689 static vector signed short __attribute__((__always_inline__))
2690 vec_vmhaddshs(vector signed short __a,
2691 vector signed short __b,
2692 vector signed short __c)
2694 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2699 static vector signed char __ATTRS_o_ai
2700 vec_max(vector signed char __a, vector signed char __b)
2702 return __builtin_altivec_vmaxsb(__a, __b);
2705 static vector signed char __ATTRS_o_ai
2706 vec_max(vector bool char __a, vector signed char __b)
2708 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2711 static vector signed char __ATTRS_o_ai
2712 vec_max(vector signed char __a, vector bool char __b)
2714 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2717 static vector unsigned char __ATTRS_o_ai
2718 vec_max(vector unsigned char __a, vector unsigned char __b)
2720 return __builtin_altivec_vmaxub(__a, __b);
2723 static vector unsigned char __ATTRS_o_ai
2724 vec_max(vector bool char __a, vector unsigned char __b)
2726 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2729 static vector unsigned char __ATTRS_o_ai
2730 vec_max(vector unsigned char __a, vector bool char __b)
2732 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2735 static vector short __ATTRS_o_ai
2736 vec_max(vector short __a, vector short __b)
2738 return __builtin_altivec_vmaxsh(__a, __b);
2741 static vector short __ATTRS_o_ai
2742 vec_max(vector bool short __a, vector short __b)
2744 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2747 static vector short __ATTRS_o_ai
2748 vec_max(vector short __a, vector bool short __b)
2750 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2753 static vector unsigned short __ATTRS_o_ai
2754 vec_max(vector unsigned short __a, vector unsigned short __b)
2756 return __builtin_altivec_vmaxuh(__a, __b);
2759 static vector unsigned short __ATTRS_o_ai
2760 vec_max(vector bool short __a, vector unsigned short __b)
2762 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2765 static vector unsigned short __ATTRS_o_ai
2766 vec_max(vector unsigned short __a, vector bool short __b)
2768 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2771 static vector int __ATTRS_o_ai
2772 vec_max(vector int __a, vector int __b)
2774 return __builtin_altivec_vmaxsw(__a, __b);
2777 static vector int __ATTRS_o_ai
2778 vec_max(vector bool int __a, vector int __b)
2780 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2783 static vector int __ATTRS_o_ai
2784 vec_max(vector int __a, vector bool int __b)
2786 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2789 static vector unsigned int __ATTRS_o_ai
2790 vec_max(vector unsigned int __a, vector unsigned int __b)
2792 return __builtin_altivec_vmaxuw(__a, __b);
2795 static vector unsigned int __ATTRS_o_ai
2796 vec_max(vector bool int __a, vector unsigned int __b)
2798 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2801 static vector unsigned int __ATTRS_o_ai
2802 vec_max(vector unsigned int __a, vector bool int __b)
2804 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2807 #ifdef __POWER8_VECTOR__
2808 static vector signed long long __ATTRS_o_ai
2809 vec_max(vector signed long long __a, vector signed long long __b)
2811 return __builtin_altivec_vmaxsd(__a, __b);
2814 static vector unsigned long long __ATTRS_o_ai
2815 vec_max(vector unsigned long long __a, vector unsigned long long __b)
2817 return __builtin_altivec_vmaxud(__a, __b);
2821 static vector float __ATTRS_o_ai
2822 vec_max(vector float __a, vector float __b)
2825 return __builtin_vsx_xvmaxsp(__a, __b);
2827 return __builtin_altivec_vmaxfp(__a, __b);
2832 static vector double __ATTRS_o_ai
2833 vec_max(vector double __a, vector double __b)
2835 return __builtin_vsx_xvmaxdp(__a, __b);
2841 static vector signed char __ATTRS_o_ai
2842 vec_vmaxsb(vector signed char __a, vector signed char __b)
2844 return __builtin_altivec_vmaxsb(__a, __b);
2847 static vector signed char __ATTRS_o_ai
2848 vec_vmaxsb(vector bool char __a, vector signed char __b)
2850 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2853 static vector signed char __ATTRS_o_ai
2854 vec_vmaxsb(vector signed char __a, vector bool char __b)
2856 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2861 static vector unsigned char __ATTRS_o_ai
2862 vec_vmaxub(vector unsigned char __a, vector unsigned char __b)
2864 return __builtin_altivec_vmaxub(__a, __b);
2867 static vector unsigned char __ATTRS_o_ai
2868 vec_vmaxub(vector bool char __a, vector unsigned char __b)
2870 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2873 static vector unsigned char __ATTRS_o_ai
2874 vec_vmaxub(vector unsigned char __a, vector bool char __b)
2876 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2881 static vector short __ATTRS_o_ai
2882 vec_vmaxsh(vector short __a, vector short __b)
2884 return __builtin_altivec_vmaxsh(__a, __b);
2887 static vector short __ATTRS_o_ai
2888 vec_vmaxsh(vector bool short __a, vector short __b)
2890 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2893 static vector short __ATTRS_o_ai
2894 vec_vmaxsh(vector short __a, vector bool short __b)
2896 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2901 static vector unsigned short __ATTRS_o_ai
2902 vec_vmaxuh(vector unsigned short __a, vector unsigned short __b)
2904 return __builtin_altivec_vmaxuh(__a, __b);
2907 static vector unsigned short __ATTRS_o_ai
2908 vec_vmaxuh(vector bool short __a, vector unsigned short __b)
2910 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2913 static vector unsigned short __ATTRS_o_ai
2914 vec_vmaxuh(vector unsigned short __a, vector bool short __b)
2916 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2921 static vector int __ATTRS_o_ai
2922 vec_vmaxsw(vector int __a, vector int __b)
2924 return __builtin_altivec_vmaxsw(__a, __b);
2927 static vector int __ATTRS_o_ai
2928 vec_vmaxsw(vector bool int __a, vector int __b)
2930 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2933 static vector int __ATTRS_o_ai
2934 vec_vmaxsw(vector int __a, vector bool int __b)
2936 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2941 static vector unsigned int __ATTRS_o_ai
2942 vec_vmaxuw(vector unsigned int __a, vector unsigned int __b)
2944 return __builtin_altivec_vmaxuw(__a, __b);
2947 static vector unsigned int __ATTRS_o_ai
2948 vec_vmaxuw(vector bool int __a, vector unsigned int __b)
2950 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2953 static vector unsigned int __ATTRS_o_ai
2954 vec_vmaxuw(vector unsigned int __a, vector bool int __b)
2956 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2961 static vector float __attribute__((__always_inline__))
2962 vec_vmaxfp(vector float __a, vector float __b)
2965 return __builtin_vsx_xvmaxsp(__a, __b);
2967 return __builtin_altivec_vmaxfp(__a, __b);
2973 static vector signed char __ATTRS_o_ai
2974 vec_mergeh(vector signed char __a, vector signed char __b)
2976 return vec_perm(__a, __b, (vector unsigned char)
2977 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2978 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2981 static vector unsigned char __ATTRS_o_ai
2982 vec_mergeh(vector unsigned char __a, vector unsigned char __b)
2984 return vec_perm(__a, __b, (vector unsigned char)
2985 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2986 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2989 static vector bool char __ATTRS_o_ai
2990 vec_mergeh(vector bool char __a, vector bool char __b)
2992 return vec_perm(__a, __b, (vector unsigned char)
2993 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2994 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2997 static vector short __ATTRS_o_ai
2998 vec_mergeh(vector short __a, vector short __b)
3000 return vec_perm(__a, __b, (vector unsigned char)
3001 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3002 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3005 static vector unsigned short __ATTRS_o_ai
3006 vec_mergeh(vector unsigned short __a, vector unsigned short __b)
3008 return vec_perm(__a, __b, (vector unsigned char)
3009 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3010 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3013 static vector bool short __ATTRS_o_ai
3014 vec_mergeh(vector bool short __a, vector bool short __b)
3016 return vec_perm(__a, __b, (vector unsigned char)
3017 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3018 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3021 static vector pixel __ATTRS_o_ai
3022 vec_mergeh(vector pixel __a, vector pixel __b)
3024 return vec_perm(__a, __b, (vector unsigned char)
3025 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3026 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3029 static vector int __ATTRS_o_ai
3030 vec_mergeh(vector int __a, vector int __b)
3032 return vec_perm(__a, __b, (vector unsigned char)
3033 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3034 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3037 static vector unsigned int __ATTRS_o_ai
3038 vec_mergeh(vector unsigned int __a, vector unsigned int __b)
3040 return vec_perm(__a, __b, (vector unsigned char)
3041 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3042 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3045 static vector bool int __ATTRS_o_ai
3046 vec_mergeh(vector bool int __a, vector bool int __b)
3048 return vec_perm(__a, __b, (vector unsigned char)
3049 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3050 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3053 static vector float __ATTRS_o_ai
3054 vec_mergeh(vector float __a, vector float __b)
3056 return vec_perm(__a, __b, (vector unsigned char)
3057 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3058 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3063 #define __builtin_altivec_vmrghb vec_vmrghb
3065 static vector signed char __ATTRS_o_ai
3066 vec_vmrghb(vector signed char __a, vector signed char __b)
3068 return vec_perm(__a, __b, (vector unsigned char)
3069 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
3070 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
3073 static vector unsigned char __ATTRS_o_ai
3074 vec_vmrghb(vector unsigned char __a, vector unsigned char __b)
3076 return vec_perm(__a, __b, (vector unsigned char)
3077 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
3078 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
3081 static vector bool char __ATTRS_o_ai
3082 vec_vmrghb(vector bool char __a, vector bool char __b)
3084 return vec_perm(__a, __b, (vector unsigned char)
3085 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
3086 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
3091 #define __builtin_altivec_vmrghh vec_vmrghh
3093 static vector short __ATTRS_o_ai
3094 vec_vmrghh(vector short __a, vector short __b)
3096 return vec_perm(__a, __b, (vector unsigned char)
3097 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3098 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3101 static vector unsigned short __ATTRS_o_ai
3102 vec_vmrghh(vector unsigned short __a, vector unsigned short __b)
3104 return vec_perm(__a, __b, (vector unsigned char)
3105 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3106 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3109 static vector bool short __ATTRS_o_ai
3110 vec_vmrghh(vector bool short __a, vector bool short __b)
3112 return vec_perm(__a, __b, (vector unsigned char)
3113 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3114 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3117 static vector pixel __ATTRS_o_ai
3118 vec_vmrghh(vector pixel __a, vector pixel __b)
3120 return vec_perm(__a, __b, (vector unsigned char)
3121 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3122 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3127 #define __builtin_altivec_vmrghw vec_vmrghw
3129 static vector int __ATTRS_o_ai
3130 vec_vmrghw(vector int __a, vector int __b)
3132 return vec_perm(__a, __b, (vector unsigned char)
3133 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3134 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3137 static vector unsigned int __ATTRS_o_ai
3138 vec_vmrghw(vector unsigned int __a, vector unsigned int __b)
3140 return vec_perm(__a, __b, (vector unsigned char)
3141 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3142 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3145 static vector bool int __ATTRS_o_ai
3146 vec_vmrghw(vector bool int __a, vector bool int __b)
3148 return vec_perm(__a, __b, (vector unsigned char)
3149 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3150 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3153 static vector float __ATTRS_o_ai
3154 vec_vmrghw(vector float __a, vector float __b)
3156 return vec_perm(__a, __b, (vector unsigned char)
3157 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3158 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3163 static vector signed char __ATTRS_o_ai
3164 vec_mergel(vector signed char __a, vector signed char __b)
3166 return vec_perm(__a, __b, (vector unsigned char)
3167 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3168 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3171 static vector unsigned char __ATTRS_o_ai
3172 vec_mergel(vector unsigned char __a, vector unsigned char __b)
3174 return vec_perm(__a, __b, (vector unsigned char)
3175 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3176 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3179 static vector bool char __ATTRS_o_ai
3180 vec_mergel(vector bool char __a, vector bool char __b)
3182 return vec_perm(__a, __b, (vector unsigned char)
3183 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3184 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3187 static vector short __ATTRS_o_ai
3188 vec_mergel(vector short __a, vector short __b)
3190 return vec_perm(__a, __b, (vector unsigned char)
3191 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3192 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3195 static vector unsigned short __ATTRS_o_ai
3196 vec_mergel(vector unsigned short __a, vector unsigned short __b)
3198 return vec_perm(__a, __b, (vector unsigned char)
3199 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3200 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3203 static vector bool short __ATTRS_o_ai
3204 vec_mergel(vector bool short __a, vector bool short __b)
3206 return vec_perm(__a, __b, (vector unsigned char)
3207 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3208 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3211 static vector pixel __ATTRS_o_ai
3212 vec_mergel(vector pixel __a, vector pixel __b)
3214 return vec_perm(__a, __b, (vector unsigned char)
3215 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3216 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3219 static vector int __ATTRS_o_ai
3220 vec_mergel(vector int __a, vector int __b)
3222 return vec_perm(__a, __b, (vector unsigned char)
3223 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3224 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3227 static vector unsigned int __ATTRS_o_ai
3228 vec_mergel(vector unsigned int __a, vector unsigned int __b)
3230 return vec_perm(__a, __b, (vector unsigned char)
3231 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3232 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3235 static vector bool int __ATTRS_o_ai
3236 vec_mergel(vector bool int __a, vector bool int __b)
3238 return vec_perm(__a, __b, (vector unsigned char)
3239 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3240 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3243 static vector float __ATTRS_o_ai
3244 vec_mergel(vector float __a, vector float __b)
3246 return vec_perm(__a, __b, (vector unsigned char)
3247 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3248 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3253 #define __builtin_altivec_vmrglb vec_vmrglb
3255 static vector signed char __ATTRS_o_ai
3256 vec_vmrglb(vector signed char __a, vector signed char __b)
3258 return vec_perm(__a, __b, (vector unsigned char)
3259 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3260 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3263 static vector unsigned char __ATTRS_o_ai
3264 vec_vmrglb(vector unsigned char __a, vector unsigned char __b)
3266 return vec_perm(__a, __b, (vector unsigned char)
3267 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3268 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3271 static vector bool char __ATTRS_o_ai
3272 vec_vmrglb(vector bool char __a, vector bool char __b)
3274 return vec_perm(__a, __b, (vector unsigned char)
3275 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3276 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3281 #define __builtin_altivec_vmrglh vec_vmrglh
3283 static vector short __ATTRS_o_ai
3284 vec_vmrglh(vector short __a, vector short __b)
3286 return vec_perm(__a, __b, (vector unsigned char)
3287 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3288 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3291 static vector unsigned short __ATTRS_o_ai
3292 vec_vmrglh(vector unsigned short __a, vector unsigned short __b)
3294 return vec_perm(__a, __b, (vector unsigned char)
3295 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3296 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3299 static vector bool short __ATTRS_o_ai
3300 vec_vmrglh(vector bool short __a, vector bool short __b)
3302 return vec_perm(__a, __b, (vector unsigned char)
3303 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3304 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3307 static vector pixel __ATTRS_o_ai
3308 vec_vmrglh(vector pixel __a, vector pixel __b)
3310 return vec_perm(__a, __b, (vector unsigned char)
3311 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3312 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3317 #define __builtin_altivec_vmrglw vec_vmrglw
3319 static vector int __ATTRS_o_ai
3320 vec_vmrglw(vector int __a, vector int __b)
3322 return vec_perm(__a, __b, (vector unsigned char)
3323 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3324 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3327 static vector unsigned int __ATTRS_o_ai
3328 vec_vmrglw(vector unsigned int __a, vector unsigned int __b)
3330 return vec_perm(__a, __b, (vector unsigned char)
3331 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3332 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3335 static vector bool int __ATTRS_o_ai
3336 vec_vmrglw(vector bool int __a, vector bool int __b)
3338 return vec_perm(__a, __b, (vector unsigned char)
3339 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3340 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3343 static vector float __ATTRS_o_ai
3344 vec_vmrglw(vector float __a, vector float __b)
3346 return vec_perm(__a, __b, (vector unsigned char)
3347 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3348 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3353 static vector unsigned short __attribute__((__always_inline__))
3356 return __builtin_altivec_mfvscr();
3361 static vector signed char __ATTRS_o_ai
3362 vec_min(vector signed char __a, vector signed char __b)
3364 return __builtin_altivec_vminsb(__a, __b);
3367 static vector signed char __ATTRS_o_ai
3368 vec_min(vector bool char __a, vector signed char __b)
3370 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3373 static vector signed char __ATTRS_o_ai
3374 vec_min(vector signed char __a, vector bool char __b)
3376 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3379 static vector unsigned char __ATTRS_o_ai
3380 vec_min(vector unsigned char __a, vector unsigned char __b)
3382 return __builtin_altivec_vminub(__a, __b);
3385 static vector unsigned char __ATTRS_o_ai
3386 vec_min(vector bool char __a, vector unsigned char __b)
3388 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3391 static vector unsigned char __ATTRS_o_ai
3392 vec_min(vector unsigned char __a, vector bool char __b)
3394 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3397 static vector short __ATTRS_o_ai
3398 vec_min(vector short __a, vector short __b)
3400 return __builtin_altivec_vminsh(__a, __b);
3403 static vector short __ATTRS_o_ai
3404 vec_min(vector bool short __a, vector short __b)
3406 return __builtin_altivec_vminsh((vector short)__a, __b);
3409 static vector short __ATTRS_o_ai
3410 vec_min(vector short __a, vector bool short __b)
3412 return __builtin_altivec_vminsh(__a, (vector short)__b);
3415 static vector unsigned short __ATTRS_o_ai
3416 vec_min(vector unsigned short __a, vector unsigned short __b)
3418 return __builtin_altivec_vminuh(__a, __b);
3421 static vector unsigned short __ATTRS_o_ai
3422 vec_min(vector bool short __a, vector unsigned short __b)
3424 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3427 static vector unsigned short __ATTRS_o_ai
3428 vec_min(vector unsigned short __a, vector bool short __b)
3430 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3433 static vector int __ATTRS_o_ai
3434 vec_min(vector int __a, vector int __b)
3436 return __builtin_altivec_vminsw(__a, __b);
3439 static vector int __ATTRS_o_ai
3440 vec_min(vector bool int __a, vector int __b)
3442 return __builtin_altivec_vminsw((vector int)__a, __b);
3445 static vector int __ATTRS_o_ai
3446 vec_min(vector int __a, vector bool int __b)
3448 return __builtin_altivec_vminsw(__a, (vector int)__b);
3451 static vector unsigned int __ATTRS_o_ai
3452 vec_min(vector unsigned int __a, vector unsigned int __b)
3454 return __builtin_altivec_vminuw(__a, __b);
3457 static vector unsigned int __ATTRS_o_ai
3458 vec_min(vector bool int __a, vector unsigned int __b)
3460 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3463 static vector unsigned int __ATTRS_o_ai
3464 vec_min(vector unsigned int __a, vector bool int __b)
3466 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3469 #ifdef __POWER8_VECTOR__
3470 static vector signed long long __ATTRS_o_ai
3471 vec_min(vector signed long long __a, vector signed long long __b)
3473 return __builtin_altivec_vminsd(__a, __b);
3476 static vector unsigned long long __ATTRS_o_ai
3477 vec_min(vector unsigned long long __a, vector unsigned long long __b)
3479 return __builtin_altivec_vminud(__a, __b);
3483 static vector float __ATTRS_o_ai
3484 vec_min(vector float __a, vector float __b)
3487 return __builtin_vsx_xvminsp(__a, __b);
3489 return __builtin_altivec_vminfp(__a, __b);
3494 static vector double __ATTRS_o_ai
3495 vec_min(vector double __a, vector double __b)
3497 return __builtin_vsx_xvmindp(__a, __b);
3503 static vector signed char __ATTRS_o_ai
3504 vec_vminsb(vector signed char __a, vector signed char __b)
3506 return __builtin_altivec_vminsb(__a, __b);
3509 static vector signed char __ATTRS_o_ai
3510 vec_vminsb(vector bool char __a, vector signed char __b)
3512 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3515 static vector signed char __ATTRS_o_ai
3516 vec_vminsb(vector signed char __a, vector bool char __b)
3518 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3523 static vector unsigned char __ATTRS_o_ai
3524 vec_vminub(vector unsigned char __a, vector unsigned char __b)
3526 return __builtin_altivec_vminub(__a, __b);
3529 static vector unsigned char __ATTRS_o_ai
3530 vec_vminub(vector bool char __a, vector unsigned char __b)
3532 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3535 static vector unsigned char __ATTRS_o_ai
3536 vec_vminub(vector unsigned char __a, vector bool char __b)
3538 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3543 static vector short __ATTRS_o_ai
3544 vec_vminsh(vector short __a, vector short __b)
3546 return __builtin_altivec_vminsh(__a, __b);
3549 static vector short __ATTRS_o_ai
3550 vec_vminsh(vector bool short __a, vector short __b)
3552 return __builtin_altivec_vminsh((vector short)__a, __b);
3555 static vector short __ATTRS_o_ai
3556 vec_vminsh(vector short __a, vector bool short __b)
3558 return __builtin_altivec_vminsh(__a, (vector short)__b);
3563 static vector unsigned short __ATTRS_o_ai
3564 vec_vminuh(vector unsigned short __a, vector unsigned short __b)
3566 return __builtin_altivec_vminuh(__a, __b);
3569 static vector unsigned short __ATTRS_o_ai
3570 vec_vminuh(vector bool short __a, vector unsigned short __b)
3572 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3575 static vector unsigned short __ATTRS_o_ai
3576 vec_vminuh(vector unsigned short __a, vector bool short __b)
3578 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3583 static vector int __ATTRS_o_ai
3584 vec_vminsw(vector int __a, vector int __b)
3586 return __builtin_altivec_vminsw(__a, __b);
3589 static vector int __ATTRS_o_ai
3590 vec_vminsw(vector bool int __a, vector int __b)
3592 return __builtin_altivec_vminsw((vector int)__a, __b);
3595 static vector int __ATTRS_o_ai
3596 vec_vminsw(vector int __a, vector bool int __b)
3598 return __builtin_altivec_vminsw(__a, (vector int)__b);
3603 static vector unsigned int __ATTRS_o_ai
3604 vec_vminuw(vector unsigned int __a, vector unsigned int __b)
3606 return __builtin_altivec_vminuw(__a, __b);
3609 static vector unsigned int __ATTRS_o_ai
3610 vec_vminuw(vector bool int __a, vector unsigned int __b)
3612 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3615 static vector unsigned int __ATTRS_o_ai
3616 vec_vminuw(vector unsigned int __a, vector bool int __b)
3618 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3623 static vector float __attribute__((__always_inline__))
3624 vec_vminfp(vector float __a, vector float __b)
3627 return __builtin_vsx_xvminsp(__a, __b);
3629 return __builtin_altivec_vminfp(__a, __b);
3635 #define __builtin_altivec_vmladduhm vec_mladd
3637 static vector short __ATTRS_o_ai
3638 vec_mladd(vector short __a, vector short __b, vector short __c)
3640 return __a * __b + __c;
3643 static vector short __ATTRS_o_ai
3644 vec_mladd(vector short __a, vector unsigned short __b, vector unsigned short __c)
3646 return __a * (vector short)__b + (vector short)__c;
3649 static vector short __ATTRS_o_ai
3650 vec_mladd(vector unsigned short __a, vector short __b, vector short __c)
3652 return (vector short)__a * __b + __c;
3655 static vector unsigned short __ATTRS_o_ai
3656 vec_mladd(vector unsigned short __a,
3657 vector unsigned short __b,
3658 vector unsigned short __c)
3660 return __a * __b + __c;
3665 static vector short __ATTRS_o_ai
3666 vec_vmladduhm(vector short __a, vector short __b, vector short __c)
3668 return __a * __b + __c;
3671 static vector short __ATTRS_o_ai
3672 vec_vmladduhm(vector short __a, vector unsigned short __b, vector unsigned short __c)
3674 return __a * (vector short)__b + (vector short)__c;
3677 static vector short __ATTRS_o_ai
3678 vec_vmladduhm(vector unsigned short __a, vector short __b, vector short __c)
3680 return (vector short)__a * __b + __c;
3683 static vector unsigned short __ATTRS_o_ai
3684 vec_vmladduhm(vector unsigned short __a,
3685 vector unsigned short __b,
3686 vector unsigned short __c)
3688 return __a * __b + __c;
3693 static vector short __attribute__((__always_inline__))
3694 vec_mradds(vector short __a, vector short __b, vector short __c)
3696 return __builtin_altivec_vmhraddshs(__a, __b, __c);
3699 /* vec_vmhraddshs */
3701 static vector short __attribute__((__always_inline__))
3702 vec_vmhraddshs(vector short __a, vector short __b, vector short __c)
3704 return __builtin_altivec_vmhraddshs(__a, __b, __c);
3709 static vector int __ATTRS_o_ai
3710 vec_msum(vector signed char __a, vector unsigned char __b, vector int __c)
3712 return __builtin_altivec_vmsummbm(__a, __b, __c);
3715 static vector unsigned int __ATTRS_o_ai
3716 vec_msum(vector unsigned char __a, vector unsigned char __b, vector unsigned int __c)
3718 return __builtin_altivec_vmsumubm(__a, __b, __c);
3721 static vector int __ATTRS_o_ai
3722 vec_msum(vector short __a, vector short __b, vector int __c)
3724 return __builtin_altivec_vmsumshm(__a, __b, __c);
3727 static vector unsigned int __ATTRS_o_ai
3728 vec_msum(vector unsigned short __a,
3729 vector unsigned short __b,
3730 vector unsigned int __c)
3732 return __builtin_altivec_vmsumuhm(__a, __b, __c);
3737 static vector int __attribute__((__always_inline__))
3738 vec_vmsummbm(vector signed char __a, vector unsigned char __b, vector int __c)
3740 return __builtin_altivec_vmsummbm(__a, __b, __c);
3745 static vector unsigned int __attribute__((__always_inline__))
3746 vec_vmsumubm(vector unsigned char __a,
3747 vector unsigned char __b,
3748 vector unsigned int __c)
3750 return __builtin_altivec_vmsumubm(__a, __b, __c);
3755 static vector int __attribute__((__always_inline__))
3756 vec_vmsumshm(vector short __a, vector short __b, vector int __c)
3758 return __builtin_altivec_vmsumshm(__a, __b, __c);
3763 static vector unsigned int __attribute__((__always_inline__))
3764 vec_vmsumuhm(vector unsigned short __a,
3765 vector unsigned short __b,
3766 vector unsigned int __c)
3768 return __builtin_altivec_vmsumuhm(__a, __b, __c);
3773 static vector int __ATTRS_o_ai
3774 vec_msums(vector short __a, vector short __b, vector int __c)
3776 return __builtin_altivec_vmsumshs(__a, __b, __c);
3779 static vector unsigned int __ATTRS_o_ai
3780 vec_msums(vector unsigned short __a,
3781 vector unsigned short __b,
3782 vector unsigned int __c)
3784 return __builtin_altivec_vmsumuhs(__a, __b, __c);
3789 static vector int __attribute__((__always_inline__))
3790 vec_vmsumshs(vector short __a, vector short __b, vector int __c)
3792 return __builtin_altivec_vmsumshs(__a, __b, __c);
3797 static vector unsigned int __attribute__((__always_inline__))
3798 vec_vmsumuhs(vector unsigned short __a,
3799 vector unsigned short __b,
3800 vector unsigned int __c)
3802 return __builtin_altivec_vmsumuhs(__a, __b, __c);
3807 static void __ATTRS_o_ai
3808 vec_mtvscr(vector signed char __a)
3810 __builtin_altivec_mtvscr((vector int)__a);
3813 static void __ATTRS_o_ai
3814 vec_mtvscr(vector unsigned char __a)
3816 __builtin_altivec_mtvscr((vector int)__a);
3819 static void __ATTRS_o_ai
3820 vec_mtvscr(vector bool char __a)
3822 __builtin_altivec_mtvscr((vector int)__a);
3825 static void __ATTRS_o_ai
3826 vec_mtvscr(vector short __a)
3828 __builtin_altivec_mtvscr((vector int)__a);
3831 static void __ATTRS_o_ai
3832 vec_mtvscr(vector unsigned short __a)
3834 __builtin_altivec_mtvscr((vector int)__a);
3837 static void __ATTRS_o_ai
3838 vec_mtvscr(vector bool short __a)
3840 __builtin_altivec_mtvscr((vector int)__a);
3843 static void __ATTRS_o_ai
3844 vec_mtvscr(vector pixel __a)
3846 __builtin_altivec_mtvscr((vector int)__a);
3849 static void __ATTRS_o_ai
3850 vec_mtvscr(vector int __a)
3852 __builtin_altivec_mtvscr((vector int)__a);
3855 static void __ATTRS_o_ai
3856 vec_mtvscr(vector unsigned int __a)
3858 __builtin_altivec_mtvscr((vector int)__a);
3861 static void __ATTRS_o_ai
3862 vec_mtvscr(vector bool int __a)
3864 __builtin_altivec_mtvscr((vector int)__a);
3867 static void __ATTRS_o_ai
3868 vec_mtvscr(vector float __a)
3870 __builtin_altivec_mtvscr((vector int)__a);
3873 /* The vmulos* and vmules* instructions have a big endian bias, so
3874 we must reverse the meaning of "even" and "odd" for little endian. */
3878 static vector short __ATTRS_o_ai
3879 vec_mule(vector signed char __a, vector signed char __b)
3881 #ifdef __LITTLE_ENDIAN__
3882 return __builtin_altivec_vmulosb(__a, __b);
3884 return __builtin_altivec_vmulesb(__a, __b);
3888 static vector unsigned short __ATTRS_o_ai
3889 vec_mule(vector unsigned char __a, vector unsigned char __b)
3891 #ifdef __LITTLE_ENDIAN__
3892 return __builtin_altivec_vmuloub(__a, __b);
3894 return __builtin_altivec_vmuleub(__a, __b);
3898 static vector int __ATTRS_o_ai
3899 vec_mule(vector short __a, vector short __b)
3901 #ifdef __LITTLE_ENDIAN__
3902 return __builtin_altivec_vmulosh(__a, __b);
3904 return __builtin_altivec_vmulesh(__a, __b);
3908 static vector unsigned int __ATTRS_o_ai
3909 vec_mule(vector unsigned short __a, vector unsigned short __b)
3911 #ifdef __LITTLE_ENDIAN__
3912 return __builtin_altivec_vmulouh(__a, __b);
3914 return __builtin_altivec_vmuleuh(__a, __b);
3918 #ifdef __POWER8_VECTOR__
3919 static vector signed long long __ATTRS_o_ai
3920 vec_mule(vector signed int __a, vector signed int __b)
3922 #ifdef __LITTLE_ENDIAN__
3923 return __builtin_altivec_vmulosw(__a, __b);
3925 return __builtin_altivec_vmulesw(__a, __b);
3929 static vector unsigned long long __ATTRS_o_ai
3930 vec_mule(vector unsigned int __a, vector unsigned int __b)
3932 #ifdef __LITTLE_ENDIAN__
3933 return __builtin_altivec_vmulouw(__a, __b);
3935 return __builtin_altivec_vmuleuw(__a, __b);
3942 static vector short __attribute__((__always_inline__))
3943 vec_vmulesb(vector signed char __a, vector signed char __b)
3945 #ifdef __LITTLE_ENDIAN__
3946 return __builtin_altivec_vmulosb(__a, __b);
3948 return __builtin_altivec_vmulesb(__a, __b);
3954 static vector unsigned short __attribute__((__always_inline__))
3955 vec_vmuleub(vector unsigned char __a, vector unsigned char __b)
3957 #ifdef __LITTLE_ENDIAN__
3958 return __builtin_altivec_vmuloub(__a, __b);
3960 return __builtin_altivec_vmuleub(__a, __b);
3966 static vector int __attribute__((__always_inline__))
3967 vec_vmulesh(vector short __a, vector short __b)
3969 #ifdef __LITTLE_ENDIAN__
3970 return __builtin_altivec_vmulosh(__a, __b);
3972 return __builtin_altivec_vmulesh(__a, __b);
3978 static vector unsigned int __attribute__((__always_inline__))
3979 vec_vmuleuh(vector unsigned short __a, vector unsigned short __b)
3981 #ifdef __LITTLE_ENDIAN__
3982 return __builtin_altivec_vmulouh(__a, __b);
3984 return __builtin_altivec_vmuleuh(__a, __b);
3990 static vector short __ATTRS_o_ai
3991 vec_mulo(vector signed char __a, vector signed char __b)
3993 #ifdef __LITTLE_ENDIAN__
3994 return __builtin_altivec_vmulesb(__a, __b);
3996 return __builtin_altivec_vmulosb(__a, __b);
4000 static vector unsigned short __ATTRS_o_ai
4001 vec_mulo(vector unsigned char __a, vector unsigned char __b)
4003 #ifdef __LITTLE_ENDIAN__
4004 return __builtin_altivec_vmuleub(__a, __b);
4006 return __builtin_altivec_vmuloub(__a, __b);
4010 static vector int __ATTRS_o_ai
4011 vec_mulo(vector short __a, vector short __b)
4013 #ifdef __LITTLE_ENDIAN__
4014 return __builtin_altivec_vmulesh(__a, __b);
4016 return __builtin_altivec_vmulosh(__a, __b);
4020 static vector unsigned int __ATTRS_o_ai
4021 vec_mulo(vector unsigned short __a, vector unsigned short __b)
4023 #ifdef __LITTLE_ENDIAN__
4024 return __builtin_altivec_vmuleuh(__a, __b);
4026 return __builtin_altivec_vmulouh(__a, __b);
4030 #ifdef __POWER8_VECTOR__
4031 static vector signed long long __ATTRS_o_ai
4032 vec_mulo(vector signed int __a, vector signed int __b)
4034 #ifdef __LITTLE_ENDIAN__
4035 return __builtin_altivec_vmulesw(__a, __b);
4037 return __builtin_altivec_vmulosw(__a, __b);
4041 static vector unsigned long long __ATTRS_o_ai
4042 vec_mulo(vector unsigned int __a, vector unsigned int __b)
4044 #ifdef __LITTLE_ENDIAN__
4045 return __builtin_altivec_vmuleuw(__a, __b);
4047 return __builtin_altivec_vmulouw(__a, __b);
4054 static vector short __attribute__((__always_inline__))
4055 vec_vmulosb(vector signed char __a, vector signed char __b)
4057 #ifdef __LITTLE_ENDIAN__
4058 return __builtin_altivec_vmulesb(__a, __b);
4060 return __builtin_altivec_vmulosb(__a, __b);
4066 static vector unsigned short __attribute__((__always_inline__))
4067 vec_vmuloub(vector unsigned char __a, vector unsigned char __b)
4069 #ifdef __LITTLE_ENDIAN__
4070 return __builtin_altivec_vmuleub(__a, __b);
4072 return __builtin_altivec_vmuloub(__a, __b);
4078 static vector int __attribute__((__always_inline__))
4079 vec_vmulosh(vector short __a, vector short __b)
4081 #ifdef __LITTLE_ENDIAN__
4082 return __builtin_altivec_vmulesh(__a, __b);
4084 return __builtin_altivec_vmulosh(__a, __b);
4090 static vector unsigned int __attribute__((__always_inline__))
4091 vec_vmulouh(vector unsigned short __a, vector unsigned short __b)
4093 #ifdef __LITTLE_ENDIAN__
4094 return __builtin_altivec_vmuleuh(__a, __b);
4096 return __builtin_altivec_vmulouh(__a, __b);
4102 static vector float __attribute__((__always_inline__))
4103 vec_nmsub(vector float __a, vector float __b, vector float __c)
4105 return __builtin_altivec_vnmsubfp(__a, __b, __c);
4110 static vector float __attribute__((__always_inline__))
4111 vec_vnmsubfp(vector float __a, vector float __b, vector float __c)
4113 return __builtin_altivec_vnmsubfp(__a, __b, __c);
4118 #define __builtin_altivec_vnor vec_nor
4120 static vector signed char __ATTRS_o_ai
4121 vec_nor(vector signed char __a, vector signed char __b)
4123 return ~(__a | __b);
4126 static vector unsigned char __ATTRS_o_ai
4127 vec_nor(vector unsigned char __a, vector unsigned char __b)
4129 return ~(__a | __b);
4132 static vector bool char __ATTRS_o_ai
4133 vec_nor(vector bool char __a, vector bool char __b)
4135 return ~(__a | __b);
4138 static vector short __ATTRS_o_ai
4139 vec_nor(vector short __a, vector short __b)
4141 return ~(__a | __b);
4144 static vector unsigned short __ATTRS_o_ai
4145 vec_nor(vector unsigned short __a, vector unsigned short __b)
4147 return ~(__a | __b);
4150 static vector bool short __ATTRS_o_ai
4151 vec_nor(vector bool short __a, vector bool short __b)
4153 return ~(__a | __b);
4156 static vector int __ATTRS_o_ai
4157 vec_nor(vector int __a, vector int __b)
4159 return ~(__a | __b);
4162 static vector unsigned int __ATTRS_o_ai
4163 vec_nor(vector unsigned int __a, vector unsigned int __b)
4165 return ~(__a | __b);
4168 static vector bool int __ATTRS_o_ai
4169 vec_nor(vector bool int __a, vector bool int __b)
4171 return ~(__a | __b);
4174 static vector float __ATTRS_o_ai
4175 vec_nor(vector float __a, vector float __b)
4177 vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b);
4178 return (vector float)__res;
4183 static vector signed char __ATTRS_o_ai
4184 vec_vnor(vector signed char __a, vector signed char __b)
4186 return ~(__a | __b);
4189 static vector unsigned char __ATTRS_o_ai
4190 vec_vnor(vector unsigned char __a, vector unsigned char __b)
4192 return ~(__a | __b);
4195 static vector bool char __ATTRS_o_ai
4196 vec_vnor(vector bool char __a, vector bool char __b)
4198 return ~(__a | __b);
4201 static vector short __ATTRS_o_ai
4202 vec_vnor(vector short __a, vector short __b)
4204 return ~(__a | __b);
4207 static vector unsigned short __ATTRS_o_ai
4208 vec_vnor(vector unsigned short __a, vector unsigned short __b)
4210 return ~(__a | __b);
4213 static vector bool short __ATTRS_o_ai
4214 vec_vnor(vector bool short __a, vector bool short __b)
4216 return ~(__a | __b);
4219 static vector int __ATTRS_o_ai
4220 vec_vnor(vector int __a, vector int __b)
4222 return ~(__a | __b);
4225 static vector unsigned int __ATTRS_o_ai
4226 vec_vnor(vector unsigned int __a, vector unsigned int __b)
4228 return ~(__a | __b);
4231 static vector bool int __ATTRS_o_ai
4232 vec_vnor(vector bool int __a, vector bool int __b)
4234 return ~(__a | __b);
4237 static vector float __ATTRS_o_ai
4238 vec_vnor(vector float __a, vector float __b)
4240 vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b);
4241 return (vector float)__res;
4246 #define __builtin_altivec_vor vec_or
4248 static vector signed char __ATTRS_o_ai
4249 vec_or(vector signed char __a, vector signed char __b)
4254 static vector signed char __ATTRS_o_ai
4255 vec_or(vector bool char __a, vector signed char __b)
4257 return (vector signed char)__a | __b;
4260 static vector signed char __ATTRS_o_ai
4261 vec_or(vector signed char __a, vector bool char __b)
4263 return __a | (vector signed char)__b;
4266 static vector unsigned char __ATTRS_o_ai
4267 vec_or(vector unsigned char __a, vector unsigned char __b)
4272 static vector unsigned char __ATTRS_o_ai
4273 vec_or(vector bool char __a, vector unsigned char __b)
4275 return (vector unsigned char)__a | __b;
4278 static vector unsigned char __ATTRS_o_ai
4279 vec_or(vector unsigned char __a, vector bool char __b)
4281 return __a | (vector unsigned char)__b;
4284 static vector bool char __ATTRS_o_ai
4285 vec_or(vector bool char __a, vector bool char __b)
4290 static vector short __ATTRS_o_ai
4291 vec_or(vector short __a, vector short __b)
4296 static vector short __ATTRS_o_ai
4297 vec_or(vector bool short __a, vector short __b)
4299 return (vector short)__a | __b;
4302 static vector short __ATTRS_o_ai
4303 vec_or(vector short __a, vector bool short __b)
4305 return __a | (vector short)__b;
4308 static vector unsigned short __ATTRS_o_ai
4309 vec_or(vector unsigned short __a, vector unsigned short __b)
4314 static vector unsigned short __ATTRS_o_ai
4315 vec_or(vector bool short __a, vector unsigned short __b)
4317 return (vector unsigned short)__a | __b;
4320 static vector unsigned short __ATTRS_o_ai
4321 vec_or(vector unsigned short __a, vector bool short __b)
4323 return __a | (vector unsigned short)__b;
4326 static vector bool short __ATTRS_o_ai
4327 vec_or(vector bool short __a, vector bool short __b)
4332 static vector int __ATTRS_o_ai
4333 vec_or(vector int __a, vector int __b)
4338 static vector int __ATTRS_o_ai
4339 vec_or(vector bool int __a, vector int __b)
4341 return (vector int)__a | __b;
4344 static vector int __ATTRS_o_ai
4345 vec_or(vector int __a, vector bool int __b)
4347 return __a | (vector int)__b;
4350 static vector unsigned int __ATTRS_o_ai
4351 vec_or(vector unsigned int __a, vector unsigned int __b)
4356 static vector unsigned int __ATTRS_o_ai
4357 vec_or(vector bool int __a, vector unsigned int __b)
4359 return (vector unsigned int)__a | __b;
4362 static vector unsigned int __ATTRS_o_ai
4363 vec_or(vector unsigned int __a, vector bool int __b)
4365 return __a | (vector unsigned int)__b;
4368 static vector bool int __ATTRS_o_ai
4369 vec_or(vector bool int __a, vector bool int __b)
4374 static vector float __ATTRS_o_ai
4375 vec_or(vector float __a, vector float __b)
4377 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4378 return (vector float)__res;
4381 static vector float __ATTRS_o_ai
4382 vec_or(vector bool int __a, vector float __b)
4384 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4385 return (vector float)__res;
4388 static vector float __ATTRS_o_ai
4389 vec_or(vector float __a, vector bool int __b)
4391 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4392 return (vector float)__res;
4397 static vector signed char __ATTRS_o_ai
4398 vec_vor(vector signed char __a, vector signed char __b)
4403 static vector signed char __ATTRS_o_ai
4404 vec_vor(vector bool char __a, vector signed char __b)
4406 return (vector signed char)__a | __b;
4409 static vector signed char __ATTRS_o_ai
4410 vec_vor(vector signed char __a, vector bool char __b)
4412 return __a | (vector signed char)__b;
4415 static vector unsigned char __ATTRS_o_ai
4416 vec_vor(vector unsigned char __a, vector unsigned char __b)
4421 static vector unsigned char __ATTRS_o_ai
4422 vec_vor(vector bool char __a, vector unsigned char __b)
4424 return (vector unsigned char)__a | __b;
4427 static vector unsigned char __ATTRS_o_ai
4428 vec_vor(vector unsigned char __a, vector bool char __b)
4430 return __a | (vector unsigned char)__b;
4433 static vector bool char __ATTRS_o_ai
4434 vec_vor(vector bool char __a, vector bool char __b)
4439 static vector short __ATTRS_o_ai
4440 vec_vor(vector short __a, vector short __b)
4445 static vector short __ATTRS_o_ai
4446 vec_vor(vector bool short __a, vector short __b)
4448 return (vector short)__a | __b;
4451 static vector short __ATTRS_o_ai
4452 vec_vor(vector short __a, vector bool short __b)
4454 return __a | (vector short)__b;
4457 static vector unsigned short __ATTRS_o_ai
4458 vec_vor(vector unsigned short __a, vector unsigned short __b)
4463 static vector unsigned short __ATTRS_o_ai
4464 vec_vor(vector bool short __a, vector unsigned short __b)
4466 return (vector unsigned short)__a | __b;
4469 static vector unsigned short __ATTRS_o_ai
4470 vec_vor(vector unsigned short __a, vector bool short __b)
4472 return __a | (vector unsigned short)__b;
4475 static vector bool short __ATTRS_o_ai
4476 vec_vor(vector bool short __a, vector bool short __b)
4481 static vector int __ATTRS_o_ai
4482 vec_vor(vector int __a, vector int __b)
4487 static vector int __ATTRS_o_ai
4488 vec_vor(vector bool int __a, vector int __b)
4490 return (vector int)__a | __b;
4493 static vector int __ATTRS_o_ai
4494 vec_vor(vector int __a, vector bool int __b)
4496 return __a | (vector int)__b;
4499 static vector unsigned int __ATTRS_o_ai
4500 vec_vor(vector unsigned int __a, vector unsigned int __b)
4505 static vector unsigned int __ATTRS_o_ai
4506 vec_vor(vector bool int __a, vector unsigned int __b)
4508 return (vector unsigned int)__a | __b;
4511 static vector unsigned int __ATTRS_o_ai
4512 vec_vor(vector unsigned int __a, vector bool int __b)
4514 return __a | (vector unsigned int)__b;
4517 static vector bool int __ATTRS_o_ai
4518 vec_vor(vector bool int __a, vector bool int __b)
4523 static vector float __ATTRS_o_ai
4524 vec_vor(vector float __a, vector float __b)
4526 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4527 return (vector float)__res;
4530 static vector float __ATTRS_o_ai
4531 vec_vor(vector bool int __a, vector float __b)
4533 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4534 return (vector float)__res;
4537 static vector float __ATTRS_o_ai
4538 vec_vor(vector float __a, vector bool int __b)
4540 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4541 return (vector float)__res;
4546 /* The various vector pack instructions have a big-endian bias, so for
4547 little endian we must handle reversed element numbering. */
4549 static vector signed char __ATTRS_o_ai
4550 vec_pack(vector signed short __a, vector signed short __b)
4552 #ifdef __LITTLE_ENDIAN__
4553 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4554 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4555 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4557 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4558 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4559 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4563 static vector unsigned char __ATTRS_o_ai
4564 vec_pack(vector unsigned short __a, vector unsigned short __b)
4566 #ifdef __LITTLE_ENDIAN__
4567 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4568 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4569 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4571 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4572 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4573 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4577 static vector bool char __ATTRS_o_ai
4578 vec_pack(vector bool short __a, vector bool short __b)
4580 #ifdef __LITTLE_ENDIAN__
4581 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4582 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4583 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4585 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4586 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4587 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4591 static vector short __ATTRS_o_ai
4592 vec_pack(vector int __a, vector int __b)
4594 #ifdef __LITTLE_ENDIAN__
4595 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4596 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4597 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4599 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4600 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4601 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4605 static vector unsigned short __ATTRS_o_ai
4606 vec_pack(vector unsigned int __a, vector unsigned int __b)
4608 #ifdef __LITTLE_ENDIAN__
4609 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4610 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4611 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4613 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4614 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4615 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4619 static vector bool short __ATTRS_o_ai
4620 vec_pack(vector bool int __a, vector bool int __b)
4622 #ifdef __LITTLE_ENDIAN__
4623 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4624 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4625 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4627 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4628 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4629 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4635 #define __builtin_altivec_vpkuhum vec_vpkuhum
4637 static vector signed char __ATTRS_o_ai
4638 vec_vpkuhum(vector signed short __a, vector signed short __b)
4640 #ifdef __LITTLE_ENDIAN__
4641 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4642 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4643 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4645 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4646 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4647 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4651 static vector unsigned char __ATTRS_o_ai
4652 vec_vpkuhum(vector unsigned short __a, vector unsigned short __b)
4654 #ifdef __LITTLE_ENDIAN__
4655 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4656 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4657 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4659 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4660 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4661 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4665 static vector bool char __ATTRS_o_ai
4666 vec_vpkuhum(vector bool short __a, vector bool short __b)
4668 #ifdef __LITTLE_ENDIAN__
4669 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4670 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4671 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4673 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4674 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4675 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4681 #define __builtin_altivec_vpkuwum vec_vpkuwum
4683 static vector short __ATTRS_o_ai
4684 vec_vpkuwum(vector int __a, vector int __b)
4686 #ifdef __LITTLE_ENDIAN__
4687 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4688 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4689 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4691 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4692 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4693 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4697 static vector unsigned short __ATTRS_o_ai
4698 vec_vpkuwum(vector unsigned int __a, vector unsigned int __b)
4700 #ifdef __LITTLE_ENDIAN__
4701 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4702 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4703 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4705 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4706 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4707 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4711 static vector bool short __ATTRS_o_ai
4712 vec_vpkuwum(vector bool int __a, vector bool int __b)
4714 #ifdef __LITTLE_ENDIAN__
4715 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4716 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4717 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4719 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4720 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4721 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4727 #ifdef __POWER8_VECTOR__
4728 #define __builtin_altivec_vpkudum vec_vpkudum
4730 static vector int __ATTRS_o_ai
4731 vec_vpkudum(vector long long __a, vector long long __b)
4733 #ifdef __LITTLE_ENDIAN__
4734 return (vector int)vec_perm(__a, __b, (vector unsigned char)
4735 (0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
4736 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
4738 return (vector int)vec_perm(__a, __b, (vector unsigned char)
4739 (0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
4740 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
4744 static vector unsigned int __ATTRS_o_ai
4745 vec_vpkudum(vector unsigned long long __a, vector unsigned long long __b)
4747 #ifdef __LITTLE_ENDIAN__
4748 return (vector unsigned int)vec_perm(__a, __b, (vector unsigned char)
4749 (0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
4750 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
4752 return (vector unsigned int)vec_perm(__a, __b, (vector unsigned char)
4753 (0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
4754 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
4758 static vector bool int __ATTRS_o_ai
4759 vec_vpkudum(vector bool long long __a, vector bool long long __b)
4761 #ifdef __LITTLE_ENDIAN__
4762 return (vector bool int)vec_perm((vector long long)__a,
4763 (vector long long)__b,
4764 (vector unsigned char)
4765 (0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
4766 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
4768 return (vector bool int)vec_perm((vector long long)__a,
4769 (vector long long)__b,
4770 (vector unsigned char)
4771 (0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
4772 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
4779 static vector pixel __attribute__((__always_inline__))
4780 vec_packpx(vector unsigned int __a, vector unsigned int __b)
4782 #ifdef __LITTLE_ENDIAN__
4783 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4785 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4791 static vector pixel __attribute__((__always_inline__))
4792 vec_vpkpx(vector unsigned int __a, vector unsigned int __b)
4794 #ifdef __LITTLE_ENDIAN__
4795 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4797 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4803 static vector signed char __ATTRS_o_ai
4804 vec_packs(vector short __a, vector short __b)
4806 #ifdef __LITTLE_ENDIAN__
4807 return __builtin_altivec_vpkshss(__b, __a);
4809 return __builtin_altivec_vpkshss(__a, __b);
4813 static vector unsigned char __ATTRS_o_ai
4814 vec_packs(vector unsigned short __a, vector unsigned short __b)
4816 #ifdef __LITTLE_ENDIAN__
4817 return __builtin_altivec_vpkuhus(__b, __a);
4819 return __builtin_altivec_vpkuhus(__a, __b);
4823 static vector signed short __ATTRS_o_ai
4824 vec_packs(vector int __a, vector int __b)
4826 #ifdef __LITTLE_ENDIAN__
4827 return __builtin_altivec_vpkswss(__b, __a);
4829 return __builtin_altivec_vpkswss(__a, __b);
4833 static vector unsigned short __ATTRS_o_ai
4834 vec_packs(vector unsigned int __a, vector unsigned int __b)
4836 #ifdef __LITTLE_ENDIAN__
4837 return __builtin_altivec_vpkuwus(__b, __a);
4839 return __builtin_altivec_vpkuwus(__a, __b);
4843 #ifdef __POWER8_VECTOR__
4844 static vector int __ATTRS_o_ai
4845 vec_packs(vector long long __a, vector long long __b)
4847 #ifdef __LITTLE_ENDIAN__
4848 return __builtin_altivec_vpksdss(__b, __a);
4850 return __builtin_altivec_vpksdss(__a, __b);
4854 static vector unsigned int __ATTRS_o_ai
4855 vec_packs(vector unsigned long long __a, vector unsigned long long __b)
4857 #ifdef __LITTLE_ENDIAN__
4858 return __builtin_altivec_vpkudus(__b, __a);
4860 return __builtin_altivec_vpkudus(__a, __b);
4867 static vector signed char __attribute__((__always_inline__))
4868 vec_vpkshss(vector short __a, vector short __b)
4870 #ifdef __LITTLE_ENDIAN__
4871 return __builtin_altivec_vpkshss(__b, __a);
4873 return __builtin_altivec_vpkshss(__a, __b);
4879 #ifdef __POWER8_VECTOR__
4880 static vector int __ATTRS_o_ai
4881 vec_vpksdss(vector long long __a, vector long long __b)
4883 #ifdef __LITTLE_ENDIAN__
4884 return __builtin_altivec_vpksdss(__b, __a);
4886 return __builtin_altivec_vpksdss(__a, __b);
4893 static vector unsigned char __attribute__((__always_inline__))
4894 vec_vpkuhus(vector unsigned short __a, vector unsigned short __b)
4896 #ifdef __LITTLE_ENDIAN__
4897 return __builtin_altivec_vpkuhus(__b, __a);
4899 return __builtin_altivec_vpkuhus(__a, __b);
4905 #ifdef __POWER8_VECTOR__
4906 static vector unsigned int __attribute__((__always_inline__))
4907 vec_vpkudus(vector unsigned long long __a, vector unsigned long long __b)
4909 #ifdef __LITTLE_ENDIAN__
4910 return __builtin_altivec_vpkudus(__b, __a);
4912 return __builtin_altivec_vpkudus(__a, __b);
4919 static vector signed short __attribute__((__always_inline__))
4920 vec_vpkswss(vector int __a, vector int __b)
4922 #ifdef __LITTLE_ENDIAN__
4923 return __builtin_altivec_vpkswss(__b, __a);
4925 return __builtin_altivec_vpkswss(__a, __b);
4931 static vector unsigned short __attribute__((__always_inline__))
4932 vec_vpkuwus(vector unsigned int __a, vector unsigned int __b)
4934 #ifdef __LITTLE_ENDIAN__
4935 return __builtin_altivec_vpkuwus(__b, __a);
4937 return __builtin_altivec_vpkuwus(__a, __b);
4943 static vector unsigned char __ATTRS_o_ai
4944 vec_packsu(vector short __a, vector short __b)
4946 #ifdef __LITTLE_ENDIAN__
4947 return __builtin_altivec_vpkshus(__b, __a);
4949 return __builtin_altivec_vpkshus(__a, __b);
4953 static vector unsigned char __ATTRS_o_ai
4954 vec_packsu(vector unsigned short __a, vector unsigned short __b)
4956 #ifdef __LITTLE_ENDIAN__
4957 return __builtin_altivec_vpkuhus(__b, __a);
4959 return __builtin_altivec_vpkuhus(__a, __b);
4963 static vector unsigned short __ATTRS_o_ai
4964 vec_packsu(vector int __a, vector int __b)
4966 #ifdef __LITTLE_ENDIAN__
4967 return __builtin_altivec_vpkswus(__b, __a);
4969 return __builtin_altivec_vpkswus(__a, __b);
4973 static vector unsigned short __ATTRS_o_ai
4974 vec_packsu(vector unsigned int __a, vector unsigned int __b)
4976 #ifdef __LITTLE_ENDIAN__
4977 return __builtin_altivec_vpkuwus(__b, __a);
4979 return __builtin_altivec_vpkuwus(__a, __b);
4983 #ifdef __POWER8_VECTOR__
4984 static vector unsigned int __ATTRS_o_ai
4985 vec_packsu(vector long long __a, vector long long __b)
4987 #ifdef __LITTLE_ENDIAN__
4988 return __builtin_altivec_vpksdus(__b, __a);
4990 return __builtin_altivec_vpksdus(__a, __b);
4994 static vector unsigned int __ATTRS_o_ai
4995 vec_packsu(vector unsigned long long __a, vector unsigned long long __b)
4997 #ifdef __LITTLE_ENDIAN__
4998 return __builtin_altivec_vpkudus(__b, __a);
5000 return __builtin_altivec_vpkudus(__a, __b);
5007 static vector unsigned char __ATTRS_o_ai
5008 vec_vpkshus(vector short __a, vector short __b)
5010 #ifdef __LITTLE_ENDIAN__
5011 return __builtin_altivec_vpkshus(__b, __a);
5013 return __builtin_altivec_vpkshus(__a, __b);
5017 static vector unsigned char __ATTRS_o_ai
5018 vec_vpkshus(vector unsigned short __a, vector unsigned short __b)
5020 #ifdef __LITTLE_ENDIAN__
5021 return __builtin_altivec_vpkuhus(__b, __a);
5023 return __builtin_altivec_vpkuhus(__a, __b);
5029 static vector unsigned short __ATTRS_o_ai
5030 vec_vpkswus(vector int __a, vector int __b)
5032 #ifdef __LITTLE_ENDIAN__
5033 return __builtin_altivec_vpkswus(__b, __a);
5035 return __builtin_altivec_vpkswus(__a, __b);
5039 static vector unsigned short __ATTRS_o_ai
5040 vec_vpkswus(vector unsigned int __a, vector unsigned int __b)
5042 #ifdef __LITTLE_ENDIAN__
5043 return __builtin_altivec_vpkuwus(__b, __a);
5045 return __builtin_altivec_vpkuwus(__a, __b);
5051 #ifdef __POWER8_VECTOR__
5052 static vector unsigned int __ATTRS_o_ai
5053 vec_vpksdus(vector long long __a, vector long long __b)
5055 #ifdef __LITTLE_ENDIAN__
5056 return __builtin_altivec_vpksdus(__b, __a);
5058 return __builtin_altivec_vpksdus(__a, __b);
5065 // The vperm instruction is defined architecturally with a big-endian bias.
5066 // For little endian, we swap the input operands and invert the permute
5067 // control vector. Only the rightmost 5 bits matter, so we could use
5068 // a vector of all 31s instead of all 255s to perform the inversion.
5069 // However, when the PCV is not a constant, using 255 has an advantage
5070 // in that the vec_xor can be recognized as a vec_nor (and for P8 and
5071 // later, possibly a vec_nand).
5073 static vector signed char __ATTRS_o_ai
5074 vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c)
5076 #ifdef __LITTLE_ENDIAN__
5077 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5078 255,255,255,255,255,255,255,255};
5079 __d = vec_xor(__c, __d);
5080 return (vector signed char)
5081 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5083 return (vector signed char)
5084 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5088 static vector unsigned char __ATTRS_o_ai
5089 vec_perm(vector unsigned char __a,
5090 vector unsigned char __b,
5091 vector unsigned char __c)
5093 #ifdef __LITTLE_ENDIAN__
5094 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5095 255,255,255,255,255,255,255,255};
5096 __d = vec_xor(__c, __d);
5097 return (vector unsigned char)
5098 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5100 return (vector unsigned char)
5101 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5105 static vector bool char __ATTRS_o_ai
5106 vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c)
5108 #ifdef __LITTLE_ENDIAN__
5109 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5110 255,255,255,255,255,255,255,255};
5111 __d = vec_xor(__c, __d);
5112 return (vector bool char)
5113 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5115 return (vector bool char)
5116 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5120 static vector short __ATTRS_o_ai
5121 vec_perm(vector short __a, vector short __b, vector unsigned char __c)
5123 #ifdef __LITTLE_ENDIAN__
5124 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5125 255,255,255,255,255,255,255,255};
5126 __d = vec_xor(__c, __d);
5127 return (vector short)
5128 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5130 return (vector short)
5131 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5135 static vector unsigned short __ATTRS_o_ai
5136 vec_perm(vector unsigned short __a,
5137 vector unsigned short __b,
5138 vector unsigned char __c)
5140 #ifdef __LITTLE_ENDIAN__
5141 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5142 255,255,255,255,255,255,255,255};
5143 __d = vec_xor(__c, __d);
5144 return (vector unsigned short)
5145 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5147 return (vector unsigned short)
5148 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5152 static vector bool short __ATTRS_o_ai
5153 vec_perm(vector bool short __a, vector bool short __b, vector unsigned char __c)
5155 #ifdef __LITTLE_ENDIAN__
5156 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5157 255,255,255,255,255,255,255,255};
5158 __d = vec_xor(__c, __d);
5159 return (vector bool short)
5160 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5162 return (vector bool short)
5163 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5167 static vector pixel __ATTRS_o_ai
5168 vec_perm(vector pixel __a, vector pixel __b, vector unsigned char __c)
5170 #ifdef __LITTLE_ENDIAN__
5171 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5172 255,255,255,255,255,255,255,255};
5173 __d = vec_xor(__c, __d);
5174 return (vector pixel)
5175 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5177 return (vector pixel)
5178 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5182 static vector int __ATTRS_o_ai
5183 vec_perm(vector int __a, vector int __b, vector unsigned char __c)
5185 #ifdef __LITTLE_ENDIAN__
5186 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5187 255,255,255,255,255,255,255,255};
5188 __d = vec_xor(__c, __d);
5189 return (vector int)__builtin_altivec_vperm_4si(__b, __a, __d);
5191 return (vector int)__builtin_altivec_vperm_4si(__a, __b, __c);
5195 static vector unsigned int __ATTRS_o_ai
5196 vec_perm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c)
5198 #ifdef __LITTLE_ENDIAN__
5199 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5200 255,255,255,255,255,255,255,255};
5201 __d = vec_xor(__c, __d);
5202 return (vector unsigned int)
5203 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5205 return (vector unsigned int)
5206 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5210 static vector bool int __ATTRS_o_ai
5211 vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c)
5213 #ifdef __LITTLE_ENDIAN__
5214 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5215 255,255,255,255,255,255,255,255};
5216 __d = vec_xor(__c, __d);
5217 return (vector bool int)
5218 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5220 return (vector bool int)
5221 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5225 static vector float __ATTRS_o_ai
5226 vec_perm(vector float __a, vector float __b, vector unsigned char __c)
5228 #ifdef __LITTLE_ENDIAN__
5229 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5230 255,255,255,255,255,255,255,255};
5231 __d = vec_xor(__c, __d);
5232 return (vector float)
5233 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5235 return (vector float)
5236 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5241 static vector long long __ATTRS_o_ai
5242 vec_perm(vector long long __a, vector long long __b, vector unsigned char __c)
5244 #ifdef __LITTLE_ENDIAN__
5245 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5246 255,255,255,255,255,255,255,255};
5247 __d = vec_xor(__c, __d);
5248 return (vector long long)__builtin_altivec_vperm_4si(__b, __a, __d);
5250 return (vector long long)__builtin_altivec_vperm_4si(__a, __b, __c);
5254 static vector unsigned long long __ATTRS_o_ai
5255 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
5256 vector unsigned char __c)
5258 #ifdef __LITTLE_ENDIAN__
5259 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5260 255,255,255,255,255,255,255,255};
5261 __d = vec_xor(__c, __d);
5262 return (vector unsigned long long)
5263 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5265 return (vector unsigned long long)
5266 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5270 static vector double __ATTRS_o_ai
5271 vec_perm(vector double __a, vector double __b, vector unsigned char __c)
5273 #ifdef __LITTLE_ENDIAN__
5274 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5275 255,255,255,255,255,255,255,255};
5276 __d = vec_xor(__c, __d);
5277 return (vector double)
5278 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5280 return (vector double)
5281 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5288 static vector signed char __ATTRS_o_ai
5289 vec_vperm(vector signed char __a, vector signed char __b, vector unsigned char __c)
5291 return vec_perm(__a, __b, __c);
5294 static vector unsigned char __ATTRS_o_ai
5295 vec_vperm(vector unsigned char __a,
5296 vector unsigned char __b,
5297 vector unsigned char __c)
5299 return vec_perm(__a, __b, __c);
5302 static vector bool char __ATTRS_o_ai
5303 vec_vperm(vector bool char __a, vector bool char __b, vector unsigned char __c)
5305 return vec_perm(__a, __b, __c);
5308 static vector short __ATTRS_o_ai
5309 vec_vperm(vector short __a, vector short __b, vector unsigned char __c)
5311 return vec_perm(__a, __b, __c);
5314 static vector unsigned short __ATTRS_o_ai
5315 vec_vperm(vector unsigned short __a,
5316 vector unsigned short __b,
5317 vector unsigned char __c)
5319 return vec_perm(__a, __b, __c);
5322 static vector bool short __ATTRS_o_ai
5323 vec_vperm(vector bool short __a, vector bool short __b, vector unsigned char __c)
5325 return vec_perm(__a, __b, __c);
5328 static vector pixel __ATTRS_o_ai
5329 vec_vperm(vector pixel __a, vector pixel __b, vector unsigned char __c)
5331 return vec_perm(__a, __b, __c);
5334 static vector int __ATTRS_o_ai
5335 vec_vperm(vector int __a, vector int __b, vector unsigned char __c)
5337 return vec_perm(__a, __b, __c);
5340 static vector unsigned int __ATTRS_o_ai
5341 vec_vperm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c)
5343 return vec_perm(__a, __b, __c);
5346 static vector bool int __ATTRS_o_ai
5347 vec_vperm(vector bool int __a, vector bool int __b, vector unsigned char __c)
5349 return vec_perm(__a, __b, __c);
5352 static vector float __ATTRS_o_ai
5353 vec_vperm(vector float __a, vector float __b, vector unsigned char __c)
5355 return vec_perm(__a, __b, __c);
5359 static vector long long __ATTRS_o_ai
5360 vec_vperm(vector long long __a, vector long long __b, vector unsigned char __c)
5362 return vec_perm(__a, __b, __c);
5365 static vector unsigned long long __ATTRS_o_ai
5366 vec_vperm(vector unsigned long long __a, vector unsigned long long __b,
5367 vector unsigned char __c)
5369 return vec_perm(__a, __b, __c);
5372 static vector double __ATTRS_o_ai
5373 vec_vperm(vector double __a, vector double __b, vector unsigned char __c)
5375 return vec_perm(__a, __b, __c);
5381 static vector float __attribute__((__always_inline__))
5382 vec_re(vector float __a)
5384 return __builtin_altivec_vrefp(__a);
5389 static vector float __attribute__((__always_inline__))
5390 vec_vrefp(vector float __a)
5392 return __builtin_altivec_vrefp(__a);
5397 static vector signed char __ATTRS_o_ai
5398 vec_rl(vector signed char __a, vector unsigned char __b)
5400 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
5403 static vector unsigned char __ATTRS_o_ai
5404 vec_rl(vector unsigned char __a, vector unsigned char __b)
5406 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
5409 static vector short __ATTRS_o_ai
5410 vec_rl(vector short __a, vector unsigned short __b)
5412 return __builtin_altivec_vrlh(__a, __b);
5415 static vector unsigned short __ATTRS_o_ai
5416 vec_rl(vector unsigned short __a, vector unsigned short __b)
5418 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
5421 static vector int __ATTRS_o_ai
5422 vec_rl(vector int __a, vector unsigned int __b)
5424 return __builtin_altivec_vrlw(__a, __b);
5427 static vector unsigned int __ATTRS_o_ai
5428 vec_rl(vector unsigned int __a, vector unsigned int __b)
5430 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
5433 #ifdef __POWER8_VECTOR__
5434 static vector signed long long __ATTRS_o_ai
5435 vec_rl(vector signed long long __a, vector unsigned long long __b)
5437 return __builtin_altivec_vrld(__a, __b);
5440 static vector unsigned long long __ATTRS_o_ai
5441 vec_rl(vector unsigned long long __a, vector unsigned long long __b)
5443 return __builtin_altivec_vrld(__a, __b);
5449 static vector signed char __ATTRS_o_ai
5450 vec_vrlb(vector signed char __a, vector unsigned char __b)
5452 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
5455 static vector unsigned char __ATTRS_o_ai
5456 vec_vrlb(vector unsigned char __a, vector unsigned char __b)
5458 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
5463 static vector short __ATTRS_o_ai
5464 vec_vrlh(vector short __a, vector unsigned short __b)
5466 return __builtin_altivec_vrlh(__a, __b);
5469 static vector unsigned short __ATTRS_o_ai
5470 vec_vrlh(vector unsigned short __a, vector unsigned short __b)
5472 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
5477 static vector int __ATTRS_o_ai
5478 vec_vrlw(vector int __a, vector unsigned int __b)
5480 return __builtin_altivec_vrlw(__a, __b);
5483 static vector unsigned int __ATTRS_o_ai
5484 vec_vrlw(vector unsigned int __a, vector unsigned int __b)
5486 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
5491 static vector float __attribute__((__always_inline__))
5492 vec_round(vector float __a)
5494 return __builtin_altivec_vrfin(__a);
5499 static vector float __attribute__((__always_inline__))
5500 vec_vrfin(vector float __a)
5502 return __builtin_altivec_vrfin(__a);
5507 static __vector float __attribute__((__always_inline__))
5508 vec_rsqrte(vector float __a)
5510 return __builtin_altivec_vrsqrtefp(__a);
5515 static __vector float __attribute__((__always_inline__))
5516 vec_vrsqrtefp(vector float __a)
5518 return __builtin_altivec_vrsqrtefp(__a);
5523 #define __builtin_altivec_vsel_4si vec_sel
5525 static vector signed char __ATTRS_o_ai
5526 vec_sel(vector signed char __a, vector signed char __b, vector unsigned char __c)
5528 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5531 static vector signed char __ATTRS_o_ai
5532 vec_sel(vector signed char __a, vector signed char __b, vector bool char __c)
5534 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5537 static vector unsigned char __ATTRS_o_ai
5538 vec_sel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c)
5540 return (__a & ~__c) | (__b & __c);
5543 static vector unsigned char __ATTRS_o_ai
5544 vec_sel(vector unsigned char __a, vector unsigned char __b, vector bool char __c)
5546 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
5549 static vector bool char __ATTRS_o_ai
5550 vec_sel(vector bool char __a, vector bool char __b, vector unsigned char __c)
5552 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
5555 static vector bool char __ATTRS_o_ai
5556 vec_sel(vector bool char __a, vector bool char __b, vector bool char __c)
5558 return (__a & ~__c) | (__b & __c);
5561 static vector short __ATTRS_o_ai
5562 vec_sel(vector short __a, vector short __b, vector unsigned short __c)
5564 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5567 static vector short __ATTRS_o_ai
5568 vec_sel(vector short __a, vector short __b, vector bool short __c)
5570 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5573 static vector unsigned short __ATTRS_o_ai
5574 vec_sel(vector unsigned short __a,
5575 vector unsigned short __b,
5576 vector unsigned short __c)
5578 return (__a & ~__c) | (__b & __c);
5581 static vector unsigned short __ATTRS_o_ai
5582 vec_sel(vector unsigned short __a, vector unsigned short __b, vector bool short __c)
5584 return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c);
5587 static vector bool short __ATTRS_o_ai
5588 vec_sel(vector bool short __a, vector bool short __b, vector unsigned short __c)
5590 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
5593 static vector bool short __ATTRS_o_ai
5594 vec_sel(vector bool short __a, vector bool short __b, vector bool short __c)
5596 return (__a & ~__c) | (__b & __c);
5599 static vector int __ATTRS_o_ai
5600 vec_sel(vector int __a, vector int __b, vector unsigned int __c)
5602 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5605 static vector int __ATTRS_o_ai
5606 vec_sel(vector int __a, vector int __b, vector bool int __c)
5608 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5611 static vector unsigned int __ATTRS_o_ai
5612 vec_sel(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c)
5614 return (__a & ~__c) | (__b & __c);
5617 static vector unsigned int __ATTRS_o_ai
5618 vec_sel(vector unsigned int __a, vector unsigned int __b, vector bool int __c)
5620 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
5623 static vector bool int __ATTRS_o_ai
5624 vec_sel(vector bool int __a, vector bool int __b, vector unsigned int __c)
5626 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
5629 static vector bool int __ATTRS_o_ai
5630 vec_sel(vector bool int __a, vector bool int __b, vector bool int __c)
5632 return (__a & ~__c) | (__b & __c);
5635 static vector float __ATTRS_o_ai
5636 vec_sel(vector float __a, vector float __b, vector unsigned int __c)
5638 vector int __res = ((vector int)__a & ~(vector int)__c)
5639 | ((vector int)__b & (vector int)__c);
5640 return (vector float)__res;
5643 static vector float __ATTRS_o_ai
5644 vec_sel(vector float __a, vector float __b, vector bool int __c)
5646 vector int __res = ((vector int)__a & ~(vector int)__c)
5647 | ((vector int)__b & (vector int)__c);
5648 return (vector float)__res;
5653 static vector signed char __ATTRS_o_ai
5654 vec_vsel(vector signed char __a, vector signed char __b, vector unsigned char __c)
5656 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5659 static vector signed char __ATTRS_o_ai
5660 vec_vsel(vector signed char __a, vector signed char __b, vector bool char __c)
5662 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5665 static vector unsigned char __ATTRS_o_ai
5666 vec_vsel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c)
5668 return (__a & ~__c) | (__b & __c);
5671 static vector unsigned char __ATTRS_o_ai
5672 vec_vsel(vector unsigned char __a, vector unsigned char __b, vector bool char __c)
5674 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
5677 static vector bool char __ATTRS_o_ai
5678 vec_vsel(vector bool char __a, vector bool char __b, vector unsigned char __c)
5680 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
5683 static vector bool char __ATTRS_o_ai
5684 vec_vsel(vector bool char __a, vector bool char __b, vector bool char __c)
5686 return (__a & ~__c) | (__b & __c);
5689 static vector short __ATTRS_o_ai
5690 vec_vsel(vector short __a, vector short __b, vector unsigned short __c)
5692 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5695 static vector short __ATTRS_o_ai
5696 vec_vsel(vector short __a, vector short __b, vector bool short __c)
5698 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5701 static vector unsigned short __ATTRS_o_ai
5702 vec_vsel(vector unsigned short __a,
5703 vector unsigned short __b,
5704 vector unsigned short __c)
5706 return (__a & ~__c) | (__b & __c);
5709 static vector unsigned short __ATTRS_o_ai
5710 vec_vsel(vector unsigned short __a, vector unsigned short __b, vector bool short __c)
5712 return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c);
5715 static vector bool short __ATTRS_o_ai
5716 vec_vsel(vector bool short __a, vector bool short __b, vector unsigned short __c)
5718 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
5721 static vector bool short __ATTRS_o_ai
5722 vec_vsel(vector bool short __a, vector bool short __b, vector bool short __c)
5724 return (__a & ~__c) | (__b & __c);
5727 static vector int __ATTRS_o_ai
5728 vec_vsel(vector int __a, vector int __b, vector unsigned int __c)
5730 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5733 static vector int __ATTRS_o_ai
5734 vec_vsel(vector int __a, vector int __b, vector bool int __c)
5736 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5739 static vector unsigned int __ATTRS_o_ai
5740 vec_vsel(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c)
5742 return (__a & ~__c) | (__b & __c);
5745 static vector unsigned int __ATTRS_o_ai
5746 vec_vsel(vector unsigned int __a, vector unsigned int __b, vector bool int __c)
5748 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
5751 static vector bool int __ATTRS_o_ai
5752 vec_vsel(vector bool int __a, vector bool int __b, vector unsigned int __c)
5754 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
5757 static vector bool int __ATTRS_o_ai
5758 vec_vsel(vector bool int __a, vector bool int __b, vector bool int __c)
5760 return (__a & ~__c) | (__b & __c);
5763 static vector float __ATTRS_o_ai
5764 vec_vsel(vector float __a, vector float __b, vector unsigned int __c)
5766 vector int __res = ((vector int)__a & ~(vector int)__c)
5767 | ((vector int)__b & (vector int)__c);
5768 return (vector float)__res;
5771 static vector float __ATTRS_o_ai
5772 vec_vsel(vector float __a, vector float __b, vector bool int __c)
5774 vector int __res = ((vector int)__a & ~(vector int)__c)
5775 | ((vector int)__b & (vector int)__c);
5776 return (vector float)__res;
5781 static vector signed char __ATTRS_o_ai
5782 vec_sl(vector signed char __a, vector unsigned char __b)
5784 return __a << (vector signed char)__b;
5787 static vector unsigned char __ATTRS_o_ai
5788 vec_sl(vector unsigned char __a, vector unsigned char __b)
5793 static vector short __ATTRS_o_ai
5794 vec_sl(vector short __a, vector unsigned short __b)
5796 return __a << (vector short)__b;
5799 static vector unsigned short __ATTRS_o_ai
5800 vec_sl(vector unsigned short __a, vector unsigned short __b)
5805 static vector int __ATTRS_o_ai
5806 vec_sl(vector int __a, vector unsigned int __b)
5808 return __a << (vector int)__b;
5811 static vector unsigned int __ATTRS_o_ai
5812 vec_sl(vector unsigned int __a, vector unsigned int __b)
5817 #ifdef __POWER8_VECTOR__
5818 static vector signed long long __ATTRS_o_ai
5819 vec_sl(vector signed long long __a, vector unsigned long long __b)
5821 return __a << (vector long long)__b;
5824 static vector unsigned long long __ATTRS_o_ai
5825 vec_sl(vector unsigned long long __a, vector unsigned long long __b)
5833 #define __builtin_altivec_vslb vec_vslb
5835 static vector signed char __ATTRS_o_ai
5836 vec_vslb(vector signed char __a, vector unsigned char __b)
5838 return vec_sl(__a, __b);
5841 static vector unsigned char __ATTRS_o_ai
5842 vec_vslb(vector unsigned char __a, vector unsigned char __b)
5844 return vec_sl(__a, __b);
5849 #define __builtin_altivec_vslh vec_vslh
5851 static vector short __ATTRS_o_ai
5852 vec_vslh(vector short __a, vector unsigned short __b)
5854 return vec_sl(__a, __b);
5857 static vector unsigned short __ATTRS_o_ai
5858 vec_vslh(vector unsigned short __a, vector unsigned short __b)
5860 return vec_sl(__a, __b);
5865 #define __builtin_altivec_vslw vec_vslw
5867 static vector int __ATTRS_o_ai
5868 vec_vslw(vector int __a, vector unsigned int __b)
5870 return vec_sl(__a, __b);
5873 static vector unsigned int __ATTRS_o_ai
5874 vec_vslw(vector unsigned int __a, vector unsigned int __b)
5876 return vec_sl(__a, __b);
5881 #define __builtin_altivec_vsldoi_4si vec_sld
5883 static vector signed char __ATTRS_o_ai
5884 vec_sld(vector signed char __a, vector signed char __b, unsigned char __c)
5886 return vec_perm(__a, __b, (vector unsigned char)
5887 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5888 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5891 static vector unsigned char __ATTRS_o_ai
5892 vec_sld(vector unsigned char __a, vector unsigned char __b, unsigned char __c)
5894 return vec_perm(__a, __b, (vector unsigned char)
5895 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5896 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5899 static vector short __ATTRS_o_ai
5900 vec_sld(vector short __a, vector short __b, unsigned char __c)
5902 return vec_perm(__a, __b, (vector unsigned char)
5903 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5904 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5907 static vector unsigned short __ATTRS_o_ai
5908 vec_sld(vector unsigned short __a, vector unsigned short __b, unsigned char __c)
5910 return vec_perm(__a, __b, (vector unsigned char)
5911 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5912 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5915 static vector pixel __ATTRS_o_ai
5916 vec_sld(vector pixel __a, vector pixel __b, unsigned char __c)
5918 return vec_perm(__a, __b, (vector unsigned char)
5919 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5920 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5923 static vector int __ATTRS_o_ai
5924 vec_sld(vector int __a, vector int __b, unsigned char __c)
5926 return vec_perm(__a, __b, (vector unsigned char)
5927 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5928 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5931 static vector unsigned int __ATTRS_o_ai
5932 vec_sld(vector unsigned int __a, vector unsigned int __b, unsigned char __c)
5934 return vec_perm(__a, __b, (vector unsigned char)
5935 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5936 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5939 static vector float __ATTRS_o_ai
5940 vec_sld(vector float __a, vector float __b, unsigned char __c)
5942 return vec_perm(__a, __b, (vector unsigned char)
5943 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5944 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5949 static vector signed char __ATTRS_o_ai
5950 vec_vsldoi(vector signed char __a, vector signed char __b, unsigned char __c)
5952 return vec_perm(__a, __b, (vector unsigned char)
5953 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5954 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5957 static vector unsigned char __ATTRS_o_ai
5958 vec_vsldoi(vector unsigned char __a, vector unsigned char __b, unsigned char __c)
5960 return vec_perm(__a, __b, (vector unsigned char)
5961 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5962 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5965 static vector short __ATTRS_o_ai
5966 vec_vsldoi(vector short __a, vector short __b, unsigned char __c)
5968 return vec_perm(__a, __b, (vector unsigned char)
5969 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5970 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5973 static vector unsigned short __ATTRS_o_ai
5974 vec_vsldoi(vector unsigned short __a, vector unsigned short __b, unsigned char __c)
5976 return vec_perm(__a, __b, (vector unsigned char)
5977 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5978 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5981 static vector pixel __ATTRS_o_ai
5982 vec_vsldoi(vector pixel __a, vector pixel __b, unsigned char __c)
5984 return vec_perm(__a, __b, (vector unsigned char)
5985 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5986 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5989 static vector int __ATTRS_o_ai
5990 vec_vsldoi(vector int __a, vector int __b, unsigned char __c)
5992 return vec_perm(__a, __b, (vector unsigned char)
5993 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5994 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5997 static vector unsigned int __ATTRS_o_ai
5998 vec_vsldoi(vector unsigned int __a, vector unsigned int __b, unsigned char __c)
6000 return vec_perm(__a, __b, (vector unsigned char)
6001 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
6002 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
6005 static vector float __ATTRS_o_ai
6006 vec_vsldoi(vector float __a, vector float __b, unsigned char __c)
6008 return vec_perm(__a, __b, (vector unsigned char)
6009 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
6010 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
6015 static vector signed char __ATTRS_o_ai
6016 vec_sll(vector signed char __a, vector unsigned char __b)
6018 return (vector signed char)
6019 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6022 static vector signed char __ATTRS_o_ai
6023 vec_sll(vector signed char __a, vector unsigned short __b)
6025 return (vector signed char)
6026 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6029 static vector signed char __ATTRS_o_ai
6030 vec_sll(vector signed char __a, vector unsigned int __b)
6032 return (vector signed char)
6033 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6036 static vector unsigned char __ATTRS_o_ai
6037 vec_sll(vector unsigned char __a, vector unsigned char __b)
6039 return (vector unsigned char)
6040 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6043 static vector unsigned char __ATTRS_o_ai
6044 vec_sll(vector unsigned char __a, vector unsigned short __b)
6046 return (vector unsigned char)
6047 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6050 static vector unsigned char __ATTRS_o_ai
6051 vec_sll(vector unsigned char __a, vector unsigned int __b)
6053 return (vector unsigned char)
6054 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6057 static vector bool char __ATTRS_o_ai
6058 vec_sll(vector bool char __a, vector unsigned char __b)
6060 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6063 static vector bool char __ATTRS_o_ai
6064 vec_sll(vector bool char __a, vector unsigned short __b)
6066 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6069 static vector bool char __ATTRS_o_ai
6070 vec_sll(vector bool char __a, vector unsigned int __b)
6072 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6075 static vector short __ATTRS_o_ai
6076 vec_sll(vector short __a, vector unsigned char __b)
6078 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6081 static vector short __ATTRS_o_ai
6082 vec_sll(vector short __a, vector unsigned short __b)
6084 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6087 static vector short __ATTRS_o_ai
6088 vec_sll(vector short __a, vector unsigned int __b)
6090 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6093 static vector unsigned short __ATTRS_o_ai
6094 vec_sll(vector unsigned short __a, vector unsigned char __b)
6096 return (vector unsigned short)
6097 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6100 static vector unsigned short __ATTRS_o_ai
6101 vec_sll(vector unsigned short __a, vector unsigned short __b)
6103 return (vector unsigned short)
6104 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6107 static vector unsigned short __ATTRS_o_ai
6108 vec_sll(vector unsigned short __a, vector unsigned int __b)
6110 return (vector unsigned short)
6111 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6114 static vector bool short __ATTRS_o_ai
6115 vec_sll(vector bool short __a, vector unsigned char __b)
6117 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6120 static vector bool short __ATTRS_o_ai
6121 vec_sll(vector bool short __a, vector unsigned short __b)
6123 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6126 static vector bool short __ATTRS_o_ai
6127 vec_sll(vector bool short __a, vector unsigned int __b)
6129 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6132 static vector pixel __ATTRS_o_ai
6133 vec_sll(vector pixel __a, vector unsigned char __b)
6135 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6138 static vector pixel __ATTRS_o_ai
6139 vec_sll(vector pixel __a, vector unsigned short __b)
6141 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6144 static vector pixel __ATTRS_o_ai
6145 vec_sll(vector pixel __a, vector unsigned int __b)
6147 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6150 static vector int __ATTRS_o_ai
6151 vec_sll(vector int __a, vector unsigned char __b)
6153 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6156 static vector int __ATTRS_o_ai
6157 vec_sll(vector int __a, vector unsigned short __b)
6159 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6162 static vector int __ATTRS_o_ai
6163 vec_sll(vector int __a, vector unsigned int __b)
6165 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6168 static vector unsigned int __ATTRS_o_ai
6169 vec_sll(vector unsigned int __a, vector unsigned char __b)
6171 return (vector unsigned int)
6172 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6175 static vector unsigned int __ATTRS_o_ai
6176 vec_sll(vector unsigned int __a, vector unsigned short __b)
6178 return (vector unsigned int)
6179 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6182 static vector unsigned int __ATTRS_o_ai
6183 vec_sll(vector unsigned int __a, vector unsigned int __b)
6185 return (vector unsigned int)
6186 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6189 static vector bool int __ATTRS_o_ai
6190 vec_sll(vector bool int __a, vector unsigned char __b)
6192 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6195 static vector bool int __ATTRS_o_ai
6196 vec_sll(vector bool int __a, vector unsigned short __b)
6198 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6201 static vector bool int __ATTRS_o_ai
6202 vec_sll(vector bool int __a, vector unsigned int __b)
6204 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6209 static vector signed char __ATTRS_o_ai
6210 vec_vsl(vector signed char __a, vector unsigned char __b)
6212 return (vector signed char)
6213 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6216 static vector signed char __ATTRS_o_ai
6217 vec_vsl(vector signed char __a, vector unsigned short __b)
6219 return (vector signed char)
6220 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6223 static vector signed char __ATTRS_o_ai
6224 vec_vsl(vector signed char __a, vector unsigned int __b)
6226 return (vector signed char)
6227 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6230 static vector unsigned char __ATTRS_o_ai
6231 vec_vsl(vector unsigned char __a, vector unsigned char __b)
6233 return (vector unsigned char)
6234 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6237 static vector unsigned char __ATTRS_o_ai
6238 vec_vsl(vector unsigned char __a, vector unsigned short __b)
6240 return (vector unsigned char)
6241 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6244 static vector unsigned char __ATTRS_o_ai
6245 vec_vsl(vector unsigned char __a, vector unsigned int __b)
6247 return (vector unsigned char)
6248 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6251 static vector bool char __ATTRS_o_ai
6252 vec_vsl(vector bool char __a, vector unsigned char __b)
6254 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6257 static vector bool char __ATTRS_o_ai
6258 vec_vsl(vector bool char __a, vector unsigned short __b)
6260 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6263 static vector bool char __ATTRS_o_ai
6264 vec_vsl(vector bool char __a, vector unsigned int __b)
6266 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6269 static vector short __ATTRS_o_ai
6270 vec_vsl(vector short __a, vector unsigned char __b)
6272 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6275 static vector short __ATTRS_o_ai
6276 vec_vsl(vector short __a, vector unsigned short __b)
6278 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6281 static vector short __ATTRS_o_ai
6282 vec_vsl(vector short __a, vector unsigned int __b)
6284 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6287 static vector unsigned short __ATTRS_o_ai
6288 vec_vsl(vector unsigned short __a, vector unsigned char __b)
6290 return (vector unsigned short)
6291 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6294 static vector unsigned short __ATTRS_o_ai
6295 vec_vsl(vector unsigned short __a, vector unsigned short __b)
6297 return (vector unsigned short)
6298 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6301 static vector unsigned short __ATTRS_o_ai
6302 vec_vsl(vector unsigned short __a, vector unsigned int __b)
6304 return (vector unsigned short)
6305 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6308 static vector bool short __ATTRS_o_ai
6309 vec_vsl(vector bool short __a, vector unsigned char __b)
6311 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6314 static vector bool short __ATTRS_o_ai
6315 vec_vsl(vector bool short __a, vector unsigned short __b)
6317 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6320 static vector bool short __ATTRS_o_ai
6321 vec_vsl(vector bool short __a, vector unsigned int __b)
6323 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6326 static vector pixel __ATTRS_o_ai
6327 vec_vsl(vector pixel __a, vector unsigned char __b)
6329 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6332 static vector pixel __ATTRS_o_ai
6333 vec_vsl(vector pixel __a, vector unsigned short __b)
6335 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6338 static vector pixel __ATTRS_o_ai
6339 vec_vsl(vector pixel __a, vector unsigned int __b)
6341 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6344 static vector int __ATTRS_o_ai
6345 vec_vsl(vector int __a, vector unsigned char __b)
6347 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6350 static vector int __ATTRS_o_ai
6351 vec_vsl(vector int __a, vector unsigned short __b)
6353 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6356 static vector int __ATTRS_o_ai
6357 vec_vsl(vector int __a, vector unsigned int __b)
6359 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6362 static vector unsigned int __ATTRS_o_ai
6363 vec_vsl(vector unsigned int __a, vector unsigned char __b)
6365 return (vector unsigned int)
6366 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6369 static vector unsigned int __ATTRS_o_ai
6370 vec_vsl(vector unsigned int __a, vector unsigned short __b)
6372 return (vector unsigned int)
6373 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6376 static vector unsigned int __ATTRS_o_ai
6377 vec_vsl(vector unsigned int __a, vector unsigned int __b)
6379 return (vector unsigned int)
6380 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6383 static vector bool int __ATTRS_o_ai
6384 vec_vsl(vector bool int __a, vector unsigned char __b)
6386 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6389 static vector bool int __ATTRS_o_ai
6390 vec_vsl(vector bool int __a, vector unsigned short __b)
6392 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6395 static vector bool int __ATTRS_o_ai
6396 vec_vsl(vector bool int __a, vector unsigned int __b)
6398 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6403 static vector signed char __ATTRS_o_ai
6404 vec_slo(vector signed char __a, vector signed char __b)
6406 return (vector signed char)
6407 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6410 static vector signed char __ATTRS_o_ai
6411 vec_slo(vector signed char __a, vector unsigned char __b)
6413 return (vector signed char)
6414 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6417 static vector unsigned char __ATTRS_o_ai
6418 vec_slo(vector unsigned char __a, vector signed char __b)
6420 return (vector unsigned char)
6421 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6424 static vector unsigned char __ATTRS_o_ai
6425 vec_slo(vector unsigned char __a, vector unsigned char __b)
6427 return (vector unsigned char)
6428 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6431 static vector short __ATTRS_o_ai
6432 vec_slo(vector short __a, vector signed char __b)
6434 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6437 static vector short __ATTRS_o_ai
6438 vec_slo(vector short __a, vector unsigned char __b)
6440 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6443 static vector unsigned short __ATTRS_o_ai
6444 vec_slo(vector unsigned short __a, vector signed char __b)
6446 return (vector unsigned short)
6447 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6450 static vector unsigned short __ATTRS_o_ai
6451 vec_slo(vector unsigned short __a, vector unsigned char __b)
6453 return (vector unsigned short)
6454 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6457 static vector pixel __ATTRS_o_ai
6458 vec_slo(vector pixel __a, vector signed char __b)
6460 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6463 static vector pixel __ATTRS_o_ai
6464 vec_slo(vector pixel __a, vector unsigned char __b)
6466 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6469 static vector int __ATTRS_o_ai
6470 vec_slo(vector int __a, vector signed char __b)
6472 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6475 static vector int __ATTRS_o_ai
6476 vec_slo(vector int __a, vector unsigned char __b)
6478 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6481 static vector unsigned int __ATTRS_o_ai
6482 vec_slo(vector unsigned int __a, vector signed char __b)
6484 return (vector unsigned int)
6485 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6488 static vector unsigned int __ATTRS_o_ai
6489 vec_slo(vector unsigned int __a, vector unsigned char __b)
6491 return (vector unsigned int)
6492 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6495 static vector float __ATTRS_o_ai
6496 vec_slo(vector float __a, vector signed char __b)
6498 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6501 static vector float __ATTRS_o_ai
6502 vec_slo(vector float __a, vector unsigned char __b)
6504 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6509 static vector signed char __ATTRS_o_ai
6510 vec_vslo(vector signed char __a, vector signed char __b)
6512 return (vector signed char)
6513 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6516 static vector signed char __ATTRS_o_ai
6517 vec_vslo(vector signed char __a, vector unsigned char __b)
6519 return (vector signed char)
6520 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6523 static vector unsigned char __ATTRS_o_ai
6524 vec_vslo(vector unsigned char __a, vector signed char __b)
6526 return (vector unsigned char)
6527 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6530 static vector unsigned char __ATTRS_o_ai
6531 vec_vslo(vector unsigned char __a, vector unsigned char __b)
6533 return (vector unsigned char)
6534 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6537 static vector short __ATTRS_o_ai
6538 vec_vslo(vector short __a, vector signed char __b)
6540 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6543 static vector short __ATTRS_o_ai
6544 vec_vslo(vector short __a, vector unsigned char __b)
6546 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6549 static vector unsigned short __ATTRS_o_ai
6550 vec_vslo(vector unsigned short __a, vector signed char __b)
6552 return (vector unsigned short)
6553 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6556 static vector unsigned short __ATTRS_o_ai
6557 vec_vslo(vector unsigned short __a, vector unsigned char __b)
6559 return (vector unsigned short)
6560 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6563 static vector pixel __ATTRS_o_ai
6564 vec_vslo(vector pixel __a, vector signed char __b)
6566 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6569 static vector pixel __ATTRS_o_ai
6570 vec_vslo(vector pixel __a, vector unsigned char __b)
6572 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6575 static vector int __ATTRS_o_ai
6576 vec_vslo(vector int __a, vector signed char __b)
6578 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6581 static vector int __ATTRS_o_ai
6582 vec_vslo(vector int __a, vector unsigned char __b)
6584 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6587 static vector unsigned int __ATTRS_o_ai
6588 vec_vslo(vector unsigned int __a, vector signed char __b)
6590 return (vector unsigned int)
6591 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6594 static vector unsigned int __ATTRS_o_ai
6595 vec_vslo(vector unsigned int __a, vector unsigned char __b)
6597 return (vector unsigned int)
6598 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6601 static vector float __ATTRS_o_ai
6602 vec_vslo(vector float __a, vector signed char __b)
6604 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6607 static vector float __ATTRS_o_ai
6608 vec_vslo(vector float __a, vector unsigned char __b)
6610 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6615 static vector signed char __ATTRS_o_ai
6616 vec_splat(vector signed char __a, unsigned char __b)
6618 return vec_perm(__a, __a, (vector unsigned char)(__b));
6621 static vector unsigned char __ATTRS_o_ai
6622 vec_splat(vector unsigned char __a, unsigned char __b)
6624 return vec_perm(__a, __a, (vector unsigned char)(__b));
6627 static vector bool char __ATTRS_o_ai
6628 vec_splat(vector bool char __a, unsigned char __b)
6630 return vec_perm(__a, __a, (vector unsigned char)(__b));
6633 static vector short __ATTRS_o_ai
6634 vec_splat(vector short __a, unsigned char __b)
6637 unsigned char b1=__b+1;
6638 return vec_perm(__a, __a, (vector unsigned char)
6639 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6642 static vector unsigned short __ATTRS_o_ai
6643 vec_splat(vector unsigned short __a, unsigned char __b)
6646 unsigned char b1=__b+1;
6647 return vec_perm(__a, __a, (vector unsigned char)
6648 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6651 static vector bool short __ATTRS_o_ai
6652 vec_splat(vector bool short __a, unsigned char __b)
6655 unsigned char b1=__b+1;
6656 return vec_perm(__a, __a, (vector unsigned char)
6657 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6660 static vector pixel __ATTRS_o_ai
6661 vec_splat(vector pixel __a, unsigned char __b)
6664 unsigned char b1=__b+1;
6665 return vec_perm(__a, __a, (vector unsigned char)
6666 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6669 static vector int __ATTRS_o_ai
6670 vec_splat(vector int __a, unsigned char __b)
6673 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6674 return vec_perm(__a, __a, (vector unsigned char)
6675 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6678 static vector unsigned int __ATTRS_o_ai
6679 vec_splat(vector unsigned int __a, unsigned char __b)
6682 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6683 return vec_perm(__a, __a, (vector unsigned char)
6684 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6687 static vector bool int __ATTRS_o_ai
6688 vec_splat(vector bool int __a, unsigned char __b)
6691 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6692 return vec_perm(__a, __a, (vector unsigned char)
6693 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6696 static vector float __ATTRS_o_ai
6697 vec_splat(vector float __a, unsigned char __b)
6700 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6701 return vec_perm(__a, __a, (vector unsigned char)
6702 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6707 #define __builtin_altivec_vspltb vec_vspltb
6709 static vector signed char __ATTRS_o_ai
6710 vec_vspltb(vector signed char __a, unsigned char __b)
6712 return vec_perm(__a, __a, (vector unsigned char)(__b));
6715 static vector unsigned char __ATTRS_o_ai
6716 vec_vspltb(vector unsigned char __a, unsigned char __b)
6718 return vec_perm(__a, __a, (vector unsigned char)(__b));
6721 static vector bool char __ATTRS_o_ai
6722 vec_vspltb(vector bool char __a, unsigned char __b)
6724 return vec_perm(__a, __a, (vector unsigned char)(__b));
6729 #define __builtin_altivec_vsplth vec_vsplth
6731 static vector short __ATTRS_o_ai
6732 vec_vsplth(vector short __a, unsigned char __b)
6735 unsigned char b1=__b+1;
6736 return vec_perm(__a, __a, (vector unsigned char)
6737 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6740 static vector unsigned short __ATTRS_o_ai
6741 vec_vsplth(vector unsigned short __a, unsigned char __b)
6744 unsigned char b1=__b+1;
6745 return vec_perm(__a, __a, (vector unsigned char)
6746 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6749 static vector bool short __ATTRS_o_ai
6750 vec_vsplth(vector bool short __a, unsigned char __b)
6753 unsigned char b1=__b+1;
6754 return vec_perm(__a, __a, (vector unsigned char)
6755 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6758 static vector pixel __ATTRS_o_ai
6759 vec_vsplth(vector pixel __a, unsigned char __b)
6762 unsigned char b1=__b+1;
6763 return vec_perm(__a, __a, (vector unsigned char)
6764 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6769 #define __builtin_altivec_vspltw vec_vspltw
6771 static vector int __ATTRS_o_ai
6772 vec_vspltw(vector int __a, unsigned char __b)
6775 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6776 return vec_perm(__a, __a, (vector unsigned char)
6777 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6780 static vector unsigned int __ATTRS_o_ai
6781 vec_vspltw(vector unsigned int __a, unsigned char __b)
6784 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6785 return vec_perm(__a, __a, (vector unsigned char)
6786 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6789 static vector bool int __ATTRS_o_ai
6790 vec_vspltw(vector bool int __a, unsigned char __b)
6793 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6794 return vec_perm(__a, __a, (vector unsigned char)
6795 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6798 static vector float __ATTRS_o_ai
6799 vec_vspltw(vector float __a, unsigned char __b)
6802 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6803 return vec_perm(__a, __a, (vector unsigned char)
6804 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6809 #define __builtin_altivec_vspltisb vec_splat_s8
6811 // FIXME: parameter should be treated as 5-bit signed literal
6812 static vector signed char __ATTRS_o_ai
6813 vec_splat_s8(signed char __a)
6815 return (vector signed char)(__a);
6820 // FIXME: parameter should be treated as 5-bit signed literal
6821 static vector signed char __ATTRS_o_ai
6822 vec_vspltisb(signed char __a)
6824 return (vector signed char)(__a);
6829 #define __builtin_altivec_vspltish vec_splat_s16
6831 // FIXME: parameter should be treated as 5-bit signed literal
6832 static vector short __ATTRS_o_ai
6833 vec_splat_s16(signed char __a)
6835 return (vector short)(__a);
6840 // FIXME: parameter should be treated as 5-bit signed literal
6841 static vector short __ATTRS_o_ai
6842 vec_vspltish(signed char __a)
6844 return (vector short)(__a);
6849 #define __builtin_altivec_vspltisw vec_splat_s32
6851 // FIXME: parameter should be treated as 5-bit signed literal
6852 static vector int __ATTRS_o_ai
6853 vec_splat_s32(signed char __a)
6855 return (vector int)(__a);
6860 // FIXME: parameter should be treated as 5-bit signed literal
6861 static vector int __ATTRS_o_ai
6862 vec_vspltisw(signed char __a)
6864 return (vector int)(__a);
6869 // FIXME: parameter should be treated as 5-bit signed literal
6870 static vector unsigned char __ATTRS_o_ai
6871 vec_splat_u8(unsigned char __a)
6873 return (vector unsigned char)(__a);
6878 // FIXME: parameter should be treated as 5-bit signed literal
6879 static vector unsigned short __ATTRS_o_ai
6880 vec_splat_u16(signed char __a)
6882 return (vector unsigned short)(__a);
6887 // FIXME: parameter should be treated as 5-bit signed literal
6888 static vector unsigned int __ATTRS_o_ai
6889 vec_splat_u32(signed char __a)
6891 return (vector unsigned int)(__a);
6896 static vector signed char __ATTRS_o_ai
6897 vec_sr(vector signed char __a, vector unsigned char __b)
6899 return __a >> (vector signed char)__b;
6902 static vector unsigned char __ATTRS_o_ai
6903 vec_sr(vector unsigned char __a, vector unsigned char __b)
6908 static vector short __ATTRS_o_ai
6909 vec_sr(vector short __a, vector unsigned short __b)
6911 return __a >> (vector short)__b;
6914 static vector unsigned short __ATTRS_o_ai
6915 vec_sr(vector unsigned short __a, vector unsigned short __b)
6920 static vector int __ATTRS_o_ai
6921 vec_sr(vector int __a, vector unsigned int __b)
6923 return __a >> (vector int)__b;
6926 static vector unsigned int __ATTRS_o_ai
6927 vec_sr(vector unsigned int __a, vector unsigned int __b)
6932 #ifdef __POWER8_VECTOR__
6933 static vector signed long long __ATTRS_o_ai
6934 vec_sr(vector signed long long __a, vector unsigned long long __b)
6936 return __a >> (vector long long)__b;
6939 static vector unsigned long long __ATTRS_o_ai
6940 vec_sr(vector unsigned long long __a, vector unsigned long long __b)
6948 #define __builtin_altivec_vsrb vec_vsrb
6950 static vector signed char __ATTRS_o_ai
6951 vec_vsrb(vector signed char __a, vector unsigned char __b)
6953 return __a >> (vector signed char)__b;
6956 static vector unsigned char __ATTRS_o_ai
6957 vec_vsrb(vector unsigned char __a, vector unsigned char __b)
6964 #define __builtin_altivec_vsrh vec_vsrh
6966 static vector short __ATTRS_o_ai
6967 vec_vsrh(vector short __a, vector unsigned short __b)
6969 return __a >> (vector short)__b;
6972 static vector unsigned short __ATTRS_o_ai
6973 vec_vsrh(vector unsigned short __a, vector unsigned short __b)
6980 #define __builtin_altivec_vsrw vec_vsrw
6982 static vector int __ATTRS_o_ai
6983 vec_vsrw(vector int __a, vector unsigned int __b)
6985 return __a >> (vector int)__b;
6988 static vector unsigned int __ATTRS_o_ai
6989 vec_vsrw(vector unsigned int __a, vector unsigned int __b)
6996 static vector signed char __ATTRS_o_ai
6997 vec_sra(vector signed char __a, vector unsigned char __b)
6999 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
7002 static vector unsigned char __ATTRS_o_ai
7003 vec_sra(vector unsigned char __a, vector unsigned char __b)
7005 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
7008 static vector short __ATTRS_o_ai
7009 vec_sra(vector short __a, vector unsigned short __b)
7011 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
7014 static vector unsigned short __ATTRS_o_ai
7015 vec_sra(vector unsigned short __a, vector unsigned short __b)
7017 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
7020 static vector int __ATTRS_o_ai
7021 vec_sra(vector int __a, vector unsigned int __b)
7023 return __builtin_altivec_vsraw(__a, __b);
7026 static vector unsigned int __ATTRS_o_ai
7027 vec_sra(vector unsigned int __a, vector unsigned int __b)
7029 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
7032 #ifdef __POWER8_VECTOR__
7033 static vector signed long long __ATTRS_o_ai
7034 vec_sra(vector signed long long __a, vector unsigned long long __b)
7039 static vector unsigned long long __ATTRS_o_ai
7040 vec_sra(vector unsigned long long __a, vector unsigned long long __b)
7042 return (vector unsigned long long) ( (vector signed long long) __a >> __b);
7048 static vector signed char __ATTRS_o_ai
7049 vec_vsrab(vector signed char __a, vector unsigned char __b)
7051 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
7054 static vector unsigned char __ATTRS_o_ai
7055 vec_vsrab(vector unsigned char __a, vector unsigned char __b)
7057 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
7062 static vector short __ATTRS_o_ai
7063 vec_vsrah(vector short __a, vector unsigned short __b)
7065 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
7068 static vector unsigned short __ATTRS_o_ai
7069 vec_vsrah(vector unsigned short __a, vector unsigned short __b)
7071 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
7076 static vector int __ATTRS_o_ai
7077 vec_vsraw(vector int __a, vector unsigned int __b)
7079 return __builtin_altivec_vsraw(__a, __b);
7082 static vector unsigned int __ATTRS_o_ai
7083 vec_vsraw(vector unsigned int __a, vector unsigned int __b)
7085 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
7090 static vector signed char __ATTRS_o_ai
7091 vec_srl(vector signed char __a, vector unsigned char __b)
7093 return (vector signed char)
7094 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7097 static vector signed char __ATTRS_o_ai
7098 vec_srl(vector signed char __a, vector unsigned short __b)
7100 return (vector signed char)
7101 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7104 static vector signed char __ATTRS_o_ai
7105 vec_srl(vector signed char __a, vector unsigned int __b)
7107 return (vector signed char)
7108 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7111 static vector unsigned char __ATTRS_o_ai
7112 vec_srl(vector unsigned char __a, vector unsigned char __b)
7114 return (vector unsigned char)
7115 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7118 static vector unsigned char __ATTRS_o_ai
7119 vec_srl(vector unsigned char __a, vector unsigned short __b)
7121 return (vector unsigned char)
7122 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7125 static vector unsigned char __ATTRS_o_ai
7126 vec_srl(vector unsigned char __a, vector unsigned int __b)
7128 return (vector unsigned char)
7129 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7132 static vector bool char __ATTRS_o_ai
7133 vec_srl(vector bool char __a, vector unsigned char __b)
7135 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7138 static vector bool char __ATTRS_o_ai
7139 vec_srl(vector bool char __a, vector unsigned short __b)
7141 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7144 static vector bool char __ATTRS_o_ai
7145 vec_srl(vector bool char __a, vector unsigned int __b)
7147 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7150 static vector short __ATTRS_o_ai
7151 vec_srl(vector short __a, vector unsigned char __b)
7153 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7156 static vector short __ATTRS_o_ai
7157 vec_srl(vector short __a, vector unsigned short __b)
7159 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7162 static vector short __ATTRS_o_ai
7163 vec_srl(vector short __a, vector unsigned int __b)
7165 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7168 static vector unsigned short __ATTRS_o_ai
7169 vec_srl(vector unsigned short __a, vector unsigned char __b)
7171 return (vector unsigned short)
7172 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7175 static vector unsigned short __ATTRS_o_ai
7176 vec_srl(vector unsigned short __a, vector unsigned short __b)
7178 return (vector unsigned short)
7179 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7182 static vector unsigned short __ATTRS_o_ai
7183 vec_srl(vector unsigned short __a, vector unsigned int __b)
7185 return (vector unsigned short)
7186 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7189 static vector bool short __ATTRS_o_ai
7190 vec_srl(vector bool short __a, vector unsigned char __b)
7192 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7195 static vector bool short __ATTRS_o_ai
7196 vec_srl(vector bool short __a, vector unsigned short __b)
7198 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7201 static vector bool short __ATTRS_o_ai
7202 vec_srl(vector bool short __a, vector unsigned int __b)
7204 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7207 static vector pixel __ATTRS_o_ai
7208 vec_srl(vector pixel __a, vector unsigned char __b)
7210 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7213 static vector pixel __ATTRS_o_ai
7214 vec_srl(vector pixel __a, vector unsigned short __b)
7216 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7219 static vector pixel __ATTRS_o_ai
7220 vec_srl(vector pixel __a, vector unsigned int __b)
7222 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7225 static vector int __ATTRS_o_ai
7226 vec_srl(vector int __a, vector unsigned char __b)
7228 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7231 static vector int __ATTRS_o_ai
7232 vec_srl(vector int __a, vector unsigned short __b)
7234 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7237 static vector int __ATTRS_o_ai
7238 vec_srl(vector int __a, vector unsigned int __b)
7240 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7243 static vector unsigned int __ATTRS_o_ai
7244 vec_srl(vector unsigned int __a, vector unsigned char __b)
7246 return (vector unsigned int)
7247 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7250 static vector unsigned int __ATTRS_o_ai
7251 vec_srl(vector unsigned int __a, vector unsigned short __b)
7253 return (vector unsigned int)
7254 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7257 static vector unsigned int __ATTRS_o_ai
7258 vec_srl(vector unsigned int __a, vector unsigned int __b)
7260 return (vector unsigned int)
7261 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7264 static vector bool int __ATTRS_o_ai
7265 vec_srl(vector bool int __a, vector unsigned char __b)
7267 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7270 static vector bool int __ATTRS_o_ai
7271 vec_srl(vector bool int __a, vector unsigned short __b)
7273 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7276 static vector bool int __ATTRS_o_ai
7277 vec_srl(vector bool int __a, vector unsigned int __b)
7279 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7284 static vector signed char __ATTRS_o_ai
7285 vec_vsr(vector signed char __a, vector unsigned char __b)
7287 return (vector signed char)
7288 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7291 static vector signed char __ATTRS_o_ai
7292 vec_vsr(vector signed char __a, vector unsigned short __b)
7294 return (vector signed char)
7295 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7298 static vector signed char __ATTRS_o_ai
7299 vec_vsr(vector signed char __a, vector unsigned int __b)
7301 return (vector signed char)
7302 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7305 static vector unsigned char __ATTRS_o_ai
7306 vec_vsr(vector unsigned char __a, vector unsigned char __b)
7308 return (vector unsigned char)
7309 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7312 static vector unsigned char __ATTRS_o_ai
7313 vec_vsr(vector unsigned char __a, vector unsigned short __b)
7315 return (vector unsigned char)
7316 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7319 static vector unsigned char __ATTRS_o_ai
7320 vec_vsr(vector unsigned char __a, vector unsigned int __b)
7322 return (vector unsigned char)
7323 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7326 static vector bool char __ATTRS_o_ai
7327 vec_vsr(vector bool char __a, vector unsigned char __b)
7329 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7332 static vector bool char __ATTRS_o_ai
7333 vec_vsr(vector bool char __a, vector unsigned short __b)
7335 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7338 static vector bool char __ATTRS_o_ai
7339 vec_vsr(vector bool char __a, vector unsigned int __b)
7341 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7344 static vector short __ATTRS_o_ai
7345 vec_vsr(vector short __a, vector unsigned char __b)
7347 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7350 static vector short __ATTRS_o_ai
7351 vec_vsr(vector short __a, vector unsigned short __b)
7353 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7356 static vector short __ATTRS_o_ai
7357 vec_vsr(vector short __a, vector unsigned int __b)
7359 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7362 static vector unsigned short __ATTRS_o_ai
7363 vec_vsr(vector unsigned short __a, vector unsigned char __b)
7365 return (vector unsigned short)
7366 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7369 static vector unsigned short __ATTRS_o_ai
7370 vec_vsr(vector unsigned short __a, vector unsigned short __b)
7372 return (vector unsigned short)
7373 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7376 static vector unsigned short __ATTRS_o_ai
7377 vec_vsr(vector unsigned short __a, vector unsigned int __b)
7379 return (vector unsigned short)
7380 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7383 static vector bool short __ATTRS_o_ai
7384 vec_vsr(vector bool short __a, vector unsigned char __b)
7386 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7389 static vector bool short __ATTRS_o_ai
7390 vec_vsr(vector bool short __a, vector unsigned short __b)
7392 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7395 static vector bool short __ATTRS_o_ai
7396 vec_vsr(vector bool short __a, vector unsigned int __b)
7398 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7401 static vector pixel __ATTRS_o_ai
7402 vec_vsr(vector pixel __a, vector unsigned char __b)
7404 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7407 static vector pixel __ATTRS_o_ai
7408 vec_vsr(vector pixel __a, vector unsigned short __b)
7410 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7413 static vector pixel __ATTRS_o_ai
7414 vec_vsr(vector pixel __a, vector unsigned int __b)
7416 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7419 static vector int __ATTRS_o_ai
7420 vec_vsr(vector int __a, vector unsigned char __b)
7422 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7425 static vector int __ATTRS_o_ai
7426 vec_vsr(vector int __a, vector unsigned short __b)
7428 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7431 static vector int __ATTRS_o_ai
7432 vec_vsr(vector int __a, vector unsigned int __b)
7434 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7437 static vector unsigned int __ATTRS_o_ai
7438 vec_vsr(vector unsigned int __a, vector unsigned char __b)
7440 return (vector unsigned int)
7441 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7444 static vector unsigned int __ATTRS_o_ai
7445 vec_vsr(vector unsigned int __a, vector unsigned short __b)
7447 return (vector unsigned int)
7448 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7451 static vector unsigned int __ATTRS_o_ai
7452 vec_vsr(vector unsigned int __a, vector unsigned int __b)
7454 return (vector unsigned int)
7455 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7458 static vector bool int __ATTRS_o_ai
7459 vec_vsr(vector bool int __a, vector unsigned char __b)
7461 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7464 static vector bool int __ATTRS_o_ai
7465 vec_vsr(vector bool int __a, vector unsigned short __b)
7467 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7470 static vector bool int __ATTRS_o_ai
7471 vec_vsr(vector bool int __a, vector unsigned int __b)
7473 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7478 static vector signed char __ATTRS_o_ai
7479 vec_sro(vector signed char __a, vector signed char __b)
7481 return (vector signed char)
7482 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7485 static vector signed char __ATTRS_o_ai
7486 vec_sro(vector signed char __a, vector unsigned char __b)
7488 return (vector signed char)
7489 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7492 static vector unsigned char __ATTRS_o_ai
7493 vec_sro(vector unsigned char __a, vector signed char __b)
7495 return (vector unsigned char)
7496 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7499 static vector unsigned char __ATTRS_o_ai
7500 vec_sro(vector unsigned char __a, vector unsigned char __b)
7502 return (vector unsigned char)
7503 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7506 static vector short __ATTRS_o_ai
7507 vec_sro(vector short __a, vector signed char __b)
7509 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7512 static vector short __ATTRS_o_ai
7513 vec_sro(vector short __a, vector unsigned char __b)
7515 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7518 static vector unsigned short __ATTRS_o_ai
7519 vec_sro(vector unsigned short __a, vector signed char __b)
7521 return (vector unsigned short)
7522 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7525 static vector unsigned short __ATTRS_o_ai
7526 vec_sro(vector unsigned short __a, vector unsigned char __b)
7528 return (vector unsigned short)
7529 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7532 static vector pixel __ATTRS_o_ai
7533 vec_sro(vector pixel __a, vector signed char __b)
7535 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7538 static vector pixel __ATTRS_o_ai
7539 vec_sro(vector pixel __a, vector unsigned char __b)
7541 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7544 static vector int __ATTRS_o_ai
7545 vec_sro(vector int __a, vector signed char __b)
7547 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7550 static vector int __ATTRS_o_ai
7551 vec_sro(vector int __a, vector unsigned char __b)
7553 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7556 static vector unsigned int __ATTRS_o_ai
7557 vec_sro(vector unsigned int __a, vector signed char __b)
7559 return (vector unsigned int)
7560 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7563 static vector unsigned int __ATTRS_o_ai
7564 vec_sro(vector unsigned int __a, vector unsigned char __b)
7566 return (vector unsigned int)
7567 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7570 static vector float __ATTRS_o_ai
7571 vec_sro(vector float __a, vector signed char __b)
7573 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7576 static vector float __ATTRS_o_ai
7577 vec_sro(vector float __a, vector unsigned char __b)
7579 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7584 static vector signed char __ATTRS_o_ai
7585 vec_vsro(vector signed char __a, vector signed char __b)
7587 return (vector signed char)
7588 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7591 static vector signed char __ATTRS_o_ai
7592 vec_vsro(vector signed char __a, vector unsigned char __b)
7594 return (vector signed char)
7595 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7598 static vector unsigned char __ATTRS_o_ai
7599 vec_vsro(vector unsigned char __a, vector signed char __b)
7601 return (vector unsigned char)
7602 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7605 static vector unsigned char __ATTRS_o_ai
7606 vec_vsro(vector unsigned char __a, vector unsigned char __b)
7608 return (vector unsigned char)
7609 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7612 static vector short __ATTRS_o_ai
7613 vec_vsro(vector short __a, vector signed char __b)
7615 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7618 static vector short __ATTRS_o_ai
7619 vec_vsro(vector short __a, vector unsigned char __b)
7621 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7624 static vector unsigned short __ATTRS_o_ai
7625 vec_vsro(vector unsigned short __a, vector signed char __b)
7627 return (vector unsigned short)
7628 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7631 static vector unsigned short __ATTRS_o_ai
7632 vec_vsro(vector unsigned short __a, vector unsigned char __b)
7634 return (vector unsigned short)
7635 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7638 static vector pixel __ATTRS_o_ai
7639 vec_vsro(vector pixel __a, vector signed char __b)
7641 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7644 static vector pixel __ATTRS_o_ai
7645 vec_vsro(vector pixel __a, vector unsigned char __b)
7647 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7650 static vector int __ATTRS_o_ai
7651 vec_vsro(vector int __a, vector signed char __b)
7653 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7656 static vector int __ATTRS_o_ai
7657 vec_vsro(vector int __a, vector unsigned char __b)
7659 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7662 static vector unsigned int __ATTRS_o_ai
7663 vec_vsro(vector unsigned int __a, vector signed char __b)
7665 return (vector unsigned int)
7666 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7669 static vector unsigned int __ATTRS_o_ai
7670 vec_vsro(vector unsigned int __a, vector unsigned char __b)
7672 return (vector unsigned int)
7673 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7676 static vector float __ATTRS_o_ai
7677 vec_vsro(vector float __a, vector signed char __b)
7679 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7682 static vector float __ATTRS_o_ai
7683 vec_vsro(vector float __a, vector unsigned char __b)
7685 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7690 static void __ATTRS_o_ai
7691 vec_st(vector signed char __a, int __b, vector signed char *__c)
7693 __builtin_altivec_stvx((vector int)__a, __b, __c);
7696 static void __ATTRS_o_ai
7697 vec_st(vector signed char __a, int __b, signed char *__c)
7699 __builtin_altivec_stvx((vector int)__a, __b, __c);
7702 static void __ATTRS_o_ai
7703 vec_st(vector unsigned char __a, int __b, vector unsigned char *__c)
7705 __builtin_altivec_stvx((vector int)__a, __b, __c);
7708 static void __ATTRS_o_ai
7709 vec_st(vector unsigned char __a, int __b, unsigned char *__c)
7711 __builtin_altivec_stvx((vector int)__a, __b, __c);
7714 static void __ATTRS_o_ai
7715 vec_st(vector bool char __a, int __b, signed char *__c)
7717 __builtin_altivec_stvx((vector int)__a, __b, __c);
7720 static void __ATTRS_o_ai
7721 vec_st(vector bool char __a, int __b, unsigned char *__c)
7723 __builtin_altivec_stvx((vector int)__a, __b, __c);
7726 static void __ATTRS_o_ai
7727 vec_st(vector bool char __a, int __b, vector bool char *__c)
7729 __builtin_altivec_stvx((vector int)__a, __b, __c);
7732 static void __ATTRS_o_ai
7733 vec_st(vector short __a, int __b, vector short *__c)
7735 __builtin_altivec_stvx((vector int)__a, __b, __c);
7738 static void __ATTRS_o_ai
7739 vec_st(vector short __a, int __b, short *__c)
7741 __builtin_altivec_stvx((vector int)__a, __b, __c);
7744 static void __ATTRS_o_ai
7745 vec_st(vector unsigned short __a, int __b, vector unsigned short *__c)
7747 __builtin_altivec_stvx((vector int)__a, __b, __c);
7750 static void __ATTRS_o_ai
7751 vec_st(vector unsigned short __a, int __b, unsigned short *__c)
7753 __builtin_altivec_stvx((vector int)__a, __b, __c);
7756 static void __ATTRS_o_ai
7757 vec_st(vector bool short __a, int __b, short *__c)
7759 __builtin_altivec_stvx((vector int)__a, __b, __c);
7762 static void __ATTRS_o_ai
7763 vec_st(vector bool short __a, int __b, unsigned short *__c)
7765 __builtin_altivec_stvx((vector int)__a, __b, __c);
7768 static void __ATTRS_o_ai
7769 vec_st(vector bool short __a, int __b, vector bool short *__c)
7771 __builtin_altivec_stvx((vector int)__a, __b, __c);
7774 static void __ATTRS_o_ai
7775 vec_st(vector pixel __a, int __b, short *__c)
7777 __builtin_altivec_stvx((vector int)__a, __b, __c);
7780 static void __ATTRS_o_ai
7781 vec_st(vector pixel __a, int __b, unsigned short *__c)
7783 __builtin_altivec_stvx((vector int)__a, __b, __c);
7786 static void __ATTRS_o_ai
7787 vec_st(vector pixel __a, int __b, vector pixel *__c)
7789 __builtin_altivec_stvx((vector int)__a, __b, __c);
7792 static void __ATTRS_o_ai
7793 vec_st(vector int __a, int __b, vector int *__c)
7795 __builtin_altivec_stvx(__a, __b, __c);
7798 static void __ATTRS_o_ai
7799 vec_st(vector int __a, int __b, int *__c)
7801 __builtin_altivec_stvx(__a, __b, __c);
7804 static void __ATTRS_o_ai
7805 vec_st(vector unsigned int __a, int __b, vector unsigned int *__c)
7807 __builtin_altivec_stvx((vector int)__a, __b, __c);
7810 static void __ATTRS_o_ai
7811 vec_st(vector unsigned int __a, int __b, unsigned int *__c)
7813 __builtin_altivec_stvx((vector int)__a, __b, __c);
7816 static void __ATTRS_o_ai
7817 vec_st(vector bool int __a, int __b, int *__c)
7819 __builtin_altivec_stvx((vector int)__a, __b, __c);
7822 static void __ATTRS_o_ai
7823 vec_st(vector bool int __a, int __b, unsigned int *__c)
7825 __builtin_altivec_stvx((vector int)__a, __b, __c);
7828 static void __ATTRS_o_ai
7829 vec_st(vector bool int __a, int __b, vector bool int *__c)
7831 __builtin_altivec_stvx((vector int)__a, __b, __c);
7834 static void __ATTRS_o_ai
7835 vec_st(vector float __a, int __b, vector float *__c)
7837 __builtin_altivec_stvx((vector int)__a, __b, __c);
7840 static void __ATTRS_o_ai
7841 vec_st(vector float __a, int __b, float *__c)
7843 __builtin_altivec_stvx((vector int)__a, __b, __c);
7848 static void __ATTRS_o_ai
7849 vec_stvx(vector signed char __a, int __b, vector signed char *__c)
7851 __builtin_altivec_stvx((vector int)__a, __b, __c);
7854 static void __ATTRS_o_ai
7855 vec_stvx(vector signed char __a, int __b, signed char *__c)
7857 __builtin_altivec_stvx((vector int)__a, __b, __c);
7860 static void __ATTRS_o_ai
7861 vec_stvx(vector unsigned char __a, int __b, vector unsigned char *__c)
7863 __builtin_altivec_stvx((vector int)__a, __b, __c);
7866 static void __ATTRS_o_ai
7867 vec_stvx(vector unsigned char __a, int __b, unsigned char *__c)
7869 __builtin_altivec_stvx((vector int)__a, __b, __c);
7872 static void __ATTRS_o_ai
7873 vec_stvx(vector bool char __a, int __b, signed char *__c)
7875 __builtin_altivec_stvx((vector int)__a, __b, __c);
7878 static void __ATTRS_o_ai
7879 vec_stvx(vector bool char __a, int __b, unsigned char *__c)
7881 __builtin_altivec_stvx((vector int)__a, __b, __c);
7884 static void __ATTRS_o_ai
7885 vec_stvx(vector bool char __a, int __b, vector bool char *__c)
7887 __builtin_altivec_stvx((vector int)__a, __b, __c);
7890 static void __ATTRS_o_ai
7891 vec_stvx(vector short __a, int __b, vector short *__c)
7893 __builtin_altivec_stvx((vector int)__a, __b, __c);
7896 static void __ATTRS_o_ai
7897 vec_stvx(vector short __a, int __b, short *__c)
7899 __builtin_altivec_stvx((vector int)__a, __b, __c);
7902 static void __ATTRS_o_ai
7903 vec_stvx(vector unsigned short __a, int __b, vector unsigned short *__c)
7905 __builtin_altivec_stvx((vector int)__a, __b, __c);
7908 static void __ATTRS_o_ai
7909 vec_stvx(vector unsigned short __a, int __b, unsigned short *__c)
7911 __builtin_altivec_stvx((vector int)__a, __b, __c);
7914 static void __ATTRS_o_ai
7915 vec_stvx(vector bool short __a, int __b, short *__c)
7917 __builtin_altivec_stvx((vector int)__a, __b, __c);
7920 static void __ATTRS_o_ai
7921 vec_stvx(vector bool short __a, int __b, unsigned short *__c)
7923 __builtin_altivec_stvx((vector int)__a, __b, __c);
7926 static void __ATTRS_o_ai
7927 vec_stvx(vector bool short __a, int __b, vector bool short *__c)
7929 __builtin_altivec_stvx((vector int)__a, __b, __c);
7932 static void __ATTRS_o_ai
7933 vec_stvx(vector pixel __a, int __b, short *__c)
7935 __builtin_altivec_stvx((vector int)__a, __b, __c);
7938 static void __ATTRS_o_ai
7939 vec_stvx(vector pixel __a, int __b, unsigned short *__c)
7941 __builtin_altivec_stvx((vector int)__a, __b, __c);
7944 static void __ATTRS_o_ai
7945 vec_stvx(vector pixel __a, int __b, vector pixel *__c)
7947 __builtin_altivec_stvx((vector int)__a, __b, __c);
7950 static void __ATTRS_o_ai
7951 vec_stvx(vector int __a, int __b, vector int *__c)
7953 __builtin_altivec_stvx(__a, __b, __c);
7956 static void __ATTRS_o_ai
7957 vec_stvx(vector int __a, int __b, int *__c)
7959 __builtin_altivec_stvx(__a, __b, __c);
7962 static void __ATTRS_o_ai
7963 vec_stvx(vector unsigned int __a, int __b, vector unsigned int *__c)
7965 __builtin_altivec_stvx((vector int)__a, __b, __c);
7968 static void __ATTRS_o_ai
7969 vec_stvx(vector unsigned int __a, int __b, unsigned int *__c)
7971 __builtin_altivec_stvx((vector int)__a, __b, __c);
7974 static void __ATTRS_o_ai
7975 vec_stvx(vector bool int __a, int __b, int *__c)
7977 __builtin_altivec_stvx((vector int)__a, __b, __c);
7980 static void __ATTRS_o_ai
7981 vec_stvx(vector bool int __a, int __b, unsigned int *__c)
7983 __builtin_altivec_stvx((vector int)__a, __b, __c);
7986 static void __ATTRS_o_ai
7987 vec_stvx(vector bool int __a, int __b, vector bool int *__c)
7989 __builtin_altivec_stvx((vector int)__a, __b, __c);
7992 static void __ATTRS_o_ai
7993 vec_stvx(vector float __a, int __b, vector float *__c)
7995 __builtin_altivec_stvx((vector int)__a, __b, __c);
7998 static void __ATTRS_o_ai
7999 vec_stvx(vector float __a, int __b, float *__c)
8001 __builtin_altivec_stvx((vector int)__a, __b, __c);
8006 static void __ATTRS_o_ai
8007 vec_ste(vector signed char __a, int __b, signed char *__c)
8009 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8012 static void __ATTRS_o_ai
8013 vec_ste(vector unsigned char __a, int __b, unsigned char *__c)
8015 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8018 static void __ATTRS_o_ai
8019 vec_ste(vector bool char __a, int __b, signed char *__c)
8021 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8024 static void __ATTRS_o_ai
8025 vec_ste(vector bool char __a, int __b, unsigned char *__c)
8027 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8030 static void __ATTRS_o_ai
8031 vec_ste(vector short __a, int __b, short *__c)
8033 __builtin_altivec_stvehx(__a, __b, __c);
8036 static void __ATTRS_o_ai
8037 vec_ste(vector unsigned short __a, int __b, unsigned short *__c)
8039 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8042 static void __ATTRS_o_ai
8043 vec_ste(vector bool short __a, int __b, short *__c)
8045 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8048 static void __ATTRS_o_ai
8049 vec_ste(vector bool short __a, int __b, unsigned short *__c)
8051 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8054 static void __ATTRS_o_ai
8055 vec_ste(vector pixel __a, int __b, short *__c)
8057 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8060 static void __ATTRS_o_ai
8061 vec_ste(vector pixel __a, int __b, unsigned short *__c)
8063 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8066 static void __ATTRS_o_ai
8067 vec_ste(vector int __a, int __b, int *__c)
8069 __builtin_altivec_stvewx(__a, __b, __c);
8072 static void __ATTRS_o_ai
8073 vec_ste(vector unsigned int __a, int __b, unsigned int *__c)
8075 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8078 static void __ATTRS_o_ai
8079 vec_ste(vector bool int __a, int __b, int *__c)
8081 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8084 static void __ATTRS_o_ai
8085 vec_ste(vector bool int __a, int __b, unsigned int *__c)
8087 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8090 static void __ATTRS_o_ai
8091 vec_ste(vector float __a, int __b, float *__c)
8093 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8098 static void __ATTRS_o_ai
8099 vec_stvebx(vector signed char __a, int __b, signed char *__c)
8101 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8104 static void __ATTRS_o_ai
8105 vec_stvebx(vector unsigned char __a, int __b, unsigned char *__c)
8107 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8110 static void __ATTRS_o_ai
8111 vec_stvebx(vector bool char __a, int __b, signed char *__c)
8113 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8116 static void __ATTRS_o_ai
8117 vec_stvebx(vector bool char __a, int __b, unsigned char *__c)
8119 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8124 static void __ATTRS_o_ai
8125 vec_stvehx(vector short __a, int __b, short *__c)
8127 __builtin_altivec_stvehx(__a, __b, __c);
8130 static void __ATTRS_o_ai
8131 vec_stvehx(vector unsigned short __a, int __b, unsigned short *__c)
8133 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8136 static void __ATTRS_o_ai
8137 vec_stvehx(vector bool short __a, int __b, short *__c)
8139 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8142 static void __ATTRS_o_ai
8143 vec_stvehx(vector bool short __a, int __b, unsigned short *__c)
8145 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8148 static void __ATTRS_o_ai
8149 vec_stvehx(vector pixel __a, int __b, short *__c)
8151 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8154 static void __ATTRS_o_ai
8155 vec_stvehx(vector pixel __a, int __b, unsigned short *__c)
8157 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8162 static void __ATTRS_o_ai
8163 vec_stvewx(vector int __a, int __b, int *__c)
8165 __builtin_altivec_stvewx(__a, __b, __c);
8168 static void __ATTRS_o_ai
8169 vec_stvewx(vector unsigned int __a, int __b, unsigned int *__c)
8171 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8174 static void __ATTRS_o_ai
8175 vec_stvewx(vector bool int __a, int __b, int *__c)
8177 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8180 static void __ATTRS_o_ai
8181 vec_stvewx(vector bool int __a, int __b, unsigned int *__c)
8183 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8186 static void __ATTRS_o_ai
8187 vec_stvewx(vector float __a, int __b, float *__c)
8189 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8194 static void __ATTRS_o_ai
8195 vec_stl(vector signed char __a, int __b, vector signed char *__c)
8197 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8200 static void __ATTRS_o_ai
8201 vec_stl(vector signed char __a, int __b, signed char *__c)
8203 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8206 static void __ATTRS_o_ai
8207 vec_stl(vector unsigned char __a, int __b, vector unsigned char *__c)
8209 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8212 static void __ATTRS_o_ai
8213 vec_stl(vector unsigned char __a, int __b, unsigned char *__c)
8215 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8218 static void __ATTRS_o_ai
8219 vec_stl(vector bool char __a, int __b, signed char *__c)
8221 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8224 static void __ATTRS_o_ai
8225 vec_stl(vector bool char __a, int __b, unsigned char *__c)
8227 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8230 static void __ATTRS_o_ai
8231 vec_stl(vector bool char __a, int __b, vector bool char *__c)
8233 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8236 static void __ATTRS_o_ai
8237 vec_stl(vector short __a, int __b, vector short *__c)
8239 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8242 static void __ATTRS_o_ai
8243 vec_stl(vector short __a, int __b, short *__c)
8245 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8248 static void __ATTRS_o_ai
8249 vec_stl(vector unsigned short __a, int __b, vector unsigned short *__c)
8251 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8254 static void __ATTRS_o_ai
8255 vec_stl(vector unsigned short __a, int __b, unsigned short *__c)
8257 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8260 static void __ATTRS_o_ai
8261 vec_stl(vector bool short __a, int __b, short *__c)
8263 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8266 static void __ATTRS_o_ai
8267 vec_stl(vector bool short __a, int __b, unsigned short *__c)
8269 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8272 static void __ATTRS_o_ai
8273 vec_stl(vector bool short __a, int __b, vector bool short *__c)
8275 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8278 static void __ATTRS_o_ai
8279 vec_stl(vector pixel __a, int __b, short *__c)
8281 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8284 static void __ATTRS_o_ai
8285 vec_stl(vector pixel __a, int __b, unsigned short *__c)
8287 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8290 static void __ATTRS_o_ai
8291 vec_stl(vector pixel __a, int __b, vector pixel *__c)
8293 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8296 static void __ATTRS_o_ai
8297 vec_stl(vector int __a, int __b, vector int *__c)
8299 __builtin_altivec_stvxl(__a, __b, __c);
8302 static void __ATTRS_o_ai
8303 vec_stl(vector int __a, int __b, int *__c)
8305 __builtin_altivec_stvxl(__a, __b, __c);
8308 static void __ATTRS_o_ai
8309 vec_stl(vector unsigned int __a, int __b, vector unsigned int *__c)
8311 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8314 static void __ATTRS_o_ai
8315 vec_stl(vector unsigned int __a, int __b, unsigned int *__c)
8317 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8320 static void __ATTRS_o_ai
8321 vec_stl(vector bool int __a, int __b, int *__c)
8323 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8326 static void __ATTRS_o_ai
8327 vec_stl(vector bool int __a, int __b, unsigned int *__c)
8329 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8332 static void __ATTRS_o_ai
8333 vec_stl(vector bool int __a, int __b, vector bool int *__c)
8335 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8338 static void __ATTRS_o_ai
8339 vec_stl(vector float __a, int __b, vector float *__c)
8341 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8344 static void __ATTRS_o_ai
8345 vec_stl(vector float __a, int __b, float *__c)
8347 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8352 static void __ATTRS_o_ai
8353 vec_stvxl(vector signed char __a, int __b, vector signed char *__c)
8355 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8358 static void __ATTRS_o_ai
8359 vec_stvxl(vector signed char __a, int __b, signed char *__c)
8361 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8364 static void __ATTRS_o_ai
8365 vec_stvxl(vector unsigned char __a, int __b, vector unsigned char *__c)
8367 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8370 static void __ATTRS_o_ai
8371 vec_stvxl(vector unsigned char __a, int __b, unsigned char *__c)
8373 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8376 static void __ATTRS_o_ai
8377 vec_stvxl(vector bool char __a, int __b, signed char *__c)
8379 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8382 static void __ATTRS_o_ai
8383 vec_stvxl(vector bool char __a, int __b, unsigned char *__c)
8385 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8388 static void __ATTRS_o_ai
8389 vec_stvxl(vector bool char __a, int __b, vector bool char *__c)
8391 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8394 static void __ATTRS_o_ai
8395 vec_stvxl(vector short __a, int __b, vector short *__c)
8397 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8400 static void __ATTRS_o_ai
8401 vec_stvxl(vector short __a, int __b, short *__c)
8403 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8406 static void __ATTRS_o_ai
8407 vec_stvxl(vector unsigned short __a, int __b, vector unsigned short *__c)
8409 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8412 static void __ATTRS_o_ai
8413 vec_stvxl(vector unsigned short __a, int __b, unsigned short *__c)
8415 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8418 static void __ATTRS_o_ai
8419 vec_stvxl(vector bool short __a, int __b, short *__c)
8421 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8424 static void __ATTRS_o_ai
8425 vec_stvxl(vector bool short __a, int __b, unsigned short *__c)
8427 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8430 static void __ATTRS_o_ai
8431 vec_stvxl(vector bool short __a, int __b, vector bool short *__c)
8433 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8436 static void __ATTRS_o_ai
8437 vec_stvxl(vector pixel __a, int __b, short *__c)
8439 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8442 static void __ATTRS_o_ai
8443 vec_stvxl(vector pixel __a, int __b, unsigned short *__c)
8445 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8448 static void __ATTRS_o_ai
8449 vec_stvxl(vector pixel __a, int __b, vector pixel *__c)
8451 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8454 static void __ATTRS_o_ai
8455 vec_stvxl(vector int __a, int __b, vector int *__c)
8457 __builtin_altivec_stvxl(__a, __b, __c);
8460 static void __ATTRS_o_ai
8461 vec_stvxl(vector int __a, int __b, int *__c)
8463 __builtin_altivec_stvxl(__a, __b, __c);
8466 static void __ATTRS_o_ai
8467 vec_stvxl(vector unsigned int __a, int __b, vector unsigned int *__c)
8469 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8472 static void __ATTRS_o_ai
8473 vec_stvxl(vector unsigned int __a, int __b, unsigned int *__c)
8475 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8478 static void __ATTRS_o_ai
8479 vec_stvxl(vector bool int __a, int __b, int *__c)
8481 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8484 static void __ATTRS_o_ai
8485 vec_stvxl(vector bool int __a, int __b, unsigned int *__c)
8487 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8490 static void __ATTRS_o_ai
8491 vec_stvxl(vector bool int __a, int __b, vector bool int *__c)
8493 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8496 static void __ATTRS_o_ai
8497 vec_stvxl(vector float __a, int __b, vector float *__c)
8499 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8502 static void __ATTRS_o_ai
8503 vec_stvxl(vector float __a, int __b, float *__c)
8505 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8510 static vector signed char __ATTRS_o_ai
8511 vec_sub(vector signed char __a, vector signed char __b)
8516 static vector signed char __ATTRS_o_ai
8517 vec_sub(vector bool char __a, vector signed char __b)
8519 return (vector signed char)__a - __b;
8522 static vector signed char __ATTRS_o_ai
8523 vec_sub(vector signed char __a, vector bool char __b)
8525 return __a - (vector signed char)__b;
8528 static vector unsigned char __ATTRS_o_ai
8529 vec_sub(vector unsigned char __a, vector unsigned char __b)
8534 static vector unsigned char __ATTRS_o_ai
8535 vec_sub(vector bool char __a, vector unsigned char __b)
8537 return (vector unsigned char)__a - __b;
8540 static vector unsigned char __ATTRS_o_ai
8541 vec_sub(vector unsigned char __a, vector bool char __b)
8543 return __a - (vector unsigned char)__b;
8546 static vector short __ATTRS_o_ai
8547 vec_sub(vector short __a, vector short __b)
8552 static vector short __ATTRS_o_ai
8553 vec_sub(vector bool short __a, vector short __b)
8555 return (vector short)__a - __b;
8558 static vector short __ATTRS_o_ai
8559 vec_sub(vector short __a, vector bool short __b)
8561 return __a - (vector short)__b;
8564 static vector unsigned short __ATTRS_o_ai
8565 vec_sub(vector unsigned short __a, vector unsigned short __b)
8570 static vector unsigned short __ATTRS_o_ai
8571 vec_sub(vector bool short __a, vector unsigned short __b)
8573 return (vector unsigned short)__a - __b;
8576 static vector unsigned short __ATTRS_o_ai
8577 vec_sub(vector unsigned short __a, vector bool short __b)
8579 return __a - (vector unsigned short)__b;
8582 static vector int __ATTRS_o_ai
8583 vec_sub(vector int __a, vector int __b)
8588 static vector int __ATTRS_o_ai
8589 vec_sub(vector bool int __a, vector int __b)
8591 return (vector int)__a - __b;
8594 static vector int __ATTRS_o_ai
8595 vec_sub(vector int __a, vector bool int __b)
8597 return __a - (vector int)__b;
8600 static vector unsigned int __ATTRS_o_ai
8601 vec_sub(vector unsigned int __a, vector unsigned int __b)
8606 static vector unsigned int __ATTRS_o_ai
8607 vec_sub(vector bool int __a, vector unsigned int __b)
8609 return (vector unsigned int)__a - __b;
8612 static vector unsigned int __ATTRS_o_ai
8613 vec_sub(vector unsigned int __a, vector bool int __b)
8615 return __a - (vector unsigned int)__b;
8618 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
8619 static vector signed __int128 __ATTRS_o_ai
8620 vec_sub(vector signed __int128 __a, vector signed __int128 __b)
8625 static vector unsigned __int128 __ATTRS_o_ai
8626 vec_sub(vector unsigned __int128 __a, vector unsigned __int128 __b)
8630 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
8632 static vector float __ATTRS_o_ai
8633 vec_sub(vector float __a, vector float __b)
8640 #define __builtin_altivec_vsububm vec_vsububm
8642 static vector signed char __ATTRS_o_ai
8643 vec_vsububm(vector signed char __a, vector signed char __b)
8648 static vector signed char __ATTRS_o_ai
8649 vec_vsububm(vector bool char __a, vector signed char __b)
8651 return (vector signed char)__a - __b;
8654 static vector signed char __ATTRS_o_ai
8655 vec_vsububm(vector signed char __a, vector bool char __b)
8657 return __a - (vector signed char)__b;
8660 static vector unsigned char __ATTRS_o_ai
8661 vec_vsububm(vector unsigned char __a, vector unsigned char __b)
8666 static vector unsigned char __ATTRS_o_ai
8667 vec_vsububm(vector bool char __a, vector unsigned char __b)
8669 return (vector unsigned char)__a - __b;
8672 static vector unsigned char __ATTRS_o_ai
8673 vec_vsububm(vector unsigned char __a, vector bool char __b)
8675 return __a - (vector unsigned char)__b;
8680 #define __builtin_altivec_vsubuhm vec_vsubuhm
8682 static vector short __ATTRS_o_ai
8683 vec_vsubuhm(vector short __a, vector short __b)
8688 static vector short __ATTRS_o_ai
8689 vec_vsubuhm(vector bool short __a, vector short __b)
8691 return (vector short)__a - __b;
8694 static vector short __ATTRS_o_ai
8695 vec_vsubuhm(vector short __a, vector bool short __b)
8697 return __a - (vector short)__b;
8700 static vector unsigned short __ATTRS_o_ai
8701 vec_vsubuhm(vector unsigned short __a, vector unsigned short __b)
8706 static vector unsigned short __ATTRS_o_ai
8707 vec_vsubuhm(vector bool short __a, vector unsigned short __b)
8709 return (vector unsigned short)__a - __b;
8712 static vector unsigned short __ATTRS_o_ai
8713 vec_vsubuhm(vector unsigned short __a, vector bool short __b)
8715 return __a - (vector unsigned short)__b;
8720 #define __builtin_altivec_vsubuwm vec_vsubuwm
8722 static vector int __ATTRS_o_ai
8723 vec_vsubuwm(vector int __a, vector int __b)
8728 static vector int __ATTRS_o_ai
8729 vec_vsubuwm(vector bool int __a, vector int __b)
8731 return (vector int)__a - __b;
8734 static vector int __ATTRS_o_ai
8735 vec_vsubuwm(vector int __a, vector bool int __b)
8737 return __a - (vector int)__b;
8740 static vector unsigned int __ATTRS_o_ai
8741 vec_vsubuwm(vector unsigned int __a, vector unsigned int __b)
8746 static vector unsigned int __ATTRS_o_ai
8747 vec_vsubuwm(vector bool int __a, vector unsigned int __b)
8749 return (vector unsigned int)__a - __b;
8752 static vector unsigned int __ATTRS_o_ai
8753 vec_vsubuwm(vector unsigned int __a, vector bool int __b)
8755 return __a - (vector unsigned int)__b;
8760 #define __builtin_altivec_vsubfp vec_vsubfp
8762 static vector float __attribute__((__always_inline__))
8763 vec_vsubfp(vector float __a, vector float __b)
8770 static vector unsigned int __ATTRS_o_ai
8771 vec_subc(vector unsigned int __a, vector unsigned int __b)
8773 return __builtin_altivec_vsubcuw(__a, __b);
8776 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
8777 static vector unsigned __int128 __ATTRS_o_ai
8778 vec_subc(vector unsigned __int128 __a, vector unsigned __int128 __b)
8780 return __builtin_altivec_vsubcuq(__a, __b);
8783 static vector signed __int128 __ATTRS_o_ai
8784 vec_subc(vector signed __int128 __a, vector signed __int128 __b)
8786 return __builtin_altivec_vsubcuq(__a, __b);
8788 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
8792 static vector unsigned int __attribute__((__always_inline__))
8793 vec_vsubcuw(vector unsigned int __a, vector unsigned int __b)
8795 return __builtin_altivec_vsubcuw(__a, __b);
8800 static vector signed char __ATTRS_o_ai
8801 vec_subs(vector signed char __a, vector signed char __b)
8803 return __builtin_altivec_vsubsbs(__a, __b);
8806 static vector signed char __ATTRS_o_ai
8807 vec_subs(vector bool char __a, vector signed char __b)
8809 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
8812 static vector signed char __ATTRS_o_ai
8813 vec_subs(vector signed char __a, vector bool char __b)
8815 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
8818 static vector unsigned char __ATTRS_o_ai
8819 vec_subs(vector unsigned char __a, vector unsigned char __b)
8821 return __builtin_altivec_vsububs(__a, __b);
8824 static vector unsigned char __ATTRS_o_ai
8825 vec_subs(vector bool char __a, vector unsigned char __b)
8827 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
8830 static vector unsigned char __ATTRS_o_ai
8831 vec_subs(vector unsigned char __a, vector bool char __b)
8833 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
8836 static vector short __ATTRS_o_ai
8837 vec_subs(vector short __a, vector short __b)
8839 return __builtin_altivec_vsubshs(__a, __b);
8842 static vector short __ATTRS_o_ai
8843 vec_subs(vector bool short __a, vector short __b)
8845 return __builtin_altivec_vsubshs((vector short)__a, __b);
8848 static vector short __ATTRS_o_ai
8849 vec_subs(vector short __a, vector bool short __b)
8851 return __builtin_altivec_vsubshs(__a, (vector short)__b);
8854 static vector unsigned short __ATTRS_o_ai
8855 vec_subs(vector unsigned short __a, vector unsigned short __b)
8857 return __builtin_altivec_vsubuhs(__a, __b);
8860 static vector unsigned short __ATTRS_o_ai
8861 vec_subs(vector bool short __a, vector unsigned short __b)
8863 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
8866 static vector unsigned short __ATTRS_o_ai
8867 vec_subs(vector unsigned short __a, vector bool short __b)
8869 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
8872 static vector int __ATTRS_o_ai
8873 vec_subs(vector int __a, vector int __b)
8875 return __builtin_altivec_vsubsws(__a, __b);
8878 static vector int __ATTRS_o_ai
8879 vec_subs(vector bool int __a, vector int __b)
8881 return __builtin_altivec_vsubsws((vector int)__a, __b);
8884 static vector int __ATTRS_o_ai
8885 vec_subs(vector int __a, vector bool int __b)
8887 return __builtin_altivec_vsubsws(__a, (vector int)__b);
8890 static vector unsigned int __ATTRS_o_ai
8891 vec_subs(vector unsigned int __a, vector unsigned int __b)
8893 return __builtin_altivec_vsubuws(__a, __b);
8896 static vector unsigned int __ATTRS_o_ai
8897 vec_subs(vector bool int __a, vector unsigned int __b)
8899 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
8902 static vector unsigned int __ATTRS_o_ai
8903 vec_subs(vector unsigned int __a, vector bool int __b)
8905 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
8910 static vector signed char __ATTRS_o_ai
8911 vec_vsubsbs(vector signed char __a, vector signed char __b)
8913 return __builtin_altivec_vsubsbs(__a, __b);
8916 static vector signed char __ATTRS_o_ai
8917 vec_vsubsbs(vector bool char __a, vector signed char __b)
8919 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
8922 static vector signed char __ATTRS_o_ai
8923 vec_vsubsbs(vector signed char __a, vector bool char __b)
8925 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
8930 static vector unsigned char __ATTRS_o_ai
8931 vec_vsububs(vector unsigned char __a, vector unsigned char __b)
8933 return __builtin_altivec_vsububs(__a, __b);
8936 static vector unsigned char __ATTRS_o_ai
8937 vec_vsububs(vector bool char __a, vector unsigned char __b)
8939 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
8942 static vector unsigned char __ATTRS_o_ai
8943 vec_vsububs(vector unsigned char __a, vector bool char __b)
8945 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
8950 static vector short __ATTRS_o_ai
8951 vec_vsubshs(vector short __a, vector short __b)
8953 return __builtin_altivec_vsubshs(__a, __b);
8956 static vector short __ATTRS_o_ai
8957 vec_vsubshs(vector bool short __a, vector short __b)
8959 return __builtin_altivec_vsubshs((vector short)__a, __b);
8962 static vector short __ATTRS_o_ai
8963 vec_vsubshs(vector short __a, vector bool short __b)
8965 return __builtin_altivec_vsubshs(__a, (vector short)__b);
8970 static vector unsigned short __ATTRS_o_ai
8971 vec_vsubuhs(vector unsigned short __a, vector unsigned short __b)
8973 return __builtin_altivec_vsubuhs(__a, __b);
8976 static vector unsigned short __ATTRS_o_ai
8977 vec_vsubuhs(vector bool short __a, vector unsigned short __b)
8979 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
8982 static vector unsigned short __ATTRS_o_ai
8983 vec_vsubuhs(vector unsigned short __a, vector bool short __b)
8985 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
8990 static vector int __ATTRS_o_ai
8991 vec_vsubsws(vector int __a, vector int __b)
8993 return __builtin_altivec_vsubsws(__a, __b);
8996 static vector int __ATTRS_o_ai
8997 vec_vsubsws(vector bool int __a, vector int __b)
8999 return __builtin_altivec_vsubsws((vector int)__a, __b);
9002 static vector int __ATTRS_o_ai
9003 vec_vsubsws(vector int __a, vector bool int __b)
9005 return __builtin_altivec_vsubsws(__a, (vector int)__b);
9010 static vector unsigned int __ATTRS_o_ai
9011 vec_vsubuws(vector unsigned int __a, vector unsigned int __b)
9013 return __builtin_altivec_vsubuws(__a, __b);
9016 static vector unsigned int __ATTRS_o_ai
9017 vec_vsubuws(vector bool int __a, vector unsigned int __b)
9019 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
9022 static vector unsigned int __ATTRS_o_ai
9023 vec_vsubuws(vector unsigned int __a, vector bool int __b)
9025 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
9028 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9031 static vector signed __int128 __ATTRS_o_ai
9032 vec_vsubuqm(vector signed __int128 __a, vector signed __int128 __b)
9037 static vector unsigned __int128 __ATTRS_o_ai
9038 vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b)
9045 static vector signed __int128 __ATTRS_o_ai
9046 vec_vsubeuqm(vector signed __int128 __a, vector signed __int128 __b,
9047 vector signed __int128 __c)
9049 return __builtin_altivec_vsubeuqm(__a, __b, __c);
9052 static vector unsigned __int128 __ATTRS_o_ai
9053 vec_vsubeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
9054 vector unsigned __int128 __c)
9056 return __builtin_altivec_vsubeuqm(__a, __b, __c);
9061 static vector signed __int128 __ATTRS_o_ai
9062 vec_vsubcuq(vector signed __int128 __a, vector signed __int128 __b)
9064 return __builtin_altivec_vsubcuq(__a, __b);
9067 static vector unsigned __int128 __ATTRS_o_ai
9068 vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b)
9070 return __builtin_altivec_vsubcuq(__a, __b);
9075 static vector signed __int128 __ATTRS_o_ai
9076 vec_vsubecuq(vector signed __int128 __a, vector signed __int128 __b,
9077 vector signed __int128 __c)
9079 return __builtin_altivec_vsubecuq(__a, __b, __c);
9082 static vector unsigned __int128 __ATTRS_o_ai
9083 vec_vsubecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
9084 vector unsigned __int128 __c)
9086 return __builtin_altivec_vsubecuq(__a, __b, __c);
9088 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9092 static vector int __ATTRS_o_ai
9093 vec_sum4s(vector signed char __a, vector int __b)
9095 return __builtin_altivec_vsum4sbs(__a, __b);
9098 static vector unsigned int __ATTRS_o_ai
9099 vec_sum4s(vector unsigned char __a, vector unsigned int __b)
9101 return __builtin_altivec_vsum4ubs(__a, __b);
9104 static vector int __ATTRS_o_ai
9105 vec_sum4s(vector signed short __a, vector int __b)
9107 return __builtin_altivec_vsum4shs(__a, __b);
9112 static vector int __attribute__((__always_inline__))
9113 vec_vsum4sbs(vector signed char __a, vector int __b)
9115 return __builtin_altivec_vsum4sbs(__a, __b);
9120 static vector unsigned int __attribute__((__always_inline__))
9121 vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b)
9123 return __builtin_altivec_vsum4ubs(__a, __b);
9128 static vector int __attribute__((__always_inline__))
9129 vec_vsum4shs(vector signed short __a, vector int __b)
9131 return __builtin_altivec_vsum4shs(__a, __b);
9136 /* The vsum2sws instruction has a big-endian bias, so that the second
9137 input vector and the result always reference big-endian elements
9138 1 and 3 (little-endian element 0 and 2). For ease of porting the
9139 programmer wants elements 1 and 3 in both cases, so for little
9140 endian we must perform some permutes. */
9142 static vector signed int __attribute__((__always_inline__))
9143 vec_sum2s(vector int __a, vector int __b)
9145 #ifdef __LITTLE_ENDIAN__
9146 vector int __c = (vector signed int)
9147 vec_perm(__b, __b, (vector unsigned char)
9148 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
9149 __c = __builtin_altivec_vsum2sws(__a, __c);
9150 return (vector signed int)
9151 vec_perm(__c, __c, (vector unsigned char)
9152 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
9154 return __builtin_altivec_vsum2sws(__a, __b);
9160 static vector signed int __attribute__((__always_inline__))
9161 vec_vsum2sws(vector int __a, vector int __b)
9163 #ifdef __LITTLE_ENDIAN__
9164 vector int __c = (vector signed int)
9165 vec_perm(__b, __b, (vector unsigned char)
9166 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
9167 __c = __builtin_altivec_vsum2sws(__a, __c);
9168 return (vector signed int)
9169 vec_perm(__c, __c, (vector unsigned char)
9170 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
9172 return __builtin_altivec_vsum2sws(__a, __b);
9178 /* The vsumsws instruction has a big-endian bias, so that the second
9179 input vector and the result always reference big-endian element 3
9180 (little-endian element 0). For ease of porting the programmer
9181 wants element 3 in both cases, so for little endian we must perform
9184 static vector signed int __attribute__((__always_inline__))
9185 vec_sums(vector signed int __a, vector signed int __b)
9187 #ifdef __LITTLE_ENDIAN__
9188 __b = (vector signed int)vec_splat(__b, 3);
9189 __b = __builtin_altivec_vsumsws(__a, __b);
9190 return (vector signed int)(0, 0, 0, __b[0]);
9192 return __builtin_altivec_vsumsws(__a, __b);
9198 static vector signed int __attribute__((__always_inline__))
9199 vec_vsumsws(vector signed int __a, vector signed int __b)
9201 #ifdef __LITTLE_ENDIAN__
9202 __b = (vector signed int)vec_splat(__b, 3);
9203 __b = __builtin_altivec_vsumsws(__a, __b);
9204 return (vector signed int)(0, 0, 0, __b[0]);
9206 return __builtin_altivec_vsumsws(__a, __b);
9212 static vector float __attribute__((__always_inline__))
9213 vec_trunc(vector float __a)
9215 return __builtin_altivec_vrfiz(__a);
9220 static vector float __attribute__((__always_inline__))
9221 vec_vrfiz(vector float __a)
9223 return __builtin_altivec_vrfiz(__a);
9228 /* The vector unpack instructions all have a big-endian bias, so for
9229 little endian we must reverse the meanings of "high" and "low." */
9231 static vector short __ATTRS_o_ai
9232 vec_unpackh(vector signed char __a)
9234 #ifdef __LITTLE_ENDIAN__
9235 return __builtin_altivec_vupklsb((vector char)__a);
9237 return __builtin_altivec_vupkhsb((vector char)__a);
9241 static vector bool short __ATTRS_o_ai
9242 vec_unpackh(vector bool char __a)
9244 #ifdef __LITTLE_ENDIAN__
9245 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9247 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9251 static vector int __ATTRS_o_ai
9252 vec_unpackh(vector short __a)
9254 #ifdef __LITTLE_ENDIAN__
9255 return __builtin_altivec_vupklsh(__a);
9257 return __builtin_altivec_vupkhsh(__a);
9261 static vector bool int __ATTRS_o_ai
9262 vec_unpackh(vector bool short __a)
9264 #ifdef __LITTLE_ENDIAN__
9265 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9267 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9271 static vector unsigned int __ATTRS_o_ai
9272 vec_unpackh(vector pixel __a)
9274 #ifdef __LITTLE_ENDIAN__
9275 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9277 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9281 #ifdef __POWER8_VECTOR__
9282 static vector long long __ATTRS_o_ai
9283 vec_unpackh(vector int __a)
9285 #ifdef __LITTLE_ENDIAN__
9286 return __builtin_altivec_vupklsw(__a);
9288 return __builtin_altivec_vupkhsw(__a);
9292 static vector bool long long __ATTRS_o_ai
9293 vec_unpackh(vector bool int __a)
9295 #ifdef __LITTLE_ENDIAN__
9296 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9298 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9305 static vector short __ATTRS_o_ai
9306 vec_vupkhsb(vector signed char __a)
9308 #ifdef __LITTLE_ENDIAN__
9309 return __builtin_altivec_vupklsb((vector char)__a);
9311 return __builtin_altivec_vupkhsb((vector char)__a);
9315 static vector bool short __ATTRS_o_ai
9316 vec_vupkhsb(vector bool char __a)
9318 #ifdef __LITTLE_ENDIAN__
9319 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9321 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9327 static vector int __ATTRS_o_ai
9328 vec_vupkhsh(vector short __a)
9330 #ifdef __LITTLE_ENDIAN__
9331 return __builtin_altivec_vupklsh(__a);
9333 return __builtin_altivec_vupkhsh(__a);
9337 static vector bool int __ATTRS_o_ai
9338 vec_vupkhsh(vector bool short __a)
9340 #ifdef __LITTLE_ENDIAN__
9341 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9343 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9347 static vector unsigned int __ATTRS_o_ai
9348 vec_vupkhsh(vector pixel __a)
9350 #ifdef __LITTLE_ENDIAN__
9351 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9353 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9359 #ifdef __POWER8_VECTOR__
9360 static vector long long __ATTRS_o_ai
9361 vec_vupkhsw(vector int __a)
9363 #ifdef __LITTLE_ENDIAN__
9364 return __builtin_altivec_vupklsw(__a);
9366 return __builtin_altivec_vupkhsw(__a);
9370 static vector bool long long __ATTRS_o_ai
9371 vec_vupkhsw(vector bool int __a)
9373 #ifdef __LITTLE_ENDIAN__
9374 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9376 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9383 static vector short __ATTRS_o_ai
9384 vec_unpackl(vector signed char __a)
9386 #ifdef __LITTLE_ENDIAN__
9387 return __builtin_altivec_vupkhsb((vector char)__a);
9389 return __builtin_altivec_vupklsb((vector char)__a);
9393 static vector bool short __ATTRS_o_ai
9394 vec_unpackl(vector bool char __a)
9396 #ifdef __LITTLE_ENDIAN__
9397 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9399 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9403 static vector int __ATTRS_o_ai
9404 vec_unpackl(vector short __a)
9406 #ifdef __LITTLE_ENDIAN__
9407 return __builtin_altivec_vupkhsh(__a);
9409 return __builtin_altivec_vupklsh(__a);
9413 static vector bool int __ATTRS_o_ai
9414 vec_unpackl(vector bool short __a)
9416 #ifdef __LITTLE_ENDIAN__
9417 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9419 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9423 static vector unsigned int __ATTRS_o_ai
9424 vec_unpackl(vector pixel __a)
9426 #ifdef __LITTLE_ENDIAN__
9427 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9429 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9433 #ifdef __POWER8_VECTOR__
9434 static vector long long __ATTRS_o_ai
9435 vec_unpackl(vector int __a)
9437 #ifdef __LITTLE_ENDIAN__
9438 return __builtin_altivec_vupkhsw(__a);
9440 return __builtin_altivec_vupklsw(__a);
9444 static vector bool long long __ATTRS_o_ai
9445 vec_unpackl(vector bool int __a)
9447 #ifdef __LITTLE_ENDIAN__
9448 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9450 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9457 static vector short __ATTRS_o_ai
9458 vec_vupklsb(vector signed char __a)
9460 #ifdef __LITTLE_ENDIAN__
9461 return __builtin_altivec_vupkhsb((vector char)__a);
9463 return __builtin_altivec_vupklsb((vector char)__a);
9467 static vector bool short __ATTRS_o_ai
9468 vec_vupklsb(vector bool char __a)
9470 #ifdef __LITTLE_ENDIAN__
9471 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9473 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9479 static vector int __ATTRS_o_ai
9480 vec_vupklsh(vector short __a)
9482 #ifdef __LITTLE_ENDIAN__
9483 return __builtin_altivec_vupkhsh(__a);
9485 return __builtin_altivec_vupklsh(__a);
9489 static vector bool int __ATTRS_o_ai
9490 vec_vupklsh(vector bool short __a)
9492 #ifdef __LITTLE_ENDIAN__
9493 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9495 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9499 static vector unsigned int __ATTRS_o_ai
9500 vec_vupklsh(vector pixel __a)
9502 #ifdef __LITTLE_ENDIAN__
9503 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9505 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9511 #ifdef __POWER8_VECTOR__
9512 static vector long long __ATTRS_o_ai
9513 vec_vupklsw(vector int __a)
9515 #ifdef __LITTLE_ENDIAN__
9516 return __builtin_altivec_vupkhsw(__a);
9518 return __builtin_altivec_vupklsw(__a);
9522 static vector bool long long __ATTRS_o_ai
9523 vec_vupklsw(vector bool int __a)
9525 #ifdef __LITTLE_ENDIAN__
9526 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9528 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9537 static vector signed int __ATTRS_o_ai
9538 vec_vsx_ld(int __a, const vector signed int *__b)
9540 return (vector signed int)__builtin_vsx_lxvw4x(__a, __b);
9543 static vector unsigned int __ATTRS_o_ai
9544 vec_vsx_ld(int __a, const vector unsigned int *__b)
9546 return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b);
9549 static vector float __ATTRS_o_ai
9550 vec_vsx_ld(int __a, const vector float *__b)
9552 return (vector float)__builtin_vsx_lxvw4x(__a, __b);
9555 static vector signed long long __ATTRS_o_ai
9556 vec_vsx_ld(int __a, const vector signed long long *__b)
9558 return (vector signed long long)__builtin_vsx_lxvd2x(__a, __b);
9561 static vector unsigned long long __ATTRS_o_ai
9562 vec_vsx_ld(int __a, const vector unsigned long long *__b)
9564 return (vector unsigned long long)__builtin_vsx_lxvd2x(__a, __b);
9567 static vector double __ATTRS_o_ai
9568 vec_vsx_ld(int __a, const vector double *__b)
9570 return (vector double)__builtin_vsx_lxvd2x(__a, __b);
9579 static void __ATTRS_o_ai
9580 vec_vsx_st(vector signed int __a, int __b, vector signed int *__c)
9582 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9585 static void __ATTRS_o_ai
9586 vec_vsx_st(vector unsigned int __a, int __b, vector unsigned int *__c)
9588 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9591 static void __ATTRS_o_ai
9592 vec_vsx_st(vector float __a, int __b, vector float *__c)
9594 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9597 static void __ATTRS_o_ai
9598 vec_vsx_st(vector signed long long __a, int __b, vector signed long long *__c)
9600 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9603 static void __ATTRS_o_ai
9604 vec_vsx_st(vector unsigned long long __a, int __b,
9605 vector unsigned long long *__c)
9607 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9610 static void __ATTRS_o_ai
9611 vec_vsx_st(vector double __a, int __b, vector double *__c)
9613 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9620 #define __builtin_altivec_vxor vec_xor
9622 static vector signed char __ATTRS_o_ai
9623 vec_xor(vector signed char __a, vector signed char __b)
9628 static vector signed char __ATTRS_o_ai
9629 vec_xor(vector bool char __a, vector signed char __b)
9631 return (vector signed char)__a ^ __b;
9634 static vector signed char __ATTRS_o_ai
9635 vec_xor(vector signed char __a, vector bool char __b)
9637 return __a ^ (vector signed char)__b;
9640 static vector unsigned char __ATTRS_o_ai
9641 vec_xor(vector unsigned char __a, vector unsigned char __b)
9646 static vector unsigned char __ATTRS_o_ai
9647 vec_xor(vector bool char __a, vector unsigned char __b)
9649 return (vector unsigned char)__a ^ __b;
9652 static vector unsigned char __ATTRS_o_ai
9653 vec_xor(vector unsigned char __a, vector bool char __b)
9655 return __a ^ (vector unsigned char)__b;
9658 static vector bool char __ATTRS_o_ai
9659 vec_xor(vector bool char __a, vector bool char __b)
9664 static vector short __ATTRS_o_ai
9665 vec_xor(vector short __a, vector short __b)
9670 static vector short __ATTRS_o_ai
9671 vec_xor(vector bool short __a, vector short __b)
9673 return (vector short)__a ^ __b;
9676 static vector short __ATTRS_o_ai
9677 vec_xor(vector short __a, vector bool short __b)
9679 return __a ^ (vector short)__b;
9682 static vector unsigned short __ATTRS_o_ai
9683 vec_xor(vector unsigned short __a, vector unsigned short __b)
9688 static vector unsigned short __ATTRS_o_ai
9689 vec_xor(vector bool short __a, vector unsigned short __b)
9691 return (vector unsigned short)__a ^ __b;
9694 static vector unsigned short __ATTRS_o_ai
9695 vec_xor(vector unsigned short __a, vector bool short __b)
9697 return __a ^ (vector unsigned short)__b;
9700 static vector bool short __ATTRS_o_ai
9701 vec_xor(vector bool short __a, vector bool short __b)
9706 static vector int __ATTRS_o_ai
9707 vec_xor(vector int __a, vector int __b)
9712 static vector int __ATTRS_o_ai
9713 vec_xor(vector bool int __a, vector int __b)
9715 return (vector int)__a ^ __b;
9718 static vector int __ATTRS_o_ai
9719 vec_xor(vector int __a, vector bool int __b)
9721 return __a ^ (vector int)__b;
9724 static vector unsigned int __ATTRS_o_ai
9725 vec_xor(vector unsigned int __a, vector unsigned int __b)
9730 static vector unsigned int __ATTRS_o_ai
9731 vec_xor(vector bool int __a, vector unsigned int __b)
9733 return (vector unsigned int)__a ^ __b;
9736 static vector unsigned int __ATTRS_o_ai
9737 vec_xor(vector unsigned int __a, vector bool int __b)
9739 return __a ^ (vector unsigned int)__b;
9742 static vector bool int __ATTRS_o_ai
9743 vec_xor(vector bool int __a, vector bool int __b)
9748 static vector float __ATTRS_o_ai
9749 vec_xor(vector float __a, vector float __b)
9751 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9752 return (vector float)__res;
9755 static vector float __ATTRS_o_ai
9756 vec_xor(vector bool int __a, vector float __b)
9758 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9759 return (vector float)__res;
9762 static vector float __ATTRS_o_ai
9763 vec_xor(vector float __a, vector bool int __b)
9765 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9766 return (vector float)__res;
9771 static vector signed char __ATTRS_o_ai
9772 vec_vxor(vector signed char __a, vector signed char __b)
9777 static vector signed char __ATTRS_o_ai
9778 vec_vxor(vector bool char __a, vector signed char __b)
9780 return (vector signed char)__a ^ __b;
9783 static vector signed char __ATTRS_o_ai
9784 vec_vxor(vector signed char __a, vector bool char __b)
9786 return __a ^ (vector signed char)__b;
9789 static vector unsigned char __ATTRS_o_ai
9790 vec_vxor(vector unsigned char __a, vector unsigned char __b)
9795 static vector unsigned char __ATTRS_o_ai
9796 vec_vxor(vector bool char __a, vector unsigned char __b)
9798 return (vector unsigned char)__a ^ __b;
9801 static vector unsigned char __ATTRS_o_ai
9802 vec_vxor(vector unsigned char __a, vector bool char __b)
9804 return __a ^ (vector unsigned char)__b;
9807 static vector bool char __ATTRS_o_ai
9808 vec_vxor(vector bool char __a, vector bool char __b)
9813 static vector short __ATTRS_o_ai
9814 vec_vxor(vector short __a, vector short __b)
9819 static vector short __ATTRS_o_ai
9820 vec_vxor(vector bool short __a, vector short __b)
9822 return (vector short)__a ^ __b;
9825 static vector short __ATTRS_o_ai
9826 vec_vxor(vector short __a, vector bool short __b)
9828 return __a ^ (vector short)__b;
9831 static vector unsigned short __ATTRS_o_ai
9832 vec_vxor(vector unsigned short __a, vector unsigned short __b)
9837 static vector unsigned short __ATTRS_o_ai
9838 vec_vxor(vector bool short __a, vector unsigned short __b)
9840 return (vector unsigned short)__a ^ __b;
9843 static vector unsigned short __ATTRS_o_ai
9844 vec_vxor(vector unsigned short __a, vector bool short __b)
9846 return __a ^ (vector unsigned short)__b;
9849 static vector bool short __ATTRS_o_ai
9850 vec_vxor(vector bool short __a, vector bool short __b)
9855 static vector int __ATTRS_o_ai
9856 vec_vxor(vector int __a, vector int __b)
9861 static vector int __ATTRS_o_ai
9862 vec_vxor(vector bool int __a, vector int __b)
9864 return (vector int)__a ^ __b;
9867 static vector int __ATTRS_o_ai
9868 vec_vxor(vector int __a, vector bool int __b)
9870 return __a ^ (vector int)__b;
9873 static vector unsigned int __ATTRS_o_ai
9874 vec_vxor(vector unsigned int __a, vector unsigned int __b)
9879 static vector unsigned int __ATTRS_o_ai
9880 vec_vxor(vector bool int __a, vector unsigned int __b)
9882 return (vector unsigned int)__a ^ __b;
9885 static vector unsigned int __ATTRS_o_ai
9886 vec_vxor(vector unsigned int __a, vector bool int __b)
9888 return __a ^ (vector unsigned int)__b;
9891 static vector bool int __ATTRS_o_ai
9892 vec_vxor(vector bool int __a, vector bool int __b)
9897 static vector float __ATTRS_o_ai
9898 vec_vxor(vector float __a, vector float __b)
9900 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9901 return (vector float)__res;
9904 static vector float __ATTRS_o_ai
9905 vec_vxor(vector bool int __a, vector float __b)
9907 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9908 return (vector float)__res;
9911 static vector float __ATTRS_o_ai
9912 vec_vxor(vector float __a, vector bool int __b)
9914 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9915 return (vector float)__res;
9918 /* ------------------------ extensions for CBEA ----------------------------- */
9922 static signed char __ATTRS_o_ai
9923 vec_extract(vector signed char __a, int __b)
9928 static unsigned char __ATTRS_o_ai
9929 vec_extract(vector unsigned char __a, int __b)
9934 static short __ATTRS_o_ai
9935 vec_extract(vector short __a, int __b)
9940 static unsigned short __ATTRS_o_ai
9941 vec_extract(vector unsigned short __a, int __b)
9946 static int __ATTRS_o_ai
9947 vec_extract(vector int __a, int __b)
9952 static unsigned int __ATTRS_o_ai
9953 vec_extract(vector unsigned int __a, int __b)
9958 static float __ATTRS_o_ai
9959 vec_extract(vector float __a, int __b)
9966 static vector signed char __ATTRS_o_ai
9967 vec_insert(signed char __a, vector signed char __b, int __c)
9973 static vector unsigned char __ATTRS_o_ai
9974 vec_insert(unsigned char __a, vector unsigned char __b, int __c)
9980 static vector short __ATTRS_o_ai
9981 vec_insert(short __a, vector short __b, int __c)
9987 static vector unsigned short __ATTRS_o_ai
9988 vec_insert(unsigned short __a, vector unsigned short __b, int __c)
9994 static vector int __ATTRS_o_ai
9995 vec_insert(int __a, vector int __b, int __c)
10001 static vector unsigned int __ATTRS_o_ai
10002 vec_insert(unsigned int __a, vector unsigned int __b, int __c)
10008 static vector float __ATTRS_o_ai
10009 vec_insert(float __a, vector float __b, int __c)
10017 static vector signed char __ATTRS_o_ai
10018 vec_lvlx(int __a, const signed char *__b)
10020 return vec_perm(vec_ld(__a, __b),
10021 (vector signed char)(0),
10022 vec_lvsl(__a, __b));
10025 static vector signed char __ATTRS_o_ai
10026 vec_lvlx(int __a, const vector signed char *__b)
10028 return vec_perm(vec_ld(__a, __b),
10029 (vector signed char)(0),
10030 vec_lvsl(__a, (unsigned char *)__b));
10033 static vector unsigned char __ATTRS_o_ai
10034 vec_lvlx(int __a, const unsigned char *__b)
10036 return vec_perm(vec_ld(__a, __b),
10037 (vector unsigned char)(0),
10038 vec_lvsl(__a, __b));
10041 static vector unsigned char __ATTRS_o_ai
10042 vec_lvlx(int __a, const vector unsigned char *__b)
10044 return vec_perm(vec_ld(__a, __b),
10045 (vector unsigned char)(0),
10046 vec_lvsl(__a, (unsigned char *)__b));
10049 static vector bool char __ATTRS_o_ai
10050 vec_lvlx(int __a, const vector bool char *__b)
10052 return vec_perm(vec_ld(__a, __b),
10053 (vector bool char)(0),
10054 vec_lvsl(__a, (unsigned char *)__b));
10057 static vector short __ATTRS_o_ai
10058 vec_lvlx(int __a, const short *__b)
10060 return vec_perm(vec_ld(__a, __b),
10062 vec_lvsl(__a, __b));
10065 static vector short __ATTRS_o_ai
10066 vec_lvlx(int __a, const vector short *__b)
10068 return vec_perm(vec_ld(__a, __b),
10070 vec_lvsl(__a, (unsigned char *)__b));
10073 static vector unsigned short __ATTRS_o_ai
10074 vec_lvlx(int __a, const unsigned short *__b)
10076 return vec_perm(vec_ld(__a, __b),
10077 (vector unsigned short)(0),
10078 vec_lvsl(__a, __b));
10081 static vector unsigned short __ATTRS_o_ai
10082 vec_lvlx(int __a, const vector unsigned short *__b)
10084 return vec_perm(vec_ld(__a, __b),
10085 (vector unsigned short)(0),
10086 vec_lvsl(__a, (unsigned char *)__b));
10089 static vector bool short __ATTRS_o_ai
10090 vec_lvlx(int __a, const vector bool short *__b)
10092 return vec_perm(vec_ld(__a, __b),
10093 (vector bool short)(0),
10094 vec_lvsl(__a, (unsigned char *)__b));
10097 static vector pixel __ATTRS_o_ai
10098 vec_lvlx(int __a, const vector pixel *__b)
10100 return vec_perm(vec_ld(__a, __b),
10102 vec_lvsl(__a, (unsigned char *)__b));
10105 static vector int __ATTRS_o_ai
10106 vec_lvlx(int __a, const int *__b)
10108 return vec_perm(vec_ld(__a, __b),
10110 vec_lvsl(__a, __b));
10113 static vector int __ATTRS_o_ai
10114 vec_lvlx(int __a, const vector int *__b)
10116 return vec_perm(vec_ld(__a, __b),
10118 vec_lvsl(__a, (unsigned char *)__b));
10121 static vector unsigned int __ATTRS_o_ai
10122 vec_lvlx(int __a, const unsigned int *__b)
10124 return vec_perm(vec_ld(__a, __b),
10125 (vector unsigned int)(0),
10126 vec_lvsl(__a, __b));
10129 static vector unsigned int __ATTRS_o_ai
10130 vec_lvlx(int __a, const vector unsigned int *__b)
10132 return vec_perm(vec_ld(__a, __b),
10133 (vector unsigned int)(0),
10134 vec_lvsl(__a, (unsigned char *)__b));
10137 static vector bool int __ATTRS_o_ai
10138 vec_lvlx(int __a, const vector bool int *__b)
10140 return vec_perm(vec_ld(__a, __b),
10141 (vector bool int)(0),
10142 vec_lvsl(__a, (unsigned char *)__b));
10145 static vector float __ATTRS_o_ai
10146 vec_lvlx(int __a, const float *__b)
10148 return vec_perm(vec_ld(__a, __b),
10150 vec_lvsl(__a, __b));
10153 static vector float __ATTRS_o_ai
10154 vec_lvlx(int __a, const vector float *__b)
10156 return vec_perm(vec_ld(__a, __b),
10158 vec_lvsl(__a, (unsigned char *)__b));
10163 static vector signed char __ATTRS_o_ai
10164 vec_lvlxl(int __a, const signed char *__b)
10166 return vec_perm(vec_ldl(__a, __b),
10167 (vector signed char)(0),
10168 vec_lvsl(__a, __b));
10171 static vector signed char __ATTRS_o_ai
10172 vec_lvlxl(int __a, const vector signed char *__b)
10174 return vec_perm(vec_ldl(__a, __b),
10175 (vector signed char)(0),
10176 vec_lvsl(__a, (unsigned char *)__b));
10179 static vector unsigned char __ATTRS_o_ai
10180 vec_lvlxl(int __a, const unsigned char *__b)
10182 return vec_perm(vec_ldl(__a, __b),
10183 (vector unsigned char)(0),
10184 vec_lvsl(__a, __b));
10187 static vector unsigned char __ATTRS_o_ai
10188 vec_lvlxl(int __a, const vector unsigned char *__b)
10190 return vec_perm(vec_ldl(__a, __b),
10191 (vector unsigned char)(0),
10192 vec_lvsl(__a, (unsigned char *)__b));
10195 static vector bool char __ATTRS_o_ai
10196 vec_lvlxl(int __a, const vector bool char *__b)
10198 return vec_perm(vec_ldl(__a, __b),
10199 (vector bool char)(0),
10200 vec_lvsl(__a, (unsigned char *)__b));
10203 static vector short __ATTRS_o_ai
10204 vec_lvlxl(int __a, const short *__b)
10206 return vec_perm(vec_ldl(__a, __b),
10208 vec_lvsl(__a, __b));
10211 static vector short __ATTRS_o_ai
10212 vec_lvlxl(int __a, const vector short *__b)
10214 return vec_perm(vec_ldl(__a, __b),
10216 vec_lvsl(__a, (unsigned char *)__b));
10219 static vector unsigned short __ATTRS_o_ai
10220 vec_lvlxl(int __a, const unsigned short *__b)
10222 return vec_perm(vec_ldl(__a, __b),
10223 (vector unsigned short)(0),
10224 vec_lvsl(__a, __b));
10227 static vector unsigned short __ATTRS_o_ai
10228 vec_lvlxl(int __a, const vector unsigned short *__b)
10230 return vec_perm(vec_ldl(__a, __b),
10231 (vector unsigned short)(0),
10232 vec_lvsl(__a, (unsigned char *)__b));
10235 static vector bool short __ATTRS_o_ai
10236 vec_lvlxl(int __a, const vector bool short *__b)
10238 return vec_perm(vec_ldl(__a, __b),
10239 (vector bool short)(0),
10240 vec_lvsl(__a, (unsigned char *)__b));
10243 static vector pixel __ATTRS_o_ai
10244 vec_lvlxl(int __a, const vector pixel *__b)
10246 return vec_perm(vec_ldl(__a, __b),
10248 vec_lvsl(__a, (unsigned char *)__b));
10251 static vector int __ATTRS_o_ai
10252 vec_lvlxl(int __a, const int *__b)
10254 return vec_perm(vec_ldl(__a, __b),
10256 vec_lvsl(__a, __b));
10259 static vector int __ATTRS_o_ai
10260 vec_lvlxl(int __a, const vector int *__b)
10262 return vec_perm(vec_ldl(__a, __b),
10264 vec_lvsl(__a, (unsigned char *)__b));
10267 static vector unsigned int __ATTRS_o_ai
10268 vec_lvlxl(int __a, const unsigned int *__b)
10270 return vec_perm(vec_ldl(__a, __b),
10271 (vector unsigned int)(0),
10272 vec_lvsl(__a, __b));
10275 static vector unsigned int __ATTRS_o_ai
10276 vec_lvlxl(int __a, const vector unsigned int *__b)
10278 return vec_perm(vec_ldl(__a, __b),
10279 (vector unsigned int)(0),
10280 vec_lvsl(__a, (unsigned char *)__b));
10283 static vector bool int __ATTRS_o_ai
10284 vec_lvlxl(int __a, const vector bool int *__b)
10286 return vec_perm(vec_ldl(__a, __b),
10287 (vector bool int)(0),
10288 vec_lvsl(__a, (unsigned char *)__b));
10291 static vector float __ATTRS_o_ai
10292 vec_lvlxl(int __a, const float *__b)
10294 return vec_perm(vec_ldl(__a, __b),
10296 vec_lvsl(__a, __b));
10299 static vector float __ATTRS_o_ai
10300 vec_lvlxl(int __a, vector float *__b)
10302 return vec_perm(vec_ldl(__a, __b),
10304 vec_lvsl(__a, (unsigned char *)__b));
10309 static vector signed char __ATTRS_o_ai
10310 vec_lvrx(int __a, const signed char *__b)
10312 return vec_perm((vector signed char)(0),
10314 vec_lvsl(__a, __b));
10317 static vector signed char __ATTRS_o_ai
10318 vec_lvrx(int __a, const vector signed char *__b)
10320 return vec_perm((vector signed char)(0),
10322 vec_lvsl(__a, (unsigned char *)__b));
10325 static vector unsigned char __ATTRS_o_ai
10326 vec_lvrx(int __a, const unsigned char *__b)
10328 return vec_perm((vector unsigned char)(0),
10330 vec_lvsl(__a, __b));
10333 static vector unsigned char __ATTRS_o_ai
10334 vec_lvrx(int __a, const vector unsigned char *__b)
10336 return vec_perm((vector unsigned char)(0),
10338 vec_lvsl(__a, (unsigned char *)__b));
10341 static vector bool char __ATTRS_o_ai
10342 vec_lvrx(int __a, const vector bool char *__b)
10344 return vec_perm((vector bool char)(0),
10346 vec_lvsl(__a, (unsigned char *)__b));
10349 static vector short __ATTRS_o_ai
10350 vec_lvrx(int __a, const short *__b)
10352 return vec_perm((vector short)(0),
10354 vec_lvsl(__a, __b));
10357 static vector short __ATTRS_o_ai
10358 vec_lvrx(int __a, const vector short *__b)
10360 return vec_perm((vector short)(0),
10362 vec_lvsl(__a, (unsigned char *)__b));
10365 static vector unsigned short __ATTRS_o_ai
10366 vec_lvrx(int __a, const unsigned short *__b)
10368 return vec_perm((vector unsigned short)(0),
10370 vec_lvsl(__a, __b));
10373 static vector unsigned short __ATTRS_o_ai
10374 vec_lvrx(int __a, const vector unsigned short *__b)
10376 return vec_perm((vector unsigned short)(0),
10378 vec_lvsl(__a, (unsigned char *)__b));
10381 static vector bool short __ATTRS_o_ai
10382 vec_lvrx(int __a, const vector bool short *__b)
10384 return vec_perm((vector bool short)(0),
10386 vec_lvsl(__a, (unsigned char *)__b));
10389 static vector pixel __ATTRS_o_ai
10390 vec_lvrx(int __a, const vector pixel *__b)
10392 return vec_perm((vector pixel)(0),
10394 vec_lvsl(__a, (unsigned char *)__b));
10397 static vector int __ATTRS_o_ai
10398 vec_lvrx(int __a, const int *__b)
10400 return vec_perm((vector int)(0),
10402 vec_lvsl(__a, __b));
10405 static vector int __ATTRS_o_ai
10406 vec_lvrx(int __a, const vector int *__b)
10408 return vec_perm((vector int)(0),
10410 vec_lvsl(__a, (unsigned char *)__b));
10413 static vector unsigned int __ATTRS_o_ai
10414 vec_lvrx(int __a, const unsigned int *__b)
10416 return vec_perm((vector unsigned int)(0),
10418 vec_lvsl(__a, __b));
10421 static vector unsigned int __ATTRS_o_ai
10422 vec_lvrx(int __a, const vector unsigned int *__b)
10424 return vec_perm((vector unsigned int)(0),
10426 vec_lvsl(__a, (unsigned char *)__b));
10429 static vector bool int __ATTRS_o_ai
10430 vec_lvrx(int __a, const vector bool int *__b)
10432 return vec_perm((vector bool int)(0),
10434 vec_lvsl(__a, (unsigned char *)__b));
10437 static vector float __ATTRS_o_ai
10438 vec_lvrx(int __a, const float *__b)
10440 return vec_perm((vector float)(0),
10442 vec_lvsl(__a, __b));
10445 static vector float __ATTRS_o_ai
10446 vec_lvrx(int __a, const vector float *__b)
10448 return vec_perm((vector float)(0),
10450 vec_lvsl(__a, (unsigned char *)__b));
10455 static vector signed char __ATTRS_o_ai
10456 vec_lvrxl(int __a, const signed char *__b)
10458 return vec_perm((vector signed char)(0),
10460 vec_lvsl(__a, __b));
10463 static vector signed char __ATTRS_o_ai
10464 vec_lvrxl(int __a, const vector signed char *__b)
10466 return vec_perm((vector signed char)(0),
10468 vec_lvsl(__a, (unsigned char *)__b));
10471 static vector unsigned char __ATTRS_o_ai
10472 vec_lvrxl(int __a, const unsigned char *__b)
10474 return vec_perm((vector unsigned char)(0),
10476 vec_lvsl(__a, __b));
10479 static vector unsigned char __ATTRS_o_ai
10480 vec_lvrxl(int __a, const vector unsigned char *__b)
10482 return vec_perm((vector unsigned char)(0),
10484 vec_lvsl(__a, (unsigned char *)__b));
10487 static vector bool char __ATTRS_o_ai
10488 vec_lvrxl(int __a, const vector bool char *__b)
10490 return vec_perm((vector bool char)(0),
10492 vec_lvsl(__a, (unsigned char *)__b));
10495 static vector short __ATTRS_o_ai
10496 vec_lvrxl(int __a, const short *__b)
10498 return vec_perm((vector short)(0),
10500 vec_lvsl(__a, __b));
10503 static vector short __ATTRS_o_ai
10504 vec_lvrxl(int __a, const vector short *__b)
10506 return vec_perm((vector short)(0),
10508 vec_lvsl(__a, (unsigned char *)__b));
10511 static vector unsigned short __ATTRS_o_ai
10512 vec_lvrxl(int __a, const unsigned short *__b)
10514 return vec_perm((vector unsigned short)(0),
10516 vec_lvsl(__a, __b));
10519 static vector unsigned short __ATTRS_o_ai
10520 vec_lvrxl(int __a, const vector unsigned short *__b)
10522 return vec_perm((vector unsigned short)(0),
10524 vec_lvsl(__a, (unsigned char *)__b));
10527 static vector bool short __ATTRS_o_ai
10528 vec_lvrxl(int __a, const vector bool short *__b)
10530 return vec_perm((vector bool short)(0),
10532 vec_lvsl(__a, (unsigned char *)__b));
10535 static vector pixel __ATTRS_o_ai
10536 vec_lvrxl(int __a, const vector pixel *__b)
10538 return vec_perm((vector pixel)(0),
10540 vec_lvsl(__a, (unsigned char *)__b));
10543 static vector int __ATTRS_o_ai
10544 vec_lvrxl(int __a, const int *__b)
10546 return vec_perm((vector int)(0),
10548 vec_lvsl(__a, __b));
10551 static vector int __ATTRS_o_ai
10552 vec_lvrxl(int __a, const vector int *__b)
10554 return vec_perm((vector int)(0),
10556 vec_lvsl(__a, (unsigned char *)__b));
10559 static vector unsigned int __ATTRS_o_ai
10560 vec_lvrxl(int __a, const unsigned int *__b)
10562 return vec_perm((vector unsigned int)(0),
10564 vec_lvsl(__a, __b));
10567 static vector unsigned int __ATTRS_o_ai
10568 vec_lvrxl(int __a, const vector unsigned int *__b)
10570 return vec_perm((vector unsigned int)(0),
10572 vec_lvsl(__a, (unsigned char *)__b));
10575 static vector bool int __ATTRS_o_ai
10576 vec_lvrxl(int __a, const vector bool int *__b)
10578 return vec_perm((vector bool int)(0),
10580 vec_lvsl(__a, (unsigned char *)__b));
10583 static vector float __ATTRS_o_ai
10584 vec_lvrxl(int __a, const float *__b)
10586 return vec_perm((vector float)(0),
10588 vec_lvsl(__a, __b));
10591 static vector float __ATTRS_o_ai
10592 vec_lvrxl(int __a, const vector float *__b)
10594 return vec_perm((vector float)(0),
10596 vec_lvsl(__a, (unsigned char *)__b));
10601 static void __ATTRS_o_ai
10602 vec_stvlx(vector signed char __a, int __b, signed char *__c)
10604 return vec_st(vec_perm(vec_lvrx(__b, __c),
10606 vec_lvsr(__b, __c)),
10610 static void __ATTRS_o_ai
10611 vec_stvlx(vector signed char __a, int __b, vector signed char *__c)
10613 return vec_st(vec_perm(vec_lvrx(__b, __c),
10615 vec_lvsr(__b, (unsigned char *)__c)),
10619 static void __ATTRS_o_ai
10620 vec_stvlx(vector unsigned char __a, int __b, unsigned char *__c)
10622 return vec_st(vec_perm(vec_lvrx(__b, __c),
10624 vec_lvsr(__b, __c)),
10628 static void __ATTRS_o_ai
10629 vec_stvlx(vector unsigned char __a, int __b, vector unsigned char *__c)
10631 return vec_st(vec_perm(vec_lvrx(__b, __c),
10633 vec_lvsr(__b, (unsigned char *)__c)),
10637 static void __ATTRS_o_ai
10638 vec_stvlx(vector bool char __a, int __b, vector bool char *__c)
10640 return vec_st(vec_perm(vec_lvrx(__b, __c),
10642 vec_lvsr(__b, (unsigned char *)__c)),
10646 static void __ATTRS_o_ai
10647 vec_stvlx(vector short __a, int __b, short *__c)
10649 return vec_st(vec_perm(vec_lvrx(__b, __c),
10651 vec_lvsr(__b, __c)),
10655 static void __ATTRS_o_ai
10656 vec_stvlx(vector short __a, int __b, vector short *__c)
10658 return vec_st(vec_perm(vec_lvrx(__b, __c),
10660 vec_lvsr(__b, (unsigned char *)__c)),
10664 static void __ATTRS_o_ai
10665 vec_stvlx(vector unsigned short __a, int __b, unsigned short *__c)
10667 return vec_st(vec_perm(vec_lvrx(__b, __c),
10669 vec_lvsr(__b, __c)),
10673 static void __ATTRS_o_ai
10674 vec_stvlx(vector unsigned short __a, int __b, vector unsigned short *__c)
10676 return vec_st(vec_perm(vec_lvrx(__b, __c),
10678 vec_lvsr(__b, (unsigned char *)__c)),
10682 static void __ATTRS_o_ai
10683 vec_stvlx(vector bool short __a, int __b, vector bool short *__c)
10685 return vec_st(vec_perm(vec_lvrx(__b, __c),
10687 vec_lvsr(__b, (unsigned char *)__c)),
10691 static void __ATTRS_o_ai
10692 vec_stvlx(vector pixel __a, int __b, vector pixel *__c)
10694 return vec_st(vec_perm(vec_lvrx(__b, __c),
10696 vec_lvsr(__b, (unsigned char *)__c)),
10700 static void __ATTRS_o_ai
10701 vec_stvlx(vector int __a, int __b, int *__c)
10703 return vec_st(vec_perm(vec_lvrx(__b, __c),
10705 vec_lvsr(__b, __c)),
10709 static void __ATTRS_o_ai
10710 vec_stvlx(vector int __a, int __b, vector int *__c)
10712 return vec_st(vec_perm(vec_lvrx(__b, __c),
10714 vec_lvsr(__b, (unsigned char *)__c)),
10718 static void __ATTRS_o_ai
10719 vec_stvlx(vector unsigned int __a, int __b, unsigned int *__c)
10721 return vec_st(vec_perm(vec_lvrx(__b, __c),
10723 vec_lvsr(__b, __c)),
10727 static void __ATTRS_o_ai
10728 vec_stvlx(vector unsigned int __a, int __b, vector unsigned int *__c)
10730 return vec_st(vec_perm(vec_lvrx(__b, __c),
10732 vec_lvsr(__b, (unsigned char *)__c)),
10736 static void __ATTRS_o_ai
10737 vec_stvlx(vector bool int __a, int __b, vector bool int *__c)
10739 return vec_st(vec_perm(vec_lvrx(__b, __c),
10741 vec_lvsr(__b, (unsigned char *)__c)),
10745 static void __ATTRS_o_ai
10746 vec_stvlx(vector float __a, int __b, vector float *__c)
10748 return vec_st(vec_perm(vec_lvrx(__b, __c),
10750 vec_lvsr(__b, (unsigned char *)__c)),
10756 static void __ATTRS_o_ai
10757 vec_stvlxl(vector signed char __a, int __b, signed char *__c)
10759 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10761 vec_lvsr(__b, __c)),
10765 static void __ATTRS_o_ai
10766 vec_stvlxl(vector signed char __a, int __b, vector signed char *__c)
10768 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10770 vec_lvsr(__b, (unsigned char *)__c)),
10774 static void __ATTRS_o_ai
10775 vec_stvlxl(vector unsigned char __a, int __b, unsigned char *__c)
10777 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10779 vec_lvsr(__b, __c)),
10783 static void __ATTRS_o_ai
10784 vec_stvlxl(vector unsigned char __a, int __b, vector unsigned char *__c)
10786 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10788 vec_lvsr(__b, (unsigned char *)__c)),
10792 static void __ATTRS_o_ai
10793 vec_stvlxl(vector bool char __a, int __b, vector bool char *__c)
10795 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10797 vec_lvsr(__b, (unsigned char *)__c)),
10801 static void __ATTRS_o_ai
10802 vec_stvlxl(vector short __a, int __b, short *__c)
10804 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10806 vec_lvsr(__b, __c)),
10810 static void __ATTRS_o_ai
10811 vec_stvlxl(vector short __a, int __b, vector short *__c)
10813 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10815 vec_lvsr(__b, (unsigned char *)__c)),
10819 static void __ATTRS_o_ai
10820 vec_stvlxl(vector unsigned short __a, int __b, unsigned short *__c)
10822 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10824 vec_lvsr(__b, __c)),
10828 static void __ATTRS_o_ai
10829 vec_stvlxl(vector unsigned short __a, int __b, vector unsigned short *__c)
10831 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10833 vec_lvsr(__b, (unsigned char *)__c)),
10837 static void __ATTRS_o_ai
10838 vec_stvlxl(vector bool short __a, int __b, vector bool short *__c)
10840 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10842 vec_lvsr(__b, (unsigned char *)__c)),
10846 static void __ATTRS_o_ai
10847 vec_stvlxl(vector pixel __a, int __b, vector pixel *__c)
10849 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10851 vec_lvsr(__b, (unsigned char *)__c)),
10855 static void __ATTRS_o_ai
10856 vec_stvlxl(vector int __a, int __b, int *__c)
10858 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10860 vec_lvsr(__b, __c)),
10864 static void __ATTRS_o_ai
10865 vec_stvlxl(vector int __a, int __b, vector int *__c)
10867 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10869 vec_lvsr(__b, (unsigned char *)__c)),
10873 static void __ATTRS_o_ai
10874 vec_stvlxl(vector unsigned int __a, int __b, unsigned int *__c)
10876 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10878 vec_lvsr(__b, __c)),
10882 static void __ATTRS_o_ai
10883 vec_stvlxl(vector unsigned int __a, int __b, vector unsigned int *__c)
10885 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10887 vec_lvsr(__b, (unsigned char *)__c)),
10891 static void __ATTRS_o_ai
10892 vec_stvlxl(vector bool int __a, int __b, vector bool int *__c)
10894 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10896 vec_lvsr(__b, (unsigned char *)__c)),
10900 static void __ATTRS_o_ai
10901 vec_stvlxl(vector float __a, int __b, vector float *__c)
10903 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10905 vec_lvsr(__b, (unsigned char *)__c)),
10911 static void __ATTRS_o_ai
10912 vec_stvrx(vector signed char __a, int __b, signed char *__c)
10914 return vec_st(vec_perm(__a,
10915 vec_lvlx(__b, __c),
10916 vec_lvsr(__b, __c)),
10920 static void __ATTRS_o_ai
10921 vec_stvrx(vector signed char __a, int __b, vector signed char *__c)
10923 return vec_st(vec_perm(__a,
10924 vec_lvlx(__b, __c),
10925 vec_lvsr(__b, (unsigned char *)__c)),
10929 static void __ATTRS_o_ai
10930 vec_stvrx(vector unsigned char __a, int __b, unsigned char *__c)
10932 return vec_st(vec_perm(__a,
10933 vec_lvlx(__b, __c),
10934 vec_lvsr(__b, __c)),
10938 static void __ATTRS_o_ai
10939 vec_stvrx(vector unsigned char __a, int __b, vector unsigned char *__c)
10941 return vec_st(vec_perm(__a,
10942 vec_lvlx(__b, __c),
10943 vec_lvsr(__b, (unsigned char *)__c)),
10947 static void __ATTRS_o_ai
10948 vec_stvrx(vector bool char __a, int __b, vector bool char *__c)
10950 return vec_st(vec_perm(__a,
10951 vec_lvlx(__b, __c),
10952 vec_lvsr(__b, (unsigned char *)__c)),
10956 static void __ATTRS_o_ai
10957 vec_stvrx(vector short __a, int __b, short *__c)
10959 return vec_st(vec_perm(__a,
10960 vec_lvlx(__b, __c),
10961 vec_lvsr(__b, __c)),
10965 static void __ATTRS_o_ai
10966 vec_stvrx(vector short __a, int __b, vector short *__c)
10968 return vec_st(vec_perm(__a,
10969 vec_lvlx(__b, __c),
10970 vec_lvsr(__b, (unsigned char *)__c)),
10974 static void __ATTRS_o_ai
10975 vec_stvrx(vector unsigned short __a, int __b, unsigned short *__c)
10977 return vec_st(vec_perm(__a,
10978 vec_lvlx(__b, __c),
10979 vec_lvsr(__b, __c)),
10983 static void __ATTRS_o_ai
10984 vec_stvrx(vector unsigned short __a, int __b, vector unsigned short *__c)
10986 return vec_st(vec_perm(__a,
10987 vec_lvlx(__b, __c),
10988 vec_lvsr(__b, (unsigned char *)__c)),
10992 static void __ATTRS_o_ai
10993 vec_stvrx(vector bool short __a, int __b, vector bool short *__c)
10995 return vec_st(vec_perm(__a,
10996 vec_lvlx(__b, __c),
10997 vec_lvsr(__b, (unsigned char *)__c)),
11001 static void __ATTRS_o_ai
11002 vec_stvrx(vector pixel __a, int __b, vector pixel *__c)
11004 return vec_st(vec_perm(__a,
11005 vec_lvlx(__b, __c),
11006 vec_lvsr(__b, (unsigned char *)__c)),
11010 static void __ATTRS_o_ai
11011 vec_stvrx(vector int __a, int __b, int *__c)
11013 return vec_st(vec_perm(__a,
11014 vec_lvlx(__b, __c),
11015 vec_lvsr(__b, __c)),
11019 static void __ATTRS_o_ai
11020 vec_stvrx(vector int __a, int __b, vector int *__c)
11022 return vec_st(vec_perm(__a,
11023 vec_lvlx(__b, __c),
11024 vec_lvsr(__b, (unsigned char *)__c)),
11028 static void __ATTRS_o_ai
11029 vec_stvrx(vector unsigned int __a, int __b, unsigned int *__c)
11031 return vec_st(vec_perm(__a,
11032 vec_lvlx(__b, __c),
11033 vec_lvsr(__b, __c)),
11037 static void __ATTRS_o_ai
11038 vec_stvrx(vector unsigned int __a, int __b, vector unsigned int *__c)
11040 return vec_st(vec_perm(__a,
11041 vec_lvlx(__b, __c),
11042 vec_lvsr(__b, (unsigned char *)__c)),
11046 static void __ATTRS_o_ai
11047 vec_stvrx(vector bool int __a, int __b, vector bool int *__c)
11049 return vec_st(vec_perm(__a,
11050 vec_lvlx(__b, __c),
11051 vec_lvsr(__b, (unsigned char *)__c)),
11055 static void __ATTRS_o_ai
11056 vec_stvrx(vector float __a, int __b, vector float *__c)
11058 return vec_st(vec_perm(__a,
11059 vec_lvlx(__b, __c),
11060 vec_lvsr(__b, (unsigned char *)__c)),
11066 static void __ATTRS_o_ai
11067 vec_stvrxl(vector signed char __a, int __b, signed char *__c)
11069 return vec_stl(vec_perm(__a,
11070 vec_lvlx(__b, __c),
11071 vec_lvsr(__b, __c)),
11075 static void __ATTRS_o_ai
11076 vec_stvrxl(vector signed char __a, int __b, vector signed char *__c)
11078 return vec_stl(vec_perm(__a,
11079 vec_lvlx(__b, __c),
11080 vec_lvsr(__b, (unsigned char *)__c)),
11084 static void __ATTRS_o_ai
11085 vec_stvrxl(vector unsigned char __a, int __b, unsigned char *__c)
11087 return vec_stl(vec_perm(__a,
11088 vec_lvlx(__b, __c),
11089 vec_lvsr(__b, __c)),
11093 static void __ATTRS_o_ai
11094 vec_stvrxl(vector unsigned char __a, int __b, vector unsigned char *__c)
11096 return vec_stl(vec_perm(__a,
11097 vec_lvlx(__b, __c),
11098 vec_lvsr(__b, (unsigned char *)__c)),
11102 static void __ATTRS_o_ai
11103 vec_stvrxl(vector bool char __a, int __b, vector bool char *__c)
11105 return vec_stl(vec_perm(__a,
11106 vec_lvlx(__b, __c),
11107 vec_lvsr(__b, (unsigned char *)__c)),
11111 static void __ATTRS_o_ai
11112 vec_stvrxl(vector short __a, int __b, short *__c)
11114 return vec_stl(vec_perm(__a,
11115 vec_lvlx(__b, __c),
11116 vec_lvsr(__b, __c)),
11120 static void __ATTRS_o_ai
11121 vec_stvrxl(vector short __a, int __b, vector short *__c)
11123 return vec_stl(vec_perm(__a,
11124 vec_lvlx(__b, __c),
11125 vec_lvsr(__b, (unsigned char *)__c)),
11129 static void __ATTRS_o_ai
11130 vec_stvrxl(vector unsigned short __a, int __b, unsigned short *__c)
11132 return vec_stl(vec_perm(__a,
11133 vec_lvlx(__b, __c),
11134 vec_lvsr(__b, __c)),
11138 static void __ATTRS_o_ai
11139 vec_stvrxl(vector unsigned short __a, int __b, vector unsigned short *__c)
11141 return vec_stl(vec_perm(__a,
11142 vec_lvlx(__b, __c),
11143 vec_lvsr(__b, (unsigned char *)__c)),
11147 static void __ATTRS_o_ai
11148 vec_stvrxl(vector bool short __a, int __b, vector bool short *__c)
11150 return vec_stl(vec_perm(__a,
11151 vec_lvlx(__b, __c),
11152 vec_lvsr(__b, (unsigned char *)__c)),
11156 static void __ATTRS_o_ai
11157 vec_stvrxl(vector pixel __a, int __b, vector pixel *__c)
11159 return vec_stl(vec_perm(__a,
11160 vec_lvlx(__b, __c),
11161 vec_lvsr(__b, (unsigned char *)__c)),
11165 static void __ATTRS_o_ai
11166 vec_stvrxl(vector int __a, int __b, int *__c)
11168 return vec_stl(vec_perm(__a,
11169 vec_lvlx(__b, __c),
11170 vec_lvsr(__b, __c)),
11174 static void __ATTRS_o_ai
11175 vec_stvrxl(vector int __a, int __b, vector int *__c)
11177 return vec_stl(vec_perm(__a,
11178 vec_lvlx(__b, __c),
11179 vec_lvsr(__b, (unsigned char *)__c)),
11183 static void __ATTRS_o_ai
11184 vec_stvrxl(vector unsigned int __a, int __b, unsigned int *__c)
11186 return vec_stl(vec_perm(__a,
11187 vec_lvlx(__b, __c),
11188 vec_lvsr(__b, __c)),
11192 static void __ATTRS_o_ai
11193 vec_stvrxl(vector unsigned int __a, int __b, vector unsigned int *__c)
11195 return vec_stl(vec_perm(__a,
11196 vec_lvlx(__b, __c),
11197 vec_lvsr(__b, (unsigned char *)__c)),
11201 static void __ATTRS_o_ai
11202 vec_stvrxl(vector bool int __a, int __b, vector bool int *__c)
11204 return vec_stl(vec_perm(__a,
11205 vec_lvlx(__b, __c),
11206 vec_lvsr(__b, (unsigned char *)__c)),
11210 static void __ATTRS_o_ai
11211 vec_stvrxl(vector float __a, int __b, vector float *__c)
11213 return vec_stl(vec_perm(__a,
11214 vec_lvlx(__b, __c),
11215 vec_lvsr(__b, (unsigned char *)__c)),
11221 static vector signed char __ATTRS_o_ai
11222 vec_promote(signed char __a, int __b)
11224 vector signed char __res = (vector signed char)(0);
11229 static vector unsigned char __ATTRS_o_ai
11230 vec_promote(unsigned char __a, int __b)
11232 vector unsigned char __res = (vector unsigned char)(0);
11237 static vector short __ATTRS_o_ai
11238 vec_promote(short __a, int __b)
11240 vector short __res = (vector short)(0);
11245 static vector unsigned short __ATTRS_o_ai
11246 vec_promote(unsigned short __a, int __b)
11248 vector unsigned short __res = (vector unsigned short)(0);
11253 static vector int __ATTRS_o_ai
11254 vec_promote(int __a, int __b)
11256 vector int __res = (vector int)(0);
11261 static vector unsigned int __ATTRS_o_ai
11262 vec_promote(unsigned int __a, int __b)
11264 vector unsigned int __res = (vector unsigned int)(0);
11269 static vector float __ATTRS_o_ai
11270 vec_promote(float __a, int __b)
11272 vector float __res = (vector float)(0);
11279 static vector signed char __ATTRS_o_ai
11280 vec_splats(signed char __a)
11282 return (vector signed char)(__a);
11285 static vector unsigned char __ATTRS_o_ai
11286 vec_splats(unsigned char __a)
11288 return (vector unsigned char)(__a);
11291 static vector short __ATTRS_o_ai
11292 vec_splats(short __a)
11294 return (vector short)(__a);
11297 static vector unsigned short __ATTRS_o_ai
11298 vec_splats(unsigned short __a)
11300 return (vector unsigned short)(__a);
11303 static vector int __ATTRS_o_ai
11304 vec_splats(int __a)
11306 return (vector int)(__a);
11309 static vector unsigned int __ATTRS_o_ai
11310 vec_splats(unsigned int __a)
11312 return (vector unsigned int)(__a);
11315 static vector float __ATTRS_o_ai
11316 vec_splats(float __a)
11318 return (vector float)(__a);
11321 /* ----------------------------- predicates --------------------------------- */
11325 static int __ATTRS_o_ai
11326 vec_all_eq(vector signed char __a, vector signed char __b)
11328 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
11331 static int __ATTRS_o_ai
11332 vec_all_eq(vector signed char __a, vector bool char __b)
11334 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
11337 static int __ATTRS_o_ai
11338 vec_all_eq(vector unsigned char __a, vector unsigned char __b)
11340 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
11343 static int __ATTRS_o_ai
11344 vec_all_eq(vector unsigned char __a, vector bool char __b)
11346 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
11349 static int __ATTRS_o_ai
11350 vec_all_eq(vector bool char __a, vector signed char __b)
11352 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
11355 static int __ATTRS_o_ai
11356 vec_all_eq(vector bool char __a, vector unsigned char __b)
11358 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
11361 static int __ATTRS_o_ai
11362 vec_all_eq(vector bool char __a, vector bool char __b)
11364 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
11367 static int __ATTRS_o_ai
11368 vec_all_eq(vector short __a, vector short __b)
11370 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, __b);
11373 static int __ATTRS_o_ai
11374 vec_all_eq(vector short __a, vector bool short __b)
11376 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, (vector short)__b);
11379 static int __ATTRS_o_ai
11380 vec_all_eq(vector unsigned short __a, vector unsigned short __b)
11383 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
11386 static int __ATTRS_o_ai
11387 vec_all_eq(vector unsigned short __a, vector bool short __b)
11390 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
11393 static int __ATTRS_o_ai
11394 vec_all_eq(vector bool short __a, vector short __b)
11397 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
11400 static int __ATTRS_o_ai
11401 vec_all_eq(vector bool short __a, vector unsigned short __b)
11404 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
11407 static int __ATTRS_o_ai
11408 vec_all_eq(vector bool short __a, vector bool short __b)
11411 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
11414 static int __ATTRS_o_ai
11415 vec_all_eq(vector pixel __a, vector pixel __b)
11418 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
11421 static int __ATTRS_o_ai
11422 vec_all_eq(vector int __a, vector int __b)
11424 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, __b);
11427 static int __ATTRS_o_ai
11428 vec_all_eq(vector int __a, vector bool int __b)
11430 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, (vector int)__b);
11433 static int __ATTRS_o_ai
11434 vec_all_eq(vector unsigned int __a, vector unsigned int __b)
11436 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
11439 static int __ATTRS_o_ai
11440 vec_all_eq(vector unsigned int __a, vector bool int __b)
11442 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
11445 static int __ATTRS_o_ai
11446 vec_all_eq(vector bool int __a, vector int __b)
11448 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
11451 static int __ATTRS_o_ai
11452 vec_all_eq(vector bool int __a, vector unsigned int __b)
11454 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
11457 static int __ATTRS_o_ai
11458 vec_all_eq(vector bool int __a, vector bool int __b)
11460 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
11463 #ifdef __POWER8_VECTOR__
11464 static int __ATTRS_o_ai
11465 vec_all_eq(vector signed long long __a, vector signed long long __b)
11467 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, __b);
11470 static int __ATTRS_o_ai
11471 vec_all_eq(vector long long __a, vector bool long long __b)
11473 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, (vector long long)__b);
11476 static int __ATTRS_o_ai
11477 vec_all_eq(vector unsigned long long __a, vector unsigned long long __b)
11479 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11480 (vector long long)__b);
11483 static int __ATTRS_o_ai
11484 vec_all_eq(vector unsigned long long __a, vector bool long long __b)
11486 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11487 (vector long long)__b);
11490 static int __ATTRS_o_ai
11491 vec_all_eq(vector bool long long __a, vector long long __b)
11493 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11494 (vector long long)__b);
11497 static int __ATTRS_o_ai
11498 vec_all_eq(vector bool long long __a, vector unsigned long long __b)
11500 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11501 (vector long long)__b);
11504 static int __ATTRS_o_ai
11505 vec_all_eq(vector bool long long __a, vector bool long long __b)
11507 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11508 (vector long long)__b);
11512 static int __ATTRS_o_ai
11513 vec_all_eq(vector float __a, vector float __b)
11515 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __b);
11520 static int __ATTRS_o_ai
11521 vec_all_ge(vector signed char __a, vector signed char __b)
11523 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, __a);
11526 static int __ATTRS_o_ai
11527 vec_all_ge(vector signed char __a, vector bool char __b)
11529 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__b, __a);
11532 static int __ATTRS_o_ai
11533 vec_all_ge(vector unsigned char __a, vector unsigned char __b)
11535 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, __a);
11538 static int __ATTRS_o_ai
11539 vec_all_ge(vector unsigned char __a, vector bool char __b)
11541 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, __a);
11544 static int __ATTRS_o_ai
11545 vec_all_ge(vector bool char __a, vector signed char __b)
11547 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
11548 (vector unsigned char)__b,
11549 (vector unsigned char)__a);
11552 static int __ATTRS_o_ai
11553 vec_all_ge(vector bool char __a, vector unsigned char __b)
11555 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, (vector unsigned char)__a);
11558 static int __ATTRS_o_ai
11559 vec_all_ge(vector bool char __a, vector bool char __b)
11561 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
11562 (vector unsigned char)__b,
11563 (vector unsigned char)__a);
11566 static int __ATTRS_o_ai
11567 vec_all_ge(vector short __a, vector short __b)
11569 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, __a);
11572 static int __ATTRS_o_ai
11573 vec_all_ge(vector short __a, vector bool short __b)
11575 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)__b, __a);
11578 static int __ATTRS_o_ai
11579 vec_all_ge(vector unsigned short __a, vector unsigned short __b)
11581 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, __a);
11584 static int __ATTRS_o_ai
11585 vec_all_ge(vector unsigned short __a, vector bool short __b)
11587 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b, __a);
11590 static int __ATTRS_o_ai
11591 vec_all_ge(vector bool short __a, vector short __b)
11593 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
11594 (vector unsigned short)__b,
11595 (vector unsigned short)__a);
11598 static int __ATTRS_o_ai
11599 vec_all_ge(vector bool short __a, vector unsigned short __b)
11601 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, (vector unsigned short)__a);
11604 static int __ATTRS_o_ai
11605 vec_all_ge(vector bool short __a, vector bool short __b)
11607 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
11608 (vector unsigned short)__b,
11609 (vector unsigned short)__a);
11612 static int __ATTRS_o_ai
11613 vec_all_ge(vector int __a, vector int __b)
11615 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, __a);
11618 static int __ATTRS_o_ai
11619 vec_all_ge(vector int __a, vector bool int __b)
11621 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)__b, __a);
11624 static int __ATTRS_o_ai
11625 vec_all_ge(vector unsigned int __a, vector unsigned int __b)
11627 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, __a);
11630 static int __ATTRS_o_ai
11631 vec_all_ge(vector unsigned int __a, vector bool int __b)
11633 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, __a);
11636 static int __ATTRS_o_ai
11637 vec_all_ge(vector bool int __a, vector int __b)
11639 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
11640 (vector unsigned int)__b,
11641 (vector unsigned int)__a);
11644 static int __ATTRS_o_ai
11645 vec_all_ge(vector bool int __a, vector unsigned int __b)
11647 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, (vector unsigned int)__a);
11650 static int __ATTRS_o_ai
11651 vec_all_ge(vector bool int __a, vector bool int __b)
11653 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
11654 (vector unsigned int)__b,
11655 (vector unsigned int)__a);
11658 #ifdef __POWER8_VECTOR__
11659 static int __ATTRS_o_ai
11660 vec_all_ge(vector signed long long __a, vector signed long long __b)
11662 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b, __a);
11664 static int __ATTRS_o_ai
11665 vec_all_ge(vector signed long long __a, vector bool long long __b)
11667 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector signed long long)__b,
11671 static int __ATTRS_o_ai
11672 vec_all_ge(vector unsigned long long __a, vector unsigned long long __b)
11674 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, __a);
11677 static int __ATTRS_o_ai
11678 vec_all_ge(vector unsigned long long __a, vector bool long long __b)
11680 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
11684 static int __ATTRS_o_ai
11685 vec_all_ge(vector bool long long __a, vector signed long long __b)
11687 return __builtin_altivec_vcmpgtud_p(__CR6_EQ,
11688 (vector unsigned long long)__b,
11689 (vector unsigned long long)__a);
11692 static int __ATTRS_o_ai
11693 vec_all_ge(vector bool long long __a, vector unsigned long long __b)
11695 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b,
11696 (vector unsigned long long)__a);
11699 static int __ATTRS_o_ai
11700 vec_all_ge(vector bool long long __a, vector bool long long __b)
11702 return __builtin_altivec_vcmpgtud_p(__CR6_EQ,
11703 (vector unsigned long long)__b,
11704 (vector unsigned long long)__a);
11708 static int __ATTRS_o_ai
11709 vec_all_ge(vector float __a, vector float __b)
11711 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __a, __b);
11716 static int __ATTRS_o_ai
11717 vec_all_gt(vector signed char __a, vector signed char __b)
11719 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, __b);
11722 static int __ATTRS_o_ai
11723 vec_all_gt(vector signed char __a, vector bool char __b)
11725 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, (vector signed char)__b);
11728 static int __ATTRS_o_ai
11729 vec_all_gt(vector unsigned char __a, vector unsigned char __b)
11731 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, __b);
11734 static int __ATTRS_o_ai
11735 vec_all_gt(vector unsigned char __a, vector bool char __b)
11737 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, (vector unsigned char)__b);
11740 static int __ATTRS_o_ai
11741 vec_all_gt(vector bool char __a, vector signed char __b)
11743 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
11744 (vector unsigned char)__a,
11745 (vector unsigned char)__b);
11748 static int __ATTRS_o_ai
11749 vec_all_gt(vector bool char __a, vector unsigned char __b)
11751 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, __b);
11754 static int __ATTRS_o_ai
11755 vec_all_gt(vector bool char __a, vector bool char __b)
11757 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
11758 (vector unsigned char)__a,
11759 (vector unsigned char)__b);
11762 static int __ATTRS_o_ai
11763 vec_all_gt(vector short __a, vector short __b)
11765 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, __b);
11768 static int __ATTRS_o_ai
11769 vec_all_gt(vector short __a, vector bool short __b)
11771 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, (vector short)__b);
11774 static int __ATTRS_o_ai
11775 vec_all_gt(vector unsigned short __a, vector unsigned short __b)
11777 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, __b);
11780 static int __ATTRS_o_ai
11781 vec_all_gt(vector unsigned short __a, vector bool short __b)
11783 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, (vector unsigned short)__b);
11786 static int __ATTRS_o_ai
11787 vec_all_gt(vector bool short __a, vector short __b)
11789 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11790 (vector unsigned short)__a,
11791 (vector unsigned short)__b);
11794 static int __ATTRS_o_ai
11795 vec_all_gt(vector bool short __a, vector unsigned short __b)
11797 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a, __b);
11800 static int __ATTRS_o_ai
11801 vec_all_gt(vector bool short __a, vector bool short __b)
11803 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11804 (vector unsigned short)__a,
11805 (vector unsigned short)__b);
11808 static int __ATTRS_o_ai
11809 vec_all_gt(vector int __a, vector int __b)
11811 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, __b);
11814 static int __ATTRS_o_ai
11815 vec_all_gt(vector int __a, vector bool int __b)
11817 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, (vector int)__b);
11820 static int __ATTRS_o_ai
11821 vec_all_gt(vector unsigned int __a, vector unsigned int __b)
11823 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, __b);
11826 static int __ATTRS_o_ai
11827 vec_all_gt(vector unsigned int __a, vector bool int __b)
11829 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, (vector unsigned int)__b);
11832 static int __ATTRS_o_ai
11833 vec_all_gt(vector bool int __a, vector int __b)
11835 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11836 (vector unsigned int)__a,
11837 (vector unsigned int)__b);
11840 static int __ATTRS_o_ai
11841 vec_all_gt(vector bool int __a, vector unsigned int __b)
11843 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, __b);
11846 static int __ATTRS_o_ai
11847 vec_all_gt(vector bool int __a, vector bool int __b)
11849 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11850 (vector unsigned int)__a,
11851 (vector unsigned int)__b);
11854 #ifdef __POWER8_VECTOR__
11855 static int __ATTRS_o_ai
11856 vec_all_gt(vector signed long long __a, vector signed long long __b)
11858 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, __b);
11860 static int __ATTRS_o_ai
11861 vec_all_gt(vector signed long long __a, vector bool long long __b)
11863 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a,
11864 (vector signed long long)__b);
11867 static int __ATTRS_o_ai
11868 vec_all_gt(vector unsigned long long __a, vector unsigned long long __b)
11870 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, __b);
11873 static int __ATTRS_o_ai
11874 vec_all_gt(vector unsigned long long __a, vector bool long long __b)
11876 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a,
11877 (vector unsigned long long)__b);
11880 static int __ATTRS_o_ai
11881 vec_all_gt(vector bool long long __a, vector signed long long __b)
11883 return __builtin_altivec_vcmpgtud_p(__CR6_LT,
11884 (vector unsigned long long)__a,
11885 (vector unsigned long long)__b);
11888 static int __ATTRS_o_ai
11889 vec_all_gt(vector bool long long __a, vector unsigned long long __b)
11891 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
11895 static int __ATTRS_o_ai
11896 vec_all_gt(vector bool long long __a, vector bool long long __b)
11898 return __builtin_altivec_vcmpgtud_p(__CR6_LT,
11899 (vector unsigned long long)__a,
11900 (vector unsigned long long)__b);
11904 static int __ATTRS_o_ai
11905 vec_all_gt(vector float __a, vector float __b)
11907 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __a, __b);
11912 static int __attribute__((__always_inline__))
11913 vec_all_in(vector float __a, vector float __b)
11915 return __builtin_altivec_vcmpbfp_p(__CR6_EQ, __a, __b);
11920 static int __ATTRS_o_ai
11921 vec_all_le(vector signed char __a, vector signed char __b)
11923 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, __b);
11926 static int __ATTRS_o_ai
11927 vec_all_le(vector signed char __a, vector bool char __b)
11929 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, (vector signed char)__b);
11932 static int __ATTRS_o_ai
11933 vec_all_le(vector unsigned char __a, vector unsigned char __b)
11935 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, __b);
11938 static int __ATTRS_o_ai
11939 vec_all_le(vector unsigned char __a, vector bool char __b)
11941 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, (vector unsigned char)__b);
11944 static int __ATTRS_o_ai
11945 vec_all_le(vector bool char __a, vector signed char __b)
11947 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
11948 (vector unsigned char)__a,
11949 (vector unsigned char)__b);
11952 static int __ATTRS_o_ai
11953 vec_all_le(vector bool char __a, vector unsigned char __b)
11955 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, __b);
11958 static int __ATTRS_o_ai
11959 vec_all_le(vector bool char __a, vector bool char __b)
11961 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
11962 (vector unsigned char)__a,
11963 (vector unsigned char)__b);
11966 static int __ATTRS_o_ai
11967 vec_all_le(vector short __a, vector short __b)
11969 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, __b);
11972 static int __ATTRS_o_ai
11973 vec_all_le(vector short __a, vector bool short __b)
11975 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, (vector short)__b);
11978 static int __ATTRS_o_ai
11979 vec_all_le(vector unsigned short __a, vector unsigned short __b)
11981 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, __b);
11984 static int __ATTRS_o_ai
11985 vec_all_le(vector unsigned short __a, vector bool short __b)
11987 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, (vector unsigned short)__b);
11990 static int __ATTRS_o_ai
11991 vec_all_le(vector bool short __a, vector short __b)
11993 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
11994 (vector unsigned short)__a,
11995 (vector unsigned short)__b);
11998 static int __ATTRS_o_ai
11999 vec_all_le(vector bool short __a, vector unsigned short __b)
12001 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a, __b);
12004 static int __ATTRS_o_ai
12005 vec_all_le(vector bool short __a, vector bool short __b)
12007 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
12008 (vector unsigned short)__a,
12009 (vector unsigned short)__b);
12012 static int __ATTRS_o_ai
12013 vec_all_le(vector int __a, vector int __b)
12015 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, __b);
12018 static int __ATTRS_o_ai
12019 vec_all_le(vector int __a, vector bool int __b)
12021 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, (vector int)__b);
12024 static int __ATTRS_o_ai
12025 vec_all_le(vector unsigned int __a, vector unsigned int __b)
12027 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, __b);
12030 static int __ATTRS_o_ai
12031 vec_all_le(vector unsigned int __a, vector bool int __b)
12033 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, (vector unsigned int)__b);
12036 static int __ATTRS_o_ai
12037 vec_all_le(vector bool int __a, vector int __b)
12039 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
12040 (vector unsigned int)__a,
12041 (vector unsigned int)__b);
12044 static int __ATTRS_o_ai
12045 vec_all_le(vector bool int __a, vector unsigned int __b)
12047 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, __b);
12050 static int __ATTRS_o_ai
12051 vec_all_le(vector bool int __a, vector bool int __b)
12053 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
12054 (vector unsigned int)__a,
12055 (vector unsigned int)__b);
12058 #ifdef __POWER8_VECTOR__
12059 static int __ATTRS_o_ai
12060 vec_all_le(vector signed long long __a, vector signed long long __b)
12062 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, __b);
12065 static int __ATTRS_o_ai
12066 vec_all_le(vector unsigned long long __a, vector unsigned long long __b)
12068 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, __b);
12071 static int __ATTRS_o_ai
12072 vec_all_le(vector signed long long __a, vector bool long long __b)
12074 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a,
12075 (vector signed long long)__b);
12078 static int __ATTRS_o_ai
12079 vec_all_le(vector unsigned long long __a, vector bool long long __b)
12081 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a,
12082 (vector unsigned long long)__b);
12085 static int __ATTRS_o_ai
12086 vec_all_le(vector bool long long __a, vector signed long long __b)
12088 return __builtin_altivec_vcmpgtud_p(__CR6_EQ,
12089 (vector unsigned long long)__a,
12090 (vector unsigned long long)__b);
12093 static int __ATTRS_o_ai
12094 vec_all_le(vector bool long long __a, vector unsigned long long __b)
12096 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
12100 static int __ATTRS_o_ai
12101 vec_all_le(vector bool long long __a, vector bool long long __b)
12103 return __builtin_altivec_vcmpgtud_p(__CR6_EQ,
12104 (vector unsigned long long)__a,
12105 (vector unsigned long long)__b);
12109 static int __ATTRS_o_ai
12110 vec_all_le(vector float __a, vector float __b)
12112 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __b, __a);
12117 static int __ATTRS_o_ai
12118 vec_all_lt(vector signed char __a, vector signed char __b)
12120 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, __a);
12123 static int __ATTRS_o_ai
12124 vec_all_lt(vector signed char __a, vector bool char __b)
12126 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__b, __a);
12129 static int __ATTRS_o_ai
12130 vec_all_lt(vector unsigned char __a, vector unsigned char __b)
12132 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, __a);
12135 static int __ATTRS_o_ai
12136 vec_all_lt(vector unsigned char __a, vector bool char __b)
12138 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, __a);
12141 static int __ATTRS_o_ai
12142 vec_all_lt(vector bool char __a, vector signed char __b)
12144 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
12145 (vector unsigned char)__b,
12146 (vector unsigned char)__a);
12149 static int __ATTRS_o_ai
12150 vec_all_lt(vector bool char __a, vector unsigned char __b)
12152 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, (vector unsigned char)__a);
12155 static int __ATTRS_o_ai
12156 vec_all_lt(vector bool char __a, vector bool char __b)
12158 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
12159 (vector unsigned char)__b,
12160 (vector unsigned char)__a);
12163 static int __ATTRS_o_ai
12164 vec_all_lt(vector short __a, vector short __b)
12166 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, __a);
12169 static int __ATTRS_o_ai
12170 vec_all_lt(vector short __a, vector bool short __b)
12172 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)__b, __a);
12175 static int __ATTRS_o_ai
12176 vec_all_lt(vector unsigned short __a, vector unsigned short __b)
12178 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, __a);
12181 static int __ATTRS_o_ai
12182 vec_all_lt(vector unsigned short __a, vector bool short __b)
12184 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b, __a);
12187 static int __ATTRS_o_ai
12188 vec_all_lt(vector bool short __a, vector short __b)
12190 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
12191 (vector unsigned short)__b,
12192 (vector unsigned short)__a);
12195 static int __ATTRS_o_ai
12196 vec_all_lt(vector bool short __a, vector unsigned short __b)
12198 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, (vector unsigned short)__a);
12201 static int __ATTRS_o_ai
12202 vec_all_lt(vector bool short __a, vector bool short __b)
12204 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
12205 (vector unsigned short)__b,
12206 (vector unsigned short)__a);
12209 static int __ATTRS_o_ai
12210 vec_all_lt(vector int __a, vector int __b)
12212 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, __a);
12215 static int __ATTRS_o_ai
12216 vec_all_lt(vector int __a, vector bool int __b)
12218 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)__b, __a);
12221 static int __ATTRS_o_ai
12222 vec_all_lt(vector unsigned int __a, vector unsigned int __b)
12224 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, __a);
12227 static int __ATTRS_o_ai
12228 vec_all_lt(vector unsigned int __a, vector bool int __b)
12230 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, __a);
12233 static int __ATTRS_o_ai
12234 vec_all_lt(vector bool int __a, vector int __b)
12236 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
12237 (vector unsigned int)__b,
12238 (vector unsigned int)__a);
12241 static int __ATTRS_o_ai
12242 vec_all_lt(vector bool int __a, vector unsigned int __b)
12244 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, (vector unsigned int)__a);
12247 static int __ATTRS_o_ai
12248 vec_all_lt(vector bool int __a, vector bool int __b)
12250 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
12251 (vector unsigned int)__b,
12252 (vector unsigned int)__a);
12255 #ifdef __POWER8_VECTOR__
12256 static int __ATTRS_o_ai
12257 vec_all_lt(vector signed long long __a, vector signed long long __b)
12259 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, __a);
12262 static int __ATTRS_o_ai
12263 vec_all_lt(vector unsigned long long __a, vector unsigned long long __b)
12265 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, __a);
12268 static int __ATTRS_o_ai
12269 vec_all_lt(vector signed long long __a, vector bool long long __b)
12271 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector signed long long)__b,
12275 static int __ATTRS_o_ai
12276 vec_all_lt(vector unsigned long long __a, vector bool long long __b)
12278 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
12282 static int __ATTRS_o_ai
12283 vec_all_lt(vector bool long long __a, vector signed long long __b)
12285 return __builtin_altivec_vcmpgtud_p(__CR6_LT,
12286 (vector unsigned long long)__b,
12287 (vector unsigned long long)__a);
12290 static int __ATTRS_o_ai
12291 vec_all_lt(vector bool long long __a, vector unsigned long long __b)
12293 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b,
12294 (vector unsigned long long)__a);
12297 static int __ATTRS_o_ai
12298 vec_all_lt(vector bool long long __a, vector bool long long __b)
12300 return __builtin_altivec_vcmpgtud_p(__CR6_LT,
12301 (vector unsigned long long)__b,
12302 (vector unsigned long long)__a);
12306 static int __ATTRS_o_ai
12307 vec_all_lt(vector float __a, vector float __b)
12309 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __b, __a);
12314 static int __attribute__((__always_inline__))
12315 vec_all_nan(vector float __a)
12317 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __a);
12322 static int __ATTRS_o_ai
12323 vec_all_ne(vector signed char __a, vector signed char __b)
12325 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
12328 static int __ATTRS_o_ai
12329 vec_all_ne(vector signed char __a, vector bool char __b)
12331 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
12334 static int __ATTRS_o_ai
12335 vec_all_ne(vector unsigned char __a, vector unsigned char __b)
12337 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
12340 static int __ATTRS_o_ai
12341 vec_all_ne(vector unsigned char __a, vector bool char __b)
12343 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
12346 static int __ATTRS_o_ai
12347 vec_all_ne(vector bool char __a, vector signed char __b)
12349 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
12352 static int __ATTRS_o_ai
12353 vec_all_ne(vector bool char __a, vector unsigned char __b)
12355 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
12358 static int __ATTRS_o_ai
12359 vec_all_ne(vector bool char __a, vector bool char __b)
12361 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
12364 static int __ATTRS_o_ai
12365 vec_all_ne(vector short __a, vector short __b)
12367 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, __b);
12370 static int __ATTRS_o_ai
12371 vec_all_ne(vector short __a, vector bool short __b)
12373 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, (vector short)__b);
12376 static int __ATTRS_o_ai
12377 vec_all_ne(vector unsigned short __a, vector unsigned short __b)
12380 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
12383 static int __ATTRS_o_ai
12384 vec_all_ne(vector unsigned short __a, vector bool short __b)
12387 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
12390 static int __ATTRS_o_ai
12391 vec_all_ne(vector bool short __a, vector short __b)
12394 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
12397 static int __ATTRS_o_ai
12398 vec_all_ne(vector bool short __a, vector unsigned short __b)
12401 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
12404 static int __ATTRS_o_ai
12405 vec_all_ne(vector bool short __a, vector bool short __b)
12408 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
12411 static int __ATTRS_o_ai
12412 vec_all_ne(vector pixel __a, vector pixel __b)
12415 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
12418 static int __ATTRS_o_ai
12419 vec_all_ne(vector int __a, vector int __b)
12421 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, __b);
12424 static int __ATTRS_o_ai
12425 vec_all_ne(vector int __a, vector bool int __b)
12427 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, (vector int)__b);
12430 static int __ATTRS_o_ai
12431 vec_all_ne(vector unsigned int __a, vector unsigned int __b)
12433 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
12436 static int __ATTRS_o_ai
12437 vec_all_ne(vector unsigned int __a, vector bool int __b)
12439 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
12442 static int __ATTRS_o_ai
12443 vec_all_ne(vector bool int __a, vector int __b)
12445 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
12448 static int __ATTRS_o_ai
12449 vec_all_ne(vector bool int __a, vector unsigned int __b)
12451 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
12454 static int __ATTRS_o_ai
12455 vec_all_ne(vector bool int __a, vector bool int __b)
12457 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
12460 #ifdef __POWER8_VECTOR__
12461 static int __ATTRS_o_ai
12462 vec_all_ne(vector signed long long __a, vector signed long long __b)
12464 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, __b);
12467 static int __ATTRS_o_ai
12468 vec_all_ne(vector unsigned long long __a, vector unsigned long long __b)
12470 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a,
12471 (vector long long)__b);
12474 static int __ATTRS_o_ai
12475 vec_all_ne(vector signed long long __a, vector bool long long __b)
12477 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a,
12478 (vector signed long long)__b);
12481 static int __ATTRS_o_ai
12482 vec_all_ne(vector unsigned long long __a, vector bool long long __b)
12484 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12485 (vector signed long long)__b);
12488 static int __ATTRS_o_ai
12489 vec_all_ne(vector bool long long __a, vector signed long long __b)
12491 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12492 (vector signed long long)__b);
12495 static int __ATTRS_o_ai
12496 vec_all_ne(vector bool long long __a, vector unsigned long long __b)
12498 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12499 (vector signed long long)__b);
12502 static int __ATTRS_o_ai
12503 vec_all_ne(vector bool long long __a, vector bool long long __b)
12505 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12506 (vector signed long long)__b);
12510 static int __ATTRS_o_ai
12511 vec_all_ne(vector float __a, vector float __b)
12513 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __b);
12518 static int __attribute__((__always_inline__))
12519 vec_all_nge(vector float __a, vector float __b)
12521 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __a, __b);
12526 static int __attribute__((__always_inline__))
12527 vec_all_ngt(vector float __a, vector float __b)
12529 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __a, __b);
12534 static int __attribute__((__always_inline__))
12535 vec_all_nle(vector float __a, vector float __b)
12537 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __b, __a);
12542 static int __attribute__((__always_inline__))
12543 vec_all_nlt(vector float __a, vector float __b)
12545 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __b, __a);
12548 /* vec_all_numeric */
12550 static int __attribute__((__always_inline__))
12551 vec_all_numeric(vector float __a)
12553 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __a);
12558 static int __ATTRS_o_ai
12559 vec_any_eq(vector signed char __a, vector signed char __b)
12562 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12565 static int __ATTRS_o_ai
12566 vec_any_eq(vector signed char __a, vector bool char __b)
12569 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12572 static int __ATTRS_o_ai
12573 vec_any_eq(vector unsigned char __a, vector unsigned char __b)
12576 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12579 static int __ATTRS_o_ai
12580 vec_any_eq(vector unsigned char __a, vector bool char __b)
12583 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12586 static int __ATTRS_o_ai
12587 vec_any_eq(vector bool char __a, vector signed char __b)
12590 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12593 static int __ATTRS_o_ai
12594 vec_any_eq(vector bool char __a, vector unsigned char __b)
12597 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12600 static int __ATTRS_o_ai
12601 vec_any_eq(vector bool char __a, vector bool char __b)
12604 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12607 static int __ATTRS_o_ai
12608 vec_any_eq(vector short __a, vector short __b)
12610 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, __b);
12613 static int __ATTRS_o_ai
12614 vec_any_eq(vector short __a, vector bool short __b)
12616 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, (vector short)__b);
12619 static int __ATTRS_o_ai
12620 vec_any_eq(vector unsigned short __a, vector unsigned short __b)
12622 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12624 (vector short)__b);
12627 static int __ATTRS_o_ai
12628 vec_any_eq(vector unsigned short __a, vector bool short __b)
12630 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12632 (vector short)__b);
12635 static int __ATTRS_o_ai
12636 vec_any_eq(vector bool short __a, vector short __b)
12638 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12640 (vector short)__b);
12643 static int __ATTRS_o_ai
12644 vec_any_eq(vector bool short __a, vector unsigned short __b)
12646 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12648 (vector short)__b);
12651 static int __ATTRS_o_ai
12652 vec_any_eq(vector bool short __a, vector bool short __b)
12654 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12656 (vector short)__b);
12659 static int __ATTRS_o_ai
12660 vec_any_eq(vector pixel __a, vector pixel __b)
12662 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12664 (vector short)__b);
12667 static int __ATTRS_o_ai
12668 vec_any_eq(vector int __a, vector int __b)
12670 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, __b);
12673 static int __ATTRS_o_ai
12674 vec_any_eq(vector int __a, vector bool int __b)
12676 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, (vector int)__b);
12679 static int __ATTRS_o_ai
12680 vec_any_eq(vector unsigned int __a, vector unsigned int __b)
12683 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
12686 static int __ATTRS_o_ai
12687 vec_any_eq(vector unsigned int __a, vector bool int __b)
12690 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
12693 static int __ATTRS_o_ai
12694 vec_any_eq(vector bool int __a, vector int __b)
12697 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
12700 static int __ATTRS_o_ai
12701 vec_any_eq(vector bool int __a, vector unsigned int __b)
12704 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
12707 static int __ATTRS_o_ai
12708 vec_any_eq(vector bool int __a, vector bool int __b)
12711 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
12714 #ifdef __POWER8_VECTOR__
12715 static int __ATTRS_o_ai
12716 vec_any_eq(vector signed long long __a, vector signed long long __b)
12718 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, __b);
12721 static int __ATTRS_o_ai
12722 vec_any_eq(vector unsigned long long __a, vector unsigned long long __b)
12725 __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a,
12726 (vector long long)__b);
12729 static int __ATTRS_o_ai
12730 vec_any_eq(vector signed long long __a, vector bool long long __b)
12732 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a,
12733 (vector signed long long)__b);
12736 static int __ATTRS_o_ai
12737 vec_any_eq(vector unsigned long long __a, vector bool long long __b)
12740 __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a,
12741 (vector signed long long)__b);
12744 static int __ATTRS_o_ai
12745 vec_any_eq(vector bool long long __a, vector signed long long __b)
12748 __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a,
12749 (vector signed long long)__b);
12752 static int __ATTRS_o_ai
12753 vec_any_eq(vector bool long long __a, vector unsigned long long __b)
12756 __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a,
12757 (vector signed long long)__b);
12760 static int __ATTRS_o_ai
12761 vec_any_eq(vector bool long long __a, vector bool long long __b)
12764 __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a,
12765 (vector signed long long)__b);
12769 static int __ATTRS_o_ai
12770 vec_any_eq(vector float __a, vector float __b)
12772 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __b);
12777 static int __ATTRS_o_ai
12778 vec_any_ge(vector signed char __a, vector signed char __b)
12780 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b, __a);
12783 static int __ATTRS_o_ai
12784 vec_any_ge(vector signed char __a, vector bool char __b)
12786 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b, __a);
12789 static int __ATTRS_o_ai
12790 vec_any_ge(vector unsigned char __a, vector unsigned char __b)
12792 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, __a);
12795 static int __ATTRS_o_ai
12796 vec_any_ge(vector unsigned char __a, vector bool char __b)
12798 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b, __a);
12801 static int __ATTRS_o_ai
12802 vec_any_ge(vector bool char __a, vector signed char __b)
12804 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
12805 (vector unsigned char)__b,
12806 (vector unsigned char)__a);
12809 static int __ATTRS_o_ai
12810 vec_any_ge(vector bool char __a, vector unsigned char __b)
12812 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, (vector unsigned char)__a);
12815 static int __ATTRS_o_ai
12816 vec_any_ge(vector bool char __a, vector bool char __b)
12818 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
12819 (vector unsigned char)__b,
12820 (vector unsigned char)__a);
12823 static int __ATTRS_o_ai
12824 vec_any_ge(vector short __a, vector short __b)
12826 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b, __a);
12829 static int __ATTRS_o_ai
12830 vec_any_ge(vector short __a, vector bool short __b)
12832 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)__b, __a);
12835 static int __ATTRS_o_ai
12836 vec_any_ge(vector unsigned short __a, vector unsigned short __b)
12838 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, __a);
12841 static int __ATTRS_o_ai
12842 vec_any_ge(vector unsigned short __a, vector bool short __b)
12845 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b, __a);
12848 static int __ATTRS_o_ai
12849 vec_any_ge(vector bool short __a, vector short __b)
12851 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
12852 (vector unsigned short)__b,
12853 (vector unsigned short)__a);
12856 static int __ATTRS_o_ai
12857 vec_any_ge(vector bool short __a, vector unsigned short __b)
12860 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, (vector unsigned short)__a);
12863 static int __ATTRS_o_ai
12864 vec_any_ge(vector bool short __a, vector bool short __b)
12866 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
12867 (vector unsigned short)__b,
12868 (vector unsigned short)__a);
12871 static int __ATTRS_o_ai
12872 vec_any_ge(vector int __a, vector int __b)
12874 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b, __a);
12877 static int __ATTRS_o_ai
12878 vec_any_ge(vector int __a, vector bool int __b)
12880 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)__b, __a);
12883 static int __ATTRS_o_ai
12884 vec_any_ge(vector unsigned int __a, vector unsigned int __b)
12886 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, __a);
12889 static int __ATTRS_o_ai
12890 vec_any_ge(vector unsigned int __a, vector bool int __b)
12892 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b, __a);
12895 static int __ATTRS_o_ai
12896 vec_any_ge(vector bool int __a, vector int __b)
12898 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
12899 (vector unsigned int)__b,
12900 (vector unsigned int)__a);
12903 static int __ATTRS_o_ai
12904 vec_any_ge(vector bool int __a, vector unsigned int __b)
12906 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, (vector unsigned int)__a);
12909 static int __ATTRS_o_ai
12910 vec_any_ge(vector bool int __a, vector bool int __b)
12912 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
12913 (vector unsigned int)__b,
12914 (vector unsigned int)__a);
12917 #ifdef __POWER8_VECTOR__
12918 static int __ATTRS_o_ai
12919 vec_any_ge(vector signed long long __a, vector signed long long __b)
12921 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b, __a);
12924 static int __ATTRS_o_ai
12925 vec_any_ge(vector unsigned long long __a, vector unsigned long long __b)
12927 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, __a);
12930 static int __ATTRS_o_ai
12931 vec_any_ge(vector signed long long __a, vector bool long long __b)
12933 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV,
12934 (vector signed long long)__b, __a);
12937 static int __ATTRS_o_ai
12938 vec_any_ge(vector unsigned long long __a, vector bool long long __b)
12940 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12941 (vector unsigned long long)__b, __a);
12944 static int __ATTRS_o_ai
12945 vec_any_ge(vector bool long long __a, vector signed long long __b)
12947 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12948 (vector unsigned long long)__b,
12949 (vector unsigned long long)__a);
12952 static int __ATTRS_o_ai
12953 vec_any_ge(vector bool long long __a, vector unsigned long long __b)
12955 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b,
12956 (vector unsigned long long)__a);
12959 static int __ATTRS_o_ai
12960 vec_any_ge(vector bool long long __a, vector bool long long __b)
12962 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12963 (vector unsigned long long)__b,
12964 (vector unsigned long long)__a);
12968 static int __ATTRS_o_ai
12969 vec_any_ge(vector float __a, vector float __b)
12971 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __a, __b);
12976 static int __ATTRS_o_ai
12977 vec_any_gt(vector signed char __a, vector signed char __b)
12979 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, __b);
12982 static int __ATTRS_o_ai
12983 vec_any_gt(vector signed char __a, vector bool char __b)
12985 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, (vector signed char)__b);
12988 static int __ATTRS_o_ai
12989 vec_any_gt(vector unsigned char __a, vector unsigned char __b)
12991 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, __b);
12994 static int __ATTRS_o_ai
12995 vec_any_gt(vector unsigned char __a, vector bool char __b)
12998 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, (vector unsigned char)__b);
13001 static int __ATTRS_o_ai
13002 vec_any_gt(vector bool char __a, vector signed char __b)
13004 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
13005 (vector unsigned char)__a,
13006 (vector unsigned char)__b);
13009 static int __ATTRS_o_ai
13010 vec_any_gt(vector bool char __a, vector unsigned char __b)
13013 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a, __b);
13016 static int __ATTRS_o_ai
13017 vec_any_gt(vector bool char __a, vector bool char __b)
13019 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
13020 (vector unsigned char)__a,
13021 (vector unsigned char)__b);
13024 static int __ATTRS_o_ai
13025 vec_any_gt(vector short __a, vector short __b)
13027 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, __b);
13030 static int __ATTRS_o_ai
13031 vec_any_gt(vector short __a, vector bool short __b)
13033 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, (vector short)__b);
13036 static int __ATTRS_o_ai
13037 vec_any_gt(vector unsigned short __a, vector unsigned short __b)
13039 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, __b);
13042 static int __ATTRS_o_ai
13043 vec_any_gt(vector unsigned short __a, vector bool short __b)
13046 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, (vector unsigned short)__b);
13049 static int __ATTRS_o_ai
13050 vec_any_gt(vector bool short __a, vector short __b)
13052 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
13053 (vector unsigned short)__a,
13054 (vector unsigned short)__b);
13057 static int __ATTRS_o_ai
13058 vec_any_gt(vector bool short __a, vector unsigned short __b)
13061 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a, __b);
13064 static int __ATTRS_o_ai
13065 vec_any_gt(vector bool short __a, vector bool short __b)
13067 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
13068 (vector unsigned short)__a,
13069 (vector unsigned short)__b);
13072 static int __ATTRS_o_ai
13073 vec_any_gt(vector int __a, vector int __b)
13075 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, __b);
13078 static int __ATTRS_o_ai
13079 vec_any_gt(vector int __a, vector bool int __b)
13081 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, (vector int)__b);
13084 static int __ATTRS_o_ai
13085 vec_any_gt(vector unsigned int __a, vector unsigned int __b)
13087 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, __b);
13090 static int __ATTRS_o_ai
13091 vec_any_gt(vector unsigned int __a, vector bool int __b)
13093 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, (vector unsigned int)__b);
13096 static int __ATTRS_o_ai
13097 vec_any_gt(vector bool int __a, vector int __b)
13099 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
13100 (vector unsigned int)__a,
13101 (vector unsigned int)__b);
13104 static int __ATTRS_o_ai
13105 vec_any_gt(vector bool int __a, vector unsigned int __b)
13107 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a, __b);
13110 static int __ATTRS_o_ai
13111 vec_any_gt(vector bool int __a, vector bool int __b)
13113 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
13114 (vector unsigned int)__a,
13115 (vector unsigned int)__b);
13118 #ifdef __POWER8_VECTOR__
13119 static int __ATTRS_o_ai
13120 vec_any_gt(vector signed long long __a, vector signed long long __b)
13122 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, __b);
13125 static int __ATTRS_o_ai
13126 vec_any_gt(vector unsigned long long __a, vector unsigned long long __b)
13128 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, __b);
13131 static int __ATTRS_o_ai
13132 vec_any_gt(vector signed long long __a, vector bool long long __b)
13134 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a,
13135 (vector signed long long)__b);
13139 static int __ATTRS_o_ai
13140 vec_any_gt(vector unsigned long long __a, vector bool long long __b)
13142 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a,
13143 (vector unsigned long long)__b);
13146 static int __ATTRS_o_ai
13147 vec_any_gt(vector bool long long __a, vector signed long long __b)
13149 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13150 (vector unsigned long long)__a,
13151 (vector unsigned long long)__b);
13154 static int __ATTRS_o_ai
13155 vec_any_gt(vector bool long long __a, vector unsigned long long __b)
13157 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13158 (vector unsigned long long)__a, __b);
13161 static int __ATTRS_o_ai
13162 vec_any_gt(vector bool long long __a, vector bool long long __b)
13164 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13165 (vector unsigned long long)__a,
13166 (vector unsigned long long)__b);
13170 static int __ATTRS_o_ai
13171 vec_any_gt(vector float __a, vector float __b)
13173 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __a, __b);
13178 static int __ATTRS_o_ai
13179 vec_any_le(vector signed char __a, vector signed char __b)
13181 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, __b);
13184 static int __ATTRS_o_ai
13185 vec_any_le(vector signed char __a, vector bool char __b)
13187 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, (vector signed char)__b);
13190 static int __ATTRS_o_ai
13191 vec_any_le(vector unsigned char __a, vector unsigned char __b)
13193 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, __b);
13196 static int __ATTRS_o_ai
13197 vec_any_le(vector unsigned char __a, vector bool char __b)
13200 __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, (vector unsigned char)__b);
13203 static int __ATTRS_o_ai
13204 vec_any_le(vector bool char __a, vector signed char __b)
13206 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
13207 (vector unsigned char)__a,
13208 (vector unsigned char)__b);
13211 static int __ATTRS_o_ai
13212 vec_any_le(vector bool char __a, vector unsigned char __b)
13215 __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a, __b);
13218 static int __ATTRS_o_ai
13219 vec_any_le(vector bool char __a, vector bool char __b)
13221 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
13222 (vector unsigned char)__a,
13223 (vector unsigned char)__b);
13226 static int __ATTRS_o_ai
13227 vec_any_le(vector short __a, vector short __b)
13229 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, __b);
13232 static int __ATTRS_o_ai
13233 vec_any_le(vector short __a, vector bool short __b)
13235 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, (vector short)__b);
13238 static int __ATTRS_o_ai
13239 vec_any_le(vector unsigned short __a, vector unsigned short __b)
13241 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, __b);
13244 static int __ATTRS_o_ai
13245 vec_any_le(vector unsigned short __a, vector bool short __b)
13248 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, (vector unsigned short)__b);
13251 static int __ATTRS_o_ai
13252 vec_any_le(vector bool short __a, vector short __b)
13254 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
13255 (vector unsigned short)__a,
13256 (vector unsigned short)__b);
13259 static int __ATTRS_o_ai
13260 vec_any_le(vector bool short __a, vector unsigned short __b)
13263 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a, __b);
13266 static int __ATTRS_o_ai
13267 vec_any_le(vector bool short __a, vector bool short __b)
13269 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
13270 (vector unsigned short)__a,
13271 (vector unsigned short)__b);
13274 static int __ATTRS_o_ai
13275 vec_any_le(vector int __a, vector int __b)
13277 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, __b);
13280 static int __ATTRS_o_ai
13281 vec_any_le(vector int __a, vector bool int __b)
13283 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, (vector int)__b);
13286 static int __ATTRS_o_ai
13287 vec_any_le(vector unsigned int __a, vector unsigned int __b)
13289 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, __b);
13292 static int __ATTRS_o_ai
13293 vec_any_le(vector unsigned int __a, vector bool int __b)
13295 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, (vector unsigned int)__b);
13298 static int __ATTRS_o_ai
13299 vec_any_le(vector bool int __a, vector int __b)
13301 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
13302 (vector unsigned int)__a,
13303 (vector unsigned int)__b);
13306 static int __ATTRS_o_ai
13307 vec_any_le(vector bool int __a, vector unsigned int __b)
13309 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a, __b);
13312 static int __ATTRS_o_ai
13313 vec_any_le(vector bool int __a, vector bool int __b)
13315 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
13316 (vector unsigned int)__a,
13317 (vector unsigned int)__b);
13320 #ifdef __POWER8_VECTOR__
13321 static int __ATTRS_o_ai
13322 vec_any_le(vector signed long long __a, vector signed long long __b)
13324 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, __b);
13327 static int __ATTRS_o_ai
13328 vec_any_le(vector unsigned long long __a, vector unsigned long long __b)
13330 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, __b);
13333 static int __ATTRS_o_ai
13334 vec_any_le(vector signed long long __a, vector bool long long __b)
13336 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a,
13337 (vector signed long long)__b);
13340 static int __ATTRS_o_ai
13341 vec_any_le(vector unsigned long long __a, vector bool long long __b)
13343 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a,
13344 (vector unsigned long long)__b);
13347 static int __ATTRS_o_ai
13348 vec_any_le(vector bool long long __a, vector signed long long __b)
13350 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
13351 (vector unsigned long long)__a,
13352 (vector unsigned long long)__b);
13355 static int __ATTRS_o_ai
13356 vec_any_le(vector bool long long __a, vector unsigned long long __b)
13358 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
13359 (vector unsigned long long)__a, __b);
13362 static int __ATTRS_o_ai
13363 vec_any_le(vector bool long long __a, vector bool long long __b)
13365 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
13366 (vector unsigned long long)__a,
13367 (vector unsigned long long)__b);
13371 static int __ATTRS_o_ai
13372 vec_any_le(vector float __a, vector float __b)
13374 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __b, __a);
13379 static int __ATTRS_o_ai
13380 vec_any_lt(vector signed char __a, vector signed char __b)
13382 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b, __a);
13385 static int __ATTRS_o_ai
13386 vec_any_lt(vector signed char __a, vector bool char __b)
13388 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b, __a);
13391 static int __ATTRS_o_ai
13392 vec_any_lt(vector unsigned char __a, vector unsigned char __b)
13394 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, __a);
13397 static int __ATTRS_o_ai
13398 vec_any_lt(vector unsigned char __a, vector bool char __b)
13401 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b, __a);
13404 static int __ATTRS_o_ai
13405 vec_any_lt(vector bool char __a, vector signed char __b)
13407 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
13408 (vector unsigned char)__b,
13409 (vector unsigned char)__a);
13412 static int __ATTRS_o_ai
13413 vec_any_lt(vector bool char __a, vector unsigned char __b)
13416 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, (vector unsigned char)__a);
13419 static int __ATTRS_o_ai
13420 vec_any_lt(vector bool char __a, vector bool char __b)
13422 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
13423 (vector unsigned char)__b,
13424 (vector unsigned char)__a);
13427 static int __ATTRS_o_ai
13428 vec_any_lt(vector short __a, vector short __b)
13430 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b, __a);
13433 static int __ATTRS_o_ai
13434 vec_any_lt(vector short __a, vector bool short __b)
13436 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)__b, __a);
13439 static int __ATTRS_o_ai
13440 vec_any_lt(vector unsigned short __a, vector unsigned short __b)
13442 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, __a);
13445 static int __ATTRS_o_ai
13446 vec_any_lt(vector unsigned short __a, vector bool short __b)
13449 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b, __a);
13452 static int __ATTRS_o_ai
13453 vec_any_lt(vector bool short __a, vector short __b)
13455 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
13456 (vector unsigned short)__b,
13457 (vector unsigned short)__a);
13460 static int __ATTRS_o_ai
13461 vec_any_lt(vector bool short __a, vector unsigned short __b)
13464 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, (vector unsigned short)__a);
13467 static int __ATTRS_o_ai
13468 vec_any_lt(vector bool short __a, vector bool short __b)
13470 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
13471 (vector unsigned short)__b,
13472 (vector unsigned short)__a);
13475 static int __ATTRS_o_ai
13476 vec_any_lt(vector int __a, vector int __b)
13478 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b, __a);
13481 static int __ATTRS_o_ai
13482 vec_any_lt(vector int __a, vector bool int __b)
13484 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)__b, __a);
13487 static int __ATTRS_o_ai
13488 vec_any_lt(vector unsigned int __a, vector unsigned int __b)
13490 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, __a);
13493 static int __ATTRS_o_ai
13494 vec_any_lt(vector unsigned int __a, vector bool int __b)
13496 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b, __a);
13499 static int __ATTRS_o_ai
13500 vec_any_lt(vector bool int __a, vector int __b)
13502 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
13503 (vector unsigned int)__b,
13504 (vector unsigned int)__a);
13507 static int __ATTRS_o_ai
13508 vec_any_lt(vector bool int __a, vector unsigned int __b)
13510 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, (vector unsigned int)__a);
13513 static int __ATTRS_o_ai
13514 vec_any_lt(vector bool int __a, vector bool int __b)
13516 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
13517 (vector unsigned int)__b,
13518 (vector unsigned int)__a);
13521 #ifdef __POWER8_VECTOR__
13522 static int __ATTRS_o_ai
13523 vec_any_lt(vector signed long long __a, vector signed long long __b)
13525 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b, __a);
13528 static int __ATTRS_o_ai
13529 vec_any_lt(vector unsigned long long __a, vector unsigned long long __b)
13531 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, __a);
13534 static int __ATTRS_o_ai
13535 vec_any_lt(vector signed long long __a, vector bool long long __b)
13537 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV,
13538 (vector signed long long)__b, __a);
13541 static int __ATTRS_o_ai
13542 vec_any_lt(vector unsigned long long __a, vector bool long long __b)
13544 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13545 (vector unsigned long long)__b, __a);
13548 static int __ATTRS_o_ai
13549 vec_any_lt(vector bool long long __a, vector signed long long __b)
13551 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13552 (vector unsigned long long)__b,
13553 (vector unsigned long long)__a);
13556 static int __ATTRS_o_ai
13557 vec_any_lt(vector bool long long __a, vector unsigned long long __b)
13559 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b,
13560 (vector unsigned long long)__a);
13563 static int __ATTRS_o_ai
13564 vec_any_lt(vector bool long long __a, vector bool long long __b)
13566 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13567 (vector unsigned long long)__b,
13568 (vector unsigned long long)__a);
13572 static int __ATTRS_o_ai
13573 vec_any_lt(vector float __a, vector float __b)
13575 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __b, __a);
13580 static int __attribute__((__always_inline__))
13581 vec_any_nan(vector float __a)
13583 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __a);
13588 static int __ATTRS_o_ai
13589 vec_any_ne(vector signed char __a, vector signed char __b)
13592 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13595 static int __ATTRS_o_ai
13596 vec_any_ne(vector signed char __a, vector bool char __b)
13599 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13602 static int __ATTRS_o_ai
13603 vec_any_ne(vector unsigned char __a, vector unsigned char __b)
13606 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13609 static int __ATTRS_o_ai
13610 vec_any_ne(vector unsigned char __a, vector bool char __b)
13613 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13616 static int __ATTRS_o_ai
13617 vec_any_ne(vector bool char __a, vector signed char __b)
13620 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13623 static int __ATTRS_o_ai
13624 vec_any_ne(vector bool char __a, vector unsigned char __b)
13627 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13630 static int __ATTRS_o_ai
13631 vec_any_ne(vector bool char __a, vector bool char __b)
13634 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13637 static int __ATTRS_o_ai
13638 vec_any_ne(vector short __a, vector short __b)
13640 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, __b);
13643 static int __ATTRS_o_ai
13644 vec_any_ne(vector short __a, vector bool short __b)
13646 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, (vector short)__b);
13649 static int __ATTRS_o_ai
13650 vec_any_ne(vector unsigned short __a, vector unsigned short __b)
13652 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13654 (vector short)__b);
13657 static int __ATTRS_o_ai
13658 vec_any_ne(vector unsigned short __a, vector bool short __b)
13660 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13662 (vector short)__b);
13665 static int __ATTRS_o_ai
13666 vec_any_ne(vector bool short __a, vector short __b)
13668 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13670 (vector short)__b);
13673 static int __ATTRS_o_ai
13674 vec_any_ne(vector bool short __a, vector unsigned short __b)
13676 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13678 (vector short)__b);
13681 static int __ATTRS_o_ai
13682 vec_any_ne(vector bool short __a, vector bool short __b)
13684 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13686 (vector short)__b);
13689 static int __ATTRS_o_ai
13690 vec_any_ne(vector pixel __a, vector pixel __b)
13692 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13694 (vector short)__b);
13697 static int __ATTRS_o_ai
13698 vec_any_ne(vector int __a, vector int __b)
13700 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, __b);
13703 static int __ATTRS_o_ai
13704 vec_any_ne(vector int __a, vector bool int __b)
13706 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, (vector int)__b);
13709 static int __ATTRS_o_ai
13710 vec_any_ne(vector unsigned int __a, vector unsigned int __b)
13713 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
13716 static int __ATTRS_o_ai
13717 vec_any_ne(vector unsigned int __a, vector bool int __b)
13720 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
13723 static int __ATTRS_o_ai
13724 vec_any_ne(vector bool int __a, vector int __b)
13727 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
13730 static int __ATTRS_o_ai
13731 vec_any_ne(vector bool int __a, vector unsigned int __b)
13734 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
13737 static int __ATTRS_o_ai
13738 vec_any_ne(vector bool int __a, vector bool int __b)
13741 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
13744 #ifdef __POWER8_VECTOR__
13745 static int __ATTRS_o_ai
13746 vec_any_ne(vector signed long long __a, vector signed long long __b)
13748 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, __b);
13751 static int __ATTRS_o_ai
13752 vec_any_ne(vector unsigned long long __a, vector unsigned long long __b)
13755 __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a,
13756 (vector long long)__b);
13759 static int __ATTRS_o_ai
13760 vec_any_ne(vector signed long long __a, vector bool long long __b)
13762 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a,
13763 (vector signed long long)__b);
13766 static int __ATTRS_o_ai
13767 vec_any_ne(vector unsigned long long __a, vector bool long long __b)
13770 __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a,
13771 (vector signed long long)__b);
13774 static int __ATTRS_o_ai
13775 vec_any_ne(vector bool long long __a, vector signed long long __b)
13778 __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a,
13779 (vector signed long long)__b);
13782 static int __ATTRS_o_ai
13783 vec_any_ne(vector bool long long __a, vector unsigned long long __b)
13786 __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a,
13787 (vector signed long long)__b);
13790 static int __ATTRS_o_ai
13791 vec_any_ne(vector bool long long __a, vector bool long long __b)
13794 __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a,
13795 (vector signed long long)__b);
13799 static int __ATTRS_o_ai
13800 vec_any_ne(vector float __a, vector float __b)
13802 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __b);
13807 static int __attribute__((__always_inline__))
13808 vec_any_nge(vector float __a, vector float __b)
13810 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __a, __b);
13815 static int __attribute__((__always_inline__))
13816 vec_any_ngt(vector float __a, vector float __b)
13818 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __a, __b);
13823 static int __attribute__((__always_inline__))
13824 vec_any_nle(vector float __a, vector float __b)
13826 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __b, __a);
13831 static int __attribute__((__always_inline__))
13832 vec_any_nlt(vector float __a, vector float __b)
13834 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __b, __a);
13837 /* vec_any_numeric */
13839 static int __attribute__((__always_inline__))
13840 vec_any_numeric(vector float __a)
13842 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __a);
13847 static int __attribute__((__always_inline__))
13848 vec_any_out(vector float __a, vector float __b)
13850 return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, __a, __b);
13853 /* Power 8 Crypto functions
13854 Note: We diverge from the current GCC implementation with regard
13855 to cryptography and related functions as follows:
13856 - Only the SHA and AES instructions and builtins are disabled by -mno-crypto
13857 - The remaining ones are only available on Power8 and up so
13858 require -mpower8-vector
13859 The justification for this is that export requirements require that
13860 Category:Vector.Crypto is optional (i.e. compliant hardware may not provide
13861 support). As a result, we need to be able to turn off support for those.
13862 The remaining ones (currently controlled by -mcrypto for GCC) still
13863 need to be provided on compliant hardware even if Vector.Crypto is not
13865 FIXME: the naming convention for the builtins will be adjusted due
13866 to the inconsistency (__builtin_crypto_ prefix on builtins that cannot be
13867 removed with -mno-crypto). This is under development.
13870 static vector unsigned long long __attribute__((__always_inline__))
13871 __builtin_crypto_vsbox (vector unsigned long long __a)
13873 return __builtin_altivec_crypto_vsbox(__a);
13876 static vector unsigned long long __attribute__((__always_inline__))
13877 __builtin_crypto_vcipher (vector unsigned long long __a,
13878 vector unsigned long long __b)
13880 return __builtin_altivec_crypto_vcipher(__a, __b);
13883 static vector unsigned long long __attribute__((__always_inline__))
13884 __builtin_crypto_vcipherlast (vector unsigned long long __a,
13885 vector unsigned long long __b)
13887 return __builtin_altivec_crypto_vcipherlast(__a, __b);
13890 static vector unsigned long long __attribute__((__always_inline__))
13891 __builtin_crypto_vncipher (vector unsigned long long __a,
13892 vector unsigned long long __b)
13894 return __builtin_altivec_crypto_vncipher(__a, __b);
13897 static vector unsigned long long __attribute__((__always_inline__))
13898 __builtin_crypto_vncipherlast (vector unsigned long long __a,
13899 vector unsigned long long __b)
13901 return __builtin_altivec_crypto_vncipherlast(__a, __b);
13905 #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad
13906 #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw
13909 #ifdef __POWER8_VECTOR__
13910 static vector unsigned char __ATTRS_o_ai
13911 __builtin_crypto_vpermxor (vector unsigned char __a,
13912 vector unsigned char __b,
13913 vector unsigned char __c)
13915 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
13918 static vector unsigned short __ATTRS_o_ai
13919 __builtin_crypto_vpermxor (vector unsigned short __a,
13920 vector unsigned short __b,
13921 vector unsigned short __c)
13923 return (vector unsigned short)
13924 __builtin_altivec_crypto_vpermxor((vector unsigned char) __a,
13925 (vector unsigned char) __b,
13926 (vector unsigned char) __c);
13929 static vector unsigned int __ATTRS_o_ai
13930 __builtin_crypto_vpermxor (vector unsigned int __a,
13931 vector unsigned int __b,
13932 vector unsigned int __c)
13934 return (vector unsigned int)
13935 __builtin_altivec_crypto_vpermxor((vector unsigned char) __a,
13936 (vector unsigned char) __b,
13937 (vector unsigned char) __c);
13940 static vector unsigned long long __ATTRS_o_ai
13941 __builtin_crypto_vpermxor (vector unsigned long long __a,
13942 vector unsigned long long __b,
13943 vector unsigned long long __c)
13945 return (vector unsigned long long)
13946 __builtin_altivec_crypto_vpermxor((vector unsigned char) __a,
13947 (vector unsigned char) __b,
13948 (vector unsigned char) __c);
13951 static vector unsigned char __ATTRS_o_ai
13952 __builtin_crypto_vpmsumb (vector unsigned char __a,
13953 vector unsigned char __b)
13955 return __builtin_altivec_crypto_vpmsumb(__a, __b);
13958 static vector unsigned short __ATTRS_o_ai
13959 __builtin_crypto_vpmsumb (vector unsigned short __a,
13960 vector unsigned short __b)
13962 return __builtin_altivec_crypto_vpmsumh(__a, __b);
13965 static vector unsigned int __ATTRS_o_ai
13966 __builtin_crypto_vpmsumb (vector unsigned int __a,
13967 vector unsigned int __b)
13969 return __builtin_altivec_crypto_vpmsumw(__a, __b);
13972 static vector unsigned long long __ATTRS_o_ai
13973 __builtin_crypto_vpmsumb (vector unsigned long long __a,
13974 vector unsigned long long __b)
13976 return __builtin_altivec_crypto_vpmsumd(__a, __b);
13980 #undef __ATTRS_o_ai
13982 #endif /* __ALTIVEC_H */