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