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