]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/lib/Headers/altivec.h
Merge clang 3.5.0 release from ^/vendor/clang/dist, resolve conflicts,
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / lib / Headers / altivec.h
1 /*===---- altivec.h - Standard header for type generic math ---------------===*\
2  *
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:
9  *
10  * The above copyright notice and this permission notice shall be included in
11  * all copies or substantial portions of the Software.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19  * THE SOFTWARE.
20  *
21 \*===----------------------------------------------------------------------===*/
22
23 #ifndef __ALTIVEC_H
24 #define __ALTIVEC_H
25
26 #ifndef __ALTIVEC__
27 #error "AltiVec support not enabled"
28 #endif
29
30 /* constants for mapping CR6 bits to predicate result. */
31
32 #define __CR6_EQ     0
33 #define __CR6_EQ_REV 1
34 #define __CR6_LT     2
35 #define __CR6_LT_REV 3
36
37 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
38
39 static vector signed char __ATTRS_o_ai
40 vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c);
41
42 static vector unsigned char __ATTRS_o_ai
43 vec_perm(vector unsigned char __a,
44          vector unsigned char __b,
45          vector unsigned char __c);
46
47 static vector bool char __ATTRS_o_ai
48 vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c);
49
50 static vector short __ATTRS_o_ai
51 vec_perm(vector short __a, vector short __b, vector unsigned char __c);
52
53 static vector unsigned short __ATTRS_o_ai
54 vec_perm(vector unsigned short __a,
55          vector unsigned short __b,
56          vector unsigned char __c);
57
58 static vector bool short __ATTRS_o_ai
59 vec_perm(vector bool short __a, vector bool short __b, vector unsigned char __c);
60
61 static vector pixel __ATTRS_o_ai
62 vec_perm(vector pixel __a, vector pixel __b, vector unsigned char __c);
63
64 static vector int __ATTRS_o_ai
65 vec_perm(vector int __a, vector int __b, vector unsigned char __c);
66
67 static vector unsigned int __ATTRS_o_ai
68 vec_perm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c);
69
70 static vector bool int __ATTRS_o_ai
71 vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c);
72
73 static vector float __ATTRS_o_ai
74 vec_perm(vector float __a, vector float __b, vector unsigned char __c);
75
76 static vector unsigned char __ATTRS_o_ai
77 vec_xor(vector unsigned char __a, vector unsigned char __b);
78
79 /* vec_abs */
80
81 #define __builtin_altivec_abs_v16qi vec_abs
82 #define __builtin_altivec_abs_v8hi  vec_abs
83 #define __builtin_altivec_abs_v4si  vec_abs
84
85 static vector signed char __ATTRS_o_ai
86 vec_abs(vector signed char __a)
87 {
88   return __builtin_altivec_vmaxsb(__a, -__a);
89 }
90
91 static vector signed short __ATTRS_o_ai
92 vec_abs(vector signed short __a)
93 {
94   return __builtin_altivec_vmaxsh(__a, -__a);
95 }
96
97 static vector signed int __ATTRS_o_ai
98 vec_abs(vector signed int __a)
99 {
100   return __builtin_altivec_vmaxsw(__a, -__a);
101 }
102
103 static vector float __ATTRS_o_ai
104 vec_abs(vector float __a)
105 {
106   vector unsigned int __res = (vector unsigned int)__a
107                             & (vector unsigned int)(0x7FFFFFFF);
108   return (vector float)__res;
109 }
110
111 /* vec_abss */
112
113 #define __builtin_altivec_abss_v16qi vec_abss
114 #define __builtin_altivec_abss_v8hi  vec_abss
115 #define __builtin_altivec_abss_v4si  vec_abss
116
117 static vector signed char __ATTRS_o_ai
118 vec_abss(vector signed char __a)
119 {
120   return __builtin_altivec_vmaxsb
121            (__a, __builtin_altivec_vsubsbs((vector signed char)(0), __a));
122 }
123
124 static vector signed short __ATTRS_o_ai
125 vec_abss(vector signed short __a)
126 {
127   return __builtin_altivec_vmaxsh
128            (__a, __builtin_altivec_vsubshs((vector signed short)(0), __a));
129 }
130
131 static vector signed int __ATTRS_o_ai
132 vec_abss(vector signed int __a)
133 {
134   return __builtin_altivec_vmaxsw
135            (__a, __builtin_altivec_vsubsws((vector signed int)(0), __a));
136 }
137
138 /* vec_add */
139
140 static vector signed char __ATTRS_o_ai
141 vec_add(vector signed char __a, vector signed char __b)
142 {
143   return __a + __b;
144 }
145
146 static vector signed char __ATTRS_o_ai
147 vec_add(vector bool char __a, vector signed char __b)
148 {
149   return (vector signed char)__a + __b;
150 }
151
152 static vector signed char __ATTRS_o_ai
153 vec_add(vector signed char __a, vector bool char __b)
154 {
155   return __a + (vector signed char)__b;
156 }
157
158 static vector unsigned char __ATTRS_o_ai
159 vec_add(vector unsigned char __a, vector unsigned char __b)
160 {
161   return __a + __b;
162 }
163
164 static vector unsigned char __ATTRS_o_ai
165 vec_add(vector bool char __a, vector unsigned char __b)
166 {
167   return (vector unsigned char)__a + __b;
168 }
169
170 static vector unsigned char __ATTRS_o_ai
171 vec_add(vector unsigned char __a, vector bool char __b)
172 {
173   return __a + (vector unsigned char)__b;
174 }
175
176 static vector short __ATTRS_o_ai
177 vec_add(vector short __a, vector short __b)
178 {
179   return __a + __b;
180 }
181
182 static vector short __ATTRS_o_ai
183 vec_add(vector bool short __a, vector short __b)
184 {
185   return (vector short)__a + __b;
186 }
187
188 static vector short __ATTRS_o_ai
189 vec_add(vector short __a, vector bool short __b)
190 {
191   return __a + (vector short)__b;
192 }
193
194 static vector unsigned short __ATTRS_o_ai
195 vec_add(vector unsigned short __a, vector unsigned short __b)
196 {
197   return __a + __b;
198 }
199
200 static vector unsigned short __ATTRS_o_ai
201 vec_add(vector bool short __a, vector unsigned short __b)
202 {
203   return (vector unsigned short)__a + __b;
204 }
205
206 static vector unsigned short __ATTRS_o_ai
207 vec_add(vector unsigned short __a, vector bool short __b)
208 {
209   return __a + (vector unsigned short)__b;
210 }
211
212 static vector int __ATTRS_o_ai
213 vec_add(vector int __a, vector int __b)
214 {
215   return __a + __b;
216 }
217
218 static vector int __ATTRS_o_ai
219 vec_add(vector bool int __a, vector int __b)
220 {
221   return (vector int)__a + __b;
222 }
223
224 static vector int __ATTRS_o_ai
225 vec_add(vector int __a, vector bool int __b)
226 {
227   return __a + (vector int)__b;
228 }
229
230 static vector unsigned int __ATTRS_o_ai
231 vec_add(vector unsigned int __a, vector unsigned int __b)
232 {
233   return __a + __b;
234 }
235
236 static vector unsigned int __ATTRS_o_ai
237 vec_add(vector bool int __a, vector unsigned int __b)
238 {
239   return (vector unsigned int)__a + __b;
240 }
241
242 static vector unsigned int __ATTRS_o_ai
243 vec_add(vector unsigned int __a, vector bool int __b)
244 {
245   return __a + (vector unsigned int)__b;
246 }
247
248 static vector float __ATTRS_o_ai
249 vec_add(vector float __a, vector float __b)
250 {
251   return __a + __b;
252 }
253
254 /* vec_vaddubm */
255
256 #define __builtin_altivec_vaddubm vec_vaddubm
257
258 static vector signed char __ATTRS_o_ai
259 vec_vaddubm(vector signed char __a, vector signed char __b)
260 {
261   return __a + __b;
262 }
263
264 static vector signed char __ATTRS_o_ai
265 vec_vaddubm(vector bool char __a, vector signed char __b)
266 {
267   return (vector signed char)__a + __b;
268 }
269
270 static vector signed char __ATTRS_o_ai
271 vec_vaddubm(vector signed char __a, vector bool char __b)
272 {
273   return __a + (vector signed char)__b;
274 }
275
276 static vector unsigned char __ATTRS_o_ai
277 vec_vaddubm(vector unsigned char __a, vector unsigned char __b)
278 {
279   return __a + __b;
280 }
281
282 static vector unsigned char __ATTRS_o_ai
283 vec_vaddubm(vector bool char __a, vector unsigned char __b)
284 {
285   return (vector unsigned char)__a + __b;
286 }
287
288 static vector unsigned char __ATTRS_o_ai
289 vec_vaddubm(vector unsigned char __a, vector bool char __b)
290 {
291   return __a + (vector unsigned char)__b;
292 }
293
294 /* vec_vadduhm */
295
296 #define __builtin_altivec_vadduhm vec_vadduhm
297
298 static vector short __ATTRS_o_ai
299 vec_vadduhm(vector short __a, vector short __b)
300 {
301   return __a + __b;
302 }
303
304 static vector short __ATTRS_o_ai
305 vec_vadduhm(vector bool short __a, vector short __b)
306 {
307   return (vector short)__a + __b;
308 }
309
310 static vector short __ATTRS_o_ai
311 vec_vadduhm(vector short __a, vector bool short __b)
312 {
313   return __a + (vector short)__b;
314 }
315
316 static vector unsigned short __ATTRS_o_ai
317 vec_vadduhm(vector unsigned short __a, vector unsigned short __b)
318 {
319   return __a + __b;
320 }
321
322 static vector unsigned short __ATTRS_o_ai
323 vec_vadduhm(vector bool short __a, vector unsigned short __b)
324 {
325   return (vector unsigned short)__a + __b;
326 }
327
328 static vector unsigned short __ATTRS_o_ai
329 vec_vadduhm(vector unsigned short __a, vector bool short __b)
330 {
331   return __a + (vector unsigned short)__b;
332 }
333
334 /* vec_vadduwm */
335
336 #define __builtin_altivec_vadduwm vec_vadduwm
337
338 static vector int __ATTRS_o_ai
339 vec_vadduwm(vector int __a, vector int __b)
340 {
341   return __a + __b;
342 }
343
344 static vector int __ATTRS_o_ai
345 vec_vadduwm(vector bool int __a, vector int __b)
346 {
347   return (vector int)__a + __b;
348 }
349
350 static vector int __ATTRS_o_ai
351 vec_vadduwm(vector int __a, vector bool int __b)
352 {
353   return __a + (vector int)__b;
354 }
355
356 static vector unsigned int __ATTRS_o_ai
357 vec_vadduwm(vector unsigned int __a, vector unsigned int __b)
358 {
359   return __a + __b;
360 }
361
362 static vector unsigned int __ATTRS_o_ai
363 vec_vadduwm(vector bool int __a, vector unsigned int __b)
364 {
365   return (vector unsigned int)__a + __b;
366 }
367
368 static vector unsigned int __ATTRS_o_ai
369 vec_vadduwm(vector unsigned int __a, vector bool int __b)
370 {
371   return __a + (vector unsigned int)__b;
372 }
373
374 /* vec_vaddfp */
375
376 #define __builtin_altivec_vaddfp  vec_vaddfp
377
378 static vector float __attribute__((__always_inline__))
379 vec_vaddfp(vector float __a, vector float __b)
380 {
381   return __a + __b;
382 }
383
384 /* vec_addc */
385
386 static vector unsigned int __attribute__((__always_inline__))
387 vec_addc(vector unsigned int __a, vector unsigned int __b)
388 {
389   return __builtin_altivec_vaddcuw(__a, __b);
390 }
391
392 /* vec_vaddcuw */
393
394 static vector unsigned int __attribute__((__always_inline__))
395 vec_vaddcuw(vector unsigned int __a, vector unsigned int __b)
396 {
397   return __builtin_altivec_vaddcuw(__a, __b);
398 }
399
400 /* vec_adds */
401
402 static vector signed char __ATTRS_o_ai
403 vec_adds(vector signed char __a, vector signed char __b)
404 {
405   return __builtin_altivec_vaddsbs(__a, __b);
406 }
407
408 static vector signed char __ATTRS_o_ai
409 vec_adds(vector bool char __a, vector signed char __b)
410 {
411   return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
412 }
413
414 static vector signed char __ATTRS_o_ai
415 vec_adds(vector signed char __a, vector bool char __b)
416 {
417   return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
418 }
419
420 static vector unsigned char __ATTRS_o_ai
421 vec_adds(vector unsigned char __a, vector unsigned char __b)
422 {
423   return __builtin_altivec_vaddubs(__a, __b);
424 }
425
426 static vector unsigned char __ATTRS_o_ai
427 vec_adds(vector bool char __a, vector unsigned char __b)
428 {
429   return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
430 }
431
432 static vector unsigned char __ATTRS_o_ai
433 vec_adds(vector unsigned char __a, vector bool char __b)
434 {
435   return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
436 }
437
438 static vector short __ATTRS_o_ai
439 vec_adds(vector short __a, vector short __b)
440 {
441   return __builtin_altivec_vaddshs(__a, __b);
442 }
443
444 static vector short __ATTRS_o_ai
445 vec_adds(vector bool short __a, vector short __b)
446 {
447   return __builtin_altivec_vaddshs((vector short)__a, __b);
448 }
449
450 static vector short __ATTRS_o_ai
451 vec_adds(vector short __a, vector bool short __b)
452 {
453   return __builtin_altivec_vaddshs(__a, (vector short)__b);
454 }
455
456 static vector unsigned short __ATTRS_o_ai
457 vec_adds(vector unsigned short __a, vector unsigned short __b)
458 {
459   return __builtin_altivec_vadduhs(__a, __b);
460 }
461
462 static vector unsigned short __ATTRS_o_ai
463 vec_adds(vector bool short __a, vector unsigned short __b)
464 {
465   return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
466 }
467
468 static vector unsigned short __ATTRS_o_ai
469 vec_adds(vector unsigned short __a, vector bool short __b)
470 {
471   return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
472 }
473
474 static vector int __ATTRS_o_ai
475 vec_adds(vector int __a, vector int __b)
476 {
477   return __builtin_altivec_vaddsws(__a, __b);
478 }
479
480 static vector int __ATTRS_o_ai
481 vec_adds(vector bool int __a, vector int __b)
482 {
483   return __builtin_altivec_vaddsws((vector int)__a, __b);
484 }
485
486 static vector int __ATTRS_o_ai
487 vec_adds(vector int __a, vector bool int __b)
488 {
489   return __builtin_altivec_vaddsws(__a, (vector int)__b);
490 }
491
492 static vector unsigned int __ATTRS_o_ai
493 vec_adds(vector unsigned int __a, vector unsigned int __b)
494 {
495   return __builtin_altivec_vadduws(__a, __b);
496 }
497
498 static vector unsigned int __ATTRS_o_ai
499 vec_adds(vector bool int __a, vector unsigned int __b)
500 {
501   return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
502 }
503
504 static vector unsigned int __ATTRS_o_ai
505 vec_adds(vector unsigned int __a, vector bool int __b)
506 {
507   return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
508 }
509
510 /* vec_vaddsbs */
511
512 static vector signed char __ATTRS_o_ai
513 vec_vaddsbs(vector signed char __a, vector signed char __b)
514 {
515   return __builtin_altivec_vaddsbs(__a, __b);
516 }
517
518 static vector signed char __ATTRS_o_ai
519 vec_vaddsbs(vector bool char __a, vector signed char __b)
520 {
521   return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
522 }
523
524 static vector signed char __ATTRS_o_ai
525 vec_vaddsbs(vector signed char __a, vector bool char __b)
526 {
527   return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
528 }
529
530 /* vec_vaddubs */
531
532 static vector unsigned char __ATTRS_o_ai
533 vec_vaddubs(vector unsigned char __a, vector unsigned char __b)
534 {
535   return __builtin_altivec_vaddubs(__a, __b);
536 }
537
538 static vector unsigned char __ATTRS_o_ai
539 vec_vaddubs(vector bool char __a, vector unsigned char __b)
540 {
541   return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
542 }
543
544 static vector unsigned char __ATTRS_o_ai
545 vec_vaddubs(vector unsigned char __a, vector bool char __b)
546 {
547   return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
548 }
549
550 /* vec_vaddshs */
551
552 static vector short __ATTRS_o_ai
553 vec_vaddshs(vector short __a, vector short __b)
554 {
555   return __builtin_altivec_vaddshs(__a, __b);
556 }
557
558 static vector short __ATTRS_o_ai
559 vec_vaddshs(vector bool short __a, vector short __b)
560 {
561   return __builtin_altivec_vaddshs((vector short)__a, __b);
562 }
563
564 static vector short __ATTRS_o_ai
565 vec_vaddshs(vector short __a, vector bool short __b)
566 {
567   return __builtin_altivec_vaddshs(__a, (vector short)__b);
568 }
569
570 /* vec_vadduhs */
571
572 static vector unsigned short __ATTRS_o_ai
573 vec_vadduhs(vector unsigned short __a, vector unsigned short __b)
574 {
575   return __builtin_altivec_vadduhs(__a, __b);
576 }
577
578 static vector unsigned short __ATTRS_o_ai
579 vec_vadduhs(vector bool short __a, vector unsigned short __b)
580 {
581   return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
582 }
583
584 static vector unsigned short __ATTRS_o_ai
585 vec_vadduhs(vector unsigned short __a, vector bool short __b)
586 {
587   return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
588 }
589
590 /* vec_vaddsws */
591
592 static vector int __ATTRS_o_ai
593 vec_vaddsws(vector int __a, vector int __b)
594 {
595   return __builtin_altivec_vaddsws(__a, __b);
596 }
597
598 static vector int __ATTRS_o_ai
599 vec_vaddsws(vector bool int __a, vector int __b)
600 {
601   return __builtin_altivec_vaddsws((vector int)__a, __b);
602 }
603
604 static vector int __ATTRS_o_ai
605 vec_vaddsws(vector int __a, vector bool int __b)
606 {
607   return __builtin_altivec_vaddsws(__a, (vector int)__b);
608 }
609
610 /* vec_vadduws */
611
612 static vector unsigned int __ATTRS_o_ai
613 vec_vadduws(vector unsigned int __a, vector unsigned int __b)
614 {
615   return __builtin_altivec_vadduws(__a, __b);
616 }
617
618 static vector unsigned int __ATTRS_o_ai
619 vec_vadduws(vector bool int __a, vector unsigned int __b)
620 {
621   return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
622 }
623
624 static vector unsigned int __ATTRS_o_ai
625 vec_vadduws(vector unsigned int __a, vector bool int __b)
626 {
627   return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
628 }
629
630 /* vec_and */
631
632 #define __builtin_altivec_vand vec_and
633
634 static vector signed char __ATTRS_o_ai
635 vec_and(vector signed char __a, vector signed char __b)
636 {
637   return __a & __b;
638 }
639
640 static vector signed char __ATTRS_o_ai
641 vec_and(vector bool char __a, vector signed char __b)
642 {
643   return (vector signed char)__a & __b;
644 }
645
646 static vector signed char __ATTRS_o_ai
647 vec_and(vector signed char __a, vector bool char __b)
648 {
649   return __a & (vector signed char)__b;
650 }
651
652 static vector unsigned char __ATTRS_o_ai
653 vec_and(vector unsigned char __a, vector unsigned char __b)
654 {
655   return __a & __b;
656 }
657
658 static vector unsigned char __ATTRS_o_ai
659 vec_and(vector bool char __a, vector unsigned char __b)
660 {
661   return (vector unsigned char)__a & __b;
662 }
663
664 static vector unsigned char __ATTRS_o_ai
665 vec_and(vector unsigned char __a, vector bool char __b)
666 {
667   return __a & (vector unsigned char)__b;
668 }
669
670 static vector bool char __ATTRS_o_ai
671 vec_and(vector bool char __a, vector bool char __b)
672 {
673   return __a & __b;
674 }
675
676 static vector short __ATTRS_o_ai
677 vec_and(vector short __a, vector short __b)
678 {
679   return __a & __b;
680 }
681
682 static vector short __ATTRS_o_ai
683 vec_and(vector bool short __a, vector short __b)
684 {
685   return (vector short)__a & __b;
686 }
687
688 static vector short __ATTRS_o_ai
689 vec_and(vector short __a, vector bool short __b)
690 {
691   return __a & (vector short)__b;
692 }
693
694 static vector unsigned short __ATTRS_o_ai
695 vec_and(vector unsigned short __a, vector unsigned short __b)
696 {
697   return __a & __b;
698 }
699
700 static vector unsigned short __ATTRS_o_ai
701 vec_and(vector bool short __a, vector unsigned short __b)
702 {
703   return (vector unsigned short)__a & __b;
704 }
705
706 static vector unsigned short __ATTRS_o_ai
707 vec_and(vector unsigned short __a, vector bool short __b)
708 {
709   return __a & (vector unsigned short)__b;
710 }
711
712 static vector bool short __ATTRS_o_ai
713 vec_and(vector bool short __a, vector bool short __b)
714 {
715   return __a & __b;
716 }
717
718 static vector int __ATTRS_o_ai
719 vec_and(vector int __a, vector int __b)
720 {
721   return __a & __b;
722 }
723
724 static vector int __ATTRS_o_ai
725 vec_and(vector bool int __a, vector int __b)
726 {
727   return (vector int)__a & __b;
728 }
729
730 static vector int __ATTRS_o_ai
731 vec_and(vector int __a, vector bool int __b)
732 {
733   return __a & (vector int)__b;
734 }
735
736 static vector unsigned int __ATTRS_o_ai
737 vec_and(vector unsigned int __a, vector unsigned int __b)
738 {
739   return __a & __b;
740 }
741
742 static vector unsigned int __ATTRS_o_ai
743 vec_and(vector bool int __a, vector unsigned int __b)
744 {
745   return (vector unsigned int)__a & __b;
746 }
747
748 static vector unsigned int __ATTRS_o_ai
749 vec_and(vector unsigned int __a, vector bool int __b)
750 {
751   return __a & (vector unsigned int)__b;
752 }
753
754 static vector bool int __ATTRS_o_ai
755 vec_and(vector bool int __a, vector bool int __b)
756 {
757   return __a & __b;
758 }
759
760 static vector float __ATTRS_o_ai
761 vec_and(vector float __a, vector float __b)
762 {
763   vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
764   return (vector float)__res;
765 }
766
767 static vector float __ATTRS_o_ai
768 vec_and(vector bool int __a, vector float __b)
769 {
770   vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
771   return (vector float)__res;
772 }
773
774 static vector float __ATTRS_o_ai
775 vec_and(vector float __a, vector bool int __b)
776 {
777   vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
778   return (vector float)__res;
779 }
780
781 /* vec_vand */
782
783 static vector signed char __ATTRS_o_ai
784 vec_vand(vector signed char __a, vector signed char __b)
785 {
786   return __a & __b;
787 }
788
789 static vector signed char __ATTRS_o_ai
790 vec_vand(vector bool char __a, vector signed char __b)
791 {
792   return (vector signed char)__a & __b;
793 }
794
795 static vector signed char __ATTRS_o_ai
796 vec_vand(vector signed char __a, vector bool char __b)
797 {
798   return __a & (vector signed char)__b;
799 }
800
801 static vector unsigned char __ATTRS_o_ai
802 vec_vand(vector unsigned char __a, vector unsigned char __b)
803 {
804   return __a & __b;
805 }
806
807 static vector unsigned char __ATTRS_o_ai
808 vec_vand(vector bool char __a, vector unsigned char __b)
809 {
810   return (vector unsigned char)__a & __b;
811 }
812
813 static vector unsigned char __ATTRS_o_ai
814 vec_vand(vector unsigned char __a, vector bool char __b)
815 {
816   return __a & (vector unsigned char)__b;
817 }
818
819 static vector bool char __ATTRS_o_ai
820 vec_vand(vector bool char __a, vector bool char __b)
821 {
822   return __a & __b;
823 }
824
825 static vector short __ATTRS_o_ai
826 vec_vand(vector short __a, vector short __b)
827 {
828   return __a & __b;
829 }
830
831 static vector short __ATTRS_o_ai
832 vec_vand(vector bool short __a, vector short __b)
833 {
834   return (vector short)__a & __b;
835 }
836
837 static vector short __ATTRS_o_ai
838 vec_vand(vector short __a, vector bool short __b)
839 {
840   return __a & (vector short)__b;
841 }
842
843 static vector unsigned short __ATTRS_o_ai
844 vec_vand(vector unsigned short __a, vector unsigned short __b)
845 {
846   return __a & __b;
847 }
848
849 static vector unsigned short __ATTRS_o_ai
850 vec_vand(vector bool short __a, vector unsigned short __b)
851 {
852   return (vector unsigned short)__a & __b;
853 }
854
855 static vector unsigned short __ATTRS_o_ai
856 vec_vand(vector unsigned short __a, vector bool short __b)
857 {
858   return __a & (vector unsigned short)__b;
859 }
860
861 static vector bool short __ATTRS_o_ai
862 vec_vand(vector bool short __a, vector bool short __b)
863 {
864   return __a & __b;
865 }
866
867 static vector int __ATTRS_o_ai
868 vec_vand(vector int __a, vector int __b)
869 {
870   return __a & __b;
871 }
872
873 static vector int __ATTRS_o_ai
874 vec_vand(vector bool int __a, vector int __b)
875 {
876   return (vector int)__a & __b;
877 }
878
879 static vector int __ATTRS_o_ai
880 vec_vand(vector int __a, vector bool int __b)
881 {
882   return __a & (vector int)__b;
883 }
884
885 static vector unsigned int __ATTRS_o_ai
886 vec_vand(vector unsigned int __a, vector unsigned int __b)
887 {
888   return __a & __b;
889 }
890
891 static vector unsigned int __ATTRS_o_ai
892 vec_vand(vector bool int __a, vector unsigned int __b)
893 {
894   return (vector unsigned int)__a & __b;
895 }
896
897 static vector unsigned int __ATTRS_o_ai
898 vec_vand(vector unsigned int __a, vector bool int __b)
899 {
900   return __a & (vector unsigned int)__b;
901 }
902
903 static vector bool int __ATTRS_o_ai
904 vec_vand(vector bool int __a, vector bool int __b)
905 {
906   return __a & __b;
907 }
908
909 static vector float __ATTRS_o_ai
910 vec_vand(vector float __a, vector float __b)
911 {
912   vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
913   return (vector float)__res;
914 }
915
916 static vector float __ATTRS_o_ai
917 vec_vand(vector bool int __a, vector float __b)
918 {
919   vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
920   return (vector float)__res;
921 }
922
923 static vector float __ATTRS_o_ai
924 vec_vand(vector float __a, vector bool int __b)
925 {
926   vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
927   return (vector float)__res;
928 }
929
930 /* vec_andc */
931
932 #define __builtin_altivec_vandc vec_andc
933
934 static vector signed char __ATTRS_o_ai
935 vec_andc(vector signed char __a, vector signed char __b)
936 {
937   return __a & ~__b;
938 }
939
940 static vector signed char __ATTRS_o_ai
941 vec_andc(vector bool char __a, vector signed char __b)
942 {
943   return (vector signed char)__a & ~__b;
944 }
945
946 static vector signed char __ATTRS_o_ai
947 vec_andc(vector signed char __a, vector bool char __b)
948 {
949   return __a & ~(vector signed char)__b;
950 }
951
952 static vector unsigned char __ATTRS_o_ai
953 vec_andc(vector unsigned char __a, vector unsigned char __b)
954 {
955   return __a & ~__b;
956 }
957
958 static vector unsigned char __ATTRS_o_ai
959 vec_andc(vector bool char __a, vector unsigned char __b)
960 {
961   return (vector unsigned char)__a & ~__b;
962 }
963
964 static vector unsigned char __ATTRS_o_ai
965 vec_andc(vector unsigned char __a, vector bool char __b)
966 {
967   return __a & ~(vector unsigned char)__b;
968 }
969
970 static vector bool char __ATTRS_o_ai
971 vec_andc(vector bool char __a, vector bool char __b)
972 {
973   return __a & ~__b;
974 }
975
976 static vector short __ATTRS_o_ai
977 vec_andc(vector short __a, vector short __b)
978 {
979   return __a & ~__b;
980 }
981
982 static vector short __ATTRS_o_ai
983 vec_andc(vector bool short __a, vector short __b)
984 {
985   return (vector short)__a & ~__b;
986 }
987
988 static vector short __ATTRS_o_ai
989 vec_andc(vector short __a, vector bool short __b)
990 {
991   return __a & ~(vector short)__b;
992 }
993
994 static vector unsigned short __ATTRS_o_ai
995 vec_andc(vector unsigned short __a, vector unsigned short __b)
996 {
997   return __a & ~__b;
998 }
999
1000 static vector unsigned short __ATTRS_o_ai
1001 vec_andc(vector bool short __a, vector unsigned short __b)
1002 {
1003   return (vector unsigned short)__a & ~__b;
1004 }
1005
1006 static vector unsigned short __ATTRS_o_ai
1007 vec_andc(vector unsigned short __a, vector bool short __b)
1008 {
1009   return __a & ~(vector unsigned short)__b;
1010 }
1011
1012 static vector bool short __ATTRS_o_ai
1013 vec_andc(vector bool short __a, vector bool short __b)
1014 {
1015   return __a & ~__b;
1016 }
1017
1018 static vector int __ATTRS_o_ai
1019 vec_andc(vector int __a, vector int __b)
1020 {
1021   return __a & ~__b;
1022 }
1023
1024 static vector int __ATTRS_o_ai
1025 vec_andc(vector bool int __a, vector int __b)
1026 {
1027   return (vector int)__a & ~__b;
1028 }
1029
1030 static vector int __ATTRS_o_ai
1031 vec_andc(vector int __a, vector bool int __b)
1032 {
1033   return __a & ~(vector int)__b;
1034 }
1035
1036 static vector unsigned int __ATTRS_o_ai
1037 vec_andc(vector unsigned int __a, vector unsigned int __b)
1038 {
1039   return __a & ~__b;
1040 }
1041
1042 static vector unsigned int __ATTRS_o_ai
1043 vec_andc(vector bool int __a, vector unsigned int __b)
1044 {
1045   return (vector unsigned int)__a & ~__b;
1046 }
1047
1048 static vector unsigned int __ATTRS_o_ai
1049 vec_andc(vector unsigned int __a, vector bool int __b)
1050 {
1051   return __a & ~(vector unsigned int)__b;
1052 }
1053
1054 static vector bool int __ATTRS_o_ai
1055 vec_andc(vector bool int __a, vector bool int __b)
1056 {
1057   return __a & ~__b;
1058 }
1059
1060 static vector float __ATTRS_o_ai
1061 vec_andc(vector float __a, vector float __b)
1062 {
1063   vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1064   return (vector float)__res;
1065 }
1066
1067 static vector float __ATTRS_o_ai
1068 vec_andc(vector bool int __a, vector float __b)
1069 {
1070   vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1071   return (vector float)__res;
1072 }
1073
1074 static vector float __ATTRS_o_ai
1075 vec_andc(vector float __a, vector bool int __b)
1076 {
1077   vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1078   return (vector float)__res;
1079 }
1080
1081 /* vec_vandc */
1082
1083 static vector signed char __ATTRS_o_ai
1084 vec_vandc(vector signed char __a, vector signed char __b)
1085 {
1086   return __a & ~__b;
1087 }
1088
1089 static vector signed char __ATTRS_o_ai
1090 vec_vandc(vector bool char __a, vector signed char __b)
1091 {
1092   return (vector signed char)__a & ~__b;
1093 }
1094
1095 static vector signed char __ATTRS_o_ai
1096 vec_vandc(vector signed char __a, vector bool char __b)
1097 {
1098   return __a & ~(vector signed char)__b;
1099 }
1100
1101 static vector unsigned char __ATTRS_o_ai
1102 vec_vandc(vector unsigned char __a, vector unsigned char __b)
1103 {
1104   return __a & ~__b;
1105 }
1106
1107 static vector unsigned char __ATTRS_o_ai
1108 vec_vandc(vector bool char __a, vector unsigned char __b)
1109 {
1110   return (vector unsigned char)__a & ~__b;
1111 }
1112
1113 static vector unsigned char __ATTRS_o_ai
1114 vec_vandc(vector unsigned char __a, vector bool char __b)
1115 {
1116   return __a & ~(vector unsigned char)__b;
1117 }
1118
1119 static vector bool char __ATTRS_o_ai
1120 vec_vandc(vector bool char __a, vector bool char __b)
1121 {
1122   return __a & ~__b;
1123 }
1124
1125 static vector short __ATTRS_o_ai
1126 vec_vandc(vector short __a, vector short __b)
1127 {
1128   return __a & ~__b;
1129 }
1130
1131 static vector short __ATTRS_o_ai
1132 vec_vandc(vector bool short __a, vector short __b)
1133 {
1134   return (vector short)__a & ~__b;
1135 }
1136
1137 static vector short __ATTRS_o_ai
1138 vec_vandc(vector short __a, vector bool short __b)
1139 {
1140   return __a & ~(vector short)__b;
1141 }
1142
1143 static vector unsigned short __ATTRS_o_ai
1144 vec_vandc(vector unsigned short __a, vector unsigned short __b)
1145 {
1146   return __a & ~__b;
1147 }
1148
1149 static vector unsigned short __ATTRS_o_ai
1150 vec_vandc(vector bool short __a, vector unsigned short __b)
1151 {
1152   return (vector unsigned short)__a & ~__b;
1153 }
1154
1155 static vector unsigned short __ATTRS_o_ai
1156 vec_vandc(vector unsigned short __a, vector bool short __b)
1157 {
1158   return __a & ~(vector unsigned short)__b;
1159 }
1160
1161 static vector bool short __ATTRS_o_ai
1162 vec_vandc(vector bool short __a, vector bool short __b)
1163 {
1164   return __a & ~__b;
1165 }
1166
1167 static vector int __ATTRS_o_ai
1168 vec_vandc(vector int __a, vector int __b)
1169 {
1170   return __a & ~__b;
1171 }
1172
1173 static vector int __ATTRS_o_ai
1174 vec_vandc(vector bool int __a, vector int __b)
1175 {
1176   return (vector int)__a & ~__b;
1177 }
1178
1179 static vector int __ATTRS_o_ai
1180 vec_vandc(vector int __a, vector bool int __b)
1181 {
1182   return __a & ~(vector int)__b;
1183 }
1184
1185 static vector unsigned int __ATTRS_o_ai
1186 vec_vandc(vector unsigned int __a, vector unsigned int __b)
1187 {
1188   return __a & ~__b;
1189 }
1190
1191 static vector unsigned int __ATTRS_o_ai
1192 vec_vandc(vector bool int __a, vector unsigned int __b)
1193 {
1194   return (vector unsigned int)__a & ~__b;
1195 }
1196
1197 static vector unsigned int __ATTRS_o_ai
1198 vec_vandc(vector unsigned int __a, vector bool int __b)
1199 {
1200   return __a & ~(vector unsigned int)__b;
1201 }
1202
1203 static vector bool int __ATTRS_o_ai
1204 vec_vandc(vector bool int __a, vector bool int __b)
1205 {
1206   return __a & ~__b;
1207 }
1208
1209 static vector float __ATTRS_o_ai
1210 vec_vandc(vector float __a, vector float __b)
1211 {
1212   vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1213   return (vector float)__res;
1214 }
1215
1216 static vector float __ATTRS_o_ai
1217 vec_vandc(vector bool int __a, vector float __b)
1218 {
1219   vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1220   return (vector float)__res;
1221 }
1222
1223 static vector float __ATTRS_o_ai
1224 vec_vandc(vector float __a, vector bool int __b)
1225 {
1226   vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1227   return (vector float)__res;
1228 }
1229
1230 /* vec_avg */
1231
1232 static vector signed char __ATTRS_o_ai
1233 vec_avg(vector signed char __a, vector signed char __b)
1234 {
1235   return __builtin_altivec_vavgsb(__a, __b);
1236 }
1237
1238 static vector unsigned char __ATTRS_o_ai
1239 vec_avg(vector unsigned char __a, vector unsigned char __b)
1240 {
1241   return __builtin_altivec_vavgub(__a, __b);
1242 }
1243
1244 static vector short __ATTRS_o_ai
1245 vec_avg(vector short __a, vector short __b)
1246 {
1247   return __builtin_altivec_vavgsh(__a, __b);
1248 }
1249
1250 static vector unsigned short __ATTRS_o_ai
1251 vec_avg(vector unsigned short __a, vector unsigned short __b)
1252 {
1253   return __builtin_altivec_vavguh(__a, __b);
1254 }
1255
1256 static vector int __ATTRS_o_ai
1257 vec_avg(vector int __a, vector int __b)
1258 {
1259   return __builtin_altivec_vavgsw(__a, __b);
1260 }
1261
1262 static vector unsigned int __ATTRS_o_ai
1263 vec_avg(vector unsigned int __a, vector unsigned int __b)
1264 {
1265   return __builtin_altivec_vavguw(__a, __b);
1266 }
1267
1268 /* vec_vavgsb */
1269
1270 static vector signed char __attribute__((__always_inline__))
1271 vec_vavgsb(vector signed char __a, vector signed char __b)
1272 {
1273   return __builtin_altivec_vavgsb(__a, __b);
1274 }
1275
1276 /* vec_vavgub */
1277
1278 static vector unsigned char __attribute__((__always_inline__))
1279 vec_vavgub(vector unsigned char __a, vector unsigned char __b)
1280 {
1281   return __builtin_altivec_vavgub(__a, __b);
1282 }
1283
1284 /* vec_vavgsh */
1285
1286 static vector short __attribute__((__always_inline__))
1287 vec_vavgsh(vector short __a, vector short __b)
1288 {
1289   return __builtin_altivec_vavgsh(__a, __b);
1290 }
1291
1292 /* vec_vavguh */
1293
1294 static vector unsigned short __attribute__((__always_inline__))
1295 vec_vavguh(vector unsigned short __a, vector unsigned short __b)
1296 {
1297   return __builtin_altivec_vavguh(__a, __b);
1298 }
1299
1300 /* vec_vavgsw */
1301
1302 static vector int __attribute__((__always_inline__))
1303 vec_vavgsw(vector int __a, vector int __b)
1304 {
1305   return __builtin_altivec_vavgsw(__a, __b);
1306 }
1307
1308 /* vec_vavguw */
1309
1310 static vector unsigned int __attribute__((__always_inline__))
1311 vec_vavguw(vector unsigned int __a, vector unsigned int __b)
1312 {
1313   return __builtin_altivec_vavguw(__a, __b);
1314 }
1315
1316 /* vec_ceil */
1317
1318 static vector float __attribute__((__always_inline__))
1319 vec_ceil(vector float __a)
1320 {
1321   return __builtin_altivec_vrfip(__a);
1322 }
1323
1324 /* vec_vrfip */
1325
1326 static vector float __attribute__((__always_inline__))
1327 vec_vrfip(vector float __a)
1328 {
1329   return __builtin_altivec_vrfip(__a);
1330 }
1331
1332 /* vec_cmpb */
1333
1334 static vector int __attribute__((__always_inline__))
1335 vec_cmpb(vector float __a, vector float __b)
1336 {
1337   return __builtin_altivec_vcmpbfp(__a, __b);
1338 }
1339
1340 /* vec_vcmpbfp */
1341
1342 static vector int __attribute__((__always_inline__))
1343 vec_vcmpbfp(vector float __a, vector float __b)
1344 {
1345   return __builtin_altivec_vcmpbfp(__a, __b);
1346 }
1347
1348 /* vec_cmpeq */
1349
1350 static vector bool char __ATTRS_o_ai
1351 vec_cmpeq(vector signed char __a, vector signed char __b)
1352 {
1353   return (vector bool char)
1354     __builtin_altivec_vcmpequb((vector char)__a, (vector char)__b);
1355 }
1356
1357 static vector bool char __ATTRS_o_ai
1358 vec_cmpeq(vector unsigned char __a, vector unsigned char __b)
1359 {
1360   return (vector bool char)
1361     __builtin_altivec_vcmpequb((vector char)__a, (vector char)__b);
1362 }
1363
1364 static vector bool short __ATTRS_o_ai
1365 vec_cmpeq(vector short __a, vector short __b)
1366 {
1367   return (vector bool short)__builtin_altivec_vcmpequh(__a, __b);
1368 }
1369
1370 static vector bool short __ATTRS_o_ai
1371 vec_cmpeq(vector unsigned short __a, vector unsigned short __b)
1372 {
1373   return (vector bool short)
1374     __builtin_altivec_vcmpequh((vector short)__a, (vector short)__b);
1375 }
1376
1377 static vector bool int __ATTRS_o_ai
1378 vec_cmpeq(vector int __a, vector int __b)
1379 {
1380   return (vector bool int)__builtin_altivec_vcmpequw(__a, __b);
1381 }
1382
1383 static vector bool int __ATTRS_o_ai
1384 vec_cmpeq(vector unsigned int __a, vector unsigned int __b)
1385 {
1386   return (vector bool int)
1387     __builtin_altivec_vcmpequw((vector int)__a, (vector int)__b);
1388 }
1389
1390 static vector bool int __ATTRS_o_ai
1391 vec_cmpeq(vector float __a, vector float __b)
1392 {
1393   return (vector bool int)__builtin_altivec_vcmpeqfp(__a, __b);
1394 }
1395
1396 /* vec_cmpge */
1397
1398 static vector bool int __attribute__((__always_inline__))
1399 vec_cmpge(vector float __a, vector float __b)
1400 {
1401   return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1402 }
1403
1404 /* vec_vcmpgefp */
1405
1406 static vector bool int __attribute__((__always_inline__))
1407 vec_vcmpgefp(vector float __a, vector float __b)
1408 {
1409   return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1410 }
1411
1412 /* vec_cmpgt */
1413
1414 static vector bool char __ATTRS_o_ai
1415 vec_cmpgt(vector signed char __a, vector signed char __b)
1416 {
1417   return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1418 }
1419
1420 static vector bool char __ATTRS_o_ai
1421 vec_cmpgt(vector unsigned char __a, vector unsigned char __b)
1422 {
1423   return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1424 }
1425
1426 static vector bool short __ATTRS_o_ai
1427 vec_cmpgt(vector short __a, vector short __b)
1428 {
1429   return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1430 }
1431
1432 static vector bool short __ATTRS_o_ai
1433 vec_cmpgt(vector unsigned short __a, vector unsigned short __b)
1434 {
1435   return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1436 }
1437
1438 static vector bool int __ATTRS_o_ai
1439 vec_cmpgt(vector int __a, vector int __b)
1440 {
1441   return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1442 }
1443
1444 static vector bool int __ATTRS_o_ai
1445 vec_cmpgt(vector unsigned int __a, vector unsigned int __b)
1446 {
1447   return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1448 }
1449
1450 static vector bool int __ATTRS_o_ai
1451 vec_cmpgt(vector float __a, vector float __b)
1452 {
1453   return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1454 }
1455
1456 /* vec_vcmpgtsb */
1457
1458 static vector bool char __attribute__((__always_inline__))
1459 vec_vcmpgtsb(vector signed char __a, vector signed char __b)
1460 {
1461   return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1462 }
1463
1464 /* vec_vcmpgtub */
1465
1466 static vector bool char __attribute__((__always_inline__))
1467 vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b)
1468 {
1469   return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1470 }
1471
1472 /* vec_vcmpgtsh */
1473
1474 static vector bool short __attribute__((__always_inline__))
1475 vec_vcmpgtsh(vector short __a, vector short __b)
1476 {
1477   return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1478 }
1479
1480 /* vec_vcmpgtuh */
1481
1482 static vector bool short __attribute__((__always_inline__))
1483 vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b)
1484 {
1485   return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1486 }
1487
1488 /* vec_vcmpgtsw */
1489
1490 static vector bool int __attribute__((__always_inline__))
1491 vec_vcmpgtsw(vector int __a, vector int __b)
1492 {
1493   return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1494 }
1495
1496 /* vec_vcmpgtuw */
1497
1498 static vector bool int __attribute__((__always_inline__))
1499 vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b)
1500 {
1501   return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1502 }
1503
1504 /* vec_vcmpgtfp */
1505
1506 static vector bool int __attribute__((__always_inline__))
1507 vec_vcmpgtfp(vector float __a, vector float __b)
1508 {
1509   return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1510 }
1511
1512 /* vec_cmple */
1513
1514 static vector bool int __attribute__((__always_inline__))
1515 vec_cmple(vector float __a, vector float __b)
1516 {
1517   return (vector bool int)__builtin_altivec_vcmpgefp(__b, __a);
1518 }
1519
1520 /* vec_cmplt */
1521
1522 static vector bool char __ATTRS_o_ai
1523 vec_cmplt(vector signed char __a, vector signed char __b)
1524 {
1525   return (vector bool char)__builtin_altivec_vcmpgtsb(__b, __a);
1526 }
1527
1528 static vector bool char __ATTRS_o_ai
1529 vec_cmplt(vector unsigned char __a, vector unsigned char __b)
1530 {
1531   return (vector bool char)__builtin_altivec_vcmpgtub(__b, __a);
1532 }
1533
1534 static vector bool short __ATTRS_o_ai
1535 vec_cmplt(vector short __a, vector short __b)
1536 {
1537   return (vector bool short)__builtin_altivec_vcmpgtsh(__b, __a);
1538 }
1539
1540 static vector bool short __ATTRS_o_ai
1541 vec_cmplt(vector unsigned short __a, vector unsigned short __b)
1542 {
1543   return (vector bool short)__builtin_altivec_vcmpgtuh(__b, __a);
1544 }
1545
1546 static vector bool int __ATTRS_o_ai
1547 vec_cmplt(vector int __a, vector int __b)
1548 {
1549   return (vector bool int)__builtin_altivec_vcmpgtsw(__b, __a);
1550 }
1551
1552 static vector bool int __ATTRS_o_ai
1553 vec_cmplt(vector unsigned int __a, vector unsigned int __b)
1554 {
1555   return (vector bool int)__builtin_altivec_vcmpgtuw(__b, __a);
1556 }
1557
1558 static vector bool int __ATTRS_o_ai
1559 vec_cmplt(vector float __a, vector float __b)
1560 {
1561   return (vector bool int)__builtin_altivec_vcmpgtfp(__b, __a);
1562 }
1563
1564 /* vec_ctf */
1565
1566 static vector float __ATTRS_o_ai
1567 vec_ctf(vector int __a, int __b)
1568 {
1569   return __builtin_altivec_vcfsx(__a, __b);
1570 }
1571
1572 static vector float __ATTRS_o_ai
1573 vec_ctf(vector unsigned int __a, int __b)
1574 {
1575   return __builtin_altivec_vcfux((vector int)__a, __b);
1576 }
1577
1578 /* vec_vcfsx */
1579
1580 static vector float __attribute__((__always_inline__))
1581 vec_vcfsx(vector int __a, int __b)
1582 {
1583   return __builtin_altivec_vcfsx(__a, __b);
1584 }
1585
1586 /* vec_vcfux */
1587
1588 static vector float __attribute__((__always_inline__))
1589 vec_vcfux(vector unsigned int __a, int __b)
1590 {
1591   return __builtin_altivec_vcfux((vector int)__a, __b);
1592 }
1593
1594 /* vec_cts */
1595
1596 static vector int __attribute__((__always_inline__))
1597 vec_cts(vector float __a, int __b)
1598 {
1599   return __builtin_altivec_vctsxs(__a, __b);
1600 }
1601
1602 /* vec_vctsxs */
1603
1604 static vector int __attribute__((__always_inline__))
1605 vec_vctsxs(vector float __a, int __b)
1606 {
1607   return __builtin_altivec_vctsxs(__a, __b);
1608 }
1609
1610 /* vec_ctu */
1611
1612 static vector unsigned int __attribute__((__always_inline__))
1613 vec_ctu(vector float __a, int __b)
1614 {
1615   return __builtin_altivec_vctuxs(__a, __b);
1616 }
1617
1618 /* vec_vctuxs */
1619
1620 static vector unsigned int __attribute__((__always_inline__))
1621 vec_vctuxs(vector float __a, int __b)
1622 {
1623   return __builtin_altivec_vctuxs(__a, __b);
1624 }
1625
1626 /* vec_dss */
1627
1628 static void __attribute__((__always_inline__))
1629 vec_dss(int __a)
1630 {
1631   __builtin_altivec_dss(__a);
1632 }
1633
1634 /* vec_dssall */
1635
1636 static void __attribute__((__always_inline__))
1637 vec_dssall(void)
1638 {
1639   __builtin_altivec_dssall();
1640 }
1641
1642 /* vec_dst */
1643
1644 static void __attribute__((__always_inline__))
1645 vec_dst(const void *__a, int __b, int __c)
1646 {
1647   __builtin_altivec_dst(__a, __b, __c);
1648 }
1649
1650 /* vec_dstst */
1651
1652 static void __attribute__((__always_inline__))
1653 vec_dstst(const void *__a, int __b, int __c)
1654 {
1655   __builtin_altivec_dstst(__a, __b, __c);
1656 }
1657
1658 /* vec_dststt */
1659
1660 static void __attribute__((__always_inline__))
1661 vec_dststt(const void *__a, int __b, int __c)
1662 {
1663   __builtin_altivec_dststt(__a, __b, __c);
1664 }
1665
1666 /* vec_dstt */
1667
1668 static void __attribute__((__always_inline__))
1669 vec_dstt(const void *__a, int __b, int __c)
1670 {
1671   __builtin_altivec_dstt(__a, __b, __c);
1672 }
1673
1674 /* vec_expte */
1675
1676 static vector float __attribute__((__always_inline__))
1677 vec_expte(vector float __a)
1678 {
1679   return __builtin_altivec_vexptefp(__a);
1680 }
1681
1682 /* vec_vexptefp */
1683
1684 static vector float __attribute__((__always_inline__))
1685 vec_vexptefp(vector float __a)
1686 {
1687   return __builtin_altivec_vexptefp(__a);
1688 }
1689
1690 /* vec_floor */
1691
1692 static vector float __attribute__((__always_inline__))
1693 vec_floor(vector float __a)
1694 {
1695   return __builtin_altivec_vrfim(__a);
1696 }
1697
1698 /* vec_vrfim */
1699
1700 static vector float __attribute__((__always_inline__))
1701 vec_vrfim(vector float __a)
1702 {
1703   return __builtin_altivec_vrfim(__a);
1704 }
1705
1706 /* vec_ld */
1707
1708 static vector signed char __ATTRS_o_ai
1709 vec_ld(int __a, const vector signed char *__b)
1710 {
1711   return (vector signed char)__builtin_altivec_lvx(__a, __b);
1712 }
1713
1714 static vector signed char __ATTRS_o_ai
1715 vec_ld(int __a, const signed char *__b)
1716 {
1717   return (vector signed char)__builtin_altivec_lvx(__a, __b);
1718 }
1719
1720 static vector unsigned char __ATTRS_o_ai
1721 vec_ld(int __a, const vector unsigned char *__b)
1722 {
1723   return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1724 }
1725
1726 static vector unsigned char __ATTRS_o_ai
1727 vec_ld(int __a, const unsigned char *__b)
1728 {
1729   return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1730 }
1731
1732 static vector bool char __ATTRS_o_ai
1733 vec_ld(int __a, const vector bool char *__b)
1734 {
1735   return (vector bool char)__builtin_altivec_lvx(__a, __b);
1736 }
1737
1738 static vector short __ATTRS_o_ai
1739 vec_ld(int __a, const vector short *__b)
1740 {
1741   return (vector short)__builtin_altivec_lvx(__a, __b);
1742 }
1743
1744 static vector short __ATTRS_o_ai
1745 vec_ld(int __a, const short *__b)
1746 {
1747   return (vector short)__builtin_altivec_lvx(__a, __b);
1748 }
1749
1750 static vector unsigned short __ATTRS_o_ai
1751 vec_ld(int __a, const vector unsigned short *__b)
1752 {
1753   return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1754 }
1755
1756 static vector unsigned short __ATTRS_o_ai
1757 vec_ld(int __a, const unsigned short *__b)
1758 {
1759   return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1760 }
1761
1762 static vector bool short __ATTRS_o_ai
1763 vec_ld(int __a, const vector bool short *__b)
1764 {
1765   return (vector bool short)__builtin_altivec_lvx(__a, __b);
1766 }
1767
1768 static vector pixel __ATTRS_o_ai
1769 vec_ld(int __a, const vector pixel *__b)
1770 {
1771   return (vector pixel)__builtin_altivec_lvx(__a, __b);
1772 }
1773
1774 static vector int __ATTRS_o_ai
1775 vec_ld(int __a, const vector int *__b)
1776 {
1777   return (vector int)__builtin_altivec_lvx(__a, __b);
1778 }
1779
1780 static vector int __ATTRS_o_ai
1781 vec_ld(int __a, const int *__b)
1782 {
1783   return (vector int)__builtin_altivec_lvx(__a, __b);
1784 }
1785
1786 static vector unsigned int __ATTRS_o_ai
1787 vec_ld(int __a, const vector unsigned int *__b)
1788 {
1789   return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1790 }
1791
1792 static vector unsigned int __ATTRS_o_ai
1793 vec_ld(int __a, const unsigned int *__b)
1794 {
1795   return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1796 }
1797
1798 static vector bool int __ATTRS_o_ai
1799 vec_ld(int __a, const vector bool int *__b)
1800 {
1801   return (vector bool int)__builtin_altivec_lvx(__a, __b);
1802 }
1803
1804 static vector float __ATTRS_o_ai
1805 vec_ld(int __a, const vector float *__b)
1806 {
1807   return (vector float)__builtin_altivec_lvx(__a, __b);
1808 }
1809
1810 static vector float __ATTRS_o_ai
1811 vec_ld(int __a, const float *__b)
1812 {
1813   return (vector float)__builtin_altivec_lvx(__a, __b);
1814 }
1815
1816 /* vec_lvx */
1817
1818 static vector signed char __ATTRS_o_ai
1819 vec_lvx(int __a, const vector signed char *__b)
1820 {
1821   return (vector signed char)__builtin_altivec_lvx(__a, __b);
1822 }
1823
1824 static vector signed char __ATTRS_o_ai
1825 vec_lvx(int __a, const signed char *__b)
1826 {
1827   return (vector signed char)__builtin_altivec_lvx(__a, __b);
1828 }
1829
1830 static vector unsigned char __ATTRS_o_ai
1831 vec_lvx(int __a, const vector unsigned char *__b)
1832 {
1833   return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1834 }
1835
1836 static vector unsigned char __ATTRS_o_ai
1837 vec_lvx(int __a, const unsigned char *__b)
1838 {
1839   return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1840 }
1841
1842 static vector bool char __ATTRS_o_ai
1843 vec_lvx(int __a, const vector bool char *__b)
1844 {
1845   return (vector bool char)__builtin_altivec_lvx(__a, __b);
1846 }
1847
1848 static vector short __ATTRS_o_ai
1849 vec_lvx(int __a, const vector short *__b)
1850 {
1851   return (vector short)__builtin_altivec_lvx(__a, __b);
1852 }
1853
1854 static vector short __ATTRS_o_ai
1855 vec_lvx(int __a, const short *__b)
1856 {
1857   return (vector short)__builtin_altivec_lvx(__a, __b);
1858 }
1859
1860 static vector unsigned short __ATTRS_o_ai
1861 vec_lvx(int __a, const vector unsigned short *__b)
1862 {
1863   return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1864 }
1865
1866 static vector unsigned short __ATTRS_o_ai
1867 vec_lvx(int __a, const unsigned short *__b)
1868 {
1869   return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1870 }
1871
1872 static vector bool short __ATTRS_o_ai
1873 vec_lvx(int __a, const vector bool short *__b)
1874 {
1875   return (vector bool short)__builtin_altivec_lvx(__a, __b);
1876 }
1877
1878 static vector pixel __ATTRS_o_ai
1879 vec_lvx(int __a, const vector pixel *__b)
1880 {
1881   return (vector pixel)__builtin_altivec_lvx(__a, __b);
1882 }
1883
1884 static vector int __ATTRS_o_ai
1885 vec_lvx(int __a, const vector int *__b)
1886 {
1887   return (vector int)__builtin_altivec_lvx(__a, __b);
1888 }
1889
1890 static vector int __ATTRS_o_ai
1891 vec_lvx(int __a, const int *__b)
1892 {
1893   return (vector int)__builtin_altivec_lvx(__a, __b);
1894 }
1895
1896 static vector unsigned int __ATTRS_o_ai
1897 vec_lvx(int __a, const vector unsigned int *__b)
1898 {
1899   return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1900 }
1901
1902 static vector unsigned int __ATTRS_o_ai
1903 vec_lvx(int __a, const unsigned int *__b)
1904 {
1905   return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1906 }
1907
1908 static vector bool int __ATTRS_o_ai
1909 vec_lvx(int __a, const vector bool int *__b)
1910 {
1911   return (vector bool int)__builtin_altivec_lvx(__a, __b);
1912 }
1913
1914 static vector float __ATTRS_o_ai
1915 vec_lvx(int __a, const vector float *__b)
1916 {
1917   return (vector float)__builtin_altivec_lvx(__a, __b);
1918 }
1919
1920 static vector float __ATTRS_o_ai
1921 vec_lvx(int __a, const float *__b)
1922 {
1923   return (vector float)__builtin_altivec_lvx(__a, __b);
1924 }
1925
1926 /* vec_lde */
1927
1928 static vector signed char __ATTRS_o_ai
1929 vec_lde(int __a, const signed char *__b)
1930 {
1931   return (vector signed char)__builtin_altivec_lvebx(__a, __b);
1932 }
1933
1934 static vector unsigned char __ATTRS_o_ai
1935 vec_lde(int __a, const unsigned char *__b)
1936 {
1937   return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
1938 }
1939
1940 static vector short __ATTRS_o_ai
1941 vec_lde(int __a, const short *__b)
1942 {
1943   return (vector short)__builtin_altivec_lvehx(__a, __b);
1944 }
1945
1946 static vector unsigned short __ATTRS_o_ai
1947 vec_lde(int __a, const unsigned short *__b)
1948 {
1949   return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
1950 }
1951
1952 static vector int __ATTRS_o_ai
1953 vec_lde(int __a, const int *__b)
1954 {
1955   return (vector int)__builtin_altivec_lvewx(__a, __b);
1956 }
1957
1958 static vector unsigned int __ATTRS_o_ai
1959 vec_lde(int __a, const unsigned int *__b)
1960 {
1961   return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
1962 }
1963
1964 static vector float __ATTRS_o_ai
1965 vec_lde(int __a, const float *__b)
1966 {
1967   return (vector float)__builtin_altivec_lvewx(__a, __b);
1968 }
1969
1970 /* vec_lvebx */
1971
1972 static vector signed char __ATTRS_o_ai
1973 vec_lvebx(int __a, const signed char *__b)
1974 {
1975   return (vector signed char)__builtin_altivec_lvebx(__a, __b);
1976 }
1977
1978 static vector unsigned char __ATTRS_o_ai
1979 vec_lvebx(int __a, const unsigned char *__b)
1980 {
1981   return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
1982 }
1983
1984 /* vec_lvehx */
1985
1986 static vector short __ATTRS_o_ai
1987 vec_lvehx(int __a, const short *__b)
1988 {
1989   return (vector short)__builtin_altivec_lvehx(__a, __b);
1990 }
1991
1992 static vector unsigned short __ATTRS_o_ai
1993 vec_lvehx(int __a, const unsigned short *__b)
1994 {
1995   return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
1996 }
1997
1998 /* vec_lvewx */
1999
2000 static vector int __ATTRS_o_ai
2001 vec_lvewx(int __a, const int *__b)
2002 {
2003   return (vector int)__builtin_altivec_lvewx(__a, __b);
2004 }
2005
2006 static vector unsigned int __ATTRS_o_ai
2007 vec_lvewx(int __a, const unsigned int *__b)
2008 {
2009   return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2010 }
2011
2012 static vector float __ATTRS_o_ai
2013 vec_lvewx(int __a, const float *__b)
2014 {
2015   return (vector float)__builtin_altivec_lvewx(__a, __b);
2016 }
2017
2018 /* vec_ldl */
2019
2020 static vector signed char __ATTRS_o_ai
2021 vec_ldl(int __a, const vector signed char *__b)
2022 {
2023   return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2024 }
2025
2026 static vector signed char __ATTRS_o_ai
2027 vec_ldl(int __a, const signed char *__b)
2028 {
2029   return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2030 }
2031
2032 static vector unsigned char __ATTRS_o_ai
2033 vec_ldl(int __a, const vector unsigned char *__b)
2034 {
2035   return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2036 }
2037
2038 static vector unsigned char __ATTRS_o_ai
2039 vec_ldl(int __a, const unsigned char *__b)
2040 {
2041   return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2042 }
2043
2044 static vector bool char __ATTRS_o_ai
2045 vec_ldl(int __a, const vector bool char *__b)
2046 {
2047   return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2048 }
2049
2050 static vector short __ATTRS_o_ai
2051 vec_ldl(int __a, const vector short *__b)
2052 {
2053   return (vector short)__builtin_altivec_lvxl(__a, __b);
2054 }
2055
2056 static vector short __ATTRS_o_ai
2057 vec_ldl(int __a, const short *__b)
2058 {
2059   return (vector short)__builtin_altivec_lvxl(__a, __b);
2060 }
2061
2062 static vector unsigned short __ATTRS_o_ai
2063 vec_ldl(int __a, const vector unsigned short *__b)
2064 {
2065   return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2066 }
2067
2068 static vector unsigned short __ATTRS_o_ai
2069 vec_ldl(int __a, const unsigned short *__b)
2070 {
2071   return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2072 }
2073
2074 static vector bool short __ATTRS_o_ai
2075 vec_ldl(int __a, const vector bool short *__b)
2076 {
2077   return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2078 }
2079
2080 static vector pixel __ATTRS_o_ai
2081 vec_ldl(int __a, const vector pixel *__b)
2082 {
2083   return (vector pixel short)__builtin_altivec_lvxl(__a, __b);
2084 }
2085
2086 static vector int __ATTRS_o_ai
2087 vec_ldl(int __a, const vector int *__b)
2088 {
2089   return (vector int)__builtin_altivec_lvxl(__a, __b);
2090 }
2091
2092 static vector int __ATTRS_o_ai
2093 vec_ldl(int __a, const int *__b)
2094 {
2095   return (vector int)__builtin_altivec_lvxl(__a, __b);
2096 }
2097
2098 static vector unsigned int __ATTRS_o_ai
2099 vec_ldl(int __a, const vector unsigned int *__b)
2100 {
2101   return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2102 }
2103
2104 static vector unsigned int __ATTRS_o_ai
2105 vec_ldl(int __a, const unsigned int *__b)
2106 {
2107   return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2108 }
2109
2110 static vector bool int __ATTRS_o_ai
2111 vec_ldl(int __a, const vector bool int *__b)
2112 {
2113   return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2114 }
2115
2116 static vector float __ATTRS_o_ai
2117 vec_ldl(int __a, const vector float *__b)
2118 {
2119   return (vector float)__builtin_altivec_lvxl(__a, __b);
2120 }
2121
2122 static vector float __ATTRS_o_ai
2123 vec_ldl(int __a, const float *__b)
2124 {
2125   return (vector float)__builtin_altivec_lvxl(__a, __b);
2126 }
2127
2128 /* vec_lvxl */
2129
2130 static vector signed char __ATTRS_o_ai
2131 vec_lvxl(int __a, const vector signed char *__b)
2132 {
2133   return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2134 }
2135
2136 static vector signed char __ATTRS_o_ai
2137 vec_lvxl(int __a, const signed char *__b)
2138 {
2139   return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2140 }
2141
2142 static vector unsigned char __ATTRS_o_ai
2143 vec_lvxl(int __a, const vector unsigned char *__b)
2144 {
2145   return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2146 }
2147
2148 static vector unsigned char __ATTRS_o_ai
2149 vec_lvxl(int __a, const unsigned char *__b)
2150 {
2151   return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2152 }
2153
2154 static vector bool char __ATTRS_o_ai
2155 vec_lvxl(int __a, const vector bool char *__b)
2156 {
2157   return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2158 }
2159
2160 static vector short __ATTRS_o_ai
2161 vec_lvxl(int __a, const vector short *__b)
2162 {
2163   return (vector short)__builtin_altivec_lvxl(__a, __b);
2164 }
2165
2166 static vector short __ATTRS_o_ai
2167 vec_lvxl(int __a, const short *__b)
2168 {
2169   return (vector short)__builtin_altivec_lvxl(__a, __b);
2170 }
2171
2172 static vector unsigned short __ATTRS_o_ai
2173 vec_lvxl(int __a, const vector unsigned short *__b)
2174 {
2175   return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2176 }
2177
2178 static vector unsigned short __ATTRS_o_ai
2179 vec_lvxl(int __a, const unsigned short *__b)
2180 {
2181   return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2182 }
2183
2184 static vector bool short __ATTRS_o_ai
2185 vec_lvxl(int __a, const vector bool short *__b)
2186 {
2187   return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2188 }
2189
2190 static vector pixel __ATTRS_o_ai
2191 vec_lvxl(int __a, const vector pixel *__b)
2192 {
2193   return (vector pixel)__builtin_altivec_lvxl(__a, __b);
2194 }
2195
2196 static vector int __ATTRS_o_ai
2197 vec_lvxl(int __a, const vector int *__b)
2198 {
2199   return (vector int)__builtin_altivec_lvxl(__a, __b);
2200 }
2201
2202 static vector int __ATTRS_o_ai
2203 vec_lvxl(int __a, const int *__b)
2204 {
2205   return (vector int)__builtin_altivec_lvxl(__a, __b);
2206 }
2207
2208 static vector unsigned int __ATTRS_o_ai
2209 vec_lvxl(int __a, const vector unsigned int *__b)
2210 {
2211   return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2212 }
2213
2214 static vector unsigned int __ATTRS_o_ai
2215 vec_lvxl(int __a, const unsigned int *__b)
2216 {
2217   return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2218 }
2219
2220 static vector bool int __ATTRS_o_ai
2221 vec_lvxl(int __a, const vector bool int *__b)
2222 {
2223   return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2224 }
2225
2226 static vector float __ATTRS_o_ai
2227 vec_lvxl(int __a, const vector float *__b)
2228 {
2229   return (vector float)__builtin_altivec_lvxl(__a, __b);
2230 }
2231
2232 static vector float __ATTRS_o_ai
2233 vec_lvxl(int __a, const float *__b)
2234 {
2235   return (vector float)__builtin_altivec_lvxl(__a, __b);
2236 }
2237
2238 /* vec_loge */
2239
2240 static vector float __attribute__((__always_inline__))
2241 vec_loge(vector float __a)
2242 {
2243   return __builtin_altivec_vlogefp(__a);
2244 }
2245
2246 /* vec_vlogefp */
2247
2248 static vector float __attribute__((__always_inline__))
2249 vec_vlogefp(vector float __a)
2250 {
2251   return __builtin_altivec_vlogefp(__a);
2252 }
2253
2254 /* vec_lvsl */
2255
2256 static vector unsigned char __ATTRS_o_ai
2257 vec_lvsl(int __a, const signed char *__b)
2258 {
2259   return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2260 }
2261
2262 static vector unsigned char __ATTRS_o_ai
2263 vec_lvsl(int __a, const unsigned char *__b)
2264 {
2265   return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2266 }
2267
2268 static vector unsigned char __ATTRS_o_ai
2269 vec_lvsl(int __a, const short *__b)
2270 {
2271   return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2272 }
2273
2274 static vector unsigned char __ATTRS_o_ai
2275 vec_lvsl(int __a, const unsigned short *__b)
2276 {
2277   return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2278 }
2279
2280 static vector unsigned char __ATTRS_o_ai
2281 vec_lvsl(int __a, const int *__b)
2282 {
2283   return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2284 }
2285
2286 static vector unsigned char __ATTRS_o_ai
2287 vec_lvsl(int __a, const unsigned int *__b)
2288 {
2289   return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2290 }
2291
2292 static vector unsigned char __ATTRS_o_ai
2293 vec_lvsl(int __a, const float *__b)
2294 {
2295   return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2296 }
2297
2298 /* vec_lvsr */
2299
2300 static vector unsigned char __ATTRS_o_ai
2301 vec_lvsr(int __a, const signed char *__b)
2302 {
2303   return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2304 }
2305
2306 static vector unsigned char __ATTRS_o_ai
2307 vec_lvsr(int __a, const unsigned char *__b)
2308 {
2309   return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2310 }
2311
2312 static vector unsigned char __ATTRS_o_ai
2313 vec_lvsr(int __a, const short *__b)
2314 {
2315   return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2316 }
2317
2318 static vector unsigned char __ATTRS_o_ai
2319 vec_lvsr(int __a, const unsigned short *__b)
2320 {
2321   return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2322 }
2323
2324 static vector unsigned char __ATTRS_o_ai
2325 vec_lvsr(int __a, const int *__b)
2326 {
2327   return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2328 }
2329
2330 static vector unsigned char __ATTRS_o_ai
2331 vec_lvsr(int __a, const unsigned int *__b)
2332 {
2333   return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2334 }
2335
2336 static vector unsigned char __ATTRS_o_ai
2337 vec_lvsr(int __a, const float *__b)
2338 {
2339   return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2340 }
2341
2342 /* vec_madd */
2343
2344 static vector float __attribute__((__always_inline__))
2345 vec_madd(vector float __a, vector float __b, vector float __c)
2346 {
2347   return __builtin_altivec_vmaddfp(__a, __b, __c);
2348 }
2349
2350 /* vec_vmaddfp */
2351
2352 static vector float __attribute__((__always_inline__))
2353 vec_vmaddfp(vector float __a, vector float __b, vector float __c)
2354 {
2355   return __builtin_altivec_vmaddfp(__a, __b, __c);
2356 }
2357
2358 /* vec_madds */
2359
2360 static vector signed short __attribute__((__always_inline__))
2361 vec_madds(vector signed short __a, vector signed short __b, vector signed short __c)
2362 {
2363   return __builtin_altivec_vmhaddshs(__a, __b, __c);
2364 }
2365
2366 /* vec_vmhaddshs */
2367 static vector signed short __attribute__((__always_inline__))
2368 vec_vmhaddshs(vector signed short __a,
2369               vector signed short __b,
2370               vector signed short __c)
2371 {
2372   return __builtin_altivec_vmhaddshs(__a, __b, __c);
2373 }
2374
2375 /* vec_max */
2376
2377 static vector signed char __ATTRS_o_ai
2378 vec_max(vector signed char __a, vector signed char __b)
2379 {
2380   return __builtin_altivec_vmaxsb(__a, __b);
2381 }
2382
2383 static vector signed char __ATTRS_o_ai
2384 vec_max(vector bool char __a, vector signed char __b)
2385 {
2386   return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2387 }
2388
2389 static vector signed char __ATTRS_o_ai
2390 vec_max(vector signed char __a, vector bool char __b)
2391 {
2392   return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2393 }
2394
2395 static vector unsigned char __ATTRS_o_ai
2396 vec_max(vector unsigned char __a, vector unsigned char __b)
2397 {
2398   return __builtin_altivec_vmaxub(__a, __b);
2399 }
2400
2401 static vector unsigned char __ATTRS_o_ai
2402 vec_max(vector bool char __a, vector unsigned char __b)
2403 {
2404   return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2405 }
2406
2407 static vector unsigned char __ATTRS_o_ai
2408 vec_max(vector unsigned char __a, vector bool char __b)
2409 {
2410   return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2411 }
2412
2413 static vector short __ATTRS_o_ai
2414 vec_max(vector short __a, vector short __b)
2415 {
2416   return __builtin_altivec_vmaxsh(__a, __b);
2417 }
2418
2419 static vector short __ATTRS_o_ai
2420 vec_max(vector bool short __a, vector short __b)
2421 {
2422   return __builtin_altivec_vmaxsh((vector short)__a, __b);
2423 }
2424
2425 static vector short __ATTRS_o_ai
2426 vec_max(vector short __a, vector bool short __b)
2427 {
2428   return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2429 }
2430
2431 static vector unsigned short __ATTRS_o_ai
2432 vec_max(vector unsigned short __a, vector unsigned short __b)
2433 {
2434   return __builtin_altivec_vmaxuh(__a, __b);
2435 }
2436
2437 static vector unsigned short __ATTRS_o_ai
2438 vec_max(vector bool short __a, vector unsigned short __b)
2439 {
2440   return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2441 }
2442
2443 static vector unsigned short __ATTRS_o_ai
2444 vec_max(vector unsigned short __a, vector bool short __b)
2445 {
2446   return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2447 }
2448
2449 static vector int __ATTRS_o_ai
2450 vec_max(vector int __a, vector int __b)
2451 {
2452   return __builtin_altivec_vmaxsw(__a, __b);
2453 }
2454
2455 static vector int __ATTRS_o_ai
2456 vec_max(vector bool int __a, vector int __b)
2457 {
2458   return __builtin_altivec_vmaxsw((vector int)__a, __b);
2459 }
2460
2461 static vector int __ATTRS_o_ai
2462 vec_max(vector int __a, vector bool int __b)
2463 {
2464   return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2465 }
2466
2467 static vector unsigned int __ATTRS_o_ai
2468 vec_max(vector unsigned int __a, vector unsigned int __b)
2469 {
2470   return __builtin_altivec_vmaxuw(__a, __b);
2471 }
2472
2473 static vector unsigned int __ATTRS_o_ai
2474 vec_max(vector bool int __a, vector unsigned int __b)
2475 {
2476   return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2477 }
2478
2479 static vector unsigned int __ATTRS_o_ai
2480 vec_max(vector unsigned int __a, vector bool int __b)
2481 {
2482   return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2483 }
2484
2485 static vector float __ATTRS_o_ai
2486 vec_max(vector float __a, vector float __b)
2487 {
2488   return __builtin_altivec_vmaxfp(__a, __b);
2489 }
2490
2491 /* vec_vmaxsb */
2492
2493 static vector signed char __ATTRS_o_ai
2494 vec_vmaxsb(vector signed char __a, vector signed char __b)
2495 {
2496   return __builtin_altivec_vmaxsb(__a, __b);
2497 }
2498
2499 static vector signed char __ATTRS_o_ai
2500 vec_vmaxsb(vector bool char __a, vector signed char __b)
2501 {
2502   return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2503 }
2504
2505 static vector signed char __ATTRS_o_ai
2506 vec_vmaxsb(vector signed char __a, vector bool char __b)
2507 {
2508   return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2509 }
2510
2511 /* vec_vmaxub */
2512
2513 static vector unsigned char __ATTRS_o_ai
2514 vec_vmaxub(vector unsigned char __a, vector unsigned char __b)
2515 {
2516   return __builtin_altivec_vmaxub(__a, __b);
2517 }
2518
2519 static vector unsigned char __ATTRS_o_ai
2520 vec_vmaxub(vector bool char __a, vector unsigned char __b)
2521 {
2522   return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2523 }
2524
2525 static vector unsigned char __ATTRS_o_ai
2526 vec_vmaxub(vector unsigned char __a, vector bool char __b)
2527 {
2528   return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2529 }
2530
2531 /* vec_vmaxsh */
2532
2533 static vector short __ATTRS_o_ai
2534 vec_vmaxsh(vector short __a, vector short __b)
2535 {
2536   return __builtin_altivec_vmaxsh(__a, __b);
2537 }
2538
2539 static vector short __ATTRS_o_ai
2540 vec_vmaxsh(vector bool short __a, vector short __b)
2541 {
2542   return __builtin_altivec_vmaxsh((vector short)__a, __b);
2543 }
2544
2545 static vector short __ATTRS_o_ai
2546 vec_vmaxsh(vector short __a, vector bool short __b)
2547 {
2548   return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2549 }
2550
2551 /* vec_vmaxuh */
2552
2553 static vector unsigned short __ATTRS_o_ai
2554 vec_vmaxuh(vector unsigned short __a, vector unsigned short __b)
2555 {
2556   return __builtin_altivec_vmaxuh(__a, __b);
2557 }
2558
2559 static vector unsigned short __ATTRS_o_ai
2560 vec_vmaxuh(vector bool short __a, vector unsigned short __b)
2561 {
2562   return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2563 }
2564
2565 static vector unsigned short __ATTRS_o_ai
2566 vec_vmaxuh(vector unsigned short __a, vector bool short __b)
2567 {
2568   return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2569 }
2570
2571 /* vec_vmaxsw */
2572
2573 static vector int __ATTRS_o_ai
2574 vec_vmaxsw(vector int __a, vector int __b)
2575 {
2576   return __builtin_altivec_vmaxsw(__a, __b);
2577 }
2578
2579 static vector int __ATTRS_o_ai
2580 vec_vmaxsw(vector bool int __a, vector int __b)
2581 {
2582   return __builtin_altivec_vmaxsw((vector int)__a, __b);
2583 }
2584
2585 static vector int __ATTRS_o_ai
2586 vec_vmaxsw(vector int __a, vector bool int __b)
2587 {
2588   return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2589 }
2590
2591 /* vec_vmaxuw */
2592
2593 static vector unsigned int __ATTRS_o_ai
2594 vec_vmaxuw(vector unsigned int __a, vector unsigned int __b)
2595 {
2596   return __builtin_altivec_vmaxuw(__a, __b);
2597 }
2598
2599 static vector unsigned int __ATTRS_o_ai
2600 vec_vmaxuw(vector bool int __a, vector unsigned int __b)
2601 {
2602   return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2603 }
2604
2605 static vector unsigned int __ATTRS_o_ai
2606 vec_vmaxuw(vector unsigned int __a, vector bool int __b)
2607 {
2608   return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2609 }
2610
2611 /* vec_vmaxfp */
2612
2613 static vector float __attribute__((__always_inline__))
2614 vec_vmaxfp(vector float __a, vector float __b)
2615 {
2616   return __builtin_altivec_vmaxfp(__a, __b);
2617 }
2618
2619 /* vec_mergeh */
2620
2621 static vector signed char __ATTRS_o_ai
2622 vec_mergeh(vector signed char __a, vector signed char __b)
2623 {
2624   return vec_perm(__a, __b, (vector unsigned char)
2625     (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 
2626      0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2627 }
2628
2629 static vector unsigned char __ATTRS_o_ai
2630 vec_mergeh(vector unsigned char __a, vector unsigned char __b)
2631 {
2632   return vec_perm(__a, __b, (vector unsigned char)
2633     (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 
2634      0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2635 }
2636
2637 static vector bool char __ATTRS_o_ai
2638 vec_mergeh(vector bool char __a, vector bool char __b)
2639 {
2640   return vec_perm(__a, __b, (vector unsigned char)
2641     (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 
2642      0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2643 }
2644
2645 static vector short __ATTRS_o_ai
2646 vec_mergeh(vector short __a, vector short __b)
2647 {
2648   return vec_perm(__a, __b, (vector unsigned char)
2649     (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2650      0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2651 }
2652
2653 static vector unsigned short __ATTRS_o_ai
2654 vec_mergeh(vector unsigned short __a, vector unsigned short __b)
2655 {
2656   return vec_perm(__a, __b, (vector unsigned char)
2657     (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2658      0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2659 }
2660
2661 static vector bool short __ATTRS_o_ai
2662 vec_mergeh(vector bool short __a, vector bool short __b)
2663 {
2664   return vec_perm(__a, __b, (vector unsigned char)
2665     (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2666      0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2667 }
2668
2669 static vector pixel __ATTRS_o_ai
2670 vec_mergeh(vector pixel __a, vector pixel __b)
2671 {
2672   return vec_perm(__a, __b, (vector unsigned char)
2673     (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2674      0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2675 }
2676
2677 static vector int __ATTRS_o_ai
2678 vec_mergeh(vector int __a, vector int __b)
2679 {
2680   return vec_perm(__a, __b, (vector unsigned char)
2681     (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2682      0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2683 }
2684
2685 static vector unsigned int __ATTRS_o_ai
2686 vec_mergeh(vector unsigned int __a, vector unsigned int __b)
2687 {
2688   return vec_perm(__a, __b, (vector unsigned char)
2689     (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2690      0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2691 }
2692
2693 static vector bool int __ATTRS_o_ai
2694 vec_mergeh(vector bool int __a, vector bool int __b)
2695 {
2696   return vec_perm(__a, __b, (vector unsigned char)
2697     (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2698      0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2699 }
2700
2701 static vector float __ATTRS_o_ai
2702 vec_mergeh(vector float __a, vector float __b)
2703 {
2704   return vec_perm(__a, __b, (vector unsigned char)
2705     (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2706      0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2707 }
2708
2709 /* vec_vmrghb */
2710
2711 #define __builtin_altivec_vmrghb vec_vmrghb
2712
2713 static vector signed char __ATTRS_o_ai
2714 vec_vmrghb(vector signed char __a, vector signed char __b)
2715 {
2716   return vec_perm(__a, __b, (vector unsigned char)
2717     (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 
2718      0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2719 }
2720
2721 static vector unsigned char __ATTRS_o_ai
2722 vec_vmrghb(vector unsigned char __a, vector unsigned char __b)
2723 {
2724   return vec_perm(__a, __b, (vector unsigned char)
2725     (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 
2726      0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2727 }
2728
2729 static vector bool char __ATTRS_o_ai
2730 vec_vmrghb(vector bool char __a, vector bool char __b)
2731 {
2732   return vec_perm(__a, __b, (vector unsigned char)
2733     (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 
2734      0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2735 }
2736
2737 /* vec_vmrghh */
2738
2739 #define __builtin_altivec_vmrghh vec_vmrghh
2740
2741 static vector short __ATTRS_o_ai
2742 vec_vmrghh(vector short __a, vector short __b)
2743 {
2744   return vec_perm(__a, __b, (vector unsigned char)
2745     (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2746      0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2747 }
2748
2749 static vector unsigned short __ATTRS_o_ai
2750 vec_vmrghh(vector unsigned short __a, vector unsigned short __b)
2751 {
2752   return vec_perm(__a, __b, (vector unsigned char)
2753     (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2754      0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2755 }
2756
2757 static vector bool short __ATTRS_o_ai
2758 vec_vmrghh(vector bool short __a, vector bool short __b)
2759 {
2760   return vec_perm(__a, __b, (vector unsigned char)
2761     (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2762      0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2763 }
2764
2765 static vector pixel __ATTRS_o_ai
2766 vec_vmrghh(vector pixel __a, vector pixel __b)
2767 {
2768   return vec_perm(__a, __b, (vector unsigned char)
2769     (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2770      0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2771 }
2772
2773 /* vec_vmrghw */
2774
2775 #define __builtin_altivec_vmrghw vec_vmrghw
2776
2777 static vector int __ATTRS_o_ai
2778 vec_vmrghw(vector int __a, vector int __b)
2779 {
2780   return vec_perm(__a, __b, (vector unsigned char)
2781     (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2782      0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2783 }
2784
2785 static vector unsigned int __ATTRS_o_ai
2786 vec_vmrghw(vector unsigned int __a, vector unsigned int __b)
2787 {
2788   return vec_perm(__a, __b, (vector unsigned char)
2789     (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2790      0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2791 }
2792
2793 static vector bool int __ATTRS_o_ai
2794 vec_vmrghw(vector bool int __a, vector bool int __b)
2795 {
2796   return vec_perm(__a, __b, (vector unsigned char)
2797     (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2798      0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2799 }
2800
2801 static vector float __ATTRS_o_ai
2802 vec_vmrghw(vector float __a, vector float __b)
2803 {
2804   return vec_perm(__a, __b, (vector unsigned char)
2805     (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2806      0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2807 }
2808
2809 /* vec_mergel */
2810
2811 static vector signed char __ATTRS_o_ai
2812 vec_mergel(vector signed char __a, vector signed char __b)
2813 {
2814   return vec_perm(__a, __b, (vector unsigned char)
2815     (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 
2816      0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
2817 }
2818
2819 static vector unsigned char __ATTRS_o_ai
2820 vec_mergel(vector unsigned char __a, vector unsigned char __b)
2821 {
2822   return vec_perm(__a, __b, (vector unsigned char)
2823     (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 
2824      0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
2825 }
2826
2827 static vector bool char __ATTRS_o_ai
2828 vec_mergel(vector bool char __a, vector bool char __b)
2829 {
2830   return vec_perm(__a, __b, (vector unsigned char)
2831     (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 
2832      0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
2833 }
2834
2835 static vector short __ATTRS_o_ai
2836 vec_mergel(vector short __a, vector short __b)
2837 {
2838   return vec_perm(__a, __b, (vector unsigned char)
2839     (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
2840      0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
2841 }
2842
2843 static vector unsigned short __ATTRS_o_ai
2844 vec_mergel(vector unsigned short __a, vector unsigned short __b)
2845 {
2846   return vec_perm(__a, __b, (vector unsigned char)
2847     (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
2848      0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
2849 }
2850
2851 static vector bool short __ATTRS_o_ai
2852 vec_mergel(vector bool short __a, vector bool short __b)
2853 {
2854   return vec_perm(__a, __b, (vector unsigned char)
2855     (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
2856      0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
2857 }
2858
2859 static vector pixel __ATTRS_o_ai
2860 vec_mergel(vector pixel __a, vector pixel __b)
2861 {
2862   return vec_perm(__a, __b, (vector unsigned char)
2863     (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
2864      0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
2865 }
2866
2867 static vector int __ATTRS_o_ai
2868 vec_mergel(vector int __a, vector int __b)
2869 {
2870   return vec_perm(__a, __b, (vector unsigned char)
2871     (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
2872      0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
2873 }
2874
2875 static vector unsigned int __ATTRS_o_ai
2876 vec_mergel(vector unsigned int __a, vector unsigned int __b)
2877 {
2878   return vec_perm(__a, __b, (vector unsigned char)
2879     (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
2880      0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
2881 }
2882
2883 static vector bool int __ATTRS_o_ai
2884 vec_mergel(vector bool int __a, vector bool int __b)
2885 {
2886   return vec_perm(__a, __b, (vector unsigned char)
2887     (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
2888      0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
2889 }
2890
2891 static vector float __ATTRS_o_ai
2892 vec_mergel(vector float __a, vector float __b)
2893 {
2894   return vec_perm(__a, __b, (vector unsigned char)
2895     (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
2896      0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
2897 }
2898
2899 /* vec_vmrglb */
2900
2901 #define __builtin_altivec_vmrglb vec_vmrglb
2902
2903 static vector signed char __ATTRS_o_ai
2904 vec_vmrglb(vector signed char __a, vector signed char __b)
2905 {
2906   return vec_perm(__a, __b, (vector unsigned char)
2907     (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 
2908      0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
2909 }
2910
2911 static vector unsigned char __ATTRS_o_ai
2912 vec_vmrglb(vector unsigned char __a, vector unsigned char __b)
2913 {
2914   return vec_perm(__a, __b, (vector unsigned char)
2915     (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 
2916      0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
2917 }
2918
2919 static vector bool char __ATTRS_o_ai
2920 vec_vmrglb(vector bool char __a, vector bool char __b)
2921 {
2922   return vec_perm(__a, __b, (vector unsigned char)
2923     (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B, 
2924      0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
2925 }
2926
2927 /* vec_vmrglh */
2928
2929 #define __builtin_altivec_vmrglh vec_vmrglh
2930
2931 static vector short __ATTRS_o_ai
2932 vec_vmrglh(vector short __a, vector short __b)
2933 {
2934   return vec_perm(__a, __b, (vector unsigned char)
2935     (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
2936      0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
2937 }
2938
2939 static vector unsigned short __ATTRS_o_ai
2940 vec_vmrglh(vector unsigned short __a, vector unsigned short __b)
2941 {
2942   return vec_perm(__a, __b, (vector unsigned char)
2943     (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
2944      0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
2945 }
2946
2947 static vector bool short __ATTRS_o_ai
2948 vec_vmrglh(vector bool short __a, vector bool short __b)
2949 {
2950   return vec_perm(__a, __b, (vector unsigned char)
2951     (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
2952      0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
2953 }
2954
2955 static vector pixel __ATTRS_o_ai
2956 vec_vmrglh(vector pixel __a, vector pixel __b)
2957 {
2958   return vec_perm(__a, __b, (vector unsigned char)
2959     (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
2960      0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
2961 }
2962
2963 /* vec_vmrglw */
2964
2965 #define __builtin_altivec_vmrglw vec_vmrglw
2966
2967 static vector int __ATTRS_o_ai
2968 vec_vmrglw(vector int __a, vector int __b)
2969 {
2970   return vec_perm(__a, __b, (vector unsigned char)
2971     (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
2972      0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
2973 }
2974
2975 static vector unsigned int __ATTRS_o_ai
2976 vec_vmrglw(vector unsigned int __a, vector unsigned int __b)
2977 {
2978   return vec_perm(__a, __b, (vector unsigned char)
2979     (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
2980      0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
2981 }
2982
2983 static vector bool int __ATTRS_o_ai
2984 vec_vmrglw(vector bool int __a, vector bool int __b)
2985 {
2986   return vec_perm(__a, __b, (vector unsigned char)
2987     (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
2988      0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
2989 }
2990
2991 static vector float __ATTRS_o_ai
2992 vec_vmrglw(vector float __a, vector float __b)
2993 {
2994   return vec_perm(__a, __b, (vector unsigned char)
2995     (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
2996      0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
2997 }
2998
2999 /* vec_mfvscr */
3000
3001 static vector unsigned short __attribute__((__always_inline__))
3002 vec_mfvscr(void)
3003 {
3004   return __builtin_altivec_mfvscr();
3005 }
3006
3007 /* vec_min */
3008
3009 static vector signed char __ATTRS_o_ai
3010 vec_min(vector signed char __a, vector signed char __b)
3011 {
3012   return __builtin_altivec_vminsb(__a, __b);
3013 }
3014
3015 static vector signed char __ATTRS_o_ai
3016 vec_min(vector bool char __a, vector signed char __b)
3017 {
3018   return __builtin_altivec_vminsb((vector signed char)__a, __b);
3019 }
3020
3021 static vector signed char __ATTRS_o_ai
3022 vec_min(vector signed char __a, vector bool char __b)
3023 {
3024   return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3025 }
3026
3027 static vector unsigned char __ATTRS_o_ai
3028 vec_min(vector unsigned char __a, vector unsigned char __b)
3029 {
3030   return __builtin_altivec_vminub(__a, __b);
3031 }
3032
3033 static vector unsigned char __ATTRS_o_ai
3034 vec_min(vector bool char __a, vector unsigned char __b)
3035 {
3036   return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3037 }
3038
3039 static vector unsigned char __ATTRS_o_ai
3040 vec_min(vector unsigned char __a, vector bool char __b)
3041 {
3042   return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3043 }
3044
3045 static vector short __ATTRS_o_ai
3046 vec_min(vector short __a, vector short __b)
3047 {
3048   return __builtin_altivec_vminsh(__a, __b);
3049 }
3050
3051 static vector short __ATTRS_o_ai
3052 vec_min(vector bool short __a, vector short __b)
3053 {
3054   return __builtin_altivec_vminsh((vector short)__a, __b);
3055 }
3056
3057 static vector short __ATTRS_o_ai
3058 vec_min(vector short __a, vector bool short __b)
3059 {
3060   return __builtin_altivec_vminsh(__a, (vector short)__b);
3061 }
3062
3063 static vector unsigned short __ATTRS_o_ai
3064 vec_min(vector unsigned short __a, vector unsigned short __b)
3065 {
3066   return __builtin_altivec_vminuh(__a, __b);
3067 }
3068
3069 static vector unsigned short __ATTRS_o_ai
3070 vec_min(vector bool short __a, vector unsigned short __b)
3071 {
3072   return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3073 }
3074
3075 static vector unsigned short __ATTRS_o_ai
3076 vec_min(vector unsigned short __a, vector bool short __b)
3077 {
3078   return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3079 }
3080
3081 static vector int __ATTRS_o_ai
3082 vec_min(vector int __a, vector int __b)
3083 {
3084   return __builtin_altivec_vminsw(__a, __b);
3085 }
3086
3087 static vector int __ATTRS_o_ai
3088 vec_min(vector bool int __a, vector int __b)
3089 {
3090   return __builtin_altivec_vminsw((vector int)__a, __b);
3091 }
3092
3093 static vector int __ATTRS_o_ai
3094 vec_min(vector int __a, vector bool int __b)
3095 {
3096   return __builtin_altivec_vminsw(__a, (vector int)__b);
3097 }
3098
3099 static vector unsigned int __ATTRS_o_ai
3100 vec_min(vector unsigned int __a, vector unsigned int __b)
3101 {
3102   return __builtin_altivec_vminuw(__a, __b);
3103 }
3104
3105 static vector unsigned int __ATTRS_o_ai
3106 vec_min(vector bool int __a, vector unsigned int __b)
3107 {
3108   return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3109 }
3110
3111 static vector unsigned int __ATTRS_o_ai
3112 vec_min(vector unsigned int __a, vector bool int __b)
3113 {
3114   return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3115 }
3116
3117 static vector float __ATTRS_o_ai
3118 vec_min(vector float __a, vector float __b)
3119 {
3120   return __builtin_altivec_vminfp(__a, __b);
3121 }
3122
3123 /* vec_vminsb */
3124
3125 static vector signed char __ATTRS_o_ai
3126 vec_vminsb(vector signed char __a, vector signed char __b)
3127 {
3128   return __builtin_altivec_vminsb(__a, __b);
3129 }
3130
3131 static vector signed char __ATTRS_o_ai
3132 vec_vminsb(vector bool char __a, vector signed char __b)
3133 {
3134   return __builtin_altivec_vminsb((vector signed char)__a, __b);
3135 }
3136
3137 static vector signed char __ATTRS_o_ai
3138 vec_vminsb(vector signed char __a, vector bool char __b)
3139 {
3140   return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3141 }
3142
3143 /* vec_vminub */
3144
3145 static vector unsigned char __ATTRS_o_ai
3146 vec_vminub(vector unsigned char __a, vector unsigned char __b)
3147 {
3148   return __builtin_altivec_vminub(__a, __b);
3149 }
3150
3151 static vector unsigned char __ATTRS_o_ai
3152 vec_vminub(vector bool char __a, vector unsigned char __b)
3153 {
3154   return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3155 }
3156
3157 static vector unsigned char __ATTRS_o_ai
3158 vec_vminub(vector unsigned char __a, vector bool char __b)
3159 {
3160   return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3161 }
3162
3163 /* vec_vminsh */
3164
3165 static vector short __ATTRS_o_ai
3166 vec_vminsh(vector short __a, vector short __b)
3167 {
3168   return __builtin_altivec_vminsh(__a, __b);
3169 }
3170
3171 static vector short __ATTRS_o_ai
3172 vec_vminsh(vector bool short __a, vector short __b)
3173 {
3174   return __builtin_altivec_vminsh((vector short)__a, __b);
3175 }
3176
3177 static vector short __ATTRS_o_ai
3178 vec_vminsh(vector short __a, vector bool short __b)
3179 {
3180   return __builtin_altivec_vminsh(__a, (vector short)__b);
3181 }
3182
3183 /* vec_vminuh */
3184
3185 static vector unsigned short __ATTRS_o_ai
3186 vec_vminuh(vector unsigned short __a, vector unsigned short __b)
3187 {
3188   return __builtin_altivec_vminuh(__a, __b);
3189 }
3190
3191 static vector unsigned short __ATTRS_o_ai
3192 vec_vminuh(vector bool short __a, vector unsigned short __b)
3193 {
3194   return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3195 }
3196
3197 static vector unsigned short __ATTRS_o_ai
3198 vec_vminuh(vector unsigned short __a, vector bool short __b)
3199 {
3200   return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3201 }
3202
3203 /* vec_vminsw */
3204
3205 static vector int __ATTRS_o_ai
3206 vec_vminsw(vector int __a, vector int __b)
3207 {
3208   return __builtin_altivec_vminsw(__a, __b);
3209 }
3210
3211 static vector int __ATTRS_o_ai
3212 vec_vminsw(vector bool int __a, vector int __b)
3213 {
3214   return __builtin_altivec_vminsw((vector int)__a, __b);
3215 }
3216
3217 static vector int __ATTRS_o_ai
3218 vec_vminsw(vector int __a, vector bool int __b)
3219 {
3220   return __builtin_altivec_vminsw(__a, (vector int)__b);
3221 }
3222
3223 /* vec_vminuw */
3224
3225 static vector unsigned int __ATTRS_o_ai
3226 vec_vminuw(vector unsigned int __a, vector unsigned int __b)
3227 {
3228   return __builtin_altivec_vminuw(__a, __b);
3229 }
3230
3231 static vector unsigned int __ATTRS_o_ai
3232 vec_vminuw(vector bool int __a, vector unsigned int __b)
3233 {
3234   return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3235 }
3236
3237 static vector unsigned int __ATTRS_o_ai
3238 vec_vminuw(vector unsigned int __a, vector bool int __b)
3239 {
3240   return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3241 }
3242
3243 /* vec_vminfp */
3244
3245 static vector float __attribute__((__always_inline__))
3246 vec_vminfp(vector float __a, vector float __b)
3247 {
3248   return __builtin_altivec_vminfp(__a, __b);
3249 }
3250
3251 /* vec_mladd */
3252
3253 #define __builtin_altivec_vmladduhm vec_mladd
3254
3255 static vector short __ATTRS_o_ai
3256 vec_mladd(vector short __a, vector short __b, vector short __c)
3257 {
3258   return __a * __b + __c;
3259 }
3260
3261 static vector short __ATTRS_o_ai
3262 vec_mladd(vector short __a, vector unsigned short __b, vector unsigned short __c)
3263 {
3264   return __a * (vector short)__b + (vector short)__c;
3265 }
3266
3267 static vector short __ATTRS_o_ai
3268 vec_mladd(vector unsigned short __a, vector short __b, vector short __c)
3269 {
3270   return (vector short)__a * __b + __c;
3271 }
3272
3273 static vector unsigned short __ATTRS_o_ai
3274 vec_mladd(vector unsigned short __a,
3275           vector unsigned short __b,
3276           vector unsigned short __c)
3277 {
3278   return __a * __b + __c;
3279 }
3280
3281 /* vec_vmladduhm */
3282
3283 static vector short __ATTRS_o_ai
3284 vec_vmladduhm(vector short __a, vector short __b, vector short __c)
3285 {
3286   return __a * __b + __c;
3287 }
3288
3289 static vector short __ATTRS_o_ai
3290 vec_vmladduhm(vector short __a, vector unsigned short __b, vector unsigned short __c)
3291 {
3292   return __a * (vector short)__b + (vector short)__c;
3293 }
3294
3295 static vector short __ATTRS_o_ai
3296 vec_vmladduhm(vector unsigned short __a, vector short __b, vector short __c)
3297 {
3298   return (vector short)__a * __b + __c;
3299 }
3300
3301 static vector unsigned short __ATTRS_o_ai
3302 vec_vmladduhm(vector unsigned short __a,
3303               vector unsigned short __b,
3304               vector unsigned short __c)
3305 {
3306   return __a * __b + __c;
3307 }
3308
3309 /* vec_mradds */
3310
3311 static vector short __attribute__((__always_inline__))
3312 vec_mradds(vector short __a, vector short __b, vector short __c)
3313 {
3314   return __builtin_altivec_vmhraddshs(__a, __b, __c);
3315 }
3316
3317 /* vec_vmhraddshs */
3318
3319 static vector short __attribute__((__always_inline__))
3320 vec_vmhraddshs(vector short __a, vector short __b, vector short __c)
3321 {
3322   return __builtin_altivec_vmhraddshs(__a, __b, __c);
3323 }
3324
3325 /* vec_msum */
3326
3327 static vector int __ATTRS_o_ai
3328 vec_msum(vector signed char __a, vector unsigned char __b, vector int __c)
3329 {
3330   return __builtin_altivec_vmsummbm(__a, __b, __c);
3331 }
3332
3333 static vector unsigned int __ATTRS_o_ai
3334 vec_msum(vector unsigned char __a, vector unsigned char __b, vector unsigned int __c)
3335 {
3336   return __builtin_altivec_vmsumubm(__a, __b, __c);
3337 }
3338
3339 static vector int __ATTRS_o_ai
3340 vec_msum(vector short __a, vector short __b, vector int __c)
3341 {
3342   return __builtin_altivec_vmsumshm(__a, __b, __c);
3343 }
3344
3345 static vector unsigned int __ATTRS_o_ai
3346 vec_msum(vector unsigned short __a,
3347          vector unsigned short __b,
3348          vector unsigned int __c)
3349 {
3350   return __builtin_altivec_vmsumuhm(__a, __b, __c);
3351 }
3352
3353 /* vec_vmsummbm */
3354
3355 static vector int __attribute__((__always_inline__))
3356 vec_vmsummbm(vector signed char __a, vector unsigned char __b, vector int __c)
3357 {
3358   return __builtin_altivec_vmsummbm(__a, __b, __c);
3359 }
3360
3361 /* vec_vmsumubm */
3362
3363 static vector unsigned int __attribute__((__always_inline__))
3364 vec_vmsumubm(vector unsigned char __a,
3365              vector unsigned char __b,
3366              vector unsigned int __c)
3367 {
3368   return __builtin_altivec_vmsumubm(__a, __b, __c);
3369 }
3370
3371 /* vec_vmsumshm */
3372
3373 static vector int __attribute__((__always_inline__))
3374 vec_vmsumshm(vector short __a, vector short __b, vector int __c)
3375 {
3376   return __builtin_altivec_vmsumshm(__a, __b, __c);
3377 }
3378
3379 /* vec_vmsumuhm */
3380
3381 static vector unsigned int __attribute__((__always_inline__))
3382 vec_vmsumuhm(vector unsigned short __a,
3383              vector unsigned short __b,
3384              vector unsigned int __c)
3385 {
3386   return __builtin_altivec_vmsumuhm(__a, __b, __c);
3387 }
3388
3389 /* vec_msums */
3390
3391 static vector int __ATTRS_o_ai
3392 vec_msums(vector short __a, vector short __b, vector int __c)
3393 {
3394   return __builtin_altivec_vmsumshs(__a, __b, __c);
3395 }
3396
3397 static vector unsigned int __ATTRS_o_ai
3398 vec_msums(vector unsigned short __a,
3399           vector unsigned short __b,
3400           vector unsigned int __c)
3401 {
3402   return __builtin_altivec_vmsumuhs(__a, __b, __c);
3403 }
3404
3405 /* vec_vmsumshs */
3406
3407 static vector int __attribute__((__always_inline__))
3408 vec_vmsumshs(vector short __a, vector short __b, vector int __c)
3409 {
3410   return __builtin_altivec_vmsumshs(__a, __b, __c);
3411 }
3412
3413 /* vec_vmsumuhs */
3414
3415 static vector unsigned int __attribute__((__always_inline__))
3416 vec_vmsumuhs(vector unsigned short __a,
3417              vector unsigned short __b,
3418              vector unsigned int __c)
3419 {
3420   return __builtin_altivec_vmsumuhs(__a, __b, __c);
3421 }
3422
3423 /* vec_mtvscr */
3424
3425 static void __ATTRS_o_ai
3426 vec_mtvscr(vector signed char __a)
3427 {
3428   __builtin_altivec_mtvscr((vector int)__a);
3429 }
3430
3431 static void __ATTRS_o_ai
3432 vec_mtvscr(vector unsigned char __a)
3433 {
3434   __builtin_altivec_mtvscr((vector int)__a);
3435 }
3436
3437 static void __ATTRS_o_ai
3438 vec_mtvscr(vector bool char __a)
3439 {
3440   __builtin_altivec_mtvscr((vector int)__a);
3441 }
3442
3443 static void __ATTRS_o_ai
3444 vec_mtvscr(vector short __a)
3445 {
3446   __builtin_altivec_mtvscr((vector int)__a);
3447 }
3448
3449 static void __ATTRS_o_ai
3450 vec_mtvscr(vector unsigned short __a)
3451 {
3452   __builtin_altivec_mtvscr((vector int)__a);
3453 }
3454
3455 static void __ATTRS_o_ai
3456 vec_mtvscr(vector bool short __a)
3457 {
3458   __builtin_altivec_mtvscr((vector int)__a);
3459 }
3460
3461 static void __ATTRS_o_ai
3462 vec_mtvscr(vector pixel __a)
3463 {
3464   __builtin_altivec_mtvscr((vector int)__a);
3465 }
3466
3467 static void __ATTRS_o_ai
3468 vec_mtvscr(vector int __a)
3469 {
3470   __builtin_altivec_mtvscr((vector int)__a);
3471 }
3472
3473 static void __ATTRS_o_ai
3474 vec_mtvscr(vector unsigned int __a)
3475 {
3476   __builtin_altivec_mtvscr((vector int)__a);
3477 }
3478
3479 static void __ATTRS_o_ai
3480 vec_mtvscr(vector bool int __a)
3481 {
3482   __builtin_altivec_mtvscr((vector int)__a);
3483 }
3484
3485 static void __ATTRS_o_ai
3486 vec_mtvscr(vector float __a)
3487 {
3488   __builtin_altivec_mtvscr((vector int)__a);
3489 }
3490
3491 /* The vmulos* and vmules* instructions have a big endian bias, so
3492    we must reverse the meaning of "even" and "odd" for little endian.  */
3493
3494 /* vec_mule */
3495
3496 static vector short __ATTRS_o_ai
3497 vec_mule(vector signed char __a, vector signed char __b)
3498 {
3499 #ifdef __LITTLE_ENDIAN__
3500   return __builtin_altivec_vmulosb(__a, __b);
3501 #else
3502   return __builtin_altivec_vmulesb(__a, __b);
3503 #endif
3504 }
3505
3506 static vector unsigned short __ATTRS_o_ai
3507 vec_mule(vector unsigned char __a, vector unsigned char __b)
3508 {
3509 #ifdef __LITTLE_ENDIAN__
3510   return __builtin_altivec_vmuloub(__a, __b);
3511 #else
3512   return __builtin_altivec_vmuleub(__a, __b);
3513 #endif
3514 }
3515
3516 static vector int __ATTRS_o_ai
3517 vec_mule(vector short __a, vector short __b)
3518 {
3519 #ifdef __LITTLE_ENDIAN__
3520   return __builtin_altivec_vmulosh(__a, __b);
3521 #else
3522   return __builtin_altivec_vmulesh(__a, __b);
3523 #endif
3524 }
3525
3526 static vector unsigned int __ATTRS_o_ai
3527 vec_mule(vector unsigned short __a, vector unsigned short __b)
3528 {
3529 #ifdef __LITTLE_ENDIAN__
3530   return __builtin_altivec_vmulouh(__a, __b);
3531 #else
3532   return __builtin_altivec_vmuleuh(__a, __b);
3533 #endif
3534 }
3535
3536 /* vec_vmulesb */
3537
3538 static vector short __attribute__((__always_inline__))
3539 vec_vmulesb(vector signed char __a, vector signed char __b)
3540 {
3541 #ifdef __LITTLE_ENDIAN__
3542   return __builtin_altivec_vmulosb(__a, __b);
3543 #else
3544   return __builtin_altivec_vmulesb(__a, __b);
3545 #endif
3546 }
3547
3548 /* vec_vmuleub */
3549
3550 static vector unsigned short __attribute__((__always_inline__))
3551 vec_vmuleub(vector unsigned char __a, vector unsigned char __b)
3552 {
3553 #ifdef __LITTLE_ENDIAN__
3554   return __builtin_altivec_vmuloub(__a, __b);
3555 #else
3556   return __builtin_altivec_vmuleub(__a, __b);
3557 #endif
3558 }
3559
3560 /* vec_vmulesh */
3561
3562 static vector int __attribute__((__always_inline__))
3563 vec_vmulesh(vector short __a, vector short __b)
3564 {
3565 #ifdef __LITTLE_ENDIAN__
3566   return __builtin_altivec_vmulosh(__a, __b);
3567 #else
3568   return __builtin_altivec_vmulesh(__a, __b);
3569 #endif
3570 }
3571
3572 /* vec_vmuleuh */
3573
3574 static vector unsigned int __attribute__((__always_inline__))
3575 vec_vmuleuh(vector unsigned short __a, vector unsigned short __b)
3576 {
3577 #ifdef __LITTLE_ENDIAN__
3578   return __builtin_altivec_vmulouh(__a, __b);
3579 #else
3580   return __builtin_altivec_vmuleuh(__a, __b);
3581 #endif
3582 }
3583
3584 /* vec_mulo */
3585
3586 static vector short __ATTRS_o_ai
3587 vec_mulo(vector signed char __a, vector signed char __b)
3588 {
3589 #ifdef __LITTLE_ENDIAN__
3590   return __builtin_altivec_vmulesb(__a, __b);
3591 #else
3592   return __builtin_altivec_vmulosb(__a, __b);
3593 #endif
3594 }
3595
3596 static vector unsigned short __ATTRS_o_ai
3597 vec_mulo(vector unsigned char __a, vector unsigned char __b)
3598 {
3599 #ifdef __LITTLE_ENDIAN__
3600   return __builtin_altivec_vmuleub(__a, __b);
3601 #else
3602   return __builtin_altivec_vmuloub(__a, __b);
3603 #endif
3604 }
3605
3606 static vector int __ATTRS_o_ai
3607 vec_mulo(vector short __a, vector short __b)
3608 {
3609 #ifdef __LITTLE_ENDIAN__
3610   return __builtin_altivec_vmulesh(__a, __b);
3611 #else
3612   return __builtin_altivec_vmulosh(__a, __b);
3613 #endif
3614 }
3615
3616 static vector unsigned int __ATTRS_o_ai
3617 vec_mulo(vector unsigned short __a, vector unsigned short __b)
3618 {
3619 #ifdef __LITTLE_ENDIAN__
3620   return __builtin_altivec_vmuleuh(__a, __b);
3621 #else
3622   return __builtin_altivec_vmulouh(__a, __b);
3623 #endif
3624 }
3625
3626 /* vec_vmulosb */
3627
3628 static vector short __attribute__((__always_inline__))
3629 vec_vmulosb(vector signed char __a, vector signed char __b)
3630 {
3631 #ifdef __LITTLE_ENDIAN__
3632   return __builtin_altivec_vmulesb(__a, __b);
3633 #else
3634   return __builtin_altivec_vmulosb(__a, __b);
3635 #endif
3636 }
3637
3638 /* vec_vmuloub */
3639
3640 static vector unsigned short __attribute__((__always_inline__))
3641 vec_vmuloub(vector unsigned char __a, vector unsigned char __b)
3642 {
3643 #ifdef __LITTLE_ENDIAN__
3644   return __builtin_altivec_vmuleub(__a, __b);
3645 #else
3646   return __builtin_altivec_vmuloub(__a, __b);
3647 #endif
3648 }
3649
3650 /* vec_vmulosh */
3651
3652 static vector int __attribute__((__always_inline__))
3653 vec_vmulosh(vector short __a, vector short __b)
3654 {
3655 #ifdef __LITTLE_ENDIAN__
3656   return __builtin_altivec_vmulesh(__a, __b);
3657 #else
3658   return __builtin_altivec_vmulosh(__a, __b);
3659 #endif
3660 }
3661
3662 /* vec_vmulouh */
3663
3664 static vector unsigned int __attribute__((__always_inline__))
3665 vec_vmulouh(vector unsigned short __a, vector unsigned short __b)
3666 {
3667 #ifdef __LITTLE_ENDIAN__
3668   return __builtin_altivec_vmuleuh(__a, __b);
3669 #else
3670   return __builtin_altivec_vmulouh(__a, __b);
3671 #endif
3672 }
3673
3674 /* vec_nmsub */
3675
3676 static vector float __attribute__((__always_inline__))
3677 vec_nmsub(vector float __a, vector float __b, vector float __c)
3678 {
3679   return __builtin_altivec_vnmsubfp(__a, __b, __c);
3680 }
3681
3682 /* vec_vnmsubfp */
3683
3684 static vector float __attribute__((__always_inline__))
3685 vec_vnmsubfp(vector float __a, vector float __b, vector float __c)
3686 {
3687   return __builtin_altivec_vnmsubfp(__a, __b, __c);
3688 }
3689
3690 /* vec_nor */
3691
3692 #define __builtin_altivec_vnor vec_nor
3693
3694 static vector signed char __ATTRS_o_ai
3695 vec_nor(vector signed char __a, vector signed char __b)
3696 {
3697   return ~(__a | __b);
3698 }
3699
3700 static vector unsigned char __ATTRS_o_ai
3701 vec_nor(vector unsigned char __a, vector unsigned char __b)
3702 {
3703   return ~(__a | __b);
3704 }
3705
3706 static vector bool char __ATTRS_o_ai
3707 vec_nor(vector bool char __a, vector bool char __b)
3708 {
3709   return ~(__a | __b);
3710 }
3711
3712 static vector short __ATTRS_o_ai
3713 vec_nor(vector short __a, vector short __b)
3714 {
3715   return ~(__a | __b);
3716 }
3717
3718 static vector unsigned short __ATTRS_o_ai
3719 vec_nor(vector unsigned short __a, vector unsigned short __b)
3720 {
3721   return ~(__a | __b);
3722 }
3723
3724 static vector bool short __ATTRS_o_ai
3725 vec_nor(vector bool short __a, vector bool short __b)
3726 {
3727   return ~(__a | __b);
3728 }
3729
3730 static vector int __ATTRS_o_ai
3731 vec_nor(vector int __a, vector int __b)
3732 {
3733   return ~(__a | __b);
3734 }
3735
3736 static vector unsigned int __ATTRS_o_ai
3737 vec_nor(vector unsigned int __a, vector unsigned int __b)
3738 {
3739   return ~(__a | __b);
3740 }
3741
3742 static vector bool int __ATTRS_o_ai
3743 vec_nor(vector bool int __a, vector bool int __b)
3744 {
3745   return ~(__a | __b);
3746 }
3747
3748 static vector float __ATTRS_o_ai
3749 vec_nor(vector float __a, vector float __b)
3750 {
3751   vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b);
3752   return (vector float)__res;
3753 }
3754
3755 /* vec_vnor */
3756
3757 static vector signed char __ATTRS_o_ai
3758 vec_vnor(vector signed char __a, vector signed char __b)
3759 {
3760   return ~(__a | __b);
3761 }
3762
3763 static vector unsigned char __ATTRS_o_ai
3764 vec_vnor(vector unsigned char __a, vector unsigned char __b)
3765 {
3766   return ~(__a | __b);
3767 }
3768
3769 static vector bool char __ATTRS_o_ai
3770 vec_vnor(vector bool char __a, vector bool char __b)
3771 {
3772   return ~(__a | __b);
3773 }
3774
3775 static vector short __ATTRS_o_ai
3776 vec_vnor(vector short __a, vector short __b)
3777 {
3778   return ~(__a | __b);
3779 }
3780
3781 static vector unsigned short __ATTRS_o_ai
3782 vec_vnor(vector unsigned short __a, vector unsigned short __b)
3783 {
3784   return ~(__a | __b);
3785 }
3786
3787 static vector bool short __ATTRS_o_ai
3788 vec_vnor(vector bool short __a, vector bool short __b)
3789 {
3790   return ~(__a | __b);
3791 }
3792
3793 static vector int __ATTRS_o_ai
3794 vec_vnor(vector int __a, vector int __b)
3795 {
3796   return ~(__a | __b);
3797 }
3798
3799 static vector unsigned int __ATTRS_o_ai
3800 vec_vnor(vector unsigned int __a, vector unsigned int __b)
3801 {
3802   return ~(__a | __b);
3803 }
3804
3805 static vector bool int __ATTRS_o_ai
3806 vec_vnor(vector bool int __a, vector bool int __b)
3807 {
3808   return ~(__a | __b);
3809 }
3810
3811 static vector float __ATTRS_o_ai
3812 vec_vnor(vector float __a, vector float __b)
3813 {
3814   vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b);
3815   return (vector float)__res;
3816 }
3817
3818 /* vec_or */
3819
3820 #define __builtin_altivec_vor vec_or
3821
3822 static vector signed char __ATTRS_o_ai
3823 vec_or(vector signed char __a, vector signed char __b)
3824 {
3825   return __a | __b;
3826 }
3827
3828 static vector signed char __ATTRS_o_ai
3829 vec_or(vector bool char __a, vector signed char __b)
3830 {
3831   return (vector signed char)__a | __b;
3832 }
3833
3834 static vector signed char __ATTRS_o_ai
3835 vec_or(vector signed char __a, vector bool char __b)
3836 {
3837   return __a | (vector signed char)__b;
3838 }
3839
3840 static vector unsigned char __ATTRS_o_ai
3841 vec_or(vector unsigned char __a, vector unsigned char __b)
3842 {
3843   return __a | __b;
3844 }
3845
3846 static vector unsigned char __ATTRS_o_ai
3847 vec_or(vector bool char __a, vector unsigned char __b)
3848 {
3849   return (vector unsigned char)__a | __b;
3850 }
3851
3852 static vector unsigned char __ATTRS_o_ai
3853 vec_or(vector unsigned char __a, vector bool char __b)
3854 {
3855   return __a | (vector unsigned char)__b;
3856 }
3857
3858 static vector bool char __ATTRS_o_ai
3859 vec_or(vector bool char __a, vector bool char __b)
3860 {
3861   return __a | __b;
3862 }
3863
3864 static vector short __ATTRS_o_ai
3865 vec_or(vector short __a, vector short __b)
3866 {
3867   return __a | __b;
3868 }
3869
3870 static vector short __ATTRS_o_ai
3871 vec_or(vector bool short __a, vector short __b)
3872 {
3873   return (vector short)__a | __b;
3874 }
3875
3876 static vector short __ATTRS_o_ai
3877 vec_or(vector short __a, vector bool short __b)
3878 {
3879   return __a | (vector short)__b;
3880 }
3881
3882 static vector unsigned short __ATTRS_o_ai
3883 vec_or(vector unsigned short __a, vector unsigned short __b)
3884 {
3885   return __a | __b;
3886 }
3887
3888 static vector unsigned short __ATTRS_o_ai
3889 vec_or(vector bool short __a, vector unsigned short __b)
3890 {
3891   return (vector unsigned short)__a | __b;
3892 }
3893
3894 static vector unsigned short __ATTRS_o_ai
3895 vec_or(vector unsigned short __a, vector bool short __b)
3896 {
3897   return __a | (vector unsigned short)__b;
3898 }
3899
3900 static vector bool short __ATTRS_o_ai
3901 vec_or(vector bool short __a, vector bool short __b)
3902 {
3903   return __a | __b;
3904 }
3905
3906 static vector int __ATTRS_o_ai
3907 vec_or(vector int __a, vector int __b)
3908 {
3909   return __a | __b;
3910 }
3911
3912 static vector int __ATTRS_o_ai
3913 vec_or(vector bool int __a, vector int __b)
3914 {
3915   return (vector int)__a | __b;
3916 }
3917
3918 static vector int __ATTRS_o_ai
3919 vec_or(vector int __a, vector bool int __b)
3920 {
3921   return __a | (vector int)__b;
3922 }
3923
3924 static vector unsigned int __ATTRS_o_ai
3925 vec_or(vector unsigned int __a, vector unsigned int __b)
3926 {
3927   return __a | __b;
3928 }
3929
3930 static vector unsigned int __ATTRS_o_ai
3931 vec_or(vector bool int __a, vector unsigned int __b)
3932 {
3933   return (vector unsigned int)__a | __b;
3934 }
3935
3936 static vector unsigned int __ATTRS_o_ai
3937 vec_or(vector unsigned int __a, vector bool int __b)
3938 {
3939   return __a | (vector unsigned int)__b;
3940 }
3941
3942 static vector bool int __ATTRS_o_ai
3943 vec_or(vector bool int __a, vector bool int __b)
3944 {
3945   return __a | __b;
3946 }
3947
3948 static vector float __ATTRS_o_ai
3949 vec_or(vector float __a, vector float __b)
3950 {
3951   vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
3952   return (vector float)__res;
3953 }
3954
3955 static vector float __ATTRS_o_ai
3956 vec_or(vector bool int __a, vector float __b)
3957 {
3958   vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
3959   return (vector float)__res;
3960 }
3961
3962 static vector float __ATTRS_o_ai
3963 vec_or(vector float __a, vector bool int __b)
3964 {
3965   vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
3966   return (vector float)__res;
3967 }
3968
3969 /* vec_vor */
3970
3971 static vector signed char __ATTRS_o_ai
3972 vec_vor(vector signed char __a, vector signed char __b)
3973 {
3974   return __a | __b;
3975 }
3976
3977 static vector signed char __ATTRS_o_ai
3978 vec_vor(vector bool char __a, vector signed char __b)
3979 {
3980   return (vector signed char)__a | __b;
3981 }
3982
3983 static vector signed char __ATTRS_o_ai
3984 vec_vor(vector signed char __a, vector bool char __b)
3985 {
3986   return __a | (vector signed char)__b;
3987 }
3988
3989 static vector unsigned char __ATTRS_o_ai
3990 vec_vor(vector unsigned char __a, vector unsigned char __b)
3991 {
3992   return __a | __b;
3993 }
3994
3995 static vector unsigned char __ATTRS_o_ai
3996 vec_vor(vector bool char __a, vector unsigned char __b)
3997 {
3998   return (vector unsigned char)__a | __b;
3999 }
4000
4001 static vector unsigned char __ATTRS_o_ai
4002 vec_vor(vector unsigned char __a, vector bool char __b)
4003 {
4004   return __a | (vector unsigned char)__b;
4005 }
4006
4007 static vector bool char __ATTRS_o_ai
4008 vec_vor(vector bool char __a, vector bool char __b)
4009 {
4010   return __a | __b;
4011 }
4012
4013 static vector short __ATTRS_o_ai
4014 vec_vor(vector short __a, vector short __b)
4015 {
4016   return __a | __b;
4017 }
4018
4019 static vector short __ATTRS_o_ai
4020 vec_vor(vector bool short __a, vector short __b)
4021 {
4022   return (vector short)__a | __b;
4023 }
4024
4025 static vector short __ATTRS_o_ai
4026 vec_vor(vector short __a, vector bool short __b)
4027 {
4028   return __a | (vector short)__b;
4029 }
4030
4031 static vector unsigned short __ATTRS_o_ai
4032 vec_vor(vector unsigned short __a, vector unsigned short __b)
4033 {
4034   return __a | __b;
4035 }
4036
4037 static vector unsigned short __ATTRS_o_ai
4038 vec_vor(vector bool short __a, vector unsigned short __b)
4039 {
4040   return (vector unsigned short)__a | __b;
4041 }
4042
4043 static vector unsigned short __ATTRS_o_ai
4044 vec_vor(vector unsigned short __a, vector bool short __b)
4045 {
4046   return __a | (vector unsigned short)__b;
4047 }
4048
4049 static vector bool short __ATTRS_o_ai
4050 vec_vor(vector bool short __a, vector bool short __b)
4051 {
4052   return __a | __b;
4053 }
4054
4055 static vector int __ATTRS_o_ai
4056 vec_vor(vector int __a, vector int __b)
4057 {
4058   return __a | __b;
4059 }
4060
4061 static vector int __ATTRS_o_ai
4062 vec_vor(vector bool int __a, vector int __b)
4063 {
4064   return (vector int)__a | __b;
4065 }
4066
4067 static vector int __ATTRS_o_ai
4068 vec_vor(vector int __a, vector bool int __b)
4069 {
4070   return __a | (vector int)__b;
4071 }
4072
4073 static vector unsigned int __ATTRS_o_ai
4074 vec_vor(vector unsigned int __a, vector unsigned int __b)
4075 {
4076   return __a | __b;
4077 }
4078
4079 static vector unsigned int __ATTRS_o_ai
4080 vec_vor(vector bool int __a, vector unsigned int __b)
4081 {
4082   return (vector unsigned int)__a | __b;
4083 }
4084
4085 static vector unsigned int __ATTRS_o_ai
4086 vec_vor(vector unsigned int __a, vector bool int __b)
4087 {
4088   return __a | (vector unsigned int)__b;
4089 }
4090
4091 static vector bool int __ATTRS_o_ai
4092 vec_vor(vector bool int __a, vector bool int __b)
4093 {
4094   return __a | __b;
4095 }
4096
4097 static vector float __ATTRS_o_ai
4098 vec_vor(vector float __a, vector float __b)
4099 {
4100   vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4101   return (vector float)__res;
4102 }
4103
4104 static vector float __ATTRS_o_ai
4105 vec_vor(vector bool int __a, vector float __b)
4106 {
4107   vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4108   return (vector float)__res;
4109 }
4110
4111 static vector float __ATTRS_o_ai
4112 vec_vor(vector float __a, vector bool int __b)
4113 {
4114   vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4115   return (vector float)__res;
4116 }
4117
4118 /* vec_pack */
4119
4120 /* The various vector pack instructions have a big-endian bias, so for
4121    little endian we must handle reversed element numbering.  */
4122
4123 static vector signed char __ATTRS_o_ai
4124 vec_pack(vector signed short __a, vector signed short __b)
4125 {
4126 #ifdef __LITTLE_ENDIAN__
4127   return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4128     (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4129      0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4130 #else
4131   return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4132     (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4133      0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4134 #endif
4135 }
4136
4137 static vector unsigned char __ATTRS_o_ai
4138 vec_pack(vector unsigned short __a, vector unsigned short __b)
4139 {
4140 #ifdef __LITTLE_ENDIAN__
4141   return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4142     (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4143      0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4144 #else
4145   return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4146     (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4147      0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4148 #endif
4149 }
4150
4151 static vector bool char __ATTRS_o_ai
4152 vec_pack(vector bool short __a, vector bool short __b)
4153 {
4154 #ifdef __LITTLE_ENDIAN__
4155   return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4156     (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4157      0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4158 #else
4159   return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4160     (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4161      0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4162 #endif
4163 }
4164
4165 static vector short __ATTRS_o_ai
4166 vec_pack(vector int __a, vector int __b)
4167 {
4168 #ifdef __LITTLE_ENDIAN__
4169   return (vector short)vec_perm(__a, __b, (vector unsigned char)
4170     (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4171      0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4172 #else
4173   return (vector short)vec_perm(__a, __b, (vector unsigned char)
4174     (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4175      0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4176 #endif
4177 }
4178
4179 static vector unsigned short __ATTRS_o_ai
4180 vec_pack(vector unsigned int __a, vector unsigned int __b)
4181 {
4182 #ifdef __LITTLE_ENDIAN__
4183   return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4184     (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4185      0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4186 #else
4187   return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4188     (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4189      0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4190 #endif
4191 }
4192
4193 static vector bool short __ATTRS_o_ai
4194 vec_pack(vector bool int __a, vector bool int __b)
4195 {
4196 #ifdef __LITTLE_ENDIAN__
4197   return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4198     (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4199      0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4200 #else
4201   return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4202     (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4203      0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4204 #endif
4205 }
4206
4207 /* vec_vpkuhum */
4208
4209 #define __builtin_altivec_vpkuhum vec_vpkuhum
4210
4211 static vector signed char __ATTRS_o_ai
4212 vec_vpkuhum(vector signed short __a, vector signed short __b)
4213 {
4214 #ifdef __LITTLE_ENDIAN__
4215   return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4216     (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4217      0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4218 #else
4219   return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4220     (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4221      0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4222 #endif
4223 }
4224
4225 static vector unsigned char __ATTRS_o_ai
4226 vec_vpkuhum(vector unsigned short __a, vector unsigned short __b)
4227 {
4228 #ifdef __LITTLE_ENDIAN__
4229   return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4230     (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4231      0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4232 #else
4233   return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4234     (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4235      0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4236 #endif
4237 }
4238
4239 static vector bool char __ATTRS_o_ai
4240 vec_vpkuhum(vector bool short __a, vector bool short __b)
4241 {
4242 #ifdef __LITTLE_ENDIAN__
4243   return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4244     (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4245      0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4246 #else
4247   return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4248     (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4249      0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4250 #endif
4251 }
4252
4253 /* vec_vpkuwum */
4254
4255 #define __builtin_altivec_vpkuwum vec_vpkuwum
4256
4257 static vector short __ATTRS_o_ai
4258 vec_vpkuwum(vector int __a, vector int __b)
4259 {
4260 #ifdef __LITTLE_ENDIAN__
4261   return (vector short)vec_perm(__a, __b, (vector unsigned char)
4262     (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4263      0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4264 #else
4265   return (vector short)vec_perm(__a, __b, (vector unsigned char)
4266     (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4267      0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4268 #endif
4269 }
4270
4271 static vector unsigned short __ATTRS_o_ai
4272 vec_vpkuwum(vector unsigned int __a, vector unsigned int __b)
4273 {
4274 #ifdef __LITTLE_ENDIAN__
4275   return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4276     (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4277      0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4278 #else
4279   return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4280     (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4281      0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4282 #endif
4283 }
4284
4285 static vector bool short __ATTRS_o_ai
4286 vec_vpkuwum(vector bool int __a, vector bool int __b)
4287 {
4288 #ifdef __LITTLE_ENDIAN__
4289   return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4290     (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4291      0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4292 #else
4293   return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4294     (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4295      0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4296 #endif
4297 }
4298
4299 /* vec_packpx */
4300
4301 static vector pixel __attribute__((__always_inline__))
4302 vec_packpx(vector unsigned int __a, vector unsigned int __b)
4303 {
4304 #ifdef __LITTLE_ENDIAN__
4305   return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4306 #else
4307   return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4308 #endif
4309 }
4310
4311 /* vec_vpkpx */
4312
4313 static vector pixel __attribute__((__always_inline__))
4314 vec_vpkpx(vector unsigned int __a, vector unsigned int __b)
4315 {
4316 #ifdef __LITTLE_ENDIAN__
4317   return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4318 #else
4319   return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4320 #endif
4321 }
4322
4323 /* vec_packs */
4324
4325 static vector signed char __ATTRS_o_ai
4326 vec_packs(vector short __a, vector short __b)
4327 {
4328 #ifdef __LITTLE_ENDIAN__
4329   return __builtin_altivec_vpkshss(__b, __a);
4330 #else
4331   return __builtin_altivec_vpkshss(__a, __b);
4332 #endif
4333 }
4334
4335 static vector unsigned char __ATTRS_o_ai
4336 vec_packs(vector unsigned short __a, vector unsigned short __b)
4337 {
4338 #ifdef __LITTLE_ENDIAN__
4339   return __builtin_altivec_vpkuhus(__b, __a);
4340 #else
4341   return __builtin_altivec_vpkuhus(__a, __b);
4342 #endif
4343 }
4344
4345 static vector signed short __ATTRS_o_ai
4346 vec_packs(vector int __a, vector int __b)
4347 {
4348 #ifdef __LITTLE_ENDIAN__
4349   return __builtin_altivec_vpkswss(__b, __a);
4350 #else
4351   return __builtin_altivec_vpkswss(__a, __b);
4352 #endif
4353 }
4354
4355 static vector unsigned short __ATTRS_o_ai
4356 vec_packs(vector unsigned int __a, vector unsigned int __b)
4357 {
4358 #ifdef __LITTLE_ENDIAN__
4359   return __builtin_altivec_vpkuwus(__b, __a);
4360 #else
4361   return __builtin_altivec_vpkuwus(__a, __b);
4362 #endif
4363 }
4364
4365 /* vec_vpkshss */
4366
4367 static vector signed char __attribute__((__always_inline__))
4368 vec_vpkshss(vector short __a, vector short __b)
4369 {
4370 #ifdef __LITTLE_ENDIAN__
4371   return __builtin_altivec_vpkshss(__b, __a);
4372 #else
4373   return __builtin_altivec_vpkshss(__a, __b);
4374 #endif
4375 }
4376
4377 /* vec_vpkuhus */
4378
4379 static vector unsigned char __attribute__((__always_inline__))
4380 vec_vpkuhus(vector unsigned short __a, vector unsigned short __b)
4381 {
4382 #ifdef __LITTLE_ENDIAN__
4383   return __builtin_altivec_vpkuhus(__b, __a);
4384 #else
4385   return __builtin_altivec_vpkuhus(__a, __b);
4386 #endif
4387 }
4388
4389 /* vec_vpkswss */
4390
4391 static vector signed short __attribute__((__always_inline__))
4392 vec_vpkswss(vector int __a, vector int __b)
4393 {
4394 #ifdef __LITTLE_ENDIAN__
4395   return __builtin_altivec_vpkswss(__b, __a);
4396 #else
4397   return __builtin_altivec_vpkswss(__a, __b);
4398 #endif
4399 }
4400
4401 /* vec_vpkuwus */
4402
4403 static vector unsigned short __attribute__((__always_inline__))
4404 vec_vpkuwus(vector unsigned int __a, vector unsigned int __b)
4405 {
4406 #ifdef __LITTLE_ENDIAN__
4407   return __builtin_altivec_vpkuwus(__b, __a);
4408 #else
4409   return __builtin_altivec_vpkuwus(__a, __b);
4410 #endif
4411 }
4412
4413 /* vec_packsu */
4414
4415 static vector unsigned char __ATTRS_o_ai
4416 vec_packsu(vector short __a, vector short __b)
4417 {
4418 #ifdef __LITTLE_ENDIAN__
4419   return __builtin_altivec_vpkshus(__b, __a);
4420 #else
4421   return __builtin_altivec_vpkshus(__a, __b);
4422 #endif
4423 }
4424
4425 static vector unsigned char __ATTRS_o_ai
4426 vec_packsu(vector unsigned short __a, vector unsigned short __b)
4427 {
4428 #ifdef __LITTLE_ENDIAN__
4429   return __builtin_altivec_vpkuhus(__b, __a);
4430 #else
4431   return __builtin_altivec_vpkuhus(__a, __b);
4432 #endif
4433 }
4434
4435 static vector unsigned short __ATTRS_o_ai
4436 vec_packsu(vector int __a, vector int __b)
4437 {
4438 #ifdef __LITTLE_ENDIAN__
4439   return __builtin_altivec_vpkswus(__b, __a);
4440 #else
4441   return __builtin_altivec_vpkswus(__a, __b);
4442 #endif
4443 }
4444
4445 static vector unsigned short __ATTRS_o_ai
4446 vec_packsu(vector unsigned int __a, vector unsigned int __b)
4447 {
4448 #ifdef __LITTLE_ENDIAN__
4449   return __builtin_altivec_vpkuwus(__b, __a);
4450 #else
4451   return __builtin_altivec_vpkuwus(__a, __b);
4452 #endif
4453 }
4454
4455 /* vec_vpkshus */
4456
4457 static vector unsigned char __ATTRS_o_ai
4458 vec_vpkshus(vector short __a, vector short __b)
4459 {
4460 #ifdef __LITTLE_ENDIAN__
4461   return __builtin_altivec_vpkshus(__b, __a);
4462 #else
4463   return __builtin_altivec_vpkshus(__a, __b);
4464 #endif
4465 }
4466
4467 static vector unsigned char __ATTRS_o_ai
4468 vec_vpkshus(vector unsigned short __a, vector unsigned short __b)
4469 {
4470 #ifdef __LITTLE_ENDIAN__
4471   return __builtin_altivec_vpkuhus(__b, __a);
4472 #else
4473   return __builtin_altivec_vpkuhus(__a, __b);
4474 #endif
4475 }
4476
4477 /* vec_vpkswus */
4478
4479 static vector unsigned short __ATTRS_o_ai
4480 vec_vpkswus(vector int __a, vector int __b)
4481 {
4482 #ifdef __LITTLE_ENDIAN__
4483   return __builtin_altivec_vpkswus(__b, __a);
4484 #else
4485   return __builtin_altivec_vpkswus(__a, __b);
4486 #endif
4487 }
4488
4489 static vector unsigned short __ATTRS_o_ai
4490 vec_vpkswus(vector unsigned int __a, vector unsigned int __b)
4491 {
4492 #ifdef __LITTLE_ENDIAN__
4493   return __builtin_altivec_vpkuwus(__b, __a);
4494 #else
4495   return __builtin_altivec_vpkuwus(__a, __b);
4496 #endif
4497 }
4498
4499 /* vec_perm */
4500
4501 // The vperm instruction is defined architecturally with a big-endian bias.
4502 // For little endian, we swap the input operands and invert the permute
4503 // control vector.  Only the rightmost 5 bits matter, so we could use
4504 // a vector of all 31s instead of all 255s to perform the inversion.
4505 // However, when the PCV is not a constant, using 255 has an advantage
4506 // in that the vec_xor can be recognized as a vec_nor (and for P8 and
4507 // later, possibly a vec_nand).
4508
4509 vector signed char __ATTRS_o_ai
4510 vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c)
4511 {
4512 #ifdef __LITTLE_ENDIAN__
4513   vector unsigned char __d = {255,255,255,255,255,255,255,255,
4514                               255,255,255,255,255,255,255,255};
4515   __d = vec_xor(__c, __d);
4516   return (vector signed char)
4517            __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4518 #else
4519   return (vector signed char)
4520            __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4521 #endif
4522 }
4523
4524 vector unsigned char __ATTRS_o_ai
4525 vec_perm(vector unsigned char __a,
4526          vector unsigned char __b,
4527          vector unsigned char __c)
4528 {
4529 #ifdef __LITTLE_ENDIAN__
4530   vector unsigned char __d = {255,255,255,255,255,255,255,255,
4531                               255,255,255,255,255,255,255,255};
4532   __d = vec_xor(__c, __d);
4533   return (vector unsigned char)
4534            __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4535 #else
4536   return (vector unsigned char)
4537            __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4538 #endif
4539 }
4540
4541 vector bool char __ATTRS_o_ai
4542 vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c)
4543 {
4544 #ifdef __LITTLE_ENDIAN__
4545   vector unsigned char __d = {255,255,255,255,255,255,255,255,
4546                               255,255,255,255,255,255,255,255};
4547   __d = vec_xor(__c, __d);
4548   return (vector bool char)
4549            __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4550 #else
4551   return (vector bool char)
4552            __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4553 #endif
4554 }
4555
4556 vector short __ATTRS_o_ai
4557 vec_perm(vector short __a, vector short __b, vector unsigned char __c)
4558 {
4559 #ifdef __LITTLE_ENDIAN__
4560   vector unsigned char __d = {255,255,255,255,255,255,255,255,
4561                               255,255,255,255,255,255,255,255};
4562   __d = vec_xor(__c, __d);
4563   return (vector short)
4564            __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4565 #else
4566   return (vector short)
4567            __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4568 #endif
4569 }
4570
4571 vector unsigned short __ATTRS_o_ai
4572 vec_perm(vector unsigned short __a,
4573          vector unsigned short __b,
4574          vector unsigned char __c)
4575 {
4576 #ifdef __LITTLE_ENDIAN__
4577   vector unsigned char __d = {255,255,255,255,255,255,255,255,
4578                               255,255,255,255,255,255,255,255};
4579   __d = vec_xor(__c, __d);
4580   return (vector unsigned short)
4581            __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4582 #else
4583   return (vector unsigned short)
4584            __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4585 #endif
4586 }
4587
4588 vector bool short __ATTRS_o_ai
4589 vec_perm(vector bool short __a, vector bool short __b, vector unsigned char __c)
4590 {
4591 #ifdef __LITTLE_ENDIAN__
4592   vector unsigned char __d = {255,255,255,255,255,255,255,255,
4593                               255,255,255,255,255,255,255,255};
4594   __d = vec_xor(__c, __d);
4595   return (vector bool short)
4596            __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4597 #else
4598   return (vector bool short)
4599            __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4600 #endif
4601 }
4602
4603 vector pixel __ATTRS_o_ai
4604 vec_perm(vector pixel __a, vector pixel __b, vector unsigned char __c)
4605 {
4606 #ifdef __LITTLE_ENDIAN__
4607   vector unsigned char __d = {255,255,255,255,255,255,255,255,
4608                               255,255,255,255,255,255,255,255};
4609   __d = vec_xor(__c, __d);
4610   return (vector pixel)
4611            __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4612 #else
4613   return (vector pixel)
4614            __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4615 #endif
4616 }
4617
4618 vector int __ATTRS_o_ai
4619 vec_perm(vector int __a, vector int __b, vector unsigned char __c)
4620 {
4621 #ifdef __LITTLE_ENDIAN__
4622   vector unsigned char __d = {255,255,255,255,255,255,255,255,
4623                               255,255,255,255,255,255,255,255};
4624   __d = vec_xor(__c, __d);
4625   return (vector int)__builtin_altivec_vperm_4si(__b, __a, __d);
4626 #else
4627   return (vector int)__builtin_altivec_vperm_4si(__a, __b, __c);
4628 #endif
4629 }
4630
4631 vector unsigned int __ATTRS_o_ai
4632 vec_perm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c)
4633 {
4634 #ifdef __LITTLE_ENDIAN__
4635   vector unsigned char __d = {255,255,255,255,255,255,255,255,
4636                               255,255,255,255,255,255,255,255};
4637   __d = vec_xor(__c, __d);
4638   return (vector unsigned int)
4639            __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4640 #else
4641   return (vector unsigned int)
4642            __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4643 #endif
4644 }
4645
4646 vector bool int __ATTRS_o_ai
4647 vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c)
4648 {
4649 #ifdef __LITTLE_ENDIAN__
4650   vector unsigned char __d = {255,255,255,255,255,255,255,255,
4651                               255,255,255,255,255,255,255,255};
4652   __d = vec_xor(__c, __d);
4653   return (vector bool int)
4654            __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4655 #else
4656   return (vector bool int)
4657            __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4658 #endif
4659 }
4660
4661 vector float __ATTRS_o_ai
4662 vec_perm(vector float __a, vector float __b, vector unsigned char __c)
4663 {
4664 #ifdef __LITTLE_ENDIAN__
4665   vector unsigned char __d = {255,255,255,255,255,255,255,255,
4666                               255,255,255,255,255,255,255,255};
4667   __d = vec_xor(__c, __d);
4668   return (vector float)
4669            __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4670 #else
4671   return (vector float)
4672            __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4673 #endif
4674 }
4675
4676 /* vec_vperm */
4677
4678 static vector signed char __ATTRS_o_ai
4679 vec_vperm(vector signed char __a, vector signed char __b, vector unsigned char __c)
4680 {
4681   return vec_perm(__a, __b, __c);
4682 }
4683
4684 static vector unsigned char __ATTRS_o_ai
4685 vec_vperm(vector unsigned char __a,
4686           vector unsigned char __b,
4687           vector unsigned char __c)
4688 {
4689   return vec_perm(__a, __b, __c);
4690 }
4691
4692 static vector bool char __ATTRS_o_ai
4693 vec_vperm(vector bool char __a, vector bool char __b, vector unsigned char __c)
4694 {
4695   return vec_perm(__a, __b, __c);
4696 }
4697
4698 static vector short __ATTRS_o_ai
4699 vec_vperm(vector short __a, vector short __b, vector unsigned char __c)
4700 {
4701   return vec_perm(__a, __b, __c);
4702 }
4703
4704 static vector unsigned short __ATTRS_o_ai
4705 vec_vperm(vector unsigned short __a,
4706           vector unsigned short __b,
4707           vector unsigned char __c)
4708 {
4709   return vec_perm(__a, __b, __c);
4710 }
4711
4712 static vector bool short __ATTRS_o_ai
4713 vec_vperm(vector bool short __a, vector bool short __b, vector unsigned char __c)
4714 {
4715   return vec_perm(__a, __b, __c);
4716 }
4717
4718 static vector pixel __ATTRS_o_ai
4719 vec_vperm(vector pixel __a, vector pixel __b, vector unsigned char __c)
4720 {
4721   return vec_perm(__a, __b, __c);
4722 }
4723
4724 static vector int __ATTRS_o_ai
4725 vec_vperm(vector int __a, vector int __b, vector unsigned char __c)
4726 {
4727   return vec_perm(__a, __b, __c);
4728 }
4729
4730 static vector unsigned int __ATTRS_o_ai
4731 vec_vperm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c)
4732 {
4733   return vec_perm(__a, __b, __c);
4734 }
4735
4736 static vector bool int __ATTRS_o_ai
4737 vec_vperm(vector bool int __a, vector bool int __b, vector unsigned char __c)
4738 {
4739   return vec_perm(__a, __b, __c);
4740 }
4741
4742 static vector float __ATTRS_o_ai
4743 vec_vperm(vector float __a, vector float __b, vector unsigned char __c)
4744 {
4745   return vec_perm(__a, __b, __c);
4746 }
4747
4748 /* vec_re */
4749
4750 static vector float __attribute__((__always_inline__))
4751 vec_re(vector float __a)
4752 {
4753   return __builtin_altivec_vrefp(__a);
4754 }
4755
4756 /* vec_vrefp */
4757
4758 static vector float __attribute__((__always_inline__))
4759 vec_vrefp(vector float __a)
4760 {
4761   return __builtin_altivec_vrefp(__a);
4762 }
4763
4764 /* vec_rl */
4765
4766 static vector signed char __ATTRS_o_ai
4767 vec_rl(vector signed char __a, vector unsigned char __b)
4768 {
4769   return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
4770 }
4771
4772 static vector unsigned char __ATTRS_o_ai
4773 vec_rl(vector unsigned char __a, vector unsigned char __b)
4774 {
4775   return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
4776 }
4777
4778 static vector short __ATTRS_o_ai
4779 vec_rl(vector short __a, vector unsigned short __b)
4780 {
4781   return __builtin_altivec_vrlh(__a, __b);
4782 }
4783
4784 static vector unsigned short __ATTRS_o_ai
4785 vec_rl(vector unsigned short __a, vector unsigned short __b)
4786 {
4787   return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
4788 }
4789
4790 static vector int __ATTRS_o_ai
4791 vec_rl(vector int __a, vector unsigned int __b)
4792 {
4793   return __builtin_altivec_vrlw(__a, __b);
4794 }
4795
4796 static vector unsigned int __ATTRS_o_ai
4797 vec_rl(vector unsigned int __a, vector unsigned int __b)
4798 {
4799   return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
4800 }
4801
4802 /* vec_vrlb */
4803
4804 static vector signed char __ATTRS_o_ai
4805 vec_vrlb(vector signed char __a, vector unsigned char __b)
4806 {
4807   return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
4808 }
4809
4810 static vector unsigned char __ATTRS_o_ai
4811 vec_vrlb(vector unsigned char __a, vector unsigned char __b)
4812 {
4813   return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
4814 }
4815
4816 /* vec_vrlh */
4817
4818 static vector short __ATTRS_o_ai
4819 vec_vrlh(vector short __a, vector unsigned short __b)
4820 {
4821   return __builtin_altivec_vrlh(__a, __b);
4822 }
4823
4824 static vector unsigned short __ATTRS_o_ai
4825 vec_vrlh(vector unsigned short __a, vector unsigned short __b)
4826 {
4827   return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
4828 }
4829
4830 /* vec_vrlw */
4831
4832 static vector int __ATTRS_o_ai
4833 vec_vrlw(vector int __a, vector unsigned int __b)
4834 {
4835   return __builtin_altivec_vrlw(__a, __b);
4836 }
4837
4838 static vector unsigned int __ATTRS_o_ai
4839 vec_vrlw(vector unsigned int __a, vector unsigned int __b)
4840 {
4841   return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
4842 }
4843
4844 /* vec_round */
4845
4846 static vector float __attribute__((__always_inline__))
4847 vec_round(vector float __a)
4848 {
4849   return __builtin_altivec_vrfin(__a);
4850 }
4851
4852 /* vec_vrfin */
4853
4854 static vector float __attribute__((__always_inline__))
4855 vec_vrfin(vector float __a)
4856 {
4857   return __builtin_altivec_vrfin(__a);
4858 }
4859
4860 /* vec_rsqrte */
4861
4862 static __vector float __attribute__((__always_inline__))
4863 vec_rsqrte(vector float __a)
4864 {
4865   return __builtin_altivec_vrsqrtefp(__a);
4866 }
4867
4868 /* vec_vrsqrtefp */
4869
4870 static __vector float __attribute__((__always_inline__))
4871 vec_vrsqrtefp(vector float __a)
4872 {
4873   return __builtin_altivec_vrsqrtefp(__a);
4874 }
4875
4876 /* vec_sel */
4877
4878 #define __builtin_altivec_vsel_4si vec_sel
4879
4880 static vector signed char __ATTRS_o_ai
4881 vec_sel(vector signed char __a, vector signed char __b, vector unsigned char __c)
4882 {
4883   return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
4884 }
4885
4886 static vector signed char __ATTRS_o_ai
4887 vec_sel(vector signed char __a, vector signed char __b, vector bool char __c)
4888 {
4889   return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
4890 }
4891
4892 static vector unsigned char __ATTRS_o_ai
4893 vec_sel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c)
4894 {
4895   return (__a & ~__c) | (__b & __c);
4896 }
4897
4898 static vector unsigned char __ATTRS_o_ai
4899 vec_sel(vector unsigned char __a, vector unsigned char __b, vector bool char __c)
4900 {
4901   return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
4902 }
4903
4904 static vector bool char __ATTRS_o_ai
4905 vec_sel(vector bool char __a, vector bool char __b, vector unsigned char __c)
4906 {
4907   return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
4908 }
4909
4910 static vector bool char __ATTRS_o_ai
4911 vec_sel(vector bool char __a, vector bool char __b, vector bool char __c)
4912 {
4913   return (__a & ~__c) | (__b & __c);
4914 }
4915
4916 static vector short __ATTRS_o_ai
4917 vec_sel(vector short __a, vector short __b, vector unsigned short __c)
4918 {
4919   return (__a & ~(vector short)__c) | (__b & (vector short)__c);
4920 }
4921
4922 static vector short __ATTRS_o_ai
4923 vec_sel(vector short __a, vector short __b, vector bool short __c)
4924 {
4925   return (__a & ~(vector short)__c) | (__b & (vector short)__c);
4926 }
4927
4928 static vector unsigned short __ATTRS_o_ai
4929 vec_sel(vector unsigned short __a,
4930         vector unsigned short __b,
4931         vector unsigned short __c)
4932 {
4933   return (__a & ~__c) | (__b & __c);
4934 }
4935
4936 static vector unsigned short __ATTRS_o_ai
4937 vec_sel(vector unsigned short __a, vector unsigned short __b, vector bool short __c)
4938 {
4939   return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c);
4940 }
4941
4942 static vector bool short __ATTRS_o_ai
4943 vec_sel(vector bool short __a, vector bool short __b, vector unsigned short __c)
4944 {
4945   return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
4946 }
4947
4948 static vector bool short __ATTRS_o_ai
4949 vec_sel(vector bool short __a, vector bool short __b, vector bool short __c)
4950 {
4951   return (__a & ~__c) | (__b & __c);
4952 }
4953
4954 static vector int __ATTRS_o_ai
4955 vec_sel(vector int __a, vector int __b, vector unsigned int __c)
4956 {
4957   return (__a & ~(vector int)__c) | (__b & (vector int)__c);
4958 }
4959
4960 static vector int __ATTRS_o_ai
4961 vec_sel(vector int __a, vector int __b, vector bool int __c)
4962 {
4963   return (__a & ~(vector int)__c) | (__b & (vector int)__c);
4964 }
4965
4966 static vector unsigned int __ATTRS_o_ai
4967 vec_sel(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c)
4968 {
4969   return (__a & ~__c) | (__b & __c);
4970 }
4971
4972 static vector unsigned int __ATTRS_o_ai
4973 vec_sel(vector unsigned int __a, vector unsigned int __b, vector bool int __c)
4974 {
4975   return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
4976 }
4977
4978 static vector bool int __ATTRS_o_ai
4979 vec_sel(vector bool int __a, vector bool int __b, vector unsigned int __c)
4980 {
4981   return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
4982 }
4983
4984 static vector bool int __ATTRS_o_ai
4985 vec_sel(vector bool int __a, vector bool int __b, vector bool int __c)
4986 {
4987   return (__a & ~__c) | (__b & __c);
4988 }
4989
4990 static vector float __ATTRS_o_ai
4991 vec_sel(vector float __a, vector float __b, vector unsigned int __c)
4992 {
4993   vector int __res = ((vector int)__a & ~(vector int)__c)
4994                    | ((vector int)__b & (vector int)__c);
4995   return (vector float)__res;
4996 }
4997
4998 static vector float __ATTRS_o_ai
4999 vec_sel(vector float __a, vector float __b, vector bool int __c)
5000 {
5001   vector int __res = ((vector int)__a & ~(vector int)__c)
5002                    | ((vector int)__b & (vector int)__c);
5003   return (vector float)__res;
5004 }
5005
5006 /* vec_vsel */
5007
5008 static vector signed char __ATTRS_o_ai
5009 vec_vsel(vector signed char __a, vector signed char __b, vector unsigned char __c)
5010 {
5011   return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5012 }
5013
5014 static vector signed char __ATTRS_o_ai
5015 vec_vsel(vector signed char __a, vector signed char __b, vector bool char __c)
5016 {
5017   return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5018 }
5019
5020 static vector unsigned char __ATTRS_o_ai
5021 vec_vsel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c)
5022 {
5023   return (__a & ~__c) | (__b & __c);
5024 }
5025
5026 static vector unsigned char __ATTRS_o_ai
5027 vec_vsel(vector unsigned char __a, vector unsigned char __b, vector bool char __c)
5028 {
5029   return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
5030 }
5031
5032 static vector bool char __ATTRS_o_ai
5033 vec_vsel(vector bool char __a, vector bool char __b, vector unsigned char __c)
5034 {
5035   return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
5036 }
5037
5038 static vector bool char __ATTRS_o_ai
5039 vec_vsel(vector bool char __a, vector bool char __b, vector bool char __c)
5040 {
5041   return (__a & ~__c) | (__b & __c);
5042 }
5043
5044 static vector short __ATTRS_o_ai
5045 vec_vsel(vector short __a, vector short __b, vector unsigned short __c)
5046 {
5047   return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5048 }
5049
5050 static vector short __ATTRS_o_ai
5051 vec_vsel(vector short __a, vector short __b, vector bool short __c)
5052 {
5053   return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5054 }
5055
5056 static vector unsigned short __ATTRS_o_ai
5057 vec_vsel(vector unsigned short __a,
5058          vector unsigned short __b,
5059          vector unsigned short __c)
5060 {
5061   return (__a & ~__c) | (__b & __c);
5062 }
5063
5064 static vector unsigned short __ATTRS_o_ai
5065 vec_vsel(vector unsigned short __a, vector unsigned short __b, vector bool short __c)
5066 {
5067   return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c);
5068 }
5069
5070 static vector bool short __ATTRS_o_ai
5071 vec_vsel(vector bool short __a, vector bool short __b, vector unsigned short __c)
5072 {
5073   return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
5074 }
5075
5076 static vector bool short __ATTRS_o_ai
5077 vec_vsel(vector bool short __a, vector bool short __b, vector bool short __c)
5078 {
5079   return (__a & ~__c) | (__b & __c);
5080 }
5081
5082 static vector int __ATTRS_o_ai
5083 vec_vsel(vector int __a, vector int __b, vector unsigned int __c)
5084 {
5085   return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5086 }
5087
5088 static vector int __ATTRS_o_ai
5089 vec_vsel(vector int __a, vector int __b, vector bool int __c)
5090 {
5091   return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5092 }
5093
5094 static vector unsigned int __ATTRS_o_ai
5095 vec_vsel(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c)
5096 {
5097   return (__a & ~__c) | (__b & __c);
5098 }
5099
5100 static vector unsigned int __ATTRS_o_ai
5101 vec_vsel(vector unsigned int __a, vector unsigned int __b, vector bool int __c)
5102 {
5103   return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
5104 }
5105
5106 static vector bool int __ATTRS_o_ai
5107 vec_vsel(vector bool int __a, vector bool int __b, vector unsigned int __c)
5108 {
5109   return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
5110 }
5111
5112 static vector bool int __ATTRS_o_ai
5113 vec_vsel(vector bool int __a, vector bool int __b, vector bool int __c)
5114 {
5115   return (__a & ~__c) | (__b & __c);
5116 }
5117
5118 static vector float __ATTRS_o_ai
5119 vec_vsel(vector float __a, vector float __b, vector unsigned int __c)
5120 {
5121   vector int __res = ((vector int)__a & ~(vector int)__c)
5122                    | ((vector int)__b & (vector int)__c);
5123   return (vector float)__res;
5124 }
5125
5126 static vector float __ATTRS_o_ai
5127 vec_vsel(vector float __a, vector float __b, vector bool int __c)
5128 {
5129   vector int __res = ((vector int)__a & ~(vector int)__c)
5130                    | ((vector int)__b & (vector int)__c);
5131   return (vector float)__res;
5132 }
5133
5134 /* vec_sl */
5135
5136 static vector signed char __ATTRS_o_ai
5137 vec_sl(vector signed char __a, vector unsigned char __b)
5138 {
5139   return __a << (vector signed char)__b;
5140 }
5141
5142 static vector unsigned char __ATTRS_o_ai
5143 vec_sl(vector unsigned char __a, vector unsigned char __b)
5144 {
5145   return __a << __b;
5146 }
5147
5148 static vector short __ATTRS_o_ai
5149 vec_sl(vector short __a, vector unsigned short __b)
5150 {
5151   return __a << (vector short)__b;
5152 }
5153
5154 static vector unsigned short __ATTRS_o_ai
5155 vec_sl(vector unsigned short __a, vector unsigned short __b)
5156 {
5157   return __a << __b;
5158 }
5159
5160 static vector int __ATTRS_o_ai
5161 vec_sl(vector int __a, vector unsigned int __b)
5162 {
5163   return __a << (vector int)__b;
5164 }
5165
5166 static vector unsigned int __ATTRS_o_ai
5167 vec_sl(vector unsigned int __a, vector unsigned int __b)
5168 {
5169   return __a << __b;
5170 }
5171
5172 /* vec_vslb */
5173
5174 #define __builtin_altivec_vslb vec_vslb
5175
5176 static vector signed char __ATTRS_o_ai
5177 vec_vslb(vector signed char __a, vector unsigned char __b)
5178 {
5179   return vec_sl(__a, __b);
5180 }
5181
5182 static vector unsigned char __ATTRS_o_ai
5183 vec_vslb(vector unsigned char __a, vector unsigned char __b)
5184 {
5185   return vec_sl(__a, __b);
5186 }
5187
5188 /* vec_vslh */
5189
5190 #define __builtin_altivec_vslh vec_vslh
5191
5192 static vector short __ATTRS_o_ai
5193 vec_vslh(vector short __a, vector unsigned short __b)
5194 {
5195   return vec_sl(__a, __b);
5196 }
5197
5198 static vector unsigned short __ATTRS_o_ai
5199 vec_vslh(vector unsigned short __a, vector unsigned short __b)
5200 {
5201   return vec_sl(__a, __b);
5202 }
5203
5204 /* vec_vslw */
5205
5206 #define __builtin_altivec_vslw vec_vslw
5207
5208 static vector int __ATTRS_o_ai
5209 vec_vslw(vector int __a, vector unsigned int __b)
5210 {
5211   return vec_sl(__a, __b);
5212 }
5213
5214 static vector unsigned int __ATTRS_o_ai
5215 vec_vslw(vector unsigned int __a, vector unsigned int __b)
5216 {
5217   return vec_sl(__a, __b);
5218 }
5219
5220 /* vec_sld */
5221
5222 #define __builtin_altivec_vsldoi_4si vec_sld
5223
5224 static vector signed char __ATTRS_o_ai
5225 vec_sld(vector signed char __a, vector signed char __b, unsigned char __c)
5226 {
5227   return vec_perm(__a, __b, (vector unsigned char)
5228     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5229      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5230 }
5231
5232 static vector unsigned char __ATTRS_o_ai
5233 vec_sld(vector unsigned char __a, vector unsigned char __b, unsigned char __c)
5234 {
5235   return vec_perm(__a, __b, (vector unsigned char)
5236     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5237      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5238 }
5239
5240 static vector short __ATTRS_o_ai
5241 vec_sld(vector short __a, vector short __b, unsigned char __c)
5242 {
5243   return vec_perm(__a, __b, (vector unsigned char)
5244     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5245      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5246 }
5247
5248 static vector unsigned short __ATTRS_o_ai
5249 vec_sld(vector unsigned short __a, vector unsigned short __b, unsigned char __c)
5250 {
5251   return vec_perm(__a, __b, (vector unsigned char)
5252     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5253      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5254 }
5255
5256 static vector pixel __ATTRS_o_ai
5257 vec_sld(vector pixel __a, vector pixel __b, unsigned char __c)
5258 {
5259   return vec_perm(__a, __b, (vector unsigned char)
5260     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5261      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5262 }
5263
5264 static vector int __ATTRS_o_ai
5265 vec_sld(vector int __a, vector int __b, unsigned char __c)
5266 {
5267   return vec_perm(__a, __b, (vector unsigned char)
5268     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5269      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5270 }
5271
5272 static vector unsigned int __ATTRS_o_ai
5273 vec_sld(vector unsigned int __a, vector unsigned int __b, unsigned char __c)
5274 {
5275   return vec_perm(__a, __b, (vector unsigned char)
5276     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5277      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5278 }
5279
5280 static vector float __ATTRS_o_ai
5281 vec_sld(vector float __a, vector float __b, unsigned char __c)
5282 {
5283   return vec_perm(__a, __b, (vector unsigned char)
5284     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5285      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5286 }
5287
5288 /* vec_vsldoi */
5289
5290 static vector signed char __ATTRS_o_ai
5291 vec_vsldoi(vector signed char __a, vector signed char __b, unsigned char __c)
5292 {
5293   return vec_perm(__a, __b, (vector unsigned char)
5294     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5295      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5296 }
5297
5298 static vector unsigned char __ATTRS_o_ai
5299 vec_vsldoi(vector unsigned char __a, vector unsigned char __b, unsigned char __c)
5300 {
5301   return vec_perm(__a, __b, (vector unsigned char)
5302     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5303      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5304 }
5305
5306 static vector short __ATTRS_o_ai
5307 vec_vsldoi(vector short __a, vector short __b, unsigned char __c)
5308 {
5309   return vec_perm(__a, __b, (vector unsigned char)
5310     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5311      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5312 }
5313
5314 static vector unsigned short __ATTRS_o_ai
5315 vec_vsldoi(vector unsigned short __a, vector unsigned short __b, unsigned char __c)
5316 {
5317   return vec_perm(__a, __b, (vector unsigned char)
5318     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5319      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5320 }
5321
5322 static vector pixel __ATTRS_o_ai
5323 vec_vsldoi(vector pixel __a, vector pixel __b, unsigned char __c)
5324 {
5325   return vec_perm(__a, __b, (vector unsigned char)
5326     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5327      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5328 }
5329
5330 static vector int __ATTRS_o_ai
5331 vec_vsldoi(vector int __a, vector int __b, unsigned char __c)
5332 {
5333   return vec_perm(__a, __b, (vector unsigned char)
5334     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5335      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5336 }
5337
5338 static vector unsigned int __ATTRS_o_ai
5339 vec_vsldoi(vector unsigned int __a, vector unsigned int __b, unsigned char __c)
5340 {
5341   return vec_perm(__a, __b, (vector unsigned char)
5342     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5343      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5344 }
5345
5346 static vector float __ATTRS_o_ai
5347 vec_vsldoi(vector float __a, vector float __b, unsigned char __c)
5348 {
5349   return vec_perm(__a, __b, (vector unsigned char)
5350     (__c,   __c+1, __c+2,  __c+3,  __c+4,  __c+5,  __c+6,  __c+7,
5351      __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5352 }
5353
5354 /* vec_sll */
5355
5356 static vector signed char __ATTRS_o_ai
5357 vec_sll(vector signed char __a, vector unsigned char __b)
5358 {
5359   return (vector signed char)
5360            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5361 }
5362
5363 static vector signed char __ATTRS_o_ai
5364 vec_sll(vector signed char __a, vector unsigned short __b)
5365 {
5366   return (vector signed char)
5367            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5368 }
5369
5370 static vector signed char __ATTRS_o_ai
5371 vec_sll(vector signed char __a, vector unsigned int __b)
5372 {
5373   return (vector signed char)
5374            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5375 }
5376
5377 static vector unsigned char __ATTRS_o_ai
5378 vec_sll(vector unsigned char __a, vector unsigned char __b)
5379 {
5380   return (vector unsigned char)
5381            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5382 }
5383
5384 static vector unsigned char __ATTRS_o_ai
5385 vec_sll(vector unsigned char __a, vector unsigned short __b)
5386 {
5387   return (vector unsigned char)
5388            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5389 }
5390
5391 static vector unsigned char __ATTRS_o_ai
5392 vec_sll(vector unsigned char __a, vector unsigned int __b)
5393 {
5394   return (vector unsigned char)
5395            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5396 }
5397
5398 static vector bool char __ATTRS_o_ai
5399 vec_sll(vector bool char __a, vector unsigned char __b)
5400 {
5401   return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5402 }
5403
5404 static vector bool char __ATTRS_o_ai
5405 vec_sll(vector bool char __a, vector unsigned short __b)
5406 {
5407   return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5408 }
5409
5410 static vector bool char __ATTRS_o_ai
5411 vec_sll(vector bool char __a, vector unsigned int __b)
5412 {
5413   return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5414 }
5415
5416 static vector short __ATTRS_o_ai
5417 vec_sll(vector short __a, vector unsigned char __b)
5418 {
5419   return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5420 }
5421
5422 static vector short __ATTRS_o_ai
5423 vec_sll(vector short __a, vector unsigned short __b)
5424 {
5425   return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5426 }
5427
5428 static vector short __ATTRS_o_ai
5429 vec_sll(vector short __a, vector unsigned int __b)
5430 {
5431   return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5432 }
5433
5434 static vector unsigned short __ATTRS_o_ai
5435 vec_sll(vector unsigned short __a, vector unsigned char __b)
5436 {
5437   return (vector unsigned short)
5438            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5439 }
5440
5441 static vector unsigned short __ATTRS_o_ai
5442 vec_sll(vector unsigned short __a, vector unsigned short __b)
5443 {
5444   return (vector unsigned short)
5445            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5446 }
5447
5448 static vector unsigned short __ATTRS_o_ai
5449 vec_sll(vector unsigned short __a, vector unsigned int __b)
5450 {
5451   return (vector unsigned short)
5452            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5453 }
5454
5455 static vector bool short __ATTRS_o_ai
5456 vec_sll(vector bool short __a, vector unsigned char __b)
5457 {
5458   return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5459 }
5460
5461 static vector bool short __ATTRS_o_ai
5462 vec_sll(vector bool short __a, vector unsigned short __b)
5463 {
5464   return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5465 }
5466
5467 static vector bool short __ATTRS_o_ai
5468 vec_sll(vector bool short __a, vector unsigned int __b)
5469 {
5470   return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5471 }
5472
5473 static vector pixel __ATTRS_o_ai
5474 vec_sll(vector pixel __a, vector unsigned char __b)
5475 {
5476   return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5477 }
5478
5479 static vector pixel __ATTRS_o_ai
5480 vec_sll(vector pixel __a, vector unsigned short __b)
5481 {
5482   return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5483 }
5484
5485 static vector pixel __ATTRS_o_ai
5486 vec_sll(vector pixel __a, vector unsigned int __b)
5487 {
5488   return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5489 }
5490
5491 static vector int __ATTRS_o_ai
5492 vec_sll(vector int __a, vector unsigned char __b)
5493 {
5494   return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5495 }
5496
5497 static vector int __ATTRS_o_ai
5498 vec_sll(vector int __a, vector unsigned short __b)
5499 {
5500   return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5501 }
5502
5503 static vector int __ATTRS_o_ai
5504 vec_sll(vector int __a, vector unsigned int __b)
5505 {
5506   return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5507 }
5508
5509 static vector unsigned int __ATTRS_o_ai
5510 vec_sll(vector unsigned int __a, vector unsigned char __b)
5511 {
5512   return (vector unsigned int)
5513            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5514 }
5515
5516 static vector unsigned int __ATTRS_o_ai
5517 vec_sll(vector unsigned int __a, vector unsigned short __b)
5518 {
5519   return (vector unsigned int)
5520            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5521 }
5522
5523 static vector unsigned int __ATTRS_o_ai
5524 vec_sll(vector unsigned int __a, vector unsigned int __b)
5525 {
5526   return (vector unsigned int)
5527            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5528 }
5529
5530 static vector bool int __ATTRS_o_ai
5531 vec_sll(vector bool int __a, vector unsigned char __b)
5532 {
5533   return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5534 }
5535
5536 static vector bool int __ATTRS_o_ai
5537 vec_sll(vector bool int __a, vector unsigned short __b)
5538 {
5539   return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5540 }
5541
5542 static vector bool int __ATTRS_o_ai
5543 vec_sll(vector bool int __a, vector unsigned int __b)
5544 {
5545   return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5546 }
5547
5548 /* vec_vsl */
5549
5550 static vector signed char __ATTRS_o_ai
5551 vec_vsl(vector signed char __a, vector unsigned char __b)
5552 {
5553   return (vector signed char)
5554            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5555 }
5556
5557 static vector signed char __ATTRS_o_ai
5558 vec_vsl(vector signed char __a, vector unsigned short __b)
5559 {
5560   return (vector signed char)
5561            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5562 }
5563
5564 static vector signed char __ATTRS_o_ai
5565 vec_vsl(vector signed char __a, vector unsigned int __b)
5566 {
5567   return (vector signed char)
5568            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5569 }
5570
5571 static vector unsigned char __ATTRS_o_ai
5572 vec_vsl(vector unsigned char __a, vector unsigned char __b)
5573 {
5574   return (vector unsigned char)
5575            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5576 }
5577
5578 static vector unsigned char __ATTRS_o_ai
5579 vec_vsl(vector unsigned char __a, vector unsigned short __b)
5580 {
5581   return (vector unsigned char)
5582            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5583 }
5584
5585 static vector unsigned char __ATTRS_o_ai
5586 vec_vsl(vector unsigned char __a, vector unsigned int __b)
5587 {
5588   return (vector unsigned char)
5589            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5590 }
5591
5592 static vector bool char __ATTRS_o_ai
5593 vec_vsl(vector bool char __a, vector unsigned char __b)
5594 {
5595   return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5596 }
5597
5598 static vector bool char __ATTRS_o_ai
5599 vec_vsl(vector bool char __a, vector unsigned short __b)
5600 {
5601   return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5602 }
5603
5604 static vector bool char __ATTRS_o_ai
5605 vec_vsl(vector bool char __a, vector unsigned int __b)
5606 {
5607   return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5608 }
5609
5610 static vector short __ATTRS_o_ai
5611 vec_vsl(vector short __a, vector unsigned char __b)
5612 {
5613   return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5614 }
5615
5616 static vector short __ATTRS_o_ai
5617 vec_vsl(vector short __a, vector unsigned short __b)
5618 {
5619   return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5620 }
5621
5622 static vector short __ATTRS_o_ai
5623 vec_vsl(vector short __a, vector unsigned int __b)
5624 {
5625   return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5626 }
5627
5628 static vector unsigned short __ATTRS_o_ai
5629 vec_vsl(vector unsigned short __a, vector unsigned char __b)
5630 {
5631   return (vector unsigned short)
5632            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5633 }
5634
5635 static vector unsigned short __ATTRS_o_ai
5636 vec_vsl(vector unsigned short __a, vector unsigned short __b)
5637 {
5638   return (vector unsigned short)
5639            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5640 }
5641
5642 static vector unsigned short __ATTRS_o_ai
5643 vec_vsl(vector unsigned short __a, vector unsigned int __b)
5644 {
5645   return (vector unsigned short)
5646            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5647 }
5648
5649 static vector bool short __ATTRS_o_ai
5650 vec_vsl(vector bool short __a, vector unsigned char __b)
5651 {
5652   return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5653 }
5654
5655 static vector bool short __ATTRS_o_ai
5656 vec_vsl(vector bool short __a, vector unsigned short __b)
5657 {
5658   return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5659 }
5660
5661 static vector bool short __ATTRS_o_ai
5662 vec_vsl(vector bool short __a, vector unsigned int __b)
5663 {
5664   return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5665 }
5666
5667 static vector pixel __ATTRS_o_ai
5668 vec_vsl(vector pixel __a, vector unsigned char __b)
5669 {
5670   return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5671 }
5672
5673 static vector pixel __ATTRS_o_ai
5674 vec_vsl(vector pixel __a, vector unsigned short __b)
5675 {
5676   return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5677 }
5678
5679 static vector pixel __ATTRS_o_ai
5680 vec_vsl(vector pixel __a, vector unsigned int __b)
5681 {
5682   return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5683 }
5684
5685 static vector int __ATTRS_o_ai
5686 vec_vsl(vector int __a, vector unsigned char __b)
5687 {
5688   return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5689 }
5690
5691 static vector int __ATTRS_o_ai
5692 vec_vsl(vector int __a, vector unsigned short __b)
5693 {
5694   return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5695 }
5696
5697 static vector int __ATTRS_o_ai
5698 vec_vsl(vector int __a, vector unsigned int __b)
5699 {
5700   return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5701 }
5702
5703 static vector unsigned int __ATTRS_o_ai
5704 vec_vsl(vector unsigned int __a, vector unsigned char __b)
5705 {
5706   return (vector unsigned int)
5707            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5708 }
5709
5710 static vector unsigned int __ATTRS_o_ai
5711 vec_vsl(vector unsigned int __a, vector unsigned short __b)
5712 {
5713   return (vector unsigned int)
5714            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5715 }
5716
5717 static vector unsigned int __ATTRS_o_ai
5718 vec_vsl(vector unsigned int __a, vector unsigned int __b)
5719 {
5720   return (vector unsigned int)
5721            __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5722 }
5723
5724 static vector bool int __ATTRS_o_ai
5725 vec_vsl(vector bool int __a, vector unsigned char __b)
5726 {
5727   return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5728 }
5729
5730 static vector bool int __ATTRS_o_ai
5731 vec_vsl(vector bool int __a, vector unsigned short __b)
5732 {
5733   return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5734 }
5735
5736 static vector bool int __ATTRS_o_ai
5737 vec_vsl(vector bool int __a, vector unsigned int __b)
5738 {
5739   return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5740 }
5741
5742 /* vec_slo */
5743
5744 static vector signed char __ATTRS_o_ai
5745 vec_slo(vector signed char __a, vector signed char __b)
5746 {
5747   return (vector signed char)
5748            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5749 }
5750
5751 static vector signed char __ATTRS_o_ai
5752 vec_slo(vector signed char __a, vector unsigned char __b)
5753 {
5754   return (vector signed char)
5755            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5756 }
5757
5758 static vector unsigned char __ATTRS_o_ai
5759 vec_slo(vector unsigned char __a, vector signed char __b)
5760 {
5761   return (vector unsigned char)
5762            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5763 }
5764
5765 static vector unsigned char __ATTRS_o_ai
5766 vec_slo(vector unsigned char __a, vector unsigned char __b)
5767 {
5768   return (vector unsigned char)
5769            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5770 }
5771
5772 static vector short __ATTRS_o_ai
5773 vec_slo(vector short __a, vector signed char __b)
5774 {
5775   return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5776 }
5777
5778 static vector short __ATTRS_o_ai
5779 vec_slo(vector short __a, vector unsigned char __b)
5780 {
5781   return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5782 }
5783
5784 static vector unsigned short __ATTRS_o_ai
5785 vec_slo(vector unsigned short __a, vector signed char __b)
5786 {
5787   return (vector unsigned short)
5788            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5789 }
5790
5791 static vector unsigned short __ATTRS_o_ai
5792 vec_slo(vector unsigned short __a, vector unsigned char __b)
5793 {
5794   return (vector unsigned short)
5795            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5796 }
5797
5798 static vector pixel __ATTRS_o_ai
5799 vec_slo(vector pixel __a, vector signed char __b)
5800 {
5801   return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5802 }
5803
5804 static vector pixel __ATTRS_o_ai
5805 vec_slo(vector pixel __a, vector unsigned char __b)
5806 {
5807   return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5808 }
5809
5810 static vector int __ATTRS_o_ai
5811 vec_slo(vector int __a, vector signed char __b)
5812 {
5813   return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
5814 }
5815
5816 static vector int __ATTRS_o_ai
5817 vec_slo(vector int __a, vector unsigned char __b)
5818 {
5819   return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
5820 }
5821
5822 static vector unsigned int __ATTRS_o_ai
5823 vec_slo(vector unsigned int __a, vector signed char __b)
5824 {
5825   return (vector unsigned int)
5826            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5827 }
5828
5829 static vector unsigned int __ATTRS_o_ai
5830 vec_slo(vector unsigned int __a, vector unsigned char __b)
5831 {
5832   return (vector unsigned int)
5833            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5834 }
5835
5836 static vector float __ATTRS_o_ai
5837 vec_slo(vector float __a, vector signed char __b)
5838 {
5839   return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5840 }
5841
5842 static vector float __ATTRS_o_ai
5843 vec_slo(vector float __a, vector unsigned char __b)
5844 {
5845   return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5846 }
5847
5848 /* vec_vslo */
5849
5850 static vector signed char __ATTRS_o_ai
5851 vec_vslo(vector signed char __a, vector signed char __b)
5852 {
5853   return (vector signed char)
5854            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5855 }
5856
5857 static vector signed char __ATTRS_o_ai
5858 vec_vslo(vector signed char __a, vector unsigned char __b)
5859 {
5860   return (vector signed char)
5861            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5862 }
5863
5864 static vector unsigned char __ATTRS_o_ai
5865 vec_vslo(vector unsigned char __a, vector signed char __b)
5866 {
5867   return (vector unsigned char)
5868            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5869 }
5870
5871 static vector unsigned char __ATTRS_o_ai
5872 vec_vslo(vector unsigned char __a, vector unsigned char __b)
5873 {
5874   return (vector unsigned char)
5875            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5876 }
5877
5878 static vector short __ATTRS_o_ai
5879 vec_vslo(vector short __a, vector signed char __b)
5880 {
5881   return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5882 }
5883
5884 static vector short __ATTRS_o_ai
5885 vec_vslo(vector short __a, vector unsigned char __b)
5886 {
5887   return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5888 }
5889
5890 static vector unsigned short __ATTRS_o_ai
5891 vec_vslo(vector unsigned short __a, vector signed char __b)
5892 {
5893   return (vector unsigned short)
5894            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5895 }
5896
5897 static vector unsigned short __ATTRS_o_ai
5898 vec_vslo(vector unsigned short __a, vector unsigned char __b)
5899 {
5900   return (vector unsigned short)
5901            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5902 }
5903
5904 static vector pixel __ATTRS_o_ai
5905 vec_vslo(vector pixel __a, vector signed char __b)
5906 {
5907   return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5908 }
5909
5910 static vector pixel __ATTRS_o_ai
5911 vec_vslo(vector pixel __a, vector unsigned char __b)
5912 {
5913   return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5914 }
5915
5916 static vector int __ATTRS_o_ai
5917 vec_vslo(vector int __a, vector signed char __b)
5918 {
5919   return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
5920 }
5921
5922 static vector int __ATTRS_o_ai
5923 vec_vslo(vector int __a, vector unsigned char __b)
5924 {
5925   return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
5926 }
5927
5928 static vector unsigned int __ATTRS_o_ai
5929 vec_vslo(vector unsigned int __a, vector signed char __b)
5930 {
5931   return (vector unsigned int)
5932            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5933 }
5934
5935 static vector unsigned int __ATTRS_o_ai
5936 vec_vslo(vector unsigned int __a, vector unsigned char __b)
5937 {
5938   return (vector unsigned int)
5939            __builtin_altivec_vslo((vector int)__a, (vector int)__b);
5940 }
5941
5942 static vector float __ATTRS_o_ai
5943 vec_vslo(vector float __a, vector signed char __b)
5944 {
5945   return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5946 }
5947
5948 static vector float __ATTRS_o_ai
5949 vec_vslo(vector float __a, vector unsigned char __b)
5950 {
5951   return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
5952 }
5953
5954 /* vec_splat */
5955
5956 static vector signed char __ATTRS_o_ai
5957 vec_splat(vector signed char __a, unsigned char __b)
5958 {
5959   return vec_perm(__a, __a, (vector unsigned char)(__b));
5960 }
5961
5962 static vector unsigned char __ATTRS_o_ai
5963 vec_splat(vector unsigned char __a, unsigned char __b)
5964 {
5965   return vec_perm(__a, __a, (vector unsigned char)(__b));
5966 }
5967
5968 static vector bool char __ATTRS_o_ai
5969 vec_splat(vector bool char __a, unsigned char __b)
5970 {
5971   return vec_perm(__a, __a, (vector unsigned char)(__b));
5972 }
5973
5974 static vector short __ATTRS_o_ai
5975 vec_splat(vector short __a, unsigned char __b)
5976
5977   __b *= 2;
5978   unsigned char b1=__b+1;
5979   return vec_perm(__a, __a, (vector unsigned char)
5980     (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
5981 }
5982
5983 static vector unsigned short __ATTRS_o_ai
5984 vec_splat(vector unsigned short __a, unsigned char __b)
5985
5986   __b *= 2;
5987   unsigned char b1=__b+1;
5988   return vec_perm(__a, __a, (vector unsigned char)
5989     (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
5990 }
5991
5992 static vector bool short __ATTRS_o_ai
5993 vec_splat(vector bool short __a, unsigned char __b)
5994
5995   __b *= 2;
5996   unsigned char b1=__b+1;
5997   return vec_perm(__a, __a, (vector unsigned char)
5998     (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
5999 }
6000
6001 static vector pixel __ATTRS_o_ai
6002 vec_splat(vector pixel __a, unsigned char __b)
6003
6004   __b *= 2;
6005   unsigned char b1=__b+1;
6006   return vec_perm(__a, __a, (vector unsigned char)
6007     (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6008 }
6009
6010 static vector int __ATTRS_o_ai
6011 vec_splat(vector int __a, unsigned char __b)
6012
6013   __b *= 4;
6014   unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6015   return vec_perm(__a, __a, (vector unsigned char)
6016     (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6017 }
6018
6019 static vector unsigned int __ATTRS_o_ai
6020 vec_splat(vector unsigned int __a, unsigned char __b)
6021
6022   __b *= 4;
6023   unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6024   return vec_perm(__a, __a, (vector unsigned char)
6025     (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6026 }
6027
6028 static vector bool int __ATTRS_o_ai
6029 vec_splat(vector bool int __a, unsigned char __b)
6030
6031   __b *= 4;
6032   unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6033   return vec_perm(__a, __a, (vector unsigned char)
6034     (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6035 }
6036
6037 static vector float __ATTRS_o_ai
6038 vec_splat(vector float __a, unsigned char __b)
6039
6040   __b *= 4;
6041   unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6042   return vec_perm(__a, __a, (vector unsigned char)
6043     (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6044 }
6045
6046 /* vec_vspltb */
6047
6048 #define __builtin_altivec_vspltb vec_vspltb
6049
6050 static vector signed char __ATTRS_o_ai
6051 vec_vspltb(vector signed char __a, unsigned char __b)
6052 {
6053   return vec_perm(__a, __a, (vector unsigned char)(__b));
6054 }
6055
6056 static vector unsigned char __ATTRS_o_ai
6057 vec_vspltb(vector unsigned char __a, unsigned char __b)
6058 {
6059   return vec_perm(__a, __a, (vector unsigned char)(__b));
6060 }
6061
6062 static vector bool char __ATTRS_o_ai
6063 vec_vspltb(vector bool char __a, unsigned char __b)
6064 {
6065   return vec_perm(__a, __a, (vector unsigned char)(__b));
6066 }
6067
6068 /* vec_vsplth */
6069
6070 #define __builtin_altivec_vsplth vec_vsplth
6071
6072 static vector short __ATTRS_o_ai
6073 vec_vsplth(vector short __a, unsigned char __b)
6074 {
6075   __b *= 2;
6076   unsigned char b1=__b+1;
6077   return vec_perm(__a, __a, (vector unsigned char)
6078     (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6079 }
6080
6081 static vector unsigned short __ATTRS_o_ai
6082 vec_vsplth(vector unsigned short __a, unsigned char __b)
6083 {
6084   __b *= 2;
6085   unsigned char b1=__b+1;
6086   return vec_perm(__a, __a, (vector unsigned char)
6087     (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6088 }
6089
6090 static vector bool short __ATTRS_o_ai
6091 vec_vsplth(vector bool short __a, unsigned char __b)
6092 {
6093   __b *= 2;
6094   unsigned char b1=__b+1;
6095   return vec_perm(__a, __a, (vector unsigned char)
6096     (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6097 }
6098
6099 static vector pixel __ATTRS_o_ai
6100 vec_vsplth(vector pixel __a, unsigned char __b)
6101 {
6102   __b *= 2;
6103   unsigned char b1=__b+1;
6104   return vec_perm(__a, __a, (vector unsigned char)
6105     (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6106 }
6107
6108 /* vec_vspltw */
6109
6110 #define __builtin_altivec_vspltw vec_vspltw
6111
6112 static vector int __ATTRS_o_ai
6113 vec_vspltw(vector int __a, unsigned char __b)
6114 {
6115   __b *= 4;
6116   unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6117   return vec_perm(__a, __a, (vector unsigned char)
6118     (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6119 }
6120
6121 static vector unsigned int __ATTRS_o_ai
6122 vec_vspltw(vector unsigned int __a, unsigned char __b)
6123 {
6124   __b *= 4;
6125   unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6126   return vec_perm(__a, __a, (vector unsigned char)
6127     (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6128 }
6129
6130 static vector bool int __ATTRS_o_ai
6131 vec_vspltw(vector bool int __a, unsigned char __b)
6132 {
6133   __b *= 4;
6134   unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6135   return vec_perm(__a, __a, (vector unsigned char)
6136     (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6137 }
6138
6139 static vector float __ATTRS_o_ai
6140 vec_vspltw(vector float __a, unsigned char __b)
6141 {
6142   __b *= 4;
6143   unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6144   return vec_perm(__a, __a, (vector unsigned char)
6145     (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6146 }
6147
6148 /* vec_splat_s8 */
6149
6150 #define __builtin_altivec_vspltisb vec_splat_s8
6151
6152 // FIXME: parameter should be treated as 5-bit signed literal
6153 static vector signed char __ATTRS_o_ai
6154 vec_splat_s8(signed char __a)
6155 {
6156   return (vector signed char)(__a);
6157 }
6158
6159 /* vec_vspltisb */
6160
6161 // FIXME: parameter should be treated as 5-bit signed literal
6162 static vector signed char __ATTRS_o_ai
6163 vec_vspltisb(signed char __a)
6164 {
6165   return (vector signed char)(__a);
6166 }
6167
6168 /* vec_splat_s16 */
6169
6170 #define __builtin_altivec_vspltish vec_splat_s16
6171
6172 // FIXME: parameter should be treated as 5-bit signed literal
6173 static vector short __ATTRS_o_ai
6174 vec_splat_s16(signed char __a)
6175 {
6176   return (vector short)(__a);
6177 }
6178
6179 /* vec_vspltish */
6180
6181 // FIXME: parameter should be treated as 5-bit signed literal
6182 static vector short __ATTRS_o_ai
6183 vec_vspltish(signed char __a)
6184 {
6185   return (vector short)(__a);
6186 }
6187
6188 /* vec_splat_s32 */
6189
6190 #define __builtin_altivec_vspltisw vec_splat_s32
6191
6192 // FIXME: parameter should be treated as 5-bit signed literal
6193 static vector int __ATTRS_o_ai
6194 vec_splat_s32(signed char __a)
6195 {
6196   return (vector int)(__a);
6197 }
6198
6199 /* vec_vspltisw */
6200
6201 // FIXME: parameter should be treated as 5-bit signed literal
6202 static vector int __ATTRS_o_ai
6203 vec_vspltisw(signed char __a)
6204 {
6205   return (vector int)(__a);
6206 }
6207
6208 /* vec_splat_u8 */
6209
6210 // FIXME: parameter should be treated as 5-bit signed literal
6211 static vector unsigned char __ATTRS_o_ai
6212 vec_splat_u8(unsigned char __a)
6213 {
6214   return (vector unsigned char)(__a);
6215 }
6216
6217 /* vec_splat_u16 */
6218
6219 // FIXME: parameter should be treated as 5-bit signed literal
6220 static vector unsigned short __ATTRS_o_ai
6221 vec_splat_u16(signed char __a)
6222 {
6223   return (vector unsigned short)(__a);
6224 }
6225
6226 /* vec_splat_u32 */
6227
6228 // FIXME: parameter should be treated as 5-bit signed literal
6229 static vector unsigned int __ATTRS_o_ai
6230 vec_splat_u32(signed char __a)
6231 {
6232   return (vector unsigned int)(__a);
6233 }
6234
6235 /* vec_sr */
6236
6237 static vector signed char __ATTRS_o_ai
6238 vec_sr(vector signed char __a, vector unsigned char __b)
6239 {
6240   return __a >> (vector signed char)__b;
6241 }
6242
6243 static vector unsigned char __ATTRS_o_ai
6244 vec_sr(vector unsigned char __a, vector unsigned char __b)
6245 {
6246   return __a >> __b;
6247 }
6248
6249 static vector short __ATTRS_o_ai
6250 vec_sr(vector short __a, vector unsigned short __b)
6251 {
6252   return __a >> (vector short)__b;
6253 }
6254
6255 static vector unsigned short __ATTRS_o_ai
6256 vec_sr(vector unsigned short __a, vector unsigned short __b)
6257 {
6258   return __a >> __b;
6259 }
6260
6261 static vector int __ATTRS_o_ai
6262 vec_sr(vector int __a, vector unsigned int __b)
6263 {
6264   return __a >> (vector int)__b;
6265 }
6266
6267 static vector unsigned int __ATTRS_o_ai
6268 vec_sr(vector unsigned int __a, vector unsigned int __b)
6269 {
6270   return __a >> __b;
6271 }
6272
6273 /* vec_vsrb */
6274
6275 #define __builtin_altivec_vsrb vec_vsrb
6276
6277 static vector signed char __ATTRS_o_ai
6278 vec_vsrb(vector signed char __a, vector unsigned char __b)
6279 {
6280   return __a >> (vector signed char)__b;
6281 }
6282
6283 static vector unsigned char __ATTRS_o_ai
6284 vec_vsrb(vector unsigned char __a, vector unsigned char __b)
6285 {
6286   return __a >> __b;
6287 }
6288
6289 /* vec_vsrh */
6290
6291 #define __builtin_altivec_vsrh vec_vsrh
6292
6293 static vector short __ATTRS_o_ai
6294 vec_vsrh(vector short __a, vector unsigned short __b)
6295 {
6296   return __a >> (vector short)__b;
6297 }
6298
6299 static vector unsigned short __ATTRS_o_ai
6300 vec_vsrh(vector unsigned short __a, vector unsigned short __b)
6301 {
6302   return __a >> __b;
6303 }
6304
6305 /* vec_vsrw */
6306
6307 #define __builtin_altivec_vsrw vec_vsrw
6308
6309 static vector int __ATTRS_o_ai
6310 vec_vsrw(vector int __a, vector unsigned int __b)
6311 {
6312   return __a >> (vector int)__b;
6313 }
6314
6315 static vector unsigned int __ATTRS_o_ai
6316 vec_vsrw(vector unsigned int __a, vector unsigned int __b)
6317 {
6318   return __a >> __b;
6319 }
6320
6321 /* vec_sra */
6322
6323 static vector signed char __ATTRS_o_ai
6324 vec_sra(vector signed char __a, vector unsigned char __b)
6325 {
6326   return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
6327 }
6328
6329 static vector unsigned char __ATTRS_o_ai
6330 vec_sra(vector unsigned char __a, vector unsigned char __b)
6331 {
6332   return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
6333 }
6334
6335 static vector short __ATTRS_o_ai
6336 vec_sra(vector short __a, vector unsigned short __b)
6337 {
6338   return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
6339 }
6340
6341 static vector unsigned short __ATTRS_o_ai
6342 vec_sra(vector unsigned short __a, vector unsigned short __b)
6343 {
6344   return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
6345 }
6346
6347 static vector int __ATTRS_o_ai
6348 vec_sra(vector int __a, vector unsigned int __b)
6349 {
6350   return __builtin_altivec_vsraw(__a, __b);
6351 }
6352
6353 static vector unsigned int __ATTRS_o_ai
6354 vec_sra(vector unsigned int __a, vector unsigned int __b)
6355 {
6356   return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
6357 }
6358
6359 /* vec_vsrab */
6360
6361 static vector signed char __ATTRS_o_ai
6362 vec_vsrab(vector signed char __a, vector unsigned char __b)
6363 {
6364   return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
6365 }
6366
6367 static vector unsigned char __ATTRS_o_ai
6368 vec_vsrab(vector unsigned char __a, vector unsigned char __b)
6369 {
6370   return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
6371 }
6372
6373 /* vec_vsrah */
6374
6375 static vector short __ATTRS_o_ai
6376 vec_vsrah(vector short __a, vector unsigned short __b)
6377 {
6378   return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
6379 }
6380
6381 static vector unsigned short __ATTRS_o_ai
6382 vec_vsrah(vector unsigned short __a, vector unsigned short __b)
6383 {
6384   return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
6385 }
6386
6387 /* vec_vsraw */
6388
6389 static vector int __ATTRS_o_ai
6390 vec_vsraw(vector int __a, vector unsigned int __b)
6391 {
6392   return __builtin_altivec_vsraw(__a, __b);
6393 }
6394
6395 static vector unsigned int __ATTRS_o_ai
6396 vec_vsraw(vector unsigned int __a, vector unsigned int __b)
6397 {
6398   return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
6399 }
6400
6401 /* vec_srl */
6402
6403 static vector signed char __ATTRS_o_ai
6404 vec_srl(vector signed char __a, vector unsigned char __b)
6405 {
6406   return (vector signed char)
6407            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6408 }
6409
6410 static vector signed char __ATTRS_o_ai
6411 vec_srl(vector signed char __a, vector unsigned short __b)
6412 {
6413   return (vector signed char)
6414            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6415 }
6416
6417 static vector signed char __ATTRS_o_ai
6418 vec_srl(vector signed char __a, vector unsigned int __b)
6419 {
6420   return (vector signed char)
6421            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6422 }
6423
6424 static vector unsigned char __ATTRS_o_ai
6425 vec_srl(vector unsigned char __a, vector unsigned char __b)
6426 {
6427   return (vector unsigned char)
6428            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6429 }
6430
6431 static vector unsigned char __ATTRS_o_ai
6432 vec_srl(vector unsigned char __a, vector unsigned short __b)
6433 {
6434   return (vector unsigned char)
6435            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6436 }
6437
6438 static vector unsigned char __ATTRS_o_ai
6439 vec_srl(vector unsigned char __a, vector unsigned int __b)
6440 {
6441   return (vector unsigned char)
6442            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6443 }
6444
6445 static vector bool char __ATTRS_o_ai
6446 vec_srl(vector bool char __a, vector unsigned char __b)
6447 {
6448   return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6449 }
6450
6451 static vector bool char __ATTRS_o_ai
6452 vec_srl(vector bool char __a, vector unsigned short __b)
6453 {
6454   return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6455 }
6456
6457 static vector bool char __ATTRS_o_ai
6458 vec_srl(vector bool char __a, vector unsigned int __b)
6459 {
6460   return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6461 }
6462
6463 static vector short __ATTRS_o_ai
6464 vec_srl(vector short __a, vector unsigned char __b)
6465 {
6466   return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6467 }
6468
6469 static vector short __ATTRS_o_ai
6470 vec_srl(vector short __a, vector unsigned short __b)
6471 {
6472   return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6473 }
6474
6475 static vector short __ATTRS_o_ai
6476 vec_srl(vector short __a, vector unsigned int __b)
6477 {
6478   return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6479 }
6480
6481 static vector unsigned short __ATTRS_o_ai
6482 vec_srl(vector unsigned short __a, vector unsigned char __b)
6483 {
6484   return (vector unsigned short)
6485            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6486 }
6487
6488 static vector unsigned short __ATTRS_o_ai
6489 vec_srl(vector unsigned short __a, vector unsigned short __b)
6490 {
6491   return (vector unsigned short)
6492            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6493 }
6494
6495 static vector unsigned short __ATTRS_o_ai
6496 vec_srl(vector unsigned short __a, vector unsigned int __b)
6497 {
6498   return (vector unsigned short)
6499            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6500 }
6501
6502 static vector bool short __ATTRS_o_ai
6503 vec_srl(vector bool short __a, vector unsigned char __b)
6504 {
6505   return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6506 }
6507
6508 static vector bool short __ATTRS_o_ai
6509 vec_srl(vector bool short __a, vector unsigned short __b)
6510 {
6511   return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6512 }
6513
6514 static vector bool short __ATTRS_o_ai
6515 vec_srl(vector bool short __a, vector unsigned int __b)
6516 {
6517   return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6518 }
6519
6520 static vector pixel __ATTRS_o_ai
6521 vec_srl(vector pixel __a, vector unsigned char __b)
6522 {
6523   return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6524 }
6525
6526 static vector pixel __ATTRS_o_ai
6527 vec_srl(vector pixel __a, vector unsigned short __b)
6528 {
6529   return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6530 }
6531
6532 static vector pixel __ATTRS_o_ai
6533 vec_srl(vector pixel __a, vector unsigned int __b)
6534 {
6535   return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6536 }
6537
6538 static vector int __ATTRS_o_ai
6539 vec_srl(vector int __a, vector unsigned char __b)
6540 {
6541   return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6542 }
6543
6544 static vector int __ATTRS_o_ai
6545 vec_srl(vector int __a, vector unsigned short __b)
6546 {
6547   return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6548 }
6549
6550 static vector int __ATTRS_o_ai
6551 vec_srl(vector int __a, vector unsigned int __b)
6552 {
6553   return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6554 }
6555
6556 static vector unsigned int __ATTRS_o_ai
6557 vec_srl(vector unsigned int __a, vector unsigned char __b)
6558 {
6559   return (vector unsigned int)
6560            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6561 }
6562
6563 static vector unsigned int __ATTRS_o_ai
6564 vec_srl(vector unsigned int __a, vector unsigned short __b)
6565 {
6566   return (vector unsigned int)
6567            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6568 }
6569
6570 static vector unsigned int __ATTRS_o_ai
6571 vec_srl(vector unsigned int __a, vector unsigned int __b)
6572 {
6573   return (vector unsigned int)
6574            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6575 }
6576
6577 static vector bool int __ATTRS_o_ai
6578 vec_srl(vector bool int __a, vector unsigned char __b)
6579 {
6580   return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6581 }
6582
6583 static vector bool int __ATTRS_o_ai
6584 vec_srl(vector bool int __a, vector unsigned short __b)
6585 {
6586   return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6587 }
6588
6589 static vector bool int __ATTRS_o_ai
6590 vec_srl(vector bool int __a, vector unsigned int __b)
6591 {
6592   return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6593 }
6594
6595 /* vec_vsr */
6596
6597 static vector signed char __ATTRS_o_ai
6598 vec_vsr(vector signed char __a, vector unsigned char __b)
6599 {
6600   return (vector signed char)
6601            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6602 }
6603
6604 static vector signed char __ATTRS_o_ai
6605 vec_vsr(vector signed char __a, vector unsigned short __b)
6606 {
6607   return (vector signed char)
6608            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6609 }
6610
6611 static vector signed char __ATTRS_o_ai
6612 vec_vsr(vector signed char __a, vector unsigned int __b)
6613 {
6614   return (vector signed char)
6615            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6616 }
6617
6618 static vector unsigned char __ATTRS_o_ai
6619 vec_vsr(vector unsigned char __a, vector unsigned char __b)
6620 {
6621   return (vector unsigned char)
6622            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6623 }
6624
6625 static vector unsigned char __ATTRS_o_ai
6626 vec_vsr(vector unsigned char __a, vector unsigned short __b)
6627 {
6628   return (vector unsigned char)
6629            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6630 }
6631
6632 static vector unsigned char __ATTRS_o_ai
6633 vec_vsr(vector unsigned char __a, vector unsigned int __b)
6634 {
6635   return (vector unsigned char)
6636            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6637 }
6638
6639 static vector bool char __ATTRS_o_ai
6640 vec_vsr(vector bool char __a, vector unsigned char __b)
6641 {
6642   return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6643 }
6644
6645 static vector bool char __ATTRS_o_ai
6646 vec_vsr(vector bool char __a, vector unsigned short __b)
6647 {
6648   return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6649 }
6650
6651 static vector bool char __ATTRS_o_ai
6652 vec_vsr(vector bool char __a, vector unsigned int __b)
6653 {
6654   return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6655 }
6656
6657 static vector short __ATTRS_o_ai
6658 vec_vsr(vector short __a, vector unsigned char __b)
6659 {
6660   return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6661 }
6662
6663 static vector short __ATTRS_o_ai
6664 vec_vsr(vector short __a, vector unsigned short __b)
6665 {
6666   return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6667 }
6668
6669 static vector short __ATTRS_o_ai
6670 vec_vsr(vector short __a, vector unsigned int __b)
6671 {
6672   return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6673 }
6674
6675 static vector unsigned short __ATTRS_o_ai
6676 vec_vsr(vector unsigned short __a, vector unsigned char __b)
6677 {
6678   return (vector unsigned short)
6679            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6680 }
6681
6682 static vector unsigned short __ATTRS_o_ai
6683 vec_vsr(vector unsigned short __a, vector unsigned short __b)
6684 {
6685   return (vector unsigned short)
6686            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6687 }
6688
6689 static vector unsigned short __ATTRS_o_ai
6690 vec_vsr(vector unsigned short __a, vector unsigned int __b)
6691 {
6692   return (vector unsigned short)
6693            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6694 }
6695
6696 static vector bool short __ATTRS_o_ai
6697 vec_vsr(vector bool short __a, vector unsigned char __b)
6698 {
6699   return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6700 }
6701
6702 static vector bool short __ATTRS_o_ai
6703 vec_vsr(vector bool short __a, vector unsigned short __b)
6704 {
6705   return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6706 }
6707
6708 static vector bool short __ATTRS_o_ai
6709 vec_vsr(vector bool short __a, vector unsigned int __b)
6710 {
6711   return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6712 }
6713
6714 static vector pixel __ATTRS_o_ai
6715 vec_vsr(vector pixel __a, vector unsigned char __b)
6716 {
6717   return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6718 }
6719
6720 static vector pixel __ATTRS_o_ai
6721 vec_vsr(vector pixel __a, vector unsigned short __b)
6722 {
6723   return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6724 }
6725
6726 static vector pixel __ATTRS_o_ai
6727 vec_vsr(vector pixel __a, vector unsigned int __b)
6728 {
6729   return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6730 }
6731
6732 static vector int __ATTRS_o_ai
6733 vec_vsr(vector int __a, vector unsigned char __b)
6734 {
6735   return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6736 }
6737
6738 static vector int __ATTRS_o_ai
6739 vec_vsr(vector int __a, vector unsigned short __b)
6740 {
6741   return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6742 }
6743
6744 static vector int __ATTRS_o_ai
6745 vec_vsr(vector int __a, vector unsigned int __b)
6746 {
6747   return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6748 }
6749
6750 static vector unsigned int __ATTRS_o_ai
6751 vec_vsr(vector unsigned int __a, vector unsigned char __b)
6752 {
6753   return (vector unsigned int)
6754            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6755 }
6756
6757 static vector unsigned int __ATTRS_o_ai
6758 vec_vsr(vector unsigned int __a, vector unsigned short __b)
6759 {
6760   return (vector unsigned int)
6761            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6762 }
6763
6764 static vector unsigned int __ATTRS_o_ai
6765 vec_vsr(vector unsigned int __a, vector unsigned int __b)
6766 {
6767   return (vector unsigned int)
6768            __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6769 }
6770
6771 static vector bool int __ATTRS_o_ai
6772 vec_vsr(vector bool int __a, vector unsigned char __b)
6773 {
6774   return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6775 }
6776
6777 static vector bool int __ATTRS_o_ai
6778 vec_vsr(vector bool int __a, vector unsigned short __b)
6779 {
6780   return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6781 }
6782
6783 static vector bool int __ATTRS_o_ai
6784 vec_vsr(vector bool int __a, vector unsigned int __b)
6785 {
6786   return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6787 }
6788
6789 /* vec_sro */
6790
6791 static vector signed char __ATTRS_o_ai
6792 vec_sro(vector signed char __a, vector signed char __b)
6793 {
6794   return (vector signed char)
6795            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6796 }
6797
6798 static vector signed char __ATTRS_o_ai
6799 vec_sro(vector signed char __a, vector unsigned char __b)
6800 {
6801   return (vector signed char)
6802            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6803 }
6804
6805 static vector unsigned char __ATTRS_o_ai
6806 vec_sro(vector unsigned char __a, vector signed char __b)
6807 {
6808   return (vector unsigned char)
6809            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6810 }
6811
6812 static vector unsigned char __ATTRS_o_ai
6813 vec_sro(vector unsigned char __a, vector unsigned char __b)
6814 {
6815   return (vector unsigned char)
6816            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6817 }
6818
6819 static vector short __ATTRS_o_ai
6820 vec_sro(vector short __a, vector signed char __b)
6821 {
6822   return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6823 }
6824
6825 static vector short __ATTRS_o_ai
6826 vec_sro(vector short __a, vector unsigned char __b)
6827 {
6828   return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6829 }
6830
6831 static vector unsigned short __ATTRS_o_ai
6832 vec_sro(vector unsigned short __a, vector signed char __b)
6833 {
6834   return (vector unsigned short)
6835            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6836 }
6837
6838 static vector unsigned short __ATTRS_o_ai
6839 vec_sro(vector unsigned short __a, vector unsigned char __b)
6840 {
6841   return (vector unsigned short)
6842            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6843 }
6844
6845 static vector pixel __ATTRS_o_ai
6846 vec_sro(vector pixel __a, vector signed char __b)
6847 {
6848   return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6849 }
6850
6851 static vector pixel __ATTRS_o_ai
6852 vec_sro(vector pixel __a, vector unsigned char __b)
6853 {
6854   return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6855 }
6856
6857 static vector int __ATTRS_o_ai
6858 vec_sro(vector int __a, vector signed char __b)
6859 {
6860   return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
6861 }
6862
6863 static vector int __ATTRS_o_ai
6864 vec_sro(vector int __a, vector unsigned char __b)
6865 {
6866   return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
6867 }
6868
6869 static vector unsigned int __ATTRS_o_ai
6870 vec_sro(vector unsigned int __a, vector signed char __b)
6871 {
6872   return (vector unsigned int)
6873            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6874 }
6875
6876 static vector unsigned int __ATTRS_o_ai
6877 vec_sro(vector unsigned int __a, vector unsigned char __b)
6878 {
6879   return (vector unsigned int)
6880            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6881 }
6882
6883 static vector float __ATTRS_o_ai
6884 vec_sro(vector float __a, vector signed char __b)
6885 {
6886   return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6887 }
6888
6889 static vector float __ATTRS_o_ai
6890 vec_sro(vector float __a, vector unsigned char __b)
6891 {
6892   return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6893 }
6894
6895 /* vec_vsro */
6896
6897 static vector signed char __ATTRS_o_ai
6898 vec_vsro(vector signed char __a, vector signed char __b)
6899 {
6900   return (vector signed char)
6901            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6902 }
6903
6904 static vector signed char __ATTRS_o_ai
6905 vec_vsro(vector signed char __a, vector unsigned char __b)
6906 {
6907   return (vector signed char)
6908            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6909 }
6910
6911 static vector unsigned char __ATTRS_o_ai
6912 vec_vsro(vector unsigned char __a, vector signed char __b)
6913 {
6914   return (vector unsigned char)
6915            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6916 }
6917
6918 static vector unsigned char __ATTRS_o_ai
6919 vec_vsro(vector unsigned char __a, vector unsigned char __b)
6920 {
6921   return (vector unsigned char)
6922            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6923 }
6924
6925 static vector short __ATTRS_o_ai
6926 vec_vsro(vector short __a, vector signed char __b)
6927 {
6928   return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6929 }
6930
6931 static vector short __ATTRS_o_ai
6932 vec_vsro(vector short __a, vector unsigned char __b)
6933 {
6934   return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6935 }
6936
6937 static vector unsigned short __ATTRS_o_ai
6938 vec_vsro(vector unsigned short __a, vector signed char __b)
6939 {
6940   return (vector unsigned short)
6941            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6942 }
6943
6944 static vector unsigned short __ATTRS_o_ai
6945 vec_vsro(vector unsigned short __a, vector unsigned char __b)
6946 {
6947   return (vector unsigned short)
6948            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6949 }
6950
6951 static vector pixel __ATTRS_o_ai
6952 vec_vsro(vector pixel __a, vector signed char __b)
6953 {
6954   return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6955 }
6956
6957 static vector pixel __ATTRS_o_ai
6958 vec_vsro(vector pixel __a, vector unsigned char __b)
6959 {
6960   return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6961 }
6962
6963 static vector int __ATTRS_o_ai
6964 vec_vsro(vector int __a, vector signed char __b)
6965 {
6966   return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
6967 }
6968
6969 static vector int __ATTRS_o_ai
6970 vec_vsro(vector int __a, vector unsigned char __b)
6971 {
6972   return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
6973 }
6974
6975 static vector unsigned int __ATTRS_o_ai
6976 vec_vsro(vector unsigned int __a, vector signed char __b)
6977 {
6978   return (vector unsigned int)
6979            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6980 }
6981
6982 static vector unsigned int __ATTRS_o_ai
6983 vec_vsro(vector unsigned int __a, vector unsigned char __b)
6984 {
6985   return (vector unsigned int)
6986            __builtin_altivec_vsro((vector int)__a, (vector int)__b);
6987 }
6988
6989 static vector float __ATTRS_o_ai
6990 vec_vsro(vector float __a, vector signed char __b)
6991 {
6992   return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6993 }
6994
6995 static vector float __ATTRS_o_ai
6996 vec_vsro(vector float __a, vector unsigned char __b)
6997 {
6998   return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
6999 }
7000
7001 /* vec_st */
7002
7003 static void __ATTRS_o_ai
7004 vec_st(vector signed char __a, int __b, vector signed char *__c)
7005 {
7006   __builtin_altivec_stvx((vector int)__a, __b, __c);
7007 }
7008
7009 static void __ATTRS_o_ai
7010 vec_st(vector signed char __a, int __b, signed char *__c)
7011 {
7012   __builtin_altivec_stvx((vector int)__a, __b, __c);
7013 }
7014
7015 static void __ATTRS_o_ai
7016 vec_st(vector unsigned char __a, int __b, vector unsigned char *__c)
7017 {
7018   __builtin_altivec_stvx((vector int)__a, __b, __c);
7019 }
7020
7021 static void __ATTRS_o_ai
7022 vec_st(vector unsigned char __a, int __b, unsigned char *__c)
7023 {
7024   __builtin_altivec_stvx((vector int)__a, __b, __c);
7025 }
7026
7027 static void __ATTRS_o_ai
7028 vec_st(vector bool char __a, int __b, signed char *__c)
7029 {
7030   __builtin_altivec_stvx((vector int)__a, __b, __c);
7031 }
7032
7033 static void __ATTRS_o_ai
7034 vec_st(vector bool char __a, int __b, unsigned char *__c)
7035 {
7036   __builtin_altivec_stvx((vector int)__a, __b, __c);
7037 }
7038
7039 static void __ATTRS_o_ai
7040 vec_st(vector bool char __a, int __b, vector bool char *__c)
7041 {
7042   __builtin_altivec_stvx((vector int)__a, __b, __c);
7043 }
7044
7045 static void __ATTRS_o_ai
7046 vec_st(vector short __a, int __b, vector short *__c)
7047 {
7048   __builtin_altivec_stvx((vector int)__a, __b, __c);
7049 }
7050
7051 static void __ATTRS_o_ai
7052 vec_st(vector short __a, int __b, short *__c)
7053 {
7054   __builtin_altivec_stvx((vector int)__a, __b, __c);
7055 }
7056
7057 static void __ATTRS_o_ai
7058 vec_st(vector unsigned short __a, int __b, vector unsigned short *__c)
7059 {
7060   __builtin_altivec_stvx((vector int)__a, __b, __c);
7061 }
7062
7063 static void __ATTRS_o_ai
7064 vec_st(vector unsigned short __a, int __b, unsigned short *__c)
7065 {
7066   __builtin_altivec_stvx((vector int)__a, __b, __c);
7067 }
7068
7069 static void __ATTRS_o_ai
7070 vec_st(vector bool short __a, int __b, short *__c)
7071 {
7072   __builtin_altivec_stvx((vector int)__a, __b, __c);
7073 }
7074
7075 static void __ATTRS_o_ai
7076 vec_st(vector bool short __a, int __b, unsigned short *__c)
7077 {
7078   __builtin_altivec_stvx((vector int)__a, __b, __c);
7079 }
7080
7081 static void __ATTRS_o_ai
7082 vec_st(vector bool short __a, int __b, vector bool short *__c)
7083 {
7084   __builtin_altivec_stvx((vector int)__a, __b, __c);
7085 }
7086
7087 static void __ATTRS_o_ai
7088 vec_st(vector pixel __a, int __b, short *__c)
7089 {
7090   __builtin_altivec_stvx((vector int)__a, __b, __c);
7091 }
7092
7093 static void __ATTRS_o_ai
7094 vec_st(vector pixel __a, int __b, unsigned short *__c)
7095 {
7096   __builtin_altivec_stvx((vector int)__a, __b, __c);
7097 }
7098
7099 static void __ATTRS_o_ai
7100 vec_st(vector pixel __a, int __b, vector pixel *__c)
7101 {
7102   __builtin_altivec_stvx((vector int)__a, __b, __c);
7103 }
7104
7105 static void __ATTRS_o_ai
7106 vec_st(vector int __a, int __b, vector int *__c)
7107 {
7108   __builtin_altivec_stvx(__a, __b, __c);
7109 }
7110
7111 static void __ATTRS_o_ai
7112 vec_st(vector int __a, int __b, int *__c)
7113 {
7114   __builtin_altivec_stvx(__a, __b, __c);
7115 }
7116
7117 static void __ATTRS_o_ai
7118 vec_st(vector unsigned int __a, int __b, vector unsigned int *__c)
7119 {
7120   __builtin_altivec_stvx((vector int)__a, __b, __c);
7121 }
7122
7123 static void __ATTRS_o_ai
7124 vec_st(vector unsigned int __a, int __b, unsigned int *__c)
7125 {
7126   __builtin_altivec_stvx((vector int)__a, __b, __c);
7127 }
7128
7129 static void __ATTRS_o_ai
7130 vec_st(vector bool int __a, int __b, int *__c)
7131 {
7132   __builtin_altivec_stvx((vector int)__a, __b, __c);
7133 }
7134
7135 static void __ATTRS_o_ai
7136 vec_st(vector bool int __a, int __b, unsigned int *__c)
7137 {
7138   __builtin_altivec_stvx((vector int)__a, __b, __c);
7139 }
7140
7141 static void __ATTRS_o_ai
7142 vec_st(vector bool int __a, int __b, vector bool int *__c)
7143 {
7144   __builtin_altivec_stvx((vector int)__a, __b, __c);
7145 }
7146
7147 static void __ATTRS_o_ai
7148 vec_st(vector float __a, int __b, vector float *__c)
7149 {
7150   __builtin_altivec_stvx((vector int)__a, __b, __c);
7151 }
7152
7153 static void __ATTRS_o_ai
7154 vec_st(vector float __a, int __b, float *__c)
7155 {
7156   __builtin_altivec_stvx((vector int)__a, __b, __c);
7157 }
7158
7159 /* vec_stvx */
7160
7161 static void __ATTRS_o_ai
7162 vec_stvx(vector signed char __a, int __b, vector signed char *__c)
7163 {
7164   __builtin_altivec_stvx((vector int)__a, __b, __c);
7165 }
7166
7167 static void __ATTRS_o_ai
7168 vec_stvx(vector signed char __a, int __b, signed char *__c)
7169 {
7170   __builtin_altivec_stvx((vector int)__a, __b, __c);
7171 }
7172
7173 static void __ATTRS_o_ai
7174 vec_stvx(vector unsigned char __a, int __b, vector unsigned char *__c)
7175 {
7176   __builtin_altivec_stvx((vector int)__a, __b, __c);
7177 }
7178
7179 static void __ATTRS_o_ai
7180 vec_stvx(vector unsigned char __a, int __b, unsigned char *__c)
7181 {
7182   __builtin_altivec_stvx((vector int)__a, __b, __c);
7183 }
7184
7185 static void __ATTRS_o_ai
7186 vec_stvx(vector bool char __a, int __b, signed char *__c)
7187 {
7188   __builtin_altivec_stvx((vector int)__a, __b, __c);
7189 }
7190
7191 static void __ATTRS_o_ai
7192 vec_stvx(vector bool char __a, int __b, unsigned char *__c)
7193 {
7194   __builtin_altivec_stvx((vector int)__a, __b, __c);
7195 }
7196
7197 static void __ATTRS_o_ai
7198 vec_stvx(vector bool char __a, int __b, vector bool char *__c)
7199 {
7200   __builtin_altivec_stvx((vector int)__a, __b, __c);
7201 }
7202
7203 static void __ATTRS_o_ai
7204 vec_stvx(vector short __a, int __b, vector short *__c)
7205 {
7206   __builtin_altivec_stvx((vector int)__a, __b, __c);
7207 }
7208
7209 static void __ATTRS_o_ai
7210 vec_stvx(vector short __a, int __b, short *__c)
7211 {
7212   __builtin_altivec_stvx((vector int)__a, __b, __c);
7213 }
7214
7215 static void __ATTRS_o_ai
7216 vec_stvx(vector unsigned short __a, int __b, vector unsigned short *__c)
7217 {
7218   __builtin_altivec_stvx((vector int)__a, __b, __c);
7219 }
7220
7221 static void __ATTRS_o_ai
7222 vec_stvx(vector unsigned short __a, int __b, unsigned short *__c)
7223 {
7224   __builtin_altivec_stvx((vector int)__a, __b, __c);
7225 }
7226
7227 static void __ATTRS_o_ai
7228 vec_stvx(vector bool short __a, int __b, short *__c)
7229 {
7230   __builtin_altivec_stvx((vector int)__a, __b, __c);
7231 }
7232
7233 static void __ATTRS_o_ai
7234 vec_stvx(vector bool short __a, int __b, unsigned short *__c)
7235 {
7236   __builtin_altivec_stvx((vector int)__a, __b, __c);
7237 }
7238
7239 static void __ATTRS_o_ai
7240 vec_stvx(vector bool short __a, int __b, vector bool short *__c)
7241 {
7242   __builtin_altivec_stvx((vector int)__a, __b, __c);
7243 }
7244
7245 static void __ATTRS_o_ai
7246 vec_stvx(vector pixel __a, int __b, short *__c)
7247 {
7248   __builtin_altivec_stvx((vector int)__a, __b, __c);
7249 }
7250
7251 static void __ATTRS_o_ai
7252 vec_stvx(vector pixel __a, int __b, unsigned short *__c)
7253 {
7254   __builtin_altivec_stvx((vector int)__a, __b, __c);
7255 }
7256
7257 static void __ATTRS_o_ai
7258 vec_stvx(vector pixel __a, int __b, vector pixel *__c)
7259 {
7260   __builtin_altivec_stvx((vector int)__a, __b, __c);
7261 }
7262
7263 static void __ATTRS_o_ai
7264 vec_stvx(vector int __a, int __b, vector int *__c)
7265 {
7266   __builtin_altivec_stvx(__a, __b, __c);
7267 }
7268
7269 static void __ATTRS_o_ai
7270 vec_stvx(vector int __a, int __b, int *__c)
7271 {
7272   __builtin_altivec_stvx(__a, __b, __c);
7273 }
7274
7275 static void __ATTRS_o_ai
7276 vec_stvx(vector unsigned int __a, int __b, vector unsigned int *__c)
7277 {
7278   __builtin_altivec_stvx((vector int)__a, __b, __c);
7279 }
7280
7281 static void __ATTRS_o_ai
7282 vec_stvx(vector unsigned int __a, int __b, unsigned int *__c)
7283 {
7284   __builtin_altivec_stvx((vector int)__a, __b, __c);
7285 }
7286
7287 static void __ATTRS_o_ai
7288 vec_stvx(vector bool int __a, int __b, int *__c)
7289 {
7290   __builtin_altivec_stvx((vector int)__a, __b, __c);
7291 }
7292
7293 static void __ATTRS_o_ai
7294 vec_stvx(vector bool int __a, int __b, unsigned int *__c)
7295 {
7296   __builtin_altivec_stvx((vector int)__a, __b, __c);
7297 }
7298
7299 static void __ATTRS_o_ai
7300 vec_stvx(vector bool int __a, int __b, vector bool int *__c)
7301 {
7302   __builtin_altivec_stvx((vector int)__a, __b, __c);
7303 }
7304
7305 static void __ATTRS_o_ai
7306 vec_stvx(vector float __a, int __b, vector float *__c)
7307 {
7308   __builtin_altivec_stvx((vector int)__a, __b, __c);
7309 }
7310
7311 static void __ATTRS_o_ai
7312 vec_stvx(vector float __a, int __b, float *__c)
7313 {
7314   __builtin_altivec_stvx((vector int)__a, __b, __c);
7315 }
7316
7317 /* vec_ste */
7318
7319 static void __ATTRS_o_ai
7320 vec_ste(vector signed char __a, int __b, signed char *__c)
7321 {
7322   __builtin_altivec_stvebx((vector char)__a, __b, __c);
7323 }
7324
7325 static void __ATTRS_o_ai
7326 vec_ste(vector unsigned char __a, int __b, unsigned char *__c)
7327 {
7328   __builtin_altivec_stvebx((vector char)__a, __b, __c);
7329 }
7330
7331 static void __ATTRS_o_ai
7332 vec_ste(vector bool char __a, int __b, signed char *__c)
7333 {
7334   __builtin_altivec_stvebx((vector char)__a, __b, __c);
7335 }
7336
7337 static void __ATTRS_o_ai
7338 vec_ste(vector bool char __a, int __b, unsigned char *__c)
7339 {
7340   __builtin_altivec_stvebx((vector char)__a, __b, __c);
7341 }
7342
7343 static void __ATTRS_o_ai
7344 vec_ste(vector short __a, int __b, short *__c)
7345 {
7346   __builtin_altivec_stvehx(__a, __b, __c);
7347 }
7348
7349 static void __ATTRS_o_ai
7350 vec_ste(vector unsigned short __a, int __b, unsigned short *__c)
7351 {
7352   __builtin_altivec_stvehx((vector short)__a, __b, __c);
7353 }
7354
7355 static void __ATTRS_o_ai
7356 vec_ste(vector bool short __a, int __b, short *__c)
7357 {
7358   __builtin_altivec_stvehx((vector short)__a, __b, __c);
7359 }
7360
7361 static void __ATTRS_o_ai
7362 vec_ste(vector bool short __a, int __b, unsigned short *__c)
7363 {
7364   __builtin_altivec_stvehx((vector short)__a, __b, __c);
7365 }
7366
7367 static void __ATTRS_o_ai
7368 vec_ste(vector pixel __a, int __b, short *__c)
7369 {
7370   __builtin_altivec_stvehx((vector short)__a, __b, __c);
7371 }
7372
7373 static void __ATTRS_o_ai
7374 vec_ste(vector pixel __a, int __b, unsigned short *__c)
7375 {
7376   __builtin_altivec_stvehx((vector short)__a, __b, __c);
7377 }
7378
7379 static void __ATTRS_o_ai
7380 vec_ste(vector int __a, int __b, int *__c)
7381 {
7382   __builtin_altivec_stvewx(__a, __b, __c);
7383 }
7384
7385 static void __ATTRS_o_ai
7386 vec_ste(vector unsigned int __a, int __b, unsigned int *__c)
7387 {
7388   __builtin_altivec_stvewx((vector int)__a, __b, __c);
7389 }
7390
7391 static void __ATTRS_o_ai
7392 vec_ste(vector bool int __a, int __b, int *__c)
7393 {
7394   __builtin_altivec_stvewx((vector int)__a, __b, __c);
7395 }
7396
7397 static void __ATTRS_o_ai
7398 vec_ste(vector bool int __a, int __b, unsigned int *__c)
7399 {
7400   __builtin_altivec_stvewx((vector int)__a, __b, __c);
7401 }
7402
7403 static void __ATTRS_o_ai
7404 vec_ste(vector float __a, int __b, float *__c)
7405 {
7406   __builtin_altivec_stvewx((vector int)__a, __b, __c);
7407 }
7408
7409 /* vec_stvebx */
7410
7411 static void __ATTRS_o_ai
7412 vec_stvebx(vector signed char __a, int __b, signed char *__c)
7413 {
7414   __builtin_altivec_stvebx((vector char)__a, __b, __c);
7415 }
7416
7417 static void __ATTRS_o_ai
7418 vec_stvebx(vector unsigned char __a, int __b, unsigned char *__c)
7419 {
7420   __builtin_altivec_stvebx((vector char)__a, __b, __c);
7421 }
7422
7423 static void __ATTRS_o_ai
7424 vec_stvebx(vector bool char __a, int __b, signed char *__c)
7425 {
7426   __builtin_altivec_stvebx((vector char)__a, __b, __c);
7427 }
7428
7429 static void __ATTRS_o_ai
7430 vec_stvebx(vector bool char __a, int __b, unsigned char *__c)
7431 {
7432   __builtin_altivec_stvebx((vector char)__a, __b, __c);
7433 }
7434
7435 /* vec_stvehx */
7436
7437 static void __ATTRS_o_ai
7438 vec_stvehx(vector short __a, int __b, short *__c)
7439 {
7440   __builtin_altivec_stvehx(__a, __b, __c);
7441 }
7442
7443 static void __ATTRS_o_ai
7444 vec_stvehx(vector unsigned short __a, int __b, unsigned short *__c)
7445 {
7446   __builtin_altivec_stvehx((vector short)__a, __b, __c);
7447 }
7448
7449 static void __ATTRS_o_ai
7450 vec_stvehx(vector bool short __a, int __b, short *__c)
7451 {
7452   __builtin_altivec_stvehx((vector short)__a, __b, __c);
7453 }
7454
7455 static void __ATTRS_o_ai
7456 vec_stvehx(vector bool short __a, int __b, unsigned short *__c)
7457 {
7458   __builtin_altivec_stvehx((vector short)__a, __b, __c);
7459 }
7460
7461 static void __ATTRS_o_ai
7462 vec_stvehx(vector pixel __a, int __b, short *__c)
7463 {
7464   __builtin_altivec_stvehx((vector short)__a, __b, __c);
7465 }
7466
7467 static void __ATTRS_o_ai
7468 vec_stvehx(vector pixel __a, int __b, unsigned short *__c)
7469 {
7470   __builtin_altivec_stvehx((vector short)__a, __b, __c);
7471 }
7472
7473 /* vec_stvewx */
7474
7475 static void __ATTRS_o_ai
7476 vec_stvewx(vector int __a, int __b, int *__c)
7477 {
7478   __builtin_altivec_stvewx(__a, __b, __c);
7479 }
7480
7481 static void __ATTRS_o_ai
7482 vec_stvewx(vector unsigned int __a, int __b, unsigned int *__c)
7483 {
7484   __builtin_altivec_stvewx((vector int)__a, __b, __c);
7485 }
7486
7487 static void __ATTRS_o_ai
7488 vec_stvewx(vector bool int __a, int __b, int *__c)
7489 {
7490   __builtin_altivec_stvewx((vector int)__a, __b, __c);
7491 }
7492
7493 static void __ATTRS_o_ai
7494 vec_stvewx(vector bool int __a, int __b, unsigned int *__c)
7495 {
7496   __builtin_altivec_stvewx((vector int)__a, __b, __c);
7497 }
7498
7499 static void __ATTRS_o_ai
7500 vec_stvewx(vector float __a, int __b, float *__c)
7501 {
7502   __builtin_altivec_stvewx((vector int)__a, __b, __c);
7503 }
7504
7505 /* vec_stl */
7506
7507 static void __ATTRS_o_ai
7508 vec_stl(vector signed char __a, int __b, vector signed char *__c)
7509 {
7510   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7511 }
7512
7513 static void __ATTRS_o_ai
7514 vec_stl(vector signed char __a, int __b, signed char *__c)
7515 {
7516   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7517 }
7518
7519 static void __ATTRS_o_ai
7520 vec_stl(vector unsigned char __a, int __b, vector unsigned char *__c)
7521 {
7522   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7523 }
7524
7525 static void __ATTRS_o_ai
7526 vec_stl(vector unsigned char __a, int __b, unsigned char *__c)
7527 {
7528   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7529 }
7530
7531 static void __ATTRS_o_ai
7532 vec_stl(vector bool char __a, int __b, signed char *__c)
7533 {
7534   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7535 }
7536
7537 static void __ATTRS_o_ai
7538 vec_stl(vector bool char __a, int __b, unsigned char *__c)
7539 {
7540   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7541 }
7542
7543 static void __ATTRS_o_ai
7544 vec_stl(vector bool char __a, int __b, vector bool char *__c)
7545 {
7546   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7547 }
7548
7549 static void __ATTRS_o_ai
7550 vec_stl(vector short __a, int __b, vector short *__c)
7551 {
7552   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7553 }
7554
7555 static void __ATTRS_o_ai
7556 vec_stl(vector short __a, int __b, short *__c)
7557 {
7558   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7559 }
7560
7561 static void __ATTRS_o_ai
7562 vec_stl(vector unsigned short __a, int __b, vector unsigned short *__c)
7563 {
7564   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7565 }
7566
7567 static void __ATTRS_o_ai
7568 vec_stl(vector unsigned short __a, int __b, unsigned short *__c)
7569 {
7570   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7571 }
7572
7573 static void __ATTRS_o_ai
7574 vec_stl(vector bool short __a, int __b, short *__c)
7575 {
7576   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7577 }
7578
7579 static void __ATTRS_o_ai
7580 vec_stl(vector bool short __a, int __b, unsigned short *__c)
7581 {
7582   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7583 }
7584
7585 static void __ATTRS_o_ai
7586 vec_stl(vector bool short __a, int __b, vector bool short *__c)
7587 {
7588   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7589 }
7590
7591 static void __ATTRS_o_ai
7592 vec_stl(vector pixel __a, int __b, short *__c)
7593 {
7594   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7595 }
7596
7597 static void __ATTRS_o_ai
7598 vec_stl(vector pixel __a, int __b, unsigned short *__c)
7599 {
7600   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7601 }
7602
7603 static void __ATTRS_o_ai
7604 vec_stl(vector pixel __a, int __b, vector pixel *__c)
7605 {
7606   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7607 }
7608
7609 static void __ATTRS_o_ai
7610 vec_stl(vector int __a, int __b, vector int *__c)
7611 {
7612   __builtin_altivec_stvxl(__a, __b, __c);
7613 }
7614
7615 static void __ATTRS_o_ai
7616 vec_stl(vector int __a, int __b, int *__c)
7617 {
7618   __builtin_altivec_stvxl(__a, __b, __c);
7619 }
7620
7621 static void __ATTRS_o_ai
7622 vec_stl(vector unsigned int __a, int __b, vector unsigned int *__c)
7623 {
7624   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7625 }
7626
7627 static void __ATTRS_o_ai
7628 vec_stl(vector unsigned int __a, int __b, unsigned int *__c)
7629 {
7630   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7631 }
7632
7633 static void __ATTRS_o_ai
7634 vec_stl(vector bool int __a, int __b, int *__c)
7635 {
7636   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7637 }
7638
7639 static void __ATTRS_o_ai
7640 vec_stl(vector bool int __a, int __b, unsigned int *__c)
7641 {
7642   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7643 }
7644
7645 static void __ATTRS_o_ai
7646 vec_stl(vector bool int __a, int __b, vector bool int *__c)
7647 {
7648   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7649 }
7650
7651 static void __ATTRS_o_ai
7652 vec_stl(vector float __a, int __b, vector float *__c)
7653 {
7654   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7655 }
7656
7657 static void __ATTRS_o_ai
7658 vec_stl(vector float __a, int __b, float *__c)
7659 {
7660   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7661 }
7662
7663 /* vec_stvxl */
7664
7665 static void __ATTRS_o_ai
7666 vec_stvxl(vector signed char __a, int __b, vector signed char *__c)
7667 {
7668   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7669 }
7670
7671 static void __ATTRS_o_ai
7672 vec_stvxl(vector signed char __a, int __b, signed char *__c)
7673 {
7674   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7675 }
7676
7677 static void __ATTRS_o_ai
7678 vec_stvxl(vector unsigned char __a, int __b, vector unsigned char *__c)
7679 {
7680   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7681 }
7682
7683 static void __ATTRS_o_ai
7684 vec_stvxl(vector unsigned char __a, int __b, unsigned char *__c)
7685 {
7686   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7687 }
7688
7689 static void __ATTRS_o_ai
7690 vec_stvxl(vector bool char __a, int __b, signed char *__c)
7691 {
7692   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7693 }
7694
7695 static void __ATTRS_o_ai
7696 vec_stvxl(vector bool char __a, int __b, unsigned char *__c)
7697 {
7698   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7699 }
7700
7701 static void __ATTRS_o_ai
7702 vec_stvxl(vector bool char __a, int __b, vector bool char *__c)
7703 {
7704   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7705 }
7706
7707 static void __ATTRS_o_ai
7708 vec_stvxl(vector short __a, int __b, vector short *__c)
7709 {
7710   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7711 }
7712
7713 static void __ATTRS_o_ai
7714 vec_stvxl(vector short __a, int __b, short *__c)
7715 {
7716   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7717 }
7718
7719 static void __ATTRS_o_ai
7720 vec_stvxl(vector unsigned short __a, int __b, vector unsigned short *__c)
7721 {
7722   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7723 }
7724
7725 static void __ATTRS_o_ai
7726 vec_stvxl(vector unsigned short __a, int __b, unsigned short *__c)
7727 {
7728   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7729 }
7730
7731 static void __ATTRS_o_ai
7732 vec_stvxl(vector bool short __a, int __b, short *__c)
7733 {
7734   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7735 }
7736
7737 static void __ATTRS_o_ai
7738 vec_stvxl(vector bool short __a, int __b, unsigned short *__c)
7739 {
7740   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7741 }
7742
7743 static void __ATTRS_o_ai
7744 vec_stvxl(vector bool short __a, int __b, vector bool short *__c)
7745 {
7746   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7747 }
7748
7749 static void __ATTRS_o_ai
7750 vec_stvxl(vector pixel __a, int __b, short *__c)
7751 {
7752   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7753 }
7754
7755 static void __ATTRS_o_ai
7756 vec_stvxl(vector pixel __a, int __b, unsigned short *__c)
7757 {
7758   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7759 }
7760
7761 static void __ATTRS_o_ai
7762 vec_stvxl(vector pixel __a, int __b, vector pixel *__c)
7763 {
7764   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7765 }
7766
7767 static void __ATTRS_o_ai
7768 vec_stvxl(vector int __a, int __b, vector int *__c)
7769 {
7770   __builtin_altivec_stvxl(__a, __b, __c);
7771 }
7772
7773 static void __ATTRS_o_ai
7774 vec_stvxl(vector int __a, int __b, int *__c)
7775 {
7776   __builtin_altivec_stvxl(__a, __b, __c);
7777 }
7778
7779 static void __ATTRS_o_ai
7780 vec_stvxl(vector unsigned int __a, int __b, vector unsigned int *__c)
7781 {
7782   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7783 }
7784
7785 static void __ATTRS_o_ai
7786 vec_stvxl(vector unsigned int __a, int __b, unsigned int *__c)
7787 {
7788   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7789 }
7790
7791 static void __ATTRS_o_ai
7792 vec_stvxl(vector bool int __a, int __b, int *__c)
7793 {
7794   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7795 }
7796
7797 static void __ATTRS_o_ai
7798 vec_stvxl(vector bool int __a, int __b, unsigned int *__c)
7799 {
7800   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7801 }
7802
7803 static void __ATTRS_o_ai
7804 vec_stvxl(vector bool int __a, int __b, vector bool int *__c)
7805 {
7806   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7807 }
7808
7809 static void __ATTRS_o_ai
7810 vec_stvxl(vector float __a, int __b, vector float *__c)
7811 {
7812   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7813 }
7814
7815 static void __ATTRS_o_ai
7816 vec_stvxl(vector float __a, int __b, float *__c)
7817 {
7818   __builtin_altivec_stvxl((vector int)__a, __b, __c);
7819 }
7820
7821 /* vec_sub */
7822
7823 static vector signed char __ATTRS_o_ai
7824 vec_sub(vector signed char __a, vector signed char __b)
7825 {
7826   return __a - __b;
7827 }
7828
7829 static vector signed char __ATTRS_o_ai
7830 vec_sub(vector bool char __a, vector signed char __b)
7831 {
7832   return (vector signed char)__a - __b;
7833 }
7834
7835 static vector signed char __ATTRS_o_ai
7836 vec_sub(vector signed char __a, vector bool char __b)
7837 {
7838   return __a - (vector signed char)__b;
7839 }
7840
7841 static vector unsigned char __ATTRS_o_ai
7842 vec_sub(vector unsigned char __a, vector unsigned char __b)
7843 {
7844   return __a - __b;
7845 }
7846
7847 static vector unsigned char __ATTRS_o_ai
7848 vec_sub(vector bool char __a, vector unsigned char __b)
7849 {
7850   return (vector unsigned char)__a - __b;
7851 }
7852
7853 static vector unsigned char __ATTRS_o_ai
7854 vec_sub(vector unsigned char __a, vector bool char __b)
7855 {
7856   return __a - (vector unsigned char)__b;
7857 }
7858
7859 static vector short __ATTRS_o_ai
7860 vec_sub(vector short __a, vector short __b)
7861 {
7862   return __a - __b;
7863 }
7864
7865 static vector short __ATTRS_o_ai
7866 vec_sub(vector bool short __a, vector short __b)
7867 {
7868   return (vector short)__a - __b;
7869 }
7870
7871 static vector short __ATTRS_o_ai
7872 vec_sub(vector short __a, vector bool short __b)
7873 {
7874   return __a - (vector short)__b;
7875 }
7876
7877 static vector unsigned short __ATTRS_o_ai
7878 vec_sub(vector unsigned short __a, vector unsigned short __b)
7879 {
7880   return __a - __b;
7881 }
7882
7883 static vector unsigned short __ATTRS_o_ai
7884 vec_sub(vector bool short __a, vector unsigned short __b)
7885 {
7886   return (vector unsigned short)__a - __b;
7887 }
7888
7889 static vector unsigned short __ATTRS_o_ai
7890 vec_sub(vector unsigned short __a, vector bool short __b)
7891 {
7892   return __a - (vector unsigned short)__b;
7893 }
7894
7895 static vector int __ATTRS_o_ai
7896 vec_sub(vector int __a, vector int __b)
7897 {
7898   return __a - __b;
7899 }
7900
7901 static vector int __ATTRS_o_ai
7902 vec_sub(vector bool int __a, vector int __b)
7903 {
7904   return (vector int)__a - __b;
7905 }
7906
7907 static vector int __ATTRS_o_ai
7908 vec_sub(vector int __a, vector bool int __b)
7909 {
7910   return __a - (vector int)__b;
7911 }
7912
7913 static vector unsigned int __ATTRS_o_ai
7914 vec_sub(vector unsigned int __a, vector unsigned int __b)
7915 {
7916   return __a - __b;
7917 }
7918
7919 static vector unsigned int __ATTRS_o_ai
7920 vec_sub(vector bool int __a, vector unsigned int __b)
7921 {
7922   return (vector unsigned int)__a - __b;
7923 }
7924
7925 static vector unsigned int __ATTRS_o_ai
7926 vec_sub(vector unsigned int __a, vector bool int __b)
7927 {
7928   return __a - (vector unsigned int)__b;
7929 }
7930
7931 static vector float __ATTRS_o_ai
7932 vec_sub(vector float __a, vector float __b)
7933 {
7934   return __a - __b;
7935 }
7936
7937 /* vec_vsububm */
7938
7939 #define __builtin_altivec_vsububm vec_vsububm
7940
7941 static vector signed char __ATTRS_o_ai
7942 vec_vsububm(vector signed char __a, vector signed char __b)
7943 {
7944   return __a - __b;
7945 }
7946
7947 static vector signed char __ATTRS_o_ai
7948 vec_vsububm(vector bool char __a, vector signed char __b)
7949 {
7950   return (vector signed char)__a - __b;
7951 }
7952
7953 static vector signed char __ATTRS_o_ai
7954 vec_vsububm(vector signed char __a, vector bool char __b)
7955 {
7956   return __a - (vector signed char)__b;
7957 }
7958
7959 static vector unsigned char __ATTRS_o_ai
7960 vec_vsububm(vector unsigned char __a, vector unsigned char __b)
7961 {
7962   return __a - __b;
7963 }
7964
7965 static vector unsigned char __ATTRS_o_ai
7966 vec_vsububm(vector bool char __a, vector unsigned char __b)
7967 {
7968   return (vector unsigned char)__a - __b;
7969 }
7970
7971 static vector unsigned char __ATTRS_o_ai
7972 vec_vsububm(vector unsigned char __a, vector bool char __b)
7973 {
7974   return __a - (vector unsigned char)__b;
7975 }
7976
7977 /* vec_vsubuhm */
7978
7979 #define __builtin_altivec_vsubuhm vec_vsubuhm
7980
7981 static vector short __ATTRS_o_ai
7982 vec_vsubuhm(vector short __a, vector short __b)
7983 {
7984   return __a - __b;
7985 }
7986
7987 static vector short __ATTRS_o_ai
7988 vec_vsubuhm(vector bool short __a, vector short __b)
7989 {
7990   return (vector short)__a - __b;
7991 }
7992
7993 static vector short __ATTRS_o_ai
7994 vec_vsubuhm(vector short __a, vector bool short __b)
7995 {
7996   return __a - (vector short)__b;
7997 }
7998
7999 static vector unsigned short __ATTRS_o_ai
8000 vec_vsubuhm(vector unsigned short __a, vector unsigned short __b)
8001 {
8002   return __a - __b;
8003 }
8004
8005 static vector unsigned short __ATTRS_o_ai
8006 vec_vsubuhm(vector bool short __a, vector unsigned short __b)
8007 {
8008   return (vector unsigned short)__a - __b;
8009 }
8010
8011 static vector unsigned short __ATTRS_o_ai
8012 vec_vsubuhm(vector unsigned short __a, vector bool short __b)
8013 {
8014   return __a - (vector unsigned short)__b;
8015 }
8016
8017 /* vec_vsubuwm */
8018
8019 #define __builtin_altivec_vsubuwm vec_vsubuwm
8020
8021 static vector int __ATTRS_o_ai
8022 vec_vsubuwm(vector int __a, vector int __b)
8023 {
8024   return __a - __b;
8025 }
8026
8027 static vector int __ATTRS_o_ai
8028 vec_vsubuwm(vector bool int __a, vector int __b)
8029 {
8030   return (vector int)__a - __b;
8031 }
8032
8033 static vector int __ATTRS_o_ai
8034 vec_vsubuwm(vector int __a, vector bool int __b)
8035 {
8036   return __a - (vector int)__b;
8037 }
8038
8039 static vector unsigned int __ATTRS_o_ai
8040 vec_vsubuwm(vector unsigned int __a, vector unsigned int __b)
8041 {
8042   return __a - __b;
8043 }
8044
8045 static vector unsigned int __ATTRS_o_ai
8046 vec_vsubuwm(vector bool int __a, vector unsigned int __b)
8047 {
8048   return (vector unsigned int)__a - __b;
8049 }
8050
8051 static vector unsigned int __ATTRS_o_ai
8052 vec_vsubuwm(vector unsigned int __a, vector bool int __b)
8053 {
8054   return __a - (vector unsigned int)__b;
8055 }
8056
8057 /* vec_vsubfp */
8058
8059 #define __builtin_altivec_vsubfp vec_vsubfp
8060
8061 static vector float __attribute__((__always_inline__))
8062 vec_vsubfp(vector float __a, vector float __b)
8063 {
8064   return __a - __b;
8065 }
8066
8067 /* vec_subc */
8068
8069 static vector unsigned int __attribute__((__always_inline__))
8070 vec_subc(vector unsigned int __a, vector unsigned int __b)
8071 {
8072   return __builtin_altivec_vsubcuw(__a, __b);
8073 }
8074
8075 /* vec_vsubcuw */
8076
8077 static vector unsigned int __attribute__((__always_inline__))
8078 vec_vsubcuw(vector unsigned int __a, vector unsigned int __b)
8079 {
8080   return __builtin_altivec_vsubcuw(__a, __b);
8081 }
8082
8083 /* vec_subs */
8084
8085 static vector signed char __ATTRS_o_ai
8086 vec_subs(vector signed char __a, vector signed char __b)
8087 {
8088   return __builtin_altivec_vsubsbs(__a, __b);
8089 }
8090
8091 static vector signed char __ATTRS_o_ai
8092 vec_subs(vector bool char __a, vector signed char __b)
8093 {
8094   return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
8095 }
8096
8097 static vector signed char __ATTRS_o_ai
8098 vec_subs(vector signed char __a, vector bool char __b)
8099 {
8100   return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
8101 }
8102
8103 static vector unsigned char __ATTRS_o_ai
8104 vec_subs(vector unsigned char __a, vector unsigned char __b)
8105 {
8106   return __builtin_altivec_vsububs(__a, __b);
8107 }
8108
8109 static vector unsigned char __ATTRS_o_ai
8110 vec_subs(vector bool char __a, vector unsigned char __b)
8111 {
8112   return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
8113 }
8114
8115 static vector unsigned char __ATTRS_o_ai
8116 vec_subs(vector unsigned char __a, vector bool char __b)
8117 {
8118   return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
8119 }
8120
8121 static vector short __ATTRS_o_ai
8122 vec_subs(vector short __a, vector short __b)
8123 {
8124   return __builtin_altivec_vsubshs(__a, __b);
8125 }
8126
8127 static vector short __ATTRS_o_ai
8128 vec_subs(vector bool short __a, vector short __b)
8129 {
8130   return __builtin_altivec_vsubshs((vector short)__a, __b);
8131 }
8132
8133 static vector short __ATTRS_o_ai
8134 vec_subs(vector short __a, vector bool short __b)
8135 {
8136   return __builtin_altivec_vsubshs(__a, (vector short)__b);
8137 }
8138
8139 static vector unsigned short __ATTRS_o_ai
8140 vec_subs(vector unsigned short __a, vector unsigned short __b)
8141 {
8142   return __builtin_altivec_vsubuhs(__a, __b);
8143 }
8144
8145 static vector unsigned short __ATTRS_o_ai
8146 vec_subs(vector bool short __a, vector unsigned short __b)
8147 {
8148   return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
8149 }
8150
8151 static vector unsigned short __ATTRS_o_ai
8152 vec_subs(vector unsigned short __a, vector bool short __b)
8153 {
8154   return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
8155 }
8156
8157 static vector int __ATTRS_o_ai
8158 vec_subs(vector int __a, vector int __b)
8159 {
8160   return __builtin_altivec_vsubsws(__a, __b);
8161 }
8162
8163 static vector int __ATTRS_o_ai
8164 vec_subs(vector bool int __a, vector int __b)
8165 {
8166   return __builtin_altivec_vsubsws((vector int)__a, __b);
8167 }
8168
8169 static vector int __ATTRS_o_ai
8170 vec_subs(vector int __a, vector bool int __b)
8171 {
8172   return __builtin_altivec_vsubsws(__a, (vector int)__b);
8173 }
8174
8175 static vector unsigned int __ATTRS_o_ai
8176 vec_subs(vector unsigned int __a, vector unsigned int __b)
8177 {
8178   return __builtin_altivec_vsubuws(__a, __b);
8179 }
8180
8181 static vector unsigned int __ATTRS_o_ai
8182 vec_subs(vector bool int __a, vector unsigned int __b)
8183 {
8184   return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
8185 }
8186
8187 static vector unsigned int __ATTRS_o_ai
8188 vec_subs(vector unsigned int __a, vector bool int __b)
8189 {
8190   return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
8191 }
8192
8193 /* vec_vsubsbs */
8194
8195 static vector signed char __ATTRS_o_ai
8196 vec_vsubsbs(vector signed char __a, vector signed char __b)
8197 {
8198   return __builtin_altivec_vsubsbs(__a, __b);
8199 }
8200
8201 static vector signed char __ATTRS_o_ai
8202 vec_vsubsbs(vector bool char __a, vector signed char __b)
8203 {
8204   return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
8205 }
8206
8207 static vector signed char __ATTRS_o_ai
8208 vec_vsubsbs(vector signed char __a, vector bool char __b)
8209 {
8210   return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
8211 }
8212
8213 /* vec_vsububs */
8214
8215 static vector unsigned char __ATTRS_o_ai
8216 vec_vsububs(vector unsigned char __a, vector unsigned char __b)
8217 {
8218   return __builtin_altivec_vsububs(__a, __b);
8219 }
8220
8221 static vector unsigned char __ATTRS_o_ai
8222 vec_vsububs(vector bool char __a, vector unsigned char __b)
8223 {
8224   return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
8225 }
8226
8227 static vector unsigned char __ATTRS_o_ai
8228 vec_vsububs(vector unsigned char __a, vector bool char __b)
8229 {
8230   return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
8231 }
8232
8233 /* vec_vsubshs */
8234
8235 static vector short __ATTRS_o_ai
8236 vec_vsubshs(vector short __a, vector short __b)
8237 {
8238   return __builtin_altivec_vsubshs(__a, __b);
8239 }
8240
8241 static vector short __ATTRS_o_ai
8242 vec_vsubshs(vector bool short __a, vector short __b)
8243 {
8244   return __builtin_altivec_vsubshs((vector short)__a, __b);
8245 }
8246
8247 static vector short __ATTRS_o_ai
8248 vec_vsubshs(vector short __a, vector bool short __b)
8249 {
8250   return __builtin_altivec_vsubshs(__a, (vector short)__b);
8251 }
8252
8253 /* vec_vsubuhs */
8254
8255 static vector unsigned short __ATTRS_o_ai
8256 vec_vsubuhs(vector unsigned short __a, vector unsigned short __b)
8257 {
8258   return __builtin_altivec_vsubuhs(__a, __b);
8259 }
8260
8261 static vector unsigned short __ATTRS_o_ai
8262 vec_vsubuhs(vector bool short __a, vector unsigned short __b)
8263 {
8264   return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
8265 }
8266
8267 static vector unsigned short __ATTRS_o_ai
8268 vec_vsubuhs(vector unsigned short __a, vector bool short __b)
8269 {
8270   return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
8271 }
8272
8273 /* vec_vsubsws */
8274
8275 static vector int __ATTRS_o_ai
8276 vec_vsubsws(vector int __a, vector int __b)
8277 {
8278   return __builtin_altivec_vsubsws(__a, __b);
8279 }
8280
8281 static vector int __ATTRS_o_ai
8282 vec_vsubsws(vector bool int __a, vector int __b)
8283 {
8284   return __builtin_altivec_vsubsws((vector int)__a, __b);
8285 }
8286
8287 static vector int __ATTRS_o_ai
8288 vec_vsubsws(vector int __a, vector bool int __b)
8289 {
8290   return __builtin_altivec_vsubsws(__a, (vector int)__b);
8291 }
8292
8293 /* vec_vsubuws */
8294
8295 static vector unsigned int __ATTRS_o_ai
8296 vec_vsubuws(vector unsigned int __a, vector unsigned int __b)
8297 {
8298   return __builtin_altivec_vsubuws(__a, __b);
8299 }
8300
8301 static vector unsigned int __ATTRS_o_ai
8302 vec_vsubuws(vector bool int __a, vector unsigned int __b)
8303 {
8304   return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
8305 }
8306
8307 static vector unsigned int __ATTRS_o_ai
8308 vec_vsubuws(vector unsigned int __a, vector bool int __b)
8309 {
8310   return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
8311 }
8312
8313 /* vec_sum4s */
8314
8315 static vector int __ATTRS_o_ai
8316 vec_sum4s(vector signed char __a, vector int __b)
8317 {
8318   return __builtin_altivec_vsum4sbs(__a, __b);
8319 }
8320
8321 static vector unsigned int __ATTRS_o_ai
8322 vec_sum4s(vector unsigned char __a, vector unsigned int __b)
8323 {
8324   return __builtin_altivec_vsum4ubs(__a, __b);
8325 }
8326
8327 static vector int __ATTRS_o_ai
8328 vec_sum4s(vector signed short __a, vector int __b)
8329 {
8330   return __builtin_altivec_vsum4shs(__a, __b);
8331 }
8332
8333 /* vec_vsum4sbs */
8334
8335 static vector int __attribute__((__always_inline__))
8336 vec_vsum4sbs(vector signed char __a, vector int __b)
8337 {
8338   return __builtin_altivec_vsum4sbs(__a, __b);
8339 }
8340
8341 /* vec_vsum4ubs */
8342
8343 static vector unsigned int __attribute__((__always_inline__))
8344 vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b)
8345 {
8346   return __builtin_altivec_vsum4ubs(__a, __b);
8347 }
8348
8349 /* vec_vsum4shs */
8350
8351 static vector int __attribute__((__always_inline__))
8352 vec_vsum4shs(vector signed short __a, vector int __b)
8353 {
8354   return __builtin_altivec_vsum4shs(__a, __b);
8355 }
8356
8357 /* vec_sum2s */
8358
8359 /* The vsum2sws instruction has a big-endian bias, so that the second
8360    input vector and the result always reference big-endian elements
8361    1 and 3 (little-endian element 0 and 2).  For ease of porting the
8362    programmer wants elements 1 and 3 in both cases, so for little
8363    endian we must perform some permutes.  */
8364
8365 static vector signed int __attribute__((__always_inline__))
8366 vec_sum2s(vector int __a, vector int __b)
8367 {
8368 #ifdef __LITTLE_ENDIAN__
8369   vector int __c = (vector signed int)
8370     vec_perm(__b, __b, (vector unsigned char)
8371              (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8372   __c = __builtin_altivec_vsum2sws(__a, __c);
8373   return (vector signed int)
8374     vec_perm(__c, __c, (vector unsigned char)
8375              (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8376 #else
8377   return __builtin_altivec_vsum2sws(__a, __b);
8378 #endif
8379 }
8380
8381 /* vec_vsum2sws */
8382
8383 static vector signed int __attribute__((__always_inline__))
8384 vec_vsum2sws(vector int __a, vector int __b)
8385 {
8386 #ifdef __LITTLE_ENDIAN__
8387   vector int __c = (vector signed int)
8388     vec_perm(__b, __b, (vector unsigned char)
8389              (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8390   __c = __builtin_altivec_vsum2sws(__a, __c);
8391   return (vector signed int)
8392     vec_perm(__c, __c, (vector unsigned char)
8393              (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8394 #else
8395   return __builtin_altivec_vsum2sws(__a, __b);
8396 #endif
8397 }
8398
8399 /* vec_sums */
8400
8401 /* The vsumsws instruction has a big-endian bias, so that the second
8402    input vector and the result always reference big-endian element 3
8403    (little-endian element 0).  For ease of porting the programmer
8404    wants element 3 in both cases, so for little endian we must perform
8405    some permutes.  */
8406
8407 static vector signed int __attribute__((__always_inline__))
8408 vec_sums(vector signed int __a, vector signed int __b)
8409 {
8410 #ifdef __LITTLE_ENDIAN__
8411   __b = (vector signed int)vec_splat(__b, 3);
8412   __b = __builtin_altivec_vsumsws(__a, __b);
8413   return (vector signed int)(0, 0, 0, __b[0]);
8414 #else
8415   return __builtin_altivec_vsumsws(__a, __b);
8416 #endif
8417 }
8418
8419 /* vec_vsumsws */
8420
8421 static vector signed int __attribute__((__always_inline__))
8422 vec_vsumsws(vector signed int __a, vector signed int __b)
8423 {
8424 #ifdef __LITTLE_ENDIAN__
8425   __b = (vector signed int)vec_splat(__b, 3);
8426   __b = __builtin_altivec_vsumsws(__a, __b);
8427   return (vector signed int)(0, 0, 0, __b[0]);
8428 #else
8429   return __builtin_altivec_vsumsws(__a, __b);
8430 #endif
8431 }
8432
8433 /* vec_trunc */
8434
8435 static vector float __attribute__((__always_inline__))
8436 vec_trunc(vector float __a)
8437 {
8438   return __builtin_altivec_vrfiz(__a);
8439 }
8440
8441 /* vec_vrfiz */
8442
8443 static vector float __attribute__((__always_inline__))
8444 vec_vrfiz(vector float __a)
8445 {
8446   return __builtin_altivec_vrfiz(__a);
8447 }
8448
8449 /* vec_unpackh */
8450
8451 /* The vector unpack instructions all have a big-endian bias, so for
8452    little endian we must reverse the meanings of "high" and "low."  */
8453
8454 static vector short __ATTRS_o_ai
8455 vec_unpackh(vector signed char __a)
8456 {
8457 #ifdef __LITTLE_ENDIAN__
8458   return __builtin_altivec_vupklsb((vector char)__a);
8459 #else
8460   return __builtin_altivec_vupkhsb((vector char)__a);
8461 #endif
8462 }
8463
8464 static vector bool short __ATTRS_o_ai
8465 vec_unpackh(vector bool char __a)
8466 {
8467 #ifdef __LITTLE_ENDIAN__
8468   return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8469 #else
8470   return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8471 #endif
8472 }
8473
8474 static vector int __ATTRS_o_ai
8475 vec_unpackh(vector short __a)
8476 {
8477 #ifdef __LITTLE_ENDIAN__
8478   return __builtin_altivec_vupklsh(__a);
8479 #else
8480   return __builtin_altivec_vupkhsh(__a);
8481 #endif
8482 }
8483
8484 static vector bool int __ATTRS_o_ai
8485 vec_unpackh(vector bool short __a)
8486 {
8487 #ifdef __LITTLE_ENDIAN__
8488   return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8489 #else
8490   return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8491 #endif
8492 }
8493
8494 static vector unsigned int __ATTRS_o_ai
8495 vec_unpackh(vector pixel __a)
8496 {
8497 #ifdef __LITTLE_ENDIAN__
8498   return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8499 #else
8500   return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8501 #endif
8502 }
8503
8504 /* vec_vupkhsb */
8505
8506 static vector short __ATTRS_o_ai
8507 vec_vupkhsb(vector signed char __a)
8508 {
8509 #ifdef __LITTLE_ENDIAN__
8510   return __builtin_altivec_vupklsb((vector char)__a);
8511 #else
8512   return __builtin_altivec_vupkhsb((vector char)__a);
8513 #endif
8514 }
8515
8516 static vector bool short __ATTRS_o_ai
8517 vec_vupkhsb(vector bool char __a)
8518 {
8519 #ifdef __LITTLE_ENDIAN__
8520   return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8521 #else
8522   return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8523 #endif
8524 }
8525
8526 /* vec_vupkhsh */
8527
8528 static vector int __ATTRS_o_ai
8529 vec_vupkhsh(vector short __a)
8530 {
8531 #ifdef __LITTLE_ENDIAN__
8532   return __builtin_altivec_vupklsh(__a);
8533 #else
8534   return __builtin_altivec_vupkhsh(__a);
8535 #endif
8536 }
8537
8538 static vector bool int __ATTRS_o_ai
8539 vec_vupkhsh(vector bool short __a)
8540 {
8541 #ifdef __LITTLE_ENDIAN__
8542   return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8543 #else
8544   return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8545 #endif
8546 }
8547
8548 static vector unsigned int __ATTRS_o_ai
8549 vec_vupkhsh(vector pixel __a)
8550 {
8551 #ifdef __LITTLE_ENDIAN__
8552   return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8553 #else
8554   return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8555 #endif
8556 }
8557
8558 /* vec_unpackl */
8559
8560 static vector short __ATTRS_o_ai
8561 vec_unpackl(vector signed char __a)
8562 {
8563 #ifdef __LITTLE_ENDIAN__
8564   return __builtin_altivec_vupkhsb((vector char)__a);
8565 #else
8566   return __builtin_altivec_vupklsb((vector char)__a);
8567 #endif
8568 }
8569
8570 static vector bool short __ATTRS_o_ai
8571 vec_unpackl(vector bool char __a)
8572 {
8573 #ifdef __LITTLE_ENDIAN__
8574   return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8575 #else
8576   return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8577 #endif
8578 }
8579
8580 static vector int __ATTRS_o_ai
8581 vec_unpackl(vector short __a)
8582 {
8583 #ifdef __LITTLE_ENDIAN__
8584   return __builtin_altivec_vupkhsh(__a);
8585 #else
8586   return __builtin_altivec_vupklsh(__a);
8587 #endif
8588 }
8589
8590 static vector bool int __ATTRS_o_ai
8591 vec_unpackl(vector bool short __a)
8592 {
8593 #ifdef __LITTLE_ENDIAN__
8594   return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8595 #else
8596   return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8597 #endif
8598 }
8599
8600 static vector unsigned int __ATTRS_o_ai
8601 vec_unpackl(vector pixel __a)
8602 {
8603 #ifdef __LITTLE_ENDIAN__
8604   return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8605 #else
8606   return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8607 #endif
8608 }
8609
8610 /* vec_vupklsb */
8611
8612 static vector short __ATTRS_o_ai
8613 vec_vupklsb(vector signed char __a)
8614 {
8615 #ifdef __LITTLE_ENDIAN__
8616   return __builtin_altivec_vupkhsb((vector char)__a);
8617 #else
8618   return __builtin_altivec_vupklsb((vector char)__a);
8619 #endif
8620 }
8621
8622 static vector bool short __ATTRS_o_ai
8623 vec_vupklsb(vector bool char __a)
8624 {
8625 #ifdef __LITTLE_ENDIAN__
8626   return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8627 #else
8628   return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8629 #endif
8630 }
8631
8632 /* vec_vupklsh */
8633
8634 static vector int __ATTRS_o_ai
8635 vec_vupklsh(vector short __a)
8636 {
8637 #ifdef __LITTLE_ENDIAN__
8638   return __builtin_altivec_vupkhsh(__a);
8639 #else
8640   return __builtin_altivec_vupklsh(__a);
8641 #endif
8642 }
8643
8644 static vector bool int __ATTRS_o_ai
8645 vec_vupklsh(vector bool short __a)
8646 {
8647 #ifdef __LITTLE_ENDIAN__
8648   return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8649 #else
8650   return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8651 #endif
8652 }
8653
8654 static vector unsigned int __ATTRS_o_ai
8655 vec_vupklsh(vector pixel __a)
8656 {
8657 #ifdef __LITTLE_ENDIAN__
8658   return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8659 #else
8660   return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8661 #endif
8662 }
8663
8664 /* vec_xor */
8665
8666 #define __builtin_altivec_vxor vec_xor
8667
8668 static vector signed char __ATTRS_o_ai
8669 vec_xor(vector signed char __a, vector signed char __b)
8670 {
8671   return __a ^ __b;
8672 }
8673
8674 static vector signed char __ATTRS_o_ai
8675 vec_xor(vector bool char __a, vector signed char __b)
8676 {
8677   return (vector signed char)__a ^ __b;
8678 }
8679
8680 static vector signed char __ATTRS_o_ai
8681 vec_xor(vector signed char __a, vector bool char __b)
8682 {
8683   return __a ^ (vector signed char)__b;
8684 }
8685
8686 static vector unsigned char __ATTRS_o_ai
8687 vec_xor(vector unsigned char __a, vector unsigned char __b)
8688 {
8689   return __a ^ __b;
8690 }
8691
8692 static vector unsigned char __ATTRS_o_ai
8693 vec_xor(vector bool char __a, vector unsigned char __b)
8694 {
8695   return (vector unsigned char)__a ^ __b;
8696 }
8697
8698 static vector unsigned char __ATTRS_o_ai
8699 vec_xor(vector unsigned char __a, vector bool char __b)
8700 {
8701   return __a ^ (vector unsigned char)__b;
8702 }
8703
8704 static vector bool char __ATTRS_o_ai
8705 vec_xor(vector bool char __a, vector bool char __b)
8706 {
8707   return __a ^ __b;
8708 }
8709
8710 static vector short __ATTRS_o_ai
8711 vec_xor(vector short __a, vector short __b)
8712 {
8713   return __a ^ __b;
8714 }
8715
8716 static vector short __ATTRS_o_ai
8717 vec_xor(vector bool short __a, vector short __b)
8718 {
8719   return (vector short)__a ^ __b;
8720 }
8721
8722 static vector short __ATTRS_o_ai
8723 vec_xor(vector short __a, vector bool short __b)
8724 {
8725   return __a ^ (vector short)__b;
8726 }
8727
8728 static vector unsigned short __ATTRS_o_ai
8729 vec_xor(vector unsigned short __a, vector unsigned short __b)
8730 {
8731   return __a ^ __b;
8732 }
8733
8734 static vector unsigned short __ATTRS_o_ai
8735 vec_xor(vector bool short __a, vector unsigned short __b)
8736 {
8737   return (vector unsigned short)__a ^ __b;
8738 }
8739
8740 static vector unsigned short __ATTRS_o_ai
8741 vec_xor(vector unsigned short __a, vector bool short __b)
8742 {
8743   return __a ^ (vector unsigned short)__b;
8744 }
8745
8746 static vector bool short __ATTRS_o_ai
8747 vec_xor(vector bool short __a, vector bool short __b)
8748 {
8749   return __a ^ __b;
8750 }
8751
8752 static vector int __ATTRS_o_ai
8753 vec_xor(vector int __a, vector int __b)
8754 {
8755   return __a ^ __b;
8756 }
8757
8758 static vector int __ATTRS_o_ai
8759 vec_xor(vector bool int __a, vector int __b)
8760 {
8761   return (vector int)__a ^ __b;
8762 }
8763
8764 static vector int __ATTRS_o_ai
8765 vec_xor(vector int __a, vector bool int __b)
8766 {
8767   return __a ^ (vector int)__b;
8768 }
8769
8770 static vector unsigned int __ATTRS_o_ai
8771 vec_xor(vector unsigned int __a, vector unsigned int __b)
8772 {
8773   return __a ^ __b;
8774 }
8775
8776 static vector unsigned int __ATTRS_o_ai
8777 vec_xor(vector bool int __a, vector unsigned int __b)
8778 {
8779   return (vector unsigned int)__a ^ __b;
8780 }
8781
8782 static vector unsigned int __ATTRS_o_ai
8783 vec_xor(vector unsigned int __a, vector bool int __b)
8784 {
8785   return __a ^ (vector unsigned int)__b;
8786 }
8787
8788 static vector bool int __ATTRS_o_ai
8789 vec_xor(vector bool int __a, vector bool int __b)
8790 {
8791   return __a ^ __b;
8792 }
8793
8794 static vector float __ATTRS_o_ai
8795 vec_xor(vector float __a, vector float __b)
8796 {
8797   vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
8798   return (vector float)__res;
8799 }
8800
8801 static vector float __ATTRS_o_ai
8802 vec_xor(vector bool int __a, vector float __b)
8803 {
8804   vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
8805   return (vector float)__res;
8806 }
8807
8808 static vector float __ATTRS_o_ai
8809 vec_xor(vector float __a, vector bool int __b)
8810 {
8811   vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
8812   return (vector float)__res;
8813 }
8814
8815 /* vec_vxor */
8816
8817 static vector signed char __ATTRS_o_ai
8818 vec_vxor(vector signed char __a, vector signed char __b)
8819 {
8820   return __a ^ __b;
8821 }
8822
8823 static vector signed char __ATTRS_o_ai
8824 vec_vxor(vector bool char __a, vector signed char __b)
8825 {
8826   return (vector signed char)__a ^ __b;
8827 }
8828
8829 static vector signed char __ATTRS_o_ai
8830 vec_vxor(vector signed char __a, vector bool char __b)
8831 {
8832   return __a ^ (vector signed char)__b;
8833 }
8834
8835 static vector unsigned char __ATTRS_o_ai
8836 vec_vxor(vector unsigned char __a, vector unsigned char __b)
8837 {
8838   return __a ^ __b;
8839 }
8840
8841 static vector unsigned char __ATTRS_o_ai
8842 vec_vxor(vector bool char __a, vector unsigned char __b)
8843 {
8844   return (vector unsigned char)__a ^ __b;
8845 }
8846
8847 static vector unsigned char __ATTRS_o_ai
8848 vec_vxor(vector unsigned char __a, vector bool char __b)
8849 {
8850   return __a ^ (vector unsigned char)__b;
8851 }
8852
8853 static vector bool char __ATTRS_o_ai
8854 vec_vxor(vector bool char __a, vector bool char __b)
8855 {
8856   return __a ^ __b;
8857 }
8858
8859 static vector short __ATTRS_o_ai
8860 vec_vxor(vector short __a, vector short __b)
8861 {
8862   return __a ^ __b;
8863 }
8864
8865 static vector short __ATTRS_o_ai
8866 vec_vxor(vector bool short __a, vector short __b)
8867 {
8868   return (vector short)__a ^ __b;
8869 }
8870
8871 static vector short __ATTRS_o_ai
8872 vec_vxor(vector short __a, vector bool short __b)
8873 {
8874   return __a ^ (vector short)__b;
8875 }
8876
8877 static vector unsigned short __ATTRS_o_ai
8878 vec_vxor(vector unsigned short __a, vector unsigned short __b)
8879 {
8880   return __a ^ __b;
8881 }
8882
8883 static vector unsigned short __ATTRS_o_ai
8884 vec_vxor(vector bool short __a, vector unsigned short __b)
8885 {
8886   return (vector unsigned short)__a ^ __b;
8887 }
8888
8889 static vector unsigned short __ATTRS_o_ai
8890 vec_vxor(vector unsigned short __a, vector bool short __b)
8891 {
8892   return __a ^ (vector unsigned short)__b;
8893 }
8894
8895 static vector bool short __ATTRS_o_ai
8896 vec_vxor(vector bool short __a, vector bool short __b)
8897 {
8898   return __a ^ __b;
8899 }
8900
8901 static vector int __ATTRS_o_ai
8902 vec_vxor(vector int __a, vector int __b)
8903 {
8904   return __a ^ __b;
8905 }
8906
8907 static vector int __ATTRS_o_ai
8908 vec_vxor(vector bool int __a, vector int __b)
8909 {
8910   return (vector int)__a ^ __b;
8911 }
8912
8913 static vector int __ATTRS_o_ai
8914 vec_vxor(vector int __a, vector bool int __b)
8915 {
8916   return __a ^ (vector int)__b;
8917 }
8918
8919 static vector unsigned int __ATTRS_o_ai
8920 vec_vxor(vector unsigned int __a, vector unsigned int __b)
8921 {
8922   return __a ^ __b;
8923 }
8924
8925 static vector unsigned int __ATTRS_o_ai
8926 vec_vxor(vector bool int __a, vector unsigned int __b)
8927 {
8928   return (vector unsigned int)__a ^ __b;
8929 }
8930
8931 static vector unsigned int __ATTRS_o_ai
8932 vec_vxor(vector unsigned int __a, vector bool int __b)
8933 {
8934   return __a ^ (vector unsigned int)__b;
8935 }
8936
8937 static vector bool int __ATTRS_o_ai
8938 vec_vxor(vector bool int __a, vector bool int __b)
8939 {
8940   return __a ^ __b;
8941 }
8942
8943 static vector float __ATTRS_o_ai
8944 vec_vxor(vector float __a, vector float __b)
8945 {
8946   vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
8947   return (vector float)__res;
8948 }
8949
8950 static vector float __ATTRS_o_ai
8951 vec_vxor(vector bool int __a, vector float __b)
8952 {
8953   vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
8954   return (vector float)__res;
8955 }
8956
8957 static vector float __ATTRS_o_ai
8958 vec_vxor(vector float __a, vector bool int __b)
8959 {
8960   vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
8961   return (vector float)__res;
8962 }
8963
8964 /* ------------------------ extensions for CBEA ----------------------------- */
8965
8966 /* vec_extract */
8967
8968 static signed char __ATTRS_o_ai
8969 vec_extract(vector signed char __a, int __b)
8970 {
8971   return __a[__b];
8972 }
8973
8974 static unsigned char __ATTRS_o_ai
8975 vec_extract(vector unsigned char __a, int __b)
8976 {
8977   return __a[__b];
8978 }
8979
8980 static short __ATTRS_o_ai
8981 vec_extract(vector short __a, int __b)
8982 {
8983   return __a[__b];
8984 }
8985
8986 static unsigned short __ATTRS_o_ai
8987 vec_extract(vector unsigned short __a, int __b)
8988 {
8989   return __a[__b];
8990 }
8991
8992 static int __ATTRS_o_ai
8993 vec_extract(vector int __a, int __b)
8994 {
8995   return __a[__b];
8996 }
8997
8998 static unsigned int __ATTRS_o_ai
8999 vec_extract(vector unsigned int __a, int __b)
9000 {
9001   return __a[__b];
9002 }
9003
9004 static float __ATTRS_o_ai
9005 vec_extract(vector float __a, int __b)
9006 {
9007   return __a[__b];
9008 }
9009
9010 /* vec_insert */
9011
9012 static vector signed char __ATTRS_o_ai
9013 vec_insert(signed char __a, vector signed char __b, int __c)
9014 {
9015   __b[__c] = __a;
9016   return __b;
9017 }
9018
9019 static vector unsigned char __ATTRS_o_ai
9020 vec_insert(unsigned char __a, vector unsigned char __b, int __c)
9021 {
9022   __b[__c] = __a;
9023   return __b;
9024 }
9025
9026 static vector short __ATTRS_o_ai
9027 vec_insert(short __a, vector short __b, int __c)
9028 {
9029   __b[__c] = __a;
9030   return __b;
9031 }
9032
9033 static vector unsigned short __ATTRS_o_ai
9034 vec_insert(unsigned short __a, vector unsigned short __b, int __c)
9035 {
9036   __b[__c] = __a;
9037   return __b;
9038 }
9039
9040 static vector int __ATTRS_o_ai
9041 vec_insert(int __a, vector int __b, int __c)
9042 {
9043   __b[__c] = __a;
9044   return __b;
9045 }
9046
9047 static vector unsigned int __ATTRS_o_ai
9048 vec_insert(unsigned int __a, vector unsigned int __b, int __c)
9049 {
9050   __b[__c] = __a;
9051   return __b;
9052 }
9053
9054 static vector float __ATTRS_o_ai
9055 vec_insert(float __a, vector float __b, int __c)
9056 {
9057   __b[__c] = __a;
9058   return __b;
9059 }
9060
9061 /* vec_lvlx */
9062
9063 static vector signed char __ATTRS_o_ai
9064 vec_lvlx(int __a, const signed char *__b)
9065 {
9066   return vec_perm(vec_ld(__a, __b),
9067                   (vector signed char)(0),
9068                   vec_lvsl(__a, __b));
9069 }
9070
9071 static vector signed char __ATTRS_o_ai
9072 vec_lvlx(int __a, const vector signed char *__b)
9073 {
9074   return vec_perm(vec_ld(__a, __b),
9075                   (vector signed char)(0),
9076                   vec_lvsl(__a, (unsigned char *)__b));
9077 }
9078
9079 static vector unsigned char __ATTRS_o_ai
9080 vec_lvlx(int __a, const unsigned char *__b)
9081 {
9082   return vec_perm(vec_ld(__a, __b),
9083                   (vector unsigned char)(0),
9084                   vec_lvsl(__a, __b));
9085 }
9086
9087 static vector unsigned char __ATTRS_o_ai
9088 vec_lvlx(int __a, const vector unsigned char *__b)
9089 {
9090   return vec_perm(vec_ld(__a, __b),
9091                   (vector unsigned char)(0),
9092                   vec_lvsl(__a, (unsigned char *)__b));
9093 }
9094
9095 static vector bool char __ATTRS_o_ai
9096 vec_lvlx(int __a, const vector bool char *__b)
9097 {
9098   return vec_perm(vec_ld(__a, __b),
9099                   (vector bool char)(0),
9100                   vec_lvsl(__a, (unsigned char *)__b));
9101 }
9102
9103 static vector short __ATTRS_o_ai
9104 vec_lvlx(int __a, const short *__b)
9105 {
9106   return vec_perm(vec_ld(__a, __b),
9107                   (vector short)(0),
9108                   vec_lvsl(__a, __b));
9109 }
9110
9111 static vector short __ATTRS_o_ai
9112 vec_lvlx(int __a, const vector short *__b)
9113 {
9114   return vec_perm(vec_ld(__a, __b),
9115                   (vector short)(0),
9116                   vec_lvsl(__a, (unsigned char *)__b));
9117 }
9118
9119 static vector unsigned short __ATTRS_o_ai
9120 vec_lvlx(int __a, const unsigned short *__b)
9121 {
9122   return vec_perm(vec_ld(__a, __b),
9123                   (vector unsigned short)(0),
9124                   vec_lvsl(__a, __b));
9125 }
9126
9127 static vector unsigned short __ATTRS_o_ai
9128 vec_lvlx(int __a, const vector unsigned short *__b)
9129 {
9130   return vec_perm(vec_ld(__a, __b),
9131                   (vector unsigned short)(0),
9132                   vec_lvsl(__a, (unsigned char *)__b));
9133 }
9134
9135 static vector bool short __ATTRS_o_ai
9136 vec_lvlx(int __a, const vector bool short *__b)
9137 {
9138   return vec_perm(vec_ld(__a, __b),
9139                   (vector bool short)(0),
9140                   vec_lvsl(__a, (unsigned char *)__b));
9141 }
9142
9143 static vector pixel __ATTRS_o_ai
9144 vec_lvlx(int __a, const vector pixel *__b)
9145 {
9146   return vec_perm(vec_ld(__a, __b),
9147                   (vector pixel)(0),
9148                   vec_lvsl(__a, (unsigned char *)__b));
9149 }
9150
9151 static vector int __ATTRS_o_ai
9152 vec_lvlx(int __a, const int *__b)
9153 {
9154   return vec_perm(vec_ld(__a, __b),
9155                   (vector int)(0),
9156                   vec_lvsl(__a, __b));
9157 }
9158
9159 static vector int __ATTRS_o_ai
9160 vec_lvlx(int __a, const vector int *__b)
9161 {
9162   return vec_perm(vec_ld(__a, __b),
9163                   (vector int)(0),
9164                   vec_lvsl(__a, (unsigned char *)__b));
9165 }
9166
9167 static vector unsigned int __ATTRS_o_ai
9168 vec_lvlx(int __a, const unsigned int *__b)
9169 {
9170   return vec_perm(vec_ld(__a, __b),
9171                   (vector unsigned int)(0),
9172                   vec_lvsl(__a, __b));
9173 }
9174
9175 static vector unsigned int __ATTRS_o_ai
9176 vec_lvlx(int __a, const vector unsigned int *__b)
9177 {
9178   return vec_perm(vec_ld(__a, __b),
9179                   (vector unsigned int)(0),
9180                   vec_lvsl(__a, (unsigned char *)__b));
9181 }
9182
9183 static vector bool int __ATTRS_o_ai
9184 vec_lvlx(int __a, const vector bool int *__b)
9185 {
9186   return vec_perm(vec_ld(__a, __b),
9187                   (vector bool int)(0),
9188                   vec_lvsl(__a, (unsigned char *)__b));
9189 }
9190
9191 static vector float __ATTRS_o_ai
9192 vec_lvlx(int __a, const float *__b)
9193 {
9194   return vec_perm(vec_ld(__a, __b),
9195                   (vector float)(0),
9196                   vec_lvsl(__a, __b));
9197 }
9198
9199 static vector float __ATTRS_o_ai
9200 vec_lvlx(int __a, const vector float *__b)
9201 {
9202   return vec_perm(vec_ld(__a, __b),
9203                   (vector float)(0),
9204                   vec_lvsl(__a, (unsigned char *)__b));
9205 }
9206
9207 /* vec_lvlxl */
9208
9209 static vector signed char __ATTRS_o_ai
9210 vec_lvlxl(int __a, const signed char *__b)
9211 {
9212   return vec_perm(vec_ldl(__a, __b),
9213                   (vector signed char)(0),
9214                   vec_lvsl(__a, __b));
9215 }
9216
9217 static vector signed char __ATTRS_o_ai
9218 vec_lvlxl(int __a, const vector signed char *__b)
9219 {
9220   return vec_perm(vec_ldl(__a, __b),
9221                   (vector signed char)(0),
9222                   vec_lvsl(__a, (unsigned char *)__b));
9223 }
9224
9225 static vector unsigned char __ATTRS_o_ai
9226 vec_lvlxl(int __a, const unsigned char *__b)
9227 {
9228   return vec_perm(vec_ldl(__a, __b),
9229                   (vector unsigned char)(0),
9230                   vec_lvsl(__a, __b));
9231 }
9232
9233 static vector unsigned char __ATTRS_o_ai
9234 vec_lvlxl(int __a, const vector unsigned char *__b)
9235 {
9236   return vec_perm(vec_ldl(__a, __b),
9237                   (vector unsigned char)(0),
9238                   vec_lvsl(__a, (unsigned char *)__b));
9239 }
9240
9241 static vector bool char __ATTRS_o_ai
9242 vec_lvlxl(int __a, const vector bool char *__b)
9243 {
9244   return vec_perm(vec_ldl(__a, __b),
9245                   (vector bool char)(0),
9246                   vec_lvsl(__a, (unsigned char *)__b));
9247 }
9248
9249 static vector short __ATTRS_o_ai
9250 vec_lvlxl(int __a, const short *__b)
9251 {
9252   return vec_perm(vec_ldl(__a, __b),
9253                   (vector short)(0),
9254                   vec_lvsl(__a, __b));
9255 }
9256
9257 static vector short __ATTRS_o_ai
9258 vec_lvlxl(int __a, const vector short *__b)
9259 {
9260   return vec_perm(vec_ldl(__a, __b),
9261                   (vector short)(0),
9262                   vec_lvsl(__a, (unsigned char *)__b));
9263 }
9264
9265 static vector unsigned short __ATTRS_o_ai
9266 vec_lvlxl(int __a, const unsigned short *__b)
9267 {
9268   return vec_perm(vec_ldl(__a, __b),
9269                   (vector unsigned short)(0),
9270                   vec_lvsl(__a, __b));
9271 }
9272
9273 static vector unsigned short __ATTRS_o_ai
9274 vec_lvlxl(int __a, const vector unsigned short *__b)
9275 {
9276   return vec_perm(vec_ldl(__a, __b),
9277                   (vector unsigned short)(0),
9278                   vec_lvsl(__a, (unsigned char *)__b));
9279 }
9280
9281 static vector bool short __ATTRS_o_ai
9282 vec_lvlxl(int __a, const vector bool short *__b)
9283 {
9284   return vec_perm(vec_ldl(__a, __b),
9285                   (vector bool short)(0),
9286                   vec_lvsl(__a, (unsigned char *)__b));
9287 }
9288
9289 static vector pixel __ATTRS_o_ai
9290 vec_lvlxl(int __a, const vector pixel *__b)
9291 {
9292   return vec_perm(vec_ldl(__a, __b),
9293                   (vector pixel)(0),
9294                   vec_lvsl(__a, (unsigned char *)__b));
9295 }
9296
9297 static vector int __ATTRS_o_ai
9298 vec_lvlxl(int __a, const int *__b)
9299 {
9300   return vec_perm(vec_ldl(__a, __b),
9301                   (vector int)(0),
9302                   vec_lvsl(__a, __b));
9303 }
9304
9305 static vector int __ATTRS_o_ai
9306 vec_lvlxl(int __a, const vector int *__b)
9307 {
9308   return vec_perm(vec_ldl(__a, __b),
9309                   (vector int)(0),
9310                   vec_lvsl(__a, (unsigned char *)__b));
9311 }
9312
9313 static vector unsigned int __ATTRS_o_ai
9314 vec_lvlxl(int __a, const unsigned int *__b)
9315 {
9316   return vec_perm(vec_ldl(__a, __b),
9317                   (vector unsigned int)(0),
9318                   vec_lvsl(__a, __b));
9319 }
9320
9321 static vector unsigned int __ATTRS_o_ai
9322 vec_lvlxl(int __a, const vector unsigned int *__b)
9323 {
9324   return vec_perm(vec_ldl(__a, __b),
9325                   (vector unsigned int)(0),
9326                   vec_lvsl(__a, (unsigned char *)__b));
9327 }
9328
9329 static vector bool int __ATTRS_o_ai
9330 vec_lvlxl(int __a, const vector bool int *__b)
9331 {
9332   return vec_perm(vec_ldl(__a, __b),
9333                   (vector bool int)(0),
9334                   vec_lvsl(__a, (unsigned char *)__b));
9335 }
9336
9337 static vector float __ATTRS_o_ai
9338 vec_lvlxl(int __a, const float *__b)
9339 {
9340   return vec_perm(vec_ldl(__a, __b),
9341                   (vector float)(0),
9342                   vec_lvsl(__a, __b));
9343 }
9344
9345 static vector float __ATTRS_o_ai
9346 vec_lvlxl(int __a, vector float *__b)
9347 {
9348   return vec_perm(vec_ldl(__a, __b),
9349                   (vector float)(0),
9350                   vec_lvsl(__a, (unsigned char *)__b));
9351 }
9352
9353 /* vec_lvrx */
9354
9355 static vector signed char __ATTRS_o_ai
9356 vec_lvrx(int __a, const signed char *__b)
9357 {
9358   return vec_perm((vector signed char)(0),
9359                   vec_ld(__a, __b),
9360                   vec_lvsl(__a, __b));
9361 }
9362
9363 static vector signed char __ATTRS_o_ai
9364 vec_lvrx(int __a, const vector signed char *__b)
9365 {
9366   return vec_perm((vector signed char)(0),
9367                   vec_ld(__a, __b),
9368                   vec_lvsl(__a, (unsigned char *)__b));
9369 }
9370
9371 static vector unsigned char __ATTRS_o_ai
9372 vec_lvrx(int __a, const unsigned char *__b)
9373 {
9374   return vec_perm((vector unsigned char)(0),
9375                   vec_ld(__a, __b),
9376                   vec_lvsl(__a, __b));
9377 }
9378
9379 static vector unsigned char __ATTRS_o_ai
9380 vec_lvrx(int __a, const vector unsigned char *__b)
9381 {
9382   return vec_perm((vector unsigned char)(0),
9383                   vec_ld(__a, __b),
9384                   vec_lvsl(__a, (unsigned char *)__b));
9385 }
9386
9387 static vector bool char __ATTRS_o_ai
9388 vec_lvrx(int __a, const vector bool char *__b)
9389 {
9390   return vec_perm((vector bool char)(0),
9391                   vec_ld(__a, __b),
9392                   vec_lvsl(__a, (unsigned char *)__b));
9393 }
9394
9395 static vector short __ATTRS_o_ai
9396 vec_lvrx(int __a, const short *__b)
9397 {
9398   return vec_perm((vector short)(0),
9399                   vec_ld(__a, __b),
9400                   vec_lvsl(__a, __b));
9401 }
9402
9403 static vector short __ATTRS_o_ai
9404 vec_lvrx(int __a, const vector short *__b)
9405 {
9406   return vec_perm((vector short)(0),
9407                   vec_ld(__a, __b),
9408                   vec_lvsl(__a, (unsigned char *)__b));
9409 }
9410
9411 static vector unsigned short __ATTRS_o_ai
9412 vec_lvrx(int __a, const unsigned short *__b)
9413 {
9414   return vec_perm((vector unsigned short)(0),
9415                   vec_ld(__a, __b),
9416                   vec_lvsl(__a, __b));
9417 }
9418
9419 static vector unsigned short __ATTRS_o_ai
9420 vec_lvrx(int __a, const vector unsigned short *__b)
9421 {
9422   return vec_perm((vector unsigned short)(0),
9423                   vec_ld(__a, __b),
9424                   vec_lvsl(__a, (unsigned char *)__b));
9425 }
9426
9427 static vector bool short __ATTRS_o_ai
9428 vec_lvrx(int __a, const vector bool short *__b)
9429 {
9430   return vec_perm((vector bool short)(0),
9431                   vec_ld(__a, __b),
9432                   vec_lvsl(__a, (unsigned char *)__b));
9433 }
9434
9435 static vector pixel __ATTRS_o_ai
9436 vec_lvrx(int __a, const vector pixel *__b)
9437 {
9438   return vec_perm((vector pixel)(0),
9439                   vec_ld(__a, __b),
9440                   vec_lvsl(__a, (unsigned char *)__b));
9441 }
9442
9443 static vector int __ATTRS_o_ai
9444 vec_lvrx(int __a, const int *__b)
9445 {
9446   return vec_perm((vector int)(0),
9447                   vec_ld(__a, __b),
9448                   vec_lvsl(__a, __b));
9449 }
9450
9451 static vector int __ATTRS_o_ai
9452 vec_lvrx(int __a, const vector int *__b)
9453 {
9454   return vec_perm((vector int)(0),
9455                   vec_ld(__a, __b),
9456                   vec_lvsl(__a, (unsigned char *)__b));
9457 }
9458
9459 static vector unsigned int __ATTRS_o_ai
9460 vec_lvrx(int __a, const unsigned int *__b)
9461 {
9462   return vec_perm((vector unsigned int)(0),
9463                   vec_ld(__a, __b),
9464                   vec_lvsl(__a, __b));
9465 }
9466
9467 static vector unsigned int __ATTRS_o_ai
9468 vec_lvrx(int __a, const vector unsigned int *__b)
9469 {
9470   return vec_perm((vector unsigned int)(0),
9471                   vec_ld(__a, __b),
9472                   vec_lvsl(__a, (unsigned char *)__b));
9473 }
9474
9475 static vector bool int __ATTRS_o_ai
9476 vec_lvrx(int __a, const vector bool int *__b)
9477 {
9478   return vec_perm((vector bool int)(0),
9479                   vec_ld(__a, __b),
9480                   vec_lvsl(__a, (unsigned char *)__b));
9481 }
9482
9483 static vector float __ATTRS_o_ai
9484 vec_lvrx(int __a, const float *__b)
9485 {
9486   return vec_perm((vector float)(0),
9487                   vec_ld(__a, __b),
9488                   vec_lvsl(__a, __b));
9489 }
9490
9491 static vector float __ATTRS_o_ai
9492 vec_lvrx(int __a, const vector float *__b)
9493 {
9494   return vec_perm((vector float)(0),
9495                   vec_ld(__a, __b),
9496                   vec_lvsl(__a, (unsigned char *)__b));
9497 }
9498
9499 /* vec_lvrxl */
9500
9501 static vector signed char __ATTRS_o_ai
9502 vec_lvrxl(int __a, const signed char *__b)
9503 {
9504   return vec_perm((vector signed char)(0),
9505                   vec_ldl(__a, __b),
9506                   vec_lvsl(__a, __b));
9507 }
9508
9509 static vector signed char __ATTRS_o_ai
9510 vec_lvrxl(int __a, const vector signed char *__b)
9511 {
9512   return vec_perm((vector signed char)(0),
9513                   vec_ldl(__a, __b),
9514                   vec_lvsl(__a, (unsigned char *)__b));
9515 }
9516
9517 static vector unsigned char __ATTRS_o_ai
9518 vec_lvrxl(int __a, const unsigned char *__b)
9519 {
9520   return vec_perm((vector unsigned char)(0),
9521                   vec_ldl(__a, __b),
9522                   vec_lvsl(__a, __b));
9523 }
9524
9525 static vector unsigned char __ATTRS_o_ai
9526 vec_lvrxl(int __a, const vector unsigned char *__b)
9527 {
9528   return vec_perm((vector unsigned char)(0),
9529                   vec_ldl(__a, __b),
9530                   vec_lvsl(__a, (unsigned char *)__b));
9531 }
9532
9533 static vector bool char __ATTRS_o_ai
9534 vec_lvrxl(int __a, const vector bool char *__b)
9535 {
9536   return vec_perm((vector bool char)(0),
9537                   vec_ldl(__a, __b),
9538                   vec_lvsl(__a, (unsigned char *)__b));
9539 }
9540
9541 static vector short __ATTRS_o_ai
9542 vec_lvrxl(int __a, const short *__b)
9543 {
9544   return vec_perm((vector short)(0),
9545                   vec_ldl(__a, __b),
9546                   vec_lvsl(__a, __b));
9547 }
9548
9549 static vector short __ATTRS_o_ai
9550 vec_lvrxl(int __a, const vector short *__b)
9551 {
9552   return vec_perm((vector short)(0),
9553                   vec_ldl(__a, __b),
9554                   vec_lvsl(__a, (unsigned char *)__b));
9555 }
9556
9557 static vector unsigned short __ATTRS_o_ai
9558 vec_lvrxl(int __a, const unsigned short *__b)
9559 {
9560   return vec_perm((vector unsigned short)(0),
9561                   vec_ldl(__a, __b),
9562                   vec_lvsl(__a, __b));
9563 }
9564
9565 static vector unsigned short __ATTRS_o_ai
9566 vec_lvrxl(int __a, const vector unsigned short *__b)
9567 {
9568   return vec_perm((vector unsigned short)(0),
9569                   vec_ldl(__a, __b),
9570                   vec_lvsl(__a, (unsigned char *)__b));
9571 }
9572
9573 static vector bool short __ATTRS_o_ai
9574 vec_lvrxl(int __a, const vector bool short *__b)
9575 {
9576   return vec_perm((vector bool short)(0),
9577                   vec_ldl(__a, __b),
9578                   vec_lvsl(__a, (unsigned char *)__b));
9579 }
9580
9581 static vector pixel __ATTRS_o_ai
9582 vec_lvrxl(int __a, const vector pixel *__b)
9583 {
9584   return vec_perm((vector pixel)(0),
9585                   vec_ldl(__a, __b),
9586                   vec_lvsl(__a, (unsigned char *)__b));
9587 }
9588
9589 static vector int __ATTRS_o_ai
9590 vec_lvrxl(int __a, const int *__b)
9591 {
9592   return vec_perm((vector int)(0),
9593                   vec_ldl(__a, __b),
9594                   vec_lvsl(__a, __b));
9595 }
9596
9597 static vector int __ATTRS_o_ai
9598 vec_lvrxl(int __a, const vector int *__b)
9599 {
9600   return vec_perm((vector int)(0),
9601                   vec_ldl(__a, __b),
9602                   vec_lvsl(__a, (unsigned char *)__b));
9603 }
9604
9605 static vector unsigned int __ATTRS_o_ai
9606 vec_lvrxl(int __a, const unsigned int *__b)
9607 {
9608   return vec_perm((vector unsigned int)(0),
9609                   vec_ldl(__a, __b),
9610                   vec_lvsl(__a, __b));
9611 }
9612
9613 static vector unsigned int __ATTRS_o_ai
9614 vec_lvrxl(int __a, const vector unsigned int *__b)
9615 {
9616   return vec_perm((vector unsigned int)(0),
9617                   vec_ldl(__a, __b),
9618                   vec_lvsl(__a, (unsigned char *)__b));
9619 }
9620
9621 static vector bool int __ATTRS_o_ai
9622 vec_lvrxl(int __a, const vector bool int *__b)
9623 {
9624   return vec_perm((vector bool int)(0),
9625                   vec_ldl(__a, __b),
9626                   vec_lvsl(__a, (unsigned char *)__b));
9627 }
9628
9629 static vector float __ATTRS_o_ai
9630 vec_lvrxl(int __a, const float *__b)
9631 {
9632   return vec_perm((vector float)(0),
9633                   vec_ldl(__a, __b),
9634                   vec_lvsl(__a, __b));
9635 }
9636
9637 static vector float __ATTRS_o_ai
9638 vec_lvrxl(int __a, const vector float *__b)
9639 {
9640   return vec_perm((vector float)(0),
9641                   vec_ldl(__a, __b),
9642                   vec_lvsl(__a, (unsigned char *)__b));
9643 }
9644
9645 /* vec_stvlx */
9646
9647 static void __ATTRS_o_ai
9648 vec_stvlx(vector signed char __a, int __b, signed char *__c)
9649 {
9650   return vec_st(vec_perm(vec_lvrx(__b, __c),
9651                          __a,
9652                          vec_lvsr(__b, __c)),
9653                 __b, __c);
9654 }
9655
9656 static void __ATTRS_o_ai
9657 vec_stvlx(vector signed char __a, int __b, vector signed char *__c)
9658 {
9659   return vec_st(vec_perm(vec_lvrx(__b, __c),
9660                          __a,
9661                          vec_lvsr(__b, (unsigned char *)__c)),
9662                 __b, __c);
9663 }
9664
9665 static void __ATTRS_o_ai
9666 vec_stvlx(vector unsigned char __a, int __b, unsigned char *__c)
9667 {
9668   return vec_st(vec_perm(vec_lvrx(__b, __c),
9669                          __a,
9670                          vec_lvsr(__b, __c)),
9671                 __b, __c);
9672 }
9673
9674 static void __ATTRS_o_ai
9675 vec_stvlx(vector unsigned char __a, int __b, vector unsigned char *__c)
9676 {
9677   return vec_st(vec_perm(vec_lvrx(__b, __c),
9678                          __a,
9679                          vec_lvsr(__b, (unsigned char *)__c)),
9680                 __b, __c);
9681 }
9682
9683 static void __ATTRS_o_ai
9684 vec_stvlx(vector bool char __a, int __b, vector bool char *__c)
9685 {
9686   return vec_st(vec_perm(vec_lvrx(__b, __c),
9687                          __a,
9688                          vec_lvsr(__b, (unsigned char *)__c)),
9689                 __b, __c);
9690 }
9691
9692 static void __ATTRS_o_ai
9693 vec_stvlx(vector short __a, int __b, short *__c)
9694 {
9695   return vec_st(vec_perm(vec_lvrx(__b, __c),
9696                          __a,
9697                          vec_lvsr(__b, __c)),
9698                 __b, __c);
9699 }
9700
9701 static void __ATTRS_o_ai
9702 vec_stvlx(vector short __a, int __b, vector short *__c)
9703 {
9704   return vec_st(vec_perm(vec_lvrx(__b, __c),
9705                          __a,
9706                          vec_lvsr(__b, (unsigned char *)__c)),
9707                 __b, __c);
9708 }
9709
9710 static void __ATTRS_o_ai
9711 vec_stvlx(vector unsigned short __a, int __b, unsigned short *__c)
9712 {
9713   return vec_st(vec_perm(vec_lvrx(__b, __c),
9714                          __a,
9715                          vec_lvsr(__b, __c)),
9716                 __b, __c);
9717 }
9718
9719 static void __ATTRS_o_ai
9720 vec_stvlx(vector unsigned short __a, int __b, vector unsigned short *__c)
9721 {
9722   return vec_st(vec_perm(vec_lvrx(__b, __c),
9723                          __a,
9724                          vec_lvsr(__b, (unsigned char *)__c)),
9725                 __b, __c);
9726 }
9727
9728 static void __ATTRS_o_ai
9729 vec_stvlx(vector bool short __a, int __b, vector bool short *__c)
9730 {
9731   return vec_st(vec_perm(vec_lvrx(__b, __c),
9732                          __a,
9733                          vec_lvsr(__b, (unsigned char *)__c)),
9734                 __b, __c);
9735 }
9736
9737 static void __ATTRS_o_ai
9738 vec_stvlx(vector pixel __a, int __b, vector pixel *__c)
9739 {
9740   return vec_st(vec_perm(vec_lvrx(__b, __c),
9741                          __a,
9742                          vec_lvsr(__b, (unsigned char *)__c)),
9743                 __b, __c);
9744 }
9745
9746 static void __ATTRS_o_ai
9747 vec_stvlx(vector int __a, int __b, int *__c)
9748 {
9749   return vec_st(vec_perm(vec_lvrx(__b, __c),
9750                          __a,
9751                          vec_lvsr(__b, __c)),
9752                 __b, __c);
9753 }
9754
9755 static void __ATTRS_o_ai
9756 vec_stvlx(vector int __a, int __b, vector int *__c)
9757 {
9758   return vec_st(vec_perm(vec_lvrx(__b, __c),
9759                          __a,
9760                          vec_lvsr(__b, (unsigned char *)__c)),
9761                 __b, __c);
9762 }
9763
9764 static void __ATTRS_o_ai
9765 vec_stvlx(vector unsigned int __a, int __b, unsigned int *__c)
9766 {
9767   return vec_st(vec_perm(vec_lvrx(__b, __c),
9768                          __a,
9769                          vec_lvsr(__b, __c)),
9770                 __b, __c);
9771 }
9772
9773 static void __ATTRS_o_ai
9774 vec_stvlx(vector unsigned int __a, int __b, vector unsigned int *__c)
9775 {
9776   return vec_st(vec_perm(vec_lvrx(__b, __c),
9777                          __a,
9778                          vec_lvsr(__b, (unsigned char *)__c)),
9779                 __b, __c);
9780 }
9781
9782 static void __ATTRS_o_ai
9783 vec_stvlx(vector bool int __a, int __b, vector bool int *__c)
9784 {
9785   return vec_st(vec_perm(vec_lvrx(__b, __c),
9786                          __a,
9787                          vec_lvsr(__b, (unsigned char *)__c)),
9788                 __b, __c);
9789 }
9790
9791 static void __ATTRS_o_ai
9792 vec_stvlx(vector float __a, int __b, vector float *__c)
9793 {
9794   return vec_st(vec_perm(vec_lvrx(__b, __c),
9795                          __a,
9796                          vec_lvsr(__b, (unsigned char *)__c)),
9797                 __b, __c);
9798 }
9799
9800 /* vec_stvlxl */
9801
9802 static void __ATTRS_o_ai
9803 vec_stvlxl(vector signed char __a, int __b, signed char *__c)
9804 {
9805   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9806                           __a,
9807                           vec_lvsr(__b, __c)),
9808                  __b, __c);
9809 }
9810
9811 static void __ATTRS_o_ai
9812 vec_stvlxl(vector signed char __a, int __b, vector signed char *__c)
9813 {
9814   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9815                           __a,
9816                           vec_lvsr(__b, (unsigned char *)__c)),
9817                  __b, __c);
9818 }
9819
9820 static void __ATTRS_o_ai
9821 vec_stvlxl(vector unsigned char __a, int __b, unsigned char *__c)
9822 {
9823   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9824                           __a,
9825                           vec_lvsr(__b, __c)),
9826                  __b, __c);
9827 }
9828
9829 static void __ATTRS_o_ai
9830 vec_stvlxl(vector unsigned char __a, int __b, vector unsigned char *__c)
9831 {
9832   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9833                           __a,
9834                           vec_lvsr(__b, (unsigned char *)__c)),
9835                  __b, __c);
9836 }
9837
9838 static void __ATTRS_o_ai
9839 vec_stvlxl(vector bool char __a, int __b, vector bool char *__c)
9840 {
9841   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9842                           __a,
9843                           vec_lvsr(__b, (unsigned char *)__c)),
9844                  __b, __c);
9845 }
9846
9847 static void __ATTRS_o_ai
9848 vec_stvlxl(vector short __a, int __b, short *__c)
9849 {
9850   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9851                           __a,
9852                           vec_lvsr(__b, __c)),
9853                  __b, __c);
9854 }
9855
9856 static void __ATTRS_o_ai
9857 vec_stvlxl(vector short __a, int __b, vector short *__c)
9858 {
9859   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9860                           __a,
9861                           vec_lvsr(__b, (unsigned char *)__c)),
9862                  __b, __c);
9863 }
9864
9865 static void __ATTRS_o_ai
9866 vec_stvlxl(vector unsigned short __a, int __b, unsigned short *__c)
9867 {
9868   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9869                           __a,
9870                           vec_lvsr(__b, __c)),
9871                  __b, __c);
9872 }
9873
9874 static void __ATTRS_o_ai
9875 vec_stvlxl(vector unsigned short __a, int __b, vector unsigned short *__c)
9876 {
9877   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9878                           __a,
9879                           vec_lvsr(__b, (unsigned char *)__c)),
9880                  __b, __c);
9881 }
9882
9883 static void __ATTRS_o_ai
9884 vec_stvlxl(vector bool short __a, int __b, vector bool short *__c)
9885 {
9886   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9887                           __a,
9888                           vec_lvsr(__b, (unsigned char *)__c)),
9889                  __b, __c);
9890 }
9891
9892 static void __ATTRS_o_ai
9893 vec_stvlxl(vector pixel __a, int __b, vector pixel *__c)
9894 {
9895   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9896                           __a,
9897                           vec_lvsr(__b, (unsigned char *)__c)),
9898                  __b, __c);
9899 }
9900
9901 static void __ATTRS_o_ai
9902 vec_stvlxl(vector int __a, int __b, int *__c)
9903 {
9904   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9905                           __a,
9906                           vec_lvsr(__b, __c)),
9907                  __b, __c);
9908 }
9909
9910 static void __ATTRS_o_ai
9911 vec_stvlxl(vector int __a, int __b, vector int *__c)
9912 {
9913   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9914                           __a,
9915                           vec_lvsr(__b, (unsigned char *)__c)),
9916                  __b, __c);
9917 }
9918
9919 static void __ATTRS_o_ai
9920 vec_stvlxl(vector unsigned int __a, int __b, unsigned int *__c)
9921 {
9922   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9923                           __a,
9924                           vec_lvsr(__b, __c)),
9925                  __b, __c);
9926 }
9927
9928 static void __ATTRS_o_ai
9929 vec_stvlxl(vector unsigned int __a, int __b, vector unsigned int *__c)
9930 {
9931   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9932                           __a,
9933                           vec_lvsr(__b, (unsigned char *)__c)),
9934                  __b, __c);
9935 }
9936
9937 static void __ATTRS_o_ai
9938 vec_stvlxl(vector bool int __a, int __b, vector bool int *__c)
9939 {
9940   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9941                           __a,
9942                           vec_lvsr(__b, (unsigned char *)__c)),
9943                  __b, __c);
9944 }
9945
9946 static void __ATTRS_o_ai
9947 vec_stvlxl(vector float __a, int __b, vector float *__c)
9948 {
9949   return vec_stl(vec_perm(vec_lvrx(__b, __c),
9950                           __a,
9951                           vec_lvsr(__b, (unsigned char *)__c)),
9952                  __b, __c);
9953 }
9954
9955 /* vec_stvrx */
9956
9957 static void __ATTRS_o_ai
9958 vec_stvrx(vector signed char __a, int __b, signed char *__c)
9959 {
9960   return vec_st(vec_perm(__a,
9961                          vec_lvlx(__b, __c),
9962                          vec_lvsr(__b, __c)),
9963                 __b, __c);
9964 }
9965
9966 static void __ATTRS_o_ai
9967 vec_stvrx(vector signed char __a, int __b, vector signed char *__c)
9968 {
9969   return vec_st(vec_perm(__a,
9970                          vec_lvlx(__b, __c),
9971                          vec_lvsr(__b, (unsigned char *)__c)),
9972                 __b, __c);
9973 }
9974
9975 static void __ATTRS_o_ai
9976 vec_stvrx(vector unsigned char __a, int __b, unsigned char *__c)
9977 {
9978   return vec_st(vec_perm(__a,
9979                          vec_lvlx(__b, __c),
9980                          vec_lvsr(__b, __c)),
9981                 __b, __c);
9982 }
9983
9984 static void __ATTRS_o_ai
9985 vec_stvrx(vector unsigned char __a, int __b, vector unsigned char *__c)
9986 {
9987   return vec_st(vec_perm(__a,
9988                          vec_lvlx(__b, __c),
9989                          vec_lvsr(__b, (unsigned char *)__c)),
9990                 __b, __c);
9991 }
9992
9993 static void __ATTRS_o_ai
9994 vec_stvrx(vector bool char __a, int __b, vector bool char *__c)
9995 {
9996   return vec_st(vec_perm(__a,
9997                          vec_lvlx(__b, __c),
9998                          vec_lvsr(__b, (unsigned char *)__c)),
9999                 __b, __c);
10000 }
10001
10002 static void __ATTRS_o_ai
10003 vec_stvrx(vector short __a, int __b, short *__c)
10004 {
10005   return vec_st(vec_perm(__a,
10006                          vec_lvlx(__b, __c),
10007                          vec_lvsr(__b, __c)),
10008                 __b, __c);
10009 }
10010
10011 static void __ATTRS_o_ai
10012 vec_stvrx(vector short __a, int __b, vector short *__c)
10013 {
10014   return vec_st(vec_perm(__a,
10015                          vec_lvlx(__b, __c),
10016                          vec_lvsr(__b, (unsigned char *)__c)),
10017                 __b, __c);
10018 }
10019
10020 static void __ATTRS_o_ai
10021 vec_stvrx(vector unsigned short __a, int __b, unsigned short *__c)
10022 {
10023   return vec_st(vec_perm(__a,
10024                          vec_lvlx(__b, __c),
10025                          vec_lvsr(__b, __c)),
10026                 __b, __c);
10027 }
10028
10029 static void __ATTRS_o_ai
10030 vec_stvrx(vector unsigned short __a, int __b, vector unsigned short *__c)
10031 {
10032   return vec_st(vec_perm(__a,
10033                          vec_lvlx(__b, __c),
10034                          vec_lvsr(__b, (unsigned char *)__c)),
10035                 __b, __c);
10036 }
10037
10038 static void __ATTRS_o_ai
10039 vec_stvrx(vector bool short __a, int __b, vector bool short *__c)
10040 {
10041   return vec_st(vec_perm(__a,
10042                          vec_lvlx(__b, __c),
10043                          vec_lvsr(__b, (unsigned char *)__c)),
10044                 __b, __c);
10045 }
10046
10047 static void __ATTRS_o_ai
10048 vec_stvrx(vector pixel __a, int __b, vector pixel *__c)
10049 {
10050   return vec_st(vec_perm(__a,
10051                          vec_lvlx(__b, __c),
10052                          vec_lvsr(__b, (unsigned char *)__c)),
10053                 __b, __c);
10054 }
10055
10056 static void __ATTRS_o_ai
10057 vec_stvrx(vector int __a, int __b, int *__c)
10058 {
10059   return vec_st(vec_perm(__a,
10060                          vec_lvlx(__b, __c),
10061                          vec_lvsr(__b, __c)),
10062                 __b, __c);
10063 }
10064
10065 static void __ATTRS_o_ai
10066 vec_stvrx(vector int __a, int __b, vector int *__c)
10067 {
10068   return vec_st(vec_perm(__a,
10069                          vec_lvlx(__b, __c),
10070                          vec_lvsr(__b, (unsigned char *)__c)),
10071                 __b, __c);
10072 }
10073
10074 static void __ATTRS_o_ai
10075 vec_stvrx(vector unsigned int __a, int __b, unsigned int *__c)
10076 {
10077   return vec_st(vec_perm(__a,
10078                          vec_lvlx(__b, __c),
10079                          vec_lvsr(__b, __c)),
10080                 __b, __c);
10081 }
10082
10083 static void __ATTRS_o_ai
10084 vec_stvrx(vector unsigned int __a, int __b, vector unsigned int *__c)
10085 {
10086   return vec_st(vec_perm(__a,
10087                          vec_lvlx(__b, __c),
10088                          vec_lvsr(__b, (unsigned char *)__c)),
10089                 __b, __c);
10090 }
10091
10092 static void __ATTRS_o_ai
10093 vec_stvrx(vector bool int __a, int __b, vector bool int *__c)
10094 {
10095   return vec_st(vec_perm(__a,
10096                          vec_lvlx(__b, __c),
10097                          vec_lvsr(__b, (unsigned char *)__c)),
10098                 __b, __c);
10099 }
10100
10101 static void __ATTRS_o_ai
10102 vec_stvrx(vector float __a, int __b, vector float *__c)
10103 {
10104   return vec_st(vec_perm(__a,
10105                          vec_lvlx(__b, __c),
10106                          vec_lvsr(__b, (unsigned char *)__c)),
10107                 __b, __c);
10108 }
10109
10110 /* vec_stvrxl */
10111
10112 static void __ATTRS_o_ai
10113 vec_stvrxl(vector signed char __a, int __b, signed char *__c)
10114 {
10115   return vec_stl(vec_perm(__a,
10116                           vec_lvlx(__b, __c),
10117                           vec_lvsr(__b, __c)),
10118                  __b, __c);
10119 }
10120
10121 static void __ATTRS_o_ai
10122 vec_stvrxl(vector signed char __a, int __b, vector signed char *__c)
10123 {
10124   return vec_stl(vec_perm(__a,
10125                           vec_lvlx(__b, __c),
10126                           vec_lvsr(__b, (unsigned char *)__c)),
10127                  __b, __c);
10128 }
10129
10130 static void __ATTRS_o_ai
10131 vec_stvrxl(vector unsigned char __a, int __b, unsigned char *__c)
10132 {
10133   return vec_stl(vec_perm(__a,
10134                           vec_lvlx(__b, __c),
10135                           vec_lvsr(__b, __c)),
10136                  __b, __c);
10137 }
10138
10139 static void __ATTRS_o_ai
10140 vec_stvrxl(vector unsigned char __a, int __b, vector unsigned char *__c)
10141 {
10142   return vec_stl(vec_perm(__a,
10143                           vec_lvlx(__b, __c),
10144                           vec_lvsr(__b, (unsigned char *)__c)),
10145                  __b, __c);
10146 }
10147
10148 static void __ATTRS_o_ai
10149 vec_stvrxl(vector bool char __a, int __b, vector bool char *__c)
10150 {
10151   return vec_stl(vec_perm(__a,
10152                           vec_lvlx(__b, __c),
10153                           vec_lvsr(__b, (unsigned char *)__c)),
10154                  __b, __c);
10155 }
10156
10157 static void __ATTRS_o_ai
10158 vec_stvrxl(vector short __a, int __b, short *__c)
10159 {
10160   return vec_stl(vec_perm(__a,
10161                           vec_lvlx(__b, __c),
10162                           vec_lvsr(__b, __c)),
10163                  __b, __c);
10164 }
10165
10166 static void __ATTRS_o_ai
10167 vec_stvrxl(vector short __a, int __b, vector short *__c)
10168 {
10169   return vec_stl(vec_perm(__a,
10170                           vec_lvlx(__b, __c),
10171                           vec_lvsr(__b, (unsigned char *)__c)),
10172                  __b, __c);
10173 }
10174
10175 static void __ATTRS_o_ai
10176 vec_stvrxl(vector unsigned short __a, int __b, unsigned short *__c)
10177 {
10178   return vec_stl(vec_perm(__a,
10179                           vec_lvlx(__b, __c),
10180                           vec_lvsr(__b, __c)),
10181                  __b, __c);
10182 }
10183
10184 static void __ATTRS_o_ai
10185 vec_stvrxl(vector unsigned short __a, int __b, vector unsigned short *__c)
10186 {
10187   return vec_stl(vec_perm(__a,
10188                           vec_lvlx(__b, __c),
10189                           vec_lvsr(__b, (unsigned char *)__c)),
10190                  __b, __c);
10191 }
10192
10193 static void __ATTRS_o_ai
10194 vec_stvrxl(vector bool short __a, int __b, vector bool short *__c)
10195 {
10196   return vec_stl(vec_perm(__a,
10197                           vec_lvlx(__b, __c),
10198                           vec_lvsr(__b, (unsigned char *)__c)),
10199                  __b, __c);
10200 }
10201
10202 static void __ATTRS_o_ai
10203 vec_stvrxl(vector pixel __a, int __b, vector pixel *__c)
10204 {
10205   return vec_stl(vec_perm(__a,
10206                           vec_lvlx(__b, __c),
10207                           vec_lvsr(__b, (unsigned char *)__c)),
10208                  __b, __c);
10209 }
10210
10211 static void __ATTRS_o_ai
10212 vec_stvrxl(vector int __a, int __b, int *__c)
10213 {
10214   return vec_stl(vec_perm(__a,
10215                           vec_lvlx(__b, __c),
10216                           vec_lvsr(__b, __c)),
10217                  __b, __c);
10218 }
10219
10220 static void __ATTRS_o_ai
10221 vec_stvrxl(vector int __a, int __b, vector int *__c)
10222 {
10223   return vec_stl(vec_perm(__a,
10224                           vec_lvlx(__b, __c),
10225                           vec_lvsr(__b, (unsigned char *)__c)),
10226                  __b, __c);
10227 }
10228
10229 static void __ATTRS_o_ai
10230 vec_stvrxl(vector unsigned int __a, int __b, unsigned int *__c)
10231 {
10232   return vec_stl(vec_perm(__a,
10233                           vec_lvlx(__b, __c),
10234                           vec_lvsr(__b, __c)),
10235                  __b, __c);
10236 }
10237
10238 static void __ATTRS_o_ai
10239 vec_stvrxl(vector unsigned int __a, int __b, vector unsigned int *__c)
10240 {
10241   return vec_stl(vec_perm(__a,
10242                           vec_lvlx(__b, __c),
10243                           vec_lvsr(__b, (unsigned char *)__c)),
10244                  __b, __c);
10245 }
10246
10247 static void __ATTRS_o_ai
10248 vec_stvrxl(vector bool int __a, int __b, vector bool int *__c)
10249 {
10250   return vec_stl(vec_perm(__a,
10251                           vec_lvlx(__b, __c),
10252                           vec_lvsr(__b, (unsigned char *)__c)),
10253                  __b, __c);
10254 }
10255
10256 static void __ATTRS_o_ai
10257 vec_stvrxl(vector float __a, int __b, vector float *__c)
10258 {
10259   return vec_stl(vec_perm(__a,
10260                           vec_lvlx(__b, __c),
10261                           vec_lvsr(__b, (unsigned char *)__c)),
10262                  __b, __c);
10263 }
10264
10265 /* vec_promote */
10266
10267 static vector signed char __ATTRS_o_ai
10268 vec_promote(signed char __a, int __b)
10269 {
10270   vector signed char __res = (vector signed char)(0);
10271   __res[__b] = __a;
10272   return __res;
10273 }
10274
10275 static vector unsigned char __ATTRS_o_ai
10276 vec_promote(unsigned char __a, int __b)
10277 {
10278   vector unsigned char __res = (vector unsigned char)(0);
10279   __res[__b] = __a;
10280   return __res;
10281 }
10282
10283 static vector short __ATTRS_o_ai
10284 vec_promote(short __a, int __b)
10285 {
10286   vector short __res = (vector short)(0);
10287   __res[__b] = __a;
10288   return __res;
10289 }
10290
10291 static vector unsigned short __ATTRS_o_ai
10292 vec_promote(unsigned short __a, int __b)
10293 {
10294   vector unsigned short __res = (vector unsigned short)(0);
10295   __res[__b] = __a;
10296   return __res;
10297 }
10298
10299 static vector int __ATTRS_o_ai
10300 vec_promote(int __a, int __b)
10301 {
10302   vector int __res = (vector int)(0);
10303   __res[__b] = __a;
10304   return __res;
10305 }
10306
10307 static vector unsigned int __ATTRS_o_ai
10308 vec_promote(unsigned int __a, int __b)
10309 {
10310   vector unsigned int __res = (vector unsigned int)(0);
10311   __res[__b] = __a;
10312   return __res;
10313 }
10314
10315 static vector float __ATTRS_o_ai
10316 vec_promote(float __a, int __b)
10317 {
10318   vector float __res = (vector float)(0);
10319   __res[__b] = __a;
10320   return __res;
10321 }
10322
10323 /* vec_splats */
10324
10325 static vector signed char __ATTRS_o_ai
10326 vec_splats(signed char __a)
10327 {
10328   return (vector signed char)(__a);
10329 }
10330
10331 static vector unsigned char __ATTRS_o_ai
10332 vec_splats(unsigned char __a)
10333 {
10334   return (vector unsigned char)(__a);
10335 }
10336
10337 static vector short __ATTRS_o_ai
10338 vec_splats(short __a)
10339 {
10340   return (vector short)(__a);
10341 }
10342
10343 static vector unsigned short __ATTRS_o_ai
10344 vec_splats(unsigned short __a)
10345 {
10346   return (vector unsigned short)(__a);
10347 }
10348
10349 static vector int __ATTRS_o_ai
10350 vec_splats(int __a)
10351 {
10352   return (vector int)(__a);
10353 }
10354
10355 static vector unsigned int __ATTRS_o_ai
10356 vec_splats(unsigned int __a)
10357 {
10358   return (vector unsigned int)(__a);
10359 }
10360
10361 static vector float __ATTRS_o_ai
10362 vec_splats(float __a)
10363 {
10364   return (vector float)(__a);
10365 }
10366
10367 /* ----------------------------- predicates --------------------------------- */
10368
10369 /* vec_all_eq */
10370
10371 static int __ATTRS_o_ai
10372 vec_all_eq(vector signed char __a, vector signed char __b)
10373 {
10374   return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10375 }
10376
10377 static int __ATTRS_o_ai
10378 vec_all_eq(vector signed char __a, vector bool char __b)
10379 {
10380   return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10381 }
10382
10383 static int __ATTRS_o_ai
10384 vec_all_eq(vector unsigned char __a, vector unsigned char __b)
10385 {
10386   return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10387 }
10388
10389 static int __ATTRS_o_ai
10390 vec_all_eq(vector unsigned char __a, vector bool char __b)
10391 {
10392   return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10393 }
10394
10395 static int __ATTRS_o_ai
10396 vec_all_eq(vector bool char __a, vector signed char __b)
10397 {
10398   return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10399 }
10400
10401 static int __ATTRS_o_ai
10402 vec_all_eq(vector bool char __a, vector unsigned char __b)
10403 {
10404   return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10405 }
10406
10407 static int __ATTRS_o_ai
10408 vec_all_eq(vector bool char __a, vector bool char __b)
10409 {
10410   return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10411 }
10412
10413 static int __ATTRS_o_ai
10414 vec_all_eq(vector short __a, vector short __b)
10415 {
10416   return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, __b);
10417 }
10418
10419 static int __ATTRS_o_ai
10420 vec_all_eq(vector short __a, vector bool short __b)
10421 {
10422   return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, (vector short)__b);
10423 }
10424
10425 static int __ATTRS_o_ai
10426 vec_all_eq(vector unsigned short __a, vector unsigned short __b)
10427 {
10428   return
10429     __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10430 }
10431
10432 static int __ATTRS_o_ai
10433 vec_all_eq(vector unsigned short __a, vector bool short __b)
10434 {
10435   return
10436     __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10437 }
10438
10439 static int __ATTRS_o_ai
10440 vec_all_eq(vector bool short __a, vector short __b)
10441 {
10442   return
10443     __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10444 }
10445
10446 static int __ATTRS_o_ai
10447 vec_all_eq(vector bool short __a, vector unsigned short __b)
10448 {
10449   return
10450     __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10451 }
10452
10453 static int __ATTRS_o_ai
10454 vec_all_eq(vector bool short __a, vector bool short __b)
10455 {
10456   return
10457     __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10458 }
10459
10460 static int __ATTRS_o_ai
10461 vec_all_eq(vector pixel __a, vector pixel __b)
10462 {
10463   return
10464     __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10465 }
10466
10467 static int __ATTRS_o_ai
10468 vec_all_eq(vector int __a, vector int __b)
10469 {
10470   return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, __b);
10471 }
10472
10473 static int __ATTRS_o_ai
10474 vec_all_eq(vector int __a, vector bool int __b)
10475 {
10476   return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, (vector int)__b);
10477 }
10478
10479 static int __ATTRS_o_ai
10480 vec_all_eq(vector unsigned int __a, vector unsigned int __b)
10481 {
10482   return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
10483 }
10484
10485 static int __ATTRS_o_ai
10486 vec_all_eq(vector unsigned int __a, vector bool int __b)
10487 {
10488   return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
10489 }
10490
10491 static int __ATTRS_o_ai
10492 vec_all_eq(vector bool int __a, vector int __b)
10493 {
10494   return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
10495 }
10496
10497 static int __ATTRS_o_ai
10498 vec_all_eq(vector bool int __a, vector unsigned int __b)
10499 {
10500   return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
10501 }
10502
10503 static int __ATTRS_o_ai
10504 vec_all_eq(vector bool int __a, vector bool int __b)
10505 {
10506   return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
10507 }
10508
10509 static int __ATTRS_o_ai
10510 vec_all_eq(vector float __a, vector float __b)
10511 {
10512   return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __b);
10513 }
10514
10515 /* vec_all_ge */
10516
10517 static int __ATTRS_o_ai
10518 vec_all_ge(vector signed char __a, vector signed char __b)
10519 {
10520   return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, __a);
10521 }
10522
10523 static int __ATTRS_o_ai
10524 vec_all_ge(vector signed char __a, vector bool char __b)
10525 {
10526   return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__b, __a);
10527 }
10528
10529 static int __ATTRS_o_ai
10530 vec_all_ge(vector unsigned char __a, vector unsigned char __b)
10531 {
10532   return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, __a);
10533 }
10534
10535 static int __ATTRS_o_ai
10536 vec_all_ge(vector unsigned char __a, vector bool char __b)
10537 {
10538   return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, __a);
10539 }
10540
10541 static int __ATTRS_o_ai
10542 vec_all_ge(vector bool char __a, vector signed char __b)
10543 {
10544   return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
10545                                       (vector unsigned char)__b,
10546                                       (vector unsigned char)__a);
10547 }
10548
10549 static int __ATTRS_o_ai
10550 vec_all_ge(vector bool char __a, vector unsigned char __b)
10551 {
10552   return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, (vector unsigned char)__a);
10553 }
10554
10555 static int __ATTRS_o_ai
10556 vec_all_ge(vector bool char __a, vector bool char __b)
10557 {
10558   return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
10559                                       (vector unsigned char)__b,
10560                                       (vector unsigned char)__a);
10561 }
10562
10563 static int __ATTRS_o_ai
10564 vec_all_ge(vector short __a, vector short __b)
10565 {
10566   return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, __a);
10567 }
10568
10569 static int __ATTRS_o_ai
10570 vec_all_ge(vector short __a, vector bool short __b)
10571 {
10572   return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)__b, __a);
10573 }
10574
10575 static int __ATTRS_o_ai
10576 vec_all_ge(vector unsigned short __a, vector unsigned short __b)
10577 {
10578   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, __a);
10579 }
10580
10581 static int __ATTRS_o_ai
10582 vec_all_ge(vector unsigned short __a, vector bool short __b)
10583 {
10584   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b, __a);
10585 }
10586
10587 static int __ATTRS_o_ai
10588 vec_all_ge(vector bool short __a, vector short __b)
10589 {
10590   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
10591                                       (vector unsigned short)__b,
10592                                       (vector unsigned short)__a);
10593 }
10594
10595 static int __ATTRS_o_ai
10596 vec_all_ge(vector bool short __a, vector unsigned short __b)
10597 {
10598   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, (vector unsigned short)__a);
10599 }
10600
10601 static int __ATTRS_o_ai
10602 vec_all_ge(vector bool short __a, vector bool short __b)
10603 {
10604   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
10605                                       (vector unsigned short)__b,
10606                                       (vector unsigned short)__a);
10607 }
10608
10609 static int __ATTRS_o_ai
10610 vec_all_ge(vector int __a, vector int __b)
10611 {
10612   return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, __a);
10613 }
10614
10615 static int __ATTRS_o_ai
10616 vec_all_ge(vector int __a, vector bool int __b)
10617 {
10618   return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)__b, __a);
10619 }
10620
10621 static int __ATTRS_o_ai
10622 vec_all_ge(vector unsigned int __a, vector unsigned int __b)
10623 {
10624   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, __a);
10625 }
10626
10627 static int __ATTRS_o_ai
10628 vec_all_ge(vector unsigned int __a, vector bool int __b)
10629 {
10630   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, __a);
10631 }
10632
10633 static int __ATTRS_o_ai
10634 vec_all_ge(vector bool int __a, vector int __b)
10635 {
10636   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
10637                                       (vector unsigned int)__b,
10638                                       (vector unsigned int)__a);
10639 }
10640
10641 static int __ATTRS_o_ai
10642 vec_all_ge(vector bool int __a, vector unsigned int __b)
10643 {
10644   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, (vector unsigned int)__a);
10645 }
10646
10647 static int __ATTRS_o_ai
10648 vec_all_ge(vector bool int __a, vector bool int __b)
10649 {
10650   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
10651                                       (vector unsigned int)__b,
10652                                       (vector unsigned int)__a);
10653 }
10654
10655 static int __ATTRS_o_ai
10656 vec_all_ge(vector float __a, vector float __b)
10657 {
10658   return __builtin_altivec_vcmpgefp_p(__CR6_LT, __a, __b);
10659 }
10660
10661 /* vec_all_gt */
10662
10663 static int __ATTRS_o_ai
10664 vec_all_gt(vector signed char __a, vector signed char __b)
10665 {
10666   return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, __b);
10667 }
10668
10669 static int __ATTRS_o_ai
10670 vec_all_gt(vector signed char __a, vector bool char __b)
10671 {
10672   return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, (vector signed char)__b);
10673 }
10674
10675 static int __ATTRS_o_ai
10676 vec_all_gt(vector unsigned char __a, vector unsigned char __b)
10677 {
10678   return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, __b);
10679 }
10680
10681 static int __ATTRS_o_ai
10682 vec_all_gt(vector unsigned char __a, vector bool char __b)
10683 {
10684   return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, (vector unsigned char)__b);
10685 }
10686
10687 static int __ATTRS_o_ai
10688 vec_all_gt(vector bool char __a, vector signed char __b)
10689 {
10690   return __builtin_altivec_vcmpgtub_p(__CR6_LT,
10691                                       (vector unsigned char)__a,
10692                                       (vector unsigned char)__b);
10693 }
10694
10695 static int __ATTRS_o_ai
10696 vec_all_gt(vector bool char __a, vector unsigned char __b)
10697 {
10698   return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, __b);
10699 }
10700
10701 static int __ATTRS_o_ai
10702 vec_all_gt(vector bool char __a, vector bool char __b)
10703 {
10704   return __builtin_altivec_vcmpgtub_p(__CR6_LT,
10705                                       (vector unsigned char)__a,
10706                                       (vector unsigned char)__b);
10707 }
10708
10709 static int __ATTRS_o_ai
10710 vec_all_gt(vector short __a, vector short __b)
10711 {
10712   return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, __b);
10713 }
10714
10715 static int __ATTRS_o_ai
10716 vec_all_gt(vector short __a, vector bool short __b)
10717 {
10718   return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, (vector short)__b);
10719 }
10720
10721 static int __ATTRS_o_ai
10722 vec_all_gt(vector unsigned short __a, vector unsigned short __b)
10723 {
10724   return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, __b);
10725 }
10726
10727 static int __ATTRS_o_ai
10728 vec_all_gt(vector unsigned short __a, vector bool short __b)
10729 {
10730   return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, (vector unsigned short)__b);
10731 }
10732
10733 static int __ATTRS_o_ai
10734 vec_all_gt(vector bool short __a, vector short __b)
10735 {
10736   return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
10737                                       (vector unsigned short)__a,
10738                                       (vector unsigned short)__b);
10739 }
10740
10741 static int __ATTRS_o_ai
10742 vec_all_gt(vector bool short __a, vector unsigned short __b)
10743 {
10744   return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a, __b);
10745 }
10746
10747 static int __ATTRS_o_ai
10748 vec_all_gt(vector bool short __a, vector bool short __b)
10749 {
10750   return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
10751                                       (vector unsigned short)__a,
10752                                       (vector unsigned short)__b);
10753 }
10754
10755 static int __ATTRS_o_ai
10756 vec_all_gt(vector int __a, vector int __b)
10757 {
10758   return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, __b);
10759 }
10760
10761 static int __ATTRS_o_ai
10762 vec_all_gt(vector int __a, vector bool int __b)
10763 {
10764   return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, (vector int)__b);
10765 }
10766
10767 static int __ATTRS_o_ai
10768 vec_all_gt(vector unsigned int __a, vector unsigned int __b)
10769 {
10770   return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, __b);
10771 }
10772
10773 static int __ATTRS_o_ai
10774 vec_all_gt(vector unsigned int __a, vector bool int __b)
10775 {
10776   return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, (vector unsigned int)__b);
10777 }
10778
10779 static int __ATTRS_o_ai
10780 vec_all_gt(vector bool int __a, vector int __b)
10781 {
10782   return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
10783                                       (vector unsigned int)__a,
10784                                       (vector unsigned int)__b);
10785 }
10786
10787 static int __ATTRS_o_ai
10788 vec_all_gt(vector bool int __a, vector unsigned int __b)
10789 {
10790   return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, __b);
10791 }
10792
10793 static int __ATTRS_o_ai
10794 vec_all_gt(vector bool int __a, vector bool int __b)
10795 {
10796   return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
10797                                       (vector unsigned int)__a,
10798                                       (vector unsigned int)__b);
10799 }
10800
10801 static int __ATTRS_o_ai
10802 vec_all_gt(vector float __a, vector float __b)
10803 {
10804   return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __a, __b);
10805 }
10806
10807 /* vec_all_in */
10808
10809 static int __attribute__((__always_inline__))
10810 vec_all_in(vector float __a, vector float __b)
10811 {
10812   return __builtin_altivec_vcmpbfp_p(__CR6_EQ, __a, __b);
10813 }
10814
10815 /* vec_all_le */
10816
10817 static int __ATTRS_o_ai
10818 vec_all_le(vector signed char __a, vector signed char __b)
10819 {
10820   return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, __b);
10821 }
10822
10823 static int __ATTRS_o_ai
10824 vec_all_le(vector signed char __a, vector bool char __b)
10825 {
10826   return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, (vector signed char)__b);
10827 }
10828
10829 static int __ATTRS_o_ai
10830 vec_all_le(vector unsigned char __a, vector unsigned char __b)
10831 {
10832   return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, __b);
10833 }
10834
10835 static int __ATTRS_o_ai
10836 vec_all_le(vector unsigned char __a, vector bool char __b)
10837 {
10838   return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, (vector unsigned char)__b);
10839 }
10840
10841 static int __ATTRS_o_ai
10842 vec_all_le(vector bool char __a, vector signed char __b)
10843 {
10844   return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
10845                                       (vector unsigned char)__a,
10846                                       (vector unsigned char)__b);
10847 }
10848
10849 static int __ATTRS_o_ai
10850 vec_all_le(vector bool char __a, vector unsigned char __b)
10851 {
10852   return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, __b);
10853 }
10854
10855 static int __ATTRS_o_ai
10856 vec_all_le(vector bool char __a, vector bool char __b)
10857 {
10858   return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
10859                                       (vector unsigned char)__a,
10860                                       (vector unsigned char)__b);
10861 }
10862
10863 static int __ATTRS_o_ai
10864 vec_all_le(vector short __a, vector short __b)
10865 {
10866   return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, __b);
10867 }
10868
10869 static int __ATTRS_o_ai
10870 vec_all_le(vector short __a, vector bool short __b)
10871 {
10872   return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, (vector short)__b);
10873 }
10874
10875 static int __ATTRS_o_ai
10876 vec_all_le(vector unsigned short __a, vector unsigned short __b)
10877 {
10878   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, __b);
10879 }
10880
10881 static int __ATTRS_o_ai
10882 vec_all_le(vector unsigned short __a, vector bool short __b)
10883 {
10884   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, (vector unsigned short)__b);
10885 }
10886
10887 static int __ATTRS_o_ai
10888 vec_all_le(vector bool short __a, vector short __b)
10889 {
10890   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
10891                                       (vector unsigned short)__a,
10892                                       (vector unsigned short)__b);
10893 }
10894
10895 static int __ATTRS_o_ai
10896 vec_all_le(vector bool short __a, vector unsigned short __b)
10897 {
10898   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a, __b);
10899 }
10900
10901 static int __ATTRS_o_ai
10902 vec_all_le(vector bool short __a, vector bool short __b)
10903 {
10904   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
10905                                       (vector unsigned short)__a,
10906                                       (vector unsigned short)__b);
10907 }
10908
10909 static int __ATTRS_o_ai
10910 vec_all_le(vector int __a, vector int __b)
10911 {
10912   return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, __b);
10913 }
10914
10915 static int __ATTRS_o_ai
10916 vec_all_le(vector int __a, vector bool int __b)
10917 {
10918   return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, (vector int)__b);
10919 }
10920
10921 static int __ATTRS_o_ai
10922 vec_all_le(vector unsigned int __a, vector unsigned int __b)
10923 {
10924   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, __b);
10925 }
10926
10927 static int __ATTRS_o_ai
10928 vec_all_le(vector unsigned int __a, vector bool int __b)
10929 {
10930   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, (vector unsigned int)__b);
10931 }
10932
10933 static int __ATTRS_o_ai
10934 vec_all_le(vector bool int __a, vector int __b)
10935 {
10936   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
10937                                       (vector unsigned int)__a,
10938                                       (vector unsigned int)__b);
10939 }
10940
10941 static int __ATTRS_o_ai
10942 vec_all_le(vector bool int __a, vector unsigned int __b)
10943 {
10944   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, __b);
10945 }
10946
10947 static int __ATTRS_o_ai
10948 vec_all_le(vector bool int __a, vector bool int __b)
10949 {
10950   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
10951                                       (vector unsigned int)__a,
10952                                       (vector unsigned int)__b);
10953 }
10954
10955 static int __ATTRS_o_ai
10956 vec_all_le(vector float __a, vector float __b)
10957 {
10958   return __builtin_altivec_vcmpgefp_p(__CR6_LT, __b, __a);
10959 }
10960
10961 /* vec_all_lt */
10962
10963 static int __ATTRS_o_ai
10964 vec_all_lt(vector signed char __a, vector signed char __b)
10965 {
10966   return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, __a);
10967 }
10968
10969 static int __ATTRS_o_ai
10970 vec_all_lt(vector signed char __a, vector bool char __b)
10971 {
10972   return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__b, __a);
10973 }
10974
10975 static int __ATTRS_o_ai
10976 vec_all_lt(vector unsigned char __a, vector unsigned char __b)
10977 {
10978   return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, __a);
10979 }
10980
10981 static int __ATTRS_o_ai
10982 vec_all_lt(vector unsigned char __a, vector bool char __b)
10983 {
10984   return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, __a);
10985 }
10986
10987 static int __ATTRS_o_ai
10988 vec_all_lt(vector bool char __a, vector signed char __b)
10989 {
10990   return __builtin_altivec_vcmpgtub_p(__CR6_LT,
10991                                       (vector unsigned char)__b,
10992                                       (vector unsigned char)__a);
10993 }
10994
10995 static int __ATTRS_o_ai
10996 vec_all_lt(vector bool char __a, vector unsigned char __b)
10997 {
10998   return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, (vector unsigned char)__a);
10999 }
11000
11001 static int __ATTRS_o_ai
11002 vec_all_lt(vector bool char __a, vector bool char __b)
11003 {
11004   return __builtin_altivec_vcmpgtub_p(__CR6_LT,
11005                                       (vector unsigned char)__b,
11006                                       (vector unsigned char)__a);
11007 }
11008
11009 static int __ATTRS_o_ai
11010 vec_all_lt(vector short __a, vector short __b)
11011 {
11012   return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, __a);
11013 }
11014
11015 static int __ATTRS_o_ai
11016 vec_all_lt(vector short __a, vector bool short __b)
11017 {
11018   return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)__b, __a);
11019 }
11020
11021 static int __ATTRS_o_ai
11022 vec_all_lt(vector unsigned short __a, vector unsigned short __b)
11023 {
11024   return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, __a);
11025 }
11026
11027 static int __ATTRS_o_ai
11028 vec_all_lt(vector unsigned short __a, vector bool short __b)
11029 {
11030   return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b, __a);
11031 }
11032
11033 static int __ATTRS_o_ai
11034 vec_all_lt(vector bool short __a, vector short __b)
11035 {
11036   return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11037                                       (vector unsigned short)__b,
11038                                       (vector unsigned short)__a);
11039 }
11040
11041 static int __ATTRS_o_ai
11042 vec_all_lt(vector bool short __a, vector unsigned short __b)
11043 {
11044   return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, (vector unsigned short)__a);
11045 }
11046
11047 static int __ATTRS_o_ai
11048 vec_all_lt(vector bool short __a, vector bool short __b)
11049 {
11050   return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11051                                       (vector unsigned short)__b,
11052                                       (vector unsigned short)__a);
11053 }
11054
11055 static int __ATTRS_o_ai
11056 vec_all_lt(vector int __a, vector int __b)
11057 {
11058   return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, __a);
11059 }
11060
11061 static int __ATTRS_o_ai
11062 vec_all_lt(vector int __a, vector bool int __b)
11063 {
11064   return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)__b, __a);
11065 }
11066
11067 static int __ATTRS_o_ai
11068 vec_all_lt(vector unsigned int __a, vector unsigned int __b)
11069 {
11070   return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, __a);
11071 }
11072
11073 static int __ATTRS_o_ai
11074 vec_all_lt(vector unsigned int __a, vector bool int __b)
11075 {
11076   return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, __a);
11077 }
11078
11079 static int __ATTRS_o_ai
11080 vec_all_lt(vector bool int __a, vector int __b)
11081 {
11082   return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11083                                       (vector unsigned int)__b,
11084                                       (vector unsigned int)__a);
11085 }
11086
11087 static int __ATTRS_o_ai
11088 vec_all_lt(vector bool int __a, vector unsigned int __b)
11089 {
11090   return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, (vector unsigned int)__a);
11091 }
11092
11093 static int __ATTRS_o_ai
11094 vec_all_lt(vector bool int __a, vector bool int __b)
11095 {
11096   return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11097                                       (vector unsigned int)__b,
11098                                       (vector unsigned int)__a);
11099 }
11100
11101 static int __ATTRS_o_ai
11102 vec_all_lt(vector float __a, vector float __b)
11103 {
11104   return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __b, __a);
11105 }
11106
11107 /* vec_all_nan */
11108
11109 static int __attribute__((__always_inline__))
11110 vec_all_nan(vector float __a)
11111 {
11112   return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __a);
11113 }
11114
11115 /* vec_all_ne */
11116
11117 static int __ATTRS_o_ai
11118 vec_all_ne(vector signed char __a, vector signed char __b)
11119 {
11120   return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11121 }
11122
11123 static int __ATTRS_o_ai
11124 vec_all_ne(vector signed char __a, vector bool char __b)
11125 {
11126   return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11127 }
11128
11129 static int __ATTRS_o_ai
11130 vec_all_ne(vector unsigned char __a, vector unsigned char __b)
11131 {
11132   return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11133 }
11134
11135 static int __ATTRS_o_ai
11136 vec_all_ne(vector unsigned char __a, vector bool char __b)
11137 {
11138   return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11139 }
11140
11141 static int __ATTRS_o_ai
11142 vec_all_ne(vector bool char __a, vector signed char __b)
11143 {
11144   return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11145 }
11146
11147 static int __ATTRS_o_ai
11148 vec_all_ne(vector bool char __a, vector unsigned char __b)
11149 {
11150   return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11151 }
11152
11153 static int __ATTRS_o_ai
11154 vec_all_ne(vector bool char __a, vector bool char __b)
11155 {
11156   return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11157 }
11158
11159 static int __ATTRS_o_ai
11160 vec_all_ne(vector short __a, vector short __b)
11161 {
11162   return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, __b);
11163 }
11164
11165 static int __ATTRS_o_ai
11166 vec_all_ne(vector short __a, vector bool short __b)
11167 {
11168   return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, (vector short)__b);
11169 }
11170
11171 static int __ATTRS_o_ai
11172 vec_all_ne(vector unsigned short __a, vector unsigned short __b)
11173 {
11174   return
11175     __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11176 }
11177
11178 static int __ATTRS_o_ai
11179 vec_all_ne(vector unsigned short __a, vector bool short __b)
11180 {
11181   return
11182     __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11183 }
11184
11185 static int __ATTRS_o_ai
11186 vec_all_ne(vector bool short __a, vector short __b)
11187 {
11188   return
11189     __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11190 }
11191
11192 static int __ATTRS_o_ai
11193 vec_all_ne(vector bool short __a, vector unsigned short __b)
11194 {
11195   return
11196     __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11197 }
11198
11199 static int __ATTRS_o_ai
11200 vec_all_ne(vector bool short __a, vector bool short __b)
11201 {
11202   return
11203     __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11204 }
11205
11206 static int __ATTRS_o_ai
11207 vec_all_ne(vector pixel __a, vector pixel __b)
11208 {
11209   return
11210     __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11211 }
11212
11213 static int __ATTRS_o_ai
11214 vec_all_ne(vector int __a, vector int __b)
11215 {
11216   return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, __b);
11217 }
11218
11219 static int __ATTRS_o_ai
11220 vec_all_ne(vector int __a, vector bool int __b)
11221 {
11222   return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, (vector int)__b);
11223 }
11224
11225 static int __ATTRS_o_ai
11226 vec_all_ne(vector unsigned int __a, vector unsigned int __b)
11227 {
11228   return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
11229 }
11230
11231 static int __ATTRS_o_ai
11232 vec_all_ne(vector unsigned int __a, vector bool int __b)
11233 {
11234   return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
11235 }
11236
11237 static int __ATTRS_o_ai
11238 vec_all_ne(vector bool int __a, vector int __b)
11239 {
11240   return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
11241 }
11242
11243 static int __ATTRS_o_ai
11244 vec_all_ne(vector bool int __a, vector unsigned int __b)
11245 {
11246   return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
11247 }
11248
11249 static int __ATTRS_o_ai
11250 vec_all_ne(vector bool int __a, vector bool int __b)
11251 {
11252   return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
11253 }
11254
11255 static int __ATTRS_o_ai
11256 vec_all_ne(vector float __a, vector float __b)
11257 {
11258   return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __b);
11259 }
11260
11261 /* vec_all_nge */
11262
11263 static int __attribute__((__always_inline__))
11264 vec_all_nge(vector float __a, vector float __b)
11265 {
11266   return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __a, __b);
11267 }
11268
11269 /* vec_all_ngt */
11270
11271 static int __attribute__((__always_inline__))
11272 vec_all_ngt(vector float __a, vector float __b)
11273 {
11274   return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __a, __b);
11275 }
11276
11277 /* vec_all_nle */
11278
11279 static int __attribute__((__always_inline__))
11280 vec_all_nle(vector float __a, vector float __b)
11281 {
11282   return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __b, __a);
11283 }
11284
11285 /* vec_all_nlt */
11286
11287 static int __attribute__((__always_inline__))
11288 vec_all_nlt(vector float __a, vector float __b)
11289 {
11290   return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __b, __a);
11291 }
11292
11293 /* vec_all_numeric */
11294
11295 static int __attribute__((__always_inline__))
11296 vec_all_numeric(vector float __a)
11297 {
11298   return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __a);
11299 }
11300
11301 /* vec_any_eq */
11302
11303 static int __ATTRS_o_ai
11304 vec_any_eq(vector signed char __a, vector signed char __b)
11305 {
11306   return
11307     __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11308 }
11309
11310 static int __ATTRS_o_ai
11311 vec_any_eq(vector signed char __a, vector bool char __b)
11312 {
11313   return
11314     __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11315 }
11316
11317 static int __ATTRS_o_ai
11318 vec_any_eq(vector unsigned char __a, vector unsigned char __b)
11319 {
11320   return
11321     __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11322 }
11323
11324 static int __ATTRS_o_ai
11325 vec_any_eq(vector unsigned char __a, vector bool char __b)
11326 {
11327   return
11328     __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11329 }
11330
11331 static int __ATTRS_o_ai
11332 vec_any_eq(vector bool char __a, vector signed char __b)
11333 {
11334   return
11335     __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11336 }
11337
11338 static int __ATTRS_o_ai
11339 vec_any_eq(vector bool char __a, vector unsigned char __b)
11340 {
11341   return
11342     __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11343 }
11344
11345 static int __ATTRS_o_ai
11346 vec_any_eq(vector bool char __a, vector bool char __b)
11347 {
11348   return
11349     __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
11350 }
11351
11352 static int __ATTRS_o_ai
11353 vec_any_eq(vector short __a, vector short __b)
11354 {
11355   return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, __b);
11356 }
11357
11358 static int __ATTRS_o_ai
11359 vec_any_eq(vector short __a, vector bool short __b)
11360 {
11361   return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, (vector short)__b);
11362 }
11363
11364 static int __ATTRS_o_ai
11365 vec_any_eq(vector unsigned short __a, vector unsigned short __b)
11366 {
11367   return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, 
11368                                       (vector short)__a,
11369                                       (vector short)__b);
11370 }
11371
11372 static int __ATTRS_o_ai
11373 vec_any_eq(vector unsigned short __a, vector bool short __b)
11374 {
11375   return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, 
11376                                       (vector short)__a,
11377                                       (vector short)__b);
11378 }
11379
11380 static int __ATTRS_o_ai
11381 vec_any_eq(vector bool short __a, vector short __b)
11382 {
11383   return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
11384                                       (vector short)__a,
11385                                       (vector short)__b);
11386 }
11387
11388 static int __ATTRS_o_ai
11389 vec_any_eq(vector bool short __a, vector unsigned short __b)
11390 {
11391   return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
11392                                       (vector short)__a,
11393                                       (vector short)__b);
11394 }
11395
11396 static int __ATTRS_o_ai
11397 vec_any_eq(vector bool short __a, vector bool short __b)
11398 {
11399   return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
11400                                       (vector short)__a,
11401                                       (vector short)__b);
11402 }
11403
11404 static int __ATTRS_o_ai
11405 vec_any_eq(vector pixel __a, vector pixel __b)
11406 {
11407   return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, 
11408                                       (vector short)__a,
11409                                       (vector short)__b);
11410 }
11411
11412 static int __ATTRS_o_ai
11413 vec_any_eq(vector int __a, vector int __b)
11414 {
11415   return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, __b);
11416 }
11417
11418 static int __ATTRS_o_ai
11419 vec_any_eq(vector int __a, vector bool int __b)
11420 {
11421   return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, (vector int)__b);
11422 }
11423
11424 static int __ATTRS_o_ai
11425 vec_any_eq(vector unsigned int __a, vector unsigned int __b)
11426 {
11427   return
11428     __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
11429 }
11430
11431 static int __ATTRS_o_ai
11432 vec_any_eq(vector unsigned int __a, vector bool int __b)
11433 {
11434   return
11435     __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
11436 }
11437
11438 static int __ATTRS_o_ai
11439 vec_any_eq(vector bool int __a, vector int __b)
11440 {
11441   return
11442     __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
11443 }
11444
11445 static int __ATTRS_o_ai
11446 vec_any_eq(vector bool int __a, vector unsigned int __b)
11447 {
11448   return
11449     __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
11450 }
11451
11452 static int __ATTRS_o_ai
11453 vec_any_eq(vector bool int __a, vector bool int __b)
11454 {
11455   return
11456     __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
11457 }
11458
11459 static int __ATTRS_o_ai
11460 vec_any_eq(vector float __a, vector float __b)
11461 {
11462   return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __b);
11463 }
11464
11465 /* vec_any_ge */
11466
11467 static int __ATTRS_o_ai
11468 vec_any_ge(vector signed char __a, vector signed char __b)
11469 {
11470   return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b, __a);
11471 }
11472
11473 static int __ATTRS_o_ai
11474 vec_any_ge(vector signed char __a, vector bool char __b)
11475 {
11476   return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b, __a);
11477 }
11478
11479 static int __ATTRS_o_ai
11480 vec_any_ge(vector unsigned char __a, vector unsigned char __b)
11481 {
11482   return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, __a);
11483 }
11484
11485 static int __ATTRS_o_ai
11486 vec_any_ge(vector unsigned char __a, vector bool char __b)
11487 {
11488   return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b, __a);
11489 }
11490
11491 static int __ATTRS_o_ai
11492 vec_any_ge(vector bool char __a, vector signed char __b)
11493 {
11494   return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
11495                                       (vector unsigned char)__b,
11496                                       (vector unsigned char)__a);
11497 }
11498
11499 static int __ATTRS_o_ai
11500 vec_any_ge(vector bool char __a, vector unsigned char __b)
11501 {
11502   return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, (vector unsigned char)__a);
11503 }
11504
11505 static int __ATTRS_o_ai
11506 vec_any_ge(vector bool char __a, vector bool char __b)
11507 {
11508   return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
11509                                       (vector unsigned char)__b,
11510                                       (vector unsigned char)__a);
11511 }
11512
11513 static int __ATTRS_o_ai
11514 vec_any_ge(vector short __a, vector short __b)
11515 {
11516   return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b, __a);
11517 }
11518
11519 static int __ATTRS_o_ai
11520 vec_any_ge(vector short __a, vector bool short __b)
11521 {
11522   return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)__b, __a);
11523 }
11524
11525 static int __ATTRS_o_ai
11526 vec_any_ge(vector unsigned short __a, vector unsigned short __b)
11527 {
11528   return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, __a);
11529 }
11530
11531 static int __ATTRS_o_ai
11532 vec_any_ge(vector unsigned short __a, vector bool short __b)
11533 {
11534   return
11535     __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b, __a);
11536 }
11537
11538 static int __ATTRS_o_ai
11539 vec_any_ge(vector bool short __a, vector short __b)
11540 {
11541   return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
11542                                       (vector unsigned short)__b,
11543                                       (vector unsigned short)__a);
11544 }
11545
11546 static int __ATTRS_o_ai
11547 vec_any_ge(vector bool short __a, vector unsigned short __b)
11548 {
11549   return 
11550     __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, (vector unsigned short)__a);
11551 }
11552
11553 static int __ATTRS_o_ai
11554 vec_any_ge(vector bool short __a, vector bool short __b)
11555 {
11556   return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
11557                                       (vector unsigned short)__b,
11558                                       (vector unsigned short)__a);
11559 }
11560
11561 static int __ATTRS_o_ai
11562 vec_any_ge(vector int __a, vector int __b)
11563 {
11564   return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b, __a);
11565 }
11566
11567 static int __ATTRS_o_ai
11568 vec_any_ge(vector int __a, vector bool int __b)
11569 {
11570   return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)__b, __a);
11571 }
11572
11573 static int __ATTRS_o_ai
11574 vec_any_ge(vector unsigned int __a, vector unsigned int __b)
11575 {
11576   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, __a);
11577 }
11578
11579 static int __ATTRS_o_ai
11580 vec_any_ge(vector unsigned int __a, vector bool int __b)
11581 {
11582   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b, __a);
11583 }
11584
11585 static int __ATTRS_o_ai
11586 vec_any_ge(vector bool int __a, vector int __b)
11587 {
11588   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
11589                                       (vector unsigned int)__b,
11590                                       (vector unsigned int)__a);
11591 }
11592
11593 static int __ATTRS_o_ai
11594 vec_any_ge(vector bool int __a, vector unsigned int __b)
11595 {
11596   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, (vector unsigned int)__a);
11597 }
11598
11599 static int __ATTRS_o_ai
11600 vec_any_ge(vector bool int __a, vector bool int __b)
11601 {
11602   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
11603                                       (vector unsigned int)__b,
11604                                       (vector unsigned int)__a);
11605 }
11606
11607 static int __ATTRS_o_ai
11608 vec_any_ge(vector float __a, vector float __b)
11609 {
11610   return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __a, __b);
11611 }
11612
11613 /* vec_any_gt */
11614
11615 static int __ATTRS_o_ai
11616 vec_any_gt(vector signed char __a, vector signed char __b)
11617 {
11618   return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, __b);
11619 }
11620
11621 static int __ATTRS_o_ai
11622 vec_any_gt(vector signed char __a, vector bool char __b)
11623 {
11624   return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, (vector signed char)__b);
11625 }
11626
11627 static int __ATTRS_o_ai
11628 vec_any_gt(vector unsigned char __a, vector unsigned char __b)
11629 {
11630   return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, __b);
11631 }
11632
11633 static int __ATTRS_o_ai
11634 vec_any_gt(vector unsigned char __a, vector bool char __b)
11635 {
11636   return 
11637     __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, (vector unsigned char)__b);
11638 }
11639
11640 static int __ATTRS_o_ai
11641 vec_any_gt(vector bool char __a, vector signed char __b)
11642 {
11643   return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
11644                                       (vector unsigned char)__a,
11645                                       (vector unsigned char)__b);
11646 }
11647
11648 static int __ATTRS_o_ai
11649 vec_any_gt(vector bool char __a, vector unsigned char __b)
11650 {
11651   return 
11652     __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a, __b);
11653 }
11654
11655 static int __ATTRS_o_ai
11656 vec_any_gt(vector bool char __a, vector bool char __b)
11657 {
11658   return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
11659                                       (vector unsigned char)__a,
11660                                       (vector unsigned char)__b);
11661 }
11662
11663 static int __ATTRS_o_ai
11664 vec_any_gt(vector short __a, vector short __b)
11665 {
11666   return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, __b);
11667 }
11668
11669 static int __ATTRS_o_ai
11670 vec_any_gt(vector short __a, vector bool short __b)
11671 {
11672   return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, (vector short)__b);
11673 }
11674
11675 static int __ATTRS_o_ai
11676 vec_any_gt(vector unsigned short __a, vector unsigned short __b)
11677 {
11678   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, __b);
11679 }
11680
11681 static int __ATTRS_o_ai
11682 vec_any_gt(vector unsigned short __a, vector bool short __b)
11683 {
11684   return 
11685     __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, (vector unsigned short)__b);
11686 }
11687
11688 static int __ATTRS_o_ai
11689 vec_any_gt(vector bool short __a, vector short __b)
11690 {
11691   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
11692                                       (vector unsigned short)__a,
11693                                       (vector unsigned short)__b);
11694 }
11695
11696 static int __ATTRS_o_ai
11697 vec_any_gt(vector bool short __a, vector unsigned short __b)
11698 {
11699   return
11700     __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a, __b);
11701 }
11702
11703 static int __ATTRS_o_ai
11704 vec_any_gt(vector bool short __a, vector bool short __b)
11705 {
11706   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
11707                                       (vector unsigned short)__a,
11708                                       (vector unsigned short)__b);
11709 }
11710
11711 static int __ATTRS_o_ai
11712 vec_any_gt(vector int __a, vector int __b)
11713 {
11714   return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, __b);
11715 }
11716
11717 static int __ATTRS_o_ai
11718 vec_any_gt(vector int __a, vector bool int __b)
11719 {
11720   return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, (vector int)__b);
11721 }
11722
11723 static int __ATTRS_o_ai
11724 vec_any_gt(vector unsigned int __a, vector unsigned int __b)
11725 {
11726   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, __b);
11727 }
11728
11729 static int __ATTRS_o_ai
11730 vec_any_gt(vector unsigned int __a, vector bool int __b)
11731 {
11732   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, (vector unsigned int)__b);
11733 }
11734
11735 static int __ATTRS_o_ai
11736 vec_any_gt(vector bool int __a, vector int __b)
11737 {
11738   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
11739                                       (vector unsigned int)__a,
11740                                       (vector unsigned int)__b);
11741 }
11742
11743 static int __ATTRS_o_ai
11744 vec_any_gt(vector bool int __a, vector unsigned int __b)
11745 {
11746   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a, __b);
11747 }
11748
11749 static int __ATTRS_o_ai
11750 vec_any_gt(vector bool int __a, vector bool int __b)
11751 {
11752   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
11753                                       (vector unsigned int)__a,
11754                                       (vector unsigned int)__b);
11755 }
11756
11757 static int __ATTRS_o_ai
11758 vec_any_gt(vector float __a, vector float __b)
11759 {
11760   return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __a, __b);
11761 }
11762
11763 /* vec_any_le */
11764
11765 static int __ATTRS_o_ai
11766 vec_any_le(vector signed char __a, vector signed char __b)
11767 {
11768   return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, __b);
11769 }
11770
11771 static int __ATTRS_o_ai
11772 vec_any_le(vector signed char __a, vector bool char __b)
11773 {
11774   return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, (vector signed char)__b);
11775 }
11776
11777 static int __ATTRS_o_ai
11778 vec_any_le(vector unsigned char __a, vector unsigned char __b)
11779 {
11780   return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, __b);
11781 }
11782
11783 static int __ATTRS_o_ai
11784 vec_any_le(vector unsigned char __a, vector bool char __b)
11785 {
11786   return 
11787     __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, (vector unsigned char)__b);
11788 }
11789
11790 static int __ATTRS_o_ai
11791 vec_any_le(vector bool char __a, vector signed char __b)
11792 {
11793   return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
11794                                       (vector unsigned char)__a,
11795                                       (vector unsigned char)__b);
11796 }
11797
11798 static int __ATTRS_o_ai
11799 vec_any_le(vector bool char __a, vector unsigned char __b)
11800 {
11801   return 
11802     __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a, __b);
11803 }
11804
11805 static int __ATTRS_o_ai
11806 vec_any_le(vector bool char __a, vector bool char __b)
11807 {
11808   return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
11809                                       (vector unsigned char)__a,
11810                                       (vector unsigned char)__b);
11811 }
11812
11813 static int __ATTRS_o_ai
11814 vec_any_le(vector short __a, vector short __b)
11815 {
11816   return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, __b);
11817 }
11818
11819 static int __ATTRS_o_ai
11820 vec_any_le(vector short __a, vector bool short __b)
11821 {
11822   return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, (vector short)__b);
11823 }
11824
11825 static int __ATTRS_o_ai
11826 vec_any_le(vector unsigned short __a, vector unsigned short __b)
11827 {
11828   return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, __b);
11829 }
11830
11831 static int __ATTRS_o_ai
11832 vec_any_le(vector unsigned short __a, vector bool short __b)
11833 {
11834   return 
11835     __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, (vector unsigned short)__b);
11836 }
11837
11838 static int __ATTRS_o_ai
11839 vec_any_le(vector bool short __a, vector short __b)
11840 {
11841   return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
11842                                       (vector unsigned short)__a,
11843                                       (vector unsigned short)__b);
11844 }
11845
11846 static int __ATTRS_o_ai
11847 vec_any_le(vector bool short __a, vector unsigned short __b)
11848 {
11849   return 
11850     __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a, __b);
11851 }
11852
11853 static int __ATTRS_o_ai
11854 vec_any_le(vector bool short __a, vector bool short __b)
11855 {
11856   return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
11857                                       (vector unsigned short)__a,
11858                                       (vector unsigned short)__b);
11859 }
11860
11861 static int __ATTRS_o_ai
11862 vec_any_le(vector int __a, vector int __b)
11863 {
11864   return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, __b);
11865 }
11866
11867 static int __ATTRS_o_ai
11868 vec_any_le(vector int __a, vector bool int __b)
11869 {
11870   return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, (vector int)__b);
11871 }
11872
11873 static int __ATTRS_o_ai
11874 vec_any_le(vector unsigned int __a, vector unsigned int __b)
11875 {
11876   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, __b);
11877 }
11878
11879 static int __ATTRS_o_ai
11880 vec_any_le(vector unsigned int __a, vector bool int __b)
11881 {
11882   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, (vector unsigned int)__b);
11883 }
11884
11885 static int __ATTRS_o_ai
11886 vec_any_le(vector bool int __a, vector int __b)
11887 {
11888   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
11889                                       (vector unsigned int)__a,
11890                                       (vector unsigned int)__b);
11891 }
11892
11893 static int __ATTRS_o_ai
11894 vec_any_le(vector bool int __a, vector unsigned int __b)
11895 {
11896   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a, __b);
11897 }
11898
11899 static int __ATTRS_o_ai
11900 vec_any_le(vector bool int __a, vector bool int __b)
11901 {
11902   return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
11903                                       (vector unsigned int)__a,
11904                                       (vector unsigned int)__b);
11905 }
11906
11907 static int __ATTRS_o_ai
11908 vec_any_le(vector float __a, vector float __b)
11909 {
11910   return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __b, __a);
11911 }
11912
11913 /* vec_any_lt */
11914
11915 static int __ATTRS_o_ai
11916 vec_any_lt(vector signed char __a, vector signed char __b)
11917 {
11918   return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b, __a);
11919 }
11920
11921 static int __ATTRS_o_ai
11922 vec_any_lt(vector signed char __a, vector bool char __b)
11923 {
11924   return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b, __a);
11925 }
11926
11927 static int __ATTRS_o_ai
11928 vec_any_lt(vector unsigned char __a, vector unsigned char __b)
11929 {
11930   return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, __a);
11931 }
11932
11933 static int __ATTRS_o_ai
11934 vec_any_lt(vector unsigned char __a, vector bool char __b)
11935 {
11936   return 
11937     __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b, __a);
11938 }
11939
11940 static int __ATTRS_o_ai
11941 vec_any_lt(vector bool char __a, vector signed char __b)
11942 {
11943   return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
11944                                       (vector unsigned char)__b,
11945                                       (vector unsigned char)__a);
11946 }
11947
11948 static int __ATTRS_o_ai
11949 vec_any_lt(vector bool char __a, vector unsigned char __b)
11950 {
11951   return 
11952     __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, (vector unsigned char)__a);
11953 }
11954
11955 static int __ATTRS_o_ai
11956 vec_any_lt(vector bool char __a, vector bool char __b)
11957 {
11958   return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
11959                                       (vector unsigned char)__b,
11960                                       (vector unsigned char)__a);
11961 }
11962
11963 static int __ATTRS_o_ai
11964 vec_any_lt(vector short __a, vector short __b)
11965 {
11966   return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b, __a);
11967 }
11968
11969 static int __ATTRS_o_ai
11970 vec_any_lt(vector short __a, vector bool short __b)
11971 {
11972   return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)__b, __a);
11973 }
11974
11975 static int __ATTRS_o_ai
11976 vec_any_lt(vector unsigned short __a, vector unsigned short __b)
11977 {
11978   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, __a);
11979 }
11980
11981 static int __ATTRS_o_ai
11982 vec_any_lt(vector unsigned short __a, vector bool short __b)
11983 {
11984   return 
11985     __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b, __a);
11986 }
11987
11988 static int __ATTRS_o_ai
11989 vec_any_lt(vector bool short __a, vector short __b)
11990 {
11991   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
11992                                       (vector unsigned short)__b,
11993                                       (vector unsigned short)__a);
11994 }
11995
11996 static int __ATTRS_o_ai
11997 vec_any_lt(vector bool short __a, vector unsigned short __b)
11998 {
11999   return 
12000     __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, (vector unsigned short)__a);
12001 }
12002
12003 static int __ATTRS_o_ai
12004 vec_any_lt(vector bool short __a, vector bool short __b)
12005 {
12006   return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
12007                                       (vector unsigned short)__b,
12008                                       (vector unsigned short)__a);
12009 }
12010
12011 static int __ATTRS_o_ai
12012 vec_any_lt(vector int __a, vector int __b)
12013 {
12014   return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b, __a);
12015 }
12016
12017 static int __ATTRS_o_ai
12018 vec_any_lt(vector int __a, vector bool int __b)
12019 {
12020   return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)__b, __a);
12021 }
12022
12023 static int __ATTRS_o_ai
12024 vec_any_lt(vector unsigned int __a, vector unsigned int __b)
12025 {
12026   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, __a);
12027 }
12028
12029 static int __ATTRS_o_ai
12030 vec_any_lt(vector unsigned int __a, vector bool int __b)
12031 {
12032   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b, __a);
12033 }
12034
12035 static int __ATTRS_o_ai
12036 vec_any_lt(vector bool int __a, vector int __b)
12037 {
12038   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
12039                                       (vector unsigned int)__b,
12040                                       (vector unsigned int)__a);
12041 }
12042
12043 static int __ATTRS_o_ai
12044 vec_any_lt(vector bool int __a, vector unsigned int __b)
12045 {
12046   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, (vector unsigned int)__a);
12047 }
12048
12049 static int __ATTRS_o_ai
12050 vec_any_lt(vector bool int __a, vector bool int __b)
12051 {
12052   return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
12053                                       (vector unsigned int)__b,
12054                                       (vector unsigned int)__a);
12055 }
12056
12057 static int __ATTRS_o_ai
12058 vec_any_lt(vector float __a, vector float __b)
12059 {
12060   return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __b, __a);
12061 }
12062
12063 /* vec_any_nan */
12064
12065 static int __attribute__((__always_inline__))
12066 vec_any_nan(vector float __a)
12067 {
12068   return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __a);
12069 }
12070
12071 /* vec_any_ne */
12072
12073 static int __ATTRS_o_ai
12074 vec_any_ne(vector signed char __a, vector signed char __b)
12075 {
12076   return
12077     __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12078 }
12079
12080 static int __ATTRS_o_ai
12081 vec_any_ne(vector signed char __a, vector bool char __b)
12082 {
12083   return
12084     __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12085 }
12086
12087 static int __ATTRS_o_ai
12088 vec_any_ne(vector unsigned char __a, vector unsigned char __b)
12089 {
12090   return
12091     __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12092 }
12093
12094 static int __ATTRS_o_ai
12095 vec_any_ne(vector unsigned char __a, vector bool char __b)
12096 {
12097   return
12098     __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12099 }
12100
12101 static int __ATTRS_o_ai
12102 vec_any_ne(vector bool char __a, vector signed char __b)
12103 {
12104   return
12105     __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12106 }
12107
12108 static int __ATTRS_o_ai
12109 vec_any_ne(vector bool char __a, vector unsigned char __b)
12110 {
12111   return
12112     __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12113 }
12114
12115 static int __ATTRS_o_ai
12116 vec_any_ne(vector bool char __a, vector bool char __b)
12117 {
12118   return
12119     __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
12120 }
12121
12122 static int __ATTRS_o_ai
12123 vec_any_ne(vector short __a, vector short __b)
12124 {
12125   return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, __b);
12126 }
12127
12128 static int __ATTRS_o_ai
12129 vec_any_ne(vector short __a, vector bool short __b)
12130 {
12131   return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, (vector short)__b);
12132 }
12133
12134 static int __ATTRS_o_ai
12135 vec_any_ne(vector unsigned short __a, vector unsigned short __b)
12136 {
12137   return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, 
12138                                       (vector short)__a,
12139                                       (vector short)__b);
12140 }
12141
12142 static int __ATTRS_o_ai
12143 vec_any_ne(vector unsigned short __a, vector bool short __b)
12144 {
12145   return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
12146                                       (vector short)__a,
12147                                       (vector short)__b);
12148 }
12149
12150 static int __ATTRS_o_ai
12151 vec_any_ne(vector bool short __a, vector short __b)
12152 {
12153   return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
12154                                       (vector short)__a,
12155                                       (vector short)__b);
12156 }
12157
12158 static int __ATTRS_o_ai
12159 vec_any_ne(vector bool short __a, vector unsigned short __b)
12160 {
12161   return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
12162                                       (vector short)__a,
12163                                       (vector short)__b);
12164 }
12165
12166 static int __ATTRS_o_ai
12167 vec_any_ne(vector bool short __a, vector bool short __b)
12168 {
12169   return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
12170                                       (vector short)__a,
12171                                       (vector short)__b);
12172 }
12173
12174 static int __ATTRS_o_ai
12175 vec_any_ne(vector pixel __a, vector pixel __b)
12176 {
12177   return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
12178                                       (vector short)__a,
12179                                       (vector short)__b);
12180 }
12181
12182 static int __ATTRS_o_ai
12183 vec_any_ne(vector int __a, vector int __b)
12184 {
12185   return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, __b);
12186 }
12187
12188 static int __ATTRS_o_ai
12189 vec_any_ne(vector int __a, vector bool int __b)
12190 {
12191   return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, (vector int)__b);
12192 }
12193
12194 static int __ATTRS_o_ai
12195 vec_any_ne(vector unsigned int __a, vector unsigned int __b)
12196 {
12197   return
12198     __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
12199 }
12200
12201 static int __ATTRS_o_ai
12202 vec_any_ne(vector unsigned int __a, vector bool int __b)
12203 {
12204   return
12205     __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
12206 }
12207
12208 static int __ATTRS_o_ai
12209 vec_any_ne(vector bool int __a, vector int __b)
12210 {
12211   return
12212     __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
12213 }
12214
12215 static int __ATTRS_o_ai
12216 vec_any_ne(vector bool int __a, vector unsigned int __b)
12217 {
12218   return
12219     __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
12220 }
12221
12222 static int __ATTRS_o_ai
12223 vec_any_ne(vector bool int __a, vector bool int __b)
12224 {
12225   return
12226     __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
12227 }
12228
12229 static int __ATTRS_o_ai
12230 vec_any_ne(vector float __a, vector float __b)
12231 {
12232   return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __b);
12233 }
12234
12235 /* vec_any_nge */
12236
12237 static int __attribute__((__always_inline__))
12238 vec_any_nge(vector float __a, vector float __b)
12239 {
12240   return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __a, __b);
12241 }
12242
12243 /* vec_any_ngt */
12244
12245 static int __attribute__((__always_inline__))
12246 vec_any_ngt(vector float __a, vector float __b)
12247 {
12248   return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __a, __b);
12249 }
12250
12251 /* vec_any_nle */
12252
12253 static int __attribute__((__always_inline__))
12254 vec_any_nle(vector float __a, vector float __b)
12255 {
12256   return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __b, __a);
12257 }
12258
12259 /* vec_any_nlt */
12260
12261 static int __attribute__((__always_inline__))
12262 vec_any_nlt(vector float __a, vector float __b)
12263 {
12264   return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __b, __a);
12265 }
12266
12267 /* vec_any_numeric */
12268
12269 static int __attribute__((__always_inline__))
12270 vec_any_numeric(vector float __a)
12271 {
12272   return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __a);
12273 }
12274
12275 /* vec_any_out */
12276
12277 static int __attribute__((__always_inline__))
12278 vec_any_out(vector float __a, vector float __b)
12279 {
12280   return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, __a, __b);
12281 }
12282
12283 #undef __ATTRS_o_ai
12284
12285 #endif /* __ALTIVEC_H */