1 /*===---- altivec.h - Standard header for type generic math ---------------===*\
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 \*===----------------------------------------------------------------------===*/
27 #error "AltiVec support not enabled"
30 /* Constants for mapping CR6 bits to predicate result. */
33 #define __CR6_EQ_REV 1
35 #define __CR6_LT_REV 3
37 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
39 static vector signed char __ATTRS_o_ai vec_perm(vector signed char __a,
40 vector signed char __b,
41 vector unsigned char __c);
43 static vector unsigned char __ATTRS_o_ai vec_perm(vector unsigned char __a,
44 vector unsigned char __b,
45 vector unsigned char __c);
47 static vector bool char __ATTRS_o_ai vec_perm(vector bool char __a,
49 vector unsigned char __c);
51 static vector short __ATTRS_o_ai vec_perm(vector signed short __a,
52 vector signed short __b,
53 vector unsigned char __c);
55 static vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a,
56 vector unsigned short __b,
57 vector unsigned char __c);
59 static vector bool short __ATTRS_o_ai vec_perm(vector bool short __a,
60 vector bool short __b,
61 vector unsigned char __c);
63 static vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b,
64 vector unsigned char __c);
66 static vector int __ATTRS_o_ai vec_perm(vector signed int __a,
67 vector signed int __b,
68 vector unsigned char __c);
70 static vector unsigned int __ATTRS_o_ai vec_perm(vector unsigned int __a,
71 vector unsigned int __b,
72 vector unsigned char __c);
74 static vector bool int __ATTRS_o_ai vec_perm(vector bool int __a,
76 vector unsigned char __c);
78 static vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b,
79 vector unsigned char __c);
82 static vector long long __ATTRS_o_ai vec_perm(vector signed long long __a,
83 vector signed long long __b,
84 vector unsigned char __c);
86 static vector unsigned long long __ATTRS_o_ai
87 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
88 vector unsigned char __c);
90 static vector bool long long __ATTRS_o_ai
91 vec_perm(vector bool long long __a, vector bool long long __b,
92 vector unsigned char __c);
94 static vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b,
95 vector unsigned char __c);
98 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
99 vector unsigned char __b);
103 #define __builtin_altivec_abs_v16qi vec_abs
104 #define __builtin_altivec_abs_v8hi vec_abs
105 #define __builtin_altivec_abs_v4si vec_abs
107 static vector signed char __ATTRS_o_ai vec_abs(vector signed char __a) {
108 return __builtin_altivec_vmaxsb(__a, -__a);
111 static vector signed short __ATTRS_o_ai vec_abs(vector signed short __a) {
112 return __builtin_altivec_vmaxsh(__a, -__a);
115 static vector signed int __ATTRS_o_ai vec_abs(vector signed int __a) {
116 return __builtin_altivec_vmaxsw(__a, -__a);
119 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
120 static vector signed long long __ATTRS_o_ai
121 vec_abs(vector signed long long __a) {
122 return __builtin_altivec_vmaxsd(__a, -__a);
126 static vector float __ATTRS_o_ai vec_abs(vector float __a) {
127 vector unsigned int __res =
128 (vector unsigned int)__a & (vector unsigned int)(0x7FFFFFFF);
129 return (vector float)__res;
132 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
133 static vector double __ATTRS_o_ai vec_abs(vector double __a) {
134 vector unsigned long long __res = { 0x7FFFFFFFFFFFFFFF, 0x7FFFFFFFFFFFFFFF };
135 __res &= (vector unsigned int)__a;
136 return (vector double)__res;
141 #define __builtin_altivec_abss_v16qi vec_abss
142 #define __builtin_altivec_abss_v8hi vec_abss
143 #define __builtin_altivec_abss_v4si vec_abss
145 static vector signed char __ATTRS_o_ai vec_abss(vector signed char __a) {
146 return __builtin_altivec_vmaxsb(
147 __a, __builtin_altivec_vsubsbs((vector signed char)(0), __a));
150 static vector signed short __ATTRS_o_ai vec_abss(vector signed short __a) {
151 return __builtin_altivec_vmaxsh(
152 __a, __builtin_altivec_vsubshs((vector signed short)(0), __a));
155 static vector signed int __ATTRS_o_ai vec_abss(vector signed int __a) {
156 return __builtin_altivec_vmaxsw(
157 __a, __builtin_altivec_vsubsws((vector signed int)(0), __a));
162 static vector signed char __ATTRS_o_ai vec_add(vector signed char __a,
163 vector signed char __b) {
167 static vector signed char __ATTRS_o_ai vec_add(vector bool char __a,
168 vector signed char __b) {
169 return (vector signed char)__a + __b;
172 static vector signed char __ATTRS_o_ai vec_add(vector signed char __a,
173 vector bool char __b) {
174 return __a + (vector signed char)__b;
177 static vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a,
178 vector unsigned char __b) {
182 static vector unsigned char __ATTRS_o_ai vec_add(vector bool char __a,
183 vector unsigned char __b) {
184 return (vector unsigned char)__a + __b;
187 static vector unsigned char __ATTRS_o_ai vec_add(vector unsigned char __a,
188 vector bool char __b) {
189 return __a + (vector unsigned char)__b;
192 static vector short __ATTRS_o_ai vec_add(vector short __a, vector short __b) {
196 static vector short __ATTRS_o_ai vec_add(vector bool short __a,
198 return (vector short)__a + __b;
201 static vector short __ATTRS_o_ai vec_add(vector short __a,
202 vector bool short __b) {
203 return __a + (vector short)__b;
206 static vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a,
207 vector unsigned short __b) {
211 static vector unsigned short __ATTRS_o_ai vec_add(vector bool short __a,
212 vector unsigned short __b) {
213 return (vector unsigned short)__a + __b;
216 static vector unsigned short __ATTRS_o_ai vec_add(vector unsigned short __a,
217 vector bool short __b) {
218 return __a + (vector unsigned short)__b;
221 static vector int __ATTRS_o_ai vec_add(vector int __a, vector int __b) {
225 static vector int __ATTRS_o_ai vec_add(vector bool int __a, vector int __b) {
226 return (vector int)__a + __b;
229 static vector int __ATTRS_o_ai vec_add(vector int __a, vector bool int __b) {
230 return __a + (vector int)__b;
233 static vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a,
234 vector unsigned int __b) {
238 static vector unsigned int __ATTRS_o_ai vec_add(vector bool int __a,
239 vector unsigned int __b) {
240 return (vector unsigned int)__a + __b;
243 static vector unsigned int __ATTRS_o_ai vec_add(vector unsigned int __a,
244 vector bool int __b) {
245 return __a + (vector unsigned int)__b;
248 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
249 static vector signed long long __ATTRS_o_ai
250 vec_add(vector signed long long __a, vector signed long long __b) {
254 static vector unsigned long long __ATTRS_o_ai
255 vec_add(vector unsigned long long __a, vector unsigned long long __b) {
259 static vector signed __int128 __ATTRS_o_ai vec_add(vector signed __int128 __a,
260 vector signed __int128 __b) {
264 static vector unsigned __int128 __ATTRS_o_ai
265 vec_add(vector unsigned __int128 __a, vector unsigned __int128 __b) {
268 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
270 static vector float __ATTRS_o_ai vec_add(vector float __a, vector float __b) {
275 static vector double __ATTRS_o_ai
276 vec_add(vector double __a, vector double __b) {
283 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
284 static vector signed __int128 __ATTRS_o_ai
285 vec_adde(vector signed __int128 __a, vector signed __int128 __b,
286 vector signed __int128 __c) {
287 return __builtin_altivec_vaddeuqm(__a, __b, __c);
290 static vector unsigned __int128 __ATTRS_o_ai
291 vec_adde(vector unsigned __int128 __a, vector unsigned __int128 __b,
292 vector unsigned __int128 __c) {
293 return __builtin_altivec_vaddeuqm(__a, __b, __c);
299 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
300 static vector signed __int128 __ATTRS_o_ai
301 vec_addec(vector signed __int128 __a, vector signed __int128 __b,
302 vector signed __int128 __c) {
303 return __builtin_altivec_vaddecuq(__a, __b, __c);
306 static vector unsigned __int128 __ATTRS_o_ai
307 vec_addec(vector unsigned __int128 __a, vector unsigned __int128 __b,
308 vector unsigned __int128 __c) {
309 return __builtin_altivec_vaddecuq(__a, __b, __c);
315 #define __builtin_altivec_vaddubm vec_vaddubm
317 static vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a,
318 vector signed char __b) {
322 static vector signed char __ATTRS_o_ai vec_vaddubm(vector bool char __a,
323 vector signed char __b) {
324 return (vector signed char)__a + __b;
327 static vector signed char __ATTRS_o_ai vec_vaddubm(vector signed char __a,
328 vector bool char __b) {
329 return __a + (vector signed char)__b;
332 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a,
333 vector unsigned char __b) {
337 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector bool char __a,
338 vector unsigned char __b) {
339 return (vector unsigned char)__a + __b;
342 static vector unsigned char __ATTRS_o_ai vec_vaddubm(vector unsigned char __a,
343 vector bool char __b) {
344 return __a + (vector unsigned char)__b;
349 #define __builtin_altivec_vadduhm vec_vadduhm
351 static vector short __ATTRS_o_ai vec_vadduhm(vector short __a,
356 static vector short __ATTRS_o_ai vec_vadduhm(vector bool short __a,
358 return (vector short)__a + __b;
361 static vector short __ATTRS_o_ai vec_vadduhm(vector short __a,
362 vector bool short __b) {
363 return __a + (vector short)__b;
366 static vector unsigned short __ATTRS_o_ai
367 vec_vadduhm(vector unsigned short __a, vector unsigned short __b) {
371 static vector unsigned short __ATTRS_o_ai
372 vec_vadduhm(vector bool short __a, vector unsigned short __b) {
373 return (vector unsigned short)__a + __b;
376 static vector unsigned short __ATTRS_o_ai vec_vadduhm(vector unsigned short __a,
377 vector bool short __b) {
378 return __a + (vector unsigned short)__b;
383 #define __builtin_altivec_vadduwm vec_vadduwm
385 static vector int __ATTRS_o_ai vec_vadduwm(vector int __a, vector int __b) {
389 static vector int __ATTRS_o_ai vec_vadduwm(vector bool int __a,
391 return (vector int)__a + __b;
394 static vector int __ATTRS_o_ai vec_vadduwm(vector int __a,
395 vector bool int __b) {
396 return __a + (vector int)__b;
399 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a,
400 vector unsigned int __b) {
404 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector bool int __a,
405 vector unsigned int __b) {
406 return (vector unsigned int)__a + __b;
409 static vector unsigned int __ATTRS_o_ai vec_vadduwm(vector unsigned int __a,
410 vector bool int __b) {
411 return __a + (vector unsigned int)__b;
416 #define __builtin_altivec_vaddfp vec_vaddfp
418 static vector float __attribute__((__always_inline__))
419 vec_vaddfp(vector float __a, vector float __b) {
425 static vector signed int __ATTRS_o_ai vec_addc(vector signed int __a,
426 vector signed int __b) {
427 return (vector signed int)__builtin_altivec_vaddcuw((vector unsigned int)__a,
428 (vector unsigned int)__b);
431 static vector unsigned int __ATTRS_o_ai vec_addc(vector unsigned int __a,
432 vector unsigned int __b) {
433 return __builtin_altivec_vaddcuw(__a, __b);
436 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
437 static vector signed __int128 __ATTRS_o_ai
438 vec_addc(vector signed __int128 __a, vector signed __int128 __b) {
439 return (vector signed __int128)__builtin_altivec_vaddcuq(
440 (vector unsigned __int128)__a,
441 (vector unsigned __int128)__b);
444 static vector unsigned __int128 __ATTRS_o_ai
445 vec_addc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
446 return __builtin_altivec_vaddcuq(__a, __b);
448 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
452 static vector unsigned int __attribute__((__always_inline__))
453 vec_vaddcuw(vector unsigned int __a, vector unsigned int __b) {
454 return __builtin_altivec_vaddcuw(__a, __b);
459 static vector signed char __ATTRS_o_ai vec_adds(vector signed char __a,
460 vector signed char __b) {
461 return __builtin_altivec_vaddsbs(__a, __b);
464 static vector signed char __ATTRS_o_ai vec_adds(vector bool char __a,
465 vector signed char __b) {
466 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
469 static vector signed char __ATTRS_o_ai vec_adds(vector signed char __a,
470 vector bool char __b) {
471 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
474 static vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a,
475 vector unsigned char __b) {
476 return __builtin_altivec_vaddubs(__a, __b);
479 static vector unsigned char __ATTRS_o_ai vec_adds(vector bool char __a,
480 vector unsigned char __b) {
481 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
484 static vector unsigned char __ATTRS_o_ai vec_adds(vector unsigned char __a,
485 vector bool char __b) {
486 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
489 static vector short __ATTRS_o_ai vec_adds(vector short __a, vector short __b) {
490 return __builtin_altivec_vaddshs(__a, __b);
493 static vector short __ATTRS_o_ai vec_adds(vector bool short __a,
495 return __builtin_altivec_vaddshs((vector short)__a, __b);
498 static vector short __ATTRS_o_ai vec_adds(vector short __a,
499 vector bool short __b) {
500 return __builtin_altivec_vaddshs(__a, (vector short)__b);
503 static vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a,
504 vector unsigned short __b) {
505 return __builtin_altivec_vadduhs(__a, __b);
508 static vector unsigned short __ATTRS_o_ai vec_adds(vector bool short __a,
509 vector unsigned short __b) {
510 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
513 static vector unsigned short __ATTRS_o_ai vec_adds(vector unsigned short __a,
514 vector bool short __b) {
515 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
518 static vector int __ATTRS_o_ai vec_adds(vector int __a, vector int __b) {
519 return __builtin_altivec_vaddsws(__a, __b);
522 static vector int __ATTRS_o_ai vec_adds(vector bool int __a, vector int __b) {
523 return __builtin_altivec_vaddsws((vector int)__a, __b);
526 static vector int __ATTRS_o_ai 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 vec_adds(vector unsigned int __a,
531 vector unsigned int __b) {
532 return __builtin_altivec_vadduws(__a, __b);
535 static vector unsigned int __ATTRS_o_ai vec_adds(vector bool int __a,
536 vector unsigned int __b) {
537 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
540 static vector unsigned int __ATTRS_o_ai vec_adds(vector unsigned int __a,
541 vector bool int __b) {
542 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
547 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a,
548 vector signed char __b) {
549 return __builtin_altivec_vaddsbs(__a, __b);
552 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector bool char __a,
553 vector signed char __b) {
554 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
557 static vector signed char __ATTRS_o_ai vec_vaddsbs(vector signed char __a,
558 vector bool char __b) {
559 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
564 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a,
565 vector unsigned char __b) {
566 return __builtin_altivec_vaddubs(__a, __b);
569 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector bool char __a,
570 vector unsigned char __b) {
571 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
574 static vector unsigned char __ATTRS_o_ai vec_vaddubs(vector unsigned char __a,
575 vector bool char __b) {
576 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
581 static vector short __ATTRS_o_ai vec_vaddshs(vector short __a,
583 return __builtin_altivec_vaddshs(__a, __b);
586 static vector short __ATTRS_o_ai vec_vaddshs(vector bool short __a,
588 return __builtin_altivec_vaddshs((vector short)__a, __b);
591 static vector short __ATTRS_o_ai vec_vaddshs(vector short __a,
592 vector bool short __b) {
593 return __builtin_altivec_vaddshs(__a, (vector short)__b);
598 static vector unsigned short __ATTRS_o_ai
599 vec_vadduhs(vector unsigned short __a, vector unsigned short __b) {
600 return __builtin_altivec_vadduhs(__a, __b);
603 static vector unsigned short __ATTRS_o_ai
604 vec_vadduhs(vector bool short __a, vector unsigned short __b) {
605 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
608 static vector unsigned short __ATTRS_o_ai vec_vadduhs(vector unsigned short __a,
609 vector bool short __b) {
610 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
615 static vector int __ATTRS_o_ai vec_vaddsws(vector int __a, vector int __b) {
616 return __builtin_altivec_vaddsws(__a, __b);
619 static vector int __ATTRS_o_ai vec_vaddsws(vector bool int __a,
621 return __builtin_altivec_vaddsws((vector int)__a, __b);
624 static vector int __ATTRS_o_ai vec_vaddsws(vector int __a,
625 vector bool int __b) {
626 return __builtin_altivec_vaddsws(__a, (vector int)__b);
631 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a,
632 vector unsigned int __b) {
633 return __builtin_altivec_vadduws(__a, __b);
636 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector bool int __a,
637 vector unsigned int __b) {
638 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
641 static vector unsigned int __ATTRS_o_ai vec_vadduws(vector unsigned int __a,
642 vector bool int __b) {
643 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
646 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
649 static vector signed __int128 __ATTRS_o_ai
650 vec_vadduqm(vector signed __int128 __a, vector signed __int128 __b) {
654 static vector unsigned __int128 __ATTRS_o_ai
655 vec_vadduqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
661 static vector signed __int128 __ATTRS_o_ai
662 vec_vaddeuqm(vector signed __int128 __a, vector signed __int128 __b,
663 vector signed __int128 __c) {
664 return __builtin_altivec_vaddeuqm(__a, __b, __c);
667 static vector unsigned __int128 __ATTRS_o_ai
668 vec_vaddeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
669 vector unsigned __int128 __c) {
670 return __builtin_altivec_vaddeuqm(__a, __b, __c);
675 static vector signed __int128 __ATTRS_o_ai
676 vec_vaddcuq(vector signed __int128 __a, vector signed __int128 __b) {
677 return __builtin_altivec_vaddcuq(__a, __b);
680 static vector unsigned __int128 __ATTRS_o_ai
681 vec_vaddcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
682 return __builtin_altivec_vaddcuq(__a, __b);
687 static vector signed __int128 __ATTRS_o_ai
688 vec_vaddecuq(vector signed __int128 __a, vector signed __int128 __b,
689 vector signed __int128 __c) {
690 return __builtin_altivec_vaddecuq(__a, __b, __c);
693 static vector unsigned __int128 __ATTRS_o_ai
694 vec_vaddecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
695 vector unsigned __int128 __c) {
696 return __builtin_altivec_vaddecuq(__a, __b, __c);
698 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
702 #define __builtin_altivec_vand vec_and
704 static vector signed char __ATTRS_o_ai vec_and(vector signed char __a,
705 vector signed char __b) {
709 static vector signed char __ATTRS_o_ai vec_and(vector bool char __a,
710 vector signed char __b) {
711 return (vector signed char)__a & __b;
714 static vector signed char __ATTRS_o_ai vec_and(vector signed char __a,
715 vector bool char __b) {
716 return __a & (vector signed char)__b;
719 static vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a,
720 vector unsigned char __b) {
724 static vector unsigned char __ATTRS_o_ai vec_and(vector bool char __a,
725 vector unsigned char __b) {
726 return (vector unsigned char)__a & __b;
729 static vector unsigned char __ATTRS_o_ai vec_and(vector unsigned char __a,
730 vector bool char __b) {
731 return __a & (vector unsigned char)__b;
734 static vector bool char __ATTRS_o_ai vec_and(vector bool char __a,
735 vector bool char __b) {
739 static vector short __ATTRS_o_ai vec_and(vector short __a, vector short __b) {
743 static vector short __ATTRS_o_ai vec_and(vector bool short __a,
745 return (vector short)__a & __b;
748 static vector short __ATTRS_o_ai vec_and(vector short __a,
749 vector bool short __b) {
750 return __a & (vector short)__b;
753 static vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a,
754 vector unsigned short __b) {
758 static vector unsigned short __ATTRS_o_ai vec_and(vector bool short __a,
759 vector unsigned short __b) {
760 return (vector unsigned short)__a & __b;
763 static vector unsigned short __ATTRS_o_ai vec_and(vector unsigned short __a,
764 vector bool short __b) {
765 return __a & (vector unsigned short)__b;
768 static vector bool short __ATTRS_o_ai vec_and(vector bool short __a,
769 vector bool short __b) {
773 static vector int __ATTRS_o_ai vec_and(vector int __a, vector int __b) {
777 static vector int __ATTRS_o_ai vec_and(vector bool int __a, vector int __b) {
778 return (vector int)__a & __b;
781 static vector int __ATTRS_o_ai vec_and(vector int __a, vector bool int __b) {
782 return __a & (vector int)__b;
785 static vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a,
786 vector unsigned int __b) {
790 static vector unsigned int __ATTRS_o_ai vec_and(vector bool int __a,
791 vector unsigned int __b) {
792 return (vector unsigned int)__a & __b;
795 static vector unsigned int __ATTRS_o_ai vec_and(vector unsigned int __a,
796 vector bool int __b) {
797 return __a & (vector unsigned int)__b;
800 static vector bool int __ATTRS_o_ai vec_and(vector bool int __a,
801 vector bool int __b) {
805 static vector float __ATTRS_o_ai vec_and(vector float __a, vector float __b) {
806 vector unsigned int __res =
807 (vector unsigned int)__a & (vector unsigned int)__b;
808 return (vector float)__res;
811 static vector float __ATTRS_o_ai vec_and(vector bool int __a,
813 vector unsigned int __res =
814 (vector unsigned int)__a & (vector unsigned int)__b;
815 return (vector float)__res;
818 static vector float __ATTRS_o_ai vec_and(vector float __a,
819 vector bool int __b) {
820 vector unsigned int __res =
821 (vector unsigned int)__a & (vector unsigned int)__b;
822 return (vector float)__res;
826 static vector double __ATTRS_o_ai vec_and(vector bool long long __a, vector double __b) {
827 vector unsigned long long __res =
828 (vector unsigned long long)__a & (vector unsigned long long)__b;
829 return (vector double)__res;
832 static vector double __ATTRS_o_ai vec_and(vector double __a, vector bool long long __b) {
833 vector unsigned long long __res =
834 (vector unsigned long long)__a & (vector unsigned long long)__b;
835 return (vector double)__res;
838 static vector double __ATTRS_o_ai vec_and(vector double __a, vector double __b) {
839 vector unsigned long long __res =
840 (vector unsigned long long)__a & (vector unsigned long long)__b;
841 return (vector double)__res;
844 static vector signed long long __ATTRS_o_ai
845 vec_and(vector signed long long __a, vector signed long long __b) {
849 static vector signed long long __ATTRS_o_ai
850 vec_and(vector bool long long __a, vector signed long long __b) {
851 return (vector signed long long)__a & __b;
854 static vector signed long long __ATTRS_o_ai vec_and(vector signed long long __a,
855 vector bool long long __b) {
856 return __a & (vector signed long long)__b;
859 static vector unsigned long long __ATTRS_o_ai
860 vec_and(vector unsigned long long __a, vector unsigned long long __b) {
864 static vector unsigned long long __ATTRS_o_ai
865 vec_and(vector bool long long __a, vector unsigned long long __b) {
866 return (vector unsigned long long)__a & __b;
869 static vector unsigned long long __ATTRS_o_ai
870 vec_and(vector unsigned long long __a, vector bool long long __b) {
871 return __a & (vector unsigned long long)__b;
874 static vector bool long long __ATTRS_o_ai vec_and(vector bool long long __a,
875 vector bool long long __b) {
882 static vector signed char __ATTRS_o_ai vec_vand(vector signed char __a,
883 vector signed char __b) {
887 static vector signed char __ATTRS_o_ai vec_vand(vector bool char __a,
888 vector signed char __b) {
889 return (vector signed char)__a & __b;
892 static vector signed char __ATTRS_o_ai vec_vand(vector signed char __a,
893 vector bool char __b) {
894 return __a & (vector signed char)__b;
897 static vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a,
898 vector unsigned char __b) {
902 static vector unsigned char __ATTRS_o_ai vec_vand(vector bool char __a,
903 vector unsigned char __b) {
904 return (vector unsigned char)__a & __b;
907 static vector unsigned char __ATTRS_o_ai vec_vand(vector unsigned char __a,
908 vector bool char __b) {
909 return __a & (vector unsigned char)__b;
912 static vector bool char __ATTRS_o_ai vec_vand(vector bool char __a,
913 vector bool char __b) {
917 static vector short __ATTRS_o_ai vec_vand(vector short __a, vector short __b) {
921 static vector short __ATTRS_o_ai vec_vand(vector bool short __a,
923 return (vector short)__a & __b;
926 static vector short __ATTRS_o_ai vec_vand(vector short __a,
927 vector bool short __b) {
928 return __a & (vector short)__b;
931 static vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a,
932 vector unsigned short __b) {
936 static vector unsigned short __ATTRS_o_ai vec_vand(vector bool short __a,
937 vector unsigned short __b) {
938 return (vector unsigned short)__a & __b;
941 static vector unsigned short __ATTRS_o_ai vec_vand(vector unsigned short __a,
942 vector bool short __b) {
943 return __a & (vector unsigned short)__b;
946 static vector bool short __ATTRS_o_ai vec_vand(vector bool short __a,
947 vector bool short __b) {
951 static vector int __ATTRS_o_ai vec_vand(vector int __a, vector int __b) {
955 static vector int __ATTRS_o_ai vec_vand(vector bool int __a, vector int __b) {
956 return (vector int)__a & __b;
959 static vector int __ATTRS_o_ai vec_vand(vector int __a, vector bool int __b) {
960 return __a & (vector int)__b;
963 static vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a,
964 vector unsigned int __b) {
968 static vector unsigned int __ATTRS_o_ai vec_vand(vector bool int __a,
969 vector unsigned int __b) {
970 return (vector unsigned int)__a & __b;
973 static vector unsigned int __ATTRS_o_ai vec_vand(vector unsigned int __a,
974 vector bool int __b) {
975 return __a & (vector unsigned int)__b;
978 static vector bool int __ATTRS_o_ai vec_vand(vector bool int __a,
979 vector bool int __b) {
983 static vector float __ATTRS_o_ai vec_vand(vector float __a, vector float __b) {
984 vector unsigned int __res =
985 (vector unsigned int)__a & (vector unsigned int)__b;
986 return (vector float)__res;
989 static vector float __ATTRS_o_ai vec_vand(vector bool int __a,
991 vector unsigned int __res =
992 (vector unsigned int)__a & (vector unsigned int)__b;
993 return (vector float)__res;
996 static vector float __ATTRS_o_ai vec_vand(vector float __a,
997 vector bool int __b) {
998 vector unsigned int __res =
999 (vector unsigned int)__a & (vector unsigned int)__b;
1000 return (vector float)__res;
1004 static vector signed long long __ATTRS_o_ai
1005 vec_vand(vector signed long long __a, vector signed long long __b) {
1009 static vector signed long long __ATTRS_o_ai
1010 vec_vand(vector bool long long __a, vector signed long long __b) {
1011 return (vector signed long long)__a & __b;
1014 static vector signed long long __ATTRS_o_ai
1015 vec_vand(vector signed long long __a, vector bool long long __b) {
1016 return __a & (vector signed long long)__b;
1019 static vector unsigned long long __ATTRS_o_ai
1020 vec_vand(vector unsigned long long __a, vector unsigned long long __b) {
1024 static vector unsigned long long __ATTRS_o_ai
1025 vec_vand(vector bool long long __a, vector unsigned long long __b) {
1026 return (vector unsigned long long)__a & __b;
1029 static vector unsigned long long __ATTRS_o_ai
1030 vec_vand(vector unsigned long long __a, vector bool long long __b) {
1031 return __a & (vector unsigned long long)__b;
1034 static vector bool long long __ATTRS_o_ai vec_vand(vector bool long long __a,
1035 vector bool long long __b) {
1042 #define __builtin_altivec_vandc vec_andc
1044 static vector signed char __ATTRS_o_ai vec_andc(vector signed char __a,
1045 vector signed char __b) {
1049 static vector signed char __ATTRS_o_ai vec_andc(vector bool char __a,
1050 vector signed char __b) {
1051 return (vector signed char)__a & ~__b;
1054 static vector signed char __ATTRS_o_ai vec_andc(vector signed char __a,
1055 vector bool char __b) {
1056 return __a & ~(vector signed char)__b;
1059 static vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a,
1060 vector unsigned char __b) {
1064 static vector unsigned char __ATTRS_o_ai vec_andc(vector bool char __a,
1065 vector unsigned char __b) {
1066 return (vector unsigned char)__a & ~__b;
1069 static vector unsigned char __ATTRS_o_ai vec_andc(vector unsigned char __a,
1070 vector bool char __b) {
1071 return __a & ~(vector unsigned char)__b;
1074 static vector bool char __ATTRS_o_ai vec_andc(vector bool char __a,
1075 vector bool char __b) {
1079 static vector short __ATTRS_o_ai vec_andc(vector short __a, vector short __b) {
1083 static vector short __ATTRS_o_ai vec_andc(vector bool short __a,
1085 return (vector short)__a & ~__b;
1088 static vector short __ATTRS_o_ai vec_andc(vector short __a,
1089 vector bool short __b) {
1090 return __a & ~(vector short)__b;
1093 static vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a,
1094 vector unsigned short __b) {
1098 static vector unsigned short __ATTRS_o_ai vec_andc(vector bool short __a,
1099 vector unsigned short __b) {
1100 return (vector unsigned short)__a & ~__b;
1103 static vector unsigned short __ATTRS_o_ai vec_andc(vector unsigned short __a,
1104 vector bool short __b) {
1105 return __a & ~(vector unsigned short)__b;
1108 static vector bool short __ATTRS_o_ai vec_andc(vector bool short __a,
1109 vector bool short __b) {
1113 static vector int __ATTRS_o_ai vec_andc(vector int __a, vector int __b) {
1117 static vector int __ATTRS_o_ai vec_andc(vector bool int __a, vector int __b) {
1118 return (vector int)__a & ~__b;
1121 static vector int __ATTRS_o_ai vec_andc(vector int __a, vector bool int __b) {
1122 return __a & ~(vector int)__b;
1125 static vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a,
1126 vector unsigned int __b) {
1130 static vector unsigned int __ATTRS_o_ai vec_andc(vector bool int __a,
1131 vector unsigned int __b) {
1132 return (vector unsigned int)__a & ~__b;
1135 static vector unsigned int __ATTRS_o_ai vec_andc(vector unsigned int __a,
1136 vector bool int __b) {
1137 return __a & ~(vector unsigned int)__b;
1140 static vector bool int __ATTRS_o_ai vec_andc(vector bool int __a,
1141 vector bool int __b) {
1145 static vector float __ATTRS_o_ai vec_andc(vector float __a, vector float __b) {
1146 vector unsigned int __res =
1147 (vector unsigned int)__a & ~(vector unsigned int)__b;
1148 return (vector float)__res;
1151 static vector float __ATTRS_o_ai vec_andc(vector bool int __a,
1153 vector unsigned int __res =
1154 (vector unsigned int)__a & ~(vector unsigned int)__b;
1155 return (vector float)__res;
1158 static vector float __ATTRS_o_ai vec_andc(vector float __a,
1159 vector bool int __b) {
1160 vector unsigned int __res =
1161 (vector unsigned int)__a & ~(vector unsigned int)__b;
1162 return (vector float)__res;
1166 static vector double __ATTRS_o_ai
1167 vec_andc(vector bool long long __a, vector double __b) {
1168 vector unsigned long long __res =
1169 (vector unsigned long long)__a & ~(vector unsigned long long)__b;
1170 return (vector double)__res;
1173 static vector double __ATTRS_o_ai
1174 vec_andc(vector double __a, vector bool long long __b) {
1175 vector unsigned long long __res =
1176 (vector unsigned long long)__a & ~(vector unsigned long long)__b;
1177 return (vector double)__res;
1180 static vector double __ATTRS_o_ai vec_andc(vector double __a, vector double __b) {
1181 vector unsigned long long __res =
1182 (vector unsigned long long)__a & ~(vector unsigned long long)__b;
1183 return (vector double)__res;
1186 static vector signed long long __ATTRS_o_ai
1187 vec_andc(vector signed long long __a, vector signed long long __b) {
1191 static vector signed long long __ATTRS_o_ai
1192 vec_andc(vector bool long long __a, vector signed long long __b) {
1193 return (vector signed long long)__a & ~__b;
1196 static vector signed long long __ATTRS_o_ai
1197 vec_andc(vector signed long long __a, vector bool long long __b) {
1198 return __a & ~(vector signed long long)__b;
1201 static vector unsigned long long __ATTRS_o_ai
1202 vec_andc(vector unsigned long long __a, vector unsigned long long __b) {
1206 static vector unsigned long long __ATTRS_o_ai
1207 vec_andc(vector bool long long __a, vector unsigned long long __b) {
1208 return (vector unsigned long long)__a & ~__b;
1211 static vector unsigned long long __ATTRS_o_ai
1212 vec_andc(vector unsigned long long __a, vector bool long long __b) {
1213 return __a & ~(vector unsigned long long)__b;
1216 static vector bool long long __ATTRS_o_ai vec_andc(vector bool long long __a,
1217 vector bool long long __b) {
1224 static vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a,
1225 vector signed char __b) {
1229 static vector signed char __ATTRS_o_ai vec_vandc(vector bool char __a,
1230 vector signed char __b) {
1231 return (vector signed char)__a & ~__b;
1234 static vector signed char __ATTRS_o_ai vec_vandc(vector signed char __a,
1235 vector bool char __b) {
1236 return __a & ~(vector signed char)__b;
1239 static vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a,
1240 vector unsigned char __b) {
1244 static vector unsigned char __ATTRS_o_ai vec_vandc(vector bool char __a,
1245 vector unsigned char __b) {
1246 return (vector unsigned char)__a & ~__b;
1249 static vector unsigned char __ATTRS_o_ai vec_vandc(vector unsigned char __a,
1250 vector bool char __b) {
1251 return __a & ~(vector unsigned char)__b;
1254 static vector bool char __ATTRS_o_ai vec_vandc(vector bool char __a,
1255 vector bool char __b) {
1259 static vector short __ATTRS_o_ai vec_vandc(vector short __a, vector short __b) {
1263 static vector short __ATTRS_o_ai vec_vandc(vector bool short __a,
1265 return (vector short)__a & ~__b;
1268 static vector short __ATTRS_o_ai vec_vandc(vector short __a,
1269 vector bool short __b) {
1270 return __a & ~(vector short)__b;
1273 static vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a,
1274 vector unsigned short __b) {
1278 static vector unsigned short __ATTRS_o_ai vec_vandc(vector bool short __a,
1279 vector unsigned short __b) {
1280 return (vector unsigned short)__a & ~__b;
1283 static vector unsigned short __ATTRS_o_ai vec_vandc(vector unsigned short __a,
1284 vector bool short __b) {
1285 return __a & ~(vector unsigned short)__b;
1288 static vector bool short __ATTRS_o_ai vec_vandc(vector bool short __a,
1289 vector bool short __b) {
1293 static vector int __ATTRS_o_ai vec_vandc(vector int __a, vector int __b) {
1297 static vector int __ATTRS_o_ai vec_vandc(vector bool int __a, vector int __b) {
1298 return (vector int)__a & ~__b;
1301 static vector int __ATTRS_o_ai vec_vandc(vector int __a, vector bool int __b) {
1302 return __a & ~(vector int)__b;
1305 static vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a,
1306 vector unsigned int __b) {
1310 static vector unsigned int __ATTRS_o_ai vec_vandc(vector bool int __a,
1311 vector unsigned int __b) {
1312 return (vector unsigned int)__a & ~__b;
1315 static vector unsigned int __ATTRS_o_ai vec_vandc(vector unsigned int __a,
1316 vector bool int __b) {
1317 return __a & ~(vector unsigned int)__b;
1320 static vector bool int __ATTRS_o_ai vec_vandc(vector bool int __a,
1321 vector bool int __b) {
1325 static vector float __ATTRS_o_ai vec_vandc(vector float __a, vector float __b) {
1326 vector unsigned int __res =
1327 (vector unsigned int)__a & ~(vector unsigned int)__b;
1328 return (vector float)__res;
1331 static vector float __ATTRS_o_ai vec_vandc(vector bool int __a,
1333 vector unsigned int __res =
1334 (vector unsigned int)__a & ~(vector unsigned int)__b;
1335 return (vector float)__res;
1338 static vector float __ATTRS_o_ai vec_vandc(vector float __a,
1339 vector bool int __b) {
1340 vector unsigned int __res =
1341 (vector unsigned int)__a & ~(vector unsigned int)__b;
1342 return (vector float)__res;
1346 static vector signed long long __ATTRS_o_ai
1347 vec_vandc(vector signed long long __a, vector signed long long __b) {
1351 static vector signed long long __ATTRS_o_ai
1352 vec_vandc(vector bool long long __a, vector signed long long __b) {
1353 return (vector signed long long)__a & ~__b;
1356 static vector signed long long __ATTRS_o_ai
1357 vec_vandc(vector signed long long __a, vector bool long long __b) {
1358 return __a & ~(vector signed long long)__b;
1361 static vector unsigned long long __ATTRS_o_ai
1362 vec_vandc(vector unsigned long long __a, vector unsigned long long __b) {
1366 static vector unsigned long long __ATTRS_o_ai
1367 vec_vandc(vector bool long long __a, vector unsigned long long __b) {
1368 return (vector unsigned long long)__a & ~__b;
1371 static vector unsigned long long __ATTRS_o_ai
1372 vec_vandc(vector unsigned long long __a, vector bool long long __b) {
1373 return __a & ~(vector unsigned long long)__b;
1376 static vector bool long long __ATTRS_o_ai vec_vandc(vector bool long long __a,
1377 vector bool long long __b) {
1384 static vector signed char __ATTRS_o_ai vec_avg(vector signed char __a,
1385 vector signed char __b) {
1386 return __builtin_altivec_vavgsb(__a, __b);
1389 static vector unsigned char __ATTRS_o_ai vec_avg(vector unsigned char __a,
1390 vector unsigned char __b) {
1391 return __builtin_altivec_vavgub(__a, __b);
1394 static vector short __ATTRS_o_ai vec_avg(vector short __a, vector short __b) {
1395 return __builtin_altivec_vavgsh(__a, __b);
1398 static vector unsigned short __ATTRS_o_ai vec_avg(vector unsigned short __a,
1399 vector unsigned short __b) {
1400 return __builtin_altivec_vavguh(__a, __b);
1403 static vector int __ATTRS_o_ai vec_avg(vector int __a, vector int __b) {
1404 return __builtin_altivec_vavgsw(__a, __b);
1407 static vector unsigned int __ATTRS_o_ai vec_avg(vector unsigned int __a,
1408 vector unsigned int __b) {
1409 return __builtin_altivec_vavguw(__a, __b);
1414 static vector signed char __attribute__((__always_inline__))
1415 vec_vavgsb(vector signed char __a, vector signed char __b) {
1416 return __builtin_altivec_vavgsb(__a, __b);
1421 static vector unsigned char __attribute__((__always_inline__))
1422 vec_vavgub(vector unsigned char __a, vector unsigned char __b) {
1423 return __builtin_altivec_vavgub(__a, __b);
1428 static vector short __attribute__((__always_inline__))
1429 vec_vavgsh(vector short __a, vector short __b) {
1430 return __builtin_altivec_vavgsh(__a, __b);
1435 static vector unsigned short __attribute__((__always_inline__))
1436 vec_vavguh(vector unsigned short __a, vector unsigned short __b) {
1437 return __builtin_altivec_vavguh(__a, __b);
1442 static vector int __attribute__((__always_inline__))
1443 vec_vavgsw(vector int __a, vector int __b) {
1444 return __builtin_altivec_vavgsw(__a, __b);
1449 static vector unsigned int __attribute__((__always_inline__))
1450 vec_vavguw(vector unsigned int __a, vector unsigned int __b) {
1451 return __builtin_altivec_vavguw(__a, __b);
1456 static vector float __ATTRS_o_ai vec_ceil(vector float __a) {
1458 return __builtin_vsx_xvrspip(__a);
1460 return __builtin_altivec_vrfip(__a);
1465 static vector double __ATTRS_o_ai vec_ceil(vector double __a) {
1466 return __builtin_vsx_xvrdpip(__a);
1472 static vector float __attribute__((__always_inline__))
1473 vec_vrfip(vector float __a) {
1474 return __builtin_altivec_vrfip(__a);
1479 static vector int __attribute__((__always_inline__))
1480 vec_cmpb(vector float __a, vector float __b) {
1481 return __builtin_altivec_vcmpbfp(__a, __b);
1486 static vector int __attribute__((__always_inline__))
1487 vec_vcmpbfp(vector float __a, vector float __b) {
1488 return __builtin_altivec_vcmpbfp(__a, __b);
1493 static vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a,
1494 vector signed char __b) {
1495 return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a,
1499 static vector bool char __ATTRS_o_ai vec_cmpeq(vector unsigned char __a,
1500 vector unsigned char __b) {
1501 return (vector bool char)__builtin_altivec_vcmpequb((vector char)__a,
1505 static vector bool short __ATTRS_o_ai vec_cmpeq(vector short __a,
1507 return (vector bool short)__builtin_altivec_vcmpequh(__a, __b);
1510 static vector bool short __ATTRS_o_ai vec_cmpeq(vector unsigned short __a,
1511 vector unsigned short __b) {
1512 return (vector bool short)__builtin_altivec_vcmpequh((vector short)__a,
1516 static vector bool int __ATTRS_o_ai vec_cmpeq(vector int __a, vector int __b) {
1517 return (vector bool int)__builtin_altivec_vcmpequw(__a, __b);
1520 static vector bool int __ATTRS_o_ai vec_cmpeq(vector unsigned int __a,
1521 vector unsigned int __b) {
1522 return (vector bool int)__builtin_altivec_vcmpequw((vector int)__a,
1526 #ifdef __POWER8_VECTOR__
1527 static vector bool long long __ATTRS_o_ai
1528 vec_cmpeq(vector signed long long __a, vector signed long long __b) {
1529 return (vector bool long long)__builtin_altivec_vcmpequd(__a, __b);
1532 static vector bool long long __ATTRS_o_ai
1533 vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) {
1534 return (vector bool long long)__builtin_altivec_vcmpequd(
1535 (vector long long)__a, (vector long long)__b);
1539 static vector bool int __ATTRS_o_ai vec_cmpeq(vector float __a,
1542 return (vector bool int)__builtin_vsx_xvcmpeqsp(__a, __b);
1544 return (vector bool int)__builtin_altivec_vcmpeqfp(__a, __b);
1549 static vector bool long long __ATTRS_o_ai
1550 vec_cmpeq(vector double __a, vector double __b) {
1551 return (vector bool long long)__builtin_vsx_xvcmpeqdp(__a, __b);
1558 static vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a,
1559 vector signed char __b) {
1560 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1563 static vector bool char __ATTRS_o_ai vec_cmpgt(vector unsigned char __a,
1564 vector unsigned char __b) {
1565 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1568 static vector bool short __ATTRS_o_ai vec_cmpgt(vector short __a,
1570 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1573 static vector bool short __ATTRS_o_ai vec_cmpgt(vector unsigned short __a,
1574 vector unsigned short __b) {
1575 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1578 static vector bool int __ATTRS_o_ai vec_cmpgt(vector int __a, vector int __b) {
1579 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1582 static vector bool int __ATTRS_o_ai vec_cmpgt(vector unsigned int __a,
1583 vector unsigned int __b) {
1584 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1587 #ifdef __POWER8_VECTOR__
1588 static vector bool long long __ATTRS_o_ai
1589 vec_cmpgt(vector signed long long __a, vector signed long long __b) {
1590 return (vector bool long long)__builtin_altivec_vcmpgtsd(__a, __b);
1593 static vector bool long long __ATTRS_o_ai
1594 vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) {
1595 return (vector bool long long)__builtin_altivec_vcmpgtud(__a, __b);
1599 static vector bool int __ATTRS_o_ai vec_cmpgt(vector float __a,
1602 return (vector bool int)__builtin_vsx_xvcmpgtsp(__a, __b);
1604 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1609 static vector bool long long __ATTRS_o_ai
1610 vec_cmpgt(vector double __a, vector double __b) {
1611 return (vector bool long long)__builtin_vsx_xvcmpgtdp(__a, __b);
1617 static vector bool char __ATTRS_o_ai
1618 vec_cmpge (vector signed char __a, vector signed char __b) {
1619 return ~(vec_cmpgt(__b, __a));
1622 static vector bool char __ATTRS_o_ai
1623 vec_cmpge (vector unsigned char __a, vector unsigned char __b) {
1624 return ~(vec_cmpgt(__b, __a));
1627 static vector bool short __ATTRS_o_ai
1628 vec_cmpge (vector signed short __a, vector signed short __b) {
1629 return ~(vec_cmpgt(__b, __a));
1632 static vector bool short __ATTRS_o_ai
1633 vec_cmpge (vector unsigned short __a, vector unsigned short __b) {
1634 return ~(vec_cmpgt(__b, __a));
1637 static vector bool int __ATTRS_o_ai
1638 vec_cmpge (vector signed int __a, vector signed int __b) {
1639 return ~(vec_cmpgt(__b, __a));
1642 static vector bool int __ATTRS_o_ai
1643 vec_cmpge (vector unsigned int __a, vector unsigned int __b) {
1644 return ~(vec_cmpgt(__b, __a));
1647 static vector bool int __ATTRS_o_ai
1648 vec_cmpge(vector float __a, vector float __b) {
1650 return (vector bool int)__builtin_vsx_xvcmpgesp(__a, __b);
1652 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1657 static vector bool long long __ATTRS_o_ai
1658 vec_cmpge(vector double __a, vector double __b) {
1659 return (vector bool long long)__builtin_vsx_xvcmpgedp(__a, __b);
1663 #ifdef __POWER8_VECTOR__
1664 static vector bool long long __ATTRS_o_ai
1665 vec_cmpge(vector signed long long __a, vector signed long long __b) {
1666 return ~(vec_cmpgt(__b, __a));
1669 static vector bool long long __ATTRS_o_ai
1670 vec_cmpge(vector unsigned long long __a, vector unsigned long long __b) {
1671 return ~(vec_cmpgt(__b, __a));
1677 static vector bool int __attribute__((__always_inline__))
1678 vec_vcmpgefp(vector float __a, vector float __b) {
1679 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1684 static vector bool char __attribute__((__always_inline__))
1685 vec_vcmpgtsb(vector signed char __a, vector signed char __b) {
1686 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1691 static vector bool char __attribute__((__always_inline__))
1692 vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b) {
1693 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1698 static vector bool short __attribute__((__always_inline__))
1699 vec_vcmpgtsh(vector short __a, vector short __b) {
1700 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1705 static vector bool short __attribute__((__always_inline__))
1706 vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b) {
1707 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1712 static vector bool int __attribute__((__always_inline__))
1713 vec_vcmpgtsw(vector int __a, vector int __b) {
1714 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1719 static vector bool int __attribute__((__always_inline__))
1720 vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b) {
1721 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1726 static vector bool int __attribute__((__always_inline__))
1727 vec_vcmpgtfp(vector float __a, vector float __b) {
1728 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1733 static vector bool char __ATTRS_o_ai
1734 vec_cmple (vector signed char __a, vector signed char __b) {
1735 return vec_cmpge(__b, __a);
1738 static vector bool char __ATTRS_o_ai
1739 vec_cmple (vector unsigned char __a, vector unsigned char __b) {
1740 return vec_cmpge(__b, __a);
1743 static vector bool short __ATTRS_o_ai
1744 vec_cmple (vector signed short __a, vector signed short __b) {
1745 return vec_cmpge(__b, __a);
1748 static vector bool short __ATTRS_o_ai
1749 vec_cmple (vector unsigned short __a, vector unsigned short __b) {
1750 return vec_cmpge(__b, __a);
1753 static vector bool int __ATTRS_o_ai
1754 vec_cmple (vector signed int __a, vector signed int __b) {
1755 return vec_cmpge(__b, __a);
1758 static vector bool int __ATTRS_o_ai
1759 vec_cmple (vector unsigned int __a, vector unsigned int __b) {
1760 return vec_cmpge(__b, __a);
1763 static vector bool int __ATTRS_o_ai
1764 vec_cmple(vector float __a, vector float __b) {
1765 return vec_cmpge(__b, __a);
1769 static vector bool long long __ATTRS_o_ai
1770 vec_cmple(vector double __a, vector double __b) {
1771 return vec_cmpge(__b, __a);
1775 #ifdef __POWER8_VECTOR__
1776 static vector bool long long __ATTRS_o_ai
1777 vec_cmple(vector signed long long __a, vector signed long long __b) {
1778 return vec_cmpge(__b, __a);
1781 static vector bool long long __ATTRS_o_ai
1782 vec_cmple(vector unsigned long long __a, vector unsigned long long __b) {
1783 return vec_cmpge(__b, __a);
1789 static vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a,
1790 vector signed char __b) {
1791 return vec_cmpgt(__b, __a);
1794 static vector bool char __ATTRS_o_ai vec_cmplt(vector unsigned char __a,
1795 vector unsigned char __b) {
1796 return vec_cmpgt(__b, __a);
1799 static vector bool short __ATTRS_o_ai vec_cmplt(vector short __a,
1801 return vec_cmpgt(__b, __a);
1804 static vector bool short __ATTRS_o_ai vec_cmplt(vector unsigned short __a,
1805 vector unsigned short __b) {
1806 return vec_cmpgt(__b, __a);
1809 static vector bool int __ATTRS_o_ai vec_cmplt(vector int __a, vector int __b) {
1810 return vec_cmpgt(__b, __a);
1813 static vector bool int __ATTRS_o_ai vec_cmplt(vector unsigned int __a,
1814 vector unsigned int __b) {
1815 return vec_cmpgt(__b, __a);
1818 static vector bool int __ATTRS_o_ai vec_cmplt(vector float __a,
1820 return vec_cmpgt(__b, __a);
1824 static vector bool long long __ATTRS_o_ai
1825 vec_cmplt(vector double __a, vector double __b) {
1826 return vec_cmpgt(__b, __a);
1830 #ifdef __POWER8_VECTOR__
1831 static vector bool long long __ATTRS_o_ai
1832 vec_cmplt(vector signed long long __a, vector signed long long __b) {
1833 return vec_cmpgt(__b, __a);
1836 static vector bool long long __ATTRS_o_ai
1837 vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) {
1838 return vec_cmpgt(__b, __a);
1843 static vector signed char __ATTRS_o_ai vec_cntlz(vector signed char __a) {
1844 return __builtin_altivec_vclzb(__a);
1846 static vector unsigned char __ATTRS_o_ai vec_cntlz(vector unsigned char __a) {
1847 return __builtin_altivec_vclzb(__a);
1849 static vector signed short __ATTRS_o_ai vec_cntlz(vector signed short __a) {
1850 return __builtin_altivec_vclzh(__a);
1852 static vector unsigned short __ATTRS_o_ai vec_cntlz(vector unsigned short __a) {
1853 return __builtin_altivec_vclzh(__a);
1855 static vector signed int __ATTRS_o_ai vec_cntlz(vector signed int __a) {
1856 return __builtin_altivec_vclzw(__a);
1858 static vector unsigned int __ATTRS_o_ai vec_cntlz(vector unsigned int __a) {
1859 return __builtin_altivec_vclzw(__a);
1861 static vector signed long long __ATTRS_o_ai
1862 vec_cntlz(vector signed long long __a) {
1863 return __builtin_altivec_vclzd(__a);
1865 static vector unsigned long long __ATTRS_o_ai
1866 vec_cntlz(vector unsigned long long __a) {
1867 return __builtin_altivec_vclzd(__a);
1874 static vector float __ATTRS_o_ai vec_cpsgn(vector float __a, vector float __b) {
1875 return __builtin_vsx_xvcpsgnsp(__a, __b);
1878 static vector double __ATTRS_o_ai vec_cpsgn(vector double __a,
1879 vector double __b) {
1880 return __builtin_vsx_xvcpsgndp(__a, __b);
1886 static vector float __ATTRS_o_ai vec_ctf(vector int __a, int __b) {
1887 return __builtin_altivec_vcfsx(__a, __b);
1890 static vector float __ATTRS_o_ai vec_ctf(vector unsigned int __a, int __b) {
1891 return __builtin_altivec_vcfux((vector int)__a, __b);
1896 static vector float __attribute__((__always_inline__))
1897 vec_vcfsx(vector int __a, int __b) {
1898 return __builtin_altivec_vcfsx(__a, __b);
1903 static vector float __attribute__((__always_inline__))
1904 vec_vcfux(vector unsigned int __a, int __b) {
1905 return __builtin_altivec_vcfux((vector int)__a, __b);
1910 static vector int __attribute__((__always_inline__))
1911 vec_cts(vector float __a, int __b) {
1912 return __builtin_altivec_vctsxs(__a, __b);
1917 static vector int __attribute__((__always_inline__))
1918 vec_vctsxs(vector float __a, int __b) {
1919 return __builtin_altivec_vctsxs(__a, __b);
1924 static vector unsigned int __attribute__((__always_inline__))
1925 vec_ctu(vector float __a, int __b) {
1926 return __builtin_altivec_vctuxs(__a, __b);
1931 static vector unsigned int __attribute__((__always_inline__))
1932 vec_vctuxs(vector float __a, int __b) {
1933 return __builtin_altivec_vctuxs(__a, __b);
1939 static vector double __ATTRS_o_ai vec_double (vector signed long long __a) {
1940 vector double __ret = { __a[0], __a[1] };
1944 static vector double __ATTRS_o_ai vec_double (vector unsigned long long __a) {
1945 vector double __ret = { __a[0], __a[1] };
1952 /* Integer vector divides (vectors are scalarized, elements divided
1953 and the vectors reassembled).
1955 static vector signed char __ATTRS_o_ai vec_div(vector signed char __a,
1956 vector signed char __b) {
1960 static vector unsigned char __ATTRS_o_ai vec_div(vector unsigned char __a,
1961 vector unsigned char __b) {
1965 static vector signed short __ATTRS_o_ai vec_div(vector signed short __a,
1966 vector signed short __b) {
1970 static vector unsigned short __ATTRS_o_ai vec_div(vector unsigned short __a,
1971 vector unsigned short __b) {
1975 static vector signed int __ATTRS_o_ai vec_div(vector signed int __a,
1976 vector signed int __b) {
1980 static vector unsigned int __ATTRS_o_ai vec_div(vector unsigned int __a,
1981 vector unsigned int __b) {
1986 static vector signed long long __ATTRS_o_ai
1987 vec_div(vector signed long long __a, vector signed long long __b) {
1991 static vector unsigned long long __ATTRS_o_ai
1992 vec_div(vector unsigned long long __a, vector unsigned long long __b) {
1996 static vector float __ATTRS_o_ai vec_div(vector float __a, vector float __b) {
2000 static vector double __ATTRS_o_ai vec_div(vector double __a,
2001 vector double __b) {
2008 static void __attribute__((__always_inline__)) vec_dss(int __a) {
2009 __builtin_altivec_dss(__a);
2014 static void __attribute__((__always_inline__)) vec_dssall(void) {
2015 __builtin_altivec_dssall();
2020 static void __attribute__((__always_inline__))
2021 vec_dst(const void *__a, int __b, int __c) {
2022 __builtin_altivec_dst(__a, __b, __c);
2027 static void __attribute__((__always_inline__))
2028 vec_dstst(const void *__a, int __b, int __c) {
2029 __builtin_altivec_dstst(__a, __b, __c);
2034 static void __attribute__((__always_inline__))
2035 vec_dststt(const void *__a, int __b, int __c) {
2036 __builtin_altivec_dststt(__a, __b, __c);
2041 static void __attribute__((__always_inline__))
2042 vec_dstt(const void *__a, int __b, int __c) {
2043 __builtin_altivec_dstt(__a, __b, __c);
2048 #ifdef __POWER8_VECTOR__
2049 static vector signed char __ATTRS_o_ai vec_eqv(vector signed char __a,
2050 vector signed char __b) {
2051 return (vector signed char)__builtin_vsx_xxleqv((vector unsigned int)__a,
2052 (vector unsigned int)__b);
2055 static vector unsigned char __ATTRS_o_ai vec_eqv(vector unsigned char __a,
2056 vector unsigned char __b) {
2057 return (vector unsigned char)__builtin_vsx_xxleqv((vector unsigned int)__a,
2058 (vector unsigned int)__b);
2061 static vector bool char __ATTRS_o_ai vec_eqv(vector bool char __a,
2062 vector bool char __b) {
2063 return (vector bool char)__builtin_vsx_xxleqv((vector unsigned int)__a,
2064 (vector unsigned int)__b);
2067 static vector signed short __ATTRS_o_ai vec_eqv(vector signed short __a,
2068 vector signed short __b) {
2069 return (vector signed short)__builtin_vsx_xxleqv((vector unsigned int)__a,
2070 (vector unsigned int)__b);
2073 static vector unsigned short __ATTRS_o_ai vec_eqv(vector unsigned short __a,
2074 vector unsigned short __b) {
2075 return (vector unsigned short)__builtin_vsx_xxleqv((vector unsigned int)__a,
2076 (vector unsigned int)__b);
2079 static vector bool short __ATTRS_o_ai vec_eqv(vector bool short __a,
2080 vector bool short __b) {
2081 return (vector bool short)__builtin_vsx_xxleqv((vector unsigned int)__a,
2082 (vector unsigned int)__b);
2085 static vector signed int __ATTRS_o_ai vec_eqv(vector signed int __a,
2086 vector signed int __b) {
2087 return (vector signed int)__builtin_vsx_xxleqv((vector unsigned int)__a,
2088 (vector unsigned int)__b);
2091 static vector unsigned int __ATTRS_o_ai vec_eqv(vector unsigned int __a,
2092 vector unsigned int __b) {
2093 return __builtin_vsx_xxleqv(__a, __b);
2096 static vector bool int __ATTRS_o_ai vec_eqv(vector bool int __a,
2097 vector bool int __b) {
2098 return (vector bool int)__builtin_vsx_xxleqv((vector unsigned int)__a,
2099 (vector unsigned int)__b);
2102 static vector signed long long __ATTRS_o_ai
2103 vec_eqv(vector signed long long __a, vector signed long long __b) {
2104 return (vector signed long long)
2105 __builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b);
2108 static vector unsigned long long __ATTRS_o_ai
2109 vec_eqv(vector unsigned long long __a, vector unsigned long long __b) {
2110 return (vector unsigned long long)
2111 __builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b);
2114 static vector bool long long __ATTRS_o_ai
2115 vec_eqv(vector bool long long __a, vector bool long long __b) {
2116 return (vector bool long long)
2117 __builtin_vsx_xxleqv((vector unsigned int)__a, (vector unsigned int)__b);
2120 static vector float __ATTRS_o_ai vec_eqv(vector float __a, vector float __b) {
2121 return (vector float)__builtin_vsx_xxleqv((vector unsigned int)__a,
2122 (vector unsigned int)__b);
2125 static vector double __ATTRS_o_ai vec_eqv(vector double __a,
2126 vector double __b) {
2127 return (vector double)__builtin_vsx_xxleqv((vector unsigned int)__a,
2128 (vector unsigned int)__b);
2134 static vector float __attribute__((__always_inline__))
2135 vec_expte(vector float __a) {
2136 return __builtin_altivec_vexptefp(__a);
2141 static vector float __attribute__((__always_inline__))
2142 vec_vexptefp(vector float __a) {
2143 return __builtin_altivec_vexptefp(__a);
2148 static vector float __ATTRS_o_ai vec_floor(vector float __a) {
2150 return __builtin_vsx_xvrspim(__a);
2152 return __builtin_altivec_vrfim(__a);
2157 static vector double __ATTRS_o_ai vec_floor(vector double __a) {
2158 return __builtin_vsx_xvrdpim(__a);
2164 static vector float __attribute__((__always_inline__))
2165 vec_vrfim(vector float __a) {
2166 return __builtin_altivec_vrfim(__a);
2171 static vector signed char __ATTRS_o_ai vec_ld(int __a,
2172 const vector signed char *__b) {
2173 return (vector signed char)__builtin_altivec_lvx(__a, __b);
2176 static vector signed char __ATTRS_o_ai vec_ld(int __a, const signed char *__b) {
2177 return (vector signed char)__builtin_altivec_lvx(__a, __b);
2180 static vector unsigned char __ATTRS_o_ai
2181 vec_ld(int __a, const vector unsigned char *__b) {
2182 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
2185 static vector unsigned char __ATTRS_o_ai vec_ld(int __a,
2186 const unsigned char *__b) {
2187 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
2190 static vector bool char __ATTRS_o_ai vec_ld(int __a,
2191 const vector bool char *__b) {
2192 return (vector bool char)__builtin_altivec_lvx(__a, __b);
2195 static vector short __ATTRS_o_ai vec_ld(int __a, const vector short *__b) {
2196 return (vector short)__builtin_altivec_lvx(__a, __b);
2199 static vector short __ATTRS_o_ai vec_ld(int __a, const short *__b) {
2200 return (vector short)__builtin_altivec_lvx(__a, __b);
2203 static vector unsigned short __ATTRS_o_ai
2204 vec_ld(int __a, const vector unsigned short *__b) {
2205 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
2208 static vector unsigned short __ATTRS_o_ai vec_ld(int __a,
2209 const unsigned short *__b) {
2210 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
2213 static vector bool short __ATTRS_o_ai vec_ld(int __a,
2214 const vector bool short *__b) {
2215 return (vector bool short)__builtin_altivec_lvx(__a, __b);
2218 static vector pixel __ATTRS_o_ai vec_ld(int __a, const vector pixel *__b) {
2219 return (vector pixel)__builtin_altivec_lvx(__a, __b);
2222 static vector int __ATTRS_o_ai vec_ld(int __a, const vector int *__b) {
2223 return (vector int)__builtin_altivec_lvx(__a, __b);
2226 static vector int __ATTRS_o_ai vec_ld(int __a, const int *__b) {
2227 return (vector int)__builtin_altivec_lvx(__a, __b);
2230 static vector unsigned int __ATTRS_o_ai vec_ld(int __a,
2231 const vector unsigned int *__b) {
2232 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2235 static vector unsigned int __ATTRS_o_ai vec_ld(int __a,
2236 const unsigned int *__b) {
2237 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2240 static vector bool int __ATTRS_o_ai vec_ld(int __a,
2241 const vector bool int *__b) {
2242 return (vector bool int)__builtin_altivec_lvx(__a, __b);
2245 static vector float __ATTRS_o_ai vec_ld(int __a, const vector float *__b) {
2246 return (vector float)__builtin_altivec_lvx(__a, __b);
2249 static vector float __ATTRS_o_ai vec_ld(int __a, const float *__b) {
2250 return (vector float)__builtin_altivec_lvx(__a, __b);
2255 static vector signed char __ATTRS_o_ai vec_lvx(int __a,
2256 const vector signed char *__b) {
2257 return (vector signed char)__builtin_altivec_lvx(__a, __b);
2260 static vector signed char __ATTRS_o_ai vec_lvx(int __a,
2261 const signed char *__b) {
2262 return (vector signed char)__builtin_altivec_lvx(__a, __b);
2265 static vector unsigned char __ATTRS_o_ai
2266 vec_lvx(int __a, const vector unsigned char *__b) {
2267 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
2270 static vector unsigned char __ATTRS_o_ai vec_lvx(int __a,
2271 const unsigned char *__b) {
2272 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
2275 static vector bool char __ATTRS_o_ai vec_lvx(int __a,
2276 const vector bool char *__b) {
2277 return (vector bool char)__builtin_altivec_lvx(__a, __b);
2280 static vector short __ATTRS_o_ai vec_lvx(int __a, const vector short *__b) {
2281 return (vector short)__builtin_altivec_lvx(__a, __b);
2284 static vector short __ATTRS_o_ai vec_lvx(int __a, const short *__b) {
2285 return (vector short)__builtin_altivec_lvx(__a, __b);
2288 static vector unsigned short __ATTRS_o_ai
2289 vec_lvx(int __a, const vector unsigned short *__b) {
2290 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
2293 static vector unsigned short __ATTRS_o_ai vec_lvx(int __a,
2294 const unsigned short *__b) {
2295 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
2298 static vector bool short __ATTRS_o_ai vec_lvx(int __a,
2299 const vector bool short *__b) {
2300 return (vector bool short)__builtin_altivec_lvx(__a, __b);
2303 static vector pixel __ATTRS_o_ai vec_lvx(int __a, const vector pixel *__b) {
2304 return (vector pixel)__builtin_altivec_lvx(__a, __b);
2307 static vector int __ATTRS_o_ai vec_lvx(int __a, const vector int *__b) {
2308 return (vector int)__builtin_altivec_lvx(__a, __b);
2311 static vector int __ATTRS_o_ai vec_lvx(int __a, const int *__b) {
2312 return (vector int)__builtin_altivec_lvx(__a, __b);
2315 static vector unsigned int __ATTRS_o_ai
2316 vec_lvx(int __a, const vector unsigned int *__b) {
2317 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2320 static vector unsigned int __ATTRS_o_ai vec_lvx(int __a,
2321 const unsigned int *__b) {
2322 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
2325 static vector bool int __ATTRS_o_ai vec_lvx(int __a,
2326 const vector bool int *__b) {
2327 return (vector bool int)__builtin_altivec_lvx(__a, __b);
2330 static vector float __ATTRS_o_ai vec_lvx(int __a, const vector float *__b) {
2331 return (vector float)__builtin_altivec_lvx(__a, __b);
2334 static vector float __ATTRS_o_ai vec_lvx(int __a, const float *__b) {
2335 return (vector float)__builtin_altivec_lvx(__a, __b);
2340 static vector signed char __ATTRS_o_ai vec_lde(int __a,
2341 const signed char *__b) {
2342 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
2345 static vector unsigned char __ATTRS_o_ai vec_lde(int __a,
2346 const unsigned char *__b) {
2347 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
2350 static vector short __ATTRS_o_ai vec_lde(int __a, const short *__b) {
2351 return (vector short)__builtin_altivec_lvehx(__a, __b);
2354 static vector unsigned short __ATTRS_o_ai vec_lde(int __a,
2355 const unsigned short *__b) {
2356 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
2359 static vector int __ATTRS_o_ai vec_lde(int __a, const int *__b) {
2360 return (vector int)__builtin_altivec_lvewx(__a, __b);
2363 static vector unsigned int __ATTRS_o_ai vec_lde(int __a,
2364 const unsigned int *__b) {
2365 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2368 static vector float __ATTRS_o_ai vec_lde(int __a, const float *__b) {
2369 return (vector float)__builtin_altivec_lvewx(__a, __b);
2374 static vector signed char __ATTRS_o_ai vec_lvebx(int __a,
2375 const signed char *__b) {
2376 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
2379 static vector unsigned char __ATTRS_o_ai vec_lvebx(int __a,
2380 const unsigned char *__b) {
2381 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
2386 static vector short __ATTRS_o_ai vec_lvehx(int __a, const short *__b) {
2387 return (vector short)__builtin_altivec_lvehx(__a, __b);
2390 static vector unsigned short __ATTRS_o_ai vec_lvehx(int __a,
2391 const unsigned short *__b) {
2392 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
2397 static vector int __ATTRS_o_ai vec_lvewx(int __a, const int *__b) {
2398 return (vector int)__builtin_altivec_lvewx(__a, __b);
2401 static vector unsigned int __ATTRS_o_ai vec_lvewx(int __a,
2402 const unsigned int *__b) {
2403 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2406 static vector float __ATTRS_o_ai vec_lvewx(int __a, const float *__b) {
2407 return (vector float)__builtin_altivec_lvewx(__a, __b);
2412 static vector signed char __ATTRS_o_ai vec_ldl(int __a,
2413 const vector signed char *__b) {
2414 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2417 static vector signed char __ATTRS_o_ai vec_ldl(int __a,
2418 const signed char *__b) {
2419 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2422 static vector unsigned char __ATTRS_o_ai
2423 vec_ldl(int __a, const vector unsigned char *__b) {
2424 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2427 static vector unsigned char __ATTRS_o_ai vec_ldl(int __a,
2428 const unsigned char *__b) {
2429 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2432 static vector bool char __ATTRS_o_ai vec_ldl(int __a,
2433 const vector bool char *__b) {
2434 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2437 static vector short __ATTRS_o_ai vec_ldl(int __a, const vector short *__b) {
2438 return (vector short)__builtin_altivec_lvxl(__a, __b);
2441 static vector short __ATTRS_o_ai vec_ldl(int __a, const short *__b) {
2442 return (vector short)__builtin_altivec_lvxl(__a, __b);
2445 static vector unsigned short __ATTRS_o_ai
2446 vec_ldl(int __a, const vector unsigned short *__b) {
2447 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2450 static vector unsigned short __ATTRS_o_ai vec_ldl(int __a,
2451 const unsigned short *__b) {
2452 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2455 static vector bool short __ATTRS_o_ai vec_ldl(int __a,
2456 const vector bool short *__b) {
2457 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2460 static vector pixel __ATTRS_o_ai vec_ldl(int __a, const vector pixel *__b) {
2461 return (vector pixel short)__builtin_altivec_lvxl(__a, __b);
2464 static vector int __ATTRS_o_ai vec_ldl(int __a, const vector int *__b) {
2465 return (vector int)__builtin_altivec_lvxl(__a, __b);
2468 static vector int __ATTRS_o_ai vec_ldl(int __a, const int *__b) {
2469 return (vector int)__builtin_altivec_lvxl(__a, __b);
2472 static vector unsigned int __ATTRS_o_ai
2473 vec_ldl(int __a, const vector unsigned int *__b) {
2474 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2477 static vector unsigned int __ATTRS_o_ai vec_ldl(int __a,
2478 const unsigned int *__b) {
2479 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2482 static vector bool int __ATTRS_o_ai vec_ldl(int __a,
2483 const vector bool int *__b) {
2484 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2487 static vector float __ATTRS_o_ai vec_ldl(int __a, const vector float *__b) {
2488 return (vector float)__builtin_altivec_lvxl(__a, __b);
2491 static vector float __ATTRS_o_ai vec_ldl(int __a, const float *__b) {
2492 return (vector float)__builtin_altivec_lvxl(__a, __b);
2497 static vector signed char __ATTRS_o_ai vec_lvxl(int __a,
2498 const vector signed char *__b) {
2499 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2502 static vector signed char __ATTRS_o_ai vec_lvxl(int __a,
2503 const signed char *__b) {
2504 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2507 static vector unsigned char __ATTRS_o_ai
2508 vec_lvxl(int __a, const vector unsigned char *__b) {
2509 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2512 static vector unsigned char __ATTRS_o_ai vec_lvxl(int __a,
2513 const unsigned char *__b) {
2514 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2517 static vector bool char __ATTRS_o_ai vec_lvxl(int __a,
2518 const vector bool char *__b) {
2519 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2522 static vector short __ATTRS_o_ai vec_lvxl(int __a, const vector short *__b) {
2523 return (vector short)__builtin_altivec_lvxl(__a, __b);
2526 static vector short __ATTRS_o_ai vec_lvxl(int __a, const short *__b) {
2527 return (vector short)__builtin_altivec_lvxl(__a, __b);
2530 static vector unsigned short __ATTRS_o_ai
2531 vec_lvxl(int __a, const vector unsigned short *__b) {
2532 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2535 static vector unsigned short __ATTRS_o_ai vec_lvxl(int __a,
2536 const unsigned short *__b) {
2537 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2540 static vector bool short __ATTRS_o_ai vec_lvxl(int __a,
2541 const vector bool short *__b) {
2542 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2545 static vector pixel __ATTRS_o_ai vec_lvxl(int __a, const vector pixel *__b) {
2546 return (vector pixel)__builtin_altivec_lvxl(__a, __b);
2549 static vector int __ATTRS_o_ai vec_lvxl(int __a, const vector int *__b) {
2550 return (vector int)__builtin_altivec_lvxl(__a, __b);
2553 static vector int __ATTRS_o_ai vec_lvxl(int __a, const int *__b) {
2554 return (vector int)__builtin_altivec_lvxl(__a, __b);
2557 static vector unsigned int __ATTRS_o_ai
2558 vec_lvxl(int __a, const vector unsigned int *__b) {
2559 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2562 static vector unsigned int __ATTRS_o_ai vec_lvxl(int __a,
2563 const unsigned int *__b) {
2564 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2567 static vector bool int __ATTRS_o_ai vec_lvxl(int __a,
2568 const vector bool int *__b) {
2569 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2572 static vector float __ATTRS_o_ai vec_lvxl(int __a, const vector float *__b) {
2573 return (vector float)__builtin_altivec_lvxl(__a, __b);
2576 static vector float __ATTRS_o_ai vec_lvxl(int __a, const float *__b) {
2577 return (vector float)__builtin_altivec_lvxl(__a, __b);
2582 static vector float __attribute__((__always_inline__))
2583 vec_loge(vector float __a) {
2584 return __builtin_altivec_vlogefp(__a);
2589 static vector float __attribute__((__always_inline__))
2590 vec_vlogefp(vector float __a) {
2591 return __builtin_altivec_vlogefp(__a);
2596 #ifdef __LITTLE_ENDIAN__
2597 static vector unsigned char __ATTRS_o_ai
2598 __attribute__((__deprecated__("use assignment for unaligned little endian \
2599 loads/stores"))) vec_lvsl(int __a, const signed char *__b) {
2600 vector unsigned char mask =
2601 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2602 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2603 7, 6, 5, 4, 3, 2, 1, 0};
2604 return vec_perm(mask, mask, reverse);
2607 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2608 const signed char *__b) {
2609 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2613 #ifdef __LITTLE_ENDIAN__
2614 static vector unsigned char __ATTRS_o_ai
2615 __attribute__((__deprecated__("use assignment for unaligned little endian \
2616 loads/stores"))) vec_lvsl(int __a, const unsigned char *__b) {
2617 vector unsigned char mask =
2618 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2619 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2620 7, 6, 5, 4, 3, 2, 1, 0};
2621 return vec_perm(mask, mask, reverse);
2624 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2625 const unsigned char *__b) {
2626 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2630 #ifdef __LITTLE_ENDIAN__
2631 static vector unsigned char __ATTRS_o_ai
2632 __attribute__((__deprecated__("use assignment for unaligned little endian \
2633 loads/stores"))) vec_lvsl(int __a, const short *__b) {
2634 vector unsigned char mask =
2635 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2636 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2637 7, 6, 5, 4, 3, 2, 1, 0};
2638 return vec_perm(mask, mask, reverse);
2641 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const short *__b) {
2642 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2646 #ifdef __LITTLE_ENDIAN__
2647 static vector unsigned char __ATTRS_o_ai
2648 __attribute__((__deprecated__("use assignment for unaligned little endian \
2649 loads/stores"))) vec_lvsl(int __a, const unsigned short *__b) {
2650 vector unsigned char mask =
2651 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2652 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2653 7, 6, 5, 4, 3, 2, 1, 0};
2654 return vec_perm(mask, mask, reverse);
2657 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2658 const unsigned short *__b) {
2659 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2663 #ifdef __LITTLE_ENDIAN__
2664 static vector unsigned char __ATTRS_o_ai
2665 __attribute__((__deprecated__("use assignment for unaligned little endian \
2666 loads/stores"))) vec_lvsl(int __a, const int *__b) {
2667 vector unsigned char mask =
2668 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2669 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2670 7, 6, 5, 4, 3, 2, 1, 0};
2671 return vec_perm(mask, mask, reverse);
2674 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const int *__b) {
2675 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2679 #ifdef __LITTLE_ENDIAN__
2680 static vector unsigned char __ATTRS_o_ai
2681 __attribute__((__deprecated__("use assignment for unaligned little endian \
2682 loads/stores"))) vec_lvsl(int __a, const unsigned int *__b) {
2683 vector unsigned char mask =
2684 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2685 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2686 7, 6, 5, 4, 3, 2, 1, 0};
2687 return vec_perm(mask, mask, reverse);
2690 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a,
2691 const unsigned int *__b) {
2692 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2696 #ifdef __LITTLE_ENDIAN__
2697 static vector unsigned char __ATTRS_o_ai
2698 __attribute__((__deprecated__("use assignment for unaligned little endian \
2699 loads/stores"))) vec_lvsl(int __a, const float *__b) {
2700 vector unsigned char mask =
2701 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2702 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2703 7, 6, 5, 4, 3, 2, 1, 0};
2704 return vec_perm(mask, mask, reverse);
2707 static vector unsigned char __ATTRS_o_ai vec_lvsl(int __a, const float *__b) {
2708 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2714 #ifdef __LITTLE_ENDIAN__
2715 static vector unsigned char __ATTRS_o_ai
2716 __attribute__((__deprecated__("use assignment for unaligned little endian \
2717 loads/stores"))) vec_lvsr(int __a, const signed char *__b) {
2718 vector unsigned char mask =
2719 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2720 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2721 7, 6, 5, 4, 3, 2, 1, 0};
2722 return vec_perm(mask, mask, reverse);
2725 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2726 const signed char *__b) {
2727 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2731 #ifdef __LITTLE_ENDIAN__
2732 static vector unsigned char __ATTRS_o_ai
2733 __attribute__((__deprecated__("use assignment for unaligned little endian \
2734 loads/stores"))) vec_lvsr(int __a, const unsigned char *__b) {
2735 vector unsigned char mask =
2736 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2737 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2738 7, 6, 5, 4, 3, 2, 1, 0};
2739 return vec_perm(mask, mask, reverse);
2742 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2743 const unsigned char *__b) {
2744 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2748 #ifdef __LITTLE_ENDIAN__
2749 static vector unsigned char __ATTRS_o_ai
2750 __attribute__((__deprecated__("use assignment for unaligned little endian \
2751 loads/stores"))) vec_lvsr(int __a, const short *__b) {
2752 vector unsigned char mask =
2753 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2754 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2755 7, 6, 5, 4, 3, 2, 1, 0};
2756 return vec_perm(mask, mask, reverse);
2759 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const short *__b) {
2760 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2764 #ifdef __LITTLE_ENDIAN__
2765 static vector unsigned char __ATTRS_o_ai
2766 __attribute__((__deprecated__("use assignment for unaligned little endian \
2767 loads/stores"))) vec_lvsr(int __a, const unsigned short *__b) {
2768 vector unsigned char mask =
2769 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2770 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2771 7, 6, 5, 4, 3, 2, 1, 0};
2772 return vec_perm(mask, mask, reverse);
2775 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2776 const unsigned short *__b) {
2777 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2781 #ifdef __LITTLE_ENDIAN__
2782 static vector unsigned char __ATTRS_o_ai
2783 __attribute__((__deprecated__("use assignment for unaligned little endian \
2784 loads/stores"))) vec_lvsr(int __a, const int *__b) {
2785 vector unsigned char mask =
2786 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2787 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2788 7, 6, 5, 4, 3, 2, 1, 0};
2789 return vec_perm(mask, mask, reverse);
2792 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const int *__b) {
2793 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2797 #ifdef __LITTLE_ENDIAN__
2798 static vector unsigned char __ATTRS_o_ai
2799 __attribute__((__deprecated__("use assignment for unaligned little endian \
2800 loads/stores"))) vec_lvsr(int __a, const unsigned int *__b) {
2801 vector unsigned char mask =
2802 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2803 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2804 7, 6, 5, 4, 3, 2, 1, 0};
2805 return vec_perm(mask, mask, reverse);
2808 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a,
2809 const unsigned int *__b) {
2810 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2814 #ifdef __LITTLE_ENDIAN__
2815 static vector unsigned char __ATTRS_o_ai
2816 __attribute__((__deprecated__("use assignment for unaligned little endian \
2817 loads/stores"))) vec_lvsr(int __a, const float *__b) {
2818 vector unsigned char mask =
2819 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2820 vector unsigned char reverse = {15, 14, 13, 12, 11, 10, 9, 8,
2821 7, 6, 5, 4, 3, 2, 1, 0};
2822 return vec_perm(mask, mask, reverse);
2825 static vector unsigned char __ATTRS_o_ai vec_lvsr(int __a, const float *__b) {
2826 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2831 static vector signed short __ATTRS_o_ai
2832 vec_mladd(vector signed short, vector signed short, vector signed short);
2833 static vector signed short __ATTRS_o_ai
2834 vec_mladd(vector signed short, vector unsigned short, vector unsigned short);
2835 static vector signed short __ATTRS_o_ai
2836 vec_mladd(vector unsigned short, vector signed short, vector signed short);
2837 static vector unsigned short __ATTRS_o_ai
2838 vec_mladd(vector unsigned short, vector unsigned short, vector unsigned short);
2840 static vector signed short __ATTRS_o_ai
2841 vec_madd(vector signed short __a, vector signed short __b,
2842 vector signed short __c) {
2843 return vec_mladd(__a, __b, __c);
2846 static vector signed short __ATTRS_o_ai
2847 vec_madd(vector signed short __a, vector unsigned short __b,
2848 vector unsigned short __c) {
2849 return vec_mladd(__a, __b, __c);
2852 static vector signed short __ATTRS_o_ai
2853 vec_madd(vector unsigned short __a, vector signed short __b,
2854 vector signed short __c) {
2855 return vec_mladd(__a, __b, __c);
2858 static vector unsigned short __ATTRS_o_ai
2859 vec_madd(vector unsigned short __a, vector unsigned short __b,
2860 vector unsigned short __c) {
2861 return vec_mladd(__a, __b, __c);
2864 static vector float __ATTRS_o_ai
2865 vec_madd(vector float __a, vector float __b, vector float __c) {
2867 return __builtin_vsx_xvmaddasp(__a, __b, __c);
2869 return __builtin_altivec_vmaddfp(__a, __b, __c);
2874 static vector double __ATTRS_o_ai
2875 vec_madd(vector double __a, vector double __b, vector double __c) {
2876 return __builtin_vsx_xvmaddadp(__a, __b, __c);
2882 static vector float __attribute__((__always_inline__))
2883 vec_vmaddfp(vector float __a, vector float __b, vector float __c) {
2884 return __builtin_altivec_vmaddfp(__a, __b, __c);
2889 static vector signed short __attribute__((__always_inline__))
2890 vec_madds(vector signed short __a, vector signed short __b,
2891 vector signed short __c) {
2892 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2896 static vector signed short __attribute__((__always_inline__))
2897 vec_vmhaddshs(vector signed short __a, vector signed short __b,
2898 vector signed short __c) {
2899 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2905 static vector float __ATTRS_o_ai
2906 vec_msub(vector float __a, vector float __b, vector float __c) {
2907 return __builtin_vsx_xvmsubasp(__a, __b, __c);
2910 static vector double __ATTRS_o_ai
2911 vec_msub(vector double __a, vector double __b, vector double __c) {
2912 return __builtin_vsx_xvmsubadp(__a, __b, __c);
2918 static vector signed char __ATTRS_o_ai vec_max(vector signed char __a,
2919 vector signed char __b) {
2920 return __builtin_altivec_vmaxsb(__a, __b);
2923 static vector signed char __ATTRS_o_ai vec_max(vector bool char __a,
2924 vector signed char __b) {
2925 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2928 static vector signed char __ATTRS_o_ai vec_max(vector signed char __a,
2929 vector bool char __b) {
2930 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2933 static vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a,
2934 vector unsigned char __b) {
2935 return __builtin_altivec_vmaxub(__a, __b);
2938 static vector unsigned char __ATTRS_o_ai vec_max(vector bool char __a,
2939 vector unsigned char __b) {
2940 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2943 static vector unsigned char __ATTRS_o_ai vec_max(vector unsigned char __a,
2944 vector bool char __b) {
2945 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2948 static vector short __ATTRS_o_ai vec_max(vector short __a, vector short __b) {
2949 return __builtin_altivec_vmaxsh(__a, __b);
2952 static vector short __ATTRS_o_ai vec_max(vector bool short __a,
2954 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2957 static vector short __ATTRS_o_ai vec_max(vector short __a,
2958 vector bool short __b) {
2959 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2962 static vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a,
2963 vector unsigned short __b) {
2964 return __builtin_altivec_vmaxuh(__a, __b);
2967 static vector unsigned short __ATTRS_o_ai vec_max(vector bool short __a,
2968 vector unsigned short __b) {
2969 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2972 static vector unsigned short __ATTRS_o_ai vec_max(vector unsigned short __a,
2973 vector bool short __b) {
2974 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2977 static vector int __ATTRS_o_ai vec_max(vector int __a, vector int __b) {
2978 return __builtin_altivec_vmaxsw(__a, __b);
2981 static vector int __ATTRS_o_ai vec_max(vector bool int __a, vector int __b) {
2982 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2985 static vector int __ATTRS_o_ai vec_max(vector int __a, vector bool int __b) {
2986 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2989 static vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a,
2990 vector unsigned int __b) {
2991 return __builtin_altivec_vmaxuw(__a, __b);
2994 static vector unsigned int __ATTRS_o_ai vec_max(vector bool int __a,
2995 vector unsigned int __b) {
2996 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2999 static vector unsigned int __ATTRS_o_ai vec_max(vector unsigned int __a,
3000 vector bool int __b) {
3001 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
3004 #ifdef __POWER8_VECTOR__
3005 static vector signed long long __ATTRS_o_ai
3006 vec_max(vector signed long long __a, vector signed long long __b) {
3007 return __builtin_altivec_vmaxsd(__a, __b);
3010 static vector signed long long __ATTRS_o_ai
3011 vec_max(vector bool long long __a, vector signed long long __b) {
3012 return __builtin_altivec_vmaxsd((vector signed long long)__a, __b);
3015 static vector signed long long __ATTRS_o_ai vec_max(vector signed long long __a,
3016 vector bool long long __b) {
3017 return __builtin_altivec_vmaxsd(__a, (vector signed long long)__b);
3020 static vector unsigned long long __ATTRS_o_ai
3021 vec_max(vector unsigned long long __a, vector unsigned long long __b) {
3022 return __builtin_altivec_vmaxud(__a, __b);
3025 static vector unsigned long long __ATTRS_o_ai
3026 vec_max(vector bool long long __a, vector unsigned long long __b) {
3027 return __builtin_altivec_vmaxud((vector unsigned long long)__a, __b);
3030 static vector unsigned long long __ATTRS_o_ai
3031 vec_max(vector unsigned long long __a, vector bool long long __b) {
3032 return __builtin_altivec_vmaxud(__a, (vector unsigned long long)__b);
3036 static vector float __ATTRS_o_ai vec_max(vector float __a, vector float __b) {
3038 return __builtin_vsx_xvmaxsp(__a, __b);
3040 return __builtin_altivec_vmaxfp(__a, __b);
3045 static vector double __ATTRS_o_ai vec_max(vector double __a,
3046 vector double __b) {
3047 return __builtin_vsx_xvmaxdp(__a, __b);
3053 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a,
3054 vector signed char __b) {
3055 return __builtin_altivec_vmaxsb(__a, __b);
3058 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector bool char __a,
3059 vector signed char __b) {
3060 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
3063 static vector signed char __ATTRS_o_ai vec_vmaxsb(vector signed char __a,
3064 vector bool char __b) {
3065 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
3070 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a,
3071 vector unsigned char __b) {
3072 return __builtin_altivec_vmaxub(__a, __b);
3075 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector bool char __a,
3076 vector unsigned char __b) {
3077 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
3080 static vector unsigned char __ATTRS_o_ai vec_vmaxub(vector unsigned char __a,
3081 vector bool char __b) {
3082 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
3087 static vector short __ATTRS_o_ai vec_vmaxsh(vector short __a,
3089 return __builtin_altivec_vmaxsh(__a, __b);
3092 static vector short __ATTRS_o_ai vec_vmaxsh(vector bool short __a,
3094 return __builtin_altivec_vmaxsh((vector short)__a, __b);
3097 static vector short __ATTRS_o_ai vec_vmaxsh(vector short __a,
3098 vector bool short __b) {
3099 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
3104 static vector unsigned short __ATTRS_o_ai
3105 vec_vmaxuh(vector unsigned short __a, vector unsigned short __b) {
3106 return __builtin_altivec_vmaxuh(__a, __b);
3109 static vector unsigned short __ATTRS_o_ai
3110 vec_vmaxuh(vector bool short __a, vector unsigned short __b) {
3111 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
3114 static vector unsigned short __ATTRS_o_ai vec_vmaxuh(vector unsigned short __a,
3115 vector bool short __b) {
3116 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
3121 static vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector int __b) {
3122 return __builtin_altivec_vmaxsw(__a, __b);
3125 static vector int __ATTRS_o_ai vec_vmaxsw(vector bool int __a, vector int __b) {
3126 return __builtin_altivec_vmaxsw((vector int)__a, __b);
3129 static vector int __ATTRS_o_ai vec_vmaxsw(vector int __a, vector bool int __b) {
3130 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
3135 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a,
3136 vector unsigned int __b) {
3137 return __builtin_altivec_vmaxuw(__a, __b);
3140 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector bool int __a,
3141 vector unsigned int __b) {
3142 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
3145 static vector unsigned int __ATTRS_o_ai vec_vmaxuw(vector unsigned int __a,
3146 vector bool int __b) {
3147 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
3152 static vector float __attribute__((__always_inline__))
3153 vec_vmaxfp(vector float __a, vector float __b) {
3155 return __builtin_vsx_xvmaxsp(__a, __b);
3157 return __builtin_altivec_vmaxfp(__a, __b);
3163 static vector signed char __ATTRS_o_ai vec_mergeh(vector signed char __a,
3164 vector signed char __b) {
3165 return vec_perm(__a, __b,
3166 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3167 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3168 0x06, 0x16, 0x07, 0x17));
3171 static vector unsigned char __ATTRS_o_ai vec_mergeh(vector unsigned char __a,
3172 vector unsigned char __b) {
3173 return vec_perm(__a, __b,
3174 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3175 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3176 0x06, 0x16, 0x07, 0x17));
3179 static vector bool char __ATTRS_o_ai vec_mergeh(vector bool char __a,
3180 vector bool char __b) {
3181 return vec_perm(__a, __b,
3182 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3183 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3184 0x06, 0x16, 0x07, 0x17));
3187 static vector short __ATTRS_o_ai vec_mergeh(vector short __a,
3189 return vec_perm(__a, __b,
3190 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3191 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3192 0x06, 0x07, 0x16, 0x17));
3195 static vector unsigned short __ATTRS_o_ai
3196 vec_mergeh(vector unsigned short __a, vector unsigned short __b) {
3197 return vec_perm(__a, __b,
3198 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3199 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3200 0x06, 0x07, 0x16, 0x17));
3203 static vector bool short __ATTRS_o_ai vec_mergeh(vector bool short __a,
3204 vector bool short __b) {
3205 return vec_perm(__a, __b,
3206 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3207 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3208 0x06, 0x07, 0x16, 0x17));
3211 static vector pixel __ATTRS_o_ai vec_mergeh(vector pixel __a,
3213 return vec_perm(__a, __b,
3214 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3215 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3216 0x06, 0x07, 0x16, 0x17));
3219 static vector int __ATTRS_o_ai vec_mergeh(vector int __a, vector int __b) {
3220 return vec_perm(__a, __b,
3221 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3222 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3223 0x14, 0x15, 0x16, 0x17));
3226 static vector unsigned int __ATTRS_o_ai vec_mergeh(vector unsigned int __a,
3227 vector unsigned int __b) {
3228 return vec_perm(__a, __b,
3229 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3230 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3231 0x14, 0x15, 0x16, 0x17));
3234 static vector bool int __ATTRS_o_ai vec_mergeh(vector bool int __a,
3235 vector bool int __b) {
3236 return vec_perm(__a, __b,
3237 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3238 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3239 0x14, 0x15, 0x16, 0x17));
3242 static vector float __ATTRS_o_ai vec_mergeh(vector float __a,
3244 return vec_perm(__a, __b,
3245 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3246 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3247 0x14, 0x15, 0x16, 0x17));
3251 static vector signed long long __ATTRS_o_ai
3252 vec_mergeh(vector signed long long __a, vector signed long long __b) {
3253 return vec_perm(__a, __b,
3254 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3255 0x04, 0x05, 0x06, 0x07,
3256 0x10, 0x11, 0x12, 0x13,
3257 0x14, 0x15, 0x16, 0x17));
3260 static vector signed long long __ATTRS_o_ai
3261 vec_mergeh(vector signed long long __a, vector bool long long __b) {
3262 return vec_perm(__a, (vector signed long long)__b,
3263 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3264 0x04, 0x05, 0x06, 0x07,
3265 0x10, 0x11, 0x12, 0x13,
3266 0x14, 0x15, 0x16, 0x17));
3269 static vector signed long long __ATTRS_o_ai
3270 vec_mergeh(vector bool long long __a, vector signed long long __b) {
3271 return vec_perm((vector signed long long)__a, __b,
3272 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3273 0x04, 0x05, 0x06, 0x07,
3274 0x10, 0x11, 0x12, 0x13,
3275 0x14, 0x15, 0x16, 0x17));
3278 static vector unsigned long long __ATTRS_o_ai
3279 vec_mergeh(vector unsigned long long __a, vector unsigned long long __b) {
3280 return vec_perm(__a, __b,
3281 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3282 0x04, 0x05, 0x06, 0x07,
3283 0x10, 0x11, 0x12, 0x13,
3284 0x14, 0x15, 0x16, 0x17));
3287 static vector unsigned long long __ATTRS_o_ai
3288 vec_mergeh(vector unsigned long long __a, vector bool long long __b) {
3289 return vec_perm(__a, (vector unsigned long long)__b,
3290 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3291 0x04, 0x05, 0x06, 0x07,
3292 0x10, 0x11, 0x12, 0x13,
3293 0x14, 0x15, 0x16, 0x17));
3296 static vector unsigned long long __ATTRS_o_ai
3297 vec_mergeh(vector bool long long __a, vector unsigned long long __b) {
3298 return vec_perm((vector unsigned long long)__a, __b,
3299 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3300 0x04, 0x05, 0x06, 0x07,
3301 0x10, 0x11, 0x12, 0x13,
3302 0x14, 0x15, 0x16, 0x17));
3305 static vector bool long long __ATTRS_o_ai
3306 vec_mergeh(vector bool long long __a, vector bool long long __b) {
3307 return vec_perm(__a, __b,
3308 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3309 0x04, 0x05, 0x06, 0x07,
3310 0x10, 0x11, 0x12, 0x13,
3311 0x14, 0x15, 0x16, 0x17));
3314 static vector double __ATTRS_o_ai vec_mergeh(vector double __a,
3315 vector double __b) {
3316 return vec_perm(__a, __b,
3317 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3318 0x04, 0x05, 0x06, 0x07,
3319 0x10, 0x11, 0x12, 0x13,
3320 0x14, 0x15, 0x16, 0x17));
3322 static vector double __ATTRS_o_ai vec_mergeh(vector double __a,
3323 vector bool long long __b) {
3324 return vec_perm(__a, (vector double)__b,
3325 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3326 0x04, 0x05, 0x06, 0x07,
3327 0x10, 0x11, 0x12, 0x13,
3328 0x14, 0x15, 0x16, 0x17));
3330 static vector double __ATTRS_o_ai vec_mergeh(vector bool long long __a,
3331 vector double __b) {
3332 return vec_perm((vector double)__a, __b,
3333 (vector unsigned char)(0x00, 0x01, 0x02, 0x03,
3334 0x04, 0x05, 0x06, 0x07,
3335 0x10, 0x11, 0x12, 0x13,
3336 0x14, 0x15, 0x16, 0x17));
3342 #define __builtin_altivec_vmrghb vec_vmrghb
3344 static vector signed char __ATTRS_o_ai vec_vmrghb(vector signed char __a,
3345 vector signed char __b) {
3346 return vec_perm(__a, __b,
3347 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3348 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3349 0x06, 0x16, 0x07, 0x17));
3352 static vector unsigned char __ATTRS_o_ai vec_vmrghb(vector unsigned char __a,
3353 vector unsigned char __b) {
3354 return vec_perm(__a, __b,
3355 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3356 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3357 0x06, 0x16, 0x07, 0x17));
3360 static vector bool char __ATTRS_o_ai vec_vmrghb(vector bool char __a,
3361 vector bool char __b) {
3362 return vec_perm(__a, __b,
3363 (vector unsigned char)(0x00, 0x10, 0x01, 0x11, 0x02, 0x12,
3364 0x03, 0x13, 0x04, 0x14, 0x05, 0x15,
3365 0x06, 0x16, 0x07, 0x17));
3370 #define __builtin_altivec_vmrghh vec_vmrghh
3372 static vector short __ATTRS_o_ai vec_vmrghh(vector short __a,
3374 return vec_perm(__a, __b,
3375 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3376 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3377 0x06, 0x07, 0x16, 0x17));
3380 static vector unsigned short __ATTRS_o_ai
3381 vec_vmrghh(vector unsigned short __a, vector unsigned short __b) {
3382 return vec_perm(__a, __b,
3383 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3384 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3385 0x06, 0x07, 0x16, 0x17));
3388 static vector bool short __ATTRS_o_ai vec_vmrghh(vector bool short __a,
3389 vector bool short __b) {
3390 return vec_perm(__a, __b,
3391 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3392 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3393 0x06, 0x07, 0x16, 0x17));
3396 static vector pixel __ATTRS_o_ai vec_vmrghh(vector pixel __a,
3398 return vec_perm(__a, __b,
3399 (vector unsigned char)(0x00, 0x01, 0x10, 0x11, 0x02, 0x03,
3400 0x12, 0x13, 0x04, 0x05, 0x14, 0x15,
3401 0x06, 0x07, 0x16, 0x17));
3406 #define __builtin_altivec_vmrghw vec_vmrghw
3408 static vector int __ATTRS_o_ai vec_vmrghw(vector int __a, vector int __b) {
3409 return vec_perm(__a, __b,
3410 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3411 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3412 0x14, 0x15, 0x16, 0x17));
3415 static vector unsigned int __ATTRS_o_ai vec_vmrghw(vector unsigned int __a,
3416 vector unsigned int __b) {
3417 return vec_perm(__a, __b,
3418 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3419 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3420 0x14, 0x15, 0x16, 0x17));
3423 static vector bool int __ATTRS_o_ai vec_vmrghw(vector bool int __a,
3424 vector bool int __b) {
3425 return vec_perm(__a, __b,
3426 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3427 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3428 0x14, 0x15, 0x16, 0x17));
3431 static vector float __ATTRS_o_ai vec_vmrghw(vector float __a,
3433 return vec_perm(__a, __b,
3434 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x10, 0x11,
3435 0x12, 0x13, 0x04, 0x05, 0x06, 0x07,
3436 0x14, 0x15, 0x16, 0x17));
3441 static vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a,
3442 vector signed char __b) {
3443 return vec_perm(__a, __b,
3444 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3445 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3446 0x0E, 0x1E, 0x0F, 0x1F));
3449 static vector unsigned char __ATTRS_o_ai vec_mergel(vector unsigned char __a,
3450 vector unsigned char __b) {
3451 return vec_perm(__a, __b,
3452 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3453 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3454 0x0E, 0x1E, 0x0F, 0x1F));
3457 static vector bool char __ATTRS_o_ai vec_mergel(vector bool char __a,
3458 vector bool char __b) {
3459 return vec_perm(__a, __b,
3460 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3461 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3462 0x0E, 0x1E, 0x0F, 0x1F));
3465 static vector short __ATTRS_o_ai vec_mergel(vector short __a,
3467 return vec_perm(__a, __b,
3468 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3469 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3470 0x0E, 0x0F, 0x1E, 0x1F));
3473 static vector unsigned short __ATTRS_o_ai
3474 vec_mergel(vector unsigned short __a, vector unsigned short __b) {
3475 return vec_perm(__a, __b,
3476 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3477 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3478 0x0E, 0x0F, 0x1E, 0x1F));
3481 static vector bool short __ATTRS_o_ai vec_mergel(vector bool short __a,
3482 vector bool short __b) {
3483 return vec_perm(__a, __b,
3484 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3485 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3486 0x0E, 0x0F, 0x1E, 0x1F));
3489 static vector pixel __ATTRS_o_ai vec_mergel(vector pixel __a,
3491 return vec_perm(__a, __b,
3492 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3493 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3494 0x0E, 0x0F, 0x1E, 0x1F));
3497 static vector int __ATTRS_o_ai vec_mergel(vector int __a, vector int __b) {
3498 return vec_perm(__a, __b,
3499 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3500 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3501 0x1C, 0x1D, 0x1E, 0x1F));
3504 static vector unsigned int __ATTRS_o_ai vec_mergel(vector unsigned int __a,
3505 vector unsigned int __b) {
3506 return vec_perm(__a, __b,
3507 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3508 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3509 0x1C, 0x1D, 0x1E, 0x1F));
3512 static vector bool int __ATTRS_o_ai vec_mergel(vector bool int __a,
3513 vector bool int __b) {
3514 return vec_perm(__a, __b,
3515 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3516 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3517 0x1C, 0x1D, 0x1E, 0x1F));
3520 static vector float __ATTRS_o_ai vec_mergel(vector float __a,
3522 return vec_perm(__a, __b,
3523 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3524 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3525 0x1C, 0x1D, 0x1E, 0x1F));
3529 static vector signed long long __ATTRS_o_ai
3530 vec_mergel(vector signed long long __a, vector signed long long __b) {
3531 return vec_perm(__a, __b,
3532 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3533 0x0C, 0x0D, 0x0E, 0x0F,
3534 0x18, 0X19, 0x1A, 0x1B,
3535 0x1C, 0x1D, 0x1E, 0x1F));
3537 static vector signed long long __ATTRS_o_ai
3538 vec_mergel(vector signed long long __a, vector bool long long __b) {
3539 return vec_perm(__a, (vector signed long long)__b,
3540 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3541 0x0C, 0x0D, 0x0E, 0x0F,
3542 0x18, 0X19, 0x1A, 0x1B,
3543 0x1C, 0x1D, 0x1E, 0x1F));
3545 static vector signed long long __ATTRS_o_ai
3546 vec_mergel(vector bool long long __a, vector signed long long __b) {
3547 return vec_perm((vector signed long long)__a, __b,
3548 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3549 0x0C, 0x0D, 0x0E, 0x0F,
3550 0x18, 0X19, 0x1A, 0x1B,
3551 0x1C, 0x1D, 0x1E, 0x1F));
3553 static vector unsigned long long __ATTRS_o_ai
3554 vec_mergel(vector unsigned long long __a, vector unsigned long long __b) {
3555 return vec_perm(__a, __b,
3556 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3557 0x0C, 0x0D, 0x0E, 0x0F,
3558 0x18, 0X19, 0x1A, 0x1B,
3559 0x1C, 0x1D, 0x1E, 0x1F));
3561 static vector unsigned long long __ATTRS_o_ai
3562 vec_mergel(vector unsigned long long __a, vector bool long long __b) {
3563 return vec_perm(__a, (vector unsigned long long)__b,
3564 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3565 0x0C, 0x0D, 0x0E, 0x0F,
3566 0x18, 0X19, 0x1A, 0x1B,
3567 0x1C, 0x1D, 0x1E, 0x1F));
3569 static vector unsigned long long __ATTRS_o_ai
3570 vec_mergel(vector bool long long __a, vector unsigned long long __b) {
3571 return vec_perm((vector unsigned long long)__a, __b,
3572 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3573 0x0C, 0x0D, 0x0E, 0x0F,
3574 0x18, 0X19, 0x1A, 0x1B,
3575 0x1C, 0x1D, 0x1E, 0x1F));
3577 static vector bool long long __ATTRS_o_ai
3578 vec_mergel(vector bool long long __a, vector bool long long __b) {
3579 return vec_perm(__a, __b,
3580 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3581 0x0C, 0x0D, 0x0E, 0x0F,
3582 0x18, 0X19, 0x1A, 0x1B,
3583 0x1C, 0x1D, 0x1E, 0x1F));
3585 static vector double __ATTRS_o_ai
3586 vec_mergel(vector double __a, vector double __b) {
3587 return vec_perm(__a, __b,
3588 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3589 0x0C, 0x0D, 0x0E, 0x0F,
3590 0x18, 0X19, 0x1A, 0x1B,
3591 0x1C, 0x1D, 0x1E, 0x1F));
3593 static vector double __ATTRS_o_ai
3594 vec_mergel(vector double __a, vector bool long long __b) {
3595 return vec_perm(__a, (vector double)__b,
3596 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3597 0x0C, 0x0D, 0x0E, 0x0F,
3598 0x18, 0X19, 0x1A, 0x1B,
3599 0x1C, 0x1D, 0x1E, 0x1F));
3601 static vector double __ATTRS_o_ai
3602 vec_mergel(vector bool long long __a, vector double __b) {
3603 return vec_perm((vector double)__a, __b,
3604 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B,
3605 0x0C, 0x0D, 0x0E, 0x0F,
3606 0x18, 0X19, 0x1A, 0x1B,
3607 0x1C, 0x1D, 0x1E, 0x1F));
3613 #define __builtin_altivec_vmrglb vec_vmrglb
3615 static vector signed char __ATTRS_o_ai vec_vmrglb(vector signed char __a,
3616 vector signed char __b) {
3617 return vec_perm(__a, __b,
3618 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3619 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3620 0x0E, 0x1E, 0x0F, 0x1F));
3623 static vector unsigned char __ATTRS_o_ai vec_vmrglb(vector unsigned char __a,
3624 vector unsigned char __b) {
3625 return vec_perm(__a, __b,
3626 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3627 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3628 0x0E, 0x1E, 0x0F, 0x1F));
3631 static vector bool char __ATTRS_o_ai vec_vmrglb(vector bool char __a,
3632 vector bool char __b) {
3633 return vec_perm(__a, __b,
3634 (vector unsigned char)(0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A,
3635 0x0B, 0x1B, 0x0C, 0x1C, 0x0D, 0x1D,
3636 0x0E, 0x1E, 0x0F, 0x1F));
3641 #define __builtin_altivec_vmrglh vec_vmrglh
3643 static vector short __ATTRS_o_ai vec_vmrglh(vector short __a,
3645 return vec_perm(__a, __b,
3646 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3647 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3648 0x0E, 0x0F, 0x1E, 0x1F));
3651 static vector unsigned short __ATTRS_o_ai
3652 vec_vmrglh(vector unsigned short __a, vector unsigned short __b) {
3653 return vec_perm(__a, __b,
3654 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3655 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3656 0x0E, 0x0F, 0x1E, 0x1F));
3659 static vector bool short __ATTRS_o_ai vec_vmrglh(vector bool short __a,
3660 vector bool short __b) {
3661 return vec_perm(__a, __b,
3662 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3663 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3664 0x0E, 0x0F, 0x1E, 0x1F));
3667 static vector pixel __ATTRS_o_ai vec_vmrglh(vector pixel __a,
3669 return vec_perm(__a, __b,
3670 (vector unsigned char)(0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B,
3671 0x1A, 0x1B, 0x0C, 0x0D, 0x1C, 0x1D,
3672 0x0E, 0x0F, 0x1E, 0x1F));
3677 #define __builtin_altivec_vmrglw vec_vmrglw
3679 static vector int __ATTRS_o_ai vec_vmrglw(vector int __a, vector int __b) {
3680 return vec_perm(__a, __b,
3681 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3682 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3683 0x1C, 0x1D, 0x1E, 0x1F));
3686 static vector unsigned int __ATTRS_o_ai vec_vmrglw(vector unsigned int __a,
3687 vector unsigned int __b) {
3688 return vec_perm(__a, __b,
3689 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3690 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3691 0x1C, 0x1D, 0x1E, 0x1F));
3694 static vector bool int __ATTRS_o_ai vec_vmrglw(vector bool int __a,
3695 vector bool int __b) {
3696 return vec_perm(__a, __b,
3697 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3698 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3699 0x1C, 0x1D, 0x1E, 0x1F));
3702 static vector float __ATTRS_o_ai vec_vmrglw(vector float __a,
3704 return vec_perm(__a, __b,
3705 (vector unsigned char)(0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19,
3706 0x1A, 0x1B, 0x0C, 0x0D, 0x0E, 0x0F,
3707 0x1C, 0x1D, 0x1E, 0x1F));
3711 #ifdef __POWER8_VECTOR__
3714 static vector bool int __ATTRS_o_ai
3715 vec_mergee(vector bool int __a, vector bool int __b) {
3716 return vec_perm(__a, __b, (vector unsigned char)
3717 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3718 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B));
3721 static vector signed int __ATTRS_o_ai
3722 vec_mergee(vector signed int __a, vector signed int __b) {
3723 return vec_perm(__a, __b, (vector unsigned char)
3724 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3725 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B));
3728 static vector unsigned int __ATTRS_o_ai
3729 vec_mergee(vector unsigned int __a, vector unsigned int __b) {
3730 return vec_perm(__a, __b, (vector unsigned char)
3731 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3732 0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B));
3737 static vector bool int __ATTRS_o_ai
3738 vec_mergeo(vector bool int __a, vector bool int __b) {
3739 return vec_perm(__a, __b, (vector unsigned char)
3740 (0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17,
3741 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3744 static vector signed int __ATTRS_o_ai
3745 vec_mergeo(vector signed int __a, vector signed int __b) {
3746 return vec_perm(__a, __b, (vector unsigned char)
3747 (0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17,
3748 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3751 static vector unsigned int __ATTRS_o_ai
3752 vec_mergeo(vector unsigned int __a, vector unsigned int __b) {
3753 return vec_perm(__a, __b, (vector unsigned char)
3754 (0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17,
3755 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3762 static vector unsigned short __attribute__((__always_inline__))
3764 return __builtin_altivec_mfvscr();
3769 static vector signed char __ATTRS_o_ai vec_min(vector signed char __a,
3770 vector signed char __b) {
3771 return __builtin_altivec_vminsb(__a, __b);
3774 static vector signed char __ATTRS_o_ai vec_min(vector bool char __a,
3775 vector signed char __b) {
3776 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3779 static vector signed char __ATTRS_o_ai vec_min(vector signed char __a,
3780 vector bool char __b) {
3781 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3784 static vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a,
3785 vector unsigned char __b) {
3786 return __builtin_altivec_vminub(__a, __b);
3789 static vector unsigned char __ATTRS_o_ai vec_min(vector bool char __a,
3790 vector unsigned char __b) {
3791 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3794 static vector unsigned char __ATTRS_o_ai vec_min(vector unsigned char __a,
3795 vector bool char __b) {
3796 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3799 static vector short __ATTRS_o_ai vec_min(vector short __a, vector short __b) {
3800 return __builtin_altivec_vminsh(__a, __b);
3803 static vector short __ATTRS_o_ai vec_min(vector bool short __a,
3805 return __builtin_altivec_vminsh((vector short)__a, __b);
3808 static vector short __ATTRS_o_ai vec_min(vector short __a,
3809 vector bool short __b) {
3810 return __builtin_altivec_vminsh(__a, (vector short)__b);
3813 static vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a,
3814 vector unsigned short __b) {
3815 return __builtin_altivec_vminuh(__a, __b);
3818 static vector unsigned short __ATTRS_o_ai vec_min(vector bool short __a,
3819 vector unsigned short __b) {
3820 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3823 static vector unsigned short __ATTRS_o_ai vec_min(vector unsigned short __a,
3824 vector bool short __b) {
3825 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3828 static vector int __ATTRS_o_ai vec_min(vector int __a, vector int __b) {
3829 return __builtin_altivec_vminsw(__a, __b);
3832 static vector int __ATTRS_o_ai vec_min(vector bool int __a, vector int __b) {
3833 return __builtin_altivec_vminsw((vector int)__a, __b);
3836 static vector int __ATTRS_o_ai vec_min(vector int __a, vector bool int __b) {
3837 return __builtin_altivec_vminsw(__a, (vector int)__b);
3840 static vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a,
3841 vector unsigned int __b) {
3842 return __builtin_altivec_vminuw(__a, __b);
3845 static vector unsigned int __ATTRS_o_ai vec_min(vector bool int __a,
3846 vector unsigned int __b) {
3847 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3850 static vector unsigned int __ATTRS_o_ai vec_min(vector unsigned int __a,
3851 vector bool int __b) {
3852 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3855 #ifdef __POWER8_VECTOR__
3856 static vector signed long long __ATTRS_o_ai
3857 vec_min(vector signed long long __a, vector signed long long __b) {
3858 return __builtin_altivec_vminsd(__a, __b);
3861 static vector signed long long __ATTRS_o_ai
3862 vec_min(vector bool long long __a, vector signed long long __b) {
3863 return __builtin_altivec_vminsd((vector signed long long)__a, __b);
3866 static vector signed long long __ATTRS_o_ai vec_min(vector signed long long __a,
3867 vector bool long long __b) {
3868 return __builtin_altivec_vminsd(__a, (vector signed long long)__b);
3871 static vector unsigned long long __ATTRS_o_ai
3872 vec_min(vector unsigned long long __a, vector unsigned long long __b) {
3873 return __builtin_altivec_vminud(__a, __b);
3876 static vector unsigned long long __ATTRS_o_ai
3877 vec_min(vector bool long long __a, vector unsigned long long __b) {
3878 return __builtin_altivec_vminud((vector unsigned long long)__a, __b);
3881 static vector unsigned long long __ATTRS_o_ai
3882 vec_min(vector unsigned long long __a, vector bool long long __b) {
3883 return __builtin_altivec_vminud(__a, (vector unsigned long long)__b);
3887 static vector float __ATTRS_o_ai vec_min(vector float __a, vector float __b) {
3889 return __builtin_vsx_xvminsp(__a, __b);
3891 return __builtin_altivec_vminfp(__a, __b);
3896 static vector double __ATTRS_o_ai vec_min(vector double __a,
3897 vector double __b) {
3898 return __builtin_vsx_xvmindp(__a, __b);
3904 static vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a,
3905 vector signed char __b) {
3906 return __builtin_altivec_vminsb(__a, __b);
3909 static vector signed char __ATTRS_o_ai vec_vminsb(vector bool char __a,
3910 vector signed char __b) {
3911 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3914 static vector signed char __ATTRS_o_ai vec_vminsb(vector signed char __a,
3915 vector bool char __b) {
3916 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3921 static vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a,
3922 vector unsigned char __b) {
3923 return __builtin_altivec_vminub(__a, __b);
3926 static vector unsigned char __ATTRS_o_ai vec_vminub(vector bool char __a,
3927 vector unsigned char __b) {
3928 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3931 static vector unsigned char __ATTRS_o_ai vec_vminub(vector unsigned char __a,
3932 vector bool char __b) {
3933 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3938 static vector short __ATTRS_o_ai vec_vminsh(vector short __a,
3940 return __builtin_altivec_vminsh(__a, __b);
3943 static vector short __ATTRS_o_ai vec_vminsh(vector bool short __a,
3945 return __builtin_altivec_vminsh((vector short)__a, __b);
3948 static vector short __ATTRS_o_ai vec_vminsh(vector short __a,
3949 vector bool short __b) {
3950 return __builtin_altivec_vminsh(__a, (vector short)__b);
3955 static vector unsigned short __ATTRS_o_ai
3956 vec_vminuh(vector unsigned short __a, vector unsigned short __b) {
3957 return __builtin_altivec_vminuh(__a, __b);
3960 static vector unsigned short __ATTRS_o_ai
3961 vec_vminuh(vector bool short __a, vector unsigned short __b) {
3962 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3965 static vector unsigned short __ATTRS_o_ai vec_vminuh(vector unsigned short __a,
3966 vector bool short __b) {
3967 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3972 static vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector int __b) {
3973 return __builtin_altivec_vminsw(__a, __b);
3976 static vector int __ATTRS_o_ai vec_vminsw(vector bool int __a, vector int __b) {
3977 return __builtin_altivec_vminsw((vector int)__a, __b);
3980 static vector int __ATTRS_o_ai vec_vminsw(vector int __a, vector bool int __b) {
3981 return __builtin_altivec_vminsw(__a, (vector int)__b);
3986 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a,
3987 vector unsigned int __b) {
3988 return __builtin_altivec_vminuw(__a, __b);
3991 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector bool int __a,
3992 vector unsigned int __b) {
3993 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3996 static vector unsigned int __ATTRS_o_ai vec_vminuw(vector unsigned int __a,
3997 vector bool int __b) {
3998 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
4003 static vector float __attribute__((__always_inline__))
4004 vec_vminfp(vector float __a, vector float __b) {
4006 return __builtin_vsx_xvminsp(__a, __b);
4008 return __builtin_altivec_vminfp(__a, __b);
4014 #define __builtin_altivec_vmladduhm vec_mladd
4016 static vector short __ATTRS_o_ai vec_mladd(vector short __a, vector short __b,
4018 return __a * __b + __c;
4021 static vector short __ATTRS_o_ai vec_mladd(vector short __a,
4022 vector unsigned short __b,
4023 vector unsigned short __c) {
4024 return __a * (vector short)__b + (vector short)__c;
4027 static vector short __ATTRS_o_ai vec_mladd(vector unsigned short __a,
4028 vector short __b, vector short __c) {
4029 return (vector short)__a * __b + __c;
4032 static vector unsigned short __ATTRS_o_ai vec_mladd(vector unsigned short __a,
4033 vector unsigned short __b,
4034 vector unsigned short __c) {
4035 return __a * __b + __c;
4040 static vector short __ATTRS_o_ai vec_vmladduhm(vector short __a,
4043 return __a * __b + __c;
4046 static vector short __ATTRS_o_ai vec_vmladduhm(vector short __a,
4047 vector unsigned short __b,
4048 vector unsigned short __c) {
4049 return __a * (vector short)__b + (vector short)__c;
4052 static vector short __ATTRS_o_ai vec_vmladduhm(vector unsigned short __a,
4055 return (vector short)__a * __b + __c;
4058 static vector unsigned short __ATTRS_o_ai
4059 vec_vmladduhm(vector unsigned short __a, vector unsigned short __b,
4060 vector unsigned short __c) {
4061 return __a * __b + __c;
4066 static vector short __attribute__((__always_inline__))
4067 vec_mradds(vector short __a, vector short __b, vector short __c) {
4068 return __builtin_altivec_vmhraddshs(__a, __b, __c);
4071 /* vec_vmhraddshs */
4073 static vector short __attribute__((__always_inline__))
4074 vec_vmhraddshs(vector short __a, vector short __b, vector short __c) {
4075 return __builtin_altivec_vmhraddshs(__a, __b, __c);
4080 static vector int __ATTRS_o_ai vec_msum(vector signed char __a,
4081 vector unsigned char __b,
4083 return __builtin_altivec_vmsummbm(__a, __b, __c);
4086 static vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned char __a,
4087 vector unsigned char __b,
4088 vector unsigned int __c) {
4089 return __builtin_altivec_vmsumubm(__a, __b, __c);
4092 static vector int __ATTRS_o_ai vec_msum(vector short __a, vector short __b,
4094 return __builtin_altivec_vmsumshm(__a, __b, __c);
4097 static vector unsigned int __ATTRS_o_ai vec_msum(vector unsigned short __a,
4098 vector unsigned short __b,
4099 vector unsigned int __c) {
4100 return __builtin_altivec_vmsumuhm(__a, __b, __c);
4105 static vector int __attribute__((__always_inline__))
4106 vec_vmsummbm(vector signed char __a, vector unsigned char __b, vector int __c) {
4107 return __builtin_altivec_vmsummbm(__a, __b, __c);
4112 static vector unsigned int __attribute__((__always_inline__))
4113 vec_vmsumubm(vector unsigned char __a, vector unsigned char __b,
4114 vector unsigned int __c) {
4115 return __builtin_altivec_vmsumubm(__a, __b, __c);
4120 static vector int __attribute__((__always_inline__))
4121 vec_vmsumshm(vector short __a, vector short __b, vector int __c) {
4122 return __builtin_altivec_vmsumshm(__a, __b, __c);
4127 static vector unsigned int __attribute__((__always_inline__))
4128 vec_vmsumuhm(vector unsigned short __a, vector unsigned short __b,
4129 vector unsigned int __c) {
4130 return __builtin_altivec_vmsumuhm(__a, __b, __c);
4135 static vector int __ATTRS_o_ai vec_msums(vector short __a, vector short __b,
4137 return __builtin_altivec_vmsumshs(__a, __b, __c);
4140 static vector unsigned int __ATTRS_o_ai vec_msums(vector unsigned short __a,
4141 vector unsigned short __b,
4142 vector unsigned int __c) {
4143 return __builtin_altivec_vmsumuhs(__a, __b, __c);
4148 static vector int __attribute__((__always_inline__))
4149 vec_vmsumshs(vector short __a, vector short __b, vector int __c) {
4150 return __builtin_altivec_vmsumshs(__a, __b, __c);
4155 static vector unsigned int __attribute__((__always_inline__))
4156 vec_vmsumuhs(vector unsigned short __a, vector unsigned short __b,
4157 vector unsigned int __c) {
4158 return __builtin_altivec_vmsumuhs(__a, __b, __c);
4163 static void __ATTRS_o_ai vec_mtvscr(vector signed char __a) {
4164 __builtin_altivec_mtvscr((vector int)__a);
4167 static void __ATTRS_o_ai vec_mtvscr(vector unsigned char __a) {
4168 __builtin_altivec_mtvscr((vector int)__a);
4171 static void __ATTRS_o_ai vec_mtvscr(vector bool char __a) {
4172 __builtin_altivec_mtvscr((vector int)__a);
4175 static void __ATTRS_o_ai vec_mtvscr(vector short __a) {
4176 __builtin_altivec_mtvscr((vector int)__a);
4179 static void __ATTRS_o_ai vec_mtvscr(vector unsigned short __a) {
4180 __builtin_altivec_mtvscr((vector int)__a);
4183 static void __ATTRS_o_ai vec_mtvscr(vector bool short __a) {
4184 __builtin_altivec_mtvscr((vector int)__a);
4187 static void __ATTRS_o_ai vec_mtvscr(vector pixel __a) {
4188 __builtin_altivec_mtvscr((vector int)__a);
4191 static void __ATTRS_o_ai vec_mtvscr(vector int __a) {
4192 __builtin_altivec_mtvscr((vector int)__a);
4195 static void __ATTRS_o_ai vec_mtvscr(vector unsigned int __a) {
4196 __builtin_altivec_mtvscr((vector int)__a);
4199 static void __ATTRS_o_ai vec_mtvscr(vector bool int __a) {
4200 __builtin_altivec_mtvscr((vector int)__a);
4203 static void __ATTRS_o_ai vec_mtvscr(vector float __a) {
4204 __builtin_altivec_mtvscr((vector int)__a);
4209 /* Integer vector multiplication will involve multiplication of the odd/even
4210 elements separately, then truncating the results and moving to the
4213 static vector signed char __ATTRS_o_ai vec_mul(vector signed char __a,
4214 vector signed char __b) {
4218 static vector unsigned char __ATTRS_o_ai vec_mul(vector unsigned char __a,
4219 vector unsigned char __b) {
4223 static vector signed short __ATTRS_o_ai vec_mul(vector signed short __a,
4224 vector signed short __b) {
4228 static vector unsigned short __ATTRS_o_ai vec_mul(vector unsigned short __a,
4229 vector unsigned short __b) {
4233 static vector signed int __ATTRS_o_ai vec_mul(vector signed int __a,
4234 vector signed int __b) {
4238 static vector unsigned int __ATTRS_o_ai vec_mul(vector unsigned int __a,
4239 vector unsigned int __b) {
4244 static vector signed long long __ATTRS_o_ai
4245 vec_mul(vector signed long long __a, vector signed long long __b) {
4249 static vector unsigned long long __ATTRS_o_ai
4250 vec_mul(vector unsigned long long __a, vector unsigned long long __b) {
4255 static vector float __ATTRS_o_ai vec_mul(vector float __a, vector float __b) {
4260 static vector double __ATTRS_o_ai
4261 vec_mul(vector double __a, vector double __b) {
4266 /* The vmulos* and vmules* instructions have a big endian bias, so
4267 we must reverse the meaning of "even" and "odd" for little endian. */
4271 static vector short __ATTRS_o_ai vec_mule(vector signed char __a,
4272 vector signed char __b) {
4273 #ifdef __LITTLE_ENDIAN__
4274 return __builtin_altivec_vmulosb(__a, __b);
4276 return __builtin_altivec_vmulesb(__a, __b);
4280 static vector unsigned short __ATTRS_o_ai vec_mule(vector unsigned char __a,
4281 vector unsigned char __b) {
4282 #ifdef __LITTLE_ENDIAN__
4283 return __builtin_altivec_vmuloub(__a, __b);
4285 return __builtin_altivec_vmuleub(__a, __b);
4289 static vector int __ATTRS_o_ai vec_mule(vector short __a, vector short __b) {
4290 #ifdef __LITTLE_ENDIAN__
4291 return __builtin_altivec_vmulosh(__a, __b);
4293 return __builtin_altivec_vmulesh(__a, __b);
4297 static vector unsigned int __ATTRS_o_ai vec_mule(vector unsigned short __a,
4298 vector unsigned short __b) {
4299 #ifdef __LITTLE_ENDIAN__
4300 return __builtin_altivec_vmulouh(__a, __b);
4302 return __builtin_altivec_vmuleuh(__a, __b);
4306 #ifdef __POWER8_VECTOR__
4307 static vector signed long long __ATTRS_o_ai vec_mule(vector signed int __a,
4308 vector signed int __b) {
4309 #ifdef __LITTLE_ENDIAN__
4310 return __builtin_altivec_vmulosw(__a, __b);
4312 return __builtin_altivec_vmulesw(__a, __b);
4316 static vector unsigned long long __ATTRS_o_ai
4317 vec_mule(vector unsigned int __a, vector unsigned int __b) {
4318 #ifdef __LITTLE_ENDIAN__
4319 return __builtin_altivec_vmulouw(__a, __b);
4321 return __builtin_altivec_vmuleuw(__a, __b);
4328 static vector short __attribute__((__always_inline__))
4329 vec_vmulesb(vector signed char __a, vector signed char __b) {
4330 #ifdef __LITTLE_ENDIAN__
4331 return __builtin_altivec_vmulosb(__a, __b);
4333 return __builtin_altivec_vmulesb(__a, __b);
4339 static vector unsigned short __attribute__((__always_inline__))
4340 vec_vmuleub(vector unsigned char __a, vector unsigned char __b) {
4341 #ifdef __LITTLE_ENDIAN__
4342 return __builtin_altivec_vmuloub(__a, __b);
4344 return __builtin_altivec_vmuleub(__a, __b);
4350 static vector int __attribute__((__always_inline__))
4351 vec_vmulesh(vector short __a, vector short __b) {
4352 #ifdef __LITTLE_ENDIAN__
4353 return __builtin_altivec_vmulosh(__a, __b);
4355 return __builtin_altivec_vmulesh(__a, __b);
4361 static vector unsigned int __attribute__((__always_inline__))
4362 vec_vmuleuh(vector unsigned short __a, vector unsigned short __b) {
4363 #ifdef __LITTLE_ENDIAN__
4364 return __builtin_altivec_vmulouh(__a, __b);
4366 return __builtin_altivec_vmuleuh(__a, __b);
4372 static vector short __ATTRS_o_ai vec_mulo(vector signed char __a,
4373 vector signed char __b) {
4374 #ifdef __LITTLE_ENDIAN__
4375 return __builtin_altivec_vmulesb(__a, __b);
4377 return __builtin_altivec_vmulosb(__a, __b);
4381 static vector unsigned short __ATTRS_o_ai vec_mulo(vector unsigned char __a,
4382 vector unsigned char __b) {
4383 #ifdef __LITTLE_ENDIAN__
4384 return __builtin_altivec_vmuleub(__a, __b);
4386 return __builtin_altivec_vmuloub(__a, __b);
4390 static vector int __ATTRS_o_ai vec_mulo(vector short __a, vector short __b) {
4391 #ifdef __LITTLE_ENDIAN__
4392 return __builtin_altivec_vmulesh(__a, __b);
4394 return __builtin_altivec_vmulosh(__a, __b);
4398 static vector unsigned int __ATTRS_o_ai vec_mulo(vector unsigned short __a,
4399 vector unsigned short __b) {
4400 #ifdef __LITTLE_ENDIAN__
4401 return __builtin_altivec_vmuleuh(__a, __b);
4403 return __builtin_altivec_vmulouh(__a, __b);
4407 #ifdef __POWER8_VECTOR__
4408 static vector signed long long __ATTRS_o_ai vec_mulo(vector signed int __a,
4409 vector signed int __b) {
4410 #ifdef __LITTLE_ENDIAN__
4411 return __builtin_altivec_vmulesw(__a, __b);
4413 return __builtin_altivec_vmulosw(__a, __b);
4417 static vector unsigned long long __ATTRS_o_ai
4418 vec_mulo(vector unsigned int __a, vector unsigned int __b) {
4419 #ifdef __LITTLE_ENDIAN__
4420 return __builtin_altivec_vmuleuw(__a, __b);
4422 return __builtin_altivec_vmulouw(__a, __b);
4429 static vector short __attribute__((__always_inline__))
4430 vec_vmulosb(vector signed char __a, vector signed char __b) {
4431 #ifdef __LITTLE_ENDIAN__
4432 return __builtin_altivec_vmulesb(__a, __b);
4434 return __builtin_altivec_vmulosb(__a, __b);
4440 static vector unsigned short __attribute__((__always_inline__))
4441 vec_vmuloub(vector unsigned char __a, vector unsigned char __b) {
4442 #ifdef __LITTLE_ENDIAN__
4443 return __builtin_altivec_vmuleub(__a, __b);
4445 return __builtin_altivec_vmuloub(__a, __b);
4451 static vector int __attribute__((__always_inline__))
4452 vec_vmulosh(vector short __a, vector short __b) {
4453 #ifdef __LITTLE_ENDIAN__
4454 return __builtin_altivec_vmulesh(__a, __b);
4456 return __builtin_altivec_vmulosh(__a, __b);
4462 static vector unsigned int __attribute__((__always_inline__))
4463 vec_vmulouh(vector unsigned short __a, vector unsigned short __b) {
4464 #ifdef __LITTLE_ENDIAN__
4465 return __builtin_altivec_vmuleuh(__a, __b);
4467 return __builtin_altivec_vmulouh(__a, __b);
4473 #ifdef __POWER8_VECTOR__
4474 static vector signed char __ATTRS_o_ai vec_nand(vector signed char __a,
4475 vector signed char __b) {
4476 return ~(__a & __b);
4479 static vector signed char __ATTRS_o_ai vec_nand(vector signed char __a,
4480 vector bool char __b) {
4481 return ~(__a & __b);
4484 static vector signed char __ATTRS_o_ai vec_nand(vector bool char __a,
4485 vector signed char __b) {
4486 return ~(__a & __b);
4489 static vector unsigned char __ATTRS_o_ai vec_nand(vector unsigned char __a,
4490 vector unsigned char __b) {
4491 return ~(__a & __b);
4494 static vector unsigned char __ATTRS_o_ai vec_nand(vector unsigned char __a,
4495 vector bool char __b) {
4496 return ~(__a & __b);
4500 static vector unsigned char __ATTRS_o_ai vec_nand(vector bool char __a,
4501 vector unsigned char __b) {
4502 return ~(__a & __b);
4505 static vector bool char __ATTRS_o_ai vec_nand(vector bool char __a,
4506 vector bool char __b) {
4507 return ~(__a & __b);
4510 static vector signed short __ATTRS_o_ai vec_nand(vector signed short __a,
4511 vector signed short __b) {
4512 return ~(__a & __b);
4515 static vector signed short __ATTRS_o_ai vec_nand(vector signed short __a,
4516 vector bool short __b) {
4517 return ~(__a & __b);
4520 static vector signed short __ATTRS_o_ai vec_nand(vector bool short __a,
4521 vector signed short __b) {
4522 return ~(__a & __b);
4525 static vector unsigned short __ATTRS_o_ai vec_nand(vector unsigned short __a,
4526 vector unsigned short __b) {
4527 return ~(__a & __b);
4530 static vector unsigned short __ATTRS_o_ai vec_nand(vector unsigned short __a,
4531 vector bool short __b) {
4532 return ~(__a & __b);
4536 static vector bool short __ATTRS_o_ai vec_nand(vector bool short __a,
4537 vector bool short __b) {
4538 return ~(__a & __b);
4542 static vector signed int __ATTRS_o_ai vec_nand(vector signed int __a,
4543 vector signed int __b) {
4544 return ~(__a & __b);
4547 static vector signed int __ATTRS_o_ai vec_nand(vector signed int __a,
4548 vector bool int __b) {
4549 return ~(__a & __b);
4552 static vector signed int __ATTRS_o_ai vec_nand(vector bool int __a,
4553 vector signed int __b) {
4554 return ~(__a & __b);
4557 static vector unsigned int __ATTRS_o_ai vec_nand(vector unsigned int __a,
4558 vector unsigned int __b) {
4559 return ~(__a & __b);
4562 static vector unsigned int __ATTRS_o_ai vec_nand(vector unsigned int __a,
4563 vector bool int __b) {
4564 return ~(__a & __b);
4567 static vector unsigned int __ATTRS_o_ai vec_nand(vector bool int __a,
4568 vector unsigned int __b) {
4569 return ~(__a & __b);
4572 static vector bool int __ATTRS_o_ai vec_nand(vector bool int __a,
4573 vector bool int __b) {
4574 return ~(__a & __b);
4577 static vector signed long long __ATTRS_o_ai
4578 vec_nand(vector signed long long __a, vector signed long long __b) {
4579 return ~(__a & __b);
4582 static vector signed long long __ATTRS_o_ai
4583 vec_nand(vector signed long long __a, vector bool long long __b) {
4584 return ~(__a & __b);
4587 static vector signed long long __ATTRS_o_ai
4588 vec_nand(vector bool long long __a, vector signed long long __b) {
4589 return ~(__a & __b);
4592 static vector unsigned long long __ATTRS_o_ai
4593 vec_nand(vector unsigned long long __a, vector unsigned long long __b) {
4594 return ~(__a & __b);
4597 static vector unsigned long long __ATTRS_o_ai
4598 vec_nand(vector unsigned long long __a, vector bool long long __b) {
4599 return ~(__a & __b);
4602 static vector unsigned long long __ATTRS_o_ai
4603 vec_nand(vector bool long long __a, vector unsigned long long __b) {
4604 return ~(__a & __b);
4607 static vector bool long long __ATTRS_o_ai
4608 vec_nand(vector bool long long __a, vector bool long long __b) {
4609 return ~(__a & __b);
4617 static vector float __ATTRS_o_ai
4618 vec_nmadd(vector float __a, vector float __b, vector float __c) {
4619 return __builtin_vsx_xvnmaddasp(__a, __b, __c);
4622 static vector double __ATTRS_o_ai
4623 vec_nmadd(vector double __a, vector double __b, vector double __c) {
4624 return __builtin_vsx_xvnmaddadp(__a, __b, __c);
4630 static vector float __ATTRS_o_ai
4631 vec_nmsub(vector float __a, vector float __b, vector float __c) {
4633 return __builtin_vsx_xvnmsubasp(__a, __b, __c);
4635 return __builtin_altivec_vnmsubfp(__a, __b, __c);
4640 static vector double __ATTRS_o_ai
4641 vec_nmsub(vector double __a, vector double __b, vector double __c) {
4642 return __builtin_vsx_xvnmsubadp(__a, __b, __c);
4648 static vector float __attribute__((__always_inline__))
4649 vec_vnmsubfp(vector float __a, vector float __b, vector float __c) {
4650 return __builtin_altivec_vnmsubfp(__a, __b, __c);
4655 #define __builtin_altivec_vnor vec_nor
4657 static vector signed char __ATTRS_o_ai vec_nor(vector signed char __a,
4658 vector signed char __b) {
4659 return ~(__a | __b);
4662 static vector unsigned char __ATTRS_o_ai vec_nor(vector unsigned char __a,
4663 vector unsigned char __b) {
4664 return ~(__a | __b);
4667 static vector bool char __ATTRS_o_ai vec_nor(vector bool char __a,
4668 vector bool char __b) {
4669 return ~(__a | __b);
4672 static vector short __ATTRS_o_ai vec_nor(vector short __a, vector short __b) {
4673 return ~(__a | __b);
4676 static vector unsigned short __ATTRS_o_ai vec_nor(vector unsigned short __a,
4677 vector unsigned short __b) {
4678 return ~(__a | __b);
4681 static vector bool short __ATTRS_o_ai vec_nor(vector bool short __a,
4682 vector bool short __b) {
4683 return ~(__a | __b);
4686 static vector int __ATTRS_o_ai vec_nor(vector int __a, vector int __b) {
4687 return ~(__a | __b);
4690 static vector unsigned int __ATTRS_o_ai vec_nor(vector unsigned int __a,
4691 vector unsigned int __b) {
4692 return ~(__a | __b);
4695 static vector bool int __ATTRS_o_ai vec_nor(vector bool int __a,
4696 vector bool int __b) {
4697 return ~(__a | __b);
4700 static vector float __ATTRS_o_ai vec_nor(vector float __a, vector float __b) {
4701 vector unsigned int __res =
4702 ~((vector unsigned int)__a | (vector unsigned int)__b);
4703 return (vector float)__res;
4707 static vector double __ATTRS_o_ai
4708 vec_nor(vector double __a, vector double __b) {
4709 vector unsigned long long __res =
4710 ~((vector unsigned long long)__a | (vector unsigned long long)__b);
4711 return (vector double)__res;
4717 static vector signed char __ATTRS_o_ai vec_vnor(vector signed char __a,
4718 vector signed char __b) {
4719 return ~(__a | __b);
4722 static vector unsigned char __ATTRS_o_ai vec_vnor(vector unsigned char __a,
4723 vector unsigned char __b) {
4724 return ~(__a | __b);
4727 static vector bool char __ATTRS_o_ai vec_vnor(vector bool char __a,
4728 vector bool char __b) {
4729 return ~(__a | __b);
4732 static vector short __ATTRS_o_ai vec_vnor(vector short __a, vector short __b) {
4733 return ~(__a | __b);
4736 static vector unsigned short __ATTRS_o_ai vec_vnor(vector unsigned short __a,
4737 vector unsigned short __b) {
4738 return ~(__a | __b);
4741 static vector bool short __ATTRS_o_ai vec_vnor(vector bool short __a,
4742 vector bool short __b) {
4743 return ~(__a | __b);
4746 static vector int __ATTRS_o_ai vec_vnor(vector int __a, vector int __b) {
4747 return ~(__a | __b);
4750 static vector unsigned int __ATTRS_o_ai vec_vnor(vector unsigned int __a,
4751 vector unsigned int __b) {
4752 return ~(__a | __b);
4755 static vector bool int __ATTRS_o_ai vec_vnor(vector bool int __a,
4756 vector bool int __b) {
4757 return ~(__a | __b);
4760 static vector float __ATTRS_o_ai vec_vnor(vector float __a, vector float __b) {
4761 vector unsigned int __res =
4762 ~((vector unsigned int)__a | (vector unsigned int)__b);
4763 return (vector float)__res;
4767 static vector signed long long __ATTRS_o_ai
4768 vec_nor(vector signed long long __a, vector signed long long __b) {
4769 return ~(__a | __b);
4772 static vector unsigned long long __ATTRS_o_ai
4773 vec_nor(vector unsigned long long __a, vector unsigned long long __b) {
4774 return ~(__a | __b);
4777 static vector bool long long __ATTRS_o_ai vec_nor(vector bool long long __a,
4778 vector bool long long __b) {
4779 return ~(__a | __b);
4785 #define __builtin_altivec_vor vec_or
4787 static vector signed char __ATTRS_o_ai vec_or(vector signed char __a,
4788 vector signed char __b) {
4792 static vector signed char __ATTRS_o_ai vec_or(vector bool char __a,
4793 vector signed char __b) {
4794 return (vector signed char)__a | __b;
4797 static vector signed char __ATTRS_o_ai vec_or(vector signed char __a,
4798 vector bool char __b) {
4799 return __a | (vector signed char)__b;
4802 static vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a,
4803 vector unsigned char __b) {
4807 static vector unsigned char __ATTRS_o_ai vec_or(vector bool char __a,
4808 vector unsigned char __b) {
4809 return (vector unsigned char)__a | __b;
4812 static vector unsigned char __ATTRS_o_ai vec_or(vector unsigned char __a,
4813 vector bool char __b) {
4814 return __a | (vector unsigned char)__b;
4817 static vector bool char __ATTRS_o_ai vec_or(vector bool char __a,
4818 vector bool char __b) {
4822 static vector short __ATTRS_o_ai vec_or(vector short __a, vector short __b) {
4826 static vector short __ATTRS_o_ai vec_or(vector bool short __a,
4828 return (vector short)__a | __b;
4831 static vector short __ATTRS_o_ai vec_or(vector short __a,
4832 vector bool short __b) {
4833 return __a | (vector short)__b;
4836 static vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a,
4837 vector unsigned short __b) {
4841 static vector unsigned short __ATTRS_o_ai vec_or(vector bool short __a,
4842 vector unsigned short __b) {
4843 return (vector unsigned short)__a | __b;
4846 static vector unsigned short __ATTRS_o_ai vec_or(vector unsigned short __a,
4847 vector bool short __b) {
4848 return __a | (vector unsigned short)__b;
4851 static vector bool short __ATTRS_o_ai vec_or(vector bool short __a,
4852 vector bool short __b) {
4856 static vector int __ATTRS_o_ai vec_or(vector int __a, vector int __b) {
4860 static vector int __ATTRS_o_ai vec_or(vector bool int __a, vector int __b) {
4861 return (vector int)__a | __b;
4864 static vector int __ATTRS_o_ai vec_or(vector int __a, vector bool int __b) {
4865 return __a | (vector int)__b;
4868 static vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a,
4869 vector unsigned int __b) {
4873 static vector unsigned int __ATTRS_o_ai vec_or(vector bool int __a,
4874 vector unsigned int __b) {
4875 return (vector unsigned int)__a | __b;
4878 static vector unsigned int __ATTRS_o_ai vec_or(vector unsigned int __a,
4879 vector bool int __b) {
4880 return __a | (vector unsigned int)__b;
4883 static vector bool int __ATTRS_o_ai vec_or(vector bool int __a,
4884 vector bool int __b) {
4888 static vector float __ATTRS_o_ai vec_or(vector float __a, vector float __b) {
4889 vector unsigned int __res =
4890 (vector unsigned int)__a | (vector unsigned int)__b;
4891 return (vector float)__res;
4894 static vector float __ATTRS_o_ai vec_or(vector bool int __a, vector float __b) {
4895 vector unsigned int __res =
4896 (vector unsigned int)__a | (vector unsigned int)__b;
4897 return (vector float)__res;
4900 static vector float __ATTRS_o_ai vec_or(vector float __a, vector bool int __b) {
4901 vector unsigned int __res =
4902 (vector unsigned int)__a | (vector unsigned int)__b;
4903 return (vector float)__res;
4907 static vector double __ATTRS_o_ai vec_or(vector bool long long __a,
4908 vector double __b) {
4909 return (vector unsigned long long)__a | (vector unsigned long long)__b;
4912 static vector double __ATTRS_o_ai vec_or(vector double __a,
4913 vector bool long long __b) {
4914 return (vector unsigned long long)__a | (vector unsigned long long)__b;
4917 static vector double __ATTRS_o_ai vec_or(vector double __a, vector double __b) {
4918 vector unsigned long long __res =
4919 (vector unsigned long long)__a | (vector unsigned long long)__b;
4920 return (vector double)__res;
4923 static vector signed long long __ATTRS_o_ai
4924 vec_or(vector signed long long __a, vector signed long long __b) {
4928 static vector signed long long __ATTRS_o_ai
4929 vec_or(vector bool long long __a, vector signed long long __b) {
4930 return (vector signed long long)__a | __b;
4933 static vector signed long long __ATTRS_o_ai vec_or(vector signed long long __a,
4934 vector bool long long __b) {
4935 return __a | (vector signed long long)__b;
4938 static vector unsigned long long __ATTRS_o_ai
4939 vec_or(vector unsigned long long __a, vector unsigned long long __b) {
4943 static vector unsigned long long __ATTRS_o_ai
4944 vec_or(vector bool long long __a, vector unsigned long long __b) {
4945 return (vector unsigned long long)__a | __b;
4948 static vector unsigned long long __ATTRS_o_ai
4949 vec_or(vector unsigned long long __a, vector bool long long __b) {
4950 return __a | (vector unsigned long long)__b;
4953 static vector bool long long __ATTRS_o_ai vec_or(vector bool long long __a,
4954 vector bool long long __b) {
4959 #ifdef __POWER8_VECTOR__
4960 static vector signed char __ATTRS_o_ai vec_orc(vector signed char __a,
4961 vector signed char __b) {
4965 static vector signed char __ATTRS_o_ai vec_orc(vector signed char __a,
4966 vector bool char __b) {
4970 static vector signed char __ATTRS_o_ai vec_orc(vector bool char __a,
4971 vector signed char __b) {
4975 static vector unsigned char __ATTRS_o_ai vec_orc(vector unsigned char __a,
4976 vector unsigned char __b) {
4980 static vector unsigned char __ATTRS_o_ai vec_orc(vector unsigned char __a,
4981 vector bool char __b) {
4985 static vector unsigned char __ATTRS_o_ai vec_orc(vector bool char __a,
4986 vector unsigned char __b) {
4990 static vector bool char __ATTRS_o_ai vec_orc(vector bool char __a,
4991 vector bool char __b) {
4995 static vector signed short __ATTRS_o_ai vec_orc(vector signed short __a,
4996 vector signed short __b) {
5000 static vector signed short __ATTRS_o_ai vec_orc(vector signed short __a,
5001 vector bool short __b) {
5005 static vector signed short __ATTRS_o_ai vec_orc(vector bool short __a,
5006 vector signed short __b) {
5010 static vector unsigned short __ATTRS_o_ai vec_orc(vector unsigned short __a,
5011 vector unsigned short __b) {
5015 static vector unsigned short __ATTRS_o_ai vec_orc(vector unsigned short __a,
5016 vector bool short __b) {
5020 static vector unsigned short __ATTRS_o_ai
5021 vec_orc(vector bool short __a, vector unsigned short __b) {
5025 static vector bool short __ATTRS_o_ai vec_orc(vector bool short __a,
5026 vector bool short __b) {
5030 static vector signed int __ATTRS_o_ai vec_orc(vector signed int __a,
5031 vector signed int __b) {
5035 static vector signed int __ATTRS_o_ai vec_orc(vector signed int __a,
5036 vector bool int __b) {
5040 static vector signed int __ATTRS_o_ai vec_orc(vector bool int __a,
5041 vector signed int __b) {
5045 static vector unsigned int __ATTRS_o_ai vec_orc(vector unsigned int __a,
5046 vector unsigned int __b) {
5050 static vector unsigned int __ATTRS_o_ai vec_orc(vector unsigned int __a,
5051 vector bool int __b) {
5055 static vector unsigned int __ATTRS_o_ai vec_orc(vector bool int __a,
5056 vector unsigned int __b) {
5060 static vector bool int __ATTRS_o_ai vec_orc(vector bool int __a,
5061 vector bool int __b) {
5065 static vector signed long long __ATTRS_o_ai
5066 vec_orc(vector signed long long __a, vector signed long long __b) {
5070 static vector signed long long __ATTRS_o_ai vec_orc(vector signed long long __a,
5071 vector bool long long __b) {
5075 static vector signed long long __ATTRS_o_ai
5076 vec_orc(vector bool long long __a, vector signed long long __b) {
5080 static vector unsigned long long __ATTRS_o_ai
5081 vec_orc(vector unsigned long long __a, vector unsigned long long __b) {
5085 static vector unsigned long long __ATTRS_o_ai
5086 vec_orc(vector unsigned long long __a, vector bool long long __b) {
5090 static vector unsigned long long __ATTRS_o_ai
5091 vec_orc(vector bool long long __a, vector unsigned long long __b) {
5095 static vector bool long long __ATTRS_o_ai
5096 vec_orc(vector bool long long __a, vector bool long long __b) {
5103 static vector signed char __ATTRS_o_ai vec_vor(vector signed char __a,
5104 vector signed char __b) {
5108 static vector signed char __ATTRS_o_ai vec_vor(vector bool char __a,
5109 vector signed char __b) {
5110 return (vector signed char)__a | __b;
5113 static vector signed char __ATTRS_o_ai vec_vor(vector signed char __a,
5114 vector bool char __b) {
5115 return __a | (vector signed char)__b;
5118 static vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a,
5119 vector unsigned char __b) {
5123 static vector unsigned char __ATTRS_o_ai vec_vor(vector bool char __a,
5124 vector unsigned char __b) {
5125 return (vector unsigned char)__a | __b;
5128 static vector unsigned char __ATTRS_o_ai vec_vor(vector unsigned char __a,
5129 vector bool char __b) {
5130 return __a | (vector unsigned char)__b;
5133 static vector bool char __ATTRS_o_ai vec_vor(vector bool char __a,
5134 vector bool char __b) {
5138 static vector short __ATTRS_o_ai vec_vor(vector short __a, vector short __b) {
5142 static vector short __ATTRS_o_ai vec_vor(vector bool short __a,
5144 return (vector short)__a | __b;
5147 static vector short __ATTRS_o_ai vec_vor(vector short __a,
5148 vector bool short __b) {
5149 return __a | (vector short)__b;
5152 static vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a,
5153 vector unsigned short __b) {
5157 static vector unsigned short __ATTRS_o_ai vec_vor(vector bool short __a,
5158 vector unsigned short __b) {
5159 return (vector unsigned short)__a | __b;
5162 static vector unsigned short __ATTRS_o_ai vec_vor(vector unsigned short __a,
5163 vector bool short __b) {
5164 return __a | (vector unsigned short)__b;
5167 static vector bool short __ATTRS_o_ai vec_vor(vector bool short __a,
5168 vector bool short __b) {
5172 static vector int __ATTRS_o_ai vec_vor(vector int __a, vector int __b) {
5176 static vector int __ATTRS_o_ai vec_vor(vector bool int __a, vector int __b) {
5177 return (vector int)__a | __b;
5180 static vector int __ATTRS_o_ai vec_vor(vector int __a, vector bool int __b) {
5181 return __a | (vector int)__b;
5184 static vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a,
5185 vector unsigned int __b) {
5189 static vector unsigned int __ATTRS_o_ai vec_vor(vector bool int __a,
5190 vector unsigned int __b) {
5191 return (vector unsigned int)__a | __b;
5194 static vector unsigned int __ATTRS_o_ai vec_vor(vector unsigned int __a,
5195 vector bool int __b) {
5196 return __a | (vector unsigned int)__b;
5199 static vector bool int __ATTRS_o_ai vec_vor(vector bool int __a,
5200 vector bool int __b) {
5204 static vector float __ATTRS_o_ai vec_vor(vector float __a, vector float __b) {
5205 vector unsigned int __res =
5206 (vector unsigned int)__a | (vector unsigned int)__b;
5207 return (vector float)__res;
5210 static vector float __ATTRS_o_ai vec_vor(vector bool int __a,
5212 vector unsigned int __res =
5213 (vector unsigned int)__a | (vector unsigned int)__b;
5214 return (vector float)__res;
5217 static vector float __ATTRS_o_ai vec_vor(vector float __a,
5218 vector bool int __b) {
5219 vector unsigned int __res =
5220 (vector unsigned int)__a | (vector unsigned int)__b;
5221 return (vector float)__res;
5225 static vector signed long long __ATTRS_o_ai
5226 vec_vor(vector signed long long __a, vector signed long long __b) {
5230 static vector signed long long __ATTRS_o_ai
5231 vec_vor(vector bool long long __a, vector signed long long __b) {
5232 return (vector signed long long)__a | __b;
5235 static vector signed long long __ATTRS_o_ai vec_vor(vector signed long long __a,
5236 vector bool long long __b) {
5237 return __a | (vector signed long long)__b;
5240 static vector unsigned long long __ATTRS_o_ai
5241 vec_vor(vector unsigned long long __a, vector unsigned long long __b) {
5245 static vector unsigned long long __ATTRS_o_ai
5246 vec_vor(vector bool long long __a, vector unsigned long long __b) {
5247 return (vector unsigned long long)__a | __b;
5250 static vector unsigned long long __ATTRS_o_ai
5251 vec_vor(vector unsigned long long __a, vector bool long long __b) {
5252 return __a | (vector unsigned long long)__b;
5255 static vector bool long long __ATTRS_o_ai vec_vor(vector bool long long __a,
5256 vector bool long long __b) {
5263 /* The various vector pack instructions have a big-endian bias, so for
5264 little endian we must handle reversed element numbering. */
5266 static vector signed char __ATTRS_o_ai vec_pack(vector signed short __a,
5267 vector signed short __b) {
5268 #ifdef __LITTLE_ENDIAN__
5269 return (vector signed char)vec_perm(
5271 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5272 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5274 return (vector signed char)vec_perm(
5276 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5277 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5281 static vector unsigned char __ATTRS_o_ai vec_pack(vector unsigned short __a,
5282 vector unsigned short __b) {
5283 #ifdef __LITTLE_ENDIAN__
5284 return (vector unsigned char)vec_perm(
5286 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5287 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5289 return (vector unsigned char)vec_perm(
5291 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5292 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5296 static vector bool char __ATTRS_o_ai vec_pack(vector bool short __a,
5297 vector bool short __b) {
5298 #ifdef __LITTLE_ENDIAN__
5299 return (vector bool char)vec_perm(
5301 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5302 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5304 return (vector bool char)vec_perm(
5306 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5307 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5311 static vector short __ATTRS_o_ai vec_pack(vector int __a, vector int __b) {
5312 #ifdef __LITTLE_ENDIAN__
5313 return (vector short)vec_perm(
5315 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5316 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5318 return (vector short)vec_perm(
5320 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5321 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5325 static vector unsigned short __ATTRS_o_ai vec_pack(vector unsigned int __a,
5326 vector unsigned int __b) {
5327 #ifdef __LITTLE_ENDIAN__
5328 return (vector unsigned short)vec_perm(
5330 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5331 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5333 return (vector unsigned short)vec_perm(
5335 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5336 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5340 static vector bool short __ATTRS_o_ai vec_pack(vector bool int __a,
5341 vector bool int __b) {
5342 #ifdef __LITTLE_ENDIAN__
5343 return (vector bool short)vec_perm(
5345 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5346 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5348 return (vector bool short)vec_perm(
5350 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5351 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5356 static vector signed int __ATTRS_o_ai vec_pack(vector signed long long __a,
5357 vector signed long long __b) {
5358 #ifdef __LITTLE_ENDIAN__
5359 return (vector signed int)vec_perm(
5361 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5362 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5364 return (vector signed int)vec_perm(
5366 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5367 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5370 static vector unsigned int __ATTRS_o_ai
5371 vec_pack(vector unsigned long long __a, vector unsigned long long __b) {
5372 #ifdef __LITTLE_ENDIAN__
5373 return (vector unsigned int)vec_perm(
5375 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5376 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5378 return (vector unsigned int)vec_perm(
5380 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5381 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5385 static vector bool int __ATTRS_o_ai vec_pack(vector bool long long __a,
5386 vector bool long long __b) {
5387 #ifdef __LITTLE_ENDIAN__
5388 return (vector bool int)vec_perm(
5390 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5391 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5393 return (vector bool int)vec_perm(
5395 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5396 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5404 #define __builtin_altivec_vpkuhum vec_vpkuhum
5406 static vector signed char __ATTRS_o_ai vec_vpkuhum(vector signed short __a,
5407 vector signed short __b) {
5408 #ifdef __LITTLE_ENDIAN__
5409 return (vector signed char)vec_perm(
5411 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5412 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5414 return (vector signed char)vec_perm(
5416 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5417 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5421 static vector unsigned char __ATTRS_o_ai
5422 vec_vpkuhum(vector unsigned short __a, vector unsigned short __b) {
5423 #ifdef __LITTLE_ENDIAN__
5424 return (vector unsigned char)vec_perm(
5426 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5427 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5429 return (vector unsigned char)vec_perm(
5431 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5432 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5436 static vector bool char __ATTRS_o_ai vec_vpkuhum(vector bool short __a,
5437 vector bool short __b) {
5438 #ifdef __LITTLE_ENDIAN__
5439 return (vector bool char)vec_perm(
5441 (vector unsigned char)(0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
5442 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
5444 return (vector bool char)vec_perm(
5446 (vector unsigned char)(0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
5447 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
5453 #define __builtin_altivec_vpkuwum vec_vpkuwum
5455 static vector short __ATTRS_o_ai vec_vpkuwum(vector int __a, vector int __b) {
5456 #ifdef __LITTLE_ENDIAN__
5457 return (vector short)vec_perm(
5459 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5460 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5462 return (vector short)vec_perm(
5464 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5465 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5469 static vector unsigned short __ATTRS_o_ai vec_vpkuwum(vector unsigned int __a,
5470 vector unsigned int __b) {
5471 #ifdef __LITTLE_ENDIAN__
5472 return (vector unsigned short)vec_perm(
5474 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5475 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5477 return (vector unsigned short)vec_perm(
5479 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5480 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5484 static vector bool short __ATTRS_o_ai vec_vpkuwum(vector bool int __a,
5485 vector bool int __b) {
5486 #ifdef __LITTLE_ENDIAN__
5487 return (vector bool short)vec_perm(
5489 (vector unsigned char)(0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
5490 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
5492 return (vector bool short)vec_perm(
5494 (vector unsigned char)(0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
5495 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
5501 #ifdef __POWER8_VECTOR__
5502 #define __builtin_altivec_vpkudum vec_vpkudum
5504 static vector int __ATTRS_o_ai vec_vpkudum(vector long long __a,
5505 vector long long __b) {
5506 #ifdef __LITTLE_ENDIAN__
5507 return (vector int)vec_perm(
5509 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5510 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5512 return (vector int)vec_perm(
5514 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5515 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5519 static vector unsigned int __ATTRS_o_ai
5520 vec_vpkudum(vector unsigned long long __a, vector unsigned long long __b) {
5521 #ifdef __LITTLE_ENDIAN__
5522 return (vector unsigned int)vec_perm(
5524 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5525 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5527 return (vector unsigned int)vec_perm(
5529 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5530 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5534 static vector bool int __ATTRS_o_ai vec_vpkudum(vector bool long long __a,
5535 vector bool long long __b) {
5536 #ifdef __LITTLE_ENDIAN__
5537 return (vector bool int)vec_perm(
5538 (vector long long)__a, (vector long long)__b,
5539 (vector unsigned char)(0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0A, 0x0B,
5540 0x10, 0x11, 0x12, 0x13, 0x18, 0x19, 0x1A, 0x1B));
5542 return (vector bool int)vec_perm(
5543 (vector long long)__a, (vector long long)__b,
5544 (vector unsigned char)(0x04, 0x05, 0x06, 0x07, 0x0C, 0x0D, 0x0E, 0x0F,
5545 0x14, 0x15, 0x16, 0x17, 0x1C, 0x1D, 0x1E, 0x1F));
5552 static vector pixel __attribute__((__always_inline__))
5553 vec_packpx(vector unsigned int __a, vector unsigned int __b) {
5554 #ifdef __LITTLE_ENDIAN__
5555 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
5557 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
5563 static vector pixel __attribute__((__always_inline__))
5564 vec_vpkpx(vector unsigned int __a, vector unsigned int __b) {
5565 #ifdef __LITTLE_ENDIAN__
5566 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
5568 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
5574 static vector signed char __ATTRS_o_ai vec_packs(vector short __a,
5576 #ifdef __LITTLE_ENDIAN__
5577 return __builtin_altivec_vpkshss(__b, __a);
5579 return __builtin_altivec_vpkshss(__a, __b);
5583 static vector unsigned char __ATTRS_o_ai vec_packs(vector unsigned short __a,
5584 vector unsigned short __b) {
5585 #ifdef __LITTLE_ENDIAN__
5586 return __builtin_altivec_vpkuhus(__b, __a);
5588 return __builtin_altivec_vpkuhus(__a, __b);
5592 static vector signed short __ATTRS_o_ai vec_packs(vector int __a,
5594 #ifdef __LITTLE_ENDIAN__
5595 return __builtin_altivec_vpkswss(__b, __a);
5597 return __builtin_altivec_vpkswss(__a, __b);
5601 static vector unsigned short __ATTRS_o_ai vec_packs(vector unsigned int __a,
5602 vector unsigned int __b) {
5603 #ifdef __LITTLE_ENDIAN__
5604 return __builtin_altivec_vpkuwus(__b, __a);
5606 return __builtin_altivec_vpkuwus(__a, __b);
5610 #ifdef __POWER8_VECTOR__
5611 static vector int __ATTRS_o_ai vec_packs(vector long long __a,
5612 vector long long __b) {
5613 #ifdef __LITTLE_ENDIAN__
5614 return __builtin_altivec_vpksdss(__b, __a);
5616 return __builtin_altivec_vpksdss(__a, __b);
5620 static vector unsigned int __ATTRS_o_ai
5621 vec_packs(vector unsigned long long __a, vector unsigned long long __b) {
5622 #ifdef __LITTLE_ENDIAN__
5623 return __builtin_altivec_vpkudus(__b, __a);
5625 return __builtin_altivec_vpkudus(__a, __b);
5632 static vector signed char __attribute__((__always_inline__))
5633 vec_vpkshss(vector short __a, vector short __b) {
5634 #ifdef __LITTLE_ENDIAN__
5635 return __builtin_altivec_vpkshss(__b, __a);
5637 return __builtin_altivec_vpkshss(__a, __b);
5643 #ifdef __POWER8_VECTOR__
5644 static vector int __ATTRS_o_ai vec_vpksdss(vector long long __a,
5645 vector long long __b) {
5646 #ifdef __LITTLE_ENDIAN__
5647 return __builtin_altivec_vpksdss(__b, __a);
5649 return __builtin_altivec_vpksdss(__a, __b);
5656 static vector unsigned char __attribute__((__always_inline__))
5657 vec_vpkuhus(vector unsigned short __a, vector unsigned short __b) {
5658 #ifdef __LITTLE_ENDIAN__
5659 return __builtin_altivec_vpkuhus(__b, __a);
5661 return __builtin_altivec_vpkuhus(__a, __b);
5667 #ifdef __POWER8_VECTOR__
5668 static vector unsigned int __attribute__((__always_inline__))
5669 vec_vpkudus(vector unsigned long long __a, vector unsigned long long __b) {
5670 #ifdef __LITTLE_ENDIAN__
5671 return __builtin_altivec_vpkudus(__b, __a);
5673 return __builtin_altivec_vpkudus(__a, __b);
5680 static vector signed short __attribute__((__always_inline__))
5681 vec_vpkswss(vector int __a, vector int __b) {
5682 #ifdef __LITTLE_ENDIAN__
5683 return __builtin_altivec_vpkswss(__b, __a);
5685 return __builtin_altivec_vpkswss(__a, __b);
5691 static vector unsigned short __attribute__((__always_inline__))
5692 vec_vpkuwus(vector unsigned int __a, vector unsigned int __b) {
5693 #ifdef __LITTLE_ENDIAN__
5694 return __builtin_altivec_vpkuwus(__b, __a);
5696 return __builtin_altivec_vpkuwus(__a, __b);
5702 static vector unsigned char __ATTRS_o_ai vec_packsu(vector short __a,
5704 #ifdef __LITTLE_ENDIAN__
5705 return __builtin_altivec_vpkshus(__b, __a);
5707 return __builtin_altivec_vpkshus(__a, __b);
5711 static vector unsigned char __ATTRS_o_ai vec_packsu(vector unsigned short __a,
5712 vector unsigned short __b) {
5713 #ifdef __LITTLE_ENDIAN__
5714 return __builtin_altivec_vpkuhus(__b, __a);
5716 return __builtin_altivec_vpkuhus(__a, __b);
5720 static vector unsigned short __ATTRS_o_ai vec_packsu(vector int __a,
5722 #ifdef __LITTLE_ENDIAN__
5723 return __builtin_altivec_vpkswus(__b, __a);
5725 return __builtin_altivec_vpkswus(__a, __b);
5729 static vector unsigned short __ATTRS_o_ai vec_packsu(vector unsigned int __a,
5730 vector unsigned int __b) {
5731 #ifdef __LITTLE_ENDIAN__
5732 return __builtin_altivec_vpkuwus(__b, __a);
5734 return __builtin_altivec_vpkuwus(__a, __b);
5738 #ifdef __POWER8_VECTOR__
5739 static vector unsigned int __ATTRS_o_ai vec_packsu(vector long long __a,
5740 vector long long __b) {
5741 #ifdef __LITTLE_ENDIAN__
5742 return __builtin_altivec_vpksdus(__b, __a);
5744 return __builtin_altivec_vpksdus(__a, __b);
5748 static vector unsigned int __ATTRS_o_ai
5749 vec_packsu(vector unsigned long long __a, vector unsigned long long __b) {
5750 #ifdef __LITTLE_ENDIAN__
5751 return __builtin_altivec_vpkudus(__b, __a);
5753 return __builtin_altivec_vpkudus(__a, __b);
5760 static vector unsigned char __ATTRS_o_ai vec_vpkshus(vector short __a,
5762 #ifdef __LITTLE_ENDIAN__
5763 return __builtin_altivec_vpkshus(__b, __a);
5765 return __builtin_altivec_vpkshus(__a, __b);
5769 static vector unsigned char __ATTRS_o_ai
5770 vec_vpkshus(vector unsigned short __a, vector unsigned short __b) {
5771 #ifdef __LITTLE_ENDIAN__
5772 return __builtin_altivec_vpkuhus(__b, __a);
5774 return __builtin_altivec_vpkuhus(__a, __b);
5780 static vector unsigned short __ATTRS_o_ai vec_vpkswus(vector int __a,
5782 #ifdef __LITTLE_ENDIAN__
5783 return __builtin_altivec_vpkswus(__b, __a);
5785 return __builtin_altivec_vpkswus(__a, __b);
5789 static vector unsigned short __ATTRS_o_ai vec_vpkswus(vector unsigned int __a,
5790 vector unsigned int __b) {
5791 #ifdef __LITTLE_ENDIAN__
5792 return __builtin_altivec_vpkuwus(__b, __a);
5794 return __builtin_altivec_vpkuwus(__a, __b);
5800 #ifdef __POWER8_VECTOR__
5801 static vector unsigned int __ATTRS_o_ai vec_vpksdus(vector long long __a,
5802 vector long long __b) {
5803 #ifdef __LITTLE_ENDIAN__
5804 return __builtin_altivec_vpksdus(__b, __a);
5806 return __builtin_altivec_vpksdus(__a, __b);
5813 // The vperm instruction is defined architecturally with a big-endian bias.
5814 // For little endian, we swap the input operands and invert the permute
5815 // control vector. Only the rightmost 5 bits matter, so we could use
5816 // a vector of all 31s instead of all 255s to perform the inversion.
5817 // However, when the PCV is not a constant, using 255 has an advantage
5818 // in that the vec_xor can be recognized as a vec_nor (and for P8 and
5819 // later, possibly a vec_nand).
5821 static vector signed char __ATTRS_o_ai vec_perm(vector signed char __a,
5822 vector signed char __b,
5823 vector unsigned char __c) {
5824 #ifdef __LITTLE_ENDIAN__
5825 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5826 255, 255, 255, 255, 255, 255, 255, 255};
5827 __d = vec_xor(__c, __d);
5828 return (vector signed char)__builtin_altivec_vperm_4si((vector int)__b,
5829 (vector int)__a, __d);
5831 return (vector signed char)__builtin_altivec_vperm_4si((vector int)__a,
5832 (vector int)__b, __c);
5836 static vector unsigned char __ATTRS_o_ai vec_perm(vector unsigned char __a,
5837 vector unsigned char __b,
5838 vector unsigned char __c) {
5839 #ifdef __LITTLE_ENDIAN__
5840 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5841 255, 255, 255, 255, 255, 255, 255, 255};
5842 __d = vec_xor(__c, __d);
5843 return (vector unsigned char)__builtin_altivec_vperm_4si(
5844 (vector int)__b, (vector int)__a, __d);
5846 return (vector unsigned char)__builtin_altivec_vperm_4si(
5847 (vector int)__a, (vector int)__b, __c);
5851 static vector bool char __ATTRS_o_ai vec_perm(vector bool char __a,
5852 vector bool char __b,
5853 vector unsigned char __c) {
5854 #ifdef __LITTLE_ENDIAN__
5855 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5856 255, 255, 255, 255, 255, 255, 255, 255};
5857 __d = vec_xor(__c, __d);
5858 return (vector bool char)__builtin_altivec_vperm_4si((vector int)__b,
5859 (vector int)__a, __d);
5861 return (vector bool char)__builtin_altivec_vperm_4si((vector int)__a,
5862 (vector int)__b, __c);
5866 static vector short __ATTRS_o_ai vec_perm(vector signed short __a,
5867 vector signed short __b,
5868 vector unsigned char __c) {
5869 #ifdef __LITTLE_ENDIAN__
5870 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5871 255, 255, 255, 255, 255, 255, 255, 255};
5872 __d = vec_xor(__c, __d);
5873 return (vector signed short)__builtin_altivec_vperm_4si((vector int)__b,
5874 (vector int)__a, __d);
5876 return (vector signed short)__builtin_altivec_vperm_4si((vector int)__a,
5877 (vector int)__b, __c);
5881 static vector unsigned short __ATTRS_o_ai vec_perm(vector unsigned short __a,
5882 vector unsigned short __b,
5883 vector unsigned char __c) {
5884 #ifdef __LITTLE_ENDIAN__
5885 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5886 255, 255, 255, 255, 255, 255, 255, 255};
5887 __d = vec_xor(__c, __d);
5888 return (vector unsigned short)__builtin_altivec_vperm_4si(
5889 (vector int)__b, (vector int)__a, __d);
5891 return (vector unsigned short)__builtin_altivec_vperm_4si(
5892 (vector int)__a, (vector int)__b, __c);
5896 static vector bool short __ATTRS_o_ai vec_perm(vector bool short __a,
5897 vector bool short __b,
5898 vector unsigned char __c) {
5899 #ifdef __LITTLE_ENDIAN__
5900 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5901 255, 255, 255, 255, 255, 255, 255, 255};
5902 __d = vec_xor(__c, __d);
5903 return (vector bool short)__builtin_altivec_vperm_4si((vector int)__b,
5904 (vector int)__a, __d);
5906 return (vector bool short)__builtin_altivec_vperm_4si((vector int)__a,
5907 (vector int)__b, __c);
5911 static vector pixel __ATTRS_o_ai vec_perm(vector pixel __a, vector pixel __b,
5912 vector unsigned char __c) {
5913 #ifdef __LITTLE_ENDIAN__
5914 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5915 255, 255, 255, 255, 255, 255, 255, 255};
5916 __d = vec_xor(__c, __d);
5917 return (vector pixel)__builtin_altivec_vperm_4si((vector int)__b,
5918 (vector int)__a, __d);
5920 return (vector pixel)__builtin_altivec_vperm_4si((vector int)__a,
5921 (vector int)__b, __c);
5925 static vector int __ATTRS_o_ai vec_perm(vector signed int __a,
5926 vector signed int __b,
5927 vector unsigned char __c) {
5928 #ifdef __LITTLE_ENDIAN__
5929 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5930 255, 255, 255, 255, 255, 255, 255, 255};
5931 __d = vec_xor(__c, __d);
5932 return (vector signed int)__builtin_altivec_vperm_4si(__b, __a, __d);
5934 return (vector signed int)__builtin_altivec_vperm_4si(__a, __b, __c);
5938 static vector unsigned int __ATTRS_o_ai vec_perm(vector unsigned int __a,
5939 vector unsigned int __b,
5940 vector unsigned char __c) {
5941 #ifdef __LITTLE_ENDIAN__
5942 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5943 255, 255, 255, 255, 255, 255, 255, 255};
5944 __d = vec_xor(__c, __d);
5945 return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__b,
5946 (vector int)__a, __d);
5948 return (vector unsigned int)__builtin_altivec_vperm_4si((vector int)__a,
5949 (vector int)__b, __c);
5953 static vector bool int __ATTRS_o_ai vec_perm(vector bool int __a,
5954 vector bool int __b,
5955 vector unsigned char __c) {
5956 #ifdef __LITTLE_ENDIAN__
5957 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5958 255, 255, 255, 255, 255, 255, 255, 255};
5959 __d = vec_xor(__c, __d);
5960 return (vector bool int)__builtin_altivec_vperm_4si((vector int)__b,
5961 (vector int)__a, __d);
5963 return (vector bool int)__builtin_altivec_vperm_4si((vector int)__a,
5964 (vector int)__b, __c);
5968 static vector float __ATTRS_o_ai vec_perm(vector float __a, vector float __b,
5969 vector unsigned char __c) {
5970 #ifdef __LITTLE_ENDIAN__
5971 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5972 255, 255, 255, 255, 255, 255, 255, 255};
5973 __d = vec_xor(__c, __d);
5974 return (vector float)__builtin_altivec_vperm_4si((vector int)__b,
5975 (vector int)__a, __d);
5977 return (vector float)__builtin_altivec_vperm_4si((vector int)__a,
5978 (vector int)__b, __c);
5983 static vector long long __ATTRS_o_ai vec_perm(vector signed long long __a,
5984 vector signed long long __b,
5985 vector unsigned char __c) {
5986 #ifdef __LITTLE_ENDIAN__
5987 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
5988 255, 255, 255, 255, 255, 255, 255, 255};
5989 __d = vec_xor(__c, __d);
5990 return (vector signed long long)__builtin_altivec_vperm_4si(
5991 (vector int)__b, (vector int)__a, __d);
5993 return (vector signed long long)__builtin_altivec_vperm_4si(
5994 (vector int)__a, (vector int)__b, __c);
5998 static vector unsigned long long __ATTRS_o_ai
5999 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
6000 vector unsigned char __c) {
6001 #ifdef __LITTLE_ENDIAN__
6002 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
6003 255, 255, 255, 255, 255, 255, 255, 255};
6004 __d = vec_xor(__c, __d);
6005 return (vector unsigned long long)__builtin_altivec_vperm_4si(
6006 (vector int)__b, (vector int)__a, __d);
6008 return (vector unsigned long long)__builtin_altivec_vperm_4si(
6009 (vector int)__a, (vector int)__b, __c);
6013 static vector bool long long __ATTRS_o_ai
6014 vec_perm(vector bool long long __a, vector bool long long __b,
6015 vector unsigned char __c) {
6016 #ifdef __LITTLE_ENDIAN__
6017 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
6018 255, 255, 255, 255, 255, 255, 255, 255};
6019 __d = vec_xor(__c, __d);
6020 return (vector bool long long)__builtin_altivec_vperm_4si(
6021 (vector int)__b, (vector int)__a, __d);
6023 return (vector bool long long)__builtin_altivec_vperm_4si(
6024 (vector int)__a, (vector int)__b, __c);
6028 static vector double __ATTRS_o_ai vec_perm(vector double __a, vector double __b,
6029 vector unsigned char __c) {
6030 #ifdef __LITTLE_ENDIAN__
6031 vector unsigned char __d = {255, 255, 255, 255, 255, 255, 255, 255,
6032 255, 255, 255, 255, 255, 255, 255, 255};
6033 __d = vec_xor(__c, __d);
6034 return (vector double)__builtin_altivec_vperm_4si((vector int)__b,
6035 (vector int)__a, __d);
6037 return (vector double)__builtin_altivec_vperm_4si((vector int)__a,
6038 (vector int)__b, __c);
6045 static vector signed char __ATTRS_o_ai vec_vperm(vector signed char __a,
6046 vector signed char __b,
6047 vector unsigned char __c) {
6048 return vec_perm(__a, __b, __c);
6051 static vector unsigned char __ATTRS_o_ai vec_vperm(vector unsigned char __a,
6052 vector unsigned char __b,
6053 vector unsigned char __c) {
6054 return vec_perm(__a, __b, __c);
6057 static vector bool char __ATTRS_o_ai vec_vperm(vector bool char __a,
6058 vector bool char __b,
6059 vector unsigned char __c) {
6060 return vec_perm(__a, __b, __c);
6063 static vector short __ATTRS_o_ai vec_vperm(vector short __a, vector short __b,
6064 vector unsigned char __c) {
6065 return vec_perm(__a, __b, __c);
6068 static vector unsigned short __ATTRS_o_ai vec_vperm(vector unsigned short __a,
6069 vector unsigned short __b,
6070 vector unsigned char __c) {
6071 return vec_perm(__a, __b, __c);
6074 static vector bool short __ATTRS_o_ai vec_vperm(vector bool short __a,
6075 vector bool short __b,
6076 vector unsigned char __c) {
6077 return vec_perm(__a, __b, __c);
6080 static vector pixel __ATTRS_o_ai vec_vperm(vector pixel __a, vector pixel __b,
6081 vector unsigned char __c) {
6082 return vec_perm(__a, __b, __c);
6085 static vector int __ATTRS_o_ai vec_vperm(vector int __a, vector int __b,
6086 vector unsigned char __c) {
6087 return vec_perm(__a, __b, __c);
6090 static vector unsigned int __ATTRS_o_ai vec_vperm(vector unsigned int __a,
6091 vector unsigned int __b,
6092 vector unsigned char __c) {
6093 return vec_perm(__a, __b, __c);
6096 static vector bool int __ATTRS_o_ai vec_vperm(vector bool int __a,
6097 vector bool int __b,
6098 vector unsigned char __c) {
6099 return vec_perm(__a, __b, __c);
6102 static vector float __ATTRS_o_ai vec_vperm(vector float __a, vector float __b,
6103 vector unsigned char __c) {
6104 return vec_perm(__a, __b, __c);
6108 static vector long long __ATTRS_o_ai vec_vperm(vector long long __a,
6109 vector long long __b,
6110 vector unsigned char __c) {
6111 return vec_perm(__a, __b, __c);
6114 static vector unsigned long long __ATTRS_o_ai
6115 vec_vperm(vector unsigned long long __a, vector unsigned long long __b,
6116 vector unsigned char __c) {
6117 return vec_perm(__a, __b, __c);
6120 static vector double __ATTRS_o_ai vec_vperm(vector double __a,
6122 vector unsigned char __c) {
6123 return vec_perm(__a, __b, __c);
6129 static vector float __ATTRS_o_ai
6130 vec_re(vector float __a) {
6132 return __builtin_vsx_xvresp(__a);
6134 return __builtin_altivec_vrefp(__a);
6139 static vector double __ATTRS_o_ai vec_re(vector double __a) {
6140 return __builtin_vsx_xvredp(__a);
6146 static vector float __attribute__((__always_inline__))
6147 vec_vrefp(vector float __a) {
6148 return __builtin_altivec_vrefp(__a);
6153 static vector signed char __ATTRS_o_ai vec_rl(vector signed char __a,
6154 vector unsigned char __b) {
6155 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
6158 static vector unsigned char __ATTRS_o_ai vec_rl(vector unsigned char __a,
6159 vector unsigned char __b) {
6160 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
6163 static vector short __ATTRS_o_ai vec_rl(vector short __a,
6164 vector unsigned short __b) {
6165 return __builtin_altivec_vrlh(__a, __b);
6168 static vector unsigned short __ATTRS_o_ai vec_rl(vector unsigned short __a,
6169 vector unsigned short __b) {
6170 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
6173 static vector int __ATTRS_o_ai vec_rl(vector int __a, vector unsigned int __b) {
6174 return __builtin_altivec_vrlw(__a, __b);
6177 static vector unsigned int __ATTRS_o_ai vec_rl(vector unsigned int __a,
6178 vector unsigned int __b) {
6179 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
6182 #ifdef __POWER8_VECTOR__
6183 static vector signed long long __ATTRS_o_ai
6184 vec_rl(vector signed long long __a, vector unsigned long long __b) {
6185 return __builtin_altivec_vrld(__a, __b);
6188 static vector unsigned long long __ATTRS_o_ai
6189 vec_rl(vector unsigned long long __a, vector unsigned long long __b) {
6190 return __builtin_altivec_vrld(__a, __b);
6196 static vector signed char __ATTRS_o_ai vec_vrlb(vector signed char __a,
6197 vector unsigned char __b) {
6198 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
6201 static vector unsigned char __ATTRS_o_ai vec_vrlb(vector unsigned char __a,
6202 vector unsigned char __b) {
6203 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
6208 static vector short __ATTRS_o_ai vec_vrlh(vector short __a,
6209 vector unsigned short __b) {
6210 return __builtin_altivec_vrlh(__a, __b);
6213 static vector unsigned short __ATTRS_o_ai vec_vrlh(vector unsigned short __a,
6214 vector unsigned short __b) {
6215 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
6220 static vector int __ATTRS_o_ai vec_vrlw(vector int __a,
6221 vector unsigned int __b) {
6222 return __builtin_altivec_vrlw(__a, __b);
6225 static vector unsigned int __ATTRS_o_ai vec_vrlw(vector unsigned int __a,
6226 vector unsigned int __b) {
6227 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
6232 static vector float __ATTRS_o_ai vec_round(vector float __a) {
6234 return __builtin_vsx_xvrspi(__a);
6236 return __builtin_altivec_vrfin(__a);
6241 static vector double __ATTRS_o_ai vec_round(vector double __a) {
6242 return __builtin_vsx_xvrdpi(__a);
6247 static vector float __ATTRS_o_ai
6248 vec_rint(vector float __a) {
6249 return __builtin_vsx_xvrspic(__a);
6252 static vector double __ATTRS_o_ai
6253 vec_rint(vector double __a) {
6254 return __builtin_vsx_xvrdpic(__a);
6259 static vector float __ATTRS_o_ai vec_nearbyint(vector float __a) {
6260 return __builtin_vsx_xvrspi(__a);
6263 static vector double __ATTRS_o_ai vec_nearbyint(vector double __a) {
6264 return __builtin_vsx_xvrdpi(__a);
6270 static vector float __attribute__((__always_inline__))
6271 vec_vrfin(vector float __a) {
6272 return __builtin_altivec_vrfin(__a);
6278 static vector float __ATTRS_o_ai vec_sqrt(vector float __a) {
6279 return __builtin_vsx_xvsqrtsp(__a);
6282 static vector double __ATTRS_o_ai vec_sqrt(vector double __a) {
6283 return __builtin_vsx_xvsqrtdp(__a);
6289 static vector float __ATTRS_o_ai
6290 vec_rsqrte(vector float __a) {
6292 return __builtin_vsx_xvrsqrtesp(__a);
6294 return __builtin_altivec_vrsqrtefp(__a);
6299 static vector double __ATTRS_o_ai vec_rsqrte(vector double __a) {
6300 return __builtin_vsx_xvrsqrtedp(__a);
6306 static __vector float __attribute__((__always_inline__))
6307 vec_vrsqrtefp(vector float __a) {
6308 return __builtin_altivec_vrsqrtefp(__a);
6313 #define __builtin_altivec_vsel_4si vec_sel
6315 static vector signed char __ATTRS_o_ai vec_sel(vector signed char __a,
6316 vector signed char __b,
6317 vector unsigned char __c) {
6318 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
6321 static vector signed char __ATTRS_o_ai vec_sel(vector signed char __a,
6322 vector signed char __b,
6323 vector bool char __c) {
6324 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
6327 static vector unsigned char __ATTRS_o_ai vec_sel(vector unsigned char __a,
6328 vector unsigned char __b,
6329 vector unsigned char __c) {
6330 return (__a & ~__c) | (__b & __c);
6333 static vector unsigned char __ATTRS_o_ai vec_sel(vector unsigned char __a,
6334 vector unsigned char __b,
6335 vector bool char __c) {
6336 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
6339 static vector bool char __ATTRS_o_ai vec_sel(vector bool char __a,
6340 vector bool char __b,
6341 vector unsigned char __c) {
6342 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
6345 static vector bool char __ATTRS_o_ai vec_sel(vector bool char __a,
6346 vector bool char __b,
6347 vector bool char __c) {
6348 return (__a & ~__c) | (__b & __c);
6351 static vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b,
6352 vector unsigned short __c) {
6353 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
6356 static vector short __ATTRS_o_ai vec_sel(vector short __a, vector short __b,
6357 vector bool short __c) {
6358 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
6361 static vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a,
6362 vector unsigned short __b,
6363 vector unsigned short __c) {
6364 return (__a & ~__c) | (__b & __c);
6367 static vector unsigned short __ATTRS_o_ai vec_sel(vector unsigned short __a,
6368 vector unsigned short __b,
6369 vector bool short __c) {
6370 return (__a & ~(vector unsigned short)__c) |
6371 (__b & (vector unsigned short)__c);
6374 static vector bool short __ATTRS_o_ai vec_sel(vector bool short __a,
6375 vector bool short __b,
6376 vector unsigned short __c) {
6377 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
6380 static vector bool short __ATTRS_o_ai vec_sel(vector bool short __a,
6381 vector bool short __b,
6382 vector bool short __c) {
6383 return (__a & ~__c) | (__b & __c);
6386 static vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b,
6387 vector unsigned int __c) {
6388 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
6391 static vector int __ATTRS_o_ai vec_sel(vector int __a, vector int __b,
6392 vector bool int __c) {
6393 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
6396 static vector unsigned int __ATTRS_o_ai vec_sel(vector unsigned int __a,
6397 vector unsigned int __b,
6398 vector unsigned int __c) {
6399 return (__a & ~__c) | (__b & __c);
6402 static vector unsigned int __ATTRS_o_ai vec_sel(vector unsigned int __a,
6403 vector unsigned int __b,
6404 vector bool int __c) {
6405 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
6408 static vector bool int __ATTRS_o_ai vec_sel(vector bool int __a,
6409 vector bool int __b,
6410 vector unsigned int __c) {
6411 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
6414 static vector bool int __ATTRS_o_ai vec_sel(vector bool int __a,
6415 vector bool int __b,
6416 vector bool int __c) {
6417 return (__a & ~__c) | (__b & __c);
6420 static vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b,
6421 vector unsigned int __c) {
6422 vector int __res = ((vector int)__a & ~(vector int)__c) |
6423 ((vector int)__b & (vector int)__c);
6424 return (vector float)__res;
6427 static vector float __ATTRS_o_ai vec_sel(vector float __a, vector float __b,
6428 vector bool int __c) {
6429 vector int __res = ((vector int)__a & ~(vector int)__c) |
6430 ((vector int)__b & (vector int)__c);
6431 return (vector float)__res;
6435 static vector double __ATTRS_o_ai vec_sel(vector double __a, vector double __b,
6436 vector bool long long __c) {
6437 vector long long __res = ((vector long long)__a & ~(vector long long)__c) |
6438 ((vector long long)__b & (vector long long)__c);
6439 return (vector double)__res;
6442 static vector double __ATTRS_o_ai vec_sel(vector double __a, vector double __b,
6443 vector unsigned long long __c) {
6444 vector long long __res = ((vector long long)__a & ~(vector long long)__c) |
6445 ((vector long long)__b & (vector long long)__c);
6446 return (vector double)__res;
6452 static vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a,
6453 vector signed char __b,
6454 vector unsigned char __c) {
6455 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
6458 static vector signed char __ATTRS_o_ai vec_vsel(vector signed char __a,
6459 vector signed char __b,
6460 vector bool char __c) {
6461 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
6464 static vector unsigned char __ATTRS_o_ai vec_vsel(vector unsigned char __a,
6465 vector unsigned char __b,
6466 vector unsigned char __c) {
6467 return (__a & ~__c) | (__b & __c);
6470 static vector unsigned char __ATTRS_o_ai vec_vsel(vector unsigned char __a,
6471 vector unsigned char __b,
6472 vector bool char __c) {
6473 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
6476 static vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a,
6477 vector bool char __b,
6478 vector unsigned char __c) {
6479 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
6482 static vector bool char __ATTRS_o_ai vec_vsel(vector bool char __a,
6483 vector bool char __b,
6484 vector bool char __c) {
6485 return (__a & ~__c) | (__b & __c);
6488 static vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b,
6489 vector unsigned short __c) {
6490 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
6493 static vector short __ATTRS_o_ai vec_vsel(vector short __a, vector short __b,
6494 vector bool short __c) {
6495 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
6498 static vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a,
6499 vector unsigned short __b,
6500 vector unsigned short __c) {
6501 return (__a & ~__c) | (__b & __c);
6504 static vector unsigned short __ATTRS_o_ai vec_vsel(vector unsigned short __a,
6505 vector unsigned short __b,
6506 vector bool short __c) {
6507 return (__a & ~(vector unsigned short)__c) |
6508 (__b & (vector unsigned short)__c);
6511 static vector bool short __ATTRS_o_ai vec_vsel(vector bool short __a,
6512 vector bool short __b,
6513 vector unsigned short __c) {
6514 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
6517 static vector bool short __ATTRS_o_ai vec_vsel(vector bool short __a,
6518 vector bool short __b,
6519 vector bool short __c) {
6520 return (__a & ~__c) | (__b & __c);
6523 static vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b,
6524 vector unsigned int __c) {
6525 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
6528 static vector int __ATTRS_o_ai vec_vsel(vector int __a, vector int __b,
6529 vector bool int __c) {
6530 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
6533 static vector unsigned int __ATTRS_o_ai vec_vsel(vector unsigned int __a,
6534 vector unsigned int __b,
6535 vector unsigned int __c) {
6536 return (__a & ~__c) | (__b & __c);
6539 static vector unsigned int __ATTRS_o_ai vec_vsel(vector unsigned int __a,
6540 vector unsigned int __b,
6541 vector bool int __c) {
6542 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
6545 static vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a,
6546 vector bool int __b,
6547 vector unsigned int __c) {
6548 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
6551 static vector bool int __ATTRS_o_ai vec_vsel(vector bool int __a,
6552 vector bool int __b,
6553 vector bool int __c) {
6554 return (__a & ~__c) | (__b & __c);
6557 static vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b,
6558 vector unsigned int __c) {
6559 vector int __res = ((vector int)__a & ~(vector int)__c) |
6560 ((vector int)__b & (vector int)__c);
6561 return (vector float)__res;
6564 static vector float __ATTRS_o_ai vec_vsel(vector float __a, vector float __b,
6565 vector bool int __c) {
6566 vector int __res = ((vector int)__a & ~(vector int)__c) |
6567 ((vector int)__b & (vector int)__c);
6568 return (vector float)__res;
6573 static vector signed char __ATTRS_o_ai vec_sl(vector signed char __a,
6574 vector unsigned char __b) {
6575 return __a << (vector signed char)__b;
6578 static vector unsigned char __ATTRS_o_ai vec_sl(vector unsigned char __a,
6579 vector unsigned char __b) {
6583 static vector short __ATTRS_o_ai vec_sl(vector short __a,
6584 vector unsigned short __b) {
6585 return __a << (vector short)__b;
6588 static vector unsigned short __ATTRS_o_ai vec_sl(vector unsigned short __a,
6589 vector unsigned short __b) {
6593 static vector int __ATTRS_o_ai vec_sl(vector int __a, vector unsigned int __b) {
6594 return __a << (vector int)__b;
6597 static vector unsigned int __ATTRS_o_ai vec_sl(vector unsigned int __a,
6598 vector unsigned int __b) {
6602 #ifdef __POWER8_VECTOR__
6603 static vector signed long long __ATTRS_o_ai
6604 vec_sl(vector signed long long __a, vector unsigned long long __b) {
6605 return __a << (vector long long)__b;
6608 static vector unsigned long long __ATTRS_o_ai
6609 vec_sl(vector unsigned long long __a, vector unsigned long long __b) {
6616 #define __builtin_altivec_vslb vec_vslb
6618 static vector signed char __ATTRS_o_ai vec_vslb(vector signed char __a,
6619 vector unsigned char __b) {
6620 return vec_sl(__a, __b);
6623 static vector unsigned char __ATTRS_o_ai vec_vslb(vector unsigned char __a,
6624 vector unsigned char __b) {
6625 return vec_sl(__a, __b);
6630 #define __builtin_altivec_vslh vec_vslh
6632 static vector short __ATTRS_o_ai vec_vslh(vector short __a,
6633 vector unsigned short __b) {
6634 return vec_sl(__a, __b);
6637 static vector unsigned short __ATTRS_o_ai vec_vslh(vector unsigned short __a,
6638 vector unsigned short __b) {
6639 return vec_sl(__a, __b);
6644 #define __builtin_altivec_vslw vec_vslw
6646 static vector int __ATTRS_o_ai vec_vslw(vector int __a,
6647 vector unsigned int __b) {
6648 return vec_sl(__a, __b);
6651 static vector unsigned int __ATTRS_o_ai vec_vslw(vector unsigned int __a,
6652 vector unsigned int __b) {
6653 return vec_sl(__a, __b);
6658 #define __builtin_altivec_vsldoi_4si vec_sld
6660 static vector signed char __ATTRS_o_ai vec_sld(vector signed char __a,
6661 vector signed char __b,
6662 unsigned const int __c) {
6663 unsigned char __d = __c & 0x0F;
6664 #ifdef __LITTLE_ENDIAN__
6667 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6668 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6669 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6674 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6675 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6676 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6680 static vector unsigned char __ATTRS_o_ai vec_sld(vector unsigned char __a,
6681 vector unsigned char __b,
6682 unsigned const int __c) {
6683 unsigned char __d = __c & 0x0F;
6684 #ifdef __LITTLE_ENDIAN__
6687 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6688 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6689 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6694 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6695 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6696 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6700 static vector bool char __ATTRS_o_ai vec_sld(vector bool char __a,
6701 vector bool char __b,
6702 unsigned const int __c) {
6703 unsigned char __d = __c & 0x0F;
6704 #ifdef __LITTLE_ENDIAN__
6707 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6708 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6709 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6714 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6715 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6716 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6720 static vector signed short __ATTRS_o_ai vec_sld(vector signed short __a,
6721 vector signed short __b,
6722 unsigned const int __c) {
6723 unsigned char __d = __c & 0x0F;
6724 #ifdef __LITTLE_ENDIAN__
6727 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6728 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6729 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6734 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6735 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6736 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6740 static vector unsigned short __ATTRS_o_ai vec_sld(vector unsigned short __a,
6741 vector unsigned short __b,
6742 unsigned const int __c) {
6743 unsigned char __d = __c & 0x0F;
6744 #ifdef __LITTLE_ENDIAN__
6747 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6748 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6749 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6754 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6755 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6756 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6760 static vector bool short __ATTRS_o_ai vec_sld(vector bool short __a,
6761 vector bool short __b,
6762 unsigned const int __c) {
6763 unsigned char __d = __c & 0x0F;
6764 #ifdef __LITTLE_ENDIAN__
6767 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6768 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6769 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6774 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6775 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6776 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6780 static vector pixel __ATTRS_o_ai vec_sld(vector pixel __a, vector pixel __b,
6781 unsigned const int __c) {
6782 unsigned char __d = __c & 0x0F;
6783 #ifdef __LITTLE_ENDIAN__
6786 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6787 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6788 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6793 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6794 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6795 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6799 static vector signed int __ATTRS_o_ai vec_sld(vector signed int __a,
6800 vector signed int __b,
6801 unsigned const int __c) {
6802 unsigned char __d = __c & 0x0F;
6803 #ifdef __LITTLE_ENDIAN__
6806 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6807 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6808 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6813 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6814 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6815 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6819 static vector unsigned int __ATTRS_o_ai vec_sld(vector unsigned int __a,
6820 vector unsigned int __b,
6821 unsigned const int __c) {
6822 unsigned char __d = __c & 0x0F;
6823 #ifdef __LITTLE_ENDIAN__
6826 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6827 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6828 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6833 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6834 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6835 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6839 static vector bool int __ATTRS_o_ai vec_sld(vector bool int __a,
6840 vector bool int __b,
6841 unsigned const int __c) {
6842 unsigned char __d = __c & 0x0F;
6843 #ifdef __LITTLE_ENDIAN__
6846 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6847 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6848 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6853 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6854 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6855 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6859 static vector float __ATTRS_o_ai vec_sld(vector float __a, vector float __b,
6860 unsigned const int __c) {
6861 unsigned char __d = __c & 0x0F;
6862 #ifdef __LITTLE_ENDIAN__
6865 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6866 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6867 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6872 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6873 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6874 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6880 static vector signed char __ATTRS_o_ai vec_vsldoi(vector signed char __a,
6881 vector signed char __b,
6882 unsigned char __c) {
6883 unsigned char __d = __c & 0x0F;
6884 #ifdef __LITTLE_ENDIAN__
6887 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6888 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6889 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6894 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6895 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6896 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6900 static vector unsigned char __ATTRS_o_ai vec_vsldoi(vector unsigned char __a,
6901 vector unsigned char __b,
6902 unsigned char __c) {
6903 unsigned char __d = __c & 0x0F;
6904 #ifdef __LITTLE_ENDIAN__
6907 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6908 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6909 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6914 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6915 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6916 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6920 static vector short __ATTRS_o_ai vec_vsldoi(vector short __a, vector short __b,
6921 unsigned char __c) {
6922 unsigned char __d = __c & 0x0F;
6923 #ifdef __LITTLE_ENDIAN__
6926 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6927 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6928 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6933 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6934 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6935 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6939 static vector unsigned short __ATTRS_o_ai vec_vsldoi(vector unsigned short __a,
6940 vector unsigned short __b,
6941 unsigned char __c) {
6942 unsigned char __d = __c & 0x0F;
6943 #ifdef __LITTLE_ENDIAN__
6946 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6947 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6948 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6953 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6954 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6955 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6959 static vector pixel __ATTRS_o_ai vec_vsldoi(vector pixel __a, vector pixel __b,
6960 unsigned char __c) {
6961 unsigned char __d = __c & 0x0F;
6962 #ifdef __LITTLE_ENDIAN__
6965 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6966 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6967 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6972 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6973 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6974 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6978 static vector int __ATTRS_o_ai vec_vsldoi(vector int __a, vector int __b,
6979 unsigned char __c) {
6980 unsigned char __d = __c & 0x0F;
6981 #ifdef __LITTLE_ENDIAN__
6984 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
6985 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
6986 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
6991 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
6992 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
6993 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
6997 static vector unsigned int __ATTRS_o_ai vec_vsldoi(vector unsigned int __a,
6998 vector unsigned int __b,
6999 unsigned char __c) {
7000 unsigned char __d = __c & 0x0F;
7001 #ifdef __LITTLE_ENDIAN__
7004 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
7005 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
7006 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
7011 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
7012 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
7013 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
7017 static vector float __ATTRS_o_ai vec_vsldoi(vector float __a, vector float __b,
7018 unsigned char __c) {
7019 unsigned char __d = __c & 0x0F;
7020 #ifdef __LITTLE_ENDIAN__
7023 (vector unsigned char)(16 - __d, 17 - __d, 18 - __d, 19 - __d, 20 - __d,
7024 21 - __d, 22 - __d, 23 - __d, 24 - __d, 25 - __d,
7025 26 - __d, 27 - __d, 28 - __d, 29 - __d, 30 - __d,
7030 (vector unsigned char)(__d, __d + 1, __d + 2, __d + 3, __d + 4, __d + 5,
7031 __d + 6, __d + 7, __d + 8, __d + 9, __d + 10,
7032 __d + 11, __d + 12, __d + 13, __d + 14, __d + 15));
7038 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
7039 vector unsigned char __b) {
7040 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
7044 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
7045 vector unsigned short __b) {
7046 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
7050 static vector signed char __ATTRS_o_ai vec_sll(vector signed char __a,
7051 vector unsigned int __b) {
7052 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
7056 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
7057 vector unsigned char __b) {
7058 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
7062 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
7063 vector unsigned short __b) {
7064 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
7068 static vector unsigned char __ATTRS_o_ai vec_sll(vector unsigned char __a,
7069 vector unsigned int __b) {
7070 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
7074 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
7075 vector unsigned char __b) {
7076 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
7080 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
7081 vector unsigned short __b) {
7082 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
7086 static vector bool char __ATTRS_o_ai vec_sll(vector bool char __a,
7087 vector unsigned int __b) {
7088 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
7092 static vector short __ATTRS_o_ai vec_sll(vector short __a,
7093 vector unsigned char __b) {
7094 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7097 static vector short __ATTRS_o_ai vec_sll(vector short __a,
7098 vector unsigned short __b) {
7099 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7102 static vector short __ATTRS_o_ai vec_sll(vector short __a,
7103 vector unsigned int __b) {
7104 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7107 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
7108 vector unsigned char __b) {
7109 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7113 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
7114 vector unsigned short __b) {
7115 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7119 static vector unsigned short __ATTRS_o_ai vec_sll(vector unsigned short __a,
7120 vector unsigned int __b) {
7121 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7125 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
7126 vector unsigned char __b) {
7127 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7131 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
7132 vector unsigned short __b) {
7133 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7137 static vector bool short __ATTRS_o_ai vec_sll(vector bool short __a,
7138 vector unsigned int __b) {
7139 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7143 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
7144 vector unsigned char __b) {
7145 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7148 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
7149 vector unsigned short __b) {
7150 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7153 static vector pixel __ATTRS_o_ai vec_sll(vector pixel __a,
7154 vector unsigned int __b) {
7155 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7158 static vector int __ATTRS_o_ai vec_sll(vector int __a,
7159 vector unsigned char __b) {
7160 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7163 static vector int __ATTRS_o_ai vec_sll(vector int __a,
7164 vector unsigned short __b) {
7165 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7168 static vector int __ATTRS_o_ai vec_sll(vector int __a,
7169 vector unsigned int __b) {
7170 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7173 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
7174 vector unsigned char __b) {
7175 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7179 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
7180 vector unsigned short __b) {
7181 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7185 static vector unsigned int __ATTRS_o_ai vec_sll(vector unsigned int __a,
7186 vector unsigned int __b) {
7187 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7191 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
7192 vector unsigned char __b) {
7193 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7197 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
7198 vector unsigned short __b) {
7199 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7203 static vector bool int __ATTRS_o_ai vec_sll(vector bool int __a,
7204 vector unsigned int __b) {
7205 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7211 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
7212 vector unsigned char __b) {
7213 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
7217 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
7218 vector unsigned short __b) {
7219 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
7223 static vector signed char __ATTRS_o_ai vec_vsl(vector signed char __a,
7224 vector unsigned int __b) {
7225 return (vector signed char)__builtin_altivec_vsl((vector int)__a,
7229 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
7230 vector unsigned char __b) {
7231 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
7235 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
7236 vector unsigned short __b) {
7237 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
7241 static vector unsigned char __ATTRS_o_ai vec_vsl(vector unsigned char __a,
7242 vector unsigned int __b) {
7243 return (vector unsigned char)__builtin_altivec_vsl((vector int)__a,
7247 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
7248 vector unsigned char __b) {
7249 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
7253 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
7254 vector unsigned short __b) {
7255 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
7259 static vector bool char __ATTRS_o_ai vec_vsl(vector bool char __a,
7260 vector unsigned int __b) {
7261 return (vector bool char)__builtin_altivec_vsl((vector int)__a,
7265 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
7266 vector unsigned char __b) {
7267 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7270 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
7271 vector unsigned short __b) {
7272 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7275 static vector short __ATTRS_o_ai vec_vsl(vector short __a,
7276 vector unsigned int __b) {
7277 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7280 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
7281 vector unsigned char __b) {
7282 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7286 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
7287 vector unsigned short __b) {
7288 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7292 static vector unsigned short __ATTRS_o_ai vec_vsl(vector unsigned short __a,
7293 vector unsigned int __b) {
7294 return (vector unsigned short)__builtin_altivec_vsl((vector int)__a,
7298 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
7299 vector unsigned char __b) {
7300 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7304 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
7305 vector unsigned short __b) {
7306 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7310 static vector bool short __ATTRS_o_ai vec_vsl(vector bool short __a,
7311 vector unsigned int __b) {
7312 return (vector bool short)__builtin_altivec_vsl((vector int)__a,
7316 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
7317 vector unsigned char __b) {
7318 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7321 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
7322 vector unsigned short __b) {
7323 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7326 static vector pixel __ATTRS_o_ai vec_vsl(vector pixel __a,
7327 vector unsigned int __b) {
7328 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
7331 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
7332 vector unsigned char __b) {
7333 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7336 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
7337 vector unsigned short __b) {
7338 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7341 static vector int __ATTRS_o_ai vec_vsl(vector int __a,
7342 vector unsigned int __b) {
7343 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
7346 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
7347 vector unsigned char __b) {
7348 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7352 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
7353 vector unsigned short __b) {
7354 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7358 static vector unsigned int __ATTRS_o_ai vec_vsl(vector unsigned int __a,
7359 vector unsigned int __b) {
7360 return (vector unsigned int)__builtin_altivec_vsl((vector int)__a,
7364 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
7365 vector unsigned char __b) {
7366 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7370 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
7371 vector unsigned short __b) {
7372 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7376 static vector bool int __ATTRS_o_ai vec_vsl(vector bool int __a,
7377 vector unsigned int __b) {
7378 return (vector bool int)__builtin_altivec_vsl((vector int)__a,
7384 static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a,
7385 vector signed char __b) {
7386 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7390 static vector signed char __ATTRS_o_ai vec_slo(vector signed char __a,
7391 vector unsigned char __b) {
7392 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7396 static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a,
7397 vector signed char __b) {
7398 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7402 static vector unsigned char __ATTRS_o_ai vec_slo(vector unsigned char __a,
7403 vector unsigned char __b) {
7404 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7408 static vector short __ATTRS_o_ai vec_slo(vector short __a,
7409 vector signed char __b) {
7410 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7413 static vector short __ATTRS_o_ai vec_slo(vector short __a,
7414 vector unsigned char __b) {
7415 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7418 static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a,
7419 vector signed char __b) {
7420 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7424 static vector unsigned short __ATTRS_o_ai vec_slo(vector unsigned short __a,
7425 vector unsigned char __b) {
7426 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7430 static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a,
7431 vector signed char __b) {
7432 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7435 static vector pixel __ATTRS_o_ai vec_slo(vector pixel __a,
7436 vector unsigned char __b) {
7437 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7440 static vector int __ATTRS_o_ai vec_slo(vector int __a, vector signed char __b) {
7441 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7444 static vector int __ATTRS_o_ai vec_slo(vector int __a,
7445 vector unsigned char __b) {
7446 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7449 static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a,
7450 vector signed char __b) {
7451 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7455 static vector unsigned int __ATTRS_o_ai vec_slo(vector unsigned int __a,
7456 vector unsigned char __b) {
7457 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7461 static vector float __ATTRS_o_ai vec_slo(vector float __a,
7462 vector signed char __b) {
7463 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7466 static vector float __ATTRS_o_ai vec_slo(vector float __a,
7467 vector unsigned char __b) {
7468 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7473 static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a,
7474 vector signed char __b) {
7475 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7479 static vector signed char __ATTRS_o_ai vec_vslo(vector signed char __a,
7480 vector unsigned char __b) {
7481 return (vector signed char)__builtin_altivec_vslo((vector int)__a,
7485 static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a,
7486 vector signed char __b) {
7487 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7491 static vector unsigned char __ATTRS_o_ai vec_vslo(vector unsigned char __a,
7492 vector unsigned char __b) {
7493 return (vector unsigned char)__builtin_altivec_vslo((vector int)__a,
7497 static vector short __ATTRS_o_ai vec_vslo(vector short __a,
7498 vector signed char __b) {
7499 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7502 static vector short __ATTRS_o_ai vec_vslo(vector short __a,
7503 vector unsigned char __b) {
7504 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7507 static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a,
7508 vector signed char __b) {
7509 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7513 static vector unsigned short __ATTRS_o_ai vec_vslo(vector unsigned short __a,
7514 vector unsigned char __b) {
7515 return (vector unsigned short)__builtin_altivec_vslo((vector int)__a,
7519 static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a,
7520 vector signed char __b) {
7521 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7524 static vector pixel __ATTRS_o_ai vec_vslo(vector pixel __a,
7525 vector unsigned char __b) {
7526 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7529 static vector int __ATTRS_o_ai vec_vslo(vector int __a,
7530 vector signed char __b) {
7531 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7534 static vector int __ATTRS_o_ai vec_vslo(vector int __a,
7535 vector unsigned char __b) {
7536 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
7539 static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a,
7540 vector signed char __b) {
7541 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7545 static vector unsigned int __ATTRS_o_ai vec_vslo(vector unsigned int __a,
7546 vector unsigned char __b) {
7547 return (vector unsigned int)__builtin_altivec_vslo((vector int)__a,
7551 static vector float __ATTRS_o_ai vec_vslo(vector float __a,
7552 vector signed char __b) {
7553 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7556 static vector float __ATTRS_o_ai vec_vslo(vector float __a,
7557 vector unsigned char __b) {
7558 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
7563 static vector signed char __ATTRS_o_ai vec_splat(vector signed char __a,
7564 unsigned const int __b) {
7565 return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F));
7568 static vector unsigned char __ATTRS_o_ai vec_splat(vector unsigned char __a,
7569 unsigned const int __b) {
7570 return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F));
7573 static vector bool char __ATTRS_o_ai vec_splat(vector bool char __a,
7574 unsigned const int __b) {
7575 return vec_perm(__a, __a, (vector unsigned char)(__b & 0x0F));
7578 static vector signed short __ATTRS_o_ai vec_splat(vector signed short __a,
7579 unsigned const int __b) {
7580 unsigned char b0 = (__b & 0x07) * 2;
7581 unsigned char b1 = b0 + 1;
7582 return vec_perm(__a, __a,
7583 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7584 b0, b1, b0, b1, b0, b1, b0, b1));
7587 static vector unsigned short __ATTRS_o_ai vec_splat(vector unsigned short __a,
7588 unsigned const int __b) {
7589 unsigned char b0 = (__b & 0x07) * 2;
7590 unsigned char b1 = b0 + 1;
7591 return vec_perm(__a, __a,
7592 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7593 b0, b1, b0, b1, b0, b1, b0, b1));
7596 static vector bool short __ATTRS_o_ai vec_splat(vector bool short __a,
7597 unsigned const int __b) {
7598 unsigned char b0 = (__b & 0x07) * 2;
7599 unsigned char b1 = b0 + 1;
7600 return vec_perm(__a, __a,
7601 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7602 b0, b1, b0, b1, b0, b1, b0, b1));
7605 static vector pixel __ATTRS_o_ai vec_splat(vector pixel __a,
7606 unsigned const int __b) {
7607 unsigned char b0 = (__b & 0x07) * 2;
7608 unsigned char b1 = b0 + 1;
7609 return vec_perm(__a, __a,
7610 (vector unsigned char)(b0, b1, b0, b1, b0, b1, b0, b1,
7611 b0, b1, b0, b1, b0, b1, b0, b1));
7614 static vector signed int __ATTRS_o_ai vec_splat(vector signed int __a,
7615 unsigned const int __b) {
7616 unsigned char b0 = (__b & 0x03) * 4;
7617 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7618 return vec_perm(__a, __a,
7619 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7620 b1, b2, b3, b0, b1, b2, b3));
7623 static vector unsigned int __ATTRS_o_ai vec_splat(vector unsigned int __a,
7624 unsigned const int __b) {
7625 unsigned char b0 = (__b & 0x03) * 4;
7626 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7627 return vec_perm(__a, __a,
7628 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7629 b1, b2, b3, b0, b1, b2, b3));
7632 static vector bool int __ATTRS_o_ai vec_splat(vector bool int __a,
7633 unsigned const int __b) {
7634 unsigned char b0 = (__b & 0x03) * 4;
7635 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7636 return vec_perm(__a, __a,
7637 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7638 b1, b2, b3, b0, b1, b2, b3));
7641 static vector float __ATTRS_o_ai vec_splat(vector float __a,
7642 unsigned const int __b) {
7643 unsigned char b0 = (__b & 0x03) * 4;
7644 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3;
7645 return vec_perm(__a, __a,
7646 (vector unsigned char)(b0, b1, b2, b3, b0, b1, b2, b3, b0,
7647 b1, b2, b3, b0, b1, b2, b3));
7651 static vector double __ATTRS_o_ai vec_splat(vector double __a,
7652 unsigned const int __b) {
7653 unsigned char b0 = (__b & 0x01) * 8;
7654 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7655 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7656 return vec_perm(__a, __a,
7657 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7658 b0, b1, b2, b3, b4, b5, b6, b7));
7660 static vector bool long long __ATTRS_o_ai vec_splat(vector bool long long __a,
7661 unsigned const int __b) {
7662 unsigned char b0 = (__b & 0x01) * 8;
7663 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7664 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7665 return vec_perm(__a, __a,
7666 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7667 b0, b1, b2, b3, b4, b5, b6, b7));
7669 static vector signed long long __ATTRS_o_ai
7670 vec_splat(vector signed long long __a, unsigned const int __b) {
7671 unsigned char b0 = (__b & 0x01) * 8;
7672 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7673 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7674 return vec_perm(__a, __a,
7675 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7676 b0, b1, b2, b3, b4, b5, b6, b7));
7678 static vector unsigned long long __ATTRS_o_ai
7679 vec_splat(vector unsigned long long __a, unsigned const int __b) {
7680 unsigned char b0 = (__b & 0x01) * 8;
7681 unsigned char b1 = b0 + 1, b2 = b0 + 2, b3 = b0 + 3, b4 = b0 + 4,
7682 b5 = b0 + 5, b6 = b0 + 6, b7 = b0 + 7;
7683 return vec_perm(__a, __a,
7684 (vector unsigned char)(b0, b1, b2, b3, b4, b5, b6, b7,
7685 b0, b1, b2, b3, b4, b5, b6, b7));
7691 #define __builtin_altivec_vspltb vec_vspltb
7693 static vector signed char __ATTRS_o_ai vec_vspltb(vector signed char __a,
7694 unsigned char __b) {
7695 return vec_perm(__a, __a, (vector unsigned char)(__b));
7698 static vector unsigned char __ATTRS_o_ai vec_vspltb(vector unsigned char __a,
7699 unsigned char __b) {
7700 return vec_perm(__a, __a, (vector unsigned char)(__b));
7703 static vector bool char __ATTRS_o_ai vec_vspltb(vector bool char __a,
7704 unsigned char __b) {
7705 return vec_perm(__a, __a, (vector unsigned char)(__b));
7710 #define __builtin_altivec_vsplth vec_vsplth
7712 static vector short __ATTRS_o_ai vec_vsplth(vector short __a,
7713 unsigned char __b) {
7715 unsigned char b1 = __b + 1;
7716 return vec_perm(__a, __a,
7717 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7718 __b, b1, __b, b1, __b, b1, __b, b1));
7721 static vector unsigned short __ATTRS_o_ai vec_vsplth(vector unsigned short __a,
7722 unsigned char __b) {
7724 unsigned char b1 = __b + 1;
7725 return vec_perm(__a, __a,
7726 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7727 __b, b1, __b, b1, __b, b1, __b, b1));
7730 static vector bool short __ATTRS_o_ai vec_vsplth(vector bool short __a,
7731 unsigned char __b) {
7733 unsigned char b1 = __b + 1;
7734 return vec_perm(__a, __a,
7735 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7736 __b, b1, __b, b1, __b, b1, __b, b1));
7739 static vector pixel __ATTRS_o_ai vec_vsplth(vector pixel __a,
7740 unsigned char __b) {
7742 unsigned char b1 = __b + 1;
7743 return vec_perm(__a, __a,
7744 (vector unsigned char)(__b, b1, __b, b1, __b, b1, __b, b1,
7745 __b, b1, __b, b1, __b, b1, __b, b1));
7750 #define __builtin_altivec_vspltw vec_vspltw
7752 static vector int __ATTRS_o_ai vec_vspltw(vector int __a, unsigned char __b) {
7754 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7755 return vec_perm(__a, __a,
7756 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7757 b1, b2, b3, __b, b1, b2, b3));
7760 static vector unsigned int __ATTRS_o_ai vec_vspltw(vector unsigned int __a,
7761 unsigned char __b) {
7763 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7764 return vec_perm(__a, __a,
7765 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7766 b1, b2, b3, __b, b1, b2, b3));
7769 static vector bool int __ATTRS_o_ai vec_vspltw(vector bool int __a,
7770 unsigned char __b) {
7772 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7773 return vec_perm(__a, __a,
7774 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7775 b1, b2, b3, __b, b1, b2, b3));
7778 static vector float __ATTRS_o_ai vec_vspltw(vector float __a,
7779 unsigned char __b) {
7781 unsigned char b1 = __b + 1, b2 = __b + 2, b3 = __b + 3;
7782 return vec_perm(__a, __a,
7783 (vector unsigned char)(__b, b1, b2, b3, __b, b1, b2, b3, __b,
7784 b1, b2, b3, __b, b1, b2, b3));
7789 #define __builtin_altivec_vspltisb vec_splat_s8
7791 // FIXME: parameter should be treated as 5-bit signed literal
7792 static vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a) {
7793 return (vector signed char)(__a);
7798 // FIXME: parameter should be treated as 5-bit signed literal
7799 static vector signed char __ATTRS_o_ai vec_vspltisb(signed char __a) {
7800 return (vector signed char)(__a);
7805 #define __builtin_altivec_vspltish vec_splat_s16
7807 // FIXME: parameter should be treated as 5-bit signed literal
7808 static vector short __ATTRS_o_ai vec_splat_s16(signed char __a) {
7809 return (vector short)(__a);
7814 // FIXME: parameter should be treated as 5-bit signed literal
7815 static vector short __ATTRS_o_ai vec_vspltish(signed char __a) {
7816 return (vector short)(__a);
7821 #define __builtin_altivec_vspltisw vec_splat_s32
7823 // FIXME: parameter should be treated as 5-bit signed literal
7824 static vector int __ATTRS_o_ai vec_splat_s32(signed char __a) {
7825 return (vector int)(__a);
7830 // FIXME: parameter should be treated as 5-bit signed literal
7831 static vector int __ATTRS_o_ai vec_vspltisw(signed char __a) {
7832 return (vector int)(__a);
7837 // FIXME: parameter should be treated as 5-bit signed literal
7838 static vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a) {
7839 return (vector unsigned char)(__a);
7844 // FIXME: parameter should be treated as 5-bit signed literal
7845 static vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a) {
7846 return (vector unsigned short)(__a);
7851 // FIXME: parameter should be treated as 5-bit signed literal
7852 static vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a) {
7853 return (vector unsigned int)(__a);
7858 static vector signed char __ATTRS_o_ai vec_sr(vector signed char __a,
7859 vector unsigned char __b) {
7860 vector unsigned char __res = (vector unsigned char)__a >> __b;
7861 return (vector signed char)__res;
7864 static vector unsigned char __ATTRS_o_ai vec_sr(vector unsigned char __a,
7865 vector unsigned char __b) {
7869 static vector signed short __ATTRS_o_ai vec_sr(vector signed short __a,
7870 vector unsigned short __b) {
7871 vector unsigned short __res = (vector unsigned short)__a >> __b;
7872 return (vector signed short)__res;
7875 static vector unsigned short __ATTRS_o_ai vec_sr(vector unsigned short __a,
7876 vector unsigned short __b) {
7880 static vector signed int __ATTRS_o_ai vec_sr(vector signed int __a,
7881 vector unsigned int __b) {
7882 vector unsigned int __res = (vector unsigned int)__a >> __b;
7883 return (vector signed int)__res;
7886 static vector unsigned int __ATTRS_o_ai vec_sr(vector unsigned int __a,
7887 vector unsigned int __b) {
7891 #ifdef __POWER8_VECTOR__
7892 static vector signed long long __ATTRS_o_ai
7893 vec_sr(vector signed long long __a, vector unsigned long long __b) {
7894 vector unsigned long long __res = (vector unsigned long long)__a >> __b;
7895 return (vector signed long long)__res;
7898 static vector unsigned long long __ATTRS_o_ai
7899 vec_sr(vector unsigned long long __a, vector unsigned long long __b) {
7906 #define __builtin_altivec_vsrb vec_vsrb
7908 static vector signed char __ATTRS_o_ai vec_vsrb(vector signed char __a,
7909 vector unsigned char __b) {
7910 return __a >> (vector signed char)__b;
7913 static vector unsigned char __ATTRS_o_ai vec_vsrb(vector unsigned char __a,
7914 vector unsigned char __b) {
7920 #define __builtin_altivec_vsrh vec_vsrh
7922 static vector short __ATTRS_o_ai vec_vsrh(vector short __a,
7923 vector unsigned short __b) {
7924 return __a >> (vector short)__b;
7927 static vector unsigned short __ATTRS_o_ai vec_vsrh(vector unsigned short __a,
7928 vector unsigned short __b) {
7934 #define __builtin_altivec_vsrw vec_vsrw
7936 static vector int __ATTRS_o_ai vec_vsrw(vector int __a,
7937 vector unsigned int __b) {
7938 return __a >> (vector int)__b;
7941 static vector unsigned int __ATTRS_o_ai vec_vsrw(vector unsigned int __a,
7942 vector unsigned int __b) {
7948 static vector signed char __ATTRS_o_ai vec_sra(vector signed char __a,
7949 vector unsigned char __b) {
7950 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
7953 static vector unsigned char __ATTRS_o_ai vec_sra(vector unsigned char __a,
7954 vector unsigned char __b) {
7955 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
7958 static vector short __ATTRS_o_ai vec_sra(vector short __a,
7959 vector unsigned short __b) {
7960 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
7963 static vector unsigned short __ATTRS_o_ai vec_sra(vector unsigned short __a,
7964 vector unsigned short __b) {
7965 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
7968 static vector int __ATTRS_o_ai vec_sra(vector int __a,
7969 vector unsigned int __b) {
7970 return __builtin_altivec_vsraw(__a, __b);
7973 static vector unsigned int __ATTRS_o_ai vec_sra(vector unsigned int __a,
7974 vector unsigned int __b) {
7975 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
7978 #ifdef __POWER8_VECTOR__
7979 static vector signed long long __ATTRS_o_ai
7980 vec_sra(vector signed long long __a, vector unsigned long long __b) {
7984 static vector unsigned long long __ATTRS_o_ai
7985 vec_sra(vector unsigned long long __a, vector unsigned long long __b) {
7986 return (vector unsigned long long)((vector signed long long)__a >> __b);
7992 static vector signed char __ATTRS_o_ai vec_vsrab(vector signed char __a,
7993 vector unsigned char __b) {
7994 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
7997 static vector unsigned char __ATTRS_o_ai vec_vsrab(vector unsigned char __a,
7998 vector unsigned char __b) {
7999 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
8004 static vector short __ATTRS_o_ai vec_vsrah(vector short __a,
8005 vector unsigned short __b) {
8006 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
8009 static vector unsigned short __ATTRS_o_ai vec_vsrah(vector unsigned short __a,
8010 vector unsigned short __b) {
8011 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
8016 static vector int __ATTRS_o_ai vec_vsraw(vector int __a,
8017 vector unsigned int __b) {
8018 return __builtin_altivec_vsraw(__a, __b);
8021 static vector unsigned int __ATTRS_o_ai vec_vsraw(vector unsigned int __a,
8022 vector unsigned int __b) {
8023 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
8028 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
8029 vector unsigned char __b) {
8030 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
8034 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
8035 vector unsigned short __b) {
8036 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
8040 static vector signed char __ATTRS_o_ai vec_srl(vector signed char __a,
8041 vector unsigned int __b) {
8042 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
8046 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
8047 vector unsigned char __b) {
8048 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
8052 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
8053 vector unsigned short __b) {
8054 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
8058 static vector unsigned char __ATTRS_o_ai vec_srl(vector unsigned char __a,
8059 vector unsigned int __b) {
8060 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
8064 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
8065 vector unsigned char __b) {
8066 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
8070 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
8071 vector unsigned short __b) {
8072 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
8076 static vector bool char __ATTRS_o_ai vec_srl(vector bool char __a,
8077 vector unsigned int __b) {
8078 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
8082 static vector short __ATTRS_o_ai vec_srl(vector short __a,
8083 vector unsigned char __b) {
8084 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8087 static vector short __ATTRS_o_ai vec_srl(vector short __a,
8088 vector unsigned short __b) {
8089 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8092 static vector short __ATTRS_o_ai vec_srl(vector short __a,
8093 vector unsigned int __b) {
8094 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8097 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
8098 vector unsigned char __b) {
8099 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8103 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
8104 vector unsigned short __b) {
8105 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8109 static vector unsigned short __ATTRS_o_ai vec_srl(vector unsigned short __a,
8110 vector unsigned int __b) {
8111 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8115 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
8116 vector unsigned char __b) {
8117 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8121 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
8122 vector unsigned short __b) {
8123 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8127 static vector bool short __ATTRS_o_ai vec_srl(vector bool short __a,
8128 vector unsigned int __b) {
8129 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8133 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
8134 vector unsigned char __b) {
8135 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8138 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
8139 vector unsigned short __b) {
8140 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8143 static vector pixel __ATTRS_o_ai vec_srl(vector pixel __a,
8144 vector unsigned int __b) {
8145 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8148 static vector int __ATTRS_o_ai vec_srl(vector int __a,
8149 vector unsigned char __b) {
8150 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8153 static vector int __ATTRS_o_ai vec_srl(vector int __a,
8154 vector unsigned short __b) {
8155 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8158 static vector int __ATTRS_o_ai vec_srl(vector int __a,
8159 vector unsigned int __b) {
8160 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8163 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
8164 vector unsigned char __b) {
8165 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8169 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
8170 vector unsigned short __b) {
8171 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8175 static vector unsigned int __ATTRS_o_ai vec_srl(vector unsigned int __a,
8176 vector unsigned int __b) {
8177 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8181 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
8182 vector unsigned char __b) {
8183 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8187 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
8188 vector unsigned short __b) {
8189 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8193 static vector bool int __ATTRS_o_ai vec_srl(vector bool int __a,
8194 vector unsigned int __b) {
8195 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8201 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
8202 vector unsigned char __b) {
8203 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
8207 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
8208 vector unsigned short __b) {
8209 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
8213 static vector signed char __ATTRS_o_ai vec_vsr(vector signed char __a,
8214 vector unsigned int __b) {
8215 return (vector signed char)__builtin_altivec_vsr((vector int)__a,
8219 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
8220 vector unsigned char __b) {
8221 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
8225 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
8226 vector unsigned short __b) {
8227 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
8231 static vector unsigned char __ATTRS_o_ai vec_vsr(vector unsigned char __a,
8232 vector unsigned int __b) {
8233 return (vector unsigned char)__builtin_altivec_vsr((vector int)__a,
8237 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
8238 vector unsigned char __b) {
8239 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
8243 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
8244 vector unsigned short __b) {
8245 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
8249 static vector bool char __ATTRS_o_ai vec_vsr(vector bool char __a,
8250 vector unsigned int __b) {
8251 return (vector bool char)__builtin_altivec_vsr((vector int)__a,
8255 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
8256 vector unsigned char __b) {
8257 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8260 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
8261 vector unsigned short __b) {
8262 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8265 static vector short __ATTRS_o_ai vec_vsr(vector short __a,
8266 vector unsigned int __b) {
8267 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8270 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
8271 vector unsigned char __b) {
8272 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8276 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
8277 vector unsigned short __b) {
8278 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8282 static vector unsigned short __ATTRS_o_ai vec_vsr(vector unsigned short __a,
8283 vector unsigned int __b) {
8284 return (vector unsigned short)__builtin_altivec_vsr((vector int)__a,
8288 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
8289 vector unsigned char __b) {
8290 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8294 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
8295 vector unsigned short __b) {
8296 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8300 static vector bool short __ATTRS_o_ai vec_vsr(vector bool short __a,
8301 vector unsigned int __b) {
8302 return (vector bool short)__builtin_altivec_vsr((vector int)__a,
8306 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
8307 vector unsigned char __b) {
8308 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8311 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
8312 vector unsigned short __b) {
8313 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8316 static vector pixel __ATTRS_o_ai vec_vsr(vector pixel __a,
8317 vector unsigned int __b) {
8318 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
8321 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
8322 vector unsigned char __b) {
8323 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8326 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
8327 vector unsigned short __b) {
8328 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8331 static vector int __ATTRS_o_ai vec_vsr(vector int __a,
8332 vector unsigned int __b) {
8333 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
8336 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
8337 vector unsigned char __b) {
8338 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8342 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
8343 vector unsigned short __b) {
8344 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8348 static vector unsigned int __ATTRS_o_ai vec_vsr(vector unsigned int __a,
8349 vector unsigned int __b) {
8350 return (vector unsigned int)__builtin_altivec_vsr((vector int)__a,
8354 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
8355 vector unsigned char __b) {
8356 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8360 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
8361 vector unsigned short __b) {
8362 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8366 static vector bool int __ATTRS_o_ai vec_vsr(vector bool int __a,
8367 vector unsigned int __b) {
8368 return (vector bool int)__builtin_altivec_vsr((vector int)__a,
8374 static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a,
8375 vector signed char __b) {
8376 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8380 static vector signed char __ATTRS_o_ai vec_sro(vector signed char __a,
8381 vector unsigned char __b) {
8382 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8386 static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a,
8387 vector signed char __b) {
8388 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8392 static vector unsigned char __ATTRS_o_ai vec_sro(vector unsigned char __a,
8393 vector unsigned char __b) {
8394 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8398 static vector short __ATTRS_o_ai vec_sro(vector short __a,
8399 vector signed char __b) {
8400 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8403 static vector short __ATTRS_o_ai vec_sro(vector short __a,
8404 vector unsigned char __b) {
8405 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8408 static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a,
8409 vector signed char __b) {
8410 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8414 static vector unsigned short __ATTRS_o_ai vec_sro(vector unsigned short __a,
8415 vector unsigned char __b) {
8416 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8420 static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a,
8421 vector signed char __b) {
8422 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8425 static vector pixel __ATTRS_o_ai vec_sro(vector pixel __a,
8426 vector unsigned char __b) {
8427 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8430 static vector int __ATTRS_o_ai vec_sro(vector int __a, vector signed char __b) {
8431 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8434 static vector int __ATTRS_o_ai vec_sro(vector int __a,
8435 vector unsigned char __b) {
8436 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8439 static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a,
8440 vector signed char __b) {
8441 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8445 static vector unsigned int __ATTRS_o_ai vec_sro(vector unsigned int __a,
8446 vector unsigned char __b) {
8447 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8451 static vector float __ATTRS_o_ai vec_sro(vector float __a,
8452 vector signed char __b) {
8453 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8456 static vector float __ATTRS_o_ai vec_sro(vector float __a,
8457 vector unsigned char __b) {
8458 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8463 static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a,
8464 vector signed char __b) {
8465 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8469 static vector signed char __ATTRS_o_ai vec_vsro(vector signed char __a,
8470 vector unsigned char __b) {
8471 return (vector signed char)__builtin_altivec_vsro((vector int)__a,
8475 static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a,
8476 vector signed char __b) {
8477 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8481 static vector unsigned char __ATTRS_o_ai vec_vsro(vector unsigned char __a,
8482 vector unsigned char __b) {
8483 return (vector unsigned char)__builtin_altivec_vsro((vector int)__a,
8487 static vector short __ATTRS_o_ai vec_vsro(vector short __a,
8488 vector signed char __b) {
8489 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8492 static vector short __ATTRS_o_ai vec_vsro(vector short __a,
8493 vector unsigned char __b) {
8494 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8497 static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a,
8498 vector signed char __b) {
8499 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8503 static vector unsigned short __ATTRS_o_ai vec_vsro(vector unsigned short __a,
8504 vector unsigned char __b) {
8505 return (vector unsigned short)__builtin_altivec_vsro((vector int)__a,
8509 static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a,
8510 vector signed char __b) {
8511 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8514 static vector pixel __ATTRS_o_ai vec_vsro(vector pixel __a,
8515 vector unsigned char __b) {
8516 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8519 static vector int __ATTRS_o_ai vec_vsro(vector int __a,
8520 vector signed char __b) {
8521 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8524 static vector int __ATTRS_o_ai vec_vsro(vector int __a,
8525 vector unsigned char __b) {
8526 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
8529 static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a,
8530 vector signed char __b) {
8531 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8535 static vector unsigned int __ATTRS_o_ai vec_vsro(vector unsigned int __a,
8536 vector unsigned char __b) {
8537 return (vector unsigned int)__builtin_altivec_vsro((vector int)__a,
8541 static vector float __ATTRS_o_ai vec_vsro(vector float __a,
8542 vector signed char __b) {
8543 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8546 static vector float __ATTRS_o_ai vec_vsro(vector float __a,
8547 vector unsigned char __b) {
8548 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
8553 static void __ATTRS_o_ai vec_st(vector signed char __a, int __b,
8554 vector signed char *__c) {
8555 __builtin_altivec_stvx((vector int)__a, __b, __c);
8558 static void __ATTRS_o_ai vec_st(vector signed char __a, int __b,
8560 __builtin_altivec_stvx((vector int)__a, __b, __c);
8563 static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b,
8564 vector unsigned char *__c) {
8565 __builtin_altivec_stvx((vector int)__a, __b, __c);
8568 static void __ATTRS_o_ai vec_st(vector unsigned char __a, int __b,
8569 unsigned char *__c) {
8570 __builtin_altivec_stvx((vector int)__a, __b, __c);
8573 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
8575 __builtin_altivec_stvx((vector int)__a, __b, __c);
8578 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
8579 unsigned char *__c) {
8580 __builtin_altivec_stvx((vector int)__a, __b, __c);
8583 static void __ATTRS_o_ai vec_st(vector bool char __a, int __b,
8584 vector bool char *__c) {
8585 __builtin_altivec_stvx((vector int)__a, __b, __c);
8588 static void __ATTRS_o_ai vec_st(vector short __a, int __b, vector short *__c) {
8589 __builtin_altivec_stvx((vector int)__a, __b, __c);
8592 static void __ATTRS_o_ai vec_st(vector short __a, int __b, short *__c) {
8593 __builtin_altivec_stvx((vector int)__a, __b, __c);
8596 static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b,
8597 vector unsigned short *__c) {
8598 __builtin_altivec_stvx((vector int)__a, __b, __c);
8601 static void __ATTRS_o_ai vec_st(vector unsigned short __a, int __b,
8602 unsigned short *__c) {
8603 __builtin_altivec_stvx((vector int)__a, __b, __c);
8606 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b, short *__c) {
8607 __builtin_altivec_stvx((vector int)__a, __b, __c);
8610 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b,
8611 unsigned short *__c) {
8612 __builtin_altivec_stvx((vector int)__a, __b, __c);
8615 static void __ATTRS_o_ai vec_st(vector bool short __a, int __b,
8616 vector bool short *__c) {
8617 __builtin_altivec_stvx((vector int)__a, __b, __c);
8620 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, short *__c) {
8621 __builtin_altivec_stvx((vector int)__a, __b, __c);
8624 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b,
8625 unsigned short *__c) {
8626 __builtin_altivec_stvx((vector int)__a, __b, __c);
8629 static void __ATTRS_o_ai vec_st(vector pixel __a, int __b, vector pixel *__c) {
8630 __builtin_altivec_stvx((vector int)__a, __b, __c);
8633 static void __ATTRS_o_ai vec_st(vector int __a, int __b, vector int *__c) {
8634 __builtin_altivec_stvx(__a, __b, __c);
8637 static void __ATTRS_o_ai vec_st(vector int __a, int __b, int *__c) {
8638 __builtin_altivec_stvx(__a, __b, __c);
8641 static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b,
8642 vector unsigned int *__c) {
8643 __builtin_altivec_stvx((vector int)__a, __b, __c);
8646 static void __ATTRS_o_ai vec_st(vector unsigned int __a, int __b,
8647 unsigned int *__c) {
8648 __builtin_altivec_stvx((vector int)__a, __b, __c);
8651 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b, int *__c) {
8652 __builtin_altivec_stvx((vector int)__a, __b, __c);
8655 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b,
8656 unsigned int *__c) {
8657 __builtin_altivec_stvx((vector int)__a, __b, __c);
8660 static void __ATTRS_o_ai vec_st(vector bool int __a, int __b,
8661 vector bool int *__c) {
8662 __builtin_altivec_stvx((vector int)__a, __b, __c);
8665 static void __ATTRS_o_ai vec_st(vector float __a, int __b, vector float *__c) {
8666 __builtin_altivec_stvx((vector int)__a, __b, __c);
8669 static void __ATTRS_o_ai vec_st(vector float __a, int __b, float *__c) {
8670 __builtin_altivec_stvx((vector int)__a, __b, __c);
8675 static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b,
8676 vector signed char *__c) {
8677 __builtin_altivec_stvx((vector int)__a, __b, __c);
8680 static void __ATTRS_o_ai vec_stvx(vector signed char __a, int __b,
8682 __builtin_altivec_stvx((vector int)__a, __b, __c);
8685 static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b,
8686 vector unsigned char *__c) {
8687 __builtin_altivec_stvx((vector int)__a, __b, __c);
8690 static void __ATTRS_o_ai vec_stvx(vector unsigned char __a, int __b,
8691 unsigned char *__c) {
8692 __builtin_altivec_stvx((vector int)__a, __b, __c);
8695 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
8697 __builtin_altivec_stvx((vector int)__a, __b, __c);
8700 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
8701 unsigned char *__c) {
8702 __builtin_altivec_stvx((vector int)__a, __b, __c);
8705 static void __ATTRS_o_ai vec_stvx(vector bool char __a, int __b,
8706 vector bool char *__c) {
8707 __builtin_altivec_stvx((vector int)__a, __b, __c);
8710 static void __ATTRS_o_ai vec_stvx(vector short __a, int __b,
8711 vector short *__c) {
8712 __builtin_altivec_stvx((vector int)__a, __b, __c);
8715 static void __ATTRS_o_ai vec_stvx(vector short __a, int __b, short *__c) {
8716 __builtin_altivec_stvx((vector int)__a, __b, __c);
8719 static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b,
8720 vector unsigned short *__c) {
8721 __builtin_altivec_stvx((vector int)__a, __b, __c);
8724 static void __ATTRS_o_ai vec_stvx(vector unsigned short __a, int __b,
8725 unsigned short *__c) {
8726 __builtin_altivec_stvx((vector int)__a, __b, __c);
8729 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b, short *__c) {
8730 __builtin_altivec_stvx((vector int)__a, __b, __c);
8733 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b,
8734 unsigned short *__c) {
8735 __builtin_altivec_stvx((vector int)__a, __b, __c);
8738 static void __ATTRS_o_ai vec_stvx(vector bool short __a, int __b,
8739 vector bool short *__c) {
8740 __builtin_altivec_stvx((vector int)__a, __b, __c);
8743 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b, short *__c) {
8744 __builtin_altivec_stvx((vector int)__a, __b, __c);
8747 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b,
8748 unsigned short *__c) {
8749 __builtin_altivec_stvx((vector int)__a, __b, __c);
8752 static void __ATTRS_o_ai vec_stvx(vector pixel __a, int __b,
8753 vector pixel *__c) {
8754 __builtin_altivec_stvx((vector int)__a, __b, __c);
8757 static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, vector int *__c) {
8758 __builtin_altivec_stvx(__a, __b, __c);
8761 static void __ATTRS_o_ai vec_stvx(vector int __a, int __b, int *__c) {
8762 __builtin_altivec_stvx(__a, __b, __c);
8765 static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b,
8766 vector unsigned int *__c) {
8767 __builtin_altivec_stvx((vector int)__a, __b, __c);
8770 static void __ATTRS_o_ai vec_stvx(vector unsigned int __a, int __b,
8771 unsigned int *__c) {
8772 __builtin_altivec_stvx((vector int)__a, __b, __c);
8775 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b, int *__c) {
8776 __builtin_altivec_stvx((vector int)__a, __b, __c);
8779 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b,
8780 unsigned int *__c) {
8781 __builtin_altivec_stvx((vector int)__a, __b, __c);
8784 static void __ATTRS_o_ai vec_stvx(vector bool int __a, int __b,
8785 vector bool int *__c) {
8786 __builtin_altivec_stvx((vector int)__a, __b, __c);
8789 static void __ATTRS_o_ai vec_stvx(vector float __a, int __b,
8790 vector float *__c) {
8791 __builtin_altivec_stvx((vector int)__a, __b, __c);
8794 static void __ATTRS_o_ai vec_stvx(vector float __a, int __b, float *__c) {
8795 __builtin_altivec_stvx((vector int)__a, __b, __c);
8800 static void __ATTRS_o_ai vec_ste(vector signed char __a, int __b,
8802 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8805 static void __ATTRS_o_ai vec_ste(vector unsigned char __a, int __b,
8806 unsigned char *__c) {
8807 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8810 static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b,
8812 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8815 static void __ATTRS_o_ai vec_ste(vector bool char __a, int __b,
8816 unsigned char *__c) {
8817 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8820 static void __ATTRS_o_ai vec_ste(vector short __a, int __b, short *__c) {
8821 __builtin_altivec_stvehx(__a, __b, __c);
8824 static void __ATTRS_o_ai vec_ste(vector unsigned short __a, int __b,
8825 unsigned short *__c) {
8826 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8829 static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b, short *__c) {
8830 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8833 static void __ATTRS_o_ai vec_ste(vector bool short __a, int __b,
8834 unsigned short *__c) {
8835 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8838 static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b, short *__c) {
8839 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8842 static void __ATTRS_o_ai vec_ste(vector pixel __a, int __b,
8843 unsigned short *__c) {
8844 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8847 static void __ATTRS_o_ai vec_ste(vector int __a, int __b, int *__c) {
8848 __builtin_altivec_stvewx(__a, __b, __c);
8851 static void __ATTRS_o_ai vec_ste(vector unsigned int __a, int __b,
8852 unsigned int *__c) {
8853 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8856 static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b, int *__c) {
8857 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8860 static void __ATTRS_o_ai vec_ste(vector bool int __a, int __b,
8861 unsigned int *__c) {
8862 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8865 static void __ATTRS_o_ai vec_ste(vector float __a, int __b, float *__c) {
8866 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8871 static void __ATTRS_o_ai vec_stvebx(vector signed char __a, int __b,
8873 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8876 static void __ATTRS_o_ai vec_stvebx(vector unsigned char __a, int __b,
8877 unsigned char *__c) {
8878 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8881 static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b,
8883 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8886 static void __ATTRS_o_ai vec_stvebx(vector bool char __a, int __b,
8887 unsigned char *__c) {
8888 __builtin_altivec_stvebx((vector char)__a, __b, __c);
8893 static void __ATTRS_o_ai vec_stvehx(vector short __a, int __b, short *__c) {
8894 __builtin_altivec_stvehx(__a, __b, __c);
8897 static void __ATTRS_o_ai vec_stvehx(vector unsigned short __a, int __b,
8898 unsigned short *__c) {
8899 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8902 static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b,
8904 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8907 static void __ATTRS_o_ai vec_stvehx(vector bool short __a, int __b,
8908 unsigned short *__c) {
8909 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8912 static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b, short *__c) {
8913 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8916 static void __ATTRS_o_ai vec_stvehx(vector pixel __a, int __b,
8917 unsigned short *__c) {
8918 __builtin_altivec_stvehx((vector short)__a, __b, __c);
8923 static void __ATTRS_o_ai vec_stvewx(vector int __a, int __b, int *__c) {
8924 __builtin_altivec_stvewx(__a, __b, __c);
8927 static void __ATTRS_o_ai vec_stvewx(vector unsigned int __a, int __b,
8928 unsigned int *__c) {
8929 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8932 static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b, int *__c) {
8933 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8936 static void __ATTRS_o_ai vec_stvewx(vector bool int __a, int __b,
8937 unsigned int *__c) {
8938 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8941 static void __ATTRS_o_ai vec_stvewx(vector float __a, int __b, float *__c) {
8942 __builtin_altivec_stvewx((vector int)__a, __b, __c);
8947 static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b,
8948 vector signed char *__c) {
8949 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8952 static void __ATTRS_o_ai vec_stl(vector signed char __a, int __b,
8954 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8957 static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b,
8958 vector unsigned char *__c) {
8959 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8962 static void __ATTRS_o_ai vec_stl(vector unsigned char __a, int __b,
8963 unsigned char *__c) {
8964 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8967 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
8969 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8972 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
8973 unsigned char *__c) {
8974 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8977 static void __ATTRS_o_ai vec_stl(vector bool char __a, int __b,
8978 vector bool char *__c) {
8979 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8982 static void __ATTRS_o_ai vec_stl(vector short __a, int __b, vector short *__c) {
8983 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8986 static void __ATTRS_o_ai vec_stl(vector short __a, int __b, short *__c) {
8987 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8990 static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b,
8991 vector unsigned short *__c) {
8992 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8995 static void __ATTRS_o_ai vec_stl(vector unsigned short __a, int __b,
8996 unsigned short *__c) {
8997 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9000 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b, short *__c) {
9001 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9004 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b,
9005 unsigned short *__c) {
9006 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9009 static void __ATTRS_o_ai vec_stl(vector bool short __a, int __b,
9010 vector bool short *__c) {
9011 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9014 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, short *__c) {
9015 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9018 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b,
9019 unsigned short *__c) {
9020 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9023 static void __ATTRS_o_ai vec_stl(vector pixel __a, int __b, vector pixel *__c) {
9024 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9027 static void __ATTRS_o_ai vec_stl(vector int __a, int __b, vector int *__c) {
9028 __builtin_altivec_stvxl(__a, __b, __c);
9031 static void __ATTRS_o_ai vec_stl(vector int __a, int __b, int *__c) {
9032 __builtin_altivec_stvxl(__a, __b, __c);
9035 static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b,
9036 vector unsigned int *__c) {
9037 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9040 static void __ATTRS_o_ai vec_stl(vector unsigned int __a, int __b,
9041 unsigned int *__c) {
9042 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9045 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b, int *__c) {
9046 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9049 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b,
9050 unsigned int *__c) {
9051 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9054 static void __ATTRS_o_ai vec_stl(vector bool int __a, int __b,
9055 vector bool int *__c) {
9056 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9059 static void __ATTRS_o_ai vec_stl(vector float __a, int __b, vector float *__c) {
9060 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9063 static void __ATTRS_o_ai vec_stl(vector float __a, int __b, float *__c) {
9064 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9069 static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b,
9070 vector signed char *__c) {
9071 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9074 static void __ATTRS_o_ai vec_stvxl(vector signed char __a, int __b,
9076 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9079 static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b,
9080 vector unsigned char *__c) {
9081 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9084 static void __ATTRS_o_ai vec_stvxl(vector unsigned char __a, int __b,
9085 unsigned char *__c) {
9086 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9089 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
9091 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9094 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
9095 unsigned char *__c) {
9096 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9099 static void __ATTRS_o_ai vec_stvxl(vector bool char __a, int __b,
9100 vector bool char *__c) {
9101 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9104 static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b,
9105 vector short *__c) {
9106 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9109 static void __ATTRS_o_ai vec_stvxl(vector short __a, int __b, short *__c) {
9110 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9113 static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b,
9114 vector unsigned short *__c) {
9115 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9118 static void __ATTRS_o_ai vec_stvxl(vector unsigned short __a, int __b,
9119 unsigned short *__c) {
9120 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9123 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b, short *__c) {
9124 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9127 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b,
9128 unsigned short *__c) {
9129 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9132 static void __ATTRS_o_ai vec_stvxl(vector bool short __a, int __b,
9133 vector bool short *__c) {
9134 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9137 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b, short *__c) {
9138 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9141 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b,
9142 unsigned short *__c) {
9143 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9146 static void __ATTRS_o_ai vec_stvxl(vector pixel __a, int __b,
9147 vector pixel *__c) {
9148 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9151 static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, vector int *__c) {
9152 __builtin_altivec_stvxl(__a, __b, __c);
9155 static void __ATTRS_o_ai vec_stvxl(vector int __a, int __b, int *__c) {
9156 __builtin_altivec_stvxl(__a, __b, __c);
9159 static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b,
9160 vector unsigned int *__c) {
9161 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9164 static void __ATTRS_o_ai vec_stvxl(vector unsigned int __a, int __b,
9165 unsigned int *__c) {
9166 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9169 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b, int *__c) {
9170 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9173 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b,
9174 unsigned int *__c) {
9175 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9178 static void __ATTRS_o_ai vec_stvxl(vector bool int __a, int __b,
9179 vector bool int *__c) {
9180 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9183 static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b,
9184 vector float *__c) {
9185 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9188 static void __ATTRS_o_ai vec_stvxl(vector float __a, int __b, float *__c) {
9189 __builtin_altivec_stvxl((vector int)__a, __b, __c);
9194 static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a,
9195 vector signed char __b) {
9199 static vector signed char __ATTRS_o_ai vec_sub(vector bool char __a,
9200 vector signed char __b) {
9201 return (vector signed char)__a - __b;
9204 static vector signed char __ATTRS_o_ai vec_sub(vector signed char __a,
9205 vector bool char __b) {
9206 return __a - (vector signed char)__b;
9209 static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a,
9210 vector unsigned char __b) {
9214 static vector unsigned char __ATTRS_o_ai vec_sub(vector bool char __a,
9215 vector unsigned char __b) {
9216 return (vector unsigned char)__a - __b;
9219 static vector unsigned char __ATTRS_o_ai vec_sub(vector unsigned char __a,
9220 vector bool char __b) {
9221 return __a - (vector unsigned char)__b;
9224 static vector short __ATTRS_o_ai vec_sub(vector short __a, vector short __b) {
9228 static vector short __ATTRS_o_ai vec_sub(vector bool short __a,
9230 return (vector short)__a - __b;
9233 static vector short __ATTRS_o_ai vec_sub(vector short __a,
9234 vector bool short __b) {
9235 return __a - (vector short)__b;
9238 static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a,
9239 vector unsigned short __b) {
9243 static vector unsigned short __ATTRS_o_ai vec_sub(vector bool short __a,
9244 vector unsigned short __b) {
9245 return (vector unsigned short)__a - __b;
9248 static vector unsigned short __ATTRS_o_ai vec_sub(vector unsigned short __a,
9249 vector bool short __b) {
9250 return __a - (vector unsigned short)__b;
9253 static vector int __ATTRS_o_ai vec_sub(vector int __a, vector int __b) {
9257 static vector int __ATTRS_o_ai vec_sub(vector bool int __a, vector int __b) {
9258 return (vector int)__a - __b;
9261 static vector int __ATTRS_o_ai vec_sub(vector int __a, vector bool int __b) {
9262 return __a - (vector int)__b;
9265 static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a,
9266 vector unsigned int __b) {
9270 static vector unsigned int __ATTRS_o_ai vec_sub(vector bool int __a,
9271 vector unsigned int __b) {
9272 return (vector unsigned int)__a - __b;
9275 static vector unsigned int __ATTRS_o_ai vec_sub(vector unsigned int __a,
9276 vector bool int __b) {
9277 return __a - (vector unsigned int)__b;
9280 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9281 static vector signed __int128 __ATTRS_o_ai vec_sub(vector signed __int128 __a,
9282 vector signed __int128 __b) {
9286 static vector unsigned __int128 __ATTRS_o_ai
9287 vec_sub(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9290 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9293 static vector signed long long __ATTRS_o_ai
9294 vec_sub(vector signed long long __a, vector signed long long __b) {
9298 static vector unsigned long long __ATTRS_o_ai
9299 vec_sub(vector unsigned long long __a, vector unsigned long long __b) {
9303 static vector double __ATTRS_o_ai
9304 vec_sub(vector double __a, vector double __b) {
9309 static vector float __ATTRS_o_ai vec_sub(vector float __a, vector float __b) {
9315 #define __builtin_altivec_vsububm vec_vsububm
9317 static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a,
9318 vector signed char __b) {
9322 static vector signed char __ATTRS_o_ai vec_vsububm(vector bool char __a,
9323 vector signed char __b) {
9324 return (vector signed char)__a - __b;
9327 static vector signed char __ATTRS_o_ai vec_vsububm(vector signed char __a,
9328 vector bool char __b) {
9329 return __a - (vector signed char)__b;
9332 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a,
9333 vector unsigned char __b) {
9337 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector bool char __a,
9338 vector unsigned char __b) {
9339 return (vector unsigned char)__a - __b;
9342 static vector unsigned char __ATTRS_o_ai vec_vsububm(vector unsigned char __a,
9343 vector bool char __b) {
9344 return __a - (vector unsigned char)__b;
9349 #define __builtin_altivec_vsubuhm vec_vsubuhm
9351 static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a,
9356 static vector short __ATTRS_o_ai vec_vsubuhm(vector bool short __a,
9358 return (vector short)__a - __b;
9361 static vector short __ATTRS_o_ai vec_vsubuhm(vector short __a,
9362 vector bool short __b) {
9363 return __a - (vector short)__b;
9366 static vector unsigned short __ATTRS_o_ai
9367 vec_vsubuhm(vector unsigned short __a, vector unsigned short __b) {
9371 static vector unsigned short __ATTRS_o_ai
9372 vec_vsubuhm(vector bool short __a, vector unsigned short __b) {
9373 return (vector unsigned short)__a - __b;
9376 static vector unsigned short __ATTRS_o_ai vec_vsubuhm(vector unsigned short __a,
9377 vector bool short __b) {
9378 return __a - (vector unsigned short)__b;
9383 #define __builtin_altivec_vsubuwm vec_vsubuwm
9385 static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a, vector int __b) {
9389 static vector int __ATTRS_o_ai vec_vsubuwm(vector bool int __a,
9391 return (vector int)__a - __b;
9394 static vector int __ATTRS_o_ai vec_vsubuwm(vector int __a,
9395 vector bool int __b) {
9396 return __a - (vector int)__b;
9399 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a,
9400 vector unsigned int __b) {
9404 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector bool int __a,
9405 vector unsigned int __b) {
9406 return (vector unsigned int)__a - __b;
9409 static vector unsigned int __ATTRS_o_ai vec_vsubuwm(vector unsigned int __a,
9410 vector bool int __b) {
9411 return __a - (vector unsigned int)__b;
9416 #define __builtin_altivec_vsubfp vec_vsubfp
9418 static vector float __attribute__((__always_inline__))
9419 vec_vsubfp(vector float __a, vector float __b) {
9425 static vector unsigned int __ATTRS_o_ai vec_subc(vector unsigned int __a,
9426 vector unsigned int __b) {
9427 return __builtin_altivec_vsubcuw(__a, __b);
9430 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9431 static vector unsigned __int128 __ATTRS_o_ai
9432 vec_subc(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9433 return __builtin_altivec_vsubcuq(__a, __b);
9436 static vector signed __int128 __ATTRS_o_ai
9437 vec_subc(vector signed __int128 __a, vector signed __int128 __b) {
9438 return __builtin_altivec_vsubcuq(__a, __b);
9440 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9444 static vector unsigned int __attribute__((__always_inline__))
9445 vec_vsubcuw(vector unsigned int __a, vector unsigned int __b) {
9446 return __builtin_altivec_vsubcuw(__a, __b);
9451 static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a,
9452 vector signed char __b) {
9453 return __builtin_altivec_vsubsbs(__a, __b);
9456 static vector signed char __ATTRS_o_ai vec_subs(vector bool char __a,
9457 vector signed char __b) {
9458 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
9461 static vector signed char __ATTRS_o_ai vec_subs(vector signed char __a,
9462 vector bool char __b) {
9463 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
9466 static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a,
9467 vector unsigned char __b) {
9468 return __builtin_altivec_vsububs(__a, __b);
9471 static vector unsigned char __ATTRS_o_ai vec_subs(vector bool char __a,
9472 vector unsigned char __b) {
9473 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
9476 static vector unsigned char __ATTRS_o_ai vec_subs(vector unsigned char __a,
9477 vector bool char __b) {
9478 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
9481 static vector short __ATTRS_o_ai vec_subs(vector short __a, vector short __b) {
9482 return __builtin_altivec_vsubshs(__a, __b);
9485 static vector short __ATTRS_o_ai vec_subs(vector bool short __a,
9487 return __builtin_altivec_vsubshs((vector short)__a, __b);
9490 static vector short __ATTRS_o_ai vec_subs(vector short __a,
9491 vector bool short __b) {
9492 return __builtin_altivec_vsubshs(__a, (vector short)__b);
9495 static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a,
9496 vector unsigned short __b) {
9497 return __builtin_altivec_vsubuhs(__a, __b);
9500 static vector unsigned short __ATTRS_o_ai vec_subs(vector bool short __a,
9501 vector unsigned short __b) {
9502 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
9505 static vector unsigned short __ATTRS_o_ai vec_subs(vector unsigned short __a,
9506 vector bool short __b) {
9507 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
9510 static vector int __ATTRS_o_ai vec_subs(vector int __a, vector int __b) {
9511 return __builtin_altivec_vsubsws(__a, __b);
9514 static vector int __ATTRS_o_ai vec_subs(vector bool int __a, vector int __b) {
9515 return __builtin_altivec_vsubsws((vector int)__a, __b);
9518 static vector int __ATTRS_o_ai vec_subs(vector int __a, vector bool int __b) {
9519 return __builtin_altivec_vsubsws(__a, (vector int)__b);
9522 static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a,
9523 vector unsigned int __b) {
9524 return __builtin_altivec_vsubuws(__a, __b);
9527 static vector unsigned int __ATTRS_o_ai vec_subs(vector bool int __a,
9528 vector unsigned int __b) {
9529 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
9532 static vector unsigned int __ATTRS_o_ai vec_subs(vector unsigned int __a,
9533 vector bool int __b) {
9534 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
9539 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a,
9540 vector signed char __b) {
9541 return __builtin_altivec_vsubsbs(__a, __b);
9544 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector bool char __a,
9545 vector signed char __b) {
9546 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
9549 static vector signed char __ATTRS_o_ai vec_vsubsbs(vector signed char __a,
9550 vector bool char __b) {
9551 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
9556 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a,
9557 vector unsigned char __b) {
9558 return __builtin_altivec_vsububs(__a, __b);
9561 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector bool char __a,
9562 vector unsigned char __b) {
9563 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
9566 static vector unsigned char __ATTRS_o_ai vec_vsububs(vector unsigned char __a,
9567 vector bool char __b) {
9568 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
9573 static vector short __ATTRS_o_ai vec_vsubshs(vector short __a,
9575 return __builtin_altivec_vsubshs(__a, __b);
9578 static vector short __ATTRS_o_ai vec_vsubshs(vector bool short __a,
9580 return __builtin_altivec_vsubshs((vector short)__a, __b);
9583 static vector short __ATTRS_o_ai vec_vsubshs(vector short __a,
9584 vector bool short __b) {
9585 return __builtin_altivec_vsubshs(__a, (vector short)__b);
9590 static vector unsigned short __ATTRS_o_ai
9591 vec_vsubuhs(vector unsigned short __a, vector unsigned short __b) {
9592 return __builtin_altivec_vsubuhs(__a, __b);
9595 static vector unsigned short __ATTRS_o_ai
9596 vec_vsubuhs(vector bool short __a, vector unsigned short __b) {
9597 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
9600 static vector unsigned short __ATTRS_o_ai vec_vsubuhs(vector unsigned short __a,
9601 vector bool short __b) {
9602 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
9607 static vector int __ATTRS_o_ai vec_vsubsws(vector int __a, vector int __b) {
9608 return __builtin_altivec_vsubsws(__a, __b);
9611 static vector int __ATTRS_o_ai vec_vsubsws(vector bool int __a,
9613 return __builtin_altivec_vsubsws((vector int)__a, __b);
9616 static vector int __ATTRS_o_ai vec_vsubsws(vector int __a,
9617 vector bool int __b) {
9618 return __builtin_altivec_vsubsws(__a, (vector int)__b);
9623 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a,
9624 vector unsigned int __b) {
9625 return __builtin_altivec_vsubuws(__a, __b);
9628 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector bool int __a,
9629 vector unsigned int __b) {
9630 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
9633 static vector unsigned int __ATTRS_o_ai vec_vsubuws(vector unsigned int __a,
9634 vector bool int __b) {
9635 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
9638 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9641 static vector signed __int128 __ATTRS_o_ai
9642 vec_vsubuqm(vector signed __int128 __a, vector signed __int128 __b) {
9646 static vector unsigned __int128 __ATTRS_o_ai
9647 vec_vsubuqm(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9653 static vector signed __int128 __ATTRS_o_ai
9654 vec_vsubeuqm(vector signed __int128 __a, vector signed __int128 __b,
9655 vector signed __int128 __c) {
9656 return __builtin_altivec_vsubeuqm(__a, __b, __c);
9659 static vector unsigned __int128 __ATTRS_o_ai
9660 vec_vsubeuqm(vector unsigned __int128 __a, vector unsigned __int128 __b,
9661 vector unsigned __int128 __c) {
9662 return __builtin_altivec_vsubeuqm(__a, __b, __c);
9667 static vector signed __int128 __ATTRS_o_ai
9668 vec_vsubcuq(vector signed __int128 __a, vector signed __int128 __b) {
9669 return __builtin_altivec_vsubcuq(__a, __b);
9672 static vector unsigned __int128 __ATTRS_o_ai
9673 vec_vsubcuq(vector unsigned __int128 __a, vector unsigned __int128 __b) {
9674 return __builtin_altivec_vsubcuq(__a, __b);
9679 static vector signed __int128 __ATTRS_o_ai
9680 vec_vsubecuq(vector signed __int128 __a, vector signed __int128 __b,
9681 vector signed __int128 __c) {
9682 return __builtin_altivec_vsubecuq(__a, __b, __c);
9685 static vector unsigned __int128 __ATTRS_o_ai
9686 vec_vsubecuq(vector unsigned __int128 __a, vector unsigned __int128 __b,
9687 vector unsigned __int128 __c) {
9688 return __builtin_altivec_vsubecuq(__a, __b, __c);
9690 #endif // defined(__POWER8_VECTOR__) && defined(__powerpc64__)
9694 static vector int __ATTRS_o_ai vec_sum4s(vector signed char __a,
9696 return __builtin_altivec_vsum4sbs(__a, __b);
9699 static vector unsigned int __ATTRS_o_ai vec_sum4s(vector unsigned char __a,
9700 vector unsigned int __b) {
9701 return __builtin_altivec_vsum4ubs(__a, __b);
9704 static vector int __ATTRS_o_ai vec_sum4s(vector signed short __a,
9706 return __builtin_altivec_vsum4shs(__a, __b);
9711 static vector int __attribute__((__always_inline__))
9712 vec_vsum4sbs(vector signed char __a, vector int __b) {
9713 return __builtin_altivec_vsum4sbs(__a, __b);
9718 static vector unsigned int __attribute__((__always_inline__))
9719 vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b) {
9720 return __builtin_altivec_vsum4ubs(__a, __b);
9725 static vector int __attribute__((__always_inline__))
9726 vec_vsum4shs(vector signed short __a, vector int __b) {
9727 return __builtin_altivec_vsum4shs(__a, __b);
9732 /* The vsum2sws instruction has a big-endian bias, so that the second
9733 input vector and the result always reference big-endian elements
9734 1 and 3 (little-endian element 0 and 2). For ease of porting the
9735 programmer wants elements 1 and 3 in both cases, so for little
9736 endian we must perform some permutes. */
9738 static vector signed int __attribute__((__always_inline__))
9739 vec_sum2s(vector int __a, vector int __b) {
9740 #ifdef __LITTLE_ENDIAN__
9741 vector int __c = (vector signed int)vec_perm(
9742 __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9744 __c = __builtin_altivec_vsum2sws(__a, __c);
9745 return (vector signed int)vec_perm(
9746 __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9749 return __builtin_altivec_vsum2sws(__a, __b);
9755 static vector signed int __attribute__((__always_inline__))
9756 vec_vsum2sws(vector int __a, vector int __b) {
9757 #ifdef __LITTLE_ENDIAN__
9758 vector int __c = (vector signed int)vec_perm(
9759 __b, __b, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9761 __c = __builtin_altivec_vsum2sws(__a, __c);
9762 return (vector signed int)vec_perm(
9763 __c, __c, (vector unsigned char)(4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15,
9766 return __builtin_altivec_vsum2sws(__a, __b);
9772 /* The vsumsws instruction has a big-endian bias, so that the second
9773 input vector and the result always reference big-endian element 3
9774 (little-endian element 0). For ease of porting the programmer
9775 wants element 3 in both cases, so for little endian we must perform
9778 static vector signed int __attribute__((__always_inline__))
9779 vec_sums(vector signed int __a, vector signed int __b) {
9780 #ifdef __LITTLE_ENDIAN__
9781 __b = (vector signed int)vec_splat(__b, 3);
9782 __b = __builtin_altivec_vsumsws(__a, __b);
9783 return (vector signed int)(0, 0, 0, __b[0]);
9785 return __builtin_altivec_vsumsws(__a, __b);
9791 static vector signed int __attribute__((__always_inline__))
9792 vec_vsumsws(vector signed int __a, vector signed int __b) {
9793 #ifdef __LITTLE_ENDIAN__
9794 __b = (vector signed int)vec_splat(__b, 3);
9795 __b = __builtin_altivec_vsumsws(__a, __b);
9796 return (vector signed int)(0, 0, 0, __b[0]);
9798 return __builtin_altivec_vsumsws(__a, __b);
9804 static vector float __ATTRS_o_ai
9805 vec_trunc(vector float __a) {
9807 return __builtin_vsx_xvrspiz(__a);
9809 return __builtin_altivec_vrfiz(__a);
9814 static vector double __ATTRS_o_ai vec_trunc(vector double __a) {
9815 return __builtin_vsx_xvrdpiz(__a);
9821 static vector float __attribute__((__always_inline__))
9822 vec_vrfiz(vector float __a) {
9823 return __builtin_altivec_vrfiz(__a);
9828 /* The vector unpack instructions all have a big-endian bias, so for
9829 little endian we must reverse the meanings of "high" and "low." */
9831 static vector short __ATTRS_o_ai vec_unpackh(vector signed char __a) {
9832 #ifdef __LITTLE_ENDIAN__
9833 return __builtin_altivec_vupklsb((vector char)__a);
9835 return __builtin_altivec_vupkhsb((vector char)__a);
9839 static vector bool short __ATTRS_o_ai vec_unpackh(vector bool char __a) {
9840 #ifdef __LITTLE_ENDIAN__
9841 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9843 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9847 static vector int __ATTRS_o_ai vec_unpackh(vector short __a) {
9848 #ifdef __LITTLE_ENDIAN__
9849 return __builtin_altivec_vupklsh(__a);
9851 return __builtin_altivec_vupkhsh(__a);
9855 static vector bool int __ATTRS_o_ai vec_unpackh(vector bool short __a) {
9856 #ifdef __LITTLE_ENDIAN__
9857 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9859 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9863 static vector unsigned int __ATTRS_o_ai vec_unpackh(vector pixel __a) {
9864 #ifdef __LITTLE_ENDIAN__
9865 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9867 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9871 #ifdef __POWER8_VECTOR__
9872 static vector long long __ATTRS_o_ai vec_unpackh(vector int __a) {
9873 #ifdef __LITTLE_ENDIAN__
9874 return __builtin_altivec_vupklsw(__a);
9876 return __builtin_altivec_vupkhsw(__a);
9880 static vector bool long long __ATTRS_o_ai vec_unpackh(vector bool int __a) {
9881 #ifdef __LITTLE_ENDIAN__
9882 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9884 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9891 static vector short __ATTRS_o_ai vec_vupkhsb(vector signed char __a) {
9892 #ifdef __LITTLE_ENDIAN__
9893 return __builtin_altivec_vupklsb((vector char)__a);
9895 return __builtin_altivec_vupkhsb((vector char)__a);
9899 static vector bool short __ATTRS_o_ai vec_vupkhsb(vector bool char __a) {
9900 #ifdef __LITTLE_ENDIAN__
9901 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9903 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9909 static vector int __ATTRS_o_ai vec_vupkhsh(vector short __a) {
9910 #ifdef __LITTLE_ENDIAN__
9911 return __builtin_altivec_vupklsh(__a);
9913 return __builtin_altivec_vupkhsh(__a);
9917 static vector bool int __ATTRS_o_ai vec_vupkhsh(vector bool short __a) {
9918 #ifdef __LITTLE_ENDIAN__
9919 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9921 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9925 static vector unsigned int __ATTRS_o_ai vec_vupkhsh(vector pixel __a) {
9926 #ifdef __LITTLE_ENDIAN__
9927 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9929 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9935 #ifdef __POWER8_VECTOR__
9936 static vector long long __ATTRS_o_ai vec_vupkhsw(vector int __a) {
9937 #ifdef __LITTLE_ENDIAN__
9938 return __builtin_altivec_vupklsw(__a);
9940 return __builtin_altivec_vupkhsw(__a);
9944 static vector bool long long __ATTRS_o_ai vec_vupkhsw(vector bool int __a) {
9945 #ifdef __LITTLE_ENDIAN__
9946 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
9948 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
9955 static vector short __ATTRS_o_ai vec_unpackl(vector signed char __a) {
9956 #ifdef __LITTLE_ENDIAN__
9957 return __builtin_altivec_vupkhsb((vector char)__a);
9959 return __builtin_altivec_vupklsb((vector char)__a);
9963 static vector bool short __ATTRS_o_ai vec_unpackl(vector bool char __a) {
9964 #ifdef __LITTLE_ENDIAN__
9965 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9967 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9971 static vector int __ATTRS_o_ai vec_unpackl(vector short __a) {
9972 #ifdef __LITTLE_ENDIAN__
9973 return __builtin_altivec_vupkhsh(__a);
9975 return __builtin_altivec_vupklsh(__a);
9979 static vector bool int __ATTRS_o_ai vec_unpackl(vector bool short __a) {
9980 #ifdef __LITTLE_ENDIAN__
9981 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9983 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9987 static vector unsigned int __ATTRS_o_ai vec_unpackl(vector pixel __a) {
9988 #ifdef __LITTLE_ENDIAN__
9989 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9991 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9995 #ifdef __POWER8_VECTOR__
9996 static vector long long __ATTRS_o_ai vec_unpackl(vector int __a) {
9997 #ifdef __LITTLE_ENDIAN__
9998 return __builtin_altivec_vupkhsw(__a);
10000 return __builtin_altivec_vupklsw(__a);
10004 static vector bool long long __ATTRS_o_ai vec_unpackl(vector bool int __a) {
10005 #ifdef __LITTLE_ENDIAN__
10006 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
10008 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
10015 static vector short __ATTRS_o_ai vec_vupklsb(vector signed char __a) {
10016 #ifdef __LITTLE_ENDIAN__
10017 return __builtin_altivec_vupkhsb((vector char)__a);
10019 return __builtin_altivec_vupklsb((vector char)__a);
10023 static vector bool short __ATTRS_o_ai vec_vupklsb(vector bool char __a) {
10024 #ifdef __LITTLE_ENDIAN__
10025 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
10027 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
10033 static vector int __ATTRS_o_ai vec_vupklsh(vector short __a) {
10034 #ifdef __LITTLE_ENDIAN__
10035 return __builtin_altivec_vupkhsh(__a);
10037 return __builtin_altivec_vupklsh(__a);
10041 static vector bool int __ATTRS_o_ai vec_vupklsh(vector bool short __a) {
10042 #ifdef __LITTLE_ENDIAN__
10043 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
10045 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
10049 static vector unsigned int __ATTRS_o_ai vec_vupklsh(vector pixel __a) {
10050 #ifdef __LITTLE_ENDIAN__
10051 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
10053 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
10059 #ifdef __POWER8_VECTOR__
10060 static vector long long __ATTRS_o_ai vec_vupklsw(vector int __a) {
10061 #ifdef __LITTLE_ENDIAN__
10062 return __builtin_altivec_vupkhsw(__a);
10064 return __builtin_altivec_vupklsw(__a);
10068 static vector bool long long __ATTRS_o_ai vec_vupklsw(vector bool int __a) {
10069 #ifdef __LITTLE_ENDIAN__
10070 return (vector bool long long)__builtin_altivec_vupkhsw((vector int)__a);
10072 return (vector bool long long)__builtin_altivec_vupklsw((vector int)__a);
10081 static vector signed int __ATTRS_o_ai vec_vsx_ld(int __a,
10082 const vector signed int *__b) {
10083 return (vector signed int)__builtin_vsx_lxvw4x(__a, __b);
10086 static vector unsigned int __ATTRS_o_ai
10087 vec_vsx_ld(int __a, const vector unsigned int *__b) {
10088 return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b);
10091 static vector float __ATTRS_o_ai vec_vsx_ld(int __a, const vector float *__b) {
10092 return (vector float)__builtin_vsx_lxvw4x(__a, __b);
10095 static vector signed long long __ATTRS_o_ai
10096 vec_vsx_ld(int __a, const vector signed long long *__b) {
10097 return (vector signed long long)__builtin_vsx_lxvd2x(__a, __b);
10100 static vector unsigned long long __ATTRS_o_ai
10101 vec_vsx_ld(int __a, const vector unsigned long long *__b) {
10102 return (vector unsigned long long)__builtin_vsx_lxvd2x(__a, __b);
10105 static vector double __ATTRS_o_ai vec_vsx_ld(int __a,
10106 const vector double *__b) {
10107 return (vector double)__builtin_vsx_lxvd2x(__a, __b);
10116 static void __ATTRS_o_ai vec_vsx_st(vector signed int __a, int __b,
10117 vector signed int *__c) {
10118 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
10121 static void __ATTRS_o_ai vec_vsx_st(vector unsigned int __a, int __b,
10122 vector unsigned int *__c) {
10123 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
10126 static void __ATTRS_o_ai vec_vsx_st(vector float __a, int __b,
10127 vector float *__c) {
10128 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
10131 static void __ATTRS_o_ai vec_vsx_st(vector signed long long __a, int __b,
10132 vector signed long long *__c) {
10133 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
10136 static void __ATTRS_o_ai vec_vsx_st(vector unsigned long long __a, int __b,
10137 vector unsigned long long *__c) {
10138 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
10141 static void __ATTRS_o_ai vec_vsx_st(vector double __a, int __b,
10142 vector double *__c) {
10143 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
10150 #define __builtin_altivec_vxor vec_xor
10152 static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a,
10153 vector signed char __b) {
10157 static vector signed char __ATTRS_o_ai vec_xor(vector bool char __a,
10158 vector signed char __b) {
10159 return (vector signed char)__a ^ __b;
10162 static vector signed char __ATTRS_o_ai vec_xor(vector signed char __a,
10163 vector bool char __b) {
10164 return __a ^ (vector signed char)__b;
10167 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
10168 vector unsigned char __b) {
10172 static vector unsigned char __ATTRS_o_ai vec_xor(vector bool char __a,
10173 vector unsigned char __b) {
10174 return (vector unsigned char)__a ^ __b;
10177 static vector unsigned char __ATTRS_o_ai vec_xor(vector unsigned char __a,
10178 vector bool char __b) {
10179 return __a ^ (vector unsigned char)__b;
10182 static vector bool char __ATTRS_o_ai vec_xor(vector bool char __a,
10183 vector bool char __b) {
10187 static vector short __ATTRS_o_ai vec_xor(vector short __a, vector short __b) {
10191 static vector short __ATTRS_o_ai vec_xor(vector bool short __a,
10192 vector short __b) {
10193 return (vector short)__a ^ __b;
10196 static vector short __ATTRS_o_ai vec_xor(vector short __a,
10197 vector bool short __b) {
10198 return __a ^ (vector short)__b;
10201 static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a,
10202 vector unsigned short __b) {
10206 static vector unsigned short __ATTRS_o_ai vec_xor(vector bool short __a,
10207 vector unsigned short __b) {
10208 return (vector unsigned short)__a ^ __b;
10211 static vector unsigned short __ATTRS_o_ai vec_xor(vector unsigned short __a,
10212 vector bool short __b) {
10213 return __a ^ (vector unsigned short)__b;
10216 static vector bool short __ATTRS_o_ai vec_xor(vector bool short __a,
10217 vector bool short __b) {
10221 static vector int __ATTRS_o_ai vec_xor(vector int __a, vector int __b) {
10225 static vector int __ATTRS_o_ai vec_xor(vector bool int __a, vector int __b) {
10226 return (vector int)__a ^ __b;
10229 static vector int __ATTRS_o_ai vec_xor(vector int __a, vector bool int __b) {
10230 return __a ^ (vector int)__b;
10233 static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a,
10234 vector unsigned int __b) {
10238 static vector unsigned int __ATTRS_o_ai vec_xor(vector bool int __a,
10239 vector unsigned int __b) {
10240 return (vector unsigned int)__a ^ __b;
10243 static vector unsigned int __ATTRS_o_ai vec_xor(vector unsigned int __a,
10244 vector bool int __b) {
10245 return __a ^ (vector unsigned int)__b;
10248 static vector bool int __ATTRS_o_ai vec_xor(vector bool int __a,
10249 vector bool int __b) {
10253 static vector float __ATTRS_o_ai vec_xor(vector float __a, vector float __b) {
10254 vector unsigned int __res =
10255 (vector unsigned int)__a ^ (vector unsigned int)__b;
10256 return (vector float)__res;
10259 static vector float __ATTRS_o_ai vec_xor(vector bool int __a,
10260 vector float __b) {
10261 vector unsigned int __res =
10262 (vector unsigned int)__a ^ (vector unsigned int)__b;
10263 return (vector float)__res;
10266 static vector float __ATTRS_o_ai vec_xor(vector float __a,
10267 vector bool int __b) {
10268 vector unsigned int __res =
10269 (vector unsigned int)__a ^ (vector unsigned int)__b;
10270 return (vector float)__res;
10274 static vector signed long long __ATTRS_o_ai
10275 vec_xor(vector signed long long __a, vector signed long long __b) {
10279 static vector signed long long __ATTRS_o_ai
10280 vec_xor(vector bool long long __a, vector signed long long __b) {
10281 return (vector signed long long)__a ^ __b;
10284 static vector signed long long __ATTRS_o_ai vec_xor(vector signed long long __a,
10285 vector bool long long __b) {
10286 return __a ^ (vector signed long long)__b;
10289 static vector unsigned long long __ATTRS_o_ai
10290 vec_xor(vector unsigned long long __a, vector unsigned long long __b) {
10294 static vector unsigned long long __ATTRS_o_ai
10295 vec_xor(vector bool long long __a, vector unsigned long long __b) {
10296 return (vector unsigned long long)__a ^ __b;
10299 static vector unsigned long long __ATTRS_o_ai
10300 vec_xor(vector unsigned long long __a, vector bool long long __b) {
10301 return __a ^ (vector unsigned long long)__b;
10304 static vector bool long long __ATTRS_o_ai vec_xor(vector bool long long __a,
10305 vector bool long long __b) {
10309 static vector double __ATTRS_o_ai
10310 vec_xor(vector double __a, vector double __b) {
10311 return (vector double)((vector unsigned long long)__a ^
10312 (vector unsigned long long)__b);
10315 static vector double __ATTRS_o_ai
10316 vec_xor(vector double __a, vector bool long long __b) {
10317 return (vector double)((vector unsigned long long)__a ^
10318 (vector unsigned long long) __b);
10321 static vector double __ATTRS_o_ai
10322 vec_xor(vector bool long long __a, vector double __b) {
10323 return (vector double)((vector unsigned long long)__a ^
10324 (vector unsigned long long)__b);
10330 static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a,
10331 vector signed char __b) {
10335 static vector signed char __ATTRS_o_ai vec_vxor(vector bool char __a,
10336 vector signed char __b) {
10337 return (vector signed char)__a ^ __b;
10340 static vector signed char __ATTRS_o_ai vec_vxor(vector signed char __a,
10341 vector bool char __b) {
10342 return __a ^ (vector signed char)__b;
10345 static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a,
10346 vector unsigned char __b) {
10350 static vector unsigned char __ATTRS_o_ai vec_vxor(vector bool char __a,
10351 vector unsigned char __b) {
10352 return (vector unsigned char)__a ^ __b;
10355 static vector unsigned char __ATTRS_o_ai vec_vxor(vector unsigned char __a,
10356 vector bool char __b) {
10357 return __a ^ (vector unsigned char)__b;
10360 static vector bool char __ATTRS_o_ai vec_vxor(vector bool char __a,
10361 vector bool char __b) {
10365 static vector short __ATTRS_o_ai vec_vxor(vector short __a, vector short __b) {
10369 static vector short __ATTRS_o_ai vec_vxor(vector bool short __a,
10370 vector short __b) {
10371 return (vector short)__a ^ __b;
10374 static vector short __ATTRS_o_ai vec_vxor(vector short __a,
10375 vector bool short __b) {
10376 return __a ^ (vector short)__b;
10379 static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a,
10380 vector unsigned short __b) {
10384 static vector unsigned short __ATTRS_o_ai vec_vxor(vector bool short __a,
10385 vector unsigned short __b) {
10386 return (vector unsigned short)__a ^ __b;
10389 static vector unsigned short __ATTRS_o_ai vec_vxor(vector unsigned short __a,
10390 vector bool short __b) {
10391 return __a ^ (vector unsigned short)__b;
10394 static vector bool short __ATTRS_o_ai vec_vxor(vector bool short __a,
10395 vector bool short __b) {
10399 static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector int __b) {
10403 static vector int __ATTRS_o_ai vec_vxor(vector bool int __a, vector int __b) {
10404 return (vector int)__a ^ __b;
10407 static vector int __ATTRS_o_ai vec_vxor(vector int __a, vector bool int __b) {
10408 return __a ^ (vector int)__b;
10411 static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a,
10412 vector unsigned int __b) {
10416 static vector unsigned int __ATTRS_o_ai vec_vxor(vector bool int __a,
10417 vector unsigned int __b) {
10418 return (vector unsigned int)__a ^ __b;
10421 static vector unsigned int __ATTRS_o_ai vec_vxor(vector unsigned int __a,
10422 vector bool int __b) {
10423 return __a ^ (vector unsigned int)__b;
10426 static vector bool int __ATTRS_o_ai vec_vxor(vector bool int __a,
10427 vector bool int __b) {
10431 static vector float __ATTRS_o_ai vec_vxor(vector float __a, vector float __b) {
10432 vector unsigned int __res =
10433 (vector unsigned int)__a ^ (vector unsigned int)__b;
10434 return (vector float)__res;
10437 static vector float __ATTRS_o_ai vec_vxor(vector bool int __a,
10438 vector float __b) {
10439 vector unsigned int __res =
10440 (vector unsigned int)__a ^ (vector unsigned int)__b;
10441 return (vector float)__res;
10444 static vector float __ATTRS_o_ai vec_vxor(vector float __a,
10445 vector bool int __b) {
10446 vector unsigned int __res =
10447 (vector unsigned int)__a ^ (vector unsigned int)__b;
10448 return (vector float)__res;
10452 static vector signed long long __ATTRS_o_ai
10453 vec_vxor(vector signed long long __a, vector signed long long __b) {
10457 static vector signed long long __ATTRS_o_ai
10458 vec_vxor(vector bool long long __a, vector signed long long __b) {
10459 return (vector signed long long)__a ^ __b;
10462 static vector signed long long __ATTRS_o_ai
10463 vec_vxor(vector signed long long __a, vector bool long long __b) {
10464 return __a ^ (vector signed long long)__b;
10467 static vector unsigned long long __ATTRS_o_ai
10468 vec_vxor(vector unsigned long long __a, vector unsigned long long __b) {
10472 static vector unsigned long long __ATTRS_o_ai
10473 vec_vxor(vector bool long long __a, vector unsigned long long __b) {
10474 return (vector unsigned long long)__a ^ __b;
10477 static vector unsigned long long __ATTRS_o_ai
10478 vec_vxor(vector unsigned long long __a, vector bool long long __b) {
10479 return __a ^ (vector unsigned long long)__b;
10482 static vector bool long long __ATTRS_o_ai vec_vxor(vector bool long long __a,
10483 vector bool long long __b) {
10488 /* ------------------------ extensions for CBEA ----------------------------- */
10492 static signed char __ATTRS_o_ai vec_extract(vector signed char __a, int __b) {
10496 static unsigned char __ATTRS_o_ai vec_extract(vector unsigned char __a,
10501 static unsigned char __ATTRS_o_ai vec_extract(vector bool char __a,
10506 static signed short __ATTRS_o_ai vec_extract(vector signed short __a, int __b) {
10510 static unsigned short __ATTRS_o_ai vec_extract(vector unsigned short __a,
10515 static unsigned short __ATTRS_o_ai vec_extract(vector bool short __a,
10520 static signed int __ATTRS_o_ai vec_extract(vector signed int __a, int __b) {
10524 static unsigned int __ATTRS_o_ai vec_extract(vector unsigned int __a, int __b) {
10528 static unsigned int __ATTRS_o_ai vec_extract(vector bool int __a, int __b) {
10533 static signed long long __ATTRS_o_ai vec_extract(vector signed long long __a,
10538 static unsigned long long __ATTRS_o_ai
10539 vec_extract(vector unsigned long long __a, int __b) {
10543 static unsigned long long __ATTRS_o_ai vec_extract(vector bool long long __a,
10548 static double __ATTRS_o_ai vec_extract(vector double __a, int __b) {
10553 static float __ATTRS_o_ai vec_extract(vector float __a, int __b) {
10559 static vector signed char __ATTRS_o_ai vec_insert(signed char __a,
10560 vector signed char __b,
10566 static vector unsigned char __ATTRS_o_ai vec_insert(unsigned char __a,
10567 vector unsigned char __b,
10573 static vector bool char __ATTRS_o_ai vec_insert(unsigned char __a,
10574 vector bool char __b,
10580 static vector signed short __ATTRS_o_ai vec_insert(signed short __a,
10581 vector signed short __b,
10587 static vector unsigned short __ATTRS_o_ai vec_insert(unsigned short __a,
10588 vector unsigned short __b,
10594 static vector bool short __ATTRS_o_ai vec_insert(unsigned short __a,
10595 vector bool short __b,
10601 static vector signed int __ATTRS_o_ai vec_insert(signed int __a,
10602 vector signed int __b,
10608 static vector unsigned int __ATTRS_o_ai vec_insert(unsigned int __a,
10609 vector unsigned int __b,
10615 static vector bool int __ATTRS_o_ai vec_insert(unsigned int __a,
10616 vector bool int __b,
10623 static vector signed long long __ATTRS_o_ai
10624 vec_insert(signed long long __a, vector signed long long __b, int __c) {
10629 static vector unsigned long long __ATTRS_o_ai
10630 vec_insert(unsigned long long __a, vector unsigned long long __b, int __c) {
10635 static vector bool long long __ATTRS_o_ai
10636 vec_insert(unsigned long long __a, vector bool long long __b, int __c) {
10640 static vector double __ATTRS_o_ai vec_insert(double __a, vector double __b,
10647 static vector float __ATTRS_o_ai vec_insert(float __a, vector float __b,
10655 static vector signed char __ATTRS_o_ai vec_lvlx(int __a,
10656 const signed char *__b) {
10657 return vec_perm(vec_ld(__a, __b), (vector signed char)(0),
10658 vec_lvsl(__a, __b));
10661 static vector signed char __ATTRS_o_ai vec_lvlx(int __a,
10662 const vector signed char *__b) {
10663 return vec_perm(vec_ld(__a, __b), (vector signed char)(0),
10664 vec_lvsl(__a, (unsigned char *)__b));
10667 static vector unsigned char __ATTRS_o_ai vec_lvlx(int __a,
10668 const unsigned char *__b) {
10669 return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0),
10670 vec_lvsl(__a, __b));
10673 static vector unsigned char __ATTRS_o_ai
10674 vec_lvlx(int __a, const vector unsigned char *__b) {
10675 return vec_perm(vec_ld(__a, __b), (vector unsigned char)(0),
10676 vec_lvsl(__a, (unsigned char *)__b));
10679 static vector bool char __ATTRS_o_ai vec_lvlx(int __a,
10680 const vector bool char *__b) {
10681 return vec_perm(vec_ld(__a, __b), (vector bool char)(0),
10682 vec_lvsl(__a, (unsigned char *)__b));
10685 static vector short __ATTRS_o_ai vec_lvlx(int __a, const short *__b) {
10686 return vec_perm(vec_ld(__a, __b), (vector short)(0), vec_lvsl(__a, __b));
10689 static vector short __ATTRS_o_ai vec_lvlx(int __a, const vector short *__b) {
10690 return vec_perm(vec_ld(__a, __b), (vector short)(0),
10691 vec_lvsl(__a, (unsigned char *)__b));
10694 static vector unsigned short __ATTRS_o_ai vec_lvlx(int __a,
10695 const unsigned short *__b) {
10696 return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0),
10697 vec_lvsl(__a, __b));
10700 static vector unsigned short __ATTRS_o_ai
10701 vec_lvlx(int __a, const vector unsigned short *__b) {
10702 return vec_perm(vec_ld(__a, __b), (vector unsigned short)(0),
10703 vec_lvsl(__a, (unsigned char *)__b));
10706 static vector bool short __ATTRS_o_ai vec_lvlx(int __a,
10707 const vector bool short *__b) {
10708 return vec_perm(vec_ld(__a, __b), (vector bool short)(0),
10709 vec_lvsl(__a, (unsigned char *)__b));
10712 static vector pixel __ATTRS_o_ai vec_lvlx(int __a, const vector pixel *__b) {
10713 return vec_perm(vec_ld(__a, __b), (vector pixel)(0),
10714 vec_lvsl(__a, (unsigned char *)__b));
10717 static vector int __ATTRS_o_ai vec_lvlx(int __a, const int *__b) {
10718 return vec_perm(vec_ld(__a, __b), (vector int)(0), vec_lvsl(__a, __b));
10721 static vector int __ATTRS_o_ai vec_lvlx(int __a, const vector int *__b) {
10722 return vec_perm(vec_ld(__a, __b), (vector int)(0),
10723 vec_lvsl(__a, (unsigned char *)__b));
10726 static vector unsigned int __ATTRS_o_ai vec_lvlx(int __a,
10727 const unsigned int *__b) {
10728 return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0),
10729 vec_lvsl(__a, __b));
10732 static vector unsigned int __ATTRS_o_ai
10733 vec_lvlx(int __a, const vector unsigned int *__b) {
10734 return vec_perm(vec_ld(__a, __b), (vector unsigned int)(0),
10735 vec_lvsl(__a, (unsigned char *)__b));
10738 static vector bool int __ATTRS_o_ai vec_lvlx(int __a,
10739 const vector bool int *__b) {
10740 return vec_perm(vec_ld(__a, __b), (vector bool int)(0),
10741 vec_lvsl(__a, (unsigned char *)__b));
10744 static vector float __ATTRS_o_ai vec_lvlx(int __a, const float *__b) {
10745 return vec_perm(vec_ld(__a, __b), (vector float)(0), vec_lvsl(__a, __b));
10748 static vector float __ATTRS_o_ai vec_lvlx(int __a, const vector float *__b) {
10749 return vec_perm(vec_ld(__a, __b), (vector float)(0),
10750 vec_lvsl(__a, (unsigned char *)__b));
10755 static vector signed char __ATTRS_o_ai vec_lvlxl(int __a,
10756 const signed char *__b) {
10757 return vec_perm(vec_ldl(__a, __b), (vector signed char)(0),
10758 vec_lvsl(__a, __b));
10761 static vector signed char __ATTRS_o_ai
10762 vec_lvlxl(int __a, const vector signed char *__b) {
10763 return vec_perm(vec_ldl(__a, __b), (vector signed char)(0),
10764 vec_lvsl(__a, (unsigned char *)__b));
10767 static vector unsigned char __ATTRS_o_ai vec_lvlxl(int __a,
10768 const unsigned char *__b) {
10769 return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0),
10770 vec_lvsl(__a, __b));
10773 static vector unsigned char __ATTRS_o_ai
10774 vec_lvlxl(int __a, const vector unsigned char *__b) {
10775 return vec_perm(vec_ldl(__a, __b), (vector unsigned char)(0),
10776 vec_lvsl(__a, (unsigned char *)__b));
10779 static vector bool char __ATTRS_o_ai vec_lvlxl(int __a,
10780 const vector bool char *__b) {
10781 return vec_perm(vec_ldl(__a, __b), (vector bool char)(0),
10782 vec_lvsl(__a, (unsigned char *)__b));
10785 static vector short __ATTRS_o_ai vec_lvlxl(int __a, const short *__b) {
10786 return vec_perm(vec_ldl(__a, __b), (vector short)(0), vec_lvsl(__a, __b));
10789 static vector short __ATTRS_o_ai vec_lvlxl(int __a, const vector short *__b) {
10790 return vec_perm(vec_ldl(__a, __b), (vector short)(0),
10791 vec_lvsl(__a, (unsigned char *)__b));
10794 static vector unsigned short __ATTRS_o_ai vec_lvlxl(int __a,
10795 const unsigned short *__b) {
10796 return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0),
10797 vec_lvsl(__a, __b));
10800 static vector unsigned short __ATTRS_o_ai
10801 vec_lvlxl(int __a, const vector unsigned short *__b) {
10802 return vec_perm(vec_ldl(__a, __b), (vector unsigned short)(0),
10803 vec_lvsl(__a, (unsigned char *)__b));
10806 static vector bool short __ATTRS_o_ai vec_lvlxl(int __a,
10807 const vector bool short *__b) {
10808 return vec_perm(vec_ldl(__a, __b), (vector bool short)(0),
10809 vec_lvsl(__a, (unsigned char *)__b));
10812 static vector pixel __ATTRS_o_ai vec_lvlxl(int __a, const vector pixel *__b) {
10813 return vec_perm(vec_ldl(__a, __b), (vector pixel)(0),
10814 vec_lvsl(__a, (unsigned char *)__b));
10817 static vector int __ATTRS_o_ai vec_lvlxl(int __a, const int *__b) {
10818 return vec_perm(vec_ldl(__a, __b), (vector int)(0), vec_lvsl(__a, __b));
10821 static vector int __ATTRS_o_ai vec_lvlxl(int __a, const vector int *__b) {
10822 return vec_perm(vec_ldl(__a, __b), (vector int)(0),
10823 vec_lvsl(__a, (unsigned char *)__b));
10826 static vector unsigned int __ATTRS_o_ai vec_lvlxl(int __a,
10827 const unsigned int *__b) {
10828 return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0),
10829 vec_lvsl(__a, __b));
10832 static vector unsigned int __ATTRS_o_ai
10833 vec_lvlxl(int __a, const vector unsigned int *__b) {
10834 return vec_perm(vec_ldl(__a, __b), (vector unsigned int)(0),
10835 vec_lvsl(__a, (unsigned char *)__b));
10838 static vector bool int __ATTRS_o_ai vec_lvlxl(int __a,
10839 const vector bool int *__b) {
10840 return vec_perm(vec_ldl(__a, __b), (vector bool int)(0),
10841 vec_lvsl(__a, (unsigned char *)__b));
10844 static vector float __ATTRS_o_ai vec_lvlxl(int __a, const float *__b) {
10845 return vec_perm(vec_ldl(__a, __b), (vector float)(0), vec_lvsl(__a, __b));
10848 static vector float __ATTRS_o_ai vec_lvlxl(int __a, vector float *__b) {
10849 return vec_perm(vec_ldl(__a, __b), (vector float)(0),
10850 vec_lvsl(__a, (unsigned char *)__b));
10855 static vector signed char __ATTRS_o_ai vec_lvrx(int __a,
10856 const signed char *__b) {
10857 return vec_perm((vector signed char)(0), vec_ld(__a, __b),
10858 vec_lvsl(__a, __b));
10861 static vector signed char __ATTRS_o_ai vec_lvrx(int __a,
10862 const vector signed char *__b) {
10863 return vec_perm((vector signed char)(0), vec_ld(__a, __b),
10864 vec_lvsl(__a, (unsigned char *)__b));
10867 static vector unsigned char __ATTRS_o_ai vec_lvrx(int __a,
10868 const unsigned char *__b) {
10869 return vec_perm((vector unsigned char)(0), vec_ld(__a, __b),
10870 vec_lvsl(__a, __b));
10873 static vector unsigned char __ATTRS_o_ai
10874 vec_lvrx(int __a, const vector unsigned char *__b) {
10875 return vec_perm((vector unsigned char)(0), vec_ld(__a, __b),
10876 vec_lvsl(__a, (unsigned char *)__b));
10879 static vector bool char __ATTRS_o_ai vec_lvrx(int __a,
10880 const vector bool char *__b) {
10881 return vec_perm((vector bool char)(0), vec_ld(__a, __b),
10882 vec_lvsl(__a, (unsigned char *)__b));
10885 static vector short __ATTRS_o_ai vec_lvrx(int __a, const short *__b) {
10886 return vec_perm((vector short)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
10889 static vector short __ATTRS_o_ai vec_lvrx(int __a, const vector short *__b) {
10890 return vec_perm((vector short)(0), vec_ld(__a, __b),
10891 vec_lvsl(__a, (unsigned char *)__b));
10894 static vector unsigned short __ATTRS_o_ai vec_lvrx(int __a,
10895 const unsigned short *__b) {
10896 return vec_perm((vector unsigned short)(0), vec_ld(__a, __b),
10897 vec_lvsl(__a, __b));
10900 static vector unsigned short __ATTRS_o_ai
10901 vec_lvrx(int __a, const vector unsigned short *__b) {
10902 return vec_perm((vector unsigned short)(0), vec_ld(__a, __b),
10903 vec_lvsl(__a, (unsigned char *)__b));
10906 static vector bool short __ATTRS_o_ai vec_lvrx(int __a,
10907 const vector bool short *__b) {
10908 return vec_perm((vector bool short)(0), vec_ld(__a, __b),
10909 vec_lvsl(__a, (unsigned char *)__b));
10912 static vector pixel __ATTRS_o_ai vec_lvrx(int __a, const vector pixel *__b) {
10913 return vec_perm((vector pixel)(0), vec_ld(__a, __b),
10914 vec_lvsl(__a, (unsigned char *)__b));
10917 static vector int __ATTRS_o_ai vec_lvrx(int __a, const int *__b) {
10918 return vec_perm((vector int)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
10921 static vector int __ATTRS_o_ai vec_lvrx(int __a, const vector int *__b) {
10922 return vec_perm((vector int)(0), vec_ld(__a, __b),
10923 vec_lvsl(__a, (unsigned char *)__b));
10926 static vector unsigned int __ATTRS_o_ai vec_lvrx(int __a,
10927 const unsigned int *__b) {
10928 return vec_perm((vector unsigned int)(0), vec_ld(__a, __b),
10929 vec_lvsl(__a, __b));
10932 static vector unsigned int __ATTRS_o_ai
10933 vec_lvrx(int __a, const vector unsigned int *__b) {
10934 return vec_perm((vector unsigned int)(0), vec_ld(__a, __b),
10935 vec_lvsl(__a, (unsigned char *)__b));
10938 static vector bool int __ATTRS_o_ai vec_lvrx(int __a,
10939 const vector bool int *__b) {
10940 return vec_perm((vector bool int)(0), vec_ld(__a, __b),
10941 vec_lvsl(__a, (unsigned char *)__b));
10944 static vector float __ATTRS_o_ai vec_lvrx(int __a, const float *__b) {
10945 return vec_perm((vector float)(0), vec_ld(__a, __b), vec_lvsl(__a, __b));
10948 static vector float __ATTRS_o_ai vec_lvrx(int __a, const vector float *__b) {
10949 return vec_perm((vector float)(0), vec_ld(__a, __b),
10950 vec_lvsl(__a, (unsigned char *)__b));
10955 static vector signed char __ATTRS_o_ai vec_lvrxl(int __a,
10956 const signed char *__b) {
10957 return vec_perm((vector signed char)(0), vec_ldl(__a, __b),
10958 vec_lvsl(__a, __b));
10961 static vector signed char __ATTRS_o_ai
10962 vec_lvrxl(int __a, const vector signed char *__b) {
10963 return vec_perm((vector signed char)(0), vec_ldl(__a, __b),
10964 vec_lvsl(__a, (unsigned char *)__b));
10967 static vector unsigned char __ATTRS_o_ai vec_lvrxl(int __a,
10968 const unsigned char *__b) {
10969 return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b),
10970 vec_lvsl(__a, __b));
10973 static vector unsigned char __ATTRS_o_ai
10974 vec_lvrxl(int __a, const vector unsigned char *__b) {
10975 return vec_perm((vector unsigned char)(0), vec_ldl(__a, __b),
10976 vec_lvsl(__a, (unsigned char *)__b));
10979 static vector bool char __ATTRS_o_ai vec_lvrxl(int __a,
10980 const vector bool char *__b) {
10981 return vec_perm((vector bool char)(0), vec_ldl(__a, __b),
10982 vec_lvsl(__a, (unsigned char *)__b));
10985 static vector short __ATTRS_o_ai vec_lvrxl(int __a, const short *__b) {
10986 return vec_perm((vector short)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
10989 static vector short __ATTRS_o_ai vec_lvrxl(int __a, const vector short *__b) {
10990 return vec_perm((vector short)(0), vec_ldl(__a, __b),
10991 vec_lvsl(__a, (unsigned char *)__b));
10994 static vector unsigned short __ATTRS_o_ai vec_lvrxl(int __a,
10995 const unsigned short *__b) {
10996 return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b),
10997 vec_lvsl(__a, __b));
11000 static vector unsigned short __ATTRS_o_ai
11001 vec_lvrxl(int __a, const vector unsigned short *__b) {
11002 return vec_perm((vector unsigned short)(0), vec_ldl(__a, __b),
11003 vec_lvsl(__a, (unsigned char *)__b));
11006 static vector bool short __ATTRS_o_ai vec_lvrxl(int __a,
11007 const vector bool short *__b) {
11008 return vec_perm((vector bool short)(0), vec_ldl(__a, __b),
11009 vec_lvsl(__a, (unsigned char *)__b));
11012 static vector pixel __ATTRS_o_ai vec_lvrxl(int __a, const vector pixel *__b) {
11013 return vec_perm((vector pixel)(0), vec_ldl(__a, __b),
11014 vec_lvsl(__a, (unsigned char *)__b));
11017 static vector int __ATTRS_o_ai vec_lvrxl(int __a, const int *__b) {
11018 return vec_perm((vector int)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
11021 static vector int __ATTRS_o_ai vec_lvrxl(int __a, const vector int *__b) {
11022 return vec_perm((vector int)(0), vec_ldl(__a, __b),
11023 vec_lvsl(__a, (unsigned char *)__b));
11026 static vector unsigned int __ATTRS_o_ai vec_lvrxl(int __a,
11027 const unsigned int *__b) {
11028 return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b),
11029 vec_lvsl(__a, __b));
11032 static vector unsigned int __ATTRS_o_ai
11033 vec_lvrxl(int __a, const vector unsigned int *__b) {
11034 return vec_perm((vector unsigned int)(0), vec_ldl(__a, __b),
11035 vec_lvsl(__a, (unsigned char *)__b));
11038 static vector bool int __ATTRS_o_ai vec_lvrxl(int __a,
11039 const vector bool int *__b) {
11040 return vec_perm((vector bool int)(0), vec_ldl(__a, __b),
11041 vec_lvsl(__a, (unsigned char *)__b));
11044 static vector float __ATTRS_o_ai vec_lvrxl(int __a, const float *__b) {
11045 return vec_perm((vector float)(0), vec_ldl(__a, __b), vec_lvsl(__a, __b));
11048 static vector float __ATTRS_o_ai vec_lvrxl(int __a, const vector float *__b) {
11049 return vec_perm((vector float)(0), vec_ldl(__a, __b),
11050 vec_lvsl(__a, (unsigned char *)__b));
11055 static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b,
11056 signed char *__c) {
11057 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11061 static void __ATTRS_o_ai vec_stvlx(vector signed char __a, int __b,
11062 vector signed char *__c) {
11064 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11068 static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b,
11069 unsigned char *__c) {
11070 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11074 static void __ATTRS_o_ai vec_stvlx(vector unsigned char __a, int __b,
11075 vector unsigned char *__c) {
11077 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11081 static void __ATTRS_o_ai vec_stvlx(vector bool char __a, int __b,
11082 vector bool char *__c) {
11084 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11088 static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b, short *__c) {
11089 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11093 static void __ATTRS_o_ai vec_stvlx(vector short __a, int __b,
11094 vector short *__c) {
11096 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11100 static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b,
11101 unsigned short *__c) {
11102 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11106 static void __ATTRS_o_ai vec_stvlx(vector unsigned short __a, int __b,
11107 vector unsigned short *__c) {
11109 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11113 static void __ATTRS_o_ai vec_stvlx(vector bool short __a, int __b,
11114 vector bool short *__c) {
11116 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11120 static void __ATTRS_o_ai vec_stvlx(vector pixel __a, int __b,
11121 vector pixel *__c) {
11123 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11127 static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, int *__c) {
11128 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11132 static void __ATTRS_o_ai vec_stvlx(vector int __a, int __b, vector int *__c) {
11134 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11138 static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b,
11139 unsigned int *__c) {
11140 return vec_st(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11144 static void __ATTRS_o_ai vec_stvlx(vector unsigned int __a, int __b,
11145 vector unsigned int *__c) {
11147 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11151 static void __ATTRS_o_ai vec_stvlx(vector bool int __a, int __b,
11152 vector bool int *__c) {
11154 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11158 static void __ATTRS_o_ai vec_stvlx(vector float __a, int __b,
11159 vector float *__c) {
11161 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11167 static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b,
11168 signed char *__c) {
11169 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11173 static void __ATTRS_o_ai vec_stvlxl(vector signed char __a, int __b,
11174 vector signed char *__c) {
11176 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11180 static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b,
11181 unsigned char *__c) {
11182 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11186 static void __ATTRS_o_ai vec_stvlxl(vector unsigned char __a, int __b,
11187 vector unsigned char *__c) {
11189 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11193 static void __ATTRS_o_ai vec_stvlxl(vector bool char __a, int __b,
11194 vector bool char *__c) {
11196 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11200 static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b, short *__c) {
11201 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11205 static void __ATTRS_o_ai vec_stvlxl(vector short __a, int __b,
11206 vector short *__c) {
11208 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11212 static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b,
11213 unsigned short *__c) {
11214 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11218 static void __ATTRS_o_ai vec_stvlxl(vector unsigned short __a, int __b,
11219 vector unsigned short *__c) {
11221 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11225 static void __ATTRS_o_ai vec_stvlxl(vector bool short __a, int __b,
11226 vector bool short *__c) {
11228 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11232 static void __ATTRS_o_ai vec_stvlxl(vector pixel __a, int __b,
11233 vector pixel *__c) {
11235 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11239 static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, int *__c) {
11240 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11244 static void __ATTRS_o_ai vec_stvlxl(vector int __a, int __b, vector int *__c) {
11246 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11250 static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b,
11251 unsigned int *__c) {
11252 return vec_stl(vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, __c)), __b,
11256 static void __ATTRS_o_ai vec_stvlxl(vector unsigned int __a, int __b,
11257 vector unsigned int *__c) {
11259 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11263 static void __ATTRS_o_ai vec_stvlxl(vector bool int __a, int __b,
11264 vector bool int *__c) {
11266 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11270 static void __ATTRS_o_ai vec_stvlxl(vector float __a, int __b,
11271 vector float *__c) {
11273 vec_perm(vec_lvrx(__b, __c), __a, vec_lvsr(__b, (unsigned char *)__c)),
11279 static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b,
11280 signed char *__c) {
11281 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11285 static void __ATTRS_o_ai vec_stvrx(vector signed char __a, int __b,
11286 vector signed char *__c) {
11288 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11292 static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b,
11293 unsigned char *__c) {
11294 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11298 static void __ATTRS_o_ai vec_stvrx(vector unsigned char __a, int __b,
11299 vector unsigned char *__c) {
11301 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11305 static void __ATTRS_o_ai vec_stvrx(vector bool char __a, int __b,
11306 vector bool char *__c) {
11308 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11312 static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b, short *__c) {
11313 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11317 static void __ATTRS_o_ai vec_stvrx(vector short __a, int __b,
11318 vector short *__c) {
11320 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11324 static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b,
11325 unsigned short *__c) {
11326 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11330 static void __ATTRS_o_ai vec_stvrx(vector unsigned short __a, int __b,
11331 vector unsigned short *__c) {
11333 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11337 static void __ATTRS_o_ai vec_stvrx(vector bool short __a, int __b,
11338 vector bool short *__c) {
11340 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11344 static void __ATTRS_o_ai vec_stvrx(vector pixel __a, int __b,
11345 vector pixel *__c) {
11347 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11351 static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, int *__c) {
11352 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11356 static void __ATTRS_o_ai vec_stvrx(vector int __a, int __b, vector int *__c) {
11358 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11362 static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b,
11363 unsigned int *__c) {
11364 return vec_st(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11368 static void __ATTRS_o_ai vec_stvrx(vector unsigned int __a, int __b,
11369 vector unsigned int *__c) {
11371 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11375 static void __ATTRS_o_ai vec_stvrx(vector bool int __a, int __b,
11376 vector bool int *__c) {
11378 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11382 static void __ATTRS_o_ai vec_stvrx(vector float __a, int __b,
11383 vector float *__c) {
11385 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11391 static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b,
11392 signed char *__c) {
11393 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11397 static void __ATTRS_o_ai vec_stvrxl(vector signed char __a, int __b,
11398 vector signed char *__c) {
11400 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11404 static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b,
11405 unsigned char *__c) {
11406 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11410 static void __ATTRS_o_ai vec_stvrxl(vector unsigned char __a, int __b,
11411 vector unsigned char *__c) {
11413 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11417 static void __ATTRS_o_ai vec_stvrxl(vector bool char __a, int __b,
11418 vector bool char *__c) {
11420 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11424 static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b, short *__c) {
11425 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11429 static void __ATTRS_o_ai vec_stvrxl(vector short __a, int __b,
11430 vector short *__c) {
11432 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11436 static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b,
11437 unsigned short *__c) {
11438 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11442 static void __ATTRS_o_ai vec_stvrxl(vector unsigned short __a, int __b,
11443 vector unsigned short *__c) {
11445 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11449 static void __ATTRS_o_ai vec_stvrxl(vector bool short __a, int __b,
11450 vector bool short *__c) {
11452 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11456 static void __ATTRS_o_ai vec_stvrxl(vector pixel __a, int __b,
11457 vector pixel *__c) {
11459 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11463 static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, int *__c) {
11464 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11468 static void __ATTRS_o_ai vec_stvrxl(vector int __a, int __b, vector int *__c) {
11470 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11474 static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b,
11475 unsigned int *__c) {
11476 return vec_stl(vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, __c)), __b,
11480 static void __ATTRS_o_ai vec_stvrxl(vector unsigned int __a, int __b,
11481 vector unsigned int *__c) {
11483 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11487 static void __ATTRS_o_ai vec_stvrxl(vector bool int __a, int __b,
11488 vector bool int *__c) {
11490 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11494 static void __ATTRS_o_ai vec_stvrxl(vector float __a, int __b,
11495 vector float *__c) {
11497 vec_perm(__a, vec_lvlx(__b, __c), vec_lvsr(__b, (unsigned char *)__c)),
11503 static vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b) {
11504 vector signed char __res = (vector signed char)(0);
11509 static vector unsigned char __ATTRS_o_ai vec_promote(unsigned char __a,
11511 vector unsigned char __res = (vector unsigned char)(0);
11516 static vector short __ATTRS_o_ai vec_promote(short __a, int __b) {
11517 vector short __res = (vector short)(0);
11522 static vector unsigned short __ATTRS_o_ai vec_promote(unsigned short __a,
11524 vector unsigned short __res = (vector unsigned short)(0);
11529 static vector int __ATTRS_o_ai vec_promote(int __a, int __b) {
11530 vector int __res = (vector int)(0);
11535 static vector unsigned int __ATTRS_o_ai vec_promote(unsigned int __a, int __b) {
11536 vector unsigned int __res = (vector unsigned int)(0);
11541 static vector float __ATTRS_o_ai vec_promote(float __a, int __b) {
11542 vector float __res = (vector float)(0);
11549 static vector signed char __ATTRS_o_ai vec_splats(signed char __a) {
11550 return (vector signed char)(__a);
11553 static vector unsigned char __ATTRS_o_ai vec_splats(unsigned char __a) {
11554 return (vector unsigned char)(__a);
11557 static vector short __ATTRS_o_ai vec_splats(short __a) {
11558 return (vector short)(__a);
11561 static vector unsigned short __ATTRS_o_ai vec_splats(unsigned short __a) {
11562 return (vector unsigned short)(__a);
11565 static vector int __ATTRS_o_ai vec_splats(int __a) { return (vector int)(__a); }
11567 static vector unsigned int __ATTRS_o_ai vec_splats(unsigned int __a) {
11568 return (vector unsigned int)(__a);
11572 static vector signed long long __ATTRS_o_ai vec_splats(signed long long __a) {
11573 return (vector signed long long)(__a);
11576 static vector unsigned long long __ATTRS_o_ai
11577 vec_splats(unsigned long long __a) {
11578 return (vector unsigned long long)(__a);
11581 #if defined(__POWER8_VECTOR__) && defined(__powerpc64__)
11582 static vector signed __int128 __ATTRS_o_ai vec_splats(signed __int128 __a) {
11583 return (vector signed __int128)(__a);
11586 static vector unsigned __int128 __ATTRS_o_ai
11587 vec_splats(unsigned __int128 __a) {
11588 return (vector unsigned __int128)(__a);
11593 static vector double __ATTRS_o_ai vec_splats(double __a) {
11594 return (vector double)(__a);
11598 static vector float __ATTRS_o_ai vec_splats(float __a) {
11599 return (vector float)(__a);
11602 /* ----------------------------- predicates --------------------------------- */
11606 static int __ATTRS_o_ai vec_all_eq(vector signed char __a,
11607 vector signed char __b) {
11608 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11612 static int __ATTRS_o_ai vec_all_eq(vector signed char __a,
11613 vector bool char __b) {
11614 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11618 static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a,
11619 vector unsigned char __b) {
11620 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11624 static int __ATTRS_o_ai vec_all_eq(vector unsigned char __a,
11625 vector bool char __b) {
11626 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11630 static int __ATTRS_o_ai vec_all_eq(vector bool char __a,
11631 vector signed char __b) {
11632 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11636 static int __ATTRS_o_ai vec_all_eq(vector bool char __a,
11637 vector unsigned char __b) {
11638 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11642 static int __ATTRS_o_ai vec_all_eq(vector bool char __a, vector bool char __b) {
11643 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a,
11647 static int __ATTRS_o_ai vec_all_eq(vector short __a, vector short __b) {
11648 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, __b);
11651 static int __ATTRS_o_ai vec_all_eq(vector short __a, vector bool short __b) {
11652 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, (vector short)__b);
11655 static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a,
11656 vector unsigned short __b) {
11657 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11658 (vector short)__b);
11661 static int __ATTRS_o_ai vec_all_eq(vector unsigned short __a,
11662 vector bool short __b) {
11663 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11664 (vector short)__b);
11667 static int __ATTRS_o_ai vec_all_eq(vector bool short __a, vector short __b) {
11668 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11669 (vector short)__b);
11672 static int __ATTRS_o_ai vec_all_eq(vector bool short __a,
11673 vector unsigned short __b) {
11674 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11675 (vector short)__b);
11678 static int __ATTRS_o_ai vec_all_eq(vector bool short __a,
11679 vector bool short __b) {
11680 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11681 (vector short)__b);
11684 static int __ATTRS_o_ai vec_all_eq(vector pixel __a, vector pixel __b) {
11685 return __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a,
11686 (vector short)__b);
11689 static int __ATTRS_o_ai vec_all_eq(vector int __a, vector int __b) {
11690 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, __b);
11693 static int __ATTRS_o_ai vec_all_eq(vector int __a, vector bool int __b) {
11694 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, (vector int)__b);
11697 static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a,
11698 vector unsigned int __b) {
11699 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11703 static int __ATTRS_o_ai vec_all_eq(vector unsigned int __a,
11704 vector bool int __b) {
11705 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11709 static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector int __b) {
11710 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11714 static int __ATTRS_o_ai vec_all_eq(vector bool int __a,
11715 vector unsigned int __b) {
11716 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11720 static int __ATTRS_o_ai vec_all_eq(vector bool int __a, vector bool int __b) {
11721 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a,
11725 #ifdef __POWER8_VECTOR__
11726 static int __ATTRS_o_ai vec_all_eq(vector signed long long __a,
11727 vector signed long long __b) {
11728 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, __b);
11731 static int __ATTRS_o_ai vec_all_eq(vector long long __a,
11732 vector bool long long __b) {
11733 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, (vector long long)__b);
11736 static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a,
11737 vector unsigned long long __b) {
11738 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11739 (vector long long)__b);
11742 static int __ATTRS_o_ai vec_all_eq(vector unsigned long long __a,
11743 vector bool long long __b) {
11744 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11745 (vector long long)__b);
11748 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
11749 vector long long __b) {
11750 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11751 (vector long long)__b);
11754 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
11755 vector unsigned long long __b) {
11756 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11757 (vector long long)__b);
11760 static int __ATTRS_o_ai vec_all_eq(vector bool long long __a,
11761 vector bool long long __b) {
11762 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11763 (vector long long)__b);
11767 static int __ATTRS_o_ai vec_all_eq(vector float __a, vector float __b) {
11769 return __builtin_vsx_xvcmpeqsp_p(__CR6_LT, __a, __b);
11771 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __b);
11776 static int __ATTRS_o_ai vec_all_eq(vector double __a, vector double __b) {
11777 return __builtin_vsx_xvcmpeqdp_p(__CR6_LT, __a, __b);
11783 static int __ATTRS_o_ai vec_all_ge(vector signed char __a,
11784 vector signed char __b) {
11785 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, __a);
11788 static int __ATTRS_o_ai vec_all_ge(vector signed char __a,
11789 vector bool char __b) {
11790 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__b, __a);
11793 static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a,
11794 vector unsigned char __b) {
11795 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, __a);
11798 static int __ATTRS_o_ai vec_all_ge(vector unsigned char __a,
11799 vector bool char __b) {
11800 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, __a);
11803 static int __ATTRS_o_ai vec_all_ge(vector bool char __a,
11804 vector signed char __b) {
11805 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b,
11806 (vector unsigned char)__a);
11809 static int __ATTRS_o_ai vec_all_ge(vector bool char __a,
11810 vector unsigned char __b) {
11811 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, (vector unsigned char)__a);
11814 static int __ATTRS_o_ai vec_all_ge(vector bool char __a, vector bool char __b) {
11815 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b,
11816 (vector unsigned char)__a);
11819 static int __ATTRS_o_ai vec_all_ge(vector short __a, vector short __b) {
11820 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, __a);
11823 static int __ATTRS_o_ai vec_all_ge(vector short __a, vector bool short __b) {
11824 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)__b, __a);
11827 static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a,
11828 vector unsigned short __b) {
11829 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, __a);
11832 static int __ATTRS_o_ai vec_all_ge(vector unsigned short __a,
11833 vector bool short __b) {
11834 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
11838 static int __ATTRS_o_ai vec_all_ge(vector bool short __a, vector short __b) {
11839 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
11840 (vector unsigned short)__a);
11843 static int __ATTRS_o_ai vec_all_ge(vector bool short __a,
11844 vector unsigned short __b) {
11845 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b,
11846 (vector unsigned short)__a);
11849 static int __ATTRS_o_ai vec_all_ge(vector bool short __a,
11850 vector bool short __b) {
11851 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b,
11852 (vector unsigned short)__a);
11855 static int __ATTRS_o_ai vec_all_ge(vector int __a, vector int __b) {
11856 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, __a);
11859 static int __ATTRS_o_ai vec_all_ge(vector int __a, vector bool int __b) {
11860 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)__b, __a);
11863 static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a,
11864 vector unsigned int __b) {
11865 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, __a);
11868 static int __ATTRS_o_ai vec_all_ge(vector unsigned int __a,
11869 vector bool int __b) {
11870 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, __a);
11873 static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector int __b) {
11874 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b,
11875 (vector unsigned int)__a);
11878 static int __ATTRS_o_ai vec_all_ge(vector bool int __a,
11879 vector unsigned int __b) {
11880 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, (vector unsigned int)__a);
11883 static int __ATTRS_o_ai vec_all_ge(vector bool int __a, vector bool int __b) {
11884 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b,
11885 (vector unsigned int)__a);
11888 #ifdef __POWER8_VECTOR__
11889 static int __ATTRS_o_ai vec_all_ge(vector signed long long __a,
11890 vector signed long long __b) {
11891 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b, __a);
11893 static int __ATTRS_o_ai vec_all_ge(vector signed long long __a,
11894 vector bool long long __b) {
11895 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector signed long long)__b,
11899 static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a,
11900 vector unsigned long long __b) {
11901 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, __a);
11904 static int __ATTRS_o_ai vec_all_ge(vector unsigned long long __a,
11905 vector bool long long __b) {
11906 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
11910 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
11911 vector signed long long __b) {
11912 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
11913 (vector unsigned long long)__a);
11916 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
11917 vector unsigned long long __b) {
11918 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b,
11919 (vector unsigned long long)__a);
11922 static int __ATTRS_o_ai vec_all_ge(vector bool long long __a,
11923 vector bool long long __b) {
11924 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
11925 (vector unsigned long long)__a);
11929 static int __ATTRS_o_ai vec_all_ge(vector float __a, vector float __b) {
11931 return __builtin_vsx_xvcmpgesp_p(__CR6_LT, __a, __b);
11933 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __a, __b);
11938 static int __ATTRS_o_ai vec_all_ge(vector double __a, vector double __b) {
11939 return __builtin_vsx_xvcmpgedp_p(__CR6_LT, __a, __b);
11945 static int __ATTRS_o_ai vec_all_gt(vector signed char __a,
11946 vector signed char __b) {
11947 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, __b);
11950 static int __ATTRS_o_ai vec_all_gt(vector signed char __a,
11951 vector bool char __b) {
11952 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, (vector signed char)__b);
11955 static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a,
11956 vector unsigned char __b) {
11957 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, __b);
11960 static int __ATTRS_o_ai vec_all_gt(vector unsigned char __a,
11961 vector bool char __b) {
11962 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, (vector unsigned char)__b);
11965 static int __ATTRS_o_ai vec_all_gt(vector bool char __a,
11966 vector signed char __b) {
11967 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a,
11968 (vector unsigned char)__b);
11971 static int __ATTRS_o_ai vec_all_gt(vector bool char __a,
11972 vector unsigned char __b) {
11973 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, __b);
11976 static int __ATTRS_o_ai vec_all_gt(vector bool char __a, vector bool char __b) {
11977 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a,
11978 (vector unsigned char)__b);
11981 static int __ATTRS_o_ai vec_all_gt(vector short __a, vector short __b) {
11982 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, __b);
11985 static int __ATTRS_o_ai vec_all_gt(vector short __a, vector bool short __b) {
11986 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, (vector short)__b);
11989 static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a,
11990 vector unsigned short __b) {
11991 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, __b);
11994 static int __ATTRS_o_ai vec_all_gt(vector unsigned short __a,
11995 vector bool short __b) {
11996 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a,
11997 (vector unsigned short)__b);
12000 static int __ATTRS_o_ai vec_all_gt(vector bool short __a, vector short __b) {
12001 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
12002 (vector unsigned short)__b);
12005 static int __ATTRS_o_ai vec_all_gt(vector bool short __a,
12006 vector unsigned short __b) {
12007 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
12011 static int __ATTRS_o_ai vec_all_gt(vector bool short __a,
12012 vector bool short __b) {
12013 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a,
12014 (vector unsigned short)__b);
12017 static int __ATTRS_o_ai vec_all_gt(vector int __a, vector int __b) {
12018 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, __b);
12021 static int __ATTRS_o_ai vec_all_gt(vector int __a, vector bool int __b) {
12022 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, (vector int)__b);
12025 static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a,
12026 vector unsigned int __b) {
12027 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, __b);
12030 static int __ATTRS_o_ai vec_all_gt(vector unsigned int __a,
12031 vector bool int __b) {
12032 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, (vector unsigned int)__b);
12035 static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector int __b) {
12036 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a,
12037 (vector unsigned int)__b);
12040 static int __ATTRS_o_ai vec_all_gt(vector bool int __a,
12041 vector unsigned int __b) {
12042 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, __b);
12045 static int __ATTRS_o_ai vec_all_gt(vector bool int __a, vector bool int __b) {
12046 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a,
12047 (vector unsigned int)__b);
12050 #ifdef __POWER8_VECTOR__
12051 static int __ATTRS_o_ai vec_all_gt(vector signed long long __a,
12052 vector signed long long __b) {
12053 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, __b);
12055 static int __ATTRS_o_ai vec_all_gt(vector signed long long __a,
12056 vector bool long long __b) {
12057 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a,
12058 (vector signed long long)__b);
12061 static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a,
12062 vector unsigned long long __b) {
12063 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, __b);
12066 static int __ATTRS_o_ai vec_all_gt(vector unsigned long long __a,
12067 vector bool long long __b) {
12068 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a,
12069 (vector unsigned long long)__b);
12072 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
12073 vector signed long long __b) {
12074 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
12075 (vector unsigned long long)__b);
12078 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
12079 vector unsigned long long __b) {
12080 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
12084 static int __ATTRS_o_ai vec_all_gt(vector bool long long __a,
12085 vector bool long long __b) {
12086 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
12087 (vector unsigned long long)__b);
12091 static int __ATTRS_o_ai vec_all_gt(vector float __a, vector float __b) {
12093 return __builtin_vsx_xvcmpgtsp_p(__CR6_LT, __a, __b);
12095 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __a, __b);
12100 static int __ATTRS_o_ai vec_all_gt(vector double __a, vector double __b) {
12101 return __builtin_vsx_xvcmpgtdp_p(__CR6_LT, __a, __b);
12107 static int __attribute__((__always_inline__))
12108 vec_all_in(vector float __a, vector float __b) {
12109 return __builtin_altivec_vcmpbfp_p(__CR6_EQ, __a, __b);
12114 static int __ATTRS_o_ai vec_all_le(vector signed char __a,
12115 vector signed char __b) {
12116 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, __b);
12119 static int __ATTRS_o_ai vec_all_le(vector signed char __a,
12120 vector bool char __b) {
12121 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, (vector signed char)__b);
12124 static int __ATTRS_o_ai vec_all_le(vector unsigned char __a,
12125 vector unsigned char __b) {
12126 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, __b);
12129 static int __ATTRS_o_ai vec_all_le(vector unsigned char __a,
12130 vector bool char __b) {
12131 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, (vector unsigned char)__b);
12134 static int __ATTRS_o_ai vec_all_le(vector bool char __a,
12135 vector signed char __b) {
12136 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a,
12137 (vector unsigned char)__b);
12140 static int __ATTRS_o_ai vec_all_le(vector bool char __a,
12141 vector unsigned char __b) {
12142 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, __b);
12145 static int __ATTRS_o_ai vec_all_le(vector bool char __a, vector bool char __b) {
12146 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a,
12147 (vector unsigned char)__b);
12150 static int __ATTRS_o_ai vec_all_le(vector short __a, vector short __b) {
12151 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, __b);
12154 static int __ATTRS_o_ai vec_all_le(vector short __a, vector bool short __b) {
12155 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, (vector short)__b);
12158 static int __ATTRS_o_ai vec_all_le(vector unsigned short __a,
12159 vector unsigned short __b) {
12160 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, __b);
12163 static int __ATTRS_o_ai vec_all_le(vector unsigned short __a,
12164 vector bool short __b) {
12165 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a,
12166 (vector unsigned short)__b);
12169 static int __ATTRS_o_ai vec_all_le(vector bool short __a, vector short __b) {
12170 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
12171 (vector unsigned short)__b);
12174 static int __ATTRS_o_ai vec_all_le(vector bool short __a,
12175 vector unsigned short __b) {
12176 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
12180 static int __ATTRS_o_ai vec_all_le(vector bool short __a,
12181 vector bool short __b) {
12182 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a,
12183 (vector unsigned short)__b);
12186 static int __ATTRS_o_ai vec_all_le(vector int __a, vector int __b) {
12187 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, __b);
12190 static int __ATTRS_o_ai vec_all_le(vector int __a, vector bool int __b) {
12191 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, (vector int)__b);
12194 static int __ATTRS_o_ai vec_all_le(vector unsigned int __a,
12195 vector unsigned int __b) {
12196 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, __b);
12199 static int __ATTRS_o_ai vec_all_le(vector unsigned int __a,
12200 vector bool int __b) {
12201 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, (vector unsigned int)__b);
12204 static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector int __b) {
12205 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a,
12206 (vector unsigned int)__b);
12209 static int __ATTRS_o_ai vec_all_le(vector bool int __a,
12210 vector unsigned int __b) {
12211 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, __b);
12214 static int __ATTRS_o_ai vec_all_le(vector bool int __a, vector bool int __b) {
12215 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a,
12216 (vector unsigned int)__b);
12219 #ifdef __POWER8_VECTOR__
12220 static int __ATTRS_o_ai vec_all_le(vector signed long long __a,
12221 vector signed long long __b) {
12222 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, __b);
12225 static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a,
12226 vector unsigned long long __b) {
12227 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, __b);
12230 static int __ATTRS_o_ai vec_all_le(vector signed long long __a,
12231 vector bool long long __b) {
12232 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a,
12233 (vector signed long long)__b);
12236 static int __ATTRS_o_ai vec_all_le(vector unsigned long long __a,
12237 vector bool long long __b) {
12238 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a,
12239 (vector unsigned long long)__b);
12242 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
12243 vector signed long long __b) {
12244 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
12245 (vector unsigned long long)__b);
12248 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
12249 vector unsigned long long __b) {
12250 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
12254 static int __ATTRS_o_ai vec_all_le(vector bool long long __a,
12255 vector bool long long __b) {
12256 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
12257 (vector unsigned long long)__b);
12261 static int __ATTRS_o_ai vec_all_le(vector float __a, vector float __b) {
12263 return __builtin_vsx_xvcmpgesp_p(__CR6_LT, __b, __a);
12265 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __b, __a);
12270 static int __ATTRS_o_ai vec_all_le(vector double __a, vector double __b) {
12271 return __builtin_vsx_xvcmpgedp_p(__CR6_LT, __b, __a);
12277 static int __ATTRS_o_ai vec_all_lt(vector signed char __a,
12278 vector signed char __b) {
12279 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, __a);
12282 static int __ATTRS_o_ai vec_all_lt(vector signed char __a,
12283 vector bool char __b) {
12284 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__b, __a);
12287 static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a,
12288 vector unsigned char __b) {
12289 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, __a);
12292 static int __ATTRS_o_ai vec_all_lt(vector unsigned char __a,
12293 vector bool char __b) {
12294 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, __a);
12297 static int __ATTRS_o_ai vec_all_lt(vector bool char __a,
12298 vector signed char __b) {
12299 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b,
12300 (vector unsigned char)__a);
12303 static int __ATTRS_o_ai vec_all_lt(vector bool char __a,
12304 vector unsigned char __b) {
12305 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, (vector unsigned char)__a);
12308 static int __ATTRS_o_ai vec_all_lt(vector bool char __a, vector bool char __b) {
12309 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b,
12310 (vector unsigned char)__a);
12313 static int __ATTRS_o_ai vec_all_lt(vector short __a, vector short __b) {
12314 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, __a);
12317 static int __ATTRS_o_ai vec_all_lt(vector short __a, vector bool short __b) {
12318 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)__b, __a);
12321 static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a,
12322 vector unsigned short __b) {
12323 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, __a);
12326 static int __ATTRS_o_ai vec_all_lt(vector unsigned short __a,
12327 vector bool short __b) {
12328 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
12332 static int __ATTRS_o_ai vec_all_lt(vector bool short __a, vector short __b) {
12333 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
12334 (vector unsigned short)__a);
12337 static int __ATTRS_o_ai vec_all_lt(vector bool short __a,
12338 vector unsigned short __b) {
12339 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b,
12340 (vector unsigned short)__a);
12343 static int __ATTRS_o_ai vec_all_lt(vector bool short __a,
12344 vector bool short __b) {
12345 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b,
12346 (vector unsigned short)__a);
12349 static int __ATTRS_o_ai vec_all_lt(vector int __a, vector int __b) {
12350 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, __a);
12353 static int __ATTRS_o_ai vec_all_lt(vector int __a, vector bool int __b) {
12354 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)__b, __a);
12357 static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a,
12358 vector unsigned int __b) {
12359 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, __a);
12362 static int __ATTRS_o_ai vec_all_lt(vector unsigned int __a,
12363 vector bool int __b) {
12364 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, __a);
12367 static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector int __b) {
12368 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b,
12369 (vector unsigned int)__a);
12372 static int __ATTRS_o_ai vec_all_lt(vector bool int __a,
12373 vector unsigned int __b) {
12374 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, (vector unsigned int)__a);
12377 static int __ATTRS_o_ai vec_all_lt(vector bool int __a, vector bool int __b) {
12378 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b,
12379 (vector unsigned int)__a);
12382 #ifdef __POWER8_VECTOR__
12383 static int __ATTRS_o_ai vec_all_lt(vector signed long long __a,
12384 vector signed long long __b) {
12385 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, __a);
12388 static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a,
12389 vector unsigned long long __b) {
12390 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, __a);
12393 static int __ATTRS_o_ai vec_all_lt(vector signed long long __a,
12394 vector bool long long __b) {
12395 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector signed long long)__b,
12399 static int __ATTRS_o_ai vec_all_lt(vector unsigned long long __a,
12400 vector bool long long __b) {
12401 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
12405 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
12406 vector signed long long __b) {
12407 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
12408 (vector unsigned long long)__a);
12411 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
12412 vector unsigned long long __b) {
12413 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b,
12414 (vector unsigned long long)__a);
12417 static int __ATTRS_o_ai vec_all_lt(vector bool long long __a,
12418 vector bool long long __b) {
12419 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
12420 (vector unsigned long long)__a);
12424 static int __ATTRS_o_ai vec_all_lt(vector float __a, vector float __b) {
12426 return __builtin_vsx_xvcmpgtsp_p(__CR6_LT, __b, __a);
12428 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __b, __a);
12433 static int __ATTRS_o_ai vec_all_lt(vector double __a, vector double __b) {
12434 return __builtin_vsx_xvcmpgtdp_p(__CR6_LT, __b, __a);
12440 static int __ATTRS_o_ai vec_all_nan(vector float __a) {
12442 return __builtin_vsx_xvcmpeqsp_p(__CR6_EQ, __a, __a);
12444 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __a);
12449 static int __ATTRS_o_ai vec_all_nan(vector double __a) {
12450 return __builtin_vsx_xvcmpeqdp_p(__CR6_EQ, __a, __a);
12456 static int __ATTRS_o_ai vec_all_ne(vector signed char __a,
12457 vector signed char __b) {
12458 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12462 static int __ATTRS_o_ai vec_all_ne(vector signed char __a,
12463 vector bool char __b) {
12464 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12468 static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a,
12469 vector unsigned char __b) {
12470 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12474 static int __ATTRS_o_ai vec_all_ne(vector unsigned char __a,
12475 vector bool char __b) {
12476 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12480 static int __ATTRS_o_ai vec_all_ne(vector bool char __a,
12481 vector signed char __b) {
12482 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12486 static int __ATTRS_o_ai vec_all_ne(vector bool char __a,
12487 vector unsigned char __b) {
12488 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12492 static int __ATTRS_o_ai vec_all_ne(vector bool char __a, vector bool char __b) {
12493 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a,
12497 static int __ATTRS_o_ai vec_all_ne(vector short __a, vector short __b) {
12498 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, __b);
12501 static int __ATTRS_o_ai vec_all_ne(vector short __a, vector bool short __b) {
12502 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, (vector short)__b);
12505 static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a,
12506 vector unsigned short __b) {
12507 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12508 (vector short)__b);
12511 static int __ATTRS_o_ai vec_all_ne(vector unsigned short __a,
12512 vector bool short __b) {
12513 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12514 (vector short)__b);
12517 static int __ATTRS_o_ai vec_all_ne(vector bool short __a, vector short __b) {
12518 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12519 (vector short)__b);
12522 static int __ATTRS_o_ai vec_all_ne(vector bool short __a,
12523 vector unsigned short __b) {
12524 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12525 (vector short)__b);
12528 static int __ATTRS_o_ai vec_all_ne(vector bool short __a,
12529 vector bool short __b) {
12530 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12531 (vector short)__b);
12534 static int __ATTRS_o_ai vec_all_ne(vector pixel __a, vector pixel __b) {
12535 return __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a,
12536 (vector short)__b);
12539 static int __ATTRS_o_ai vec_all_ne(vector int __a, vector int __b) {
12540 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, __b);
12543 static int __ATTRS_o_ai vec_all_ne(vector int __a, vector bool int __b) {
12544 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, (vector int)__b);
12547 static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a,
12548 vector unsigned int __b) {
12549 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12553 static int __ATTRS_o_ai vec_all_ne(vector unsigned int __a,
12554 vector bool int __b) {
12555 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12559 static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector int __b) {
12560 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12564 static int __ATTRS_o_ai vec_all_ne(vector bool int __a,
12565 vector unsigned int __b) {
12566 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12570 static int __ATTRS_o_ai vec_all_ne(vector bool int __a, vector bool int __b) {
12571 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a,
12575 #ifdef __POWER8_VECTOR__
12576 static int __ATTRS_o_ai vec_all_ne(vector signed long long __a,
12577 vector signed long long __b) {
12578 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, __b);
12581 static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a,
12582 vector unsigned long long __b) {
12583 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a,
12584 (vector long long)__b);
12587 static int __ATTRS_o_ai vec_all_ne(vector signed long long __a,
12588 vector bool long long __b) {
12589 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a,
12590 (vector signed long long)__b);
12593 static int __ATTRS_o_ai vec_all_ne(vector unsigned long long __a,
12594 vector bool long long __b) {
12595 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12596 (vector signed long long)__b);
12599 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
12600 vector signed long long __b) {
12601 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12602 (vector signed long long)__b);
12605 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
12606 vector unsigned long long __b) {
12607 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12608 (vector signed long long)__b);
12611 static int __ATTRS_o_ai vec_all_ne(vector bool long long __a,
12612 vector bool long long __b) {
12613 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12614 (vector signed long long)__b);
12618 static int __ATTRS_o_ai vec_all_ne(vector float __a, vector float __b) {
12620 return __builtin_vsx_xvcmpeqdp_p(__CR6_EQ, __a, __b);
12622 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __b);
12627 static int __ATTRS_o_ai vec_all_ne(vector double __a, vector double __b) {
12628 return __builtin_vsx_xvcmpeqdp_p(__CR6_EQ, __a, __b);
12634 static int __ATTRS_o_ai
12635 vec_all_nge(vector float __a, vector float __b) {
12637 return __builtin_vsx_xvcmpgesp_p(__CR6_EQ, __a, __b);
12639 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __a, __b);
12644 static int __ATTRS_o_ai
12645 vec_all_nge(vector double __a, vector double __b) {
12646 return __builtin_vsx_xvcmpgedp_p(__CR6_EQ, __a, __b);
12652 static int __ATTRS_o_ai
12653 vec_all_ngt(vector float __a, vector float __b) {
12655 return __builtin_vsx_xvcmpgtsp_p(__CR6_EQ, __a, __b);
12657 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __a, __b);
12662 static int __ATTRS_o_ai
12663 vec_all_ngt(vector double __a, vector double __b) {
12664 return __builtin_vsx_xvcmpgtdp_p(__CR6_EQ, __a, __b);
12670 static int __attribute__((__always_inline__))
12671 vec_all_nle(vector float __a, vector float __b) {
12672 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __b, __a);
12677 static int __attribute__((__always_inline__))
12678 vec_all_nlt(vector float __a, vector float __b) {
12679 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __b, __a);
12682 /* vec_all_numeric */
12684 static int __attribute__((__always_inline__))
12685 vec_all_numeric(vector float __a) {
12686 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __a);
12691 static int __ATTRS_o_ai vec_any_eq(vector signed char __a,
12692 vector signed char __b) {
12693 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12697 static int __ATTRS_o_ai vec_any_eq(vector signed char __a,
12698 vector bool char __b) {
12699 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12703 static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a,
12704 vector unsigned char __b) {
12705 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12709 static int __ATTRS_o_ai vec_any_eq(vector unsigned char __a,
12710 vector bool char __b) {
12711 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12715 static int __ATTRS_o_ai vec_any_eq(vector bool char __a,
12716 vector signed char __b) {
12717 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12721 static int __ATTRS_o_ai vec_any_eq(vector bool char __a,
12722 vector unsigned char __b) {
12723 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12727 static int __ATTRS_o_ai vec_any_eq(vector bool char __a, vector bool char __b) {
12728 return __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a,
12732 static int __ATTRS_o_ai vec_any_eq(vector short __a, vector short __b) {
12733 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, __b);
12736 static int __ATTRS_o_ai vec_any_eq(vector short __a, vector bool short __b) {
12737 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, (vector short)__b);
12740 static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a,
12741 vector unsigned short __b) {
12742 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12743 (vector short)__b);
12746 static int __ATTRS_o_ai vec_any_eq(vector unsigned short __a,
12747 vector bool short __b) {
12748 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12749 (vector short)__b);
12752 static int __ATTRS_o_ai vec_any_eq(vector bool short __a, vector short __b) {
12753 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12754 (vector short)__b);
12757 static int __ATTRS_o_ai vec_any_eq(vector bool short __a,
12758 vector unsigned short __b) {
12759 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12760 (vector short)__b);
12763 static int __ATTRS_o_ai vec_any_eq(vector bool short __a,
12764 vector bool short __b) {
12765 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12766 (vector short)__b);
12769 static int __ATTRS_o_ai vec_any_eq(vector pixel __a, vector pixel __b) {
12770 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, (vector short)__a,
12771 (vector short)__b);
12774 static int __ATTRS_o_ai vec_any_eq(vector int __a, vector int __b) {
12775 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, __b);
12778 static int __ATTRS_o_ai vec_any_eq(vector int __a, vector bool int __b) {
12779 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, (vector int)__b);
12782 static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a,
12783 vector unsigned int __b) {
12784 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12788 static int __ATTRS_o_ai vec_any_eq(vector unsigned int __a,
12789 vector bool int __b) {
12790 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12794 static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector int __b) {
12795 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12799 static int __ATTRS_o_ai vec_any_eq(vector bool int __a,
12800 vector unsigned int __b) {
12801 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12805 static int __ATTRS_o_ai vec_any_eq(vector bool int __a, vector bool int __b) {
12806 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a,
12810 #ifdef __POWER8_VECTOR__
12811 static int __ATTRS_o_ai vec_any_eq(vector signed long long __a,
12812 vector signed long long __b) {
12813 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, __b);
12816 static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a,
12817 vector unsigned long long __b) {
12818 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a,
12819 (vector long long)__b);
12822 static int __ATTRS_o_ai vec_any_eq(vector signed long long __a,
12823 vector bool long long __b) {
12824 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a,
12825 (vector signed long long)__b);
12828 static int __ATTRS_o_ai vec_any_eq(vector unsigned long long __a,
12829 vector bool long long __b) {
12830 return __builtin_altivec_vcmpequd_p(
12831 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12834 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
12835 vector signed long long __b) {
12836 return __builtin_altivec_vcmpequd_p(
12837 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12840 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
12841 vector unsigned long long __b) {
12842 return __builtin_altivec_vcmpequd_p(
12843 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12846 static int __ATTRS_o_ai vec_any_eq(vector bool long long __a,
12847 vector bool long long __b) {
12848 return __builtin_altivec_vcmpequd_p(
12849 __CR6_EQ_REV, (vector signed long long)__a, (vector signed long long)__b);
12853 static int __ATTRS_o_ai vec_any_eq(vector float __a, vector float __b) {
12855 return __builtin_vsx_xvcmpeqsp_p(__CR6_EQ_REV, __a, __b);
12857 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __b);
12862 static int __ATTRS_o_ai vec_any_eq(vector double __a, vector double __b) {
12863 return __builtin_vsx_xvcmpeqdp_p(__CR6_EQ_REV, __a, __b);
12869 static int __ATTRS_o_ai vec_any_ge(vector signed char __a,
12870 vector signed char __b) {
12871 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b, __a);
12874 static int __ATTRS_o_ai vec_any_ge(vector signed char __a,
12875 vector bool char __b) {
12876 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b,
12880 static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a,
12881 vector unsigned char __b) {
12882 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, __a);
12885 static int __ATTRS_o_ai vec_any_ge(vector unsigned char __a,
12886 vector bool char __b) {
12887 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
12891 static int __ATTRS_o_ai vec_any_ge(vector bool char __a,
12892 vector signed char __b) {
12893 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
12894 (vector unsigned char)__a);
12897 static int __ATTRS_o_ai vec_any_ge(vector bool char __a,
12898 vector unsigned char __b) {
12899 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b,
12900 (vector unsigned char)__a);
12903 static int __ATTRS_o_ai vec_any_ge(vector bool char __a, vector bool char __b) {
12904 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b,
12905 (vector unsigned char)__a);
12908 static int __ATTRS_o_ai vec_any_ge(vector short __a, vector short __b) {
12909 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b, __a);
12912 static int __ATTRS_o_ai vec_any_ge(vector short __a, vector bool short __b) {
12913 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)__b, __a);
12916 static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a,
12917 vector unsigned short __b) {
12918 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, __a);
12921 static int __ATTRS_o_ai vec_any_ge(vector unsigned short __a,
12922 vector bool short __b) {
12923 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
12927 static int __ATTRS_o_ai vec_any_ge(vector bool short __a, vector short __b) {
12928 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
12929 (vector unsigned short)__a);
12932 static int __ATTRS_o_ai vec_any_ge(vector bool short __a,
12933 vector unsigned short __b) {
12934 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b,
12935 (vector unsigned short)__a);
12938 static int __ATTRS_o_ai vec_any_ge(vector bool short __a,
12939 vector bool short __b) {
12940 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b,
12941 (vector unsigned short)__a);
12944 static int __ATTRS_o_ai vec_any_ge(vector int __a, vector int __b) {
12945 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b, __a);
12948 static int __ATTRS_o_ai vec_any_ge(vector int __a, vector bool int __b) {
12949 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)__b, __a);
12952 static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a,
12953 vector unsigned int __b) {
12954 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, __a);
12957 static int __ATTRS_o_ai vec_any_ge(vector unsigned int __a,
12958 vector bool int __b) {
12959 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
12963 static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector int __b) {
12964 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
12965 (vector unsigned int)__a);
12968 static int __ATTRS_o_ai vec_any_ge(vector bool int __a,
12969 vector unsigned int __b) {
12970 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b,
12971 (vector unsigned int)__a);
12974 static int __ATTRS_o_ai vec_any_ge(vector bool int __a, vector bool int __b) {
12975 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b,
12976 (vector unsigned int)__a);
12979 #ifdef __POWER8_VECTOR__
12980 static int __ATTRS_o_ai vec_any_ge(vector signed long long __a,
12981 vector signed long long __b) {
12982 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b, __a);
12985 static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a,
12986 vector unsigned long long __b) {
12987 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, __a);
12990 static int __ATTRS_o_ai vec_any_ge(vector signed long long __a,
12991 vector bool long long __b) {
12992 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV,
12993 (vector signed long long)__b, __a);
12996 static int __ATTRS_o_ai vec_any_ge(vector unsigned long long __a,
12997 vector bool long long __b) {
12998 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12999 (vector unsigned long long)__b, __a);
13002 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
13003 vector signed long long __b) {
13004 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
13005 (vector unsigned long long)__b,
13006 (vector unsigned long long)__a);
13009 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
13010 vector unsigned long long __b) {
13011 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b,
13012 (vector unsigned long long)__a);
13015 static int __ATTRS_o_ai vec_any_ge(vector bool long long __a,
13016 vector bool long long __b) {
13017 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
13018 (vector unsigned long long)__b,
13019 (vector unsigned long long)__a);
13023 static int __ATTRS_o_ai vec_any_ge(vector float __a, vector float __b) {
13025 return __builtin_vsx_xvcmpgesp_p(__CR6_EQ_REV, __a, __b);
13027 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __a, __b);
13032 static int __ATTRS_o_ai vec_any_ge(vector double __a, vector double __b) {
13033 return __builtin_vsx_xvcmpgedp_p(__CR6_EQ_REV, __a, __b);
13039 static int __ATTRS_o_ai vec_any_gt(vector signed char __a,
13040 vector signed char __b) {
13041 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, __b);
13044 static int __ATTRS_o_ai vec_any_gt(vector signed char __a,
13045 vector bool char __b) {
13046 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a,
13047 (vector signed char)__b);
13050 static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a,
13051 vector unsigned char __b) {
13052 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, __b);
13055 static int __ATTRS_o_ai vec_any_gt(vector unsigned char __a,
13056 vector bool char __b) {
13057 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a,
13058 (vector unsigned char)__b);
13061 static int __ATTRS_o_ai vec_any_gt(vector bool char __a,
13062 vector signed char __b) {
13063 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
13064 (vector unsigned char)__b);
13067 static int __ATTRS_o_ai vec_any_gt(vector bool char __a,
13068 vector unsigned char __b) {
13069 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
13073 static int __ATTRS_o_ai vec_any_gt(vector bool char __a, vector bool char __b) {
13074 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a,
13075 (vector unsigned char)__b);
13078 static int __ATTRS_o_ai vec_any_gt(vector short __a, vector short __b) {
13079 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, __b);
13082 static int __ATTRS_o_ai vec_any_gt(vector short __a, vector bool short __b) {
13083 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, (vector short)__b);
13086 static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a,
13087 vector unsigned short __b) {
13088 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, __b);
13091 static int __ATTRS_o_ai vec_any_gt(vector unsigned short __a,
13092 vector bool short __b) {
13093 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a,
13094 (vector unsigned short)__b);
13097 static int __ATTRS_o_ai vec_any_gt(vector bool short __a, vector short __b) {
13098 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
13099 (vector unsigned short)__b);
13102 static int __ATTRS_o_ai vec_any_gt(vector bool short __a,
13103 vector unsigned short __b) {
13104 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
13108 static int __ATTRS_o_ai vec_any_gt(vector bool short __a,
13109 vector bool short __b) {
13110 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a,
13111 (vector unsigned short)__b);
13114 static int __ATTRS_o_ai vec_any_gt(vector int __a, vector int __b) {
13115 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, __b);
13118 static int __ATTRS_o_ai vec_any_gt(vector int __a, vector bool int __b) {
13119 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, (vector int)__b);
13122 static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a,
13123 vector unsigned int __b) {
13124 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, __b);
13127 static int __ATTRS_o_ai vec_any_gt(vector unsigned int __a,
13128 vector bool int __b) {
13129 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a,
13130 (vector unsigned int)__b);
13133 static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector int __b) {
13134 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
13135 (vector unsigned int)__b);
13138 static int __ATTRS_o_ai vec_any_gt(vector bool int __a,
13139 vector unsigned int __b) {
13140 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
13144 static int __ATTRS_o_ai vec_any_gt(vector bool int __a, vector bool int __b) {
13145 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a,
13146 (vector unsigned int)__b);
13149 #ifdef __POWER8_VECTOR__
13150 static int __ATTRS_o_ai vec_any_gt(vector signed long long __a,
13151 vector signed long long __b) {
13152 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, __b);
13155 static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a,
13156 vector unsigned long long __b) {
13157 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, __b);
13160 static int __ATTRS_o_ai vec_any_gt(vector signed long long __a,
13161 vector bool long long __b) {
13162 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a,
13163 (vector signed long long)__b);
13166 static int __ATTRS_o_ai vec_any_gt(vector unsigned long long __a,
13167 vector bool long long __b) {
13168 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a,
13169 (vector unsigned long long)__b);
13172 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
13173 vector signed long long __b) {
13174 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13175 (vector unsigned long long)__a,
13176 (vector unsigned long long)__b);
13179 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
13180 vector unsigned long long __b) {
13181 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13182 (vector unsigned long long)__a, __b);
13185 static int __ATTRS_o_ai vec_any_gt(vector bool long long __a,
13186 vector bool long long __b) {
13187 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13188 (vector unsigned long long)__a,
13189 (vector unsigned long long)__b);
13193 static int __ATTRS_o_ai vec_any_gt(vector float __a, vector float __b) {
13195 return __builtin_vsx_xvcmpgtsp_p(__CR6_EQ_REV, __a, __b);
13197 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __a, __b);
13202 static int __ATTRS_o_ai vec_any_gt(vector double __a, vector double __b) {
13203 return __builtin_vsx_xvcmpgtdp_p(__CR6_EQ_REV, __a, __b);
13209 static int __ATTRS_o_ai vec_any_le(vector signed char __a,
13210 vector signed char __b) {
13211 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, __b);
13214 static int __ATTRS_o_ai vec_any_le(vector signed char __a,
13215 vector bool char __b) {
13216 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a,
13217 (vector signed char)__b);
13220 static int __ATTRS_o_ai vec_any_le(vector unsigned char __a,
13221 vector unsigned char __b) {
13222 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, __b);
13225 static int __ATTRS_o_ai vec_any_le(vector unsigned char __a,
13226 vector bool char __b) {
13227 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a,
13228 (vector unsigned char)__b);
13231 static int __ATTRS_o_ai vec_any_le(vector bool char __a,
13232 vector signed char __b) {
13233 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
13234 (vector unsigned char)__b);
13237 static int __ATTRS_o_ai vec_any_le(vector bool char __a,
13238 vector unsigned char __b) {
13239 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
13243 static int __ATTRS_o_ai vec_any_le(vector bool char __a, vector bool char __b) {
13244 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a,
13245 (vector unsigned char)__b);
13248 static int __ATTRS_o_ai vec_any_le(vector short __a, vector short __b) {
13249 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, __b);
13252 static int __ATTRS_o_ai vec_any_le(vector short __a, vector bool short __b) {
13253 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, (vector short)__b);
13256 static int __ATTRS_o_ai vec_any_le(vector unsigned short __a,
13257 vector unsigned short __b) {
13258 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, __b);
13261 static int __ATTRS_o_ai vec_any_le(vector unsigned short __a,
13262 vector bool short __b) {
13263 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a,
13264 (vector unsigned short)__b);
13267 static int __ATTRS_o_ai vec_any_le(vector bool short __a, vector short __b) {
13268 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
13269 (vector unsigned short)__b);
13272 static int __ATTRS_o_ai vec_any_le(vector bool short __a,
13273 vector unsigned short __b) {
13274 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
13278 static int __ATTRS_o_ai vec_any_le(vector bool short __a,
13279 vector bool short __b) {
13280 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a,
13281 (vector unsigned short)__b);
13284 static int __ATTRS_o_ai vec_any_le(vector int __a, vector int __b) {
13285 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, __b);
13288 static int __ATTRS_o_ai vec_any_le(vector int __a, vector bool int __b) {
13289 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, (vector int)__b);
13292 static int __ATTRS_o_ai vec_any_le(vector unsigned int __a,
13293 vector unsigned int __b) {
13294 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, __b);
13297 static int __ATTRS_o_ai vec_any_le(vector unsigned int __a,
13298 vector bool int __b) {
13299 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a,
13300 (vector unsigned int)__b);
13303 static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector int __b) {
13304 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
13305 (vector unsigned int)__b);
13308 static int __ATTRS_o_ai vec_any_le(vector bool int __a,
13309 vector unsigned int __b) {
13310 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
13314 static int __ATTRS_o_ai vec_any_le(vector bool int __a, vector bool int __b) {
13315 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a,
13316 (vector unsigned int)__b);
13319 #ifdef __POWER8_VECTOR__
13320 static int __ATTRS_o_ai vec_any_le(vector signed long long __a,
13321 vector signed long long __b) {
13322 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, __b);
13325 static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a,
13326 vector unsigned long long __b) {
13327 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, __b);
13330 static int __ATTRS_o_ai vec_any_le(vector signed long long __a,
13331 vector bool long long __b) {
13332 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a,
13333 (vector signed long long)__b);
13336 static int __ATTRS_o_ai vec_any_le(vector unsigned long long __a,
13337 vector bool long long __b) {
13338 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a,
13339 (vector unsigned long long)__b);
13342 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
13343 vector signed long long __b) {
13344 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
13345 (vector unsigned long long)__a,
13346 (vector unsigned long long)__b);
13349 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
13350 vector unsigned long long __b) {
13351 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
13352 (vector unsigned long long)__a, __b);
13355 static int __ATTRS_o_ai vec_any_le(vector bool long long __a,
13356 vector bool long long __b) {
13357 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
13358 (vector unsigned long long)__a,
13359 (vector unsigned long long)__b);
13363 static int __ATTRS_o_ai vec_any_le(vector float __a, vector float __b) {
13365 return __builtin_vsx_xvcmpgesp_p(__CR6_EQ_REV, __b, __a);
13367 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __b, __a);
13372 static int __ATTRS_o_ai vec_any_le(vector double __a, vector double __b) {
13373 return __builtin_vsx_xvcmpgedp_p(__CR6_EQ_REV, __b, __a);
13379 static int __ATTRS_o_ai vec_any_lt(vector signed char __a,
13380 vector signed char __b) {
13381 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b, __a);
13384 static int __ATTRS_o_ai vec_any_lt(vector signed char __a,
13385 vector bool char __b) {
13386 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b,
13390 static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a,
13391 vector unsigned char __b) {
13392 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, __a);
13395 static int __ATTRS_o_ai vec_any_lt(vector unsigned char __a,
13396 vector bool char __b) {
13397 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
13401 static int __ATTRS_o_ai vec_any_lt(vector bool char __a,
13402 vector signed char __b) {
13403 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
13404 (vector unsigned char)__a);
13407 static int __ATTRS_o_ai vec_any_lt(vector bool char __a,
13408 vector unsigned char __b) {
13409 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b,
13410 (vector unsigned char)__a);
13413 static int __ATTRS_o_ai vec_any_lt(vector bool char __a, vector bool char __b) {
13414 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b,
13415 (vector unsigned char)__a);
13418 static int __ATTRS_o_ai vec_any_lt(vector short __a, vector short __b) {
13419 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b, __a);
13422 static int __ATTRS_o_ai vec_any_lt(vector short __a, vector bool short __b) {
13423 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)__b, __a);
13426 static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a,
13427 vector unsigned short __b) {
13428 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, __a);
13431 static int __ATTRS_o_ai vec_any_lt(vector unsigned short __a,
13432 vector bool short __b) {
13433 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
13437 static int __ATTRS_o_ai vec_any_lt(vector bool short __a, vector short __b) {
13438 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
13439 (vector unsigned short)__a);
13442 static int __ATTRS_o_ai vec_any_lt(vector bool short __a,
13443 vector unsigned short __b) {
13444 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b,
13445 (vector unsigned short)__a);
13448 static int __ATTRS_o_ai vec_any_lt(vector bool short __a,
13449 vector bool short __b) {
13450 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b,
13451 (vector unsigned short)__a);
13454 static int __ATTRS_o_ai vec_any_lt(vector int __a, vector int __b) {
13455 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b, __a);
13458 static int __ATTRS_o_ai vec_any_lt(vector int __a, vector bool int __b) {
13459 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)__b, __a);
13462 static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a,
13463 vector unsigned int __b) {
13464 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, __a);
13467 static int __ATTRS_o_ai vec_any_lt(vector unsigned int __a,
13468 vector bool int __b) {
13469 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
13473 static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector int __b) {
13474 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
13475 (vector unsigned int)__a);
13478 static int __ATTRS_o_ai vec_any_lt(vector bool int __a,
13479 vector unsigned int __b) {
13480 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b,
13481 (vector unsigned int)__a);
13484 static int __ATTRS_o_ai vec_any_lt(vector bool int __a, vector bool int __b) {
13485 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b,
13486 (vector unsigned int)__a);
13489 #ifdef __POWER8_VECTOR__
13490 static int __ATTRS_o_ai vec_any_lt(vector signed long long __a,
13491 vector signed long long __b) {
13492 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b, __a);
13495 static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a,
13496 vector unsigned long long __b) {
13497 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, __a);
13500 static int __ATTRS_o_ai vec_any_lt(vector signed long long __a,
13501 vector bool long long __b) {
13502 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV,
13503 (vector signed long long)__b, __a);
13506 static int __ATTRS_o_ai vec_any_lt(vector unsigned long long __a,
13507 vector bool long long __b) {
13508 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13509 (vector unsigned long long)__b, __a);
13512 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
13513 vector signed long long __b) {
13514 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13515 (vector unsigned long long)__b,
13516 (vector unsigned long long)__a);
13519 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
13520 vector unsigned long long __b) {
13521 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b,
13522 (vector unsigned long long)__a);
13525 static int __ATTRS_o_ai vec_any_lt(vector bool long long __a,
13526 vector bool long long __b) {
13527 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13528 (vector unsigned long long)__b,
13529 (vector unsigned long long)__a);
13533 static int __ATTRS_o_ai vec_any_lt(vector float __a, vector float __b) {
13535 return __builtin_vsx_xvcmpgtsp_p(__CR6_EQ_REV, __b, __a);
13537 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __b, __a);
13542 static int __ATTRS_o_ai vec_any_lt(vector double __a, vector double __b) {
13543 return __builtin_vsx_xvcmpgtdp_p(__CR6_EQ_REV, __b, __a);
13549 static int __attribute__((__always_inline__)) vec_any_nan(vector float __a) {
13550 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __a);
13555 static int __ATTRS_o_ai vec_any_ne(vector signed char __a,
13556 vector signed char __b) {
13557 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13561 static int __ATTRS_o_ai vec_any_ne(vector signed char __a,
13562 vector bool char __b) {
13563 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13567 static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a,
13568 vector unsigned char __b) {
13569 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13573 static int __ATTRS_o_ai vec_any_ne(vector unsigned char __a,
13574 vector bool char __b) {
13575 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13579 static int __ATTRS_o_ai vec_any_ne(vector bool char __a,
13580 vector signed char __b) {
13581 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13585 static int __ATTRS_o_ai vec_any_ne(vector bool char __a,
13586 vector unsigned char __b) {
13587 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13591 static int __ATTRS_o_ai vec_any_ne(vector bool char __a, vector bool char __b) {
13592 return __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a,
13596 static int __ATTRS_o_ai vec_any_ne(vector short __a, vector short __b) {
13597 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, __b);
13600 static int __ATTRS_o_ai vec_any_ne(vector short __a, vector bool short __b) {
13601 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, (vector short)__b);
13604 static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a,
13605 vector unsigned short __b) {
13606 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13607 (vector short)__b);
13610 static int __ATTRS_o_ai vec_any_ne(vector unsigned short __a,
13611 vector bool short __b) {
13612 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13613 (vector short)__b);
13616 static int __ATTRS_o_ai vec_any_ne(vector bool short __a, vector short __b) {
13617 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13618 (vector short)__b);
13621 static int __ATTRS_o_ai vec_any_ne(vector bool short __a,
13622 vector unsigned short __b) {
13623 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13624 (vector short)__b);
13627 static int __ATTRS_o_ai vec_any_ne(vector bool short __a,
13628 vector bool short __b) {
13629 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13630 (vector short)__b);
13633 static int __ATTRS_o_ai vec_any_ne(vector pixel __a, vector pixel __b) {
13634 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, (vector short)__a,
13635 (vector short)__b);
13638 static int __ATTRS_o_ai vec_any_ne(vector int __a, vector int __b) {
13639 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, __b);
13642 static int __ATTRS_o_ai vec_any_ne(vector int __a, vector bool int __b) {
13643 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, (vector int)__b);
13646 static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a,
13647 vector unsigned int __b) {
13648 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13652 static int __ATTRS_o_ai vec_any_ne(vector unsigned int __a,
13653 vector bool int __b) {
13654 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13658 static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector int __b) {
13659 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13663 static int __ATTRS_o_ai vec_any_ne(vector bool int __a,
13664 vector unsigned int __b) {
13665 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13669 static int __ATTRS_o_ai vec_any_ne(vector bool int __a, vector bool int __b) {
13670 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a,
13674 #ifdef __POWER8_VECTOR__
13675 static int __ATTRS_o_ai vec_any_ne(vector signed long long __a,
13676 vector signed long long __b) {
13677 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, __b);
13680 static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a,
13681 vector unsigned long long __b) {
13682 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a,
13683 (vector long long)__b);
13686 static int __ATTRS_o_ai vec_any_ne(vector signed long long __a,
13687 vector bool long long __b) {
13688 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a,
13689 (vector signed long long)__b);
13692 static int __ATTRS_o_ai vec_any_ne(vector unsigned long long __a,
13693 vector bool long long __b) {
13694 return __builtin_altivec_vcmpequd_p(
13695 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13698 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
13699 vector signed long long __b) {
13700 return __builtin_altivec_vcmpequd_p(
13701 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13704 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
13705 vector unsigned long long __b) {
13706 return __builtin_altivec_vcmpequd_p(
13707 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13710 static int __ATTRS_o_ai vec_any_ne(vector bool long long __a,
13711 vector bool long long __b) {
13712 return __builtin_altivec_vcmpequd_p(
13713 __CR6_LT_REV, (vector signed long long)__a, (vector signed long long)__b);
13717 static int __ATTRS_o_ai vec_any_ne(vector float __a, vector float __b) {
13719 return __builtin_vsx_xvcmpeqsp_p(__CR6_LT_REV, __a, __b);
13721 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __b);
13726 static int __ATTRS_o_ai vec_any_ne(vector double __a, vector double __b) {
13727 return __builtin_vsx_xvcmpeqdp_p(__CR6_LT_REV, __a, __b);
13733 static int __attribute__((__always_inline__))
13734 vec_any_nge(vector float __a, vector float __b) {
13735 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __a, __b);
13740 static int __attribute__((__always_inline__))
13741 vec_any_ngt(vector float __a, vector float __b) {
13742 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __a, __b);
13747 static int __attribute__((__always_inline__))
13748 vec_any_nle(vector float __a, vector float __b) {
13749 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __b, __a);
13754 static int __attribute__((__always_inline__))
13755 vec_any_nlt(vector float __a, vector float __b) {
13756 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __b, __a);
13759 /* vec_any_numeric */
13761 static int __attribute__((__always_inline__))
13762 vec_any_numeric(vector float __a) {
13763 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __a);
13768 static int __attribute__((__always_inline__))
13769 vec_any_out(vector float __a, vector float __b) {
13770 return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, __a, __b);
13773 /* Power 8 Crypto functions
13774 Note: We diverge from the current GCC implementation with regard
13775 to cryptography and related functions as follows:
13776 - Only the SHA and AES instructions and builtins are disabled by -mno-crypto
13777 - The remaining ones are only available on Power8 and up so
13778 require -mpower8-vector
13779 The justification for this is that export requirements require that
13780 Category:Vector.Crypto is optional (i.e. compliant hardware may not provide
13781 support). As a result, we need to be able to turn off support for those.
13782 The remaining ones (currently controlled by -mcrypto for GCC) still
13783 need to be provided on compliant hardware even if Vector.Crypto is not
13787 #define vec_sbox_be __builtin_altivec_crypto_vsbox
13788 #define vec_cipher_be __builtin_altivec_crypto_vcipher
13789 #define vec_cipherlast_be __builtin_altivec_crypto_vcipherlast
13790 #define vec_ncipher_be __builtin_altivec_crypto_vncipher
13791 #define vec_ncipherlast_be __builtin_altivec_crypto_vncipherlast
13793 static vector unsigned long long __attribute__((__always_inline__))
13794 __builtin_crypto_vsbox(vector unsigned long long __a) {
13795 return __builtin_altivec_crypto_vsbox(__a);
13798 static vector unsigned long long __attribute__((__always_inline__))
13799 __builtin_crypto_vcipher(vector unsigned long long __a,
13800 vector unsigned long long __b) {
13801 return __builtin_altivec_crypto_vcipher(__a, __b);
13804 static vector unsigned long long __attribute__((__always_inline__))
13805 __builtin_crypto_vcipherlast(vector unsigned long long __a,
13806 vector unsigned long long __b) {
13807 return __builtin_altivec_crypto_vcipherlast(__a, __b);
13810 static vector unsigned long long __attribute__((__always_inline__))
13811 __builtin_crypto_vncipher(vector unsigned long long __a,
13812 vector unsigned long long __b) {
13813 return __builtin_altivec_crypto_vncipher(__a, __b);
13816 static vector unsigned long long __attribute__((__always_inline__))
13817 __builtin_crypto_vncipherlast(vector unsigned long long __a,
13818 vector unsigned long long __b) {
13819 return __builtin_altivec_crypto_vncipherlast(__a, __b);
13822 #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad
13823 #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw
13825 #define vec_shasigma_be(X, Y, Z) \
13826 _Generic((X), vector unsigned int: __builtin_crypto_vshasigmaw, \
13827 vector unsigned long long: __builtin_crypto_vshasigmad) \
13831 #ifdef __POWER8_VECTOR__
13832 static vector unsigned char __ATTRS_o_ai
13833 __builtin_crypto_vpermxor(vector unsigned char __a, vector unsigned char __b,
13834 vector unsigned char __c) {
13835 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
13838 static vector unsigned short __ATTRS_o_ai
13839 __builtin_crypto_vpermxor(vector unsigned short __a, vector unsigned short __b,
13840 vector unsigned short __c) {
13841 return (vector unsigned short)__builtin_altivec_crypto_vpermxor(
13842 (vector unsigned char)__a, (vector unsigned char)__b,
13843 (vector unsigned char)__c);
13846 static vector unsigned int __ATTRS_o_ai __builtin_crypto_vpermxor(
13847 vector unsigned int __a, vector unsigned int __b, vector unsigned int __c) {
13848 return (vector unsigned int)__builtin_altivec_crypto_vpermxor(
13849 (vector unsigned char)__a, (vector unsigned char)__b,
13850 (vector unsigned char)__c);
13853 static vector unsigned long long __ATTRS_o_ai __builtin_crypto_vpermxor(
13854 vector unsigned long long __a, vector unsigned long long __b,
13855 vector unsigned long long __c) {
13856 return (vector unsigned long long)__builtin_altivec_crypto_vpermxor(
13857 (vector unsigned char)__a, (vector unsigned char)__b,
13858 (vector unsigned char)__c);
13861 static vector unsigned char __ATTRS_o_ai
13862 __builtin_crypto_vpmsumb(vector unsigned char __a, vector unsigned char __b) {
13863 return __builtin_altivec_crypto_vpmsumb(__a, __b);
13866 static vector unsigned short __ATTRS_o_ai
13867 __builtin_crypto_vpmsumb(vector unsigned short __a, vector unsigned short __b) {
13868 return __builtin_altivec_crypto_vpmsumh(__a, __b);
13871 static vector unsigned int __ATTRS_o_ai
13872 __builtin_crypto_vpmsumb(vector unsigned int __a, vector unsigned int __b) {
13873 return __builtin_altivec_crypto_vpmsumw(__a, __b);
13876 static vector unsigned long long __ATTRS_o_ai
13877 __builtin_crypto_vpmsumb(vector unsigned long long __a,
13878 vector unsigned long long __b) {
13879 return __builtin_altivec_crypto_vpmsumd(__a, __b);
13882 static vector signed char __ATTRS_o_ai vec_vgbbd (vector signed char __a)
13884 return __builtin_altivec_vgbbd((vector unsigned char) __a);
13887 #define vec_pmsum_be __builtin_crypto_vpmsumb
13888 #define vec_gb __builtin_altivec_vgbbd
13890 static vector unsigned char __ATTRS_o_ai vec_vgbbd (vector unsigned char __a)
13892 return __builtin_altivec_vgbbd(__a);
13895 static vector long long __ATTRS_o_ai
13896 vec_vbpermq (vector signed char __a, vector signed char __b)
13898 return __builtin_altivec_vbpermq((vector unsigned char) __a,
13899 (vector unsigned char) __b);
13902 static vector long long __ATTRS_o_ai
13903 vec_vbpermq (vector unsigned char __a, vector unsigned char __b)
13905 return __builtin_altivec_vbpermq(__a, __b);
13908 #ifdef __powerpc64__
13909 static vector unsigned long long __attribute__((__always_inline__))
13910 vec_bperm (vector unsigned __int128 __a, vector unsigned char __b) {
13911 return __builtin_altivec_vbpermq((vector unsigned char) __a,
13912 (vector unsigned char) __b);
13917 #undef __ATTRS_o_ai
13919 #endif /* __ALTIVEC_H */