OSDN Git Service

* config/rs6000/darwin.h (SUBTARGET_OPTIONS): Move from here, to...
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / altivec.h
1 /* PowerPC AltiVec include file.
2    Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
3    Contributed by Aldy Hernandez (aldyh@redhat.com).
4
5    This file is part of GCC.
6
7    GCC is free software; you can redistribute it and/or modify it
8    under the terms of the GNU General Public License as published
9    by the Free Software Foundation; either version 2, or (at your
10    option) any later version.
11
12    GCC is distributed in the hope that it will be useful, but WITHOUT
13    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
15    License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with GCC; see the file COPYING.  If not, write to the
19    Free Software Foundation, 59 Temple Place - Suite 330, Boston,
20    MA 02111-1307, USA.  */
21
22 /* As a special exception, if you include this header file into source
23    files compiled by GCC, this header file does not by itself cause
24    the resulting executable to be covered by the GNU General Public
25    License.  This exception does not however invalidate any other
26    reasons why the executable file might be covered by the GNU General
27    Public License.  */
28
29 /* Implemented to conform to the specification included in the AltiVec
30    Technology Programming Interface Manual (ALTIVECPIM/D 6/1999 Rev 0).  */
31
32 #ifndef _ALTIVEC_H
33 #define _ALTIVEC_H 1
34
35 #if !defined(__VEC__) || !defined(__ALTIVEC__)
36 #error Use the "-maltivec" flag to enable PowerPC AltiVec support
37 #endif
38
39 /* If __APPLE_ALTIVEC__ is defined, the compiler supports 'vector',
40    'pixel' and 'bool' as context-sensitive AltiVec keywords (in 
41    non-AltiVec contexts, they revert to their original meanings,
42    if any), so we do not need to define them as macros.  */
43
44 #if !defined(__APPLE_ALTIVEC__)
45 /* You are allowed to undef these for C++ compatibility.  */
46 #define vector __vector
47 #define pixel __pixel
48 #define bool __bool
49 #endif
50
51 /* Condition register codes for AltiVec predicates. */
52
53 #define __CR6_EQ                0
54 #define __CR6_EQ_REV            1
55 #define __CR6_LT                2
56 #define __CR6_LT_REV            3
57
58 /* These are easy... Same exact arguments.  */
59
60 #define vec_vaddcuw vec_addc
61 #define vec_vand vec_and
62 #define vec_vandc vec_andc
63 #define vec_vrfip vec_ceil
64 #define vec_vcmpbfp vec_cmpb
65 #define vec_vcmpgefp vec_cmpge
66 #define vec_vctsxs vec_cts
67 #define vec_vctuxs vec_ctu
68 #define vec_vexptefp vec_expte
69 #define vec_vrfim vec_floor
70 #define vec_lvx vec_ld
71 #define vec_lvxl vec_ldl
72 #define vec_vlogefp vec_loge
73 #define vec_vmaddfp vec_madd
74 #define vec_vmhaddshs vec_madds
75 #define vec_vmladduhm vec_mladd
76 #define vec_vmhraddshs vec_mradds
77 #define vec_vnmsubfp vec_nmsub
78 #define vec_vnor vec_nor
79 #define vec_vor vec_or
80 #define vec_vpkpx vec_packpx
81 #define vec_vperm vec_perm
82 #define vec_vrefp vec_re
83 #define vec_vrfin vec_round
84 #define vec_vrsqrtefp vec_rsqrte
85 #define vec_vsel vec_sel
86 #define vec_vsldoi vec_sld
87 #define vec_vsl vec_sll
88 #define vec_vslo vec_slo
89 #define vec_vspltisb vec_splat_s8
90 #define vec_vspltish vec_splat_s16
91 #define vec_vspltisw vec_splat_s32
92 #define vec_vsr vec_srl
93 #define vec_vsro vec_sro
94 #define vec_stvx vec_st
95 #define vec_stvxl vec_stl
96 #define vec_vsubcuw vec_subc
97 #define vec_vsum2sws vec_sum2s
98 #define vec_vsumsws vec_sums
99 #define vec_vrfiz vec_trunc
100 #define vec_vxor vec_xor
101
102 #ifdef __cplusplus
103
104 extern "C++" {
105
106 /* Prototypes for builtins that take literals and must always be
107    inlined.  */
108 inline __vector float vec_ctf (__vector unsigned int, const int) __attribute__ ((always_inline));
109 inline __vector float vec_ctf (__vector signed int, const int) __attribute__ ((always_inline));
110 inline __vector float vec_vcfsx (__vector signed int a1, const int a2) __attribute__ ((always_inline));
111 inline __vector float vec_vcfux (__vector unsigned int a1, const int a2) __attribute__ ((always_inline));
112 inline __vector signed int vec_cts (__vector float, const int) __attribute__ ((always_inline));
113 inline __vector unsigned int vec_ctu (__vector float, const int) __attribute__ ((always_inline));
114 inline void vec_dss (const int) __attribute__ ((always_inline));
115
116 inline void vec_dst (const __vector unsigned char *, int, const int) __attribute__ ((always_inline));
117 inline void vec_dst (const __vector signed char *, int, const int) __attribute__ ((always_inline));
118 inline void vec_dst (const __vector bool char *, int, const int) __attribute__ ((always_inline));
119 inline void vec_dst (const __vector unsigned short *, int, const int) __attribute__ ((always_inline));
120 inline void vec_dst (const __vector signed short *, int, const int) __attribute__ ((always_inline));
121 inline void vec_dst (const __vector bool short *, int, const int) __attribute__ ((always_inline));
122 inline void vec_dst (const __vector pixel *, int, const int) __attribute__ ((always_inline));
123 inline void vec_dst (const __vector unsigned int *, int, const int) __attribute__ ((always_inline));
124 inline void vec_dst (const __vector signed int *, int, const int) __attribute__ ((always_inline));
125 inline void vec_dst (const __vector bool int *, int, const int) __attribute__ ((always_inline));
126 inline void vec_dst (const __vector float *, int, const int) __attribute__ ((always_inline));
127 inline void vec_dst (const unsigned char *, int, const int) __attribute__ ((always_inline));
128 inline void vec_dst (const signed char *, int, const int) __attribute__ ((always_inline));
129 inline void vec_dst (const unsigned short *, int, const int) __attribute__ ((always_inline));
130 inline void vec_dst (const short *, int, const int) __attribute__ ((always_inline));
131 inline void vec_dst (const unsigned int *, int, const int) __attribute__ ((always_inline));
132 inline void vec_dst (const int *, int, const int) __attribute__ ((always_inline));
133 inline void vec_dst (const unsigned long *, int, const int) __attribute__ ((always_inline));
134 inline void vec_dst (const long *, int, const int) __attribute__ ((always_inline));
135 inline void vec_dst (const float *, int, const int) __attribute__ ((always_inline));
136
137 inline void vec_dstst (const __vector unsigned char *, int, const int) __attribute__ ((always_inline));
138 inline void vec_dstst (const __vector signed char *, int, const int) __attribute__ ((always_inline));
139 inline void vec_dstst (const __vector bool char *, int, const int) __attribute__ ((always_inline));
140 inline void vec_dstst (const __vector unsigned short *, int, const int) __attribute__ ((always_inline));
141 inline void vec_dstst (const __vector signed short *, int, const int) __attribute__ ((always_inline));
142 inline void vec_dstst (const __vector bool short *, int, const int) __attribute__ ((always_inline));
143 inline void vec_dstst (const __vector pixel *, int, const int) __attribute__ ((always_inline));
144 inline void vec_dstst (const __vector unsigned int *, int, const int) __attribute__ ((always_inline));
145 inline void vec_dstst (const __vector signed int *, int, const int) __attribute__ ((always_inline));
146 inline void vec_dstst (const __vector bool int *, int, const int) __attribute__ ((always_inline));
147 inline void vec_dstst (const __vector float *, int, const int) __attribute__ ((always_inline));
148 inline void vec_dstst (const unsigned char *, int, const int) __attribute__ ((always_inline));
149 inline void vec_dstst (const signed char *, int, const int) __attribute__ ((always_inline));
150 inline void vec_dstst (const unsigned short *, int, const int) __attribute__ ((always_inline));
151 inline void vec_dstst (const short *, int, const int) __attribute__ ((always_inline));
152 inline void vec_dstst (const unsigned int *, int, const int) __attribute__ ((always_inline));
153 inline void vec_dstst (const int *, int, const int) __attribute__ ((always_inline));
154 inline void vec_dstst (const unsigned long *, int, const int) __attribute__ ((always_inline));
155 inline void vec_dstst (const long *, int, const int) __attribute__ ((always_inline));
156 inline void vec_dstst (const float *, int, const int) __attribute__ ((always_inline));
157
158 inline void vec_dststt (const __vector unsigned char *, int, const int) __attribute__ ((always_inline));
159 inline void vec_dststt (const __vector signed char *, int, const int) __attribute__ ((always_inline));
160 inline void vec_dststt (const __vector bool char *, int, const int) __attribute__ ((always_inline));
161 inline void vec_dststt (const __vector unsigned short *, int, const int) __attribute__ ((always_inline));
162 inline void vec_dststt (const __vector signed short *, int, const int) __attribute__ ((always_inline));
163 inline void vec_dststt (const __vector bool short *, int, const int) __attribute__ ((always_inline));
164 inline void vec_dststt (const __vector pixel *, int, const int) __attribute__ ((always_inline));
165 inline void vec_dststt (const __vector unsigned int *, int, const int) __attribute__ ((always_inline));
166 inline void vec_dststt (const __vector signed int *, int, const int) __attribute__ ((always_inline));
167 inline void vec_dststt (const __vector bool int *, int, const int) __attribute__ ((always_inline));
168 inline void vec_dststt (const __vector float *, int, const int) __attribute__ ((always_inline));
169 inline void vec_dststt (const unsigned char *, int, const int) __attribute__ ((always_inline));
170 inline void vec_dststt (const signed char *, int, const int) __attribute__ ((always_inline));
171 inline void vec_dststt (const unsigned short *, int, const int) __attribute__ ((always_inline));
172 inline void vec_dststt (const short *, int, const int) __attribute__ ((always_inline));
173 inline void vec_dststt (const unsigned int *, int, const int) __attribute__ ((always_inline));
174 inline void vec_dststt (const int *, int, const int) __attribute__ ((always_inline));
175 inline void vec_dststt (const unsigned long *, int, const int) __attribute__ ((always_inline));
176 inline void vec_dststt (const long *, int, const int) __attribute__ ((always_inline));
177 inline void vec_dststt (const float *, int, const int) __attribute__ ((always_inline));
178
179 inline void vec_dstt (const __vector unsigned char *, int, const int) __attribute__ ((always_inline));
180 inline void vec_dstt (const __vector signed char *, int, const int) __attribute__ ((always_inline));
181 inline void vec_dstt (const __vector bool char *, int, const int) __attribute__ ((always_inline));
182 inline void vec_dstt (const __vector unsigned short *, int, const int) __attribute__ ((always_inline));
183 inline void vec_dstt (const __vector signed short *, int, const int) __attribute__ ((always_inline));
184 inline void vec_dstt (const __vector bool short *, int, const int) __attribute__ ((always_inline));
185 inline void vec_dstt (const __vector pixel *, int, const int) __attribute__ ((always_inline));
186 inline void vec_dstt (const __vector unsigned int *, int, const int) __attribute__ ((always_inline));
187 inline void vec_dstt (const __vector signed int *, int, const int) __attribute__ ((always_inline));
188 inline void vec_dstt (const __vector bool int *, int, const int) __attribute__ ((always_inline));
189 inline void vec_dstt (const __vector float *, int, const int) __attribute__ ((always_inline));
190 inline void vec_dstt (const unsigned char *, int, const int) __attribute__ ((always_inline));
191 inline void vec_dstt (const signed char *, int, const int) __attribute__ ((always_inline));
192 inline void vec_dstt (const unsigned short *, int, const int) __attribute__ ((always_inline));
193 inline void vec_dstt (const short *, int, const int) __attribute__ ((always_inline));
194 inline void vec_dstt (const unsigned int *, int, const int) __attribute__ ((always_inline));
195 inline void vec_dstt (const int *, int, const int) __attribute__ ((always_inline));
196 inline void vec_dstt (const unsigned long *, int, const int) __attribute__ ((always_inline));
197 inline void vec_dstt (const long *, int, const int) __attribute__ ((always_inline));
198 inline void vec_dstt (const float *, int, const int) __attribute__ ((always_inline));
199
200 inline __vector float vec_sld (__vector float, __vector float, const int) __attribute__ ((always_inline));
201 inline __vector signed int vec_sld (__vector signed int, __vector signed int, const int) __attribute__ ((always_inline));
202 inline __vector unsigned int vec_sld (__vector unsigned int, __vector unsigned int, const int) __attribute__ ((always_inline));
203 inline __vector bool int vec_sld (__vector bool int, __vector bool int, const int) __attribute__ ((always_inline));
204 inline __vector signed short vec_sld (__vector signed short, __vector signed short, const int) __attribute__ ((always_inline));
205 inline __vector unsigned short vec_sld (__vector unsigned short, __vector unsigned short, const int) __attribute__ ((always_inline));
206 inline __vector bool short vec_sld (__vector bool short, __vector bool short, const int) __attribute__ ((always_inline));
207 inline __vector pixel vec_sld (__vector pixel, __vector pixel, const int) __attribute__ ((always_inline));
208 inline __vector signed char vec_sld (__vector signed char, __vector signed char, const int) __attribute__ ((always_inline));
209 inline __vector unsigned char vec_sld (__vector unsigned char, __vector unsigned char, const int) __attribute__ ((always_inline));
210 inline __vector bool char vec_sld (__vector bool char, __vector bool char, const int) __attribute__ ((always_inline));
211 inline __vector signed char vec_splat (__vector signed char, const int) __attribute__ ((always_inline));
212 inline __vector unsigned char vec_splat (__vector unsigned char, const int) __attribute__ ((always_inline));
213 inline __vector bool char vec_splat (__vector bool char, const int) __attribute__ ((always_inline));
214 inline __vector signed short vec_splat (__vector signed short, const int) __attribute__ ((always_inline));
215 inline __vector unsigned short vec_splat (__vector unsigned short, const int) __attribute__ ((always_inline));
216 inline __vector bool short vec_splat (__vector bool short, const int) __attribute__ ((always_inline));
217 inline __vector pixel vec_splat (__vector pixel, const int) __attribute__ ((always_inline));
218 inline __vector float vec_splat (__vector float, const int) __attribute__ ((always_inline));
219 inline __vector signed int vec_splat (__vector signed int, const int) __attribute__ ((always_inline));
220 inline __vector unsigned int vec_splat (__vector unsigned int, const int) __attribute__ ((always_inline));
221 inline __vector bool int vec_splat (__vector bool int, const int) __attribute__ ((always_inline));
222 inline __vector signed char vec_splat_s8 (const int) __attribute__ ((always_inline));
223 inline __vector signed short vec_splat_s16 (const int) __attribute__ ((always_inline));
224 inline __vector signed int vec_splat_s32 (const int) __attribute__ ((always_inline));
225 inline __vector unsigned char vec_splat_u8 (const int) __attribute__ ((always_inline));
226 inline __vector unsigned short vec_splat_u16 (const int) __attribute__ ((always_inline));
227 inline __vector unsigned int vec_splat_u32 (const int) __attribute__ ((always_inline));
228 inline __vector float vec_vspltw (__vector float a1, const int a2) __attribute__ ((always_inline));
229 inline __vector bool int vec_vspltw (__vector bool int a1, const int a2) __attribute__ ((always_inline));
230 inline __vector signed int vec_vspltw (__vector signed int a1, const int a2) __attribute__ ((always_inline));
231 inline __vector unsigned int vec_vspltw (__vector unsigned int a1, const int a2) __attribute__ ((always_inline));
232 inline __vector bool short vec_vsplth (__vector bool short a1, const int a2) __attribute__ ((always_inline));
233 inline __vector signed short vec_vsplth (__vector signed short a1, const int a2) __attribute__ ((always_inline));
234 inline __vector unsigned short vec_vsplth (__vector unsigned short a1, const int a2) __attribute__ ((always_inline));
235 inline __vector pixel vec_vsplth (__vector pixel a1, const int a2) __attribute__ ((always_inline));
236 inline __vector bool char vec_vspltb (__vector bool char a1, const int a2) __attribute__ ((always_inline));
237 inline __vector signed char vec_vspltb (__vector signed char a1, const int a2) __attribute__ ((always_inline));
238 inline __vector unsigned char vec_vspltb (__vector unsigned char a1, const int a2) __attribute__ ((always_inline));
239
240 /* vec_step */
241
242 template<typename _Tp>
243 struct __vec_step_help
244 {
245   // All proper __vector types will specialize _S_elem.
246 };
247
248 template<>
249 struct __vec_step_help<vector signed short>
250 {
251   static const int _S_elem = 8;
252 };
253
254 template<>
255 struct __vec_step_help<vector unsigned short>
256 {
257   static const int _S_elem = 8;
258 };
259
260 template<>
261 struct __vec_step_help<vector bool short>
262 {
263   static const int _S_elem = 8;
264 };
265
266 template<>
267 struct __vec_step_help<vector pixel>
268 {
269   static const int _S_elem = 8;
270 };
271
272 template<>
273 struct __vec_step_help<vector signed int>
274 {
275   static const int _S_elem = 4;
276 };
277
278 template<>
279 struct __vec_step_help<vector unsigned int>
280 {
281   static const int _S_elem = 4;
282 };
283
284 template<>
285 struct __vec_step_help<vector bool int>
286 {
287   static const int _S_elem = 4;
288 };
289
290 template<>
291 struct __vec_step_help<vector unsigned char>
292 {
293   static const int _S_elem = 16;
294 };
295
296 template<>
297 struct __vec_step_help<vector signed char>
298 {
299   static const int _S_elem = 16;
300 };
301
302 template<>
303 struct __vec_step_help<vector bool char>
304 {
305   static const int _S_elem = 16;
306 };
307
308 template<>
309 struct __vec_step_help<vector float>
310 {
311   static const int _S_elem = 4;
312 };
313
314 #define vec_step(t)  __vec_step_help<__typeof__(t)>::_S_elem
315
316 /* vec_abs */
317
318 inline __vector signed char
319 vec_abs (__vector signed char a1)
320 {
321   return __builtin_altivec_abs_v16qi (a1);
322 }
323
324 inline __vector signed short
325 vec_abs (__vector signed short a1)
326 {
327   return __builtin_altivec_abs_v8hi (a1);
328 }
329
330 inline __vector signed int
331 vec_abs (__vector signed int a1)
332 {
333   return __builtin_altivec_abs_v4si (a1);
334 }
335
336 inline __vector float
337 vec_abs (__vector float a1)
338 {
339   return __builtin_altivec_abs_v4sf (a1);
340 }
341
342 /* vec_abss */
343
344 inline __vector signed char
345 vec_abss (__vector signed char a1)
346 {
347   return __builtin_altivec_abss_v16qi (a1);
348 }
349
350 inline __vector signed short
351 vec_abss (__vector signed short a1)
352 {
353   return __builtin_altivec_abss_v8hi (a1);
354 }
355
356 inline __vector signed int
357 vec_abss (__vector signed int a1)
358 {
359   return __builtin_altivec_abss_v4si (a1);
360 }
361
362 /* vec_add */
363
364 inline __vector signed char
365 vec_add (__vector bool char a1, __vector signed char a2)
366 {
367   return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
368 }
369
370 inline __vector signed char
371 vec_add (__vector signed char a1, __vector bool char a2)
372 {
373   return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
374 }
375
376 inline __vector signed char
377 vec_add (__vector signed char a1, __vector signed char a2)
378 {
379   return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
380 }
381
382 inline __vector unsigned char
383 vec_add (__vector bool char a1, __vector unsigned char a2)
384 {
385   return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
386 }
387
388 inline __vector unsigned char
389 vec_add (__vector unsigned char a1, __vector bool char a2)
390 {
391   return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
392 }
393
394 inline __vector unsigned char
395 vec_add (__vector unsigned char a1, __vector unsigned char a2)
396 {
397   return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
398 }
399
400 inline __vector signed short
401 vec_add (__vector bool short a1, __vector signed short a2)
402 {
403   return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
404 }
405
406 inline __vector signed short
407 vec_add (__vector signed short a1, __vector bool short a2)
408 {
409   return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
410 }
411
412 inline __vector signed short
413 vec_add (__vector signed short a1, __vector signed short a2)
414 {
415   return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
416 }
417
418 inline __vector unsigned short
419 vec_add (__vector bool short a1, __vector unsigned short a2)
420 {
421   return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
422 }
423
424 inline __vector unsigned short
425 vec_add (__vector unsigned short a1, __vector bool short a2)
426 {
427   return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
428 }
429
430 inline __vector unsigned short
431 vec_add (__vector unsigned short a1, __vector unsigned short a2)
432 {
433   return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
434 }
435
436 inline __vector signed int
437 vec_add (__vector bool int a1, __vector signed int a2)
438 {
439   return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
440 }
441
442 inline __vector signed int
443 vec_add (__vector signed int a1, __vector bool int a2)
444 {
445   return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
446 }
447
448 inline __vector signed int
449 vec_add (__vector signed int a1, __vector signed int a2)
450 {
451   return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
452 }
453
454 inline __vector unsigned int
455 vec_add (__vector bool int a1, __vector unsigned int a2)
456 {
457   return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
458 }
459
460 inline __vector unsigned int
461 vec_add (__vector unsigned int a1, __vector bool int a2)
462 {
463   return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
464 }
465
466 inline __vector unsigned int
467 vec_add (__vector unsigned int a1, __vector unsigned int a2)
468 {
469   return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
470 }
471
472 inline __vector float
473 vec_add (__vector float a1, __vector float a2)
474 {
475   return (__vector float) __builtin_altivec_vaddfp ((__vector float) a1, (__vector float) a2);
476 }
477
478 /* vec_vaddfp */
479
480 inline __vector float
481 vec_vaddfp (__vector float a1, __vector float a2)
482 {
483   return (__vector float) __builtin_altivec_vaddfp ((__vector float) a1, (__vector float) a2);
484 }
485
486 /* vec_vadduwm */
487
488 inline __vector signed int
489 vec_vadduwm (__vector bool int a1, __vector signed int a2)
490 {
491   return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
492 }
493
494 inline __vector signed int
495 vec_vadduwm (__vector signed int a1, __vector bool int a2)
496 {
497   return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
498 }
499
500 inline __vector signed int
501 vec_vadduwm (__vector signed int a1, __vector signed int a2)
502 {
503   return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
504 }
505
506 inline __vector unsigned int
507 vec_vadduwm (__vector bool int a1, __vector unsigned int a2)
508 {
509   return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
510 }
511
512 inline __vector unsigned int
513 vec_vadduwm (__vector unsigned int a1, __vector bool int a2)
514 {
515   return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
516 }
517
518 inline __vector unsigned int
519 vec_vadduwm (__vector unsigned int a1, __vector unsigned int a2)
520 {
521   return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
522 }
523
524 /* vec_vadduhm */
525
526 inline __vector signed short
527 vec_vadduhm (__vector bool short a1, __vector signed short a2)
528 {
529   return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
530 }
531
532 inline __vector signed short
533 vec_vadduhm (__vector signed short a1, __vector bool short a2)
534 {
535   return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
536 }
537
538 inline __vector signed short
539 vec_vadduhm (__vector signed short a1, __vector signed short a2)
540 {
541   return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
542 }
543
544 inline __vector unsigned short
545 vec_vadduhm (__vector bool short a1, __vector unsigned short a2)
546 {
547   return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
548 }
549
550 inline __vector unsigned short
551 vec_vadduhm (__vector unsigned short a1, __vector bool short a2)
552 {
553   return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
554 }
555
556 inline __vector unsigned short
557 vec_vadduhm (__vector unsigned short a1, __vector unsigned short a2)
558 {
559   return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
560 }
561
562 /* vec_vaddubm */
563
564 inline __vector signed char
565 vec_vaddubm (__vector bool char a1, __vector signed char a2)
566 {
567   return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
568 }
569
570 inline __vector signed char
571 vec_vaddubm (__vector signed char a1, __vector bool char a2)
572 {
573   return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
574 }
575
576 inline __vector signed char
577 vec_vaddubm (__vector signed char a1, __vector signed char a2)
578 {
579   return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
580 }
581
582 inline __vector unsigned char
583 vec_vaddubm (__vector bool char a1, __vector unsigned char a2)
584 {
585   return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
586 }
587
588 inline __vector unsigned char
589 vec_vaddubm (__vector unsigned char a1, __vector bool char a2)
590 {
591   return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
592 }
593
594 inline __vector unsigned char
595 vec_vaddubm (__vector unsigned char a1, __vector unsigned char a2)
596 {
597   return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
598 }
599
600 /* vec_addc */
601
602 inline __vector unsigned int
603 vec_addc (__vector unsigned int a1, __vector unsigned int a2)
604 {
605   return (__vector unsigned int) __builtin_altivec_vaddcuw ((__vector signed int) a1, (__vector signed int) a2);
606 }
607
608 /* vec_adds */
609
610 inline __vector unsigned char
611 vec_adds (__vector bool char a1, __vector unsigned char a2)
612 {
613   return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
614 }
615
616 inline __vector unsigned char
617 vec_adds (__vector unsigned char a1, __vector bool char a2)
618 {
619   return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
620 }
621
622 inline __vector unsigned char
623 vec_adds (__vector unsigned char a1, __vector unsigned char a2)
624 {
625   return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
626 }
627
628 inline __vector signed char
629 vec_adds (__vector bool char a1, __vector signed char a2)
630 {
631   return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
632 }
633
634 inline __vector signed char
635 vec_adds (__vector signed char a1, __vector bool char a2)
636 {
637   return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
638 }
639
640 inline __vector signed char
641 vec_adds (__vector signed char a1, __vector signed char a2)
642 {
643   return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
644 }
645
646 inline __vector unsigned short
647 vec_adds (__vector bool short a1, __vector unsigned short a2)
648 {
649   return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
650 }
651
652 inline __vector unsigned short
653 vec_adds (__vector unsigned short a1, __vector bool short a2)
654 {
655   return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
656 }
657
658 inline __vector unsigned short
659 vec_adds (__vector unsigned short a1, __vector unsigned short a2)
660 {
661   return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
662 }
663
664 inline __vector signed short
665 vec_adds (__vector bool short a1, __vector signed short a2)
666 {
667   return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
668 }
669
670 inline __vector signed short
671 vec_adds (__vector signed short a1, __vector bool short a2)
672 {
673   return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
674 }
675
676 inline __vector signed short
677 vec_adds (__vector signed short a1, __vector signed short a2)
678 {
679   return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
680 }
681
682 inline __vector unsigned int
683 vec_adds (__vector bool int a1, __vector unsigned int a2)
684 {
685   return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
686 }
687
688 inline __vector unsigned int
689 vec_adds (__vector unsigned int a1, __vector bool int a2)
690 {
691   return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
692 }
693
694 inline __vector unsigned int
695 vec_adds (__vector unsigned int a1, __vector unsigned int a2)
696 {
697   return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
698 }
699
700 inline __vector signed int
701 vec_adds (__vector bool int a1, __vector signed int a2)
702 {
703   return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
704 }
705
706 inline __vector signed int
707 vec_adds (__vector signed int a1, __vector bool int a2)
708 {
709   return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
710 }
711
712 inline __vector signed int
713 vec_adds (__vector signed int a1, __vector signed int a2)
714 {
715   return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
716 }
717
718 /* vec_vaddsws */
719
720 inline __vector signed int
721 vec_vaddsws (__vector bool int a1, __vector signed int a2)
722 {
723   return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
724 }
725
726 inline __vector signed int
727 vec_vaddsws (__vector signed int a1, __vector bool int a2)
728 {
729   return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
730 }
731
732 inline __vector signed int
733 vec_vaddsws (__vector signed int a1, __vector signed int a2)
734 {
735   return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
736 }
737
738 /* vec_vadduws */
739
740 inline __vector unsigned int
741 vec_vadduws (__vector bool int a1, __vector unsigned int a2)
742 {
743   return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
744 }
745
746 inline __vector unsigned int
747 vec_vadduws (__vector unsigned int a1, __vector bool int a2)
748 {
749   return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
750 }
751
752 inline __vector unsigned int
753 vec_vadduws (__vector unsigned int a1, __vector unsigned int a2)
754 {
755   return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
756 }
757
758 /* vec_vaddshs */
759
760 inline __vector signed short
761 vec_vaddshs (__vector bool short a1, __vector signed short a2)
762 {
763   return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
764 }
765
766 inline __vector signed short
767 vec_vaddshs (__vector signed short a1, __vector bool short a2)
768 {
769   return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
770 }
771
772 inline __vector signed short
773 vec_vaddshs (__vector signed short a1, __vector signed short a2)
774 {
775   return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
776 }
777
778 /* vec_vadduhs */
779
780 inline __vector unsigned short
781 vec_vadduhs (__vector bool short a1, __vector unsigned short a2)
782 {
783   return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
784 }
785
786 inline __vector unsigned short
787 vec_vadduhs (__vector unsigned short a1, __vector bool short a2)
788 {
789   return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
790 }
791
792 inline __vector unsigned short
793 vec_vadduhs (__vector unsigned short a1, __vector unsigned short a2)
794 {
795   return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
796 }
797
798 /* vec_vaddsbs */
799
800 inline __vector signed char
801 vec_vaddsbs (__vector bool char a1, __vector signed char a2)
802 {
803   return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
804 }
805
806 inline __vector signed char
807 vec_vaddsbs (__vector signed char a1, __vector bool char a2)
808 {
809   return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
810 }
811
812 inline __vector signed char
813 vec_vaddsbs (__vector signed char a1, __vector signed char a2)
814 {
815   return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
816 }
817
818 /* vec_vaddubs */
819
820 inline __vector unsigned char
821 vec_vaddubs (__vector bool char a1, __vector unsigned char a2)
822 {
823   return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
824 }
825
826 inline __vector unsigned char
827 vec_vaddubs (__vector unsigned char a1, __vector bool char a2)
828 {
829   return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
830 }
831
832 inline __vector unsigned char
833 vec_vaddubs (__vector unsigned char a1, __vector unsigned char a2)
834 {
835   return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
836 }
837
838 /* vec_and */
839
840 inline __vector float
841 vec_and (__vector float a1, __vector float a2)
842 {
843   return (__vector float) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
844 }
845
846 inline __vector float
847 vec_and (__vector float a1, __vector bool int a2)
848 {
849   return (__vector float) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
850 }
851
852 inline __vector float
853 vec_and (__vector bool int a1, __vector float a2)
854 {
855   return (__vector float) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
856 }
857
858 inline __vector bool int
859 vec_and (__vector bool int a1, __vector bool int a2)
860 {
861   return (__vector bool int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
862 }
863
864 inline __vector signed int
865 vec_and (__vector bool int a1, __vector signed int a2)
866 {
867   return (__vector signed int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
868 }
869
870 inline __vector signed int
871 vec_and (__vector signed int a1, __vector bool int a2)
872 {
873   return (__vector signed int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
874 }
875
876 inline __vector signed int
877 vec_and (__vector signed int a1, __vector signed int a2)
878 {
879   return (__vector signed int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
880 }
881
882 inline __vector unsigned int
883 vec_and (__vector bool int a1, __vector unsigned int a2)
884 {
885   return (__vector unsigned int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
886 }
887
888 inline __vector unsigned int
889 vec_and (__vector unsigned int a1, __vector bool int a2)
890 {
891   return (__vector unsigned int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
892 }
893
894 inline __vector unsigned int
895 vec_and (__vector unsigned int a1, __vector unsigned int a2)
896 {
897   return (__vector unsigned int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
898 }
899
900 inline __vector bool short
901 vec_and (__vector bool short a1, __vector bool short a2)
902 {
903   return (__vector bool short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
904 }
905
906 inline __vector signed short
907 vec_and (__vector bool short a1, __vector signed short a2)
908 {
909   return (__vector signed short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
910 }
911
912 inline __vector signed short
913 vec_and (__vector signed short a1, __vector bool short a2)
914 {
915   return (__vector signed short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
916 }
917
918 inline __vector signed short
919 vec_and (__vector signed short a1, __vector signed short a2)
920 {
921   return (__vector signed short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
922 }
923
924 inline __vector unsigned short
925 vec_and (__vector bool short a1, __vector unsigned short a2)
926 {
927   return (__vector unsigned short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
928 }
929
930 inline __vector unsigned short
931 vec_and (__vector unsigned short a1, __vector bool short a2)
932 {
933   return (__vector unsigned short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
934 }
935
936 inline __vector unsigned short
937 vec_and (__vector unsigned short a1, __vector unsigned short a2)
938 {
939   return (__vector unsigned short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
940 }
941
942 inline __vector signed char
943 vec_and (__vector bool char a1, __vector signed char a2)
944 {
945   return (__vector signed char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
946 }
947
948 inline __vector bool char
949 vec_and (__vector bool char a1, __vector bool char a2)
950 {
951   return (__vector bool char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
952 }
953
954 inline __vector signed char
955 vec_and (__vector signed char a1, __vector bool char a2)
956 {
957   return (__vector signed char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
958 }
959
960 inline __vector signed char
961 vec_and (__vector signed char a1, __vector signed char a2)
962 {
963   return (__vector signed char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
964 }
965
966 inline __vector unsigned char
967 vec_and (__vector bool char a1, __vector unsigned char a2)
968 {
969   return (__vector unsigned char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
970 }
971
972 inline __vector unsigned char
973 vec_and (__vector unsigned char a1, __vector bool char a2)
974 {
975   return (__vector unsigned char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
976 }
977
978 inline __vector unsigned char
979 vec_and (__vector unsigned char a1, __vector unsigned char a2)
980 {
981   return (__vector unsigned char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
982 }
983
984 /* vec_andc */
985
986 inline __vector float
987 vec_andc (__vector float a1, __vector float a2)
988 {
989   return (__vector float) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
990 }
991
992 inline __vector float
993 vec_andc (__vector float a1, __vector bool int a2)
994 {
995   return (__vector float) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
996 }
997
998 inline __vector float
999 vec_andc (__vector bool int a1, __vector float a2)
1000 {
1001   return (__vector float) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1002 }
1003
1004 inline __vector bool int
1005 vec_andc (__vector bool int a1, __vector bool int a2)
1006 {
1007   return (__vector bool int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1008 }
1009
1010 inline __vector signed int
1011 vec_andc (__vector bool int a1, __vector signed int a2)
1012 {
1013   return (__vector signed int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1014 }
1015
1016 inline __vector signed int
1017 vec_andc (__vector signed int a1, __vector bool int a2)
1018 {
1019   return (__vector signed int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1020 }
1021
1022 inline __vector signed int
1023 vec_andc (__vector signed int a1, __vector signed int a2)
1024 {
1025   return (__vector signed int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1026 }
1027
1028 inline __vector unsigned int
1029 vec_andc (__vector bool int a1, __vector unsigned int a2)
1030 {
1031   return (__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1032 }
1033
1034 inline __vector unsigned int
1035 vec_andc (__vector unsigned int a1, __vector bool int a2)
1036 {
1037   return (__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1038 }
1039
1040 inline __vector unsigned int
1041 vec_andc (__vector unsigned int a1, __vector unsigned int a2)
1042 {
1043   return (__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1044 }
1045
1046 inline __vector bool short
1047 vec_andc (__vector bool short a1, __vector bool short a2)
1048 {
1049   return (__vector bool short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1050 }
1051
1052 inline __vector signed short
1053 vec_andc (__vector bool short a1, __vector signed short a2)
1054 {
1055   return (__vector signed short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1056 }
1057
1058 inline __vector signed short
1059 vec_andc (__vector signed short a1, __vector bool short a2)
1060 {
1061   return (__vector signed short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1062 }
1063
1064 inline __vector signed short
1065 vec_andc (__vector signed short a1, __vector signed short a2)
1066 {
1067   return (__vector signed short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1068 }
1069
1070 inline __vector unsigned short
1071 vec_andc (__vector bool short a1, __vector unsigned short a2)
1072 {
1073   return (__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1074 }
1075
1076 inline __vector unsigned short
1077 vec_andc (__vector unsigned short a1, __vector bool short a2)
1078 {
1079   return (__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1080 }
1081
1082 inline __vector unsigned short
1083 vec_andc (__vector unsigned short a1, __vector unsigned short a2)
1084 {
1085   return (__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1086 }
1087
1088 inline __vector signed char
1089 vec_andc (__vector bool char a1, __vector signed char a2)
1090 {
1091   return (__vector signed char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1092 }
1093
1094 inline __vector bool char
1095 vec_andc (__vector bool char a1, __vector bool char a2)
1096 {
1097   return (__vector bool char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1098 }
1099
1100 inline __vector signed char
1101 vec_andc (__vector signed char a1, __vector bool char a2)
1102 {
1103   return (__vector signed char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1104 }
1105
1106 inline __vector signed char
1107 vec_andc (__vector signed char a1, __vector signed char a2)
1108 {
1109   return (__vector signed char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1110 }
1111
1112 inline __vector unsigned char
1113 vec_andc (__vector bool char a1, __vector unsigned char a2)
1114 {
1115   return (__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1116 }
1117
1118 inline __vector unsigned char
1119 vec_andc (__vector unsigned char a1, __vector bool char a2)
1120 {
1121   return (__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1122 }
1123
1124 inline __vector unsigned char
1125 vec_andc (__vector unsigned char a1, __vector unsigned char a2)
1126 {
1127   return (__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1128 }
1129
1130 /* vec_avg */
1131
1132 inline __vector unsigned char
1133 vec_avg (__vector unsigned char a1, __vector unsigned char a2)
1134 {
1135   return (__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) a1, (__vector signed char) a2);
1136 }
1137
1138 inline __vector signed char
1139 vec_avg (__vector signed char a1, __vector signed char a2)
1140 {
1141   return (__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) a1, (__vector signed char) a2);
1142 }
1143
1144 inline __vector unsigned short
1145 vec_avg (__vector unsigned short a1, __vector unsigned short a2)
1146 {
1147   return (__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) a1, (__vector signed short) a2);
1148 }
1149
1150 inline __vector signed short
1151 vec_avg (__vector signed short a1, __vector signed short a2)
1152 {
1153   return (__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) a1, (__vector signed short) a2);
1154 }
1155
1156 inline __vector unsigned int
1157 vec_avg (__vector unsigned int a1, __vector unsigned int a2)
1158 {
1159   return (__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) a1, (__vector signed int) a2);
1160 }
1161
1162 inline __vector signed int
1163 vec_avg (__vector signed int a1, __vector signed int a2)
1164 {
1165   return (__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) a1, (__vector signed int) a2);
1166 }
1167
1168 /* vec_vavgsw */
1169
1170 inline __vector signed int
1171 vec_vavgsw (__vector signed int a1, __vector signed int a2)
1172 {
1173   return (__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) a1, (__vector signed int) a2);
1174 }
1175
1176 /* vec_vavguw */
1177
1178 inline __vector unsigned int
1179 vec_vavguw (__vector unsigned int a1, __vector unsigned int a2)
1180 {
1181   return (__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) a1, (__vector signed int) a2);
1182 }
1183
1184 /* vec_vavgsh */
1185
1186 inline __vector signed short
1187 vec_vavgsh (__vector signed short a1, __vector signed short a2)
1188 {
1189   return (__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) a1, (__vector signed short) a2);
1190 }
1191
1192 /* vec_vavguh */
1193
1194 inline __vector unsigned short
1195 vec_vavguh (__vector unsigned short a1, __vector unsigned short a2)
1196 {
1197   return (__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) a1, (__vector signed short) a2);
1198 }
1199
1200 /* vec_vavgsb */
1201
1202 inline __vector signed char
1203 vec_vavgsb (__vector signed char a1, __vector signed char a2)
1204 {
1205   return (__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) a1, (__vector signed char) a2);
1206 }
1207
1208 /* vec_vavgub */
1209
1210 inline __vector unsigned char
1211 vec_vavgub (__vector unsigned char a1, __vector unsigned char a2)
1212 {
1213   return (__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) a1, (__vector signed char) a2);
1214 }
1215
1216 /* vec_ceil */
1217
1218 inline __vector float
1219 vec_ceil (__vector float a1)
1220 {
1221   return (__vector float) __builtin_altivec_vrfip ((__vector float) a1);
1222 }
1223
1224 /* vec_cmpb */
1225
1226 inline __vector signed int
1227 vec_cmpb (__vector float a1, __vector float a2)
1228 {
1229   return (__vector signed int) __builtin_altivec_vcmpbfp ((__vector float) a1, (__vector float) a2);
1230 }
1231
1232 /* vec_cmpeq */
1233
1234 inline __vector bool char
1235 vec_cmpeq (__vector signed char a1, __vector signed char a2)
1236 {
1237   return (__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2);
1238 }
1239
1240 inline __vector bool char
1241 vec_cmpeq (__vector unsigned char a1, __vector unsigned char a2)
1242 {
1243   return (__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2);
1244 }
1245
1246 inline __vector bool short
1247 vec_cmpeq (__vector signed short a1, __vector signed short a2)
1248 {
1249   return (__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2);
1250 }
1251
1252 inline __vector bool short
1253 vec_cmpeq (__vector unsigned short a1, __vector unsigned short a2)
1254 {
1255   return (__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2);
1256 }
1257
1258 inline __vector bool int
1259 vec_cmpeq (__vector signed int a1, __vector signed int a2)
1260 {
1261   return (__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2);
1262 }
1263
1264 inline __vector bool int
1265 vec_cmpeq (__vector unsigned int a1, __vector unsigned int a2)
1266 {
1267   return (__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2);
1268 }
1269
1270 inline __vector bool int
1271 vec_cmpeq (__vector float a1, __vector float a2)
1272 {
1273   return (__vector bool int) __builtin_altivec_vcmpeqfp ((__vector float) a1, (__vector float) a2);
1274 }
1275
1276 /* vec_vcmpeqfp */
1277
1278 inline __vector bool int
1279 vec_vcmpeqfp (__vector float a1, __vector float a2)
1280 {
1281   return (__vector bool int) __builtin_altivec_vcmpeqfp ((__vector float) a1, (__vector float) a2);
1282 }
1283
1284 /* vec_vcmpequw */
1285
1286 inline __vector bool int
1287 vec_vcmpequw (__vector signed int a1, __vector signed int a2)
1288 {
1289   return (__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2);
1290 }
1291
1292 inline __vector bool int
1293 vec_vcmpequw (__vector unsigned int a1, __vector unsigned int a2)
1294 {
1295   return (__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2);
1296 }
1297
1298 /* vec_vcmpequh */
1299
1300 inline __vector bool short
1301 vec_vcmpequh (__vector signed short a1, __vector signed short a2)
1302 {
1303   return (__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2);
1304 }
1305
1306 inline __vector bool short
1307 vec_vcmpequh (__vector unsigned short a1, __vector unsigned short a2)
1308 {
1309   return (__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2);
1310 }
1311
1312 /* vec_vcmpequb */
1313
1314 inline __vector bool char
1315 vec_vcmpequb (__vector signed char a1, __vector signed char a2)
1316 {
1317   return (__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2);
1318 }
1319
1320 inline __vector bool char
1321 vec_vcmpequb (__vector unsigned char a1, __vector unsigned char a2)
1322 {
1323   return (__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2);
1324 }
1325
1326 /* vec_cmpge */
1327
1328 inline __vector bool int
1329 vec_cmpge (__vector float a1, __vector float a2)
1330 {
1331   return (__vector bool int) __builtin_altivec_vcmpgefp ((__vector float) a1, (__vector float) a2);
1332 }
1333
1334 /* vec_cmpgt */
1335
1336 inline __vector bool char
1337 vec_cmpgt (__vector unsigned char a1, __vector unsigned char a2)
1338 {
1339   return (__vector bool char) __builtin_altivec_vcmpgtub ((__vector signed char) a1, (__vector signed char) a2);
1340 }
1341
1342 inline __vector bool char
1343 vec_cmpgt (__vector signed char a1, __vector signed char a2)
1344 {
1345   return (__vector bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) a1, (__vector signed char) a2);
1346 }
1347
1348 inline __vector bool short
1349 vec_cmpgt (__vector unsigned short a1, __vector unsigned short a2)
1350 {
1351   return (__vector bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) a1, (__vector signed short) a2);
1352 }
1353
1354 inline __vector bool short
1355 vec_cmpgt (__vector signed short a1, __vector signed short a2)
1356 {
1357   return (__vector bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) a1, (__vector signed short) a2);
1358 }
1359
1360 inline __vector bool int
1361 vec_cmpgt (__vector unsigned int a1, __vector unsigned int a2)
1362 {
1363   return (__vector bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) a1, (__vector signed int) a2);
1364 }
1365
1366 inline __vector bool int
1367 vec_cmpgt (__vector signed int a1, __vector signed int a2)
1368 {
1369   return (__vector bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) a1, (__vector signed int) a2);
1370 }
1371
1372 inline __vector bool int
1373 vec_cmpgt (__vector float a1, __vector float a2)
1374 {
1375   return (__vector bool int) __builtin_altivec_vcmpgtfp ((__vector float) a1, (__vector float) a2);
1376 }
1377
1378 /* vec_vcmpgtfp */
1379
1380 inline __vector bool int
1381 vec_vcmpgtfp (__vector float a1, __vector float a2)
1382 {
1383   return (__vector bool int) __builtin_altivec_vcmpgtfp ((__vector float) a1, (__vector float) a2);
1384 }
1385
1386 /* vec_vcmpgtsw */
1387
1388 inline __vector bool int
1389 vec_vcmpgtsw (__vector signed int a1, __vector signed int a2)
1390 {
1391   return (__vector bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) a1, (__vector signed int) a2);
1392 }
1393
1394 /* vec_vcmpgtuw */
1395
1396 inline __vector bool int
1397 vec_vcmpgtuw (__vector unsigned int a1, __vector unsigned int a2)
1398 {
1399   return (__vector bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) a1, (__vector signed int) a2);
1400 }
1401
1402 /* vec_vcmpgtsh */
1403
1404 inline __vector bool short
1405 vec_vcmpgtsh (__vector signed short a1, __vector signed short a2)
1406 {
1407   return (__vector bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) a1, (__vector signed short) a2);
1408 }
1409
1410 /* vec_vcmpgtuh */
1411
1412 inline __vector bool short
1413 vec_vcmpgtuh (__vector unsigned short a1, __vector unsigned short a2)
1414 {
1415   return (__vector bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) a1, (__vector signed short) a2);
1416 }
1417
1418 /* vec_vcmpgtsb */
1419
1420 inline __vector bool char
1421 vec_vcmpgtsb (__vector signed char a1, __vector signed char a2)
1422 {
1423   return (__vector bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) a1, (__vector signed char) a2);
1424 }
1425
1426 /* vec_vcmpgtub */
1427
1428 inline __vector bool char
1429 vec_vcmpgtub (__vector unsigned char a1, __vector unsigned char a2)
1430 {
1431   return (__vector bool char) __builtin_altivec_vcmpgtub ((__vector signed char) a1, (__vector signed char) a2);
1432 }
1433
1434 /* vec_cmple */
1435
1436 inline __vector bool int
1437 vec_cmple (__vector float a1, __vector float a2)
1438 {
1439   return (__vector bool int) __builtin_altivec_vcmpgefp ((__vector float) a2, (__vector float) a1);
1440 }
1441
1442 /* vec_cmplt */
1443
1444 inline __vector bool char
1445 vec_cmplt (__vector unsigned char a1, __vector unsigned char a2)
1446 {
1447   return (__vector bool char) __builtin_altivec_vcmpgtub ((__vector signed char) a2, (__vector signed char) a1);
1448 }
1449
1450 inline __vector bool char
1451 vec_cmplt (__vector signed char a1, __vector signed char a2)
1452 {
1453   return (__vector bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) a2, (__vector signed char) a1);
1454 }
1455
1456 inline __vector bool short
1457 vec_cmplt (__vector unsigned short a1, __vector unsigned short a2)
1458 {
1459   return (__vector bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) a2, (__vector signed short) a1);
1460 }
1461
1462 inline __vector bool short
1463 vec_cmplt (__vector signed short a1, __vector signed short a2)
1464 {
1465   return (__vector bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) a2, (__vector signed short) a1);
1466 }
1467
1468 inline __vector bool int
1469 vec_cmplt (__vector unsigned int a1, __vector unsigned int a2)
1470 {
1471   return (__vector bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) a2, (__vector signed int) a1);
1472 }
1473
1474 inline __vector bool int
1475 vec_cmplt (__vector signed int a1, __vector signed int a2)
1476 {
1477   return (__vector bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) a2, (__vector signed int) a1);
1478 }
1479
1480 inline __vector bool int
1481 vec_cmplt (__vector float a1, __vector float a2)
1482 {
1483   return (__vector bool int) __builtin_altivec_vcmpgtfp ((__vector float) a2, (__vector float) a1);
1484 }
1485
1486 /* vec_ctf */
1487
1488 inline __vector float
1489 vec_ctf (__vector unsigned int a1, const int a2)
1490 {
1491   return (__vector float) __builtin_altivec_vcfux ((__vector signed int) a1, a2);
1492 }
1493
1494 inline __vector float
1495 vec_ctf (__vector signed int a1, const int a2)
1496 {
1497   return (__vector float) __builtin_altivec_vcfsx ((__vector signed int) a1, a2);
1498 }
1499
1500 /* vec_vcfsx */
1501
1502 inline __vector float
1503 vec_vcfsx (__vector signed int a1, const int a2)
1504 {
1505   return (__vector float) __builtin_altivec_vcfsx ((__vector signed int) a1, a2);
1506 }
1507
1508 /* vec_vcfux */
1509
1510 inline __vector float
1511 vec_vcfux (__vector unsigned int a1, const int a2)
1512 {
1513   return (__vector float) __builtin_altivec_vcfux ((__vector signed int) a1, a2);
1514 }
1515
1516 /* vec_cts */
1517
1518 inline __vector signed int
1519 vec_cts (__vector float a1, const int a2)
1520 {
1521   return (__vector signed int) __builtin_altivec_vctsxs ((__vector float) a1, a2);
1522 }
1523
1524 /* vec_ctu */
1525
1526 inline __vector unsigned int
1527 vec_ctu (__vector float a1, const int a2)
1528 {
1529   return (__vector unsigned int) __builtin_altivec_vctuxs ((__vector float) a1, a2);
1530 }
1531
1532 /* vec_dss */
1533
1534 inline void
1535 vec_dss (const int a1)
1536 {
1537   __builtin_altivec_dss (a1);
1538 }
1539
1540 /* vec_dssall */
1541
1542 inline void
1543 vec_dssall (void)
1544 {
1545   __builtin_altivec_dssall ();
1546 }
1547
1548 /* vec_dst */
1549
1550 inline void
1551 vec_dst (const __vector unsigned char *a1, int a2, const int a3)
1552 {
1553   __builtin_altivec_dst ((void *) a1, a2, a3);
1554 }
1555
1556 inline void
1557 vec_dst (const __vector signed char *a1, int a2, const int a3)
1558 {
1559   __builtin_altivec_dst ((void *) a1, a2, a3);
1560 }
1561
1562 inline void
1563 vec_dst (const __vector bool char *a1, int a2, const int a3)
1564 {
1565   __builtin_altivec_dst ((void *) a1, a2, a3);
1566 }
1567
1568 inline void
1569 vec_dst (const __vector unsigned short *a1, int a2, const int a3)
1570 {
1571   __builtin_altivec_dst ((void *) a1, a2, a3);
1572 }
1573
1574 inline void
1575 vec_dst (const __vector signed short *a1, int a2, const int a3)
1576 {
1577   __builtin_altivec_dst ((void *) a1, a2, a3);
1578 }
1579
1580 inline void
1581 vec_dst (const __vector bool short *a1, int a2, const int a3)
1582 {
1583   __builtin_altivec_dst ((void *) a1, a2, a3);
1584 }
1585
1586 inline void
1587 vec_dst (const __vector pixel *a1, int a2, const int a3)
1588 {
1589   __builtin_altivec_dst ((void *) a1, a2, a3);
1590 }
1591
1592 inline void
1593 vec_dst (const __vector unsigned int *a1, int a2, const int a3)
1594 {
1595   __builtin_altivec_dst ((void *) a1, a2, a3);
1596 }
1597
1598 inline void
1599 vec_dst (const __vector signed int *a1, int a2, const int a3)
1600 {
1601   __builtin_altivec_dst ((void *) a1, a2, a3);
1602 }
1603
1604 inline void
1605 vec_dst (const __vector bool int *a1, int a2, const int a3)
1606 {
1607   __builtin_altivec_dst ((void *) a1, a2, a3);
1608 }
1609
1610 inline void
1611 vec_dst (const __vector float *a1, int a2, const int a3)
1612 {
1613   __builtin_altivec_dst ((void *) a1, a2, a3);
1614 }
1615
1616 inline void
1617 vec_dst (const unsigned char *a1, int a2, const int a3)
1618 {
1619   __builtin_altivec_dst ((void *) a1, a2, a3);
1620 }
1621
1622 inline void
1623 vec_dst (const signed char *a1, int a2, const int a3)
1624 {
1625   __builtin_altivec_dst ((void *) a1, a2, a3);
1626 }
1627
1628 inline void
1629 vec_dst (const unsigned short *a1, int a2, const int a3)
1630 {
1631   __builtin_altivec_dst ((void *) a1, a2, a3);
1632 }
1633
1634 inline void
1635 vec_dst (const short *a1, int a2, const int a3)
1636 {
1637   __builtin_altivec_dst ((void *) a1, a2, a3);
1638 }
1639
1640 inline void
1641 vec_dst (const unsigned int *a1, int a2, const int a3)
1642 {
1643   __builtin_altivec_dst ((void *) a1, a2, a3);
1644 }
1645
1646 inline void
1647 vec_dst (const int *a1, int a2, const int a3)
1648 {
1649   __builtin_altivec_dst ((void *) a1, a2, a3);
1650 }
1651
1652 inline void
1653 vec_dst (const unsigned long *a1, int a2, const int a3)
1654 {
1655   __builtin_altivec_dst ((void *) a1, a2, a3);
1656 }
1657
1658 inline void
1659 vec_dst (const long *a1, int a2, const int a3)
1660 {
1661   __builtin_altivec_dst ((void *) a1, a2, a3);
1662 }
1663
1664 inline void
1665 vec_dst (const float *a1, int a2, const int a3)
1666 {
1667   __builtin_altivec_dst ((void *) a1, a2, a3);
1668 }
1669
1670 /* vec_dstst */
1671
1672 inline void
1673 vec_dstst (const __vector unsigned char *a1, int a2, const int a3)
1674 {
1675   __builtin_altivec_dstst ((void *) a1, a2, a3);
1676 }
1677
1678 inline void
1679 vec_dstst (const __vector signed char *a1, int a2, const int a3)
1680 {
1681   __builtin_altivec_dstst ((void *) a1, a2, a3);
1682 }
1683
1684 inline void
1685 vec_dstst (const __vector bool char *a1, int a2, const int a3)
1686 {
1687   __builtin_altivec_dstst ((void *) a1, a2, a3);
1688 }
1689
1690 inline void
1691 vec_dstst (const __vector unsigned short *a1, int a2, const int a3)
1692 {
1693   __builtin_altivec_dstst ((void *) a1, a2, a3);
1694 }
1695
1696 inline void
1697 vec_dstst (const __vector signed short *a1, int a2, const int a3)
1698 {
1699   __builtin_altivec_dstst ((void *) a1, a2, a3);
1700 }
1701
1702 inline void
1703 vec_dstst (const __vector bool short *a1, int a2, const int a3)
1704 {
1705   __builtin_altivec_dstst ((void *) a1, a2, a3);
1706 }
1707
1708 inline void
1709 vec_dstst (const __vector pixel *a1, int a2, const int a3)
1710 {
1711   __builtin_altivec_dstst ((void *) a1, a2, a3);
1712 }
1713
1714 inline void
1715 vec_dstst (const __vector unsigned int *a1, int a2, const int a3)
1716 {
1717   __builtin_altivec_dstst ((void *) a1, a2, a3);
1718 }
1719
1720 inline void
1721 vec_dstst (const __vector signed int *a1, int a2, const int a3)
1722 {
1723   __builtin_altivec_dstst ((void *) a1, a2, a3);
1724 }
1725
1726 inline void
1727 vec_dstst (const __vector bool int *a1, int a2, const int a3)
1728 {
1729   __builtin_altivec_dstst ((void *) a1, a2, a3);
1730 }
1731
1732 inline void
1733 vec_dstst (const __vector float *a1, int a2, const int a3)
1734 {
1735   __builtin_altivec_dstst ((void *) a1, a2, a3);
1736 }
1737
1738 inline void
1739 vec_dstst (const unsigned char *a1, int a2, const int a3)
1740 {
1741   __builtin_altivec_dstst ((void *) a1, a2, a3);
1742 }
1743
1744 inline void
1745 vec_dstst (const signed char *a1, int a2, const int a3)
1746 {
1747   __builtin_altivec_dstst ((void *) a1, a2, a3);
1748 }
1749
1750 inline void
1751 vec_dstst (const unsigned short *a1, int a2, const int a3)
1752 {
1753   __builtin_altivec_dstst ((void *) a1, a2, a3);
1754 }
1755
1756 inline void
1757 vec_dstst (const short *a1, int a2, const int a3)
1758 {
1759   __builtin_altivec_dstst ((void *) a1, a2, a3);
1760 }
1761
1762 inline void
1763 vec_dstst (const unsigned int *a1, int a2, const int a3)
1764 {
1765   __builtin_altivec_dstst ((void *) a1, a2, a3);
1766 }
1767
1768 inline void
1769 vec_dstst (const int *a1, int a2, const int a3)
1770 {
1771   __builtin_altivec_dstst ((void *) a1, a2, a3);
1772 }
1773
1774 inline void
1775 vec_dstst (const unsigned long *a1, int a2, const int a3)
1776 {
1777   __builtin_altivec_dstst ((void *) a1, a2, a3);
1778 }
1779
1780 inline void
1781 vec_dstst (const long *a1, int a2, const int a3)
1782 {
1783   __builtin_altivec_dstst ((void *) a1, a2, a3);
1784 }
1785
1786 inline void
1787 vec_dstst (const float *a1, int a2, const int a3)
1788 {
1789   __builtin_altivec_dstst ((void *) a1, a2, a3);
1790 }
1791
1792 /* vec_dststt */
1793
1794 inline void
1795 vec_dststt (const __vector unsigned char *a1, int a2, const int a3)
1796 {
1797   __builtin_altivec_dststt ((void *) a1, a2, a3);
1798 }
1799
1800 inline void
1801 vec_dststt (const __vector signed char *a1, int a2, const int a3)
1802 {
1803   __builtin_altivec_dststt ((void *) a1, a2, a3);
1804 }
1805
1806 inline void
1807 vec_dststt (const __vector bool char *a1, int a2, const int a3)
1808 {
1809   __builtin_altivec_dststt ((void *) a1, a2, a3);
1810 }
1811
1812 inline void
1813 vec_dststt (const __vector unsigned short *a1, int a2, const int a3)
1814 {
1815   __builtin_altivec_dststt ((void *) a1, a2, a3);
1816 }
1817
1818 inline void
1819 vec_dststt (const __vector signed short *a1, int a2, const int a3)
1820 {
1821   __builtin_altivec_dststt ((void *) a1, a2, a3);
1822 }
1823
1824 inline void
1825 vec_dststt (const __vector bool short *a1, int a2, const int a3)
1826 {
1827   __builtin_altivec_dststt ((void *) a1, a2, a3);
1828 }
1829
1830 inline void
1831 vec_dststt (const __vector pixel *a1, int a2, const int a3)
1832 {
1833   __builtin_altivec_dststt ((void *) a1, a2, a3);
1834 }
1835
1836 inline void
1837 vec_dststt (const __vector unsigned int *a1, int a2, const int a3)
1838 {
1839   __builtin_altivec_dststt ((void *) a1, a2, a3);
1840 }
1841
1842 inline void
1843 vec_dststt (const __vector signed int *a1, int a2, const int a3)
1844 {
1845   __builtin_altivec_dststt ((void *) a1, a2, a3);
1846 }
1847
1848 inline void
1849 vec_dststt (const __vector bool int *a1, int a2, const int a3)
1850 {
1851   __builtin_altivec_dststt ((void *) a1, a2, a3);
1852 }
1853
1854 inline void
1855 vec_dststt (const __vector float *a1, int a2, const int a3)
1856 {
1857   __builtin_altivec_dststt ((void *) a1, a2, a3);
1858 }
1859
1860 inline void
1861 vec_dststt (const unsigned char *a1, int a2, const int a3)
1862 {
1863   __builtin_altivec_dststt ((void *) a1, a2, a3);
1864 }
1865
1866 inline void
1867 vec_dststt (const signed char *a1, int a2, const int a3)
1868 {
1869   __builtin_altivec_dststt ((void *) a1, a2, a3);
1870 }
1871
1872 inline void
1873 vec_dststt (const unsigned short *a1, int a2, const int a3)
1874 {
1875   __builtin_altivec_dststt ((void *) a1, a2, a3);
1876 }
1877
1878 inline void
1879 vec_dststt (const short *a1, int a2, const int a3)
1880 {
1881   __builtin_altivec_dststt ((void *) a1, a2, a3);
1882 }
1883
1884 inline void
1885 vec_dststt (const unsigned int *a1, int a2, const int a3)
1886 {
1887   __builtin_altivec_dststt ((void *) a1, a2, a3);
1888 }
1889
1890 inline void
1891 vec_dststt (const int *a1, int a2, const int a3)
1892 {
1893   __builtin_altivec_dststt ((void *) a1, a2, a3);
1894 }
1895
1896 inline void
1897 vec_dststt (const unsigned long *a1, int a2, const int a3)
1898 {
1899   __builtin_altivec_dststt ((void *) a1, a2, a3);
1900 }
1901
1902 inline void
1903 vec_dststt (const long *a1, int a2, const int a3)
1904 {
1905   __builtin_altivec_dststt ((void *) a1, a2, a3);
1906 }
1907
1908 inline void
1909 vec_dststt (const float *a1, int a2, const int a3)
1910 {
1911   __builtin_altivec_dststt ((void *) a1, a2, a3);
1912 }
1913
1914 /* vec_dstt */
1915
1916 inline void
1917 vec_dstt (const __vector unsigned char *a1, int a2, const int a3)
1918 {
1919   __builtin_altivec_dstt ((void *) a1, a2, a3);
1920 }
1921
1922 inline void
1923 vec_dstt (const __vector signed char *a1, int a2, const int a3)
1924 {
1925   __builtin_altivec_dstt ((void *) a1, a2, a3);
1926 }
1927
1928 inline void
1929 vec_dstt (const __vector bool char *a1, int a2, const int a3)
1930 {
1931   __builtin_altivec_dstt ((void *) a1, a2, a3);
1932 }
1933
1934 inline void
1935 vec_dstt (const __vector unsigned short *a1, int a2, const int a3)
1936 {
1937   __builtin_altivec_dstt ((void *) a1, a2, a3);
1938 }
1939
1940 inline void
1941 vec_dstt (const __vector signed short *a1, int a2, const int a3)
1942 {
1943   __builtin_altivec_dstt ((void *) a1, a2, a3);
1944 }
1945
1946 inline void
1947 vec_dstt (const __vector bool short *a1, int a2, const int a3)
1948 {
1949   __builtin_altivec_dstt ((void *) a1, a2, a3);
1950 }
1951
1952 inline void
1953 vec_dstt (const __vector pixel *a1, int a2, const int a3)
1954 {
1955   __builtin_altivec_dstt ((void *) a1, a2, a3);
1956 }
1957
1958 inline void
1959 vec_dstt (const __vector unsigned int *a1, int a2, const int a3)
1960 {
1961   __builtin_altivec_dstt ((void *) a1, a2, a3);
1962 }
1963
1964 inline void
1965 vec_dstt (const __vector signed int *a1, int a2, const int a3)
1966 {
1967   __builtin_altivec_dstt ((void *) a1, a2, a3);
1968 }
1969
1970 inline void
1971 vec_dstt (const __vector bool int *a1, int a2, const int a3)
1972 {
1973   __builtin_altivec_dstt ((void *) a1, a2, a3);
1974 }
1975
1976 inline void
1977 vec_dstt (const __vector float *a1, int a2, const int a3)
1978 {
1979   __builtin_altivec_dstt ((void *) a1, a2, a3);
1980 }
1981
1982 inline void
1983 vec_dstt (const unsigned char *a1, int a2, const int a3)
1984 {
1985   __builtin_altivec_dstt ((void *) a1, a2, a3);
1986 }
1987
1988 inline void
1989 vec_dstt (const signed char *a1, int a2, const int a3)
1990 {
1991   __builtin_altivec_dstt ((void *) a1, a2, a3);
1992 }
1993
1994 inline void
1995 vec_dstt (const unsigned short *a1, int a2, const int a3)
1996 {
1997   __builtin_altivec_dstt ((void *) a1, a2, a3);
1998 }
1999
2000 inline void
2001 vec_dstt (const short *a1, int a2, const int a3)
2002 {
2003   __builtin_altivec_dstt ((void *) a1, a2, a3);
2004 }
2005
2006 inline void
2007 vec_dstt (const unsigned int *a1, int a2, const int a3)
2008 {
2009   __builtin_altivec_dstt ((void *) a1, a2, a3);
2010 }
2011
2012 inline void
2013 vec_dstt (const int *a1, int a2, const int a3)
2014 {
2015   __builtin_altivec_dstt ((void *) a1, a2, a3);
2016 }
2017
2018 inline void
2019 vec_dstt (const unsigned long *a1, int a2, const int a3)
2020 {
2021   __builtin_altivec_dstt ((void *) a1, a2, a3);
2022 }
2023
2024 inline void
2025 vec_dstt (const long *a1, int a2, const int a3)
2026 {
2027   __builtin_altivec_dstt ((void *) a1, a2, a3);
2028 }
2029
2030 inline void
2031 vec_dstt (const float *a1, int a2, const int a3)
2032 {
2033   __builtin_altivec_dstt ((void *) a1, a2, a3);
2034 }
2035
2036 /* vec_expte */
2037
2038 inline __vector float
2039 vec_expte (__vector float a1)
2040 {
2041   return (__vector float) __builtin_altivec_vexptefp ((__vector float) a1);
2042 }
2043
2044 /* vec_floor */
2045
2046 inline __vector float
2047 vec_floor (__vector float a1)
2048 {
2049   return (__vector float) __builtin_altivec_vrfim ((__vector float) a1);
2050 }
2051
2052 /* vec_ld */
2053
2054 inline __vector float
2055 vec_ld (int a1, const __vector float *a2)
2056 {
2057   return (__vector float) __builtin_altivec_lvx (a1, (void *) a2);
2058 }
2059
2060 inline __vector float
2061 vec_ld (int a1, const float *a2)
2062 {
2063   return (__vector float) __builtin_altivec_lvx (a1, (void *) a2);
2064 }
2065
2066 inline __vector bool int
2067 vec_ld (int a1, const __vector bool int *a2)
2068 {
2069   return (__vector bool int) __builtin_altivec_lvx (a1, (void *) a2);
2070 }
2071
2072 inline __vector signed int
2073 vec_ld (int a1, const __vector signed int *a2)
2074 {
2075   return (__vector signed int) __builtin_altivec_lvx (a1, (void *) a2);
2076 }
2077
2078 inline __vector signed int
2079 vec_ld (int a1, const int *a2)
2080 {
2081   return (__vector signed int) __builtin_altivec_lvx (a1, (void *) a2);
2082 }
2083
2084 inline __vector signed int
2085 vec_ld (int a1, const long *a2)
2086 {
2087   return (__vector signed int) __builtin_altivec_lvx (a1, (void *) a2);
2088 }
2089
2090 inline __vector unsigned int
2091 vec_ld (int a1, const __vector unsigned int *a2)
2092 {
2093   return (__vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2);
2094 }
2095
2096 inline __vector unsigned int
2097 vec_ld (int a1, const unsigned int *a2)
2098 {
2099   return (__vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2);
2100 }
2101
2102 inline __vector unsigned int
2103 vec_ld (int a1, const unsigned long *a2)
2104 {
2105   return (__vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2);
2106 }
2107
2108 inline __vector bool short
2109 vec_ld (int a1, const __vector bool short *a2)
2110 {
2111   return (__vector bool short) __builtin_altivec_lvx (a1, (void *) a2);
2112 }
2113
2114 inline __vector pixel
2115 vec_ld (int a1, const __vector pixel *a2)
2116 {
2117   return (__vector pixel) __builtin_altivec_lvx (a1, (void *) a2);
2118 }
2119
2120 inline __vector signed short
2121 vec_ld (int a1, const __vector signed short *a2)
2122 {
2123   return (__vector signed short) __builtin_altivec_lvx (a1, (void *) a2);
2124 }
2125
2126 inline __vector signed short
2127 vec_ld (int a1, const short *a2)
2128 {
2129   return (__vector signed short) __builtin_altivec_lvx (a1, (void *) a2);
2130 }
2131
2132 inline __vector unsigned short
2133 vec_ld (int a1, const __vector unsigned short *a2)
2134 {
2135   return (__vector unsigned short) __builtin_altivec_lvx (a1, (void *) a2);
2136 }
2137
2138 inline __vector unsigned short
2139 vec_ld (int a1, const unsigned short *a2)
2140 {
2141   return (__vector unsigned short) __builtin_altivec_lvx (a1, (void *) a2);
2142 }
2143
2144 inline __vector bool char
2145 vec_ld (int a1, const __vector bool char *a2)
2146 {
2147   return (__vector bool char) __builtin_altivec_lvx (a1, (void *) a2);
2148 }
2149
2150 inline __vector signed char
2151 vec_ld (int a1, const __vector signed char *a2)
2152 {
2153   return (__vector signed char) __builtin_altivec_lvx (a1, (void *) a2);
2154 }
2155
2156 inline __vector signed char
2157 vec_ld (int a1, const signed char *a2)
2158 {
2159   return (__vector signed char) __builtin_altivec_lvx (a1, (void *) a2);
2160 }
2161
2162 inline __vector unsigned char
2163 vec_ld (int a1, const __vector unsigned char *a2)
2164 {
2165   return (__vector unsigned char) __builtin_altivec_lvx (a1, (void *) a2);
2166 }
2167
2168 inline __vector unsigned char
2169 vec_ld (int a1, const unsigned char *a2)
2170 {
2171   return (__vector unsigned char) __builtin_altivec_lvx (a1, (void *) a2);
2172 }
2173
2174 /* vec_lde */
2175
2176 inline __vector signed char
2177 vec_lde (int a1, const signed char *a2)
2178 {
2179   return (__vector signed char) __builtin_altivec_lvebx (a1, (void *) a2);
2180 }
2181
2182 inline __vector unsigned char
2183 vec_lde (int a1, const unsigned char *a2)
2184 {
2185   return (__vector unsigned char) __builtin_altivec_lvebx (a1, (void *) a2);
2186 }
2187
2188 inline __vector signed short
2189 vec_lde (int a1, const short *a2)
2190 {
2191   return (__vector signed short) __builtin_altivec_lvehx (a1, (void *) a2);
2192 }
2193
2194 inline __vector unsigned short
2195 vec_lde (int a1, const unsigned short *a2)
2196 {
2197   return (__vector unsigned short) __builtin_altivec_lvehx (a1, (void *) a2);
2198 }
2199
2200 inline __vector float
2201 vec_lde (int a1, const float *a2)
2202 {
2203   return (__vector float) __builtin_altivec_lvewx (a1, (void *) a2);
2204 }
2205
2206 inline __vector signed int
2207 vec_lde (int a1, const int *a2)
2208 {
2209   return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
2210 }
2211
2212 inline __vector unsigned int
2213 vec_lde (int a1, const unsigned int *a2)
2214 {
2215   return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
2216 }
2217
2218 inline __vector signed int
2219 vec_lde (int a1, const long *a2)
2220 {
2221   return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
2222 }
2223
2224 inline __vector unsigned int
2225 vec_lde (int a1, const unsigned long *a2)
2226 {
2227   return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
2228 }
2229
2230 /* vec_lvewx */
2231
2232 inline __vector float
2233 vec_lvewx (int a1, float *a2)
2234 {
2235   return (__vector float) __builtin_altivec_lvewx (a1, (void *) a2);
2236 }
2237
2238 inline __vector signed int
2239 vec_lvewx (int a1, int *a2)
2240 {
2241   return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
2242 }
2243
2244 inline __vector unsigned int
2245 vec_lvewx (int a1, unsigned int *a2)
2246 {
2247   return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
2248 }
2249
2250 inline __vector signed int
2251 vec_lvewx (int a1, long *a2)
2252 {
2253   return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
2254 }
2255
2256 inline __vector unsigned int
2257 vec_lvewx (int a1, unsigned long *a2)
2258 {
2259   return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
2260 }
2261
2262 /* vec_lvehx */
2263
2264 inline __vector signed short
2265 vec_lvehx (int a1, short *a2)
2266 {
2267   return (__vector signed short) __builtin_altivec_lvehx (a1, (void *) a2);
2268 }
2269
2270 inline __vector unsigned short
2271 vec_lvehx (int a1, unsigned short *a2)
2272 {
2273   return (__vector unsigned short) __builtin_altivec_lvehx (a1, (void *) a2);
2274 }
2275
2276 /* vec_lvebx */
2277
2278 inline __vector signed char
2279 vec_lvebx (int a1, signed char *a2)
2280 {
2281   return (__vector signed char) __builtin_altivec_lvebx (a1, (void *) a2);
2282 }
2283
2284 inline __vector unsigned char
2285 vec_lvebx (int a1, unsigned char *a2)
2286 {
2287   return (__vector unsigned char) __builtin_altivec_lvebx (a1, (void *) a2);
2288 }
2289
2290 /* vec_ldl */
2291
2292 inline __vector float
2293 vec_ldl (int a1, const __vector float *a2)
2294 {
2295   return (__vector float) __builtin_altivec_lvxl (a1, (void *) a2);
2296 }
2297
2298 inline __vector float
2299 vec_ldl (int a1, const float *a2)
2300 {
2301   return (__vector float) __builtin_altivec_lvxl (a1, (void *) a2);
2302 }
2303
2304 inline __vector bool int
2305 vec_ldl (int a1, const __vector bool int *a2)
2306 {
2307   return (__vector bool int) __builtin_altivec_lvxl (a1, (void *) a2);
2308 }
2309
2310 inline __vector signed int
2311 vec_ldl (int a1, const __vector signed int *a2)
2312 {
2313   return (__vector signed int) __builtin_altivec_lvxl (a1, (void *) a2);
2314 }
2315
2316 inline __vector signed int
2317 vec_ldl (int a1, const int *a2)
2318 {
2319   return (__vector signed int) __builtin_altivec_lvxl (a1, (void *) a2);
2320 }
2321
2322 inline __vector signed int
2323 vec_ldl (int a1, const long *a2)
2324 {
2325   return (__vector signed int) __builtin_altivec_lvxl (a1, (void *) a2);
2326 }
2327
2328 inline __vector unsigned int
2329 vec_ldl (int a1, const __vector unsigned int *a2)
2330 {
2331   return (__vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2);
2332 }
2333
2334 inline __vector unsigned int
2335 vec_ldl (int a1, const unsigned int *a2)
2336 {
2337   return (__vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2);
2338 }
2339
2340 inline __vector unsigned int
2341 vec_ldl (int a1, const unsigned long *a2)
2342 {
2343   return (__vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2);
2344 }
2345
2346 inline __vector bool short
2347 vec_ldl (int a1, const __vector bool short *a2)
2348 {
2349   return (__vector bool short) __builtin_altivec_lvxl (a1, (void *) a2);
2350 }
2351
2352 inline __vector pixel
2353 vec_ldl (int a1, const __vector pixel *a2)
2354 {
2355   return (__vector pixel) __builtin_altivec_lvxl (a1, (void *) a2);
2356 }
2357
2358 inline __vector signed short
2359 vec_ldl (int a1, const __vector signed short *a2)
2360 {
2361   return (__vector signed short) __builtin_altivec_lvxl (a1, (void *) a2);
2362 }
2363
2364 inline __vector signed short
2365 vec_ldl (int a1, const short *a2)
2366 {
2367   return (__vector signed short) __builtin_altivec_lvxl (a1, (void *) a2);
2368 }
2369
2370 inline __vector unsigned short
2371 vec_ldl (int a1, const __vector unsigned short *a2)
2372 {
2373   return (__vector unsigned short) __builtin_altivec_lvxl (a1, (void *) a2);
2374 }
2375
2376 inline __vector unsigned short
2377 vec_ldl (int a1, const unsigned short *a2)
2378 {
2379   return (__vector unsigned short) __builtin_altivec_lvxl (a1, (void *) a2);
2380 }
2381
2382 inline __vector bool char
2383 vec_ldl (int a1, const __vector bool char *a2)
2384 {
2385   return (__vector bool char) __builtin_altivec_lvxl (a1, (void *) a2);
2386 }
2387
2388 inline __vector signed char
2389 vec_ldl (int a1, const __vector signed char *a2)
2390 {
2391   return (__vector signed char) __builtin_altivec_lvxl (a1, (void *) a2);
2392 }
2393
2394 inline __vector signed char
2395 vec_ldl (int a1, const signed char *a2)
2396 {
2397   return (__vector signed char) __builtin_altivec_lvxl (a1, (void *) a2);
2398 }
2399
2400 inline __vector unsigned char
2401 vec_ldl (int a1, const __vector unsigned char *a2)
2402 {
2403   return (__vector unsigned char) __builtin_altivec_lvxl (a1, (void *) a2);
2404 }
2405
2406 inline __vector unsigned char
2407 vec_ldl (int a1, const unsigned char *a2)
2408 {
2409   return (__vector unsigned char) __builtin_altivec_lvxl (a1, (void *) a2);
2410 }
2411
2412 /* vec_loge */
2413
2414 inline __vector float
2415 vec_loge (__vector float a1)
2416 {
2417   return (__vector float) __builtin_altivec_vlogefp ((__vector float) a1);
2418 }
2419
2420 /* vec_lvsl */
2421
2422 inline __vector unsigned char
2423 vec_lvsl (int a1, const volatile unsigned char *a2)
2424 {
2425   return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2426 }
2427
2428 inline __vector unsigned char
2429 vec_lvsl (int a1, const volatile signed char *a2)
2430 {
2431   return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2432 }
2433
2434 inline __vector unsigned char
2435 vec_lvsl (int a1, const volatile unsigned short *a2)
2436 {
2437   return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2438 }
2439
2440 inline __vector unsigned char
2441 vec_lvsl (int a1, const volatile short *a2)
2442 {
2443   return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2444 }
2445
2446 inline __vector unsigned char
2447 vec_lvsl (int a1, const volatile unsigned int *a2)
2448 {
2449   return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2450 }
2451
2452 inline __vector unsigned char
2453 vec_lvsl (int a1, const volatile int *a2)
2454 {
2455   return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2456 }
2457
2458 inline __vector unsigned char
2459 vec_lvsl (int a1, const volatile unsigned long *a2)
2460 {
2461   return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2462 }
2463
2464 inline __vector unsigned char
2465 vec_lvsl (int a1, const volatile long *a2)
2466 {
2467   return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2468 }
2469
2470 inline __vector unsigned char
2471 vec_lvsl (int a1, const volatile float *a2)
2472 {
2473   return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2474 }
2475
2476 /* vec_lvsr */
2477
2478 inline __vector unsigned char
2479 vec_lvsr (int a1, const volatile unsigned char *a2)
2480 {
2481   return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2482 }
2483
2484 inline __vector unsigned char
2485 vec_lvsr (int a1, const volatile signed char *a2)
2486 {
2487   return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2488 }
2489
2490 inline __vector unsigned char
2491 vec_lvsr (int a1, const volatile unsigned short *a2)
2492 {
2493   return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2494 }
2495
2496 inline __vector unsigned char
2497 vec_lvsr (int a1, const volatile short *a2)
2498 {
2499   return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2500 }
2501
2502 inline __vector unsigned char
2503 vec_lvsr (int a1, const volatile unsigned int *a2)
2504 {
2505   return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2506 }
2507
2508 inline __vector unsigned char
2509 vec_lvsr (int a1, const volatile int *a2)
2510 {
2511   return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2512 }
2513
2514 inline __vector unsigned char
2515 vec_lvsr (int a1, const volatile unsigned long *a2)
2516 {
2517   return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2518 }
2519
2520 inline __vector unsigned char
2521 vec_lvsr (int a1, const volatile long *a2)
2522 {
2523   return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2524 }
2525
2526 inline __vector unsigned char
2527 vec_lvsr (int a1, const volatile float *a2)
2528 {
2529   return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2530 }
2531
2532 /* vec_madd */
2533
2534 inline __vector float
2535 vec_madd (__vector float a1, __vector float a2, __vector float a3)
2536 {
2537   return (__vector float) __builtin_altivec_vmaddfp ((__vector float) a1, (__vector float) a2, (__vector float) a3);
2538 }
2539
2540 /* vec_madds */
2541
2542 inline __vector signed short
2543 vec_madds (__vector signed short a1, __vector signed short a2, __vector signed short a3)
2544 {
2545   return (__vector signed short) __builtin_altivec_vmhaddshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
2546 }
2547
2548 /* vec_max */
2549
2550 inline __vector unsigned char
2551 vec_max (__vector bool char a1, __vector unsigned char a2)
2552 {
2553   return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2554 }
2555
2556 inline __vector unsigned char
2557 vec_max (__vector unsigned char a1, __vector bool char a2)
2558 {
2559   return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2560 }
2561
2562 inline __vector unsigned char
2563 vec_max (__vector unsigned char a1, __vector unsigned char a2)
2564 {
2565   return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2566 }
2567
2568 inline __vector signed char
2569 vec_max (__vector bool char a1, __vector signed char a2)
2570 {
2571   return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2572 }
2573
2574 inline __vector signed char
2575 vec_max (__vector signed char a1, __vector bool char a2)
2576 {
2577   return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2578 }
2579
2580 inline __vector signed char
2581 vec_max (__vector signed char a1, __vector signed char a2)
2582 {
2583   return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2584 }
2585
2586 inline __vector unsigned short
2587 vec_max (__vector bool short a1, __vector unsigned short a2)
2588 {
2589   return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2590 }
2591
2592 inline __vector unsigned short
2593 vec_max (__vector unsigned short a1, __vector bool short a2)
2594 {
2595   return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2596 }
2597
2598 inline __vector unsigned short
2599 vec_max (__vector unsigned short a1, __vector unsigned short a2)
2600 {
2601   return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2602 }
2603
2604 inline __vector signed short
2605 vec_max (__vector bool short a1, __vector signed short a2)
2606 {
2607   return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2608 }
2609
2610 inline __vector signed short
2611 vec_max (__vector signed short a1, __vector bool short a2)
2612 {
2613   return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2614 }
2615
2616 inline __vector signed short
2617 vec_max (__vector signed short a1, __vector signed short a2)
2618 {
2619   return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2620 }
2621
2622 inline __vector unsigned int
2623 vec_max (__vector bool int a1, __vector unsigned int a2)
2624 {
2625   return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2626 }
2627
2628 inline __vector unsigned int
2629 vec_max (__vector unsigned int a1, __vector bool int a2)
2630 {
2631   return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2632 }
2633
2634 inline __vector unsigned int
2635 vec_max (__vector unsigned int a1, __vector unsigned int a2)
2636 {
2637   return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2638 }
2639
2640 inline __vector signed int
2641 vec_max (__vector bool int a1, __vector signed int a2)
2642 {
2643   return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2644 }
2645
2646 inline __vector signed int
2647 vec_max (__vector signed int a1, __vector bool int a2)
2648 {
2649   return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2650 }
2651
2652 inline __vector signed int
2653 vec_max (__vector signed int a1, __vector signed int a2)
2654 {
2655   return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2656 }
2657
2658 inline __vector float
2659 vec_max (__vector float a1, __vector float a2)
2660 {
2661   return (__vector float) __builtin_altivec_vmaxfp ((__vector float) a1, (__vector float) a2);
2662 }
2663
2664 /* vec_vmaxfp */
2665
2666 inline __vector float
2667 vec_vmaxfp (__vector float a1, __vector float a2)
2668 {
2669   return (__vector float) __builtin_altivec_vmaxfp ((__vector float) a1, (__vector float) a2);
2670 }
2671
2672 /* vec_vmaxsw */
2673
2674 inline __vector signed int
2675 vec_vmaxsw (__vector bool int a1, __vector signed int a2)
2676 {
2677   return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2678 }
2679
2680 inline __vector signed int
2681 vec_vmaxsw (__vector signed int a1, __vector bool int a2)
2682 {
2683   return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2684 }
2685
2686 inline __vector signed int
2687 vec_vmaxsw (__vector signed int a1, __vector signed int a2)
2688 {
2689   return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2690 }
2691
2692 /* vec_vmaxuw */
2693
2694 inline __vector unsigned int
2695 vec_vmaxuw (__vector bool int a1, __vector unsigned int a2)
2696 {
2697   return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2698 }
2699
2700 inline __vector unsigned int
2701 vec_vmaxuw (__vector unsigned int a1, __vector bool int a2)
2702 {
2703   return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2704 }
2705
2706 inline __vector unsigned int
2707 vec_vmaxuw (__vector unsigned int a1, __vector unsigned int a2)
2708 {
2709   return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2710 }
2711
2712 /* vec_vmaxsh */
2713
2714 inline __vector signed short
2715 vec_vmaxsh (__vector bool short a1, __vector signed short a2)
2716 {
2717   return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2718 }
2719
2720 inline __vector signed short
2721 vec_vmaxsh (__vector signed short a1, __vector bool short a2)
2722 {
2723   return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2724 }
2725
2726 inline __vector signed short
2727 vec_vmaxsh (__vector signed short a1, __vector signed short a2)
2728 {
2729   return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2730 }
2731
2732 /* vec_vmaxuh */
2733
2734 inline __vector unsigned short
2735 vec_vmaxuh (__vector bool short a1, __vector unsigned short a2)
2736 {
2737   return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2738 }
2739
2740 inline __vector unsigned short
2741 vec_vmaxuh (__vector unsigned short a1, __vector bool short a2)
2742 {
2743   return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2744 }
2745
2746 inline __vector unsigned short
2747 vec_vmaxuh (__vector unsigned short a1, __vector unsigned short a2)
2748 {
2749   return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2750 }
2751
2752 /* vec_vmaxsb */
2753
2754 inline __vector signed char
2755 vec_vmaxsb (__vector bool char a1, __vector signed char a2)
2756 {
2757   return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2758 }
2759
2760 inline __vector signed char
2761 vec_vmaxsb (__vector signed char a1, __vector bool char a2)
2762 {
2763   return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2764 }
2765
2766 inline __vector signed char
2767 vec_vmaxsb (__vector signed char a1, __vector signed char a2)
2768 {
2769   return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2770 }
2771
2772 /* vec_vmaxub */
2773
2774 inline __vector unsigned char
2775 vec_vmaxub (__vector bool char a1, __vector unsigned char a2)
2776 {
2777   return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2778 }
2779
2780 inline __vector unsigned char
2781 vec_vmaxub (__vector unsigned char a1, __vector bool char a2)
2782 {
2783   return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2784 }
2785
2786 inline __vector unsigned char
2787 vec_vmaxub (__vector unsigned char a1, __vector unsigned char a2)
2788 {
2789   return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2790 }
2791
2792 /* vec_mergeh */
2793
2794 inline __vector bool char
2795 vec_mergeh (__vector bool char a1, __vector bool char a2)
2796 {
2797   return (__vector bool char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2798 }
2799
2800 inline __vector signed char
2801 vec_mergeh (__vector signed char a1, __vector signed char a2)
2802 {
2803   return (__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2804 }
2805
2806 inline __vector unsigned char
2807 vec_mergeh (__vector unsigned char a1, __vector unsigned char a2)
2808 {
2809   return (__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2810 }
2811
2812 inline __vector bool short
2813 vec_mergeh (__vector bool short a1, __vector bool short a2)
2814 {
2815   return (__vector bool short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2816 }
2817
2818 inline __vector pixel
2819 vec_mergeh (__vector pixel a1, __vector pixel a2)
2820 {
2821   return (__vector pixel) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2822 }
2823
2824 inline __vector signed short
2825 vec_mergeh (__vector signed short a1, __vector signed short a2)
2826 {
2827   return (__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2828 }
2829
2830 inline __vector unsigned short
2831 vec_mergeh (__vector unsigned short a1, __vector unsigned short a2)
2832 {
2833   return (__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2834 }
2835
2836 inline __vector float
2837 vec_mergeh (__vector float a1, __vector float a2)
2838 {
2839   return (__vector float) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2840 }
2841
2842 inline __vector bool int
2843 vec_mergeh (__vector bool int a1, __vector bool int a2)
2844 {
2845   return (__vector bool int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2846 }
2847
2848 inline __vector signed int
2849 vec_mergeh (__vector signed int a1, __vector signed int a2)
2850 {
2851   return (__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2852 }
2853
2854 inline __vector unsigned int
2855 vec_mergeh (__vector unsigned int a1, __vector unsigned int a2)
2856 {
2857   return (__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2858 }
2859
2860 /* vec_vmrghw */
2861
2862 inline __vector float
2863 vec_vmrghw (__vector float a1, __vector float a2)
2864 {
2865   return (__vector float) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2866 }
2867
2868 inline __vector bool int
2869 vec_vmrghw (__vector bool int a1, __vector bool int a2)
2870 {
2871   return (__vector bool int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2872 }
2873
2874 inline __vector signed int
2875 vec_vmrghw (__vector signed int a1, __vector signed int a2)
2876 {
2877   return (__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2878 }
2879
2880 inline __vector unsigned int
2881 vec_vmrghw (__vector unsigned int a1, __vector unsigned int a2)
2882 {
2883   return (__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2884 }
2885
2886 /* vec_vmrghh */
2887
2888 inline __vector bool short
2889 vec_vmrghh (__vector bool short a1, __vector bool short a2)
2890 {
2891   return (__vector bool short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2892 }
2893
2894 inline __vector signed short
2895 vec_vmrghh (__vector signed short a1, __vector signed short a2)
2896 {
2897   return (__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2898 }
2899
2900 inline __vector unsigned short
2901 vec_vmrghh (__vector unsigned short a1, __vector unsigned short a2)
2902 {
2903   return (__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2904 }
2905
2906 inline __vector pixel
2907 vec_vmrghh (__vector pixel a1, __vector pixel a2)
2908 {
2909   return (__vector pixel) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2910 }
2911
2912 /* vec_vmrghb */
2913
2914 inline __vector bool char
2915 vec_vmrghb (__vector bool char a1, __vector bool char a2)
2916 {
2917   return (__vector bool char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2918 }
2919
2920 inline __vector signed char
2921 vec_vmrghb (__vector signed char a1, __vector signed char a2)
2922 {
2923   return (__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2924 }
2925
2926 inline __vector unsigned char
2927 vec_vmrghb (__vector unsigned char a1, __vector unsigned char a2)
2928 {
2929   return (__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2930 }
2931
2932 /* vec_mergel */
2933
2934 inline __vector bool char
2935 vec_mergel (__vector bool char a1, __vector bool char a2)
2936 {
2937   return (__vector bool char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
2938 }
2939
2940 inline __vector signed char
2941 vec_mergel (__vector signed char a1, __vector signed char a2)
2942 {
2943   return (__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
2944 }
2945
2946 inline __vector unsigned char
2947 vec_mergel (__vector unsigned char a1, __vector unsigned char a2)
2948 {
2949   return (__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
2950 }
2951
2952 inline __vector bool short
2953 vec_mergel (__vector bool short a1, __vector bool short a2)
2954 {
2955   return (__vector bool short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
2956 }
2957
2958 inline __vector pixel
2959 vec_mergel (__vector pixel a1, __vector pixel a2)
2960 {
2961   return (__vector pixel) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
2962 }
2963
2964 inline __vector signed short
2965 vec_mergel (__vector signed short a1, __vector signed short a2)
2966 {
2967   return (__vector signed short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
2968 }
2969
2970 inline __vector unsigned short
2971 vec_mergel (__vector unsigned short a1, __vector unsigned short a2)
2972 {
2973   return (__vector unsigned short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
2974 }
2975
2976 inline __vector float
2977 vec_mergel (__vector float a1, __vector float a2)
2978 {
2979   return (__vector float) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
2980 }
2981
2982 inline __vector bool int
2983 vec_mergel (__vector bool int a1, __vector bool int a2)
2984 {
2985   return (__vector bool int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
2986 }
2987
2988 inline __vector signed int
2989 vec_mergel (__vector signed int a1, __vector signed int a2)
2990 {
2991   return (__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
2992 }
2993
2994 inline __vector unsigned int
2995 vec_mergel (__vector unsigned int a1, __vector unsigned int a2)
2996 {
2997   return (__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
2998 }
2999
3000 /* vec_vmrglw */
3001
3002 inline __vector float
3003 vec_vmrglw (__vector float a1, __vector float a2)
3004 {
3005   return (__vector float) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3006 }
3007
3008 inline __vector signed int
3009 vec_vmrglw (__vector signed int a1, __vector signed int a2)
3010 {
3011   return (__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3012 }
3013
3014 inline __vector unsigned int
3015 vec_vmrglw (__vector unsigned int a1, __vector unsigned int a2)
3016 {
3017   return (__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3018 }
3019
3020 inline __vector bool int
3021 vec_vmrglw (__vector bool int a1, __vector bool int a2)
3022 {
3023   return (__vector bool int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3024 }
3025
3026 /* vec_vmrglh */
3027
3028 inline __vector bool short
3029 vec_vmrglh (__vector bool short a1, __vector bool short a2)
3030 {
3031   return (__vector bool short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3032 }
3033
3034 inline __vector signed short
3035 vec_vmrglh (__vector signed short a1, __vector signed short a2)
3036 {
3037   return (__vector signed short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3038 }
3039
3040 inline __vector unsigned short
3041 vec_vmrglh (__vector unsigned short a1, __vector unsigned short a2)
3042 {
3043   return (__vector unsigned short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3044 }
3045
3046 inline __vector pixel
3047 vec_vmrglh (__vector pixel a1, __vector pixel a2)
3048 {
3049   return (__vector pixel) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3050 }
3051
3052 /* vec_vmrglb */
3053
3054 inline __vector bool char
3055 vec_vmrglb (__vector bool char a1, __vector bool char a2)
3056 {
3057   return (__vector bool char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
3058 }
3059
3060 inline __vector signed char
3061 vec_vmrglb (__vector signed char a1, __vector signed char a2)
3062 {
3063   return (__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
3064 }
3065
3066 inline __vector unsigned char
3067 vec_vmrglb (__vector unsigned char a1, __vector unsigned char a2)
3068 {
3069   return (__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
3070 }
3071
3072 /* vec_mfvscr */
3073
3074 inline __vector unsigned short
3075 vec_mfvscr (void)
3076 {
3077   return (__vector unsigned short) __builtin_altivec_mfvscr ();
3078 }
3079
3080 /* vec_min */
3081
3082 inline __vector unsigned char
3083 vec_min (__vector bool char a1, __vector unsigned char a2)
3084 {
3085   return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3086 }
3087
3088 inline __vector unsigned char
3089 vec_min (__vector unsigned char a1, __vector bool char a2)
3090 {
3091   return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3092 }
3093
3094 inline __vector unsigned char
3095 vec_min (__vector unsigned char a1, __vector unsigned char a2)
3096 {
3097   return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3098 }
3099
3100 inline __vector signed char
3101 vec_min (__vector bool char a1, __vector signed char a2)
3102 {
3103   return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3104 }
3105
3106 inline __vector signed char
3107 vec_min (__vector signed char a1, __vector bool char a2)
3108 {
3109   return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3110 }
3111
3112 inline __vector signed char
3113 vec_min (__vector signed char a1, __vector signed char a2)
3114 {
3115   return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3116 }
3117
3118 inline __vector unsigned short
3119 vec_min (__vector bool short a1, __vector unsigned short a2)
3120 {
3121   return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3122 }
3123
3124 inline __vector unsigned short
3125 vec_min (__vector unsigned short a1, __vector bool short a2)
3126 {
3127   return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3128 }
3129
3130 inline __vector unsigned short
3131 vec_min (__vector unsigned short a1, __vector unsigned short a2)
3132 {
3133   return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3134 }
3135
3136 inline __vector signed short
3137 vec_min (__vector bool short a1, __vector signed short a2)
3138 {
3139   return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3140 }
3141
3142 inline __vector signed short
3143 vec_min (__vector signed short a1, __vector bool short a2)
3144 {
3145   return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3146 }
3147
3148 inline __vector signed short
3149 vec_min (__vector signed short a1, __vector signed short a2)
3150 {
3151   return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3152 }
3153
3154 inline __vector unsigned int
3155 vec_min (__vector bool int a1, __vector unsigned int a2)
3156 {
3157   return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3158 }
3159
3160 inline __vector unsigned int
3161 vec_min (__vector unsigned int a1, __vector bool int a2)
3162 {
3163   return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3164 }
3165
3166 inline __vector unsigned int
3167 vec_min (__vector unsigned int a1, __vector unsigned int a2)
3168 {
3169   return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3170 }
3171
3172 inline __vector signed int
3173 vec_min (__vector bool int a1, __vector signed int a2)
3174 {
3175   return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3176 }
3177
3178 inline __vector signed int
3179 vec_min (__vector signed int a1, __vector bool int a2)
3180 {
3181   return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3182 }
3183
3184 inline __vector signed int
3185 vec_min (__vector signed int a1, __vector signed int a2)
3186 {
3187   return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3188 }
3189
3190 inline __vector float
3191 vec_min (__vector float a1, __vector float a2)
3192 {
3193   return (__vector float) __builtin_altivec_vminfp ((__vector float) a1, (__vector float) a2);
3194 }
3195
3196 /* vec_vminfp */
3197
3198 inline __vector float
3199 vec_vminfp (__vector float a1, __vector float a2)
3200 {
3201   return (__vector float) __builtin_altivec_vminfp ((__vector float) a1, (__vector float) a2);
3202 }
3203
3204 /* vec_vminsw */
3205
3206 inline __vector signed int
3207 vec_vminsw (__vector bool int a1, __vector signed int a2)
3208 {
3209   return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3210 }
3211
3212 inline __vector signed int
3213 vec_vminsw (__vector signed int a1, __vector bool int a2)
3214 {
3215   return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3216 }
3217
3218 inline __vector signed int
3219 vec_vminsw (__vector signed int a1, __vector signed int a2)
3220 {
3221   return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3222 }
3223
3224 /* vec_vminuw */
3225
3226 inline __vector unsigned int
3227 vec_vminuw (__vector bool int a1, __vector unsigned int a2)
3228 {
3229   return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3230 }
3231
3232 inline __vector unsigned int
3233 vec_vminuw (__vector unsigned int a1, __vector bool int a2)
3234 {
3235   return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3236 }
3237
3238 inline __vector unsigned int
3239 vec_vminuw (__vector unsigned int a1, __vector unsigned int a2)
3240 {
3241   return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3242 }
3243
3244 /* vec_vminsh */
3245
3246 inline __vector signed short
3247 vec_vminsh (__vector bool short a1, __vector signed short a2)
3248 {
3249   return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3250 }
3251
3252 inline __vector signed short
3253 vec_vminsh (__vector signed short a1, __vector bool short a2)
3254 {
3255   return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3256 }
3257
3258 inline __vector signed short
3259 vec_vminsh (__vector signed short a1, __vector signed short a2)
3260 {
3261   return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3262 }
3263
3264 /* vec_vminuh */
3265
3266 inline __vector unsigned short
3267 vec_vminuh (__vector bool short a1, __vector unsigned short a2)
3268 {
3269   return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3270 }
3271
3272 inline __vector unsigned short
3273 vec_vminuh (__vector unsigned short a1, __vector bool short a2)
3274 {
3275   return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3276 }
3277
3278 inline __vector unsigned short
3279 vec_vminuh (__vector unsigned short a1, __vector unsigned short a2)
3280 {
3281   return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3282 }
3283
3284 /* vec_vminsb */
3285
3286 inline __vector signed char
3287 vec_vminsb (__vector bool char a1, __vector signed char a2)
3288 {
3289   return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3290 }
3291
3292 inline __vector signed char
3293 vec_vminsb (__vector signed char a1, __vector bool char a2)
3294 {
3295   return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3296 }
3297
3298 inline __vector signed char
3299 vec_vminsb (__vector signed char a1, __vector signed char a2)
3300 {
3301   return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3302 }
3303
3304 /* vec_vminub */
3305
3306 inline __vector unsigned char
3307 vec_vminub (__vector bool char a1, __vector unsigned char a2)
3308 {
3309   return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3310 }
3311
3312 inline __vector unsigned char
3313 vec_vminub (__vector unsigned char a1, __vector bool char a2)
3314 {
3315   return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3316 }
3317
3318 inline __vector unsigned char
3319 vec_vminub (__vector unsigned char a1, __vector unsigned char a2)
3320 {
3321   return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3322 }
3323
3324 /* vec_mladd */
3325
3326 inline __vector signed short
3327 vec_mladd (__vector signed short a1, __vector signed short a2, __vector signed short a3)
3328 {
3329   return (__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
3330 }
3331
3332 inline __vector signed short
3333 vec_mladd (__vector signed short a1, __vector unsigned short a2, __vector unsigned short a3)
3334 {
3335   return (__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
3336 }
3337
3338 inline __vector signed short
3339 vec_mladd (__vector unsigned short a1, __vector signed short a2, __vector signed short a3)
3340 {
3341   return (__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
3342 }
3343
3344 inline __vector unsigned short
3345 vec_mladd (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned short a3)
3346 {
3347   return (__vector unsigned short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
3348 }
3349
3350 /* vec_mradds */
3351
3352 inline __vector signed short
3353 vec_mradds (__vector signed short a1, __vector signed short a2, __vector signed short a3)
3354 {
3355   return (__vector signed short) __builtin_altivec_vmhraddshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
3356 }
3357
3358 /* vec_msum */
3359
3360 inline __vector unsigned int
3361 vec_msum (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned int a3)
3362 {
3363   return (__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3);
3364 }
3365
3366 inline __vector signed int
3367 vec_msum (__vector signed char a1, __vector unsigned char a2, __vector signed int a3)
3368 {
3369   return (__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3);
3370 }
3371
3372 inline __vector unsigned int
3373 vec_msum (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3)
3374 {
3375   return (__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3376 }
3377
3378 inline __vector signed int
3379 vec_msum (__vector signed short a1, __vector signed short a2, __vector signed int a3)
3380 {
3381   return (__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3382 }
3383
3384 /* vec_vmsumshm */
3385
3386 inline __vector signed int
3387 vec_vmsumshm (__vector signed short a1, __vector signed short a2, __vector signed int a3)
3388 {
3389   return (__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3390 }
3391
3392 /* vec_vmsumuhm */
3393
3394 inline __vector unsigned int
3395 vec_vmsumuhm (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3)
3396 {
3397   return (__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3398 }
3399
3400 /* vec_vmsummbm */
3401
3402 inline __vector signed int
3403 vec_vmsummbm (__vector signed char a1, __vector unsigned char a2, __vector signed int a3)
3404 {
3405   return (__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3);
3406 }
3407
3408 /* vec_vmsumubm */
3409
3410 inline __vector unsigned int
3411 vec_vmsumubm (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned int a3)
3412 {
3413   return (__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3);
3414 }
3415
3416 /* vec_msums */
3417
3418 inline __vector unsigned int
3419 vec_msums (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3)
3420 {
3421   return (__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3422 }
3423
3424 inline __vector signed int
3425 vec_msums (__vector signed short a1, __vector signed short a2, __vector signed int a3)
3426 {
3427   return (__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3428 }
3429
3430 /* vec_vmsumshs */
3431
3432 inline __vector signed int
3433 vec_vmsumshs (__vector signed short a1, __vector signed short a2, __vector signed int a3)
3434 {
3435   return (__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3436 }
3437
3438 /* vec_vmsumuhs */
3439
3440 inline __vector unsigned int
3441 vec_vmsumuhs (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3)
3442 {
3443   return (__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3444 }
3445
3446 /* vec_mtvscr */
3447
3448 inline void
3449 vec_mtvscr (__vector signed int a1)
3450 {
3451   __builtin_altivec_mtvscr ((__vector signed int) a1);
3452 }
3453
3454 inline void
3455 vec_mtvscr (__vector unsigned int a1)
3456 {
3457   __builtin_altivec_mtvscr ((__vector signed int) a1);
3458 }
3459
3460 inline void
3461 vec_mtvscr (__vector bool int a1)
3462 {
3463   __builtin_altivec_mtvscr ((__vector signed int) a1);
3464 }
3465
3466 inline void
3467 vec_mtvscr (__vector signed short a1)
3468 {
3469   __builtin_altivec_mtvscr ((__vector signed int) a1);
3470 }
3471
3472 inline void
3473 vec_mtvscr (__vector unsigned short a1)
3474 {
3475   __builtin_altivec_mtvscr ((__vector signed int) a1);
3476 }
3477
3478 inline void
3479 vec_mtvscr (__vector bool short a1)
3480 {
3481   __builtin_altivec_mtvscr ((__vector signed int) a1);
3482 }
3483
3484 inline void
3485 vec_mtvscr (__vector pixel a1)
3486 {
3487   __builtin_altivec_mtvscr ((__vector signed int) a1);
3488 }
3489
3490 inline void
3491 vec_mtvscr (__vector signed char a1)
3492 {
3493   __builtin_altivec_mtvscr ((__vector signed int) a1);
3494 }
3495
3496 inline void
3497 vec_mtvscr (__vector unsigned char a1)
3498 {
3499   __builtin_altivec_mtvscr ((__vector signed int) a1);
3500 }
3501
3502 inline void
3503 vec_mtvscr (__vector bool char a1)
3504 {
3505   __builtin_altivec_mtvscr ((__vector signed int) a1);
3506 }
3507
3508 /* vec_mule */
3509
3510 inline __vector unsigned short
3511 vec_mule (__vector unsigned char a1, __vector unsigned char a2)
3512 {
3513   return (__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) a1, (__vector signed char) a2);
3514 }
3515
3516 inline __vector signed short
3517 vec_mule (__vector signed char a1, __vector signed char a2)
3518 {
3519   return (__vector signed short) __builtin_altivec_vmulesb ((__vector signed char) a1, (__vector signed char) a2);
3520 }
3521
3522 inline __vector unsigned int
3523 vec_mule (__vector unsigned short a1, __vector unsigned short a2)
3524 {
3525   return (__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) a1, (__vector signed short) a2);
3526 }
3527
3528 inline __vector signed int
3529 vec_mule (__vector signed short a1, __vector signed short a2)
3530 {
3531   return (__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) a1, (__vector signed short) a2);
3532 }
3533
3534 /* vec_vmulesh */
3535
3536 inline __vector signed int
3537 vec_vmulesh (__vector signed short a1, __vector signed short a2)
3538 {
3539   return (__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) a1, (__vector signed short) a2);
3540 }
3541
3542 /* vec_vmuleuh */
3543
3544 inline __vector unsigned int
3545 vec_vmuleuh (__vector unsigned short a1, __vector unsigned short a2)
3546 {
3547   return (__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) a1, (__vector signed short) a2);
3548 }
3549
3550 /* vec_vmulesb */
3551
3552 inline __vector signed short
3553 vec_vmulesb (__vector signed char a1, __vector signed char a2)
3554 {
3555   return (__vector signed short) __builtin_altivec_vmuleub ((__vector signed char) a1, (__vector signed char) a2);
3556 }
3557
3558 /* vec_vmuleub */
3559
3560 inline __vector unsigned short
3561 vec_vmuleub (__vector unsigned char a1, __vector unsigned char a2)
3562 {
3563   return (__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) a1, (__vector signed char) a2);
3564 }
3565
3566 /* vec_mulo */
3567
3568 inline __vector unsigned short
3569 vec_mulo (__vector unsigned char a1, __vector unsigned char a2)
3570 {
3571   return (__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) a1, (__vector signed char) a2);
3572 }
3573
3574 inline __vector signed short
3575 vec_mulo (__vector signed char a1, __vector signed char a2)
3576 {
3577   return (__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) a1, (__vector signed char) a2);
3578 }
3579
3580 inline __vector unsigned int
3581 vec_mulo (__vector unsigned short a1, __vector unsigned short a2)
3582 {
3583   return (__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) a1, (__vector signed short) a2);
3584 }
3585
3586 inline __vector signed int
3587 vec_mulo (__vector signed short a1, __vector signed short a2)
3588 {
3589   return (__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) a1, (__vector signed short) a2);
3590 }
3591
3592 /* vec_vmulosh */
3593
3594 inline __vector signed int
3595 vec_vmulosh (__vector signed short a1, __vector signed short a2)
3596 {
3597   return (__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) a1, (__vector signed short) a2);
3598 }
3599
3600 /* vec_vmulouh */
3601
3602 inline __vector unsigned int
3603 vec_vmulouh (__vector unsigned short a1, __vector unsigned short a2)
3604 {
3605   return (__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) a1, (__vector signed short) a2);
3606 }
3607
3608 /* vec_vmulosb */
3609
3610 inline __vector signed short
3611 vec_vmulosb (__vector signed char a1, __vector signed char a2)
3612 {
3613   return (__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) a1, (__vector signed char) a2);
3614 }
3615
3616 /* vec_vmuloub */
3617
3618 inline __vector unsigned short
3619 vec_vmuloub (__vector unsigned char a1, __vector unsigned char a2)
3620 {
3621   return (__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) a1, (__vector signed char) a2);
3622 }
3623
3624 /* vec_nmsub */
3625
3626 inline __vector float
3627 vec_nmsub (__vector float a1, __vector float a2, __vector float a3)
3628 {
3629   return (__vector float) __builtin_altivec_vnmsubfp ((__vector float) a1, (__vector float) a2, (__vector float) a3);
3630 }
3631
3632 /* vec_nor */
3633
3634 inline __vector float
3635 vec_nor (__vector float a1, __vector float a2)
3636 {
3637   return (__vector float) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3638 }
3639
3640 inline __vector signed int
3641 vec_nor (__vector signed int a1, __vector signed int a2)
3642 {
3643   return (__vector signed int) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3644 }
3645
3646 inline __vector unsigned int
3647 vec_nor (__vector unsigned int a1, __vector unsigned int a2)
3648 {
3649   return (__vector unsigned int) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3650 }
3651
3652 inline __vector bool int
3653 vec_nor (__vector bool int a1, __vector bool int a2)
3654 {
3655   return (__vector bool int) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3656 }
3657
3658 inline __vector signed short
3659 vec_nor (__vector signed short a1, __vector signed short a2)
3660 {
3661   return (__vector signed short) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3662 }
3663
3664 inline __vector unsigned short
3665 vec_nor (__vector unsigned short a1, __vector unsigned short a2)
3666 {
3667   return (__vector unsigned short) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3668 }
3669
3670 inline __vector bool short
3671 vec_nor (__vector bool short a1, __vector bool short a2)
3672 {
3673   return (__vector bool short) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3674 }
3675
3676 inline __vector signed char
3677 vec_nor (__vector signed char a1, __vector signed char a2)
3678 {
3679   return (__vector signed char) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3680 }
3681
3682 inline __vector unsigned char
3683 vec_nor (__vector unsigned char a1, __vector unsigned char a2)
3684 {
3685   return (__vector unsigned char) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3686 }
3687
3688 inline __vector bool char
3689 vec_nor (__vector bool char a1, __vector bool char a2)
3690 {
3691   return (__vector bool char) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3692 }
3693
3694 /* vec_or */
3695
3696 inline __vector float
3697 vec_or (__vector float a1, __vector float a2)
3698 {
3699   return (__vector float) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3700 }
3701
3702 inline __vector float
3703 vec_or (__vector float a1, __vector bool int a2)
3704 {
3705   return (__vector float) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3706 }
3707
3708 inline __vector float
3709 vec_or (__vector bool int a1, __vector float a2)
3710 {
3711   return (__vector float) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3712 }
3713
3714 inline __vector bool int
3715 vec_or (__vector bool int a1, __vector bool int a2)
3716 {
3717   return (__vector bool int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3718 }
3719
3720 inline __vector signed int
3721 vec_or (__vector bool int a1, __vector signed int a2)
3722 {
3723   return (__vector signed int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3724 }
3725
3726 inline __vector signed int
3727 vec_or (__vector signed int a1, __vector bool int a2)
3728 {
3729   return (__vector signed int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3730 }
3731
3732 inline __vector signed int
3733 vec_or (__vector signed int a1, __vector signed int a2)
3734 {
3735   return (__vector signed int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3736 }
3737
3738 inline __vector unsigned int
3739 vec_or (__vector bool int a1, __vector unsigned int a2)
3740 {
3741   return (__vector unsigned int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3742 }
3743
3744 inline __vector unsigned int
3745 vec_or (__vector unsigned int a1, __vector bool int a2)
3746 {
3747   return (__vector unsigned int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3748 }
3749
3750 inline __vector unsigned int
3751 vec_or (__vector unsigned int a1, __vector unsigned int a2)
3752 {
3753   return (__vector unsigned int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3754 }
3755
3756 inline __vector bool short
3757 vec_or (__vector bool short a1, __vector bool short a2)
3758 {
3759   return (__vector bool short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3760 }
3761
3762 inline __vector signed short
3763 vec_or (__vector bool short a1, __vector signed short a2)
3764 {
3765   return (__vector signed short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3766 }
3767
3768 inline __vector signed short
3769 vec_or (__vector signed short a1, __vector bool short a2)
3770 {
3771   return (__vector signed short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3772 }
3773
3774 inline __vector signed short
3775 vec_or (__vector signed short a1, __vector signed short a2)
3776 {
3777   return (__vector signed short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3778 }
3779
3780 inline __vector unsigned short
3781 vec_or (__vector bool short a1, __vector unsigned short a2)
3782 {
3783   return (__vector unsigned short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3784 }
3785
3786 inline __vector unsigned short
3787 vec_or (__vector unsigned short a1, __vector bool short a2)
3788 {
3789   return (__vector unsigned short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3790 }
3791
3792 inline __vector unsigned short
3793 vec_or (__vector unsigned short a1, __vector unsigned short a2)
3794 {
3795   return (__vector unsigned short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3796 }
3797
3798 inline __vector signed char
3799 vec_or (__vector bool char a1, __vector signed char a2)
3800 {
3801   return (__vector signed char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3802 }
3803
3804 inline __vector bool char
3805 vec_or (__vector bool char a1, __vector bool char a2)
3806 {
3807   return (__vector bool char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3808 }
3809
3810 inline __vector signed char
3811 vec_or (__vector signed char a1, __vector bool char a2)
3812 {
3813   return (__vector signed char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3814 }
3815
3816 inline __vector signed char
3817 vec_or (__vector signed char a1, __vector signed char a2)
3818 {
3819   return (__vector signed char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3820 }
3821
3822 inline __vector unsigned char
3823 vec_or (__vector bool char a1, __vector unsigned char a2)
3824 {
3825   return (__vector unsigned char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3826 }
3827
3828 inline __vector unsigned char
3829 vec_or (__vector unsigned char a1, __vector bool char a2)
3830 {
3831   return (__vector unsigned char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3832 }
3833
3834 inline __vector unsigned char
3835 vec_or (__vector unsigned char a1, __vector unsigned char a2)
3836 {
3837   return (__vector unsigned char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3838 }
3839
3840 /* vec_pack */
3841
3842 inline __vector signed char
3843 vec_pack (__vector signed short a1, __vector signed short a2)
3844 {
3845   return (__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3846 }
3847
3848 inline __vector unsigned char
3849 vec_pack (__vector unsigned short a1, __vector unsigned short a2)
3850 {
3851   return (__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3852 }
3853
3854 inline __vector bool char
3855 vec_pack (__vector bool short a1, __vector bool short a2)
3856 {
3857   return (__vector bool char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3858 }
3859
3860 inline __vector signed short
3861 vec_pack (__vector signed int a1, __vector signed int a2)
3862 {
3863   return (__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3864 }
3865
3866 inline __vector unsigned short
3867 vec_pack (__vector unsigned int a1, __vector unsigned int a2)
3868 {
3869   return (__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3870 }
3871
3872 inline __vector bool short
3873 vec_pack (__vector bool int a1, __vector bool int a2)
3874 {
3875   return (__vector bool short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3876 }
3877
3878 /* vec_vpkuwum */
3879
3880 inline __vector bool short
3881 vec_vpkuwum (__vector bool int a1, __vector bool int a2)
3882 {
3883   return (__vector bool short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3884 }
3885
3886 inline __vector signed short
3887 vec_vpkuwum (__vector signed int a1, __vector signed int a2)
3888 {
3889   return (__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3890 }
3891
3892 inline __vector unsigned short
3893 vec_vpkuwum (__vector unsigned int a1, __vector unsigned int a2)
3894 {
3895   return (__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3896 }
3897
3898 /* vec_vpkuhum */
3899
3900 inline __vector bool char
3901 vec_vpkuhum (__vector bool short a1, __vector bool short a2)
3902 {
3903   return (__vector bool char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3904 }
3905
3906 inline __vector signed char
3907 vec_vpkuhum (__vector signed short a1, __vector signed short a2)
3908 {
3909   return (__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3910 }
3911
3912 inline __vector unsigned char
3913 vec_vpkuhum (__vector unsigned short a1, __vector unsigned short a2)
3914 {
3915   return (__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3916 }
3917
3918 /* vec_packpx */
3919
3920 inline __vector pixel
3921 vec_packpx (__vector unsigned int a1, __vector unsigned int a2)
3922 {
3923   return (__vector pixel) __builtin_altivec_vpkpx ((__vector signed int) a1, (__vector signed int) a2);
3924 }
3925
3926 /* vec_packs */
3927
3928 inline __vector unsigned char
3929 vec_packs (__vector unsigned short a1, __vector unsigned short a2)
3930 {
3931   return (__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) a1, (__vector signed short) a2);
3932 }
3933
3934 inline __vector signed char
3935 vec_packs (__vector signed short a1, __vector signed short a2)
3936 {
3937   return (__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) a1, (__vector signed short) a2);
3938 }
3939
3940 inline __vector unsigned short
3941 vec_packs (__vector unsigned int a1, __vector unsigned int a2)
3942 {
3943   return (__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) a1, (__vector signed int) a2);
3944 }
3945
3946 inline __vector signed short
3947 vec_packs (__vector signed int a1, __vector signed int a2)
3948 {
3949   return (__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) a1, (__vector signed int) a2);
3950 }
3951
3952 /* vec_vpkswss */
3953
3954 inline __vector signed short
3955 vec_vpkswss (__vector signed int a1, __vector signed int a2)
3956 {
3957   return (__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) a1, (__vector signed int) a2);
3958 }
3959
3960 /* vec_vpkuwus */
3961
3962 inline __vector unsigned short
3963 vec_vpkuwus (__vector unsigned int a1, __vector unsigned int a2)
3964 {
3965   return (__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) a1, (__vector signed int) a2);
3966 }
3967
3968 /* vec_vpkshss */
3969
3970 inline __vector signed char
3971 vec_vpkshss (__vector signed short a1, __vector signed short a2)
3972 {
3973   return (__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) a1, (__vector signed short) a2);
3974 }
3975
3976 /* vec_vpkuhus */
3977
3978 inline __vector unsigned char
3979 vec_vpkuhus (__vector unsigned short a1, __vector unsigned short a2)
3980 {
3981   return (__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) a1, (__vector signed short) a2);
3982 }
3983
3984 /* vec_packsu */
3985
3986 inline __vector unsigned char
3987 vec_packsu (__vector unsigned short a1, __vector unsigned short a2)
3988 {
3989   return (__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) a1, (__vector signed short) a2);
3990 }
3991
3992 inline __vector unsigned char
3993 vec_packsu (__vector signed short a1, __vector signed short a2)
3994 {
3995   return (__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) a1, (__vector signed short) a2);
3996 }
3997
3998 inline __vector unsigned short
3999 vec_packsu (__vector unsigned int a1, __vector unsigned int a2)
4000 {
4001   return (__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) a1, (__vector signed int) a2);
4002 }
4003
4004 inline __vector unsigned short
4005 vec_packsu (__vector signed int a1, __vector signed int a2)
4006 {
4007   return (__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) a1, (__vector signed int) a2);
4008 }
4009
4010 /* vec_vpkswus */
4011
4012 inline __vector unsigned short
4013 vec_vpkswus (__vector signed int a1, __vector signed int a2)
4014 {
4015   return (__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) a1, (__vector signed int) a2);
4016 }
4017
4018 /* vec_vpkshus */
4019
4020 inline __vector unsigned char
4021 vec_vpkshus (__vector signed short a1, __vector signed short a2)
4022 {
4023   return (__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) a1, (__vector signed short) a2);
4024 }
4025
4026 /* vec_perm */
4027
4028 inline __vector float
4029 vec_perm (__vector float a1, __vector float a2, __vector unsigned char a3)
4030 {
4031   return (__vector float) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4032 }
4033
4034 inline __vector signed int
4035 vec_perm (__vector signed int a1, __vector signed int a2, __vector unsigned char a3)
4036 {
4037   return (__vector signed int) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4038 }
4039
4040 inline __vector unsigned int
4041 vec_perm (__vector unsigned int a1, __vector unsigned int a2, __vector unsigned char a3)
4042 {
4043   return (__vector unsigned int) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4044 }
4045
4046 inline __vector bool int
4047 vec_perm (__vector bool int a1, __vector bool int a2, __vector unsigned char a3)
4048 {
4049   return (__vector bool int) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4050 }
4051
4052 inline __vector signed short
4053 vec_perm (__vector signed short a1, __vector signed short a2, __vector unsigned char a3)
4054 {
4055   return (__vector signed short) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4056 }
4057
4058 inline __vector unsigned short
4059 vec_perm (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned char a3)
4060 {
4061   return (__vector unsigned short) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4062 }
4063
4064 inline __vector bool short
4065 vec_perm (__vector bool short a1, __vector bool short a2, __vector unsigned char a3)
4066 {
4067   return (__vector bool short) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4068 }
4069
4070 inline __vector pixel
4071 vec_perm (__vector pixel a1, __vector pixel a2, __vector unsigned char a3)
4072 {
4073   return (__vector pixel) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4074 }
4075
4076 inline __vector signed char
4077 vec_perm (__vector signed char a1, __vector signed char a2, __vector unsigned char a3)
4078 {
4079   return (__vector signed char) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4080 }
4081
4082 inline __vector unsigned char
4083 vec_perm (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned char a3)
4084 {
4085   return (__vector unsigned char) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4086 }
4087
4088 inline __vector bool char
4089 vec_perm (__vector bool char a1, __vector bool char a2, __vector unsigned char a3)
4090 {
4091   return (__vector bool char) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4092 }
4093
4094 /* vec_re */
4095
4096 inline __vector float
4097 vec_re (__vector float a1)
4098 {
4099   return (__vector float) __builtin_altivec_vrefp ((__vector float) a1);
4100 }
4101
4102 /* vec_rl */
4103
4104 inline __vector signed char
4105 vec_rl (__vector signed char a1, __vector unsigned char a2)
4106 {
4107   return (__vector signed char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2);
4108 }
4109
4110 inline __vector unsigned char
4111 vec_rl (__vector unsigned char a1, __vector unsigned char a2)
4112 {
4113   return (__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2);
4114 }
4115
4116 inline __vector signed short
4117 vec_rl (__vector signed short a1, __vector unsigned short a2)
4118 {
4119   return (__vector signed short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2);
4120 }
4121
4122 inline __vector unsigned short
4123 vec_rl (__vector unsigned short a1, __vector unsigned short a2)
4124 {
4125   return (__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2);
4126 }
4127
4128 inline __vector signed int
4129 vec_rl (__vector signed int a1, __vector unsigned int a2)
4130 {
4131   return (__vector signed int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2);
4132 }
4133
4134 inline __vector unsigned int
4135 vec_rl (__vector unsigned int a1, __vector unsigned int a2)
4136 {
4137   return (__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2);
4138 }
4139
4140 /* vec_vrlw */
4141
4142 inline __vector signed int
4143 vec_vrlw (__vector signed int a1, __vector unsigned int a2)
4144 {
4145   return (__vector signed int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2);
4146 }
4147
4148 inline __vector unsigned int
4149 vec_vrlw (__vector unsigned int a1, __vector unsigned int a2)
4150 {
4151   return (__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2);
4152 }
4153
4154 /* vec_vrlh */
4155
4156 inline __vector signed short
4157 vec_vrlh (__vector signed short a1, __vector unsigned short a2)
4158 {
4159   return (__vector signed short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2);
4160 }
4161
4162 inline __vector unsigned short
4163 vec_vrlh (__vector unsigned short a1, __vector unsigned short a2)
4164 {
4165   return (__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2);
4166 }
4167
4168 /* vec_vrlb */
4169
4170 inline __vector signed char
4171 vec_vrlb (__vector signed char a1, __vector unsigned char a2)
4172 {
4173   return (__vector signed char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2);
4174 }
4175
4176 inline __vector unsigned char
4177 vec_vrlb (__vector unsigned char a1, __vector unsigned char a2)
4178 {
4179   return (__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2);
4180 }
4181
4182 /* vec_round */
4183
4184 inline __vector float
4185 vec_round (__vector float a1)
4186 {
4187   return (__vector float) __builtin_altivec_vrfin ((__vector float) a1);
4188 }
4189
4190 /* vec_rsqrte */
4191
4192 inline __vector float
4193 vec_rsqrte (__vector float a1)
4194 {
4195   return (__vector float) __builtin_altivec_vrsqrtefp ((__vector float) a1);
4196 }
4197
4198 /* vec_sel */
4199
4200 inline __vector float
4201 vec_sel (__vector float a1, __vector float a2, __vector bool int a3)
4202 {
4203   return (__vector float) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4204 }
4205
4206 inline __vector float
4207 vec_sel (__vector float a1, __vector float a2, __vector unsigned int a3)
4208 {
4209   return (__vector float) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4210 }
4211
4212 inline __vector signed int
4213 vec_sel (__vector signed int a1, __vector signed int a2, __vector bool int a3)
4214 {
4215   return (__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4216 }
4217
4218 inline __vector signed int
4219 vec_sel (__vector signed int a1, __vector signed int a2, __vector unsigned int a3)
4220 {
4221   return (__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4222 }
4223
4224 inline __vector unsigned int
4225 vec_sel (__vector unsigned int a1, __vector unsigned int a2, __vector bool int a3)
4226 {
4227   return (__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4228 }
4229
4230 inline __vector unsigned int
4231 vec_sel (__vector unsigned int a1, __vector unsigned int a2, __vector unsigned int a3)
4232 {
4233   return (__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4234 }
4235
4236 inline __vector bool int
4237 vec_sel (__vector bool int a1, __vector bool int a2, __vector bool int a3)
4238 {
4239   return (__vector bool int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4240 }
4241
4242 inline __vector bool int
4243 vec_sel (__vector bool int a1, __vector bool int a2, __vector unsigned int a3)
4244 {
4245   return (__vector bool int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4246 }
4247
4248 inline __vector signed short
4249 vec_sel (__vector signed short a1, __vector signed short a2, __vector bool short a3)
4250 {
4251   return (__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4252 }
4253
4254 inline __vector signed short
4255 vec_sel (__vector signed short a1, __vector signed short a2, __vector unsigned short a3)
4256 {
4257   return (__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4258 }
4259
4260 inline __vector unsigned short
4261 vec_sel (__vector unsigned short a1, __vector unsigned short a2, __vector bool short a3)
4262 {
4263   return (__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4264 }
4265
4266 inline __vector unsigned short
4267 vec_sel (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned short a3)
4268 {
4269   return (__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4270 }
4271
4272 inline __vector bool short
4273 vec_sel (__vector bool short a1, __vector bool short a2, __vector bool short a3)
4274 {
4275   return (__vector bool short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4276 }
4277
4278 inline __vector bool short
4279 vec_sel (__vector bool short a1, __vector bool short a2, __vector unsigned short a3)
4280 {
4281   return (__vector bool short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4282 }
4283
4284 inline __vector signed char
4285 vec_sel (__vector signed char a1, __vector signed char a2, __vector bool char a3)
4286 {
4287   return (__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4288 }
4289
4290 inline __vector signed char
4291 vec_sel (__vector signed char a1, __vector signed char a2, __vector unsigned char a3)
4292 {
4293   return (__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4294 }
4295
4296 inline __vector unsigned char
4297 vec_sel (__vector unsigned char a1, __vector unsigned char a2, __vector bool char a3)
4298 {
4299   return (__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4300 }
4301
4302 inline __vector unsigned char
4303 vec_sel (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned char a3)
4304 {
4305   return (__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4306 }
4307
4308 inline __vector bool char
4309 vec_sel (__vector bool char a1, __vector bool char a2, __vector bool char a3)
4310 {
4311   return (__vector bool char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4312 }
4313
4314 inline __vector bool char
4315 vec_sel (__vector bool char a1, __vector bool char a2, __vector unsigned char a3)
4316 {
4317   return (__vector bool char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4318 }
4319
4320 /* vec_sl */
4321
4322 inline __vector signed char
4323 vec_sl (__vector signed char a1, __vector unsigned char a2)
4324 {
4325   return (__vector signed char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2);
4326 }
4327
4328 inline __vector unsigned char
4329 vec_sl (__vector unsigned char a1, __vector unsigned char a2)
4330 {
4331   return (__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2);
4332 }
4333
4334 inline __vector signed short
4335 vec_sl (__vector signed short a1, __vector unsigned short a2)
4336 {
4337   return (__vector signed short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2);
4338 }
4339
4340 inline __vector unsigned short
4341 vec_sl (__vector unsigned short a1, __vector unsigned short a2)
4342 {
4343   return (__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2);
4344 }
4345
4346 inline __vector signed int
4347 vec_sl (__vector signed int a1, __vector unsigned int a2)
4348 {
4349   return (__vector signed int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2);
4350 }
4351
4352 inline __vector unsigned int
4353 vec_sl (__vector unsigned int a1, __vector unsigned int a2)
4354 {
4355   return (__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2);
4356 }
4357
4358 /* vec_vslw */
4359
4360 inline __vector signed int
4361 vec_vslw (__vector signed int a1, __vector unsigned int a2)
4362 {
4363   return (__vector signed int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2);
4364 }
4365
4366 inline __vector unsigned int
4367 vec_vslw (__vector unsigned int a1, __vector unsigned int a2)
4368 {
4369   return (__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2);
4370 }
4371
4372 /* vec_vslh */
4373
4374 inline __vector signed short
4375 vec_vslh (__vector signed short a1, __vector unsigned short a2)
4376 {
4377   return (__vector signed short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2);
4378 }
4379
4380 inline __vector unsigned short
4381 vec_vslh (__vector unsigned short a1, __vector unsigned short a2)
4382 {
4383   return (__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2);
4384 }
4385
4386 /* vec_vslb */
4387
4388 inline __vector signed char
4389 vec_vslb (__vector signed char a1, __vector unsigned char a2)
4390 {
4391   return (__vector signed char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2);
4392 }
4393
4394 inline __vector unsigned char
4395 vec_vslb (__vector unsigned char a1, __vector unsigned char a2)
4396 {
4397   return (__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2);
4398 }
4399
4400 /* vec_sld */
4401
4402 inline __vector float
4403 vec_sld (__vector float a1, __vector float a2, const int a3)
4404 {
4405   return (__vector float) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4406 }
4407
4408 inline __vector signed int
4409 vec_sld (__vector signed int a1, __vector signed int a2, const int a3)
4410 {
4411   return (__vector signed int) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4412 }
4413
4414 inline __vector unsigned int
4415 vec_sld (__vector unsigned int a1, __vector unsigned int a2, const int a3)
4416 {
4417   return (__vector unsigned int) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4418 }
4419
4420 inline __vector bool int
4421 vec_sld (__vector bool int a1, __vector bool int a2, const int a3)
4422 {
4423   return (__vector bool int) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4424 }
4425
4426 inline __vector signed short
4427 vec_sld (__vector signed short a1, __vector signed short a2, const int a3)
4428 {
4429   return (__vector signed short) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4430 }
4431
4432 inline __vector unsigned short
4433 vec_sld (__vector unsigned short a1, __vector unsigned short a2, const int a3)
4434 {
4435   return (__vector unsigned short) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4436 }
4437
4438 inline __vector bool short
4439 vec_sld (__vector bool short a1, __vector bool short a2, const int a3)
4440 {
4441   return (__vector bool short) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4442 }
4443
4444 inline __vector pixel
4445 vec_sld (__vector pixel a1, __vector pixel a2, const int a3)
4446 {
4447   return (__vector pixel) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4448 }
4449
4450 inline __vector signed char
4451 vec_sld (__vector signed char a1, __vector signed char a2, const int a3)
4452 {
4453   return (__vector signed char) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4454 }
4455
4456 inline __vector unsigned char
4457 vec_sld (__vector unsigned char a1, __vector unsigned char a2, const int a3)
4458 {
4459   return (__vector unsigned char) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4460 }
4461
4462 inline __vector bool char
4463 vec_sld (__vector bool char a1, __vector bool char a2, const int a3)
4464 {
4465   return (__vector bool char) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4466 }
4467
4468 /* vec_sll */
4469
4470 inline __vector signed int
4471 vec_sll (__vector signed int a1, __vector unsigned int a2)
4472 {
4473   return (__vector signed int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4474 }
4475
4476 inline __vector signed int
4477 vec_sll (__vector signed int a1, __vector unsigned short a2)
4478 {
4479   return (__vector signed int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4480 }
4481
4482 inline __vector signed int
4483 vec_sll (__vector signed int a1, __vector unsigned char a2)
4484 {
4485   return (__vector signed int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4486 }
4487
4488 inline __vector unsigned int
4489 vec_sll (__vector unsigned int a1, __vector unsigned int a2)
4490 {
4491   return (__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4492 }
4493
4494 inline __vector unsigned int
4495 vec_sll (__vector unsigned int a1, __vector unsigned short a2)
4496 {
4497   return (__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4498 }
4499
4500 inline __vector unsigned int
4501 vec_sll (__vector unsigned int a1, __vector unsigned char a2)
4502 {
4503   return (__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4504 }
4505
4506 inline __vector bool int
4507 vec_sll (__vector bool int a1, __vector unsigned int a2)
4508 {
4509   return (__vector bool int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4510 }
4511
4512 inline __vector bool int
4513 vec_sll (__vector bool int a1, __vector unsigned short a2)
4514 {
4515   return (__vector bool int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4516 }
4517
4518 inline __vector bool int
4519 vec_sll (__vector bool int a1, __vector unsigned char a2)
4520 {
4521   return (__vector bool int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4522 }
4523
4524 inline __vector signed short
4525 vec_sll (__vector signed short a1, __vector unsigned int a2)
4526 {
4527   return (__vector signed short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4528 }
4529
4530 inline __vector signed short
4531 vec_sll (__vector signed short a1, __vector unsigned short a2)
4532 {
4533   return (__vector signed short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4534 }
4535
4536 inline __vector signed short
4537 vec_sll (__vector signed short a1, __vector unsigned char a2)
4538 {
4539   return (__vector signed short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4540 }
4541
4542 inline __vector unsigned short
4543 vec_sll (__vector unsigned short a1, __vector unsigned int a2)
4544 {
4545   return (__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4546 }
4547
4548 inline __vector unsigned short
4549 vec_sll (__vector unsigned short a1, __vector unsigned short a2)
4550 {
4551   return (__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4552 }
4553
4554 inline __vector unsigned short
4555 vec_sll (__vector unsigned short a1, __vector unsigned char a2)
4556 {
4557   return (__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4558 }
4559
4560 inline __vector bool short
4561 vec_sll (__vector bool short a1, __vector unsigned int a2)
4562 {
4563   return (__vector bool short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4564 }
4565
4566 inline __vector bool short
4567 vec_sll (__vector bool short a1, __vector unsigned short a2)
4568 {
4569   return (__vector bool short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4570 }
4571
4572 inline __vector bool short
4573 vec_sll (__vector bool short a1, __vector unsigned char a2)
4574 {
4575   return (__vector bool short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4576 }
4577
4578 inline __vector pixel
4579 vec_sll (__vector pixel a1, __vector unsigned int a2)
4580 {
4581   return (__vector pixel) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4582 }
4583
4584 inline __vector pixel
4585 vec_sll (__vector pixel a1, __vector unsigned short a2)
4586 {
4587   return (__vector pixel) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4588 }
4589
4590 inline __vector pixel
4591 vec_sll (__vector pixel a1, __vector unsigned char a2)
4592 {
4593   return (__vector pixel) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4594 }
4595
4596 inline __vector signed char
4597 vec_sll (__vector signed char a1, __vector unsigned int a2)
4598 {
4599   return (__vector signed char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4600 }
4601
4602 inline __vector signed char
4603 vec_sll (__vector signed char a1, __vector unsigned short a2)
4604 {
4605   return (__vector signed char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4606 }
4607
4608 inline __vector signed char
4609 vec_sll (__vector signed char a1, __vector unsigned char a2)
4610 {
4611   return (__vector signed char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4612 }
4613
4614 inline __vector unsigned char
4615 vec_sll (__vector unsigned char a1, __vector unsigned int a2)
4616 {
4617   return (__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4618 }
4619
4620 inline __vector unsigned char
4621 vec_sll (__vector unsigned char a1, __vector unsigned short a2)
4622 {
4623   return (__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4624 }
4625
4626 inline __vector unsigned char
4627 vec_sll (__vector unsigned char a1, __vector unsigned char a2)
4628 {
4629   return (__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4630 }
4631
4632 inline __vector bool char
4633 vec_sll (__vector bool char a1, __vector unsigned int a2)
4634 {
4635   return (__vector bool char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4636 }
4637
4638 inline __vector bool char
4639 vec_sll (__vector bool char a1, __vector unsigned short a2)
4640 {
4641   return (__vector bool char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4642 }
4643
4644 inline __vector bool char
4645 vec_sll (__vector bool char a1, __vector unsigned char a2)
4646 {
4647   return (__vector bool char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4648 }
4649
4650 /* vec_slo */
4651
4652 inline __vector float
4653 vec_slo (__vector float a1, __vector signed char a2)
4654 {
4655   return (__vector float) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4656 }
4657
4658 inline __vector float
4659 vec_slo (__vector float a1, __vector unsigned char a2)
4660 {
4661   return (__vector float) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4662 }
4663
4664 inline __vector signed int
4665 vec_slo (__vector signed int a1, __vector signed char a2)
4666 {
4667   return (__vector signed int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4668 }
4669
4670 inline __vector signed int
4671 vec_slo (__vector signed int a1, __vector unsigned char a2)
4672 {
4673   return (__vector signed int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4674 }
4675
4676 inline __vector unsigned int
4677 vec_slo (__vector unsigned int a1, __vector signed char a2)
4678 {
4679   return (__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4680 }
4681
4682 inline __vector unsigned int
4683 vec_slo (__vector unsigned int a1, __vector unsigned char a2)
4684 {
4685   return (__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4686 }
4687
4688 inline __vector signed short
4689 vec_slo (__vector signed short a1, __vector signed char a2)
4690 {
4691   return (__vector signed short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4692 }
4693
4694 inline __vector signed short
4695 vec_slo (__vector signed short a1, __vector unsigned char a2)
4696 {
4697   return (__vector signed short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4698 }
4699
4700 inline __vector unsigned short
4701 vec_slo (__vector unsigned short a1, __vector signed char a2)
4702 {
4703   return (__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4704 }
4705
4706 inline __vector unsigned short
4707 vec_slo (__vector unsigned short a1, __vector unsigned char a2)
4708 {
4709   return (__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4710 }
4711
4712 inline __vector pixel
4713 vec_slo (__vector pixel a1, __vector signed char a2)
4714 {
4715   return (__vector pixel) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4716 }
4717
4718 inline __vector pixel
4719 vec_slo (__vector pixel a1, __vector unsigned char a2)
4720 {
4721   return (__vector pixel) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4722 }
4723
4724 inline __vector signed char
4725 vec_slo (__vector signed char a1, __vector signed char a2)
4726 {
4727   return (__vector signed char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4728 }
4729
4730 inline __vector signed char
4731 vec_slo (__vector signed char a1, __vector unsigned char a2)
4732 {
4733   return (__vector signed char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4734 }
4735
4736 inline __vector unsigned char
4737 vec_slo (__vector unsigned char a1, __vector signed char a2)
4738 {
4739   return (__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4740 }
4741
4742 inline __vector unsigned char
4743 vec_slo (__vector unsigned char a1, __vector unsigned char a2)
4744 {
4745   return (__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4746 }
4747
4748 /* vec_splat */
4749
4750 inline __vector signed char
4751 vec_splat (__vector signed char a1, const int a2)
4752 {
4753   return (__vector signed char) __builtin_altivec_vspltb ((__vector signed char) a1,  a2);
4754 }
4755
4756 inline __vector unsigned char
4757 vec_splat (__vector unsigned char a1, const int a2)
4758 {
4759   return (__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) a1,  a2);
4760 }
4761
4762 inline __vector bool char
4763 vec_splat (__vector bool char a1, const int a2)
4764 {
4765   return (__vector bool char) __builtin_altivec_vspltb ((__vector signed char) a1,  a2);
4766 }
4767
4768 inline __vector signed short
4769 vec_splat (__vector signed short a1, const int a2)
4770 {
4771   return (__vector signed short) __builtin_altivec_vsplth ((__vector signed short) a1,  a2);
4772 }
4773
4774 inline __vector unsigned short
4775 vec_splat (__vector unsigned short a1, const int a2)
4776 {
4777   return (__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) a1,  a2);
4778 }
4779
4780 inline __vector bool short
4781 vec_splat (__vector bool short a1, const int a2)
4782 {
4783   return (__vector bool short) __builtin_altivec_vsplth ((__vector signed short) a1,  a2);
4784 }
4785
4786 inline __vector pixel
4787 vec_splat (__vector pixel a1, const int a2)
4788 {
4789   return (__vector pixel) __builtin_altivec_vsplth ((__vector signed short) a1,  a2);
4790 }
4791
4792 inline __vector float
4793 vec_splat (__vector float a1, const int a2)
4794 {
4795   return (__vector float) __builtin_altivec_vspltw ((__vector signed int) a1,  a2);
4796 }
4797
4798 inline __vector signed int
4799 vec_splat (__vector signed int a1, const int a2)
4800 {
4801   return (__vector signed int) __builtin_altivec_vspltw ((__vector signed int) a1,  a2);
4802 }
4803
4804 inline __vector unsigned int
4805 vec_splat (__vector unsigned int a1, const int a2)
4806 {
4807   return (__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) a1,  a2);
4808 }
4809
4810 inline __vector bool int
4811 vec_splat (__vector bool int a1, const int a2)
4812 {
4813   return (__vector bool int) __builtin_altivec_vspltw ((__vector signed int) a1,  a2);
4814 }
4815
4816 /* vec_vspltw */
4817
4818 inline __vector float
4819 vec_vspltw (__vector float a1, const int a2)
4820 {
4821   return (__vector float) __builtin_altivec_vspltw ((__vector signed int) a1,  a2);
4822 }
4823
4824 inline __vector signed int
4825 vec_vspltw (__vector signed int a1, const int a2)
4826 {
4827   return (__vector signed int) __builtin_altivec_vspltw ((__vector signed int) a1,  a2);
4828 }
4829
4830 inline __vector unsigned int
4831 vec_vspltw (__vector unsigned int a1, const int a2)
4832 {
4833   return (__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) a1,  a2);
4834 }
4835
4836 inline __vector bool int
4837 vec_vspltw (__vector bool int a1, const int a2)
4838 {
4839   return (__vector bool int) __builtin_altivec_vspltw ((__vector signed int) a1,  a2);
4840 }
4841
4842 /* vec_vsplth */
4843
4844 inline __vector bool short
4845 vec_vsplth (__vector bool short a1, const int a2)
4846 {
4847   return (__vector bool short) __builtin_altivec_vsplth ((__vector signed short) a1,  a2);
4848 }
4849
4850 inline __vector signed short
4851 vec_vsplth (__vector signed short a1, const int a2)
4852 {
4853   return (__vector signed short) __builtin_altivec_vsplth ((__vector signed short) a1,  a2);
4854 }
4855
4856 inline __vector unsigned short
4857 vec_vsplth (__vector unsigned short a1, const int a2)
4858 {
4859   return (__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) a1,  a2);
4860 }
4861
4862 inline __vector pixel
4863 vec_vsplth (__vector pixel a1, const int a2)
4864 {
4865   return (__vector pixel) __builtin_altivec_vsplth ((__vector signed short) a1,  a2);
4866 }
4867
4868 /* vec_vspltb */
4869
4870 inline __vector signed char
4871 vec_vspltb (__vector signed char a1, const int a2)
4872 {
4873   return (__vector signed char) __builtin_altivec_vspltb ((__vector signed char) a1,  a2);
4874 }
4875
4876 inline __vector unsigned char
4877 vec_vspltb (__vector unsigned char a1, const int a2)
4878 {
4879   return (__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) a1,  a2);
4880 }
4881
4882 inline __vector bool char
4883 vec_vspltb (__vector bool char a1, const int a2)
4884 {
4885   return (__vector bool char) __builtin_altivec_vspltb ((__vector signed char) a1,  a2);
4886 }
4887
4888 /* vec_splat_s8 */
4889
4890 inline __vector signed char
4891 vec_splat_s8 (const int a1)
4892 {
4893   return (__vector signed char) __builtin_altivec_vspltisb (a1);
4894 }
4895
4896 /* vec_splat_s16 */
4897
4898 inline __vector signed short
4899 vec_splat_s16 (const int a1)
4900 {
4901   return (__vector signed short) __builtin_altivec_vspltish (a1);
4902 }
4903
4904 /* vec_splat_s32 */
4905
4906 inline __vector signed int
4907 vec_splat_s32 (const int a1)
4908 {
4909   return (__vector signed int) __builtin_altivec_vspltisw (a1);
4910 }
4911
4912 /* vec_splat_u8 */
4913
4914 inline __vector unsigned char
4915 vec_splat_u8 (const int a1)
4916 {
4917   return (__vector unsigned char) __builtin_altivec_vspltisb (a1);
4918 }
4919
4920 /* vec_splat_u16 */
4921
4922 inline __vector unsigned short
4923 vec_splat_u16 (const int a1)
4924 {
4925   return (__vector unsigned short) __builtin_altivec_vspltish (a1);
4926 }
4927
4928 /* vec_splat_u32 */
4929
4930 inline __vector unsigned int
4931 vec_splat_u32 (const int a1)
4932 {
4933   return (__vector unsigned int) __builtin_altivec_vspltisw (a1);
4934 }
4935
4936 /* vec_sr */
4937
4938 inline __vector signed char
4939 vec_sr (__vector signed char a1, __vector unsigned char a2)
4940 {
4941   return (__vector signed char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2);
4942 }
4943
4944 inline __vector unsigned char
4945 vec_sr (__vector unsigned char a1, __vector unsigned char a2)
4946 {
4947   return (__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2);
4948 }
4949
4950 inline __vector signed short
4951 vec_sr (__vector signed short a1, __vector unsigned short a2)
4952 {
4953   return (__vector signed short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2);
4954 }
4955
4956 inline __vector unsigned short
4957 vec_sr (__vector unsigned short a1, __vector unsigned short a2)
4958 {
4959   return (__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2);
4960 }
4961
4962 inline __vector signed int
4963 vec_sr (__vector signed int a1, __vector unsigned int a2)
4964 {
4965   return (__vector signed int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2);
4966 }
4967
4968 inline __vector unsigned int
4969 vec_sr (__vector unsigned int a1, __vector unsigned int a2)
4970 {
4971   return (__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2);
4972 }
4973
4974 /* vec_vsrw */
4975
4976 inline __vector signed int
4977 vec_vsrw (__vector signed int a1, __vector unsigned int a2)
4978 {
4979   return (__vector signed int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2);
4980 }
4981
4982 inline __vector unsigned int
4983 vec_vsrw (__vector unsigned int a1, __vector unsigned int a2)
4984 {
4985   return (__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2);
4986 }
4987
4988 /* vec_vsrh */
4989
4990 inline __vector signed short
4991 vec_vsrh (__vector signed short a1, __vector unsigned short a2)
4992 {
4993   return (__vector signed short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2);
4994 }
4995
4996 inline __vector unsigned short
4997 vec_vsrh (__vector unsigned short a1, __vector unsigned short a2)
4998 {
4999   return (__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2);
5000 }
5001
5002 /* vec_vsrb */
5003
5004 inline __vector signed char
5005 vec_vsrb (__vector signed char a1, __vector unsigned char a2)
5006 {
5007   return (__vector signed char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2);
5008 }
5009
5010 inline __vector unsigned char
5011 vec_vsrb (__vector unsigned char a1, __vector unsigned char a2)
5012 {
5013   return (__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2);
5014 }
5015
5016 /* vec_sra */
5017
5018 inline __vector signed char
5019 vec_sra (__vector signed char a1, __vector unsigned char a2)
5020 {
5021   return (__vector signed char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2);
5022 }
5023
5024 inline __vector unsigned char
5025 vec_sra (__vector unsigned char a1, __vector unsigned char a2)
5026 {
5027   return (__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2);
5028 }
5029
5030 inline __vector signed short
5031 vec_sra (__vector signed short a1, __vector unsigned short a2)
5032 {
5033   return (__vector signed short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2);
5034 }
5035
5036 inline __vector unsigned short
5037 vec_sra (__vector unsigned short a1, __vector unsigned short a2)
5038 {
5039   return (__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2);
5040 }
5041
5042 inline __vector signed int
5043 vec_sra (__vector signed int a1, __vector unsigned int a2)
5044 {
5045   return (__vector signed int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2);
5046 }
5047
5048 inline __vector unsigned int
5049 vec_sra (__vector unsigned int a1, __vector unsigned int a2)
5050 {
5051   return (__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2);
5052 }
5053
5054 /* vec_vsraw */
5055
5056 inline __vector signed int
5057 vec_vsraw (__vector signed int a1, __vector unsigned int a2)
5058 {
5059   return (__vector signed int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2);
5060 }
5061
5062 inline __vector unsigned int
5063 vec_vsraw (__vector unsigned int a1, __vector unsigned int a2)
5064 {
5065   return (__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2);
5066 }
5067
5068 /* vec_vsrah */
5069
5070 inline __vector signed short
5071 vec_vsrah (__vector signed short a1, __vector unsigned short a2)
5072 {
5073   return (__vector signed short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2);
5074 }
5075
5076 inline __vector unsigned short
5077 vec_vsrah (__vector unsigned short a1, __vector unsigned short a2)
5078 {
5079   return (__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2);
5080 }
5081
5082 /* vec_vsrab */
5083
5084 inline __vector signed char
5085 vec_vsrab (__vector signed char a1, __vector unsigned char a2)
5086 {
5087   return (__vector signed char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2);
5088 }
5089
5090 inline __vector unsigned char
5091 vec_vsrab (__vector unsigned char a1, __vector unsigned char a2)
5092 {
5093   return (__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2);
5094 }
5095
5096 /* vec_srl */
5097
5098 inline __vector signed int
5099 vec_srl (__vector signed int a1, __vector unsigned int a2)
5100 {
5101   return (__vector signed int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5102 }
5103
5104 inline __vector signed int
5105 vec_srl (__vector signed int a1, __vector unsigned short a2)
5106 {
5107   return (__vector signed int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5108 }
5109
5110 inline __vector signed int
5111 vec_srl (__vector signed int a1, __vector unsigned char a2)
5112 {
5113   return (__vector signed int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5114 }
5115
5116 inline __vector unsigned int
5117 vec_srl (__vector unsigned int a1, __vector unsigned int a2)
5118 {
5119   return (__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5120 }
5121
5122 inline __vector unsigned int
5123 vec_srl (__vector unsigned int a1, __vector unsigned short a2)
5124 {
5125   return (__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5126 }
5127
5128 inline __vector unsigned int
5129 vec_srl (__vector unsigned int a1, __vector unsigned char a2)
5130 {
5131   return (__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5132 }
5133
5134 inline __vector bool int
5135 vec_srl (__vector bool int a1, __vector unsigned int a2)
5136 {
5137   return (__vector bool int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5138 }
5139
5140 inline __vector bool int
5141 vec_srl (__vector bool int a1, __vector unsigned short a2)
5142 {
5143   return (__vector bool int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5144 }
5145
5146 inline __vector bool int
5147 vec_srl (__vector bool int a1, __vector unsigned char a2)
5148 {
5149   return (__vector bool int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5150 }
5151
5152 inline __vector signed short
5153 vec_srl (__vector signed short a1, __vector unsigned int a2)
5154 {
5155   return (__vector signed short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5156 }
5157
5158 inline __vector signed short
5159 vec_srl (__vector signed short a1, __vector unsigned short a2)
5160 {
5161   return (__vector signed short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5162 }
5163
5164 inline __vector signed short
5165 vec_srl (__vector signed short a1, __vector unsigned char a2)
5166 {
5167   return (__vector signed short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5168 }
5169
5170 inline __vector unsigned short
5171 vec_srl (__vector unsigned short a1, __vector unsigned int a2)
5172 {
5173   return (__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5174 }
5175
5176 inline __vector unsigned short
5177 vec_srl (__vector unsigned short a1, __vector unsigned short a2)
5178 {
5179   return (__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5180 }
5181
5182 inline __vector unsigned short
5183 vec_srl (__vector unsigned short a1, __vector unsigned char a2)
5184 {
5185   return (__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5186 }
5187
5188 inline __vector bool short
5189 vec_srl (__vector bool short a1, __vector unsigned int a2)
5190 {
5191   return (__vector bool short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5192 }
5193
5194 inline __vector bool short
5195 vec_srl (__vector bool short a1, __vector unsigned short a2)
5196 {
5197   return (__vector bool short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5198 }
5199
5200 inline __vector bool short
5201 vec_srl (__vector bool short a1, __vector unsigned char a2)
5202 {
5203   return (__vector bool short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5204 }
5205
5206 inline __vector pixel
5207 vec_srl (__vector pixel a1, __vector unsigned int a2)
5208 {
5209   return (__vector pixel) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5210 }
5211
5212 inline __vector pixel
5213 vec_srl (__vector pixel a1, __vector unsigned short a2)
5214 {
5215   return (__vector pixel) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5216 }
5217
5218 inline __vector pixel
5219 vec_srl (__vector pixel a1, __vector unsigned char a2)
5220 {
5221   return (__vector pixel) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5222 }
5223
5224 inline __vector signed char
5225 vec_srl (__vector signed char a1, __vector unsigned int a2)
5226 {
5227   return (__vector signed char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5228 }
5229
5230 inline __vector signed char
5231 vec_srl (__vector signed char a1, __vector unsigned short a2)
5232 {
5233   return (__vector signed char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5234 }
5235
5236 inline __vector signed char
5237 vec_srl (__vector signed char a1, __vector unsigned char a2)
5238 {
5239   return (__vector signed char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5240 }
5241
5242 inline __vector unsigned char
5243 vec_srl (__vector unsigned char a1, __vector unsigned int a2)
5244 {
5245   return (__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5246 }
5247
5248 inline __vector unsigned char
5249 vec_srl (__vector unsigned char a1, __vector unsigned short a2)
5250 {
5251   return (__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5252 }
5253
5254 inline __vector unsigned char
5255 vec_srl (__vector unsigned char a1, __vector unsigned char a2)
5256 {
5257   return (__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5258 }
5259
5260 inline __vector bool char
5261 vec_srl (__vector bool char a1, __vector unsigned int a2)
5262 {
5263   return (__vector bool char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5264 }
5265
5266 inline __vector bool char
5267 vec_srl (__vector bool char a1, __vector unsigned short a2)
5268 {
5269   return (__vector bool char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5270 }
5271
5272 inline __vector bool char
5273 vec_srl (__vector bool char a1, __vector unsigned char a2)
5274 {
5275   return (__vector bool char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5276 }
5277
5278 /* vec_sro */
5279
5280 inline __vector float
5281 vec_sro (__vector float a1, __vector signed char a2)
5282 {
5283   return (__vector float) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5284 }
5285
5286 inline __vector float
5287 vec_sro (__vector float a1, __vector unsigned char a2)
5288 {
5289   return (__vector float) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5290 }
5291
5292 inline __vector signed int
5293 vec_sro (__vector signed int a1, __vector signed char a2)
5294 {
5295   return (__vector signed int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5296 }
5297
5298 inline __vector signed int
5299 vec_sro (__vector signed int a1, __vector unsigned char a2)
5300 {
5301   return (__vector signed int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5302 }
5303
5304 inline __vector unsigned int
5305 vec_sro (__vector unsigned int a1, __vector signed char a2)
5306 {
5307   return (__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5308 }
5309
5310 inline __vector unsigned int
5311 vec_sro (__vector unsigned int a1, __vector unsigned char a2)
5312 {
5313   return (__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5314 }
5315
5316 inline __vector signed short
5317 vec_sro (__vector signed short a1, __vector signed char a2)
5318 {
5319   return (__vector signed short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5320 }
5321
5322 inline __vector signed short
5323 vec_sro (__vector signed short a1, __vector unsigned char a2)
5324 {
5325   return (__vector signed short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5326 }
5327
5328 inline __vector unsigned short
5329 vec_sro (__vector unsigned short a1, __vector signed char a2)
5330 {
5331   return (__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5332 }
5333
5334 inline __vector unsigned short
5335 vec_sro (__vector unsigned short a1, __vector unsigned char a2)
5336 {
5337   return (__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5338 }
5339
5340 inline __vector pixel
5341 vec_sro (__vector pixel a1, __vector signed char a2)
5342 {
5343   return (__vector pixel) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5344 }
5345
5346 inline __vector pixel
5347 vec_sro (__vector pixel a1, __vector unsigned char a2)
5348 {
5349   return (__vector pixel) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5350 }
5351
5352 inline __vector signed char
5353 vec_sro (__vector signed char a1, __vector signed char a2)
5354 {
5355   return (__vector signed char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5356 }
5357
5358 inline __vector signed char
5359 vec_sro (__vector signed char a1, __vector unsigned char a2)
5360 {
5361   return (__vector signed char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5362 }
5363
5364 inline __vector unsigned char
5365 vec_sro (__vector unsigned char a1, __vector signed char a2)
5366 {
5367   return (__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5368 }
5369
5370 inline __vector unsigned char
5371 vec_sro (__vector unsigned char a1, __vector unsigned char a2)
5372 {
5373   return (__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5374 }
5375
5376 /* vec_st */
5377
5378 inline void
5379 vec_st (__vector float a1, int a2, __vector float *a3)
5380 {
5381   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5382 }
5383
5384 inline void
5385 vec_st (__vector float a1, int a2, float *a3)
5386 {
5387   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5388 }
5389
5390 inline void
5391 vec_st (__vector signed int a1, int a2, __vector signed int *a3)
5392 {
5393   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5394 }
5395
5396 inline void
5397 vec_st (__vector signed int a1, int a2, int *a3)
5398 {
5399   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5400 }
5401
5402 inline void
5403 vec_st (__vector unsigned int a1, int a2, __vector unsigned int *a3)
5404 {
5405   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5406 }
5407
5408 inline void
5409 vec_st (__vector unsigned int a1, int a2, unsigned int *a3)
5410 {
5411   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5412 }
5413
5414 inline void
5415 vec_st (__vector bool int a1, int a2, __vector bool int *a3)
5416 {
5417   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5418 }
5419
5420 inline void
5421 vec_st (__vector bool int a1, int a2, unsigned int *a3)
5422 {
5423   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5424 }
5425
5426 inline void
5427 vec_st (__vector bool int a1, int a2, int *a3)
5428 {
5429   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5430 }
5431
5432 inline void
5433 vec_st (__vector signed short a1, int a2, __vector signed short *a3)
5434 {
5435   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5436 }
5437
5438 inline void
5439 vec_st (__vector signed short a1, int a2, short *a3)
5440 {
5441   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5442 }
5443
5444 inline void
5445 vec_st (__vector unsigned short a1, int a2, __vector unsigned short *a3)
5446 {
5447   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5448 }
5449
5450 inline void
5451 vec_st (__vector unsigned short a1, int a2, unsigned short *a3)
5452 {
5453   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5454 }
5455
5456 inline void
5457 vec_st (__vector bool short a1, int a2, __vector bool short *a3)
5458 {
5459   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5460 }
5461
5462 inline void
5463 vec_st (__vector bool short a1, int a2, unsigned short *a3)
5464 {
5465   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5466 }
5467
5468 inline void
5469 vec_st (__vector pixel a1, int a2, __vector pixel *a3)
5470 {
5471   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5472 }
5473
5474 inline void
5475 vec_st (__vector pixel a1, int a2, unsigned short *a3)
5476 {
5477   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5478 }
5479
5480 inline void
5481 vec_st (__vector pixel a1, int a2, short *a3)
5482 {
5483   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5484 }
5485
5486 inline void
5487 vec_st (__vector bool short a1, int a2, short *a3)
5488 {
5489   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5490 }
5491
5492 inline void
5493 vec_st (__vector signed char a1, int a2, __vector signed char *a3)
5494 {
5495   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5496 }
5497
5498 inline void
5499 vec_st (__vector signed char a1, int a2, signed char *a3)
5500 {
5501   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5502 }
5503
5504 inline void
5505 vec_st (__vector unsigned char a1, int a2, __vector unsigned char *a3)
5506 {
5507   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5508 }
5509
5510 inline void
5511 vec_st (__vector unsigned char a1, int a2, unsigned char *a3)
5512 {
5513   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5514 }
5515
5516 inline void
5517 vec_st (__vector bool char a1, int a2, __vector bool char *a3)
5518 {
5519   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5520 }
5521
5522 inline void
5523 vec_st (__vector bool char a1, int a2, unsigned char *a3)
5524 {
5525   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5526 }
5527
5528 inline void
5529 vec_st (__vector bool char a1, int a2, signed char *a3)
5530 {
5531   __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5532 }
5533
5534 /* vec_ste */
5535
5536 inline void
5537 vec_ste (__vector signed char a1, int a2, signed char *a3)
5538 {
5539   __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5540 }
5541
5542 inline void
5543 vec_ste (__vector unsigned char a1, int a2, unsigned char *a3)
5544 {
5545   __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5546 }
5547
5548 inline void
5549 vec_ste (__vector bool char a1, int a2, signed char *a3)
5550 {
5551   __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5552 }
5553
5554 inline void
5555 vec_ste (__vector bool char a1, int a2, unsigned char *a3)
5556 {
5557   __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5558 }
5559
5560 inline void
5561 vec_ste (__vector signed short a1, int a2, short *a3)
5562 {
5563   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5564 }
5565
5566 inline void
5567 vec_ste (__vector unsigned short a1, int a2, unsigned short *a3)
5568 {
5569   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5570 }
5571
5572 inline void
5573 vec_ste (__vector bool short a1, int a2, short *a3)
5574 {
5575   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5576 }
5577
5578 inline void
5579 vec_ste (__vector bool short a1, int a2, unsigned short *a3)
5580 {
5581   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5582 }
5583
5584 inline void
5585 vec_ste (__vector pixel a1, int a2, short *a3)
5586 {
5587   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5588 }
5589
5590 inline void
5591 vec_ste (__vector pixel a1, int a2, unsigned short *a3)
5592 {
5593   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5594 }
5595
5596 inline void
5597 vec_ste (__vector float a1, int a2, float *a3)
5598 {
5599   __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5600 }
5601
5602 inline void
5603 vec_ste (__vector signed int a1, int a2, int *a3)
5604 {
5605   __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5606 }
5607
5608 inline void
5609 vec_ste (__vector unsigned int a1, int a2, unsigned int *a3)
5610 {
5611   __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5612 }
5613
5614 inline void
5615 vec_ste (__vector bool int a1, int a2, int *a3)
5616 {
5617   __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5618 }
5619
5620 inline void
5621 vec_ste (__vector bool int a1, int a2, unsigned int *a3)
5622 {
5623   __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5624 }
5625
5626 /* vec_stvewx */
5627
5628 inline void
5629 vec_stvewx (__vector float a1, int a2, float *a3)
5630 {
5631   __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5632 }
5633
5634 inline void
5635 vec_stvewx (__vector signed int a1, int a2, int *a3)
5636 {
5637   __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5638 }
5639
5640 inline void
5641 vec_stvewx (__vector unsigned int a1, int a2, unsigned int *a3)
5642 {
5643   __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5644 }
5645
5646 inline void
5647 vec_stvewx (__vector bool int a1, int a2, int *a3)
5648 {
5649   __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5650 }
5651
5652 inline void
5653 vec_stvewx (__vector bool int a1, int a2, unsigned int *a3)
5654 {
5655   __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5656 }
5657
5658 /* vec_stvehx */
5659
5660 inline void
5661 vec_stvehx (__vector signed short a1, int a2, short *a3)
5662 {
5663   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5664 }
5665
5666 inline void
5667 vec_stvehx (__vector unsigned short a1, int a2, unsigned short *a3)
5668 {
5669   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5670 }
5671
5672 inline void
5673 vec_stvehx (__vector bool short a1, int a2, short *a3)
5674 {
5675   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5676 }
5677
5678 inline void
5679 vec_stvehx (__vector bool short a1, int a2, unsigned short *a3)
5680 {
5681   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5682 }
5683
5684 inline void
5685 vec_stvehx (__vector pixel a1, int a2, short *a3)
5686 {
5687   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5688 }
5689
5690 inline void
5691 vec_stvehx (__vector pixel a1, int a2, unsigned short *a3)
5692 {
5693   __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5694 }
5695
5696 /* vec_stvebx */
5697
5698 inline void
5699 vec_stvebx (__vector signed char a1, int a2, signed char *a3)
5700 {
5701   __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5702 }
5703
5704 inline void
5705 vec_stvebx (__vector unsigned char a1, int a2, unsigned char *a3)
5706 {
5707   __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5708 }
5709
5710 inline void
5711 vec_stvebx (__vector bool char a1, int a2, signed char *a3)
5712 {
5713   __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5714 }
5715
5716 inline void
5717 vec_stvebx (__vector bool char a1, int a2, unsigned char *a3)
5718 {
5719   __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5720 }
5721
5722 /* vec_stl */
5723
5724 inline void
5725 vec_stl (__vector float a1, int a2, __vector float *a3)
5726 {
5727   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5728 }
5729
5730 inline void
5731 vec_stl (__vector float a1, int a2, float *a3)
5732 {
5733   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5734 }
5735
5736 inline void
5737 vec_stl (__vector signed int a1, int a2, __vector signed int *a3)
5738 {
5739   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5740 }
5741
5742 inline void
5743 vec_stl (__vector signed int a1, int a2, int *a3)
5744 {
5745   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5746 }
5747
5748 inline void
5749 vec_stl (__vector unsigned int a1, int a2, __vector unsigned int *a3)
5750 {
5751   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5752 }
5753
5754 inline void
5755 vec_stl (__vector unsigned int a1, int a2, unsigned int *a3)
5756 {
5757   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5758 }
5759
5760 inline void
5761 vec_stl (__vector bool int a1, int a2, __vector bool int *a3)
5762 {
5763   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5764 }
5765
5766 inline void
5767 vec_stl (__vector bool int a1, int a2, unsigned int *a3)
5768 {
5769   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5770 }
5771
5772 inline void
5773 vec_stl (__vector bool int a1, int a2, int *a3)
5774 {
5775   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5776 }
5777
5778 inline void
5779 vec_stl (__vector signed short a1, int a2, __vector signed short *a3)
5780 {
5781   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5782 }
5783
5784 inline void
5785 vec_stl (__vector signed short a1, int a2, short *a3)
5786 {
5787   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5788 }
5789
5790 inline void
5791 vec_stl (__vector unsigned short a1, int a2, __vector unsigned short *a3)
5792 {
5793   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5794 }
5795
5796 inline void
5797 vec_stl (__vector unsigned short a1, int a2, unsigned short *a3)
5798 {
5799   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5800 }
5801
5802 inline void
5803 vec_stl (__vector bool short a1, int a2, __vector bool short *a3)
5804 {
5805   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5806 }
5807
5808 inline void
5809 vec_stl (__vector bool short a1, int a2, unsigned short *a3)
5810 {
5811   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5812 }
5813
5814 inline void
5815 vec_stl (__vector bool short a1, int a2, short *a3)
5816 {
5817   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5818 }
5819
5820 inline void
5821 vec_stl (__vector pixel a1, int a2, __vector pixel *a3)
5822 {
5823   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5824 }
5825
5826 inline void
5827 vec_stl (__vector pixel a1, int a2, unsigned short *a3)
5828 {
5829   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5830 }
5831
5832 inline void
5833 vec_stl (__vector pixel a1, int a2, short *a3)
5834 {
5835   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5836 }
5837
5838 inline void
5839 vec_stl (__vector signed char a1, int a2, __vector signed char *a3)
5840 {
5841   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5842 }
5843
5844 inline void
5845 vec_stl (__vector signed char a1, int a2, signed char *a3)
5846 {
5847   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5848 }
5849
5850 inline void
5851 vec_stl (__vector unsigned char a1, int a2, __vector unsigned char *a3)
5852 {
5853   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5854 }
5855
5856 inline void
5857 vec_stl (__vector unsigned char a1, int a2, unsigned char *a3)
5858 {
5859   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5860 }
5861
5862 inline void
5863 vec_stl (__vector bool char a1, int a2, __vector bool char *a3)
5864 {
5865   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5866 }
5867
5868 inline void
5869 vec_stl (__vector bool char a1, int a2, unsigned char *a3)
5870 {
5871   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5872 }
5873
5874 inline void
5875 vec_stl (__vector bool char a1, int a2, signed char *a3)
5876 {
5877   __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5878 }
5879
5880 /* vec_sub */
5881
5882 inline __vector signed char
5883 vec_sub (__vector bool char a1, __vector signed char a2)
5884 {
5885   return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5886 }
5887
5888 inline __vector signed char
5889 vec_sub (__vector signed char a1, __vector bool char a2)
5890 {
5891   return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5892 }
5893
5894 inline __vector signed char
5895 vec_sub (__vector signed char a1, __vector signed char a2)
5896 {
5897   return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5898 }
5899
5900 inline __vector unsigned char
5901 vec_sub (__vector bool char a1, __vector unsigned char a2)
5902 {
5903   return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5904 }
5905
5906 inline __vector unsigned char
5907 vec_sub (__vector unsigned char a1, __vector bool char a2)
5908 {
5909   return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5910 }
5911
5912 inline __vector unsigned char
5913 vec_sub (__vector unsigned char a1, __vector unsigned char a2)
5914 {
5915   return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5916 }
5917
5918 inline __vector signed short
5919 vec_sub (__vector bool short a1, __vector signed short a2)
5920 {
5921   return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
5922 }
5923
5924 inline __vector signed short
5925 vec_sub (__vector signed short a1, __vector bool short a2)
5926 {
5927   return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
5928 }
5929
5930 inline __vector signed short
5931 vec_sub (__vector signed short a1, __vector signed short a2)
5932 {
5933   return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
5934 }
5935
5936 inline __vector unsigned short
5937 vec_sub (__vector bool short a1, __vector unsigned short a2)
5938 {
5939   return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
5940 }
5941
5942 inline __vector unsigned short
5943 vec_sub (__vector unsigned short a1, __vector bool short a2)
5944 {
5945   return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
5946 }
5947
5948 inline __vector unsigned short
5949 vec_sub (__vector unsigned short a1, __vector unsigned short a2)
5950 {
5951   return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
5952 }
5953
5954 inline __vector signed int
5955 vec_sub (__vector bool int a1, __vector signed int a2)
5956 {
5957   return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
5958 }
5959
5960 inline __vector signed int
5961 vec_sub (__vector signed int a1, __vector bool int a2)
5962 {
5963   return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
5964 }
5965
5966 inline __vector signed int
5967 vec_sub (__vector signed int a1, __vector signed int a2)
5968 {
5969   return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
5970 }
5971
5972 inline __vector unsigned int
5973 vec_sub (__vector bool int a1, __vector unsigned int a2)
5974 {
5975   return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
5976 }
5977
5978 inline __vector unsigned int
5979 vec_sub (__vector unsigned int a1, __vector bool int a2)
5980 {
5981   return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
5982 }
5983
5984 inline __vector unsigned int
5985 vec_sub (__vector unsigned int a1, __vector unsigned int a2)
5986 {
5987   return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
5988 }
5989
5990 inline __vector float
5991 vec_sub (__vector float a1, __vector float a2)
5992 {
5993   return (__vector float) __builtin_altivec_vsubfp ((__vector float) a1, (__vector float) a2);
5994 }
5995
5996 /* vec_vsubfp */
5997
5998 inline __vector float
5999 vec_vsubfp (__vector float a1, __vector float a2)
6000 {
6001   return (__vector float) __builtin_altivec_vsubfp ((__vector float) a1, (__vector float) a2);
6002 }
6003
6004 /* vec_vsubuwm */
6005
6006 inline __vector signed int
6007 vec_vsubuwm (__vector bool int a1, __vector signed int a2)
6008 {
6009   return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6010 }
6011
6012 inline __vector signed int
6013 vec_vsubuwm (__vector signed int a1, __vector bool int a2)
6014 {
6015   return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6016 }
6017
6018 inline __vector signed int
6019 vec_vsubuwm (__vector signed int a1, __vector signed int a2)
6020 {
6021   return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6022 }
6023
6024 inline __vector unsigned int
6025 vec_vsubuwm (__vector bool int a1, __vector unsigned int a2)
6026 {
6027   return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6028 }
6029
6030 inline __vector unsigned int
6031 vec_vsubuwm (__vector unsigned int a1, __vector bool int a2)
6032 {
6033   return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6034 }
6035
6036 inline __vector unsigned int
6037 vec_vsubuwm (__vector unsigned int a1, __vector unsigned int a2)
6038 {
6039   return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6040 }
6041
6042 /* vec_vsubuhm */
6043
6044 inline __vector signed short
6045 vec_vsubuhm (__vector bool short a1, __vector signed short a2)
6046 {
6047   return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6048 }
6049
6050 inline __vector signed short
6051 vec_vsubuhm (__vector signed short a1, __vector bool short a2)
6052 {
6053   return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6054 }
6055
6056 inline __vector signed short
6057 vec_vsubuhm (__vector signed short a1, __vector signed short a2)
6058 {
6059   return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6060 }
6061
6062 inline __vector unsigned short
6063 vec_vsubuhm (__vector bool short a1, __vector unsigned short a2)
6064 {
6065   return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6066 }
6067
6068 inline __vector unsigned short
6069 vec_vsubuhm (__vector unsigned short a1, __vector bool short a2)
6070 {
6071   return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6072 }
6073
6074 inline __vector unsigned short
6075 vec_vsubuhm (__vector unsigned short a1, __vector unsigned short a2)
6076 {
6077   return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6078 }
6079
6080 /* vec_vsububm */
6081
6082 inline __vector signed char
6083 vec_vsububm (__vector bool char a1, __vector signed char a2)
6084 {
6085   return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6086 }
6087
6088 inline __vector signed char
6089 vec_vsububm (__vector signed char a1, __vector bool char a2)
6090 {
6091   return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6092 }
6093
6094 inline __vector signed char
6095 vec_vsububm (__vector signed char a1, __vector signed char a2)
6096 {
6097   return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6098 }
6099
6100 inline __vector unsigned char
6101 vec_vsububm (__vector bool char a1, __vector unsigned char a2)
6102 {
6103   return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6104 }
6105
6106 inline __vector unsigned char
6107 vec_vsububm (__vector unsigned char a1, __vector bool char a2)
6108 {
6109   return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6110 }
6111
6112 inline __vector unsigned char
6113 vec_vsububm (__vector unsigned char a1, __vector unsigned char a2)
6114 {
6115   return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6116 }
6117
6118 /* vec_subc */
6119
6120 inline __vector unsigned int
6121 vec_subc (__vector unsigned int a1, __vector unsigned int a2)
6122 {
6123   return (__vector unsigned int) __builtin_altivec_vsubcuw ((__vector signed int) a1, (__vector signed int) a2);
6124 }
6125
6126 /* vec_subs */
6127
6128 inline __vector unsigned char
6129 vec_subs (__vector bool char a1, __vector unsigned char a2)
6130 {
6131   return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6132 }
6133
6134 inline __vector unsigned char
6135 vec_subs (__vector unsigned char a1, __vector bool char a2)
6136 {
6137   return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6138 }
6139
6140 inline __vector unsigned char
6141 vec_subs (__vector unsigned char a1, __vector unsigned char a2)
6142 {
6143   return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6144 }
6145
6146 inline __vector signed char
6147 vec_subs (__vector bool char a1, __vector signed char a2)
6148 {
6149   return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6150 }
6151
6152 inline __vector signed char
6153 vec_subs (__vector signed char a1, __vector bool char a2)
6154 {
6155   return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6156 }
6157
6158 inline __vector signed char
6159 vec_subs (__vector signed char a1, __vector signed char a2)
6160 {
6161   return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6162 }
6163
6164 inline __vector unsigned short
6165 vec_subs (__vector bool short a1, __vector unsigned short a2)
6166 {
6167   return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6168 }
6169
6170 inline __vector unsigned short
6171 vec_subs (__vector unsigned short a1, __vector bool short a2)
6172 {
6173   return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6174 }
6175
6176 inline __vector unsigned short
6177 vec_subs (__vector unsigned short a1, __vector unsigned short a2)
6178 {
6179   return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6180 }
6181
6182 inline __vector signed short
6183 vec_subs (__vector bool short a1, __vector signed short a2)
6184 {
6185   return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6186 }
6187
6188 inline __vector signed short
6189 vec_subs (__vector signed short a1, __vector bool short a2)
6190 {
6191   return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6192 }
6193
6194 inline __vector signed short
6195 vec_subs (__vector signed short a1, __vector signed short a2)
6196 {
6197   return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6198 }
6199
6200 inline __vector unsigned int
6201 vec_subs (__vector bool int a1, __vector unsigned int a2)
6202 {
6203   return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6204 }
6205
6206 inline __vector unsigned int
6207 vec_subs (__vector unsigned int a1, __vector bool int a2)
6208 {
6209   return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6210 }
6211
6212 inline __vector unsigned int
6213 vec_subs (__vector unsigned int a1, __vector unsigned int a2)
6214 {
6215   return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6216 }
6217
6218 inline __vector signed int
6219 vec_subs (__vector bool int a1, __vector signed int a2)
6220 {
6221   return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6222 }
6223
6224 inline __vector signed int
6225 vec_subs (__vector signed int a1, __vector bool int a2)
6226 {
6227   return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6228 }
6229
6230 inline __vector signed int
6231 vec_subs (__vector signed int a1, __vector signed int a2)
6232 {
6233   return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6234 }
6235
6236 /* vec_vsubsws */
6237
6238 inline __vector signed int
6239 vec_vsubsws (__vector bool int a1, __vector signed int a2)
6240 {
6241   return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6242 }
6243
6244 inline __vector signed int
6245 vec_vsubsws (__vector signed int a1, __vector bool int a2)
6246 {
6247   return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6248 }
6249
6250 inline __vector signed int
6251 vec_vsubsws (__vector signed int a1, __vector signed int a2)
6252 {
6253   return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6254 }
6255
6256 /* vec_vsubuws */
6257
6258 inline __vector unsigned int
6259 vec_vsubuws (__vector bool int a1, __vector unsigned int a2)
6260 {
6261   return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6262 }
6263
6264 inline __vector unsigned int
6265 vec_vsubuws (__vector unsigned int a1, __vector bool int a2)
6266 {
6267   return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6268 }
6269
6270 inline __vector unsigned int
6271 vec_vsubuws (__vector unsigned int a1, __vector unsigned int a2)
6272 {
6273   return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6274 }
6275
6276 /* vec_vsubshs */
6277
6278 inline __vector signed short
6279 vec_vsubshs (__vector bool short a1, __vector signed short a2)
6280 {
6281   return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6282 }
6283
6284 inline __vector signed short
6285 vec_vsubshs (__vector signed short a1, __vector bool short a2)
6286 {
6287   return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6288 }
6289
6290 inline __vector signed short
6291 vec_vsubshs (__vector signed short a1, __vector signed short a2)
6292 {
6293   return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6294 }
6295
6296 /* vec_vsubuhs */
6297
6298 inline __vector unsigned short
6299 vec_vsubuhs (__vector bool short a1, __vector unsigned short a2)
6300 {
6301   return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6302 }
6303
6304 inline __vector unsigned short
6305 vec_vsubuhs (__vector unsigned short a1, __vector bool short a2)
6306 {
6307   return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6308 }
6309
6310 inline __vector unsigned short
6311 vec_vsubuhs (__vector unsigned short a1, __vector unsigned short a2)
6312 {
6313   return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6314 }
6315
6316 /* vec_vsubsbs */
6317
6318 inline __vector signed char
6319 vec_vsubsbs (__vector bool char a1, __vector signed char a2)
6320 {
6321   return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6322 }
6323
6324 inline __vector signed char
6325 vec_vsubsbs (__vector signed char a1, __vector bool char a2)
6326 {
6327   return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6328 }
6329
6330 inline __vector signed char
6331 vec_vsubsbs (__vector signed char a1, __vector signed char a2)
6332 {
6333   return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6334 }
6335
6336 /* vec_vsububs */
6337
6338 inline __vector unsigned char
6339 vec_vsububs (__vector bool char a1, __vector unsigned char a2)
6340 {
6341   return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6342 }
6343
6344 inline __vector unsigned char
6345 vec_vsububs (__vector unsigned char a1, __vector bool char a2)
6346 {
6347   return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6348 }
6349
6350 inline __vector unsigned char
6351 vec_vsububs (__vector unsigned char a1, __vector unsigned char a2)
6352 {
6353   return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6354 }
6355
6356 /* vec_sum4s */
6357
6358 inline __vector unsigned int
6359 vec_sum4s (__vector unsigned char a1, __vector unsigned int a2)
6360 {
6361   return (__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) a1, (__vector signed int) a2);
6362 }
6363
6364 inline __vector signed int
6365 vec_sum4s (__vector signed char a1, __vector signed int a2)
6366 {
6367   return (__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) a1, (__vector signed int) a2);
6368 }
6369
6370 inline __vector signed int
6371 vec_sum4s (__vector signed short a1, __vector signed int a2)
6372 {
6373   return (__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) a1, (__vector signed int) a2);
6374 }
6375
6376 /* vec_vsum4shs */
6377
6378 inline __vector signed int
6379 vec_vsum4shs (__vector signed short a1, __vector signed int a2)
6380 {
6381   return (__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) a1, (__vector signed int) a2);
6382 }
6383
6384 /* vec_vsum4sbs */
6385
6386 inline __vector signed int
6387 vec_vsum4sbs (__vector signed char a1, __vector signed int a2)
6388 {
6389   return (__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) a1, (__vector signed int) a2);
6390 }
6391
6392 /* vec_vsum4ubs */
6393
6394 inline __vector unsigned int
6395 vec_vsum4ubs (__vector unsigned char a1, __vector unsigned int a2)
6396 {
6397   return (__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) a1, (__vector signed int) a2);
6398 }
6399
6400 /* vec_sum2s */
6401
6402 inline __vector signed int
6403 vec_sum2s (__vector signed int a1, __vector signed int a2)
6404 {
6405   return (__vector signed int) __builtin_altivec_vsum2sws ((__vector signed int) a1, (__vector signed int) a2);
6406 }
6407
6408 /* vec_sums */
6409
6410 inline __vector signed int
6411 vec_sums (__vector signed int a1, __vector signed int a2)
6412 {
6413   return (__vector signed int) __builtin_altivec_vsumsws ((__vector signed int) a1, (__vector signed int) a2);
6414 }
6415
6416 /* vec_trunc */
6417
6418 inline __vector float
6419 vec_trunc (__vector float a1)
6420 {
6421   return (__vector float) __builtin_altivec_vrfiz ((__vector float) a1);
6422 }
6423
6424 /* vec_unpackh */
6425
6426 inline __vector signed short
6427 vec_unpackh (__vector signed char a1)
6428 {
6429   return (__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) a1);
6430 }
6431
6432 inline __vector bool short
6433 vec_unpackh (__vector bool char a1)
6434 {
6435   return (__vector bool short) __builtin_altivec_vupkhsb ((__vector signed char) a1);
6436 }
6437
6438 inline __vector signed int
6439 vec_unpackh (__vector signed short a1)
6440 {
6441   return (__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) a1);
6442 }
6443
6444 inline __vector bool int
6445 vec_unpackh (__vector bool short a1)
6446 {
6447   return (__vector bool int) __builtin_altivec_vupkhsh ((__vector signed short) a1);
6448 }
6449
6450 inline __vector unsigned int
6451 vec_unpackh (__vector pixel a1)
6452 {
6453   return (__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) a1);
6454 }
6455
6456 /* vec_vupkhsh */
6457
6458 inline __vector bool int
6459 vec_vupkhsh (__vector bool short a1)
6460 {
6461   return (__vector bool int) __builtin_altivec_vupkhsh ((__vector signed short) a1);
6462 }
6463
6464 inline __vector signed int
6465 vec_vupkhsh (__vector signed short a1)
6466 {
6467   return (__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) a1);
6468 }
6469
6470 /* vec_vupkhpx */
6471
6472 inline __vector unsigned int
6473 vec_vupkhpx (__vector pixel a1)
6474 {
6475   return (__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) a1);
6476 }
6477
6478 /* vec_vupkhsb */
6479
6480 inline __vector bool short
6481 vec_vupkhsb (__vector bool char a1)
6482 {
6483   return (__vector bool short) __builtin_altivec_vupkhsb ((__vector signed char) a1);
6484 }
6485
6486 inline __vector signed short
6487 vec_vupkhsb (__vector signed char a1)
6488 {
6489   return (__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) a1);
6490 }
6491
6492 /* vec_unpackl */
6493
6494 inline __vector signed short
6495 vec_unpackl (__vector signed char a1)
6496 {
6497   return (__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) a1);
6498 }
6499
6500 inline __vector bool short
6501 vec_unpackl (__vector bool char a1)
6502 {
6503   return (__vector bool short) __builtin_altivec_vupklsb ((__vector signed char) a1);
6504 }
6505
6506 inline __vector unsigned int
6507 vec_unpackl (__vector pixel a1)
6508 {
6509   return (__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) a1);
6510 }
6511
6512 inline __vector signed int
6513 vec_unpackl (__vector signed short a1)
6514 {
6515   return (__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) a1);
6516 }
6517
6518 inline __vector bool int
6519 vec_unpackl (__vector bool short a1)
6520 {
6521   return (__vector bool int) __builtin_altivec_vupklsh ((__vector signed short) a1);
6522 }
6523
6524 /* vec_vupklpx */
6525
6526 inline __vector unsigned int
6527 vec_vupklpx (__vector pixel a1)
6528 {
6529   return (__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) a1);
6530 }
6531
6532 /* vec_upklsh */
6533
6534 inline __vector bool int
6535 vec_vupklsh (__vector bool short a1)
6536 {
6537   return (__vector bool int) __builtin_altivec_vupklsh ((__vector signed short) a1);
6538 }
6539
6540 inline __vector signed int
6541 vec_vupklsh (__vector signed short a1)
6542 {
6543   return (__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) a1);
6544 }
6545
6546 /* vec_vupklsb */
6547
6548 inline __vector bool short
6549 vec_vupklsb (__vector bool char a1)
6550 {
6551   return (__vector bool short) __builtin_altivec_vupklsb ((__vector signed char) a1);
6552 }
6553
6554 inline __vector signed short
6555 vec_vupklsb (__vector signed char a1)
6556 {
6557   return (__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) a1);
6558 }
6559
6560 /* vec_xor */
6561
6562 inline __vector float
6563 vec_xor (__vector float a1, __vector float a2)
6564 {
6565   return (__vector float) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6566 }
6567
6568 inline __vector float
6569 vec_xor (__vector float a1, __vector bool int a2)
6570 {
6571   return (__vector float) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6572 }
6573
6574 inline __vector float
6575 vec_xor (__vector bool int a1, __vector float a2)
6576 {
6577   return (__vector float) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6578 }
6579
6580 inline __vector bool int
6581 vec_xor (__vector bool int a1, __vector bool int a2)
6582 {
6583   return (__vector bool int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6584 }
6585
6586 inline __vector signed int
6587 vec_xor (__vector bool int a1, __vector signed int a2)
6588 {
6589   return (__vector signed int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6590 }
6591
6592 inline __vector signed int
6593 vec_xor (__vector signed int a1, __vector bool int a2)
6594 {
6595   return (__vector signed int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6596 }
6597
6598 inline __vector signed int
6599 vec_xor (__vector signed int a1, __vector signed int a2)
6600 {
6601   return (__vector signed int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6602 }
6603
6604 inline __vector unsigned int
6605 vec_xor (__vector bool int a1, __vector unsigned int a2)
6606 {
6607   return (__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6608 }
6609
6610 inline __vector unsigned int
6611 vec_xor (__vector unsigned int a1, __vector bool int a2)
6612 {
6613   return (__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6614 }
6615
6616 inline __vector unsigned int
6617 vec_xor (__vector unsigned int a1, __vector unsigned int a2)
6618 {
6619   return (__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6620 }
6621
6622 inline __vector bool short
6623 vec_xor (__vector bool short a1, __vector bool short a2)
6624 {
6625   return (__vector bool short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6626 }
6627
6628 inline __vector signed short
6629 vec_xor (__vector bool short a1, __vector signed short a2)
6630 {
6631   return (__vector signed short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6632 }
6633
6634 inline __vector signed short
6635 vec_xor (__vector signed short a1, __vector bool short a2)
6636 {
6637   return (__vector signed short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6638 }
6639
6640 inline __vector signed short
6641 vec_xor (__vector signed short a1, __vector signed short a2)
6642 {
6643   return (__vector signed short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6644 }
6645
6646 inline __vector unsigned short
6647 vec_xor (__vector bool short a1, __vector unsigned short a2)
6648 {
6649   return (__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6650 }
6651
6652 inline __vector unsigned short
6653 vec_xor (__vector unsigned short a1, __vector bool short a2)
6654 {
6655   return (__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6656 }
6657
6658 inline __vector unsigned short
6659 vec_xor (__vector unsigned short a1, __vector unsigned short a2)
6660 {
6661   return (__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6662 }
6663
6664 inline __vector signed char
6665 vec_xor (__vector bool char a1, __vector signed char a2)
6666 {
6667   return (__vector signed char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6668 }
6669
6670 inline __vector bool char
6671 vec_xor (__vector bool char a1, __vector bool char a2)
6672 {
6673   return (__vector bool char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6674 }
6675
6676 inline __vector signed char
6677 vec_xor (__vector signed char a1, __vector bool char a2)
6678 {
6679   return (__vector signed char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6680 }
6681
6682 inline __vector signed char
6683 vec_xor (__vector signed char a1, __vector signed char a2)
6684 {
6685   return (__vector signed char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6686 }
6687
6688 inline __vector unsigned char
6689 vec_xor (__vector bool char a1, __vector unsigned char a2)
6690 {
6691   return (__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6692 }
6693
6694 inline __vector unsigned char
6695 vec_xor (__vector unsigned char a1, __vector bool char a2)
6696 {
6697   return (__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6698 }
6699
6700 inline __vector unsigned char
6701 vec_xor (__vector unsigned char a1, __vector unsigned char a2)
6702 {
6703   return (__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6704 }
6705
6706 /* vec_all_eq */
6707
6708 inline int
6709 vec_all_eq (__vector signed char a1, __vector bool char a2)
6710 {
6711   return __builtin_altivec_vcmpequb_p (__CR6_LT, a1, (__vector signed char) a2);
6712 }
6713
6714 inline int
6715 vec_all_eq (__vector signed char a1, __vector signed char a2)
6716 {
6717   return __builtin_altivec_vcmpequb_p (__CR6_LT, a1, a2);
6718 }
6719
6720 inline int
6721 vec_all_eq (__vector unsigned char a1, __vector bool char a2)
6722 {
6723   return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6724 }
6725
6726 inline int
6727 vec_all_eq (__vector unsigned char a1, __vector unsigned char a2)
6728 {
6729   return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6730 }
6731
6732 inline int
6733 vec_all_eq (__vector bool char a1, __vector bool char a2)
6734 {
6735   return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6736 }
6737
6738 inline int
6739 vec_all_eq (__vector bool char a1, __vector unsigned char a2)
6740 {
6741   return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6742 }
6743
6744 inline int
6745 vec_all_eq (__vector bool char a1, __vector signed char a2)
6746 {
6747   return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6748 }
6749
6750 inline int
6751 vec_all_eq (__vector signed short a1, __vector bool short a2)
6752 {
6753   return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6754 }
6755
6756 inline int
6757 vec_all_eq (__vector signed short a1, __vector signed short a2)
6758 {
6759   return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6760 }
6761
6762 inline int
6763 vec_all_eq (__vector unsigned short a1, __vector bool short a2)
6764 {
6765   return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6766 }
6767
6768 inline int
6769 vec_all_eq (__vector unsigned short a1, __vector unsigned short a2)
6770 {
6771   return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6772 }
6773
6774 inline int
6775 vec_all_eq (__vector bool short a1, __vector bool short a2)
6776 {
6777   return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6778 }
6779
6780 inline int
6781 vec_all_eq (__vector bool short a1, __vector unsigned short a2)
6782 {
6783   return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6784 }
6785
6786 inline int
6787 vec_all_eq (__vector bool short a1, __vector signed short a2)
6788 {
6789   return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6790 }
6791
6792 inline int
6793 vec_all_eq (__vector pixel a1, __vector pixel a2)
6794 {
6795   return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6796 }
6797
6798 inline int
6799 vec_all_eq (__vector signed int a1, __vector bool int a2)
6800 {
6801   return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6802 }
6803
6804 inline int
6805 vec_all_eq (__vector signed int a1, __vector signed int a2)
6806 {
6807   return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6808 }
6809
6810 inline int
6811 vec_all_eq (__vector unsigned int a1, __vector bool int a2)
6812 {
6813   return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6814 }
6815
6816 inline int
6817 vec_all_eq (__vector unsigned int a1, __vector unsigned int a2)
6818 {
6819   return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6820 }
6821
6822 inline int
6823 vec_all_eq (__vector bool int a1, __vector bool int a2)
6824 {
6825   return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6826 }
6827
6828 inline int
6829 vec_all_eq (__vector bool int a1, __vector unsigned int a2)
6830 {
6831   return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6832 }
6833
6834 inline int
6835 vec_all_eq (__vector bool int a1, __vector signed int a2)
6836 {
6837   return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6838 }
6839
6840 inline int
6841 vec_all_eq (__vector float a1, __vector float a2)
6842 {
6843   return __builtin_altivec_vcmpeqfp_p (__CR6_LT, a1, a2);
6844 }
6845
6846 /* vec_all_ge */
6847
6848 inline int
6849 vec_all_ge (__vector bool char a1, __vector unsigned char a2)
6850 {
6851   return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6852 }
6853
6854 inline int
6855 vec_all_ge (__vector unsigned char a1, __vector bool char a2)
6856 {
6857   return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6858 }
6859
6860 inline int
6861 vec_all_ge (__vector unsigned char a1, __vector unsigned char a2)
6862 {
6863   return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6864 }
6865
6866 inline int
6867 vec_all_ge (__vector bool char a1, __vector signed char a2)
6868 {
6869   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6870 }
6871
6872 inline int
6873 vec_all_ge (__vector signed char a1, __vector bool char a2)
6874 {
6875   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6876 }
6877
6878 inline int
6879 vec_all_ge (__vector signed char a1, __vector signed char a2)
6880 {
6881   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6882 }
6883
6884 inline int
6885 vec_all_ge (__vector bool short a1, __vector unsigned short a2)
6886 {
6887   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6888 }
6889
6890 inline int
6891 vec_all_ge (__vector unsigned short a1, __vector bool short a2)
6892 {
6893   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6894 }
6895
6896 inline int
6897 vec_all_ge (__vector unsigned short a1, __vector unsigned short a2)
6898 {
6899   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6900 }
6901
6902 inline int
6903 vec_all_ge (__vector signed short a1, __vector signed short a2)
6904 {
6905   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6906 }
6907
6908 inline int
6909 vec_all_ge (__vector bool short a1, __vector signed short a2)
6910 {
6911   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6912 }
6913
6914 inline int
6915 vec_all_ge (__vector signed short a1, __vector bool short a2)
6916 {
6917   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6918 }
6919
6920 inline int
6921 vec_all_ge (__vector bool int a1, __vector unsigned int a2)
6922 {
6923   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
6924 }
6925
6926 inline int
6927 vec_all_ge (__vector unsigned int a1, __vector bool int a2)
6928 {
6929   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
6930 }
6931
6932 inline int
6933 vec_all_ge (__vector unsigned int a1, __vector unsigned int a2)
6934 {
6935   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
6936 }
6937
6938 inline int
6939 vec_all_ge (__vector bool int a1, __vector signed int a2)
6940 {
6941   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
6942 }
6943
6944 inline int
6945 vec_all_ge (__vector signed int a1, __vector bool int a2)
6946 {
6947   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
6948 }
6949
6950 inline int
6951 vec_all_ge (__vector signed int a1, __vector signed int a2)
6952 {
6953   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
6954 }
6955
6956 inline int
6957 vec_all_ge (__vector float a1, __vector float a2)
6958 {
6959   return __builtin_altivec_vcmpgefp_p (__CR6_LT, a1, a2);
6960 }
6961
6962 /* vec_all_gt */
6963
6964 inline int
6965 vec_all_gt (__vector bool char a1, __vector unsigned char a2)
6966 {
6967   return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6968 }
6969
6970 inline int
6971 vec_all_gt (__vector unsigned char a1, __vector bool char a2)
6972 {
6973   return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6974 }
6975
6976 inline int
6977 vec_all_gt (__vector unsigned char a1, __vector unsigned char a2)
6978 {
6979   return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6980 }
6981
6982 inline int
6983 vec_all_gt (__vector bool char a1, __vector signed char a2)
6984 {
6985   return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6986 }
6987
6988 inline int
6989 vec_all_gt (__vector signed char a1, __vector bool char a2)
6990 {
6991   return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6992 }
6993
6994 inline int
6995 vec_all_gt (__vector signed char a1, __vector signed char a2)
6996 {
6997   return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6998 }
6999
7000 inline int
7001 vec_all_gt (__vector bool short a1, __vector unsigned short a2)
7002 {
7003   return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7004 }
7005
7006 inline int
7007 vec_all_gt (__vector unsigned short a1, __vector bool short a2)
7008 {
7009   return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7010 }
7011
7012 inline int
7013 vec_all_gt (__vector unsigned short a1, __vector unsigned short a2)
7014 {
7015   return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7016 }
7017
7018 inline int
7019 vec_all_gt (__vector bool short a1, __vector signed short a2)
7020 {
7021   return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7022 }
7023
7024 inline int
7025 vec_all_gt (__vector signed short a1, __vector bool short a2)
7026 {
7027   return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7028 }
7029
7030 inline int
7031 vec_all_gt (__vector signed short a1, __vector signed short a2)
7032 {
7033   return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7034 }
7035
7036 inline int
7037 vec_all_gt (__vector bool int a1, __vector unsigned int a2)
7038 {
7039   return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7040 }
7041
7042 inline int
7043 vec_all_gt (__vector unsigned int a1, __vector bool int a2)
7044 {
7045   return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7046 }
7047
7048 inline int
7049 vec_all_gt (__vector unsigned int a1, __vector unsigned int a2)
7050 {
7051   return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7052 }
7053
7054 inline int
7055 vec_all_gt (__vector bool int a1, __vector signed int a2)
7056 {
7057   return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7058 }
7059
7060 inline int
7061 vec_all_gt (__vector signed int a1, __vector bool int a2)
7062 {
7063   return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7064 }
7065
7066 inline int
7067 vec_all_gt (__vector signed int a1, __vector signed int a2)
7068 {
7069   return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7070 }
7071
7072 inline int
7073 vec_all_gt (__vector float a1, __vector float a2)
7074 {
7075   return __builtin_altivec_vcmpgtfp_p (__CR6_LT, a1, a2);
7076 }
7077
7078 /* vec_all_in */
7079
7080 inline int
7081 vec_all_in (__vector float a1, __vector float a2)
7082 {
7083   return __builtin_altivec_vcmpbfp_p (__CR6_EQ, a1, a2);
7084 }
7085
7086 /* vec_all_le */
7087
7088 inline int
7089 vec_all_le (__vector bool char a1, __vector unsigned char a2)
7090 {
7091   return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7092 }
7093
7094 inline int
7095 vec_all_le (__vector unsigned char a1, __vector bool char a2)
7096 {
7097   return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7098 }
7099
7100 inline int
7101 vec_all_le (__vector unsigned char a1, __vector unsigned char a2)
7102 {
7103   return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7104 }
7105
7106 inline int
7107 vec_all_le (__vector bool char a1, __vector signed char a2)
7108 {
7109   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7110 }
7111
7112 inline int
7113 vec_all_le (__vector signed char a1, __vector bool char a2)
7114 {
7115   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7116 }
7117
7118 inline int
7119 vec_all_le (__vector signed char a1, __vector signed char a2)
7120 {
7121   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7122 }
7123
7124 inline int
7125 vec_all_le (__vector bool short a1, __vector unsigned short a2)
7126 {
7127   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7128 }
7129
7130 inline int
7131 vec_all_le (__vector unsigned short a1, __vector bool short a2)
7132 {
7133   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7134 }
7135
7136 inline int
7137 vec_all_le (__vector unsigned short a1, __vector unsigned short a2)
7138 {
7139   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7140 }
7141
7142 inline int
7143 vec_all_le (__vector bool short a1, __vector signed short a2)
7144 {
7145   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7146 }
7147
7148 inline int
7149 vec_all_le (__vector signed short a1, __vector bool short a2)
7150 {
7151   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7152 }
7153
7154 inline int
7155 vec_all_le (__vector signed short a1, __vector signed short a2)
7156 {
7157   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7158 }
7159
7160 inline int
7161 vec_all_le (__vector bool int a1, __vector unsigned int a2)
7162 {
7163   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7164 }
7165
7166 inline int
7167 vec_all_le (__vector unsigned int a1, __vector bool int a2)
7168 {
7169   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7170 }
7171
7172 inline int
7173 vec_all_le (__vector unsigned int a1, __vector unsigned int a2)
7174 {
7175   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7176 }
7177
7178 inline int
7179 vec_all_le (__vector bool int a1, __vector signed int a2)
7180 {
7181   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7182 }
7183
7184 inline int
7185 vec_all_le (__vector signed int a1, __vector bool int a2)
7186 {
7187   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7188 }
7189
7190 inline int
7191 vec_all_le (__vector signed int a1, __vector signed int a2)
7192 {
7193   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7194 }
7195
7196 inline int
7197 vec_all_le (__vector float a1, __vector float a2)
7198 {
7199   return __builtin_altivec_vcmpgefp_p (__CR6_LT, a2, a1);
7200 }
7201
7202 /* vec_all_lt */
7203
7204 inline int
7205 vec_all_lt (__vector bool char a1, __vector unsigned char a2)
7206 {
7207   return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7208 }
7209
7210 inline int
7211 vec_all_lt (__vector unsigned char a1, __vector bool char a2)
7212 {
7213   return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7214 }
7215
7216 inline int
7217 vec_all_lt (__vector unsigned char a1, __vector unsigned char a2)
7218 {
7219   return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7220 }
7221
7222 inline int
7223 vec_all_lt (__vector bool char a1, __vector signed char a2)
7224 {
7225   return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7226 }
7227
7228 inline int
7229 vec_all_lt (__vector signed char a1, __vector bool char a2)
7230 {
7231   return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7232 }
7233
7234 inline int
7235 vec_all_lt (__vector signed char a1, __vector signed char a2)
7236 {
7237   return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7238 }
7239
7240 inline int
7241 vec_all_lt (__vector bool short a1, __vector unsigned short a2)
7242 {
7243   return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7244 }
7245
7246 inline int
7247 vec_all_lt (__vector unsigned short a1, __vector bool short a2)
7248 {
7249   return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7250 }
7251
7252 inline int
7253 vec_all_lt (__vector unsigned short a1, __vector unsigned short a2)
7254 {
7255   return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7256 }
7257
7258 inline int
7259 vec_all_lt (__vector bool short a1, __vector signed short a2)
7260 {
7261   return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7262 }
7263
7264 inline int
7265 vec_all_lt (__vector signed short a1, __vector bool short a2)
7266 {
7267   return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7268 }
7269
7270 inline int
7271 vec_all_lt (__vector signed short a1, __vector signed short a2)
7272 {
7273   return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7274 }
7275
7276 inline int
7277 vec_all_lt (__vector bool int a1, __vector unsigned int a2)
7278 {
7279   return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7280 }
7281
7282 inline int
7283 vec_all_lt (__vector unsigned int a1, __vector bool int a2)
7284 {
7285   return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7286 }
7287
7288 inline int
7289 vec_all_lt (__vector unsigned int a1, __vector unsigned int a2)
7290 {
7291   return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7292 }
7293
7294 inline int
7295 vec_all_lt (__vector bool int a1, __vector signed int a2)
7296 {
7297   return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7298 }
7299
7300 inline int
7301 vec_all_lt (__vector signed int a1, __vector bool int a2)
7302 {
7303   return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7304 }
7305
7306 inline int
7307 vec_all_lt (__vector signed int a1, __vector signed int a2)
7308 {
7309   return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7310 }
7311
7312 inline int
7313 vec_all_lt (__vector float a1, __vector float a2)
7314 {
7315   return __builtin_altivec_vcmpgtfp_p (__CR6_LT, a2, a1);
7316 }
7317
7318 /* vec_all_nan */
7319
7320 inline int
7321 vec_all_nan (__vector float a1)
7322 {
7323   return __builtin_altivec_vcmpeqfp_p (__CR6_EQ, a1, a1);
7324 }
7325
7326 /* vec_all_ne */
7327
7328 inline int
7329 vec_all_ne (__vector signed char a1, __vector bool char a2)
7330 {
7331   return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7332 }
7333
7334 inline int
7335 vec_all_ne (__vector signed char a1, __vector signed char a2)
7336 {
7337   return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7338 }
7339
7340 inline int
7341 vec_all_ne (__vector unsigned char a1, __vector bool char a2)
7342 {
7343   return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7344 }
7345
7346 inline int
7347 vec_all_ne (__vector unsigned char a1, __vector unsigned char a2)
7348 {
7349   return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7350 }
7351
7352 inline int
7353 vec_all_ne (__vector bool char a1, __vector bool char a2)
7354 {
7355   return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7356 }
7357
7358 inline int
7359 vec_all_ne (__vector bool char a1, __vector unsigned char a2)
7360 {
7361   return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7362 }
7363
7364 inline int
7365 vec_all_ne (__vector bool char a1, __vector signed char a2)
7366 {
7367   return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7368 }
7369
7370 inline int
7371 vec_all_ne (__vector signed short a1, __vector bool short a2)
7372 {
7373   return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7374 }
7375
7376 inline int
7377 vec_all_ne (__vector signed short a1, __vector signed short a2)
7378 {
7379   return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7380 }
7381
7382 inline int
7383 vec_all_ne (__vector unsigned short a1, __vector bool short a2)
7384 {
7385   return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7386 }
7387
7388 inline int
7389 vec_all_ne (__vector unsigned short a1, __vector unsigned short a2)
7390 {
7391   return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7392 }
7393
7394 inline int
7395 vec_all_ne (__vector bool short a1, __vector bool short a2)
7396 {
7397   return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7398 }
7399
7400 inline int
7401 vec_all_ne (__vector bool short a1, __vector unsigned short a2)
7402 {
7403   return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7404 }
7405
7406 inline int
7407 vec_all_ne (__vector bool short a1, __vector signed short a2)
7408 {
7409   return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7410 }
7411
7412 inline int
7413 vec_all_ne (__vector pixel a1, __vector pixel a2)
7414 {
7415   return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7416 }
7417
7418 inline int
7419 vec_all_ne (__vector signed int a1, __vector bool int a2)
7420 {
7421   return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7422 }
7423
7424 inline int
7425 vec_all_ne (__vector signed int a1, __vector signed int a2)
7426 {
7427   return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7428 }
7429
7430 inline int
7431 vec_all_ne (__vector unsigned int a1, __vector bool int a2)
7432 {
7433   return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7434 }
7435
7436 inline int
7437 vec_all_ne (__vector unsigned int a1, __vector unsigned int a2)
7438 {
7439   return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7440 }
7441
7442 inline int
7443 vec_all_ne (__vector bool int a1, __vector bool int a2)
7444 {
7445   return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7446 }
7447
7448 inline int
7449 vec_all_ne (__vector bool int a1, __vector unsigned int a2)
7450 {
7451   return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7452 }
7453
7454 inline int
7455 vec_all_ne (__vector bool int a1, __vector signed int a2)
7456 {
7457   return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7458 }
7459
7460 inline int
7461 vec_all_ne (__vector float a1, __vector float a2)
7462 {
7463   return __builtin_altivec_vcmpeqfp_p (__CR6_EQ, a1, a2);
7464 }
7465
7466 /* vec_all_nge */
7467
7468 inline int
7469 vec_all_nge (__vector float a1, __vector float a2)
7470 {
7471   return __builtin_altivec_vcmpgefp_p (__CR6_EQ, a1, a2);
7472 }
7473
7474 /* vec_all_ngt */
7475
7476 inline int
7477 vec_all_ngt (__vector float a1, __vector float a2)
7478 {
7479   return __builtin_altivec_vcmpgtfp_p (__CR6_EQ, a1, a2);
7480 }
7481
7482 /* vec_all_nle */
7483
7484 inline int
7485 vec_all_nle (__vector float a1, __vector float a2)
7486 {
7487   return __builtin_altivec_vcmpgefp_p (__CR6_EQ, a2, a1);
7488 }
7489
7490 /* vec_all_nlt */
7491
7492 inline int
7493 vec_all_nlt (__vector float a1, __vector float a2)
7494 {
7495   return __builtin_altivec_vcmpgtfp_p (__CR6_EQ, a2, a1);
7496 }
7497
7498 /* vec_all_numeric */
7499
7500 inline int
7501 vec_all_numeric (__vector float a1)
7502 {
7503   return __builtin_altivec_vcmpeqfp_p (__CR6_LT, a1, a1);
7504 }
7505
7506 /* vec_any_eq */
7507
7508 inline int
7509 vec_any_eq (__vector signed char a1, __vector bool char a2)
7510 {
7511   return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7512 }
7513
7514 inline int
7515 vec_any_eq (__vector signed char a1, __vector signed char a2)
7516 {
7517   return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7518 }
7519
7520 inline int
7521 vec_any_eq (__vector unsigned char a1, __vector bool char a2)
7522 {
7523   return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7524 }
7525
7526 inline int
7527 vec_any_eq (__vector unsigned char a1, __vector unsigned char a2)
7528 {
7529   return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7530 }
7531
7532 inline int
7533 vec_any_eq (__vector bool char a1, __vector bool char a2)
7534 {
7535   return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7536 }
7537
7538 inline int
7539 vec_any_eq (__vector bool char a1, __vector unsigned char a2)
7540 {
7541   return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7542 }
7543
7544 inline int
7545 vec_any_eq (__vector bool char a1, __vector signed char a2)
7546 {
7547   return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7548 }
7549
7550 inline int
7551 vec_any_eq (__vector signed short a1, __vector bool short a2)
7552 {
7553   return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7554 }
7555
7556 inline int
7557 vec_any_eq (__vector signed short a1, __vector signed short a2)
7558 {
7559   return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7560 }
7561
7562 inline int
7563 vec_any_eq (__vector unsigned short a1, __vector bool short a2)
7564 {
7565   return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7566 }
7567
7568 inline int
7569 vec_any_eq (__vector unsigned short a1, __vector unsigned short a2)
7570 {
7571   return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7572 }
7573
7574 inline int
7575 vec_any_eq (__vector bool short a1, __vector bool short a2)
7576 {
7577   return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7578 }
7579
7580 inline int
7581 vec_any_eq (__vector bool short a1, __vector unsigned short a2)
7582 {
7583   return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7584 }
7585
7586 inline int
7587 vec_any_eq (__vector bool short a1, __vector signed short a2)
7588 {
7589   return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7590 }
7591
7592 inline int
7593 vec_any_eq (__vector pixel a1, __vector pixel a2)
7594 {
7595   return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7596 }
7597
7598 inline int
7599 vec_any_eq (__vector signed int a1, __vector bool int a2)
7600 {
7601   return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7602 }
7603
7604 inline int
7605 vec_any_eq (__vector signed int a1, __vector signed int a2)
7606 {
7607   return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7608 }
7609
7610 inline int
7611 vec_any_eq (__vector unsigned int a1, __vector bool int a2)
7612 {
7613   return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7614 }
7615
7616 inline int
7617 vec_any_eq (__vector unsigned int a1, __vector unsigned int a2)
7618 {
7619   return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7620 }
7621
7622 inline int
7623 vec_any_eq (__vector bool int a1, __vector bool int a2)
7624 {
7625   return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7626 }
7627
7628 inline int
7629 vec_any_eq (__vector bool int a1, __vector unsigned int a2)
7630 {
7631   return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7632 }
7633
7634 inline int
7635 vec_any_eq (__vector bool int a1, __vector signed int a2)
7636 {
7637   return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7638 }
7639
7640 inline int
7641 vec_any_eq (__vector float a1, __vector float a2)
7642 {
7643   return __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, a1, a2);
7644 }
7645
7646 /* vec_any_ge */
7647
7648 inline int
7649 vec_any_ge (__vector signed char a1, __vector bool char a2)
7650 {
7651   return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7652 }
7653
7654 inline int
7655 vec_any_ge (__vector unsigned char a1, __vector bool char a2)
7656 {
7657   return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7658 }
7659
7660 inline int
7661 vec_any_ge (__vector unsigned char a1, __vector unsigned char a2)
7662 {
7663   return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7664 }
7665
7666 inline int
7667 vec_any_ge (__vector signed char a1, __vector signed char a2)
7668 {
7669   return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7670 }
7671
7672 inline int
7673 vec_any_ge (__vector bool char a1, __vector unsigned char a2)
7674 {
7675   return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7676 }
7677
7678 inline int
7679 vec_any_ge (__vector bool char a1, __vector signed char a2)
7680 {
7681   return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7682 }
7683
7684 inline int
7685 vec_any_ge (__vector unsigned short a1, __vector bool short a2)
7686 {
7687   return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7688 }
7689
7690 inline int
7691 vec_any_ge (__vector unsigned short a1, __vector unsigned short a2)
7692 {
7693   return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7694 }
7695
7696 inline int
7697 vec_any_ge (__vector signed short a1, __vector signed short a2)
7698 {
7699   return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7700 }
7701
7702 inline int
7703 vec_any_ge (__vector signed short a1, __vector bool short a2)
7704 {
7705   return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7706 }
7707
7708 inline int
7709 vec_any_ge (__vector bool short a1, __vector unsigned short a2)
7710 {
7711   return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7712 }
7713
7714 inline int
7715 vec_any_ge (__vector bool short a1, __vector signed short a2)
7716 {
7717   return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7718 }
7719
7720 inline int
7721 vec_any_ge (__vector signed int a1, __vector bool int a2)
7722 {
7723   return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7724 }
7725
7726 inline int
7727 vec_any_ge (__vector unsigned int a1, __vector bool int a2)
7728 {
7729   return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7730 }
7731
7732 inline int
7733 vec_any_ge (__vector unsigned int a1, __vector unsigned int a2)
7734 {
7735   return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7736 }
7737
7738 inline int
7739 vec_any_ge (__vector signed int a1, __vector signed int a2)
7740 {
7741   return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7742 }
7743
7744 inline int
7745 vec_any_ge (__vector bool int a1, __vector unsigned int a2)
7746 {
7747   return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7748 }
7749
7750 inline int
7751 vec_any_ge (__vector bool int a1, __vector signed int a2)
7752 {
7753   return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7754 }
7755
7756 inline int
7757 vec_any_ge (__vector float a1, __vector float a2)
7758 {
7759   return __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, a1, a2);
7760 }
7761
7762 /* vec_any_gt */
7763
7764 inline int
7765 vec_any_gt (__vector bool char a1, __vector unsigned char a2)
7766 {
7767   return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7768 }
7769
7770 inline int
7771 vec_any_gt (__vector unsigned char a1, __vector bool char a2)
7772 {
7773   return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7774 }
7775
7776 inline int
7777 vec_any_gt (__vector unsigned char a1, __vector unsigned char a2)
7778 {
7779   return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7780 }
7781
7782 inline int
7783 vec_any_gt (__vector bool char a1, __vector signed char a2)
7784 {
7785   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7786 }
7787
7788 inline int
7789 vec_any_gt (__vector signed char a1, __vector bool char a2)
7790 {
7791   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7792 }
7793
7794 inline int
7795 vec_any_gt (__vector signed char a1, __vector signed char a2)
7796 {
7797   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7798 }
7799
7800 inline int
7801 vec_any_gt (__vector bool short a1, __vector unsigned short a2)
7802 {
7803   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7804 }
7805
7806 inline int
7807 vec_any_gt (__vector unsigned short a1, __vector bool short a2)
7808 {
7809   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7810 }
7811
7812 inline int
7813 vec_any_gt (__vector unsigned short a1, __vector unsigned short a2)
7814 {
7815   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7816 }
7817
7818 inline int
7819 vec_any_gt (__vector bool short a1, __vector signed short a2)
7820 {
7821   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7822 }
7823
7824 inline int
7825 vec_any_gt (__vector signed short a1, __vector bool short a2)
7826 {
7827   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7828 }
7829
7830 inline int
7831 vec_any_gt (__vector signed short a1, __vector signed short a2)
7832 {
7833   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7834 }
7835
7836 inline int
7837 vec_any_gt (__vector bool int a1, __vector unsigned int a2)
7838 {
7839   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7840 }
7841
7842 inline int
7843 vec_any_gt (__vector unsigned int a1, __vector bool int a2)
7844 {
7845   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7846 }
7847
7848 inline int
7849 vec_any_gt (__vector unsigned int a1, __vector unsigned int a2)
7850 {
7851   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7852 }
7853
7854 inline int
7855 vec_any_gt (__vector bool int a1, __vector signed int a2)
7856 {
7857   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7858 }
7859
7860 inline int
7861 vec_any_gt (__vector signed int a1, __vector bool int a2)
7862 {
7863   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7864 }
7865
7866 inline int
7867 vec_any_gt (__vector signed int a1, __vector signed int a2)
7868 {
7869   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7870 }
7871
7872 inline int
7873 vec_any_gt (__vector float a1, __vector float a2)
7874 {
7875   return __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, a1, a2);
7876 }
7877
7878 /* vec_any_le */
7879
7880 inline int
7881 vec_any_le (__vector bool char a1, __vector unsigned char a2)
7882 {
7883   return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7884 }
7885
7886 inline int
7887 vec_any_le (__vector unsigned char a1, __vector bool char a2)
7888 {
7889   return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7890 }
7891
7892 inline int
7893 vec_any_le (__vector unsigned char a1, __vector unsigned char a2)
7894 {
7895   return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7896 }
7897
7898 inline int
7899 vec_any_le (__vector bool char a1, __vector signed char a2)
7900 {
7901   return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7902 }
7903
7904 inline int
7905 vec_any_le (__vector signed char a1, __vector bool char a2)
7906 {
7907   return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7908 }
7909
7910 inline int
7911 vec_any_le (__vector signed char a1, __vector signed char a2)
7912 {
7913   return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7914 }
7915
7916 inline int
7917 vec_any_le (__vector bool short a1, __vector unsigned short a2)
7918 {
7919   return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
7920 }
7921
7922 inline int
7923 vec_any_le (__vector unsigned short a1, __vector bool short a2)
7924 {
7925   return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
7926 }
7927
7928 inline int
7929 vec_any_le (__vector unsigned short a1, __vector unsigned short a2)
7930 {
7931   return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
7932 }
7933
7934 inline int
7935 vec_any_le (__vector bool short a1, __vector signed short a2)
7936 {
7937   return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
7938 }
7939
7940 inline int
7941 vec_any_le (__vector signed short a1, __vector bool short a2)
7942 {
7943   return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
7944 }
7945
7946 inline int
7947 vec_any_le (__vector signed short a1, __vector signed short a2)
7948 {
7949   return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
7950 }
7951
7952 inline int
7953 vec_any_le (__vector bool int a1, __vector unsigned int a2)
7954 {
7955   return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
7956 }
7957
7958 inline int
7959 vec_any_le (__vector unsigned int a1, __vector bool int a2)
7960 {
7961   return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
7962 }
7963
7964 inline int
7965 vec_any_le (__vector unsigned int a1, __vector unsigned int a2)
7966 {
7967   return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
7968 }
7969
7970 inline int
7971 vec_any_le (__vector bool int a1, __vector signed int a2)
7972 {
7973   return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
7974 }
7975
7976 inline int
7977 vec_any_le (__vector signed int a1, __vector bool int a2)
7978 {
7979   return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
7980 }
7981
7982 inline int
7983 vec_any_le (__vector signed int a1, __vector signed int a2)
7984 {
7985   return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
7986 }
7987
7988 inline int
7989 vec_any_le (__vector float a1, __vector float a2)
7990 {
7991   return __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, a2, a1);
7992 }
7993
7994 /* vec_any_lt */
7995
7996 inline int
7997 vec_any_lt (__vector bool char a1, __vector unsigned char a2)
7998 {
7999   return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8000 }
8001
8002 inline int
8003 vec_any_lt (__vector unsigned char a1, __vector bool char a2)
8004 {
8005   return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8006 }
8007
8008 inline int
8009 vec_any_lt (__vector unsigned char a1, __vector unsigned char a2)
8010 {
8011   return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8012 }
8013
8014 inline int
8015 vec_any_lt (__vector bool char a1, __vector signed char a2)
8016 {
8017   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8018 }
8019
8020 inline int
8021 vec_any_lt (__vector signed char a1, __vector bool char a2)
8022 {
8023   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8024 }
8025
8026 inline int
8027 vec_any_lt (__vector signed char a1, __vector signed char a2)
8028 {
8029   return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8030 }
8031
8032 inline int
8033 vec_any_lt (__vector bool short a1, __vector unsigned short a2)
8034 {
8035   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8036 }
8037
8038 inline int
8039 vec_any_lt (__vector unsigned short a1, __vector bool short a2)
8040 {
8041   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8042 }
8043
8044 inline int
8045 vec_any_lt (__vector unsigned short a1, __vector unsigned short a2)
8046 {
8047   return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8048 }
8049
8050 inline int
8051 vec_any_lt (__vector bool short a1, __vector signed short a2)
8052 {
8053   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8054 }
8055
8056 inline int
8057 vec_any_lt (__vector signed short a1, __vector bool short a2)
8058 {
8059   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8060 }
8061
8062 inline int
8063 vec_any_lt (__vector signed short a1, __vector signed short a2)
8064 {
8065   return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8066 }
8067
8068 inline int
8069 vec_any_lt (__vector bool int a1, __vector unsigned int a2)
8070 {
8071   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8072 }
8073
8074 inline int
8075 vec_any_lt (__vector unsigned int a1, __vector bool int a2)
8076 {
8077   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8078 }
8079
8080 inline int
8081 vec_any_lt (__vector unsigned int a1, __vector unsigned int a2)
8082 {
8083   return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8084 }
8085
8086 inline int
8087 vec_any_lt (__vector bool int a1, __vector signed int a2)
8088 {
8089   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8090 }
8091
8092 inline int
8093 vec_any_lt (__vector signed int a1, __vector bool int a2)
8094 {
8095   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8096 }
8097
8098 inline int
8099 vec_any_lt (__vector signed int a1, __vector signed int a2)
8100 {
8101   return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8102 }
8103
8104 inline int
8105 vec_any_lt (__vector float a1, __vector float a2)
8106 {
8107   return __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, a2, a1);
8108 }
8109
8110 /* vec_any_nan */
8111
8112 inline int
8113 vec_any_nan (__vector float a1)
8114 {
8115   return __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, a1, a1);
8116 }
8117
8118 /* vec_any_ne */
8119
8120 inline int
8121 vec_any_ne (__vector signed char a1, __vector bool char a2)
8122 {
8123   return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8124 }
8125
8126 inline int
8127 vec_any_ne (__vector signed char a1, __vector signed char a2)
8128 {
8129   return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8130 }
8131
8132 inline int
8133 vec_any_ne (__vector unsigned char a1, __vector bool char a2)
8134 {
8135   return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8136 }
8137
8138 inline int
8139 vec_any_ne (__vector unsigned char a1, __vector unsigned char a2)
8140 {
8141   return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8142 }
8143
8144 inline int
8145 vec_any_ne (__vector bool char a1, __vector bool char a2)
8146 {
8147   return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8148 }
8149
8150 inline int
8151 vec_any_ne (__vector bool char a1, __vector unsigned char a2)
8152 {
8153   return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8154 }
8155
8156 inline int
8157 vec_any_ne (__vector bool char a1, __vector signed char a2)
8158 {
8159   return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8160 }
8161
8162 inline int
8163 vec_any_ne (__vector signed short a1, __vector bool short a2)
8164 {
8165   return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8166 }
8167
8168 inline int
8169 vec_any_ne (__vector signed short a1, __vector signed short a2)
8170 {
8171   return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8172 }
8173
8174 inline int
8175 vec_any_ne (__vector unsigned short a1, __vector bool short a2)
8176 {
8177   return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8178 }
8179
8180 inline int
8181 vec_any_ne (__vector unsigned short a1, __vector unsigned short a2)
8182 {
8183   return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8184 }
8185
8186 inline int
8187 vec_any_ne (__vector bool short a1, __vector bool short a2)
8188 {
8189   return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8190 }
8191
8192 inline int
8193 vec_any_ne (__vector bool short a1, __vector unsigned short a2)
8194 {
8195   return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8196 }
8197
8198 inline int
8199 vec_any_ne (__vector bool short a1, __vector signed short a2)
8200 {
8201   return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8202 }
8203
8204 inline int
8205 vec_any_ne (__vector pixel a1, __vector pixel a2)
8206 {
8207   return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8208 }
8209
8210 inline int
8211 vec_any_ne (__vector signed int a1, __vector bool int a2)
8212 {
8213   return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8214 }
8215
8216 inline int
8217 vec_any_ne (__vector signed int a1, __vector signed int a2)
8218 {
8219   return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8220 }
8221
8222 inline int
8223 vec_any_ne (__vector unsigned int a1, __vector bool int a2)
8224 {
8225   return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8226 }
8227
8228 inline int
8229 vec_any_ne (__vector unsigned int a1, __vector unsigned int a2)
8230 {
8231   return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8232 }
8233
8234 inline int
8235 vec_any_ne (__vector bool int a1, __vector bool int a2)
8236 {
8237   return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8238 }
8239
8240 inline int
8241 vec_any_ne (__vector bool int a1, __vector unsigned int a2)
8242 {
8243   return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8244 }
8245
8246 inline int
8247 vec_any_ne (__vector bool int a1, __vector signed int a2)
8248 {
8249   return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8250 }
8251
8252 inline int
8253 vec_any_ne (__vector float a1, __vector float a2)
8254 {
8255   return __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, a1, a2);
8256 }
8257
8258 /* vec_any_nge */
8259
8260 inline int
8261 vec_any_nge (__vector float a1, __vector float a2)
8262 {
8263   return __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, a1, a2);
8264 }
8265
8266 /* vec_any_ngt */
8267
8268 inline int
8269 vec_any_ngt (__vector float a1, __vector float a2)
8270 {
8271   return __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, a1, a2);
8272 }
8273
8274 /* vec_any_nle */
8275
8276 inline int
8277 vec_any_nle (__vector float a1, __vector float a2)
8278 {
8279   return __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, a2, a1);
8280 }
8281
8282 /* vec_any_nlt */
8283
8284 inline int
8285 vec_any_nlt (__vector float a1, __vector float a2)
8286 {
8287   return __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, a2, a1);
8288 }
8289
8290 /* vec_any_numeric */
8291
8292 inline int
8293 vec_any_numeric (__vector float a1)
8294 {
8295   return __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, a1, a1);
8296 }
8297
8298 /* vec_any_out */
8299
8300 inline int
8301 vec_any_out (__vector float a1, __vector float a2)
8302 {
8303   return __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, a1, a2);
8304 }
8305
8306 } /* extern "C++" */
8307
8308 #else /* not C++ */
8309
8310 /* "... and so I think no man in a century will suffer as greatly as
8311    you will."  */
8312
8313 /* Helper macros.  */
8314
8315 #define __un_args_eq(xtype, x)                                          \
8316         __builtin_types_compatible_p (xtype, __typeof__ (x))
8317
8318 #define __bin_args_eq(xtype, x, ytype, y)                               \
8319         (__builtin_types_compatible_p (xtype, __typeof__ (x))           \
8320          && __builtin_types_compatible_p (ytype, __typeof__ (y)))
8321
8322 #define __tern_args_eq(xtype, x, ytype, y, ztype, z)                    \
8323         (__builtin_types_compatible_p (xtype, __typeof__ (x))               \
8324          && __builtin_types_compatible_p (ytype, __typeof__ (y))                \
8325          && __builtin_types_compatible_p (ztype, __typeof__ (z)))
8326
8327 #define __ch(x, y, z)   __builtin_choose_expr (x, y, z)
8328
8329 #define vec_step(t) \
8330   __ch (__builtin_types_compatible_p (__typeof__ (t), __vector signed int), 4,      \
8331   __ch (__builtin_types_compatible_p (__typeof__ (t), __vector unsigned int), 4,    \
8332   __ch (__builtin_types_compatible_p (__typeof__ (t), __vector bool int), 4,        \
8333   __ch (__builtin_types_compatible_p (__typeof__ (t), __vector signed short), 8,    \
8334   __ch (__builtin_types_compatible_p (__typeof__ (t), __vector unsigned short), 8,  \
8335   __ch (__builtin_types_compatible_p (__typeof__ (t), __vector bool short), 8,      \
8336   __ch (__builtin_types_compatible_p (__typeof__ (t), __vector pixel), 8,           \
8337   __ch (__builtin_types_compatible_p (__typeof__ (t), __vector signed char), 16,    \
8338   __ch (__builtin_types_compatible_p (__typeof__ (t), __vector unsigned char), 16,  \
8339   __ch (__builtin_types_compatible_p (__typeof__ (t), __vector bool char), 16,      \
8340   __ch (__builtin_types_compatible_p (__typeof__ (t), __vector float), 4,           \
8341   __builtin_altivec_compiletime_error ("vec_step"))))))))))))
8342
8343 #define vec_abs(a) \
8344   __ch (__un_args_eq (__vector signed char, (a)), \
8345         ((__vector signed char) __builtin_altivec_abs_v16qi ((__vector signed char) (a))), \
8346   __ch (__un_args_eq (__vector signed short, (a)), \
8347         ((__vector signed short) __builtin_altivec_abs_v8hi ((__vector signed short) (a))), \
8348   __ch (__un_args_eq (__vector signed int, (a)), \
8349         ((__vector signed int) __builtin_altivec_abs_v4si ((__vector signed int) (a))), \
8350   __ch (__un_args_eq (__vector float, (a)), \
8351         ((__vector float) __builtin_altivec_abs_v4sf ((__vector float) (a))), \
8352   __builtin_altivec_compiletime_error ("vec_abs")))))
8353
8354 #define vec_abss(a) \
8355   __ch (__un_args_eq (__vector signed char, (a)), \
8356         ((__vector signed char) __builtin_altivec_abss_v16qi ((__vector signed char) (a))), \
8357   __ch (__un_args_eq (__vector signed short, (a)), \
8358         ((__vector signed short) __builtin_altivec_abss_v8hi ((__vector signed short) (a))), \
8359   __ch (__un_args_eq (__vector signed int, (a)), \
8360         ((__vector signed int) __builtin_altivec_abss_v4si ((__vector signed int) (a))), \
8361   __builtin_altivec_compiletime_error ("vec_abss"))))
8362
8363 #define vec_vaddubm(a1, a2) \
8364 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
8365       ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8366 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
8367       ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8368 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8369       ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8370 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
8371       ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8372 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
8373       ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8374 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8375       ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8376   __builtin_altivec_compiletime_error ("vec_vaddubm")))))))
8377
8378 #define vec_vadduhm(a1, a2) \
8379 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
8380       ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8381 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
8382       ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8383 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8384       ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8385 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
8386       ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8387 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
8388       ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8389 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8390       ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8391   __builtin_altivec_compiletime_error ("vec_vadduhm")))))))
8392
8393 #define vec_vadduwm(a1, a2) \
8394 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
8395       ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8396 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
8397       ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8398 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8399       ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8400 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
8401       ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8402 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
8403       ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8404 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8405       ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8406   __builtin_altivec_compiletime_error ("vec_vadduwm")))))))
8407
8408 #define vec_vaddfp(a1, a2) \
8409 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8410       ((__vector float) __builtin_altivec_vaddfp ((__vector float) (a1), (__vector float) (a2))), \
8411   __builtin_altivec_compiletime_error ("vec_vaddfp"))
8412
8413 #define vec_add(a1, a2) \
8414 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
8415       ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8416 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
8417       ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8418 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8419       ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8420 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
8421       ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8422 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
8423       ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8424 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8425       ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8426 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
8427       ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8428 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
8429       ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8430 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8431       ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8432 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
8433       ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8434 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
8435       ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8436 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8437       ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8438 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
8439       ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8440 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
8441       ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8442 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8443       ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8444 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
8445       ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8446 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
8447       ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8448 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8449       ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8450 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8451       ((__vector float) __builtin_altivec_vaddfp ((__vector float) (a1), (__vector float) (a2))), \
8452     __builtin_altivec_compiletime_error ("vec_add"))))))))))))))))))))
8453
8454 #define vec_addc(a1, a2) \
8455 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8456       ((__vector unsigned int) __builtin_altivec_vaddcuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8457     __builtin_altivec_compiletime_error ("vec_addc"))
8458
8459 #define vec_adds(a1, a2) \
8460 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
8461       ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8462 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
8463       ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8464 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8465       ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8466 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
8467       ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8468 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
8469       ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8470 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8471       ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8472 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
8473       ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8474 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
8475       ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8476 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8477       ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8478 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
8479       ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8480 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
8481       ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8482 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8483       ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8484 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
8485       ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8486 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
8487       ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8488 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8489       ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8490 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
8491       ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8492 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
8493       ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8494 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8495       ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8496     __builtin_altivec_compiletime_error ("vec_adds")))))))))))))))))))
8497
8498 #define vec_vaddsws(a1, a2) \
8499 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
8500       ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8501 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
8502       ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8503 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8504       ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8505   __builtin_altivec_compiletime_error ("vec_vaddsws"))))
8506
8507 #define vec_vadduws(a1, a2) \
8508 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
8509       ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8510 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
8511       ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8512 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8513       ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8514   __builtin_altivec_compiletime_error ("vec_vadduws"))))
8515
8516 #define vec_vaddshs(a1, a2) \
8517 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
8518       ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8519 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8520       ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8521 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
8522       ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8523   __builtin_altivec_compiletime_error ("vec_vaddshs"))))
8524
8525 #define vec_vadduhs(a1, a2) \
8526 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
8527       ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8528 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
8529       ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8530 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8531       ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8532   __builtin_altivec_compiletime_error ("vec_vadduhs"))))
8533
8534 #define vec_vaddsbs(a1, a2) \
8535 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
8536       ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8537 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
8538       ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8539 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8540       ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8541   __builtin_altivec_compiletime_error ("vec_vaddsbs"))))
8542
8543 #define vec_vaddubs(a1, a2) \
8544 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
8545       ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8546 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
8547       ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8548 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8549       ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8550   __builtin_altivec_compiletime_error ("vec_vaddubs"))))
8551
8552 #define vec_and(a1, a2) \
8553 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8554       ((__vector float) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8555 __ch (__bin_args_eq (__vector float, (a1), __vector bool int, (a2)), \
8556       ((__vector float) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8557 __ch (__bin_args_eq (__vector bool int, (a1), __vector float, (a2)), \
8558       ((__vector float) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8559 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
8560       ((__vector bool int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8561 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
8562       ((__vector signed int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8563 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
8564       ((__vector signed int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8565 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8566       ((__vector signed int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8567 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
8568       ((__vector unsigned int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8569 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
8570       ((__vector unsigned int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8571 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8572       ((__vector unsigned int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8573 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
8574       ((__vector bool short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8575 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
8576       ((__vector signed short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8577 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
8578       ((__vector signed short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8579 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8580       ((__vector signed short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8581 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
8582       ((__vector unsigned short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8583 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
8584       ((__vector unsigned short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8585 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8586       ((__vector unsigned short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8587 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
8588       ((__vector bool char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8589 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
8590       ((__vector signed char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8591 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
8592       ((__vector signed char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8593 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8594       ((__vector signed char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8595 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
8596       ((__vector unsigned char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8597 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
8598       ((__vector unsigned char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8599 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8600       ((__vector unsigned char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8601     __builtin_altivec_compiletime_error ("vec_and")))))))))))))))))))))))))
8602
8603 #define vec_andc(a1, a2) \
8604 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8605       ((__vector float) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8606 __ch (__bin_args_eq (__vector float, (a1), __vector bool int, (a2)), \
8607       ((__vector float) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8608 __ch (__bin_args_eq (__vector bool int, (a1), __vector float, (a2)), \
8609       ((__vector float) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8610 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
8611       ((__vector bool int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8612 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
8613       ((__vector signed int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8614 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
8615       ((__vector signed int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8616 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8617       ((__vector signed int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8618 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
8619       ((__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8620 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
8621       ((__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8622 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8623       ((__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8624 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
8625       ((__vector bool short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8626 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
8627       ((__vector signed short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8628 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
8629       ((__vector signed short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8630 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8631       ((__vector signed short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8632 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
8633       ((__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8634 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
8635       ((__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8636 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8637       ((__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8638 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
8639       ((__vector bool char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8640 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
8641       ((__vector signed char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8642 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
8643       ((__vector signed char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8644 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8645       ((__vector signed char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8646 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
8647       ((__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8648 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
8649       ((__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8650 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8651       ((__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8652     __builtin_altivec_compiletime_error ("vec_andc")))))))))))))))))))))))))
8653
8654 #define vec_avg(a1, a2) \
8655 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8656       ((__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) (a1), (__vector signed char) (a2))), \
8657 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8658       ((__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8659 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8660       ((__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8661 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8662       ((__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8663 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8664       ((__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8665 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8666       ((__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8667     __builtin_altivec_compiletime_error ("vec_avg")))))))
8668
8669 #define vec_vavgsw(a1, a2) \
8670 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8671       ((__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8672   __builtin_altivec_compiletime_error ("vec_vavgsw"))
8673
8674 #define vec_vavguw(a1, a2) \
8675 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8676       ((__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8677   __builtin_altivec_compiletime_error ("vec_vavguw"))
8678
8679 #define vec_vavgsh(a1, a2) \
8680 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8681       ((__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8682   __builtin_altivec_compiletime_error ("vec_vavgsh"))
8683
8684 #define vec_vavguh(a1, a2) \
8685 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8686       ((__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8687   __builtin_altivec_compiletime_error ("vec_vavguh"))
8688
8689 #define vec_vavgsb(a1, a2) \
8690 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8691       ((__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8692   __builtin_altivec_compiletime_error ("vec_vavgsb"))
8693
8694 #define vec_vavgub(a1, a2) \
8695 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8696       ((__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) (a1), (__vector signed char) (a2))), \
8697   __builtin_altivec_compiletime_error ("vec_vavgub"))
8698
8699 #define vec_ceil(a1) \
8700 __ch (__un_args_eq (__vector float, (a1)), \
8701       ((__vector float) __builtin_altivec_vrfip ((__vector float) (a1))), \
8702   __builtin_altivec_compiletime_error ("vec_ceil"))
8703
8704 #define vec_cmpb(a1, a2) \
8705 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8706       ((__vector signed int) __builtin_altivec_vcmpbfp ((__vector float) (a1), (__vector float) (a2))), \
8707   __builtin_altivec_compiletime_error ("vec_cmpb"))
8708
8709 #define vec_cmpeq(a1, a2) \
8710 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8711       ((__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8712 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8713       ((__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8714 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8715       ((__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8716 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8717       ((__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8718 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8719       ((__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8720 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8721       ((__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8722 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8723       ((__vector bool int) __builtin_altivec_vcmpeqfp ((__vector float) (a1), (__vector float) (a2))), \
8724     __builtin_altivec_compiletime_error ("vec_cmpeq"))))))))
8725
8726 #define vec_vcmpeqfp(a1, a2) \
8727 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8728       ((__vector bool int) __builtin_altivec_vcmpeqfp ((__vector float) (a1), (__vector float) (a2))), \
8729   __builtin_altivec_compiletime_error ("vec_vcmpeqfp"))
8730
8731 #define vec_vcmpequw(a1, a2) \
8732 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8733       ((__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8734 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8735       ((__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8736   __builtin_altivec_compiletime_error ("vec_vcmpequw")))
8737
8738 #define vec_vcmpequh(a1, a2) \
8739 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8740       ((__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8741 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8742       ((__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8743   __builtin_altivec_compiletime_error ("vec_vcmpequh")))
8744
8745 #define vec_vcmpequb(a1, a2) \
8746 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8747       ((__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8748 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8749       ((__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8750   __builtin_altivec_compiletime_error ("vec_vcmpequb")))
8751
8752 #define vec_cmpge(a1, a2) \
8753 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8754       ((__vector bool int) __builtin_altivec_vcmpgefp ((__vector float) (a1), (__vector float) (a2))), \
8755   __builtin_altivec_compiletime_error ("vec_cmpge"))
8756
8757 #define vec_cmpgt(a1, a2) \
8758 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8759       ((__vector bool char) __builtin_altivec_vcmpgtub ((__vector signed char) (a1), (__vector signed char) (a2))), \
8760 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8761       ((__vector bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8762 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8763       ((__vector bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8764 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8765       ((__vector bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8766 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8767       ((__vector bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8768 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8769       ((__vector bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8770 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8771       ((__vector bool int) __builtin_altivec_vcmpgtfp ((__vector float) (a1), (__vector float) (a2))), \
8772     __builtin_altivec_compiletime_error ("vec_cmpgt"))))))))
8773
8774 #define vec_vcmpgtfp(a1, a2) \
8775 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8776       ((__vector bool int) __builtin_altivec_vcmpgtfp ((__vector float) (a1), (__vector float) (a2))), \
8777   __builtin_altivec_compiletime_error ("vec_vcmpgtfp"))
8778
8779 #define vec_vcmpgtsw(a1, a2) \
8780 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8781       ((__vector bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8782   __builtin_altivec_compiletime_error ("vec_vcmpgtsw"))
8783
8784 #define vec_vcmpgtuw(a1, a2) \
8785 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8786       ((__vector bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8787   __builtin_altivec_compiletime_error ("vec_vcmpgtuw"))
8788
8789 #define vec_vcmpgtsh(a1, a2) \
8790 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8791       ((__vector bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8792   __builtin_altivec_compiletime_error ("vec_vcmpgtsh"))
8793
8794 #define vec_vcmpgtuh(a1, a2) \
8795 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8796       ((__vector bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8797   __builtin_altivec_compiletime_error ("vec_vcmpgtuh"))
8798
8799 #define vec_vcmpgtsb(a1, a2) \
8800 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8801       ((__vector bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8802   __builtin_altivec_compiletime_error ("vec_vcmpgtsb"))
8803
8804 #define vec_vcmpgtub(a1, a2) \
8805 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8806       ((__vector bool char) __builtin_altivec_vcmpgtub ((__vector signed char) (a1), (__vector signed char) (a2))), \
8807   __builtin_altivec_compiletime_error ("vec_vcmpgtub"))
8808
8809 #define vec_cmple(a1, a2) \
8810 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8811       ((__vector bool int) __builtin_altivec_vcmpgefp ((__vector float) (a2), (__vector float) (a1))), \
8812   __builtin_altivec_compiletime_error ("vec_cmple"))
8813
8814 #define vec_cmplt(a2, a1) \
8815 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8816       ((__vector bool char) __builtin_altivec_vcmpgtub ((__vector signed char) (a1), (__vector signed char) (a2))), \
8817 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8818       ((__vector bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8819 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8820       ((__vector bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8821 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8822       ((__vector bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8823 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8824       ((__vector bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8825 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8826       ((__vector bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8827 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8828       ((__vector bool int) __builtin_altivec_vcmpgtfp ((__vector float) (a1), (__vector float) (a2))), \
8829     __builtin_altivec_compiletime_error ("vec_cmplt"))))))))
8830
8831 #define vec_ctf(a1, a2) \
8832 __ch (__un_args_eq (__vector unsigned int, (a1)), \
8833       ((__vector float) __builtin_altivec_vcfux ((__vector signed int) (a1), (const int) (a2))), \
8834 __ch (__un_args_eq (__vector signed int, (a1)), \
8835       ((__vector float) __builtin_altivec_vcfsx ((__vector signed int) (a1), (const int) (a2))), \
8836     __builtin_altivec_compiletime_error ("vec_ctf")))
8837
8838 #define vec_vcfsx(a1, a2) \
8839 __ch (__un_args_eq (__vector signed int, (a1)), \
8840       ((__vector float) __builtin_altivec_vcfsx ((__vector signed int) (a1), (const int) (a2))), \
8841   __builtin_altivec_compiletime_error ("vec_vcfsx"))
8842
8843 #define vec_vcfux(a1, a2) \
8844 __ch (__un_args_eq (__vector unsigned int, (a1)), \
8845       ((__vector float) __builtin_altivec_vcfux ((__vector signed int) (a1), (const int) (a2))), \
8846   __builtin_altivec_compiletime_error ("vec_vcfux"))
8847
8848 #define vec_cts(a1, a2) \
8849 __ch (__un_args_eq (__vector float, (a1)), \
8850       ((__vector signed int) __builtin_altivec_vctsxs ((__vector float) (a1), (const int) (a2))), \
8851     __builtin_altivec_compiletime_error ("vec_cts"))
8852
8853 #define vec_ctu(a1, a2) \
8854 __ch (__un_args_eq (__vector float, (a1)), \
8855       ((__vector unsigned int) __builtin_altivec_vctuxs ((__vector float) (a1), (const int) (a2))), \
8856     __builtin_altivec_compiletime_error ("vec_ctu"))
8857
8858 #define vec_dss(a1) __builtin_altivec_dss ((const int) (a1));
8859
8860 #define vec_dssall() __builtin_altivec_dssall ()
8861
8862 #define vec_dst(a1, a2, a3) \
8863 __ch (__un_args_eq (const __vector unsigned char, *(a1)), \
8864       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8865 __ch (__un_args_eq (const __vector signed char, *(a1)), \
8866       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8867 __ch (__un_args_eq (const __vector bool char, *(a1)), \
8868       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8869 __ch (__un_args_eq (const __vector unsigned short, *(a1)), \
8870       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8871 __ch (__un_args_eq (const __vector signed short, *(a1)), \
8872       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8873 __ch (__un_args_eq (const __vector bool short, *(a1)), \
8874       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8875 __ch (__un_args_eq (const __vector pixel, *(a1)), \
8876       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8877 __ch (__un_args_eq (const __vector unsigned int, *(a1)), \
8878       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8879 __ch (__un_args_eq (const __vector signed int, *(a1)), \
8880       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8881 __ch (__un_args_eq (const __vector bool int, *(a1)), \
8882       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8883 __ch (__un_args_eq (const __vector float, *(a1)), \
8884       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8885 __ch (__un_args_eq (const unsigned char, *(a1)), \
8886       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8887 __ch (__un_args_eq (const signed char, *(a1)), \
8888       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8889 __ch (__un_args_eq (const unsigned short, *(a1)), \
8890       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8891 __ch (__un_args_eq (const short, *(a1)), \
8892       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8893 __ch (__un_args_eq (const unsigned int, *(a1)), \
8894       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8895 __ch (__un_args_eq (const int, *(a1)), \
8896       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8897 __ch (__un_args_eq (const unsigned long, *(a1)), \
8898       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8899 __ch (__un_args_eq (const long, *(a1)), \
8900       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8901 __ch (__un_args_eq (const float, *(a1)), \
8902       __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8903   __builtin_altivec_compiletime_error ("vec_dst")))))))))))))))))))))
8904
8905 #define vec_dstst(a1, a2, a3) \
8906 __ch (__un_args_eq (const __vector unsigned char, *(a1)), \
8907       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8908 __ch (__un_args_eq (const __vector signed char, *(a1)), \
8909       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8910 __ch (__un_args_eq (const __vector bool char, *(a1)), \
8911       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8912 __ch (__un_args_eq (const __vector unsigned short, *(a1)), \
8913       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8914 __ch (__un_args_eq (const __vector signed short, *(a1)), \
8915       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8916 __ch (__un_args_eq (const __vector bool short, *(a1)), \
8917       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8918 __ch (__un_args_eq (const __vector pixel, *(a1)), \
8919       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8920 __ch (__un_args_eq (const __vector unsigned int, *(a1)), \
8921       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8922 __ch (__un_args_eq (const __vector signed int, *(a1)), \
8923       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8924 __ch (__un_args_eq (const __vector bool int, *(a1)), \
8925       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8926 __ch (__un_args_eq (const __vector float, *(a1)), \
8927       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8928 __ch (__un_args_eq (const unsigned char, *(a1)), \
8929       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8930 __ch (__un_args_eq (const signed char, *(a1)), \
8931       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8932 __ch (__un_args_eq (const unsigned short, *(a1)), \
8933       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8934 __ch (__un_args_eq (const short, *(a1)), \
8935       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8936 __ch (__un_args_eq (const unsigned int, *(a1)), \
8937       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8938 __ch (__un_args_eq (const int, *(a1)), \
8939       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8940 __ch (__un_args_eq (const unsigned long, *(a1)), \
8941       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8942 __ch (__un_args_eq (const long, *(a1)), \
8943       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8944 __ch (__un_args_eq (const float, *(a1)), \
8945       __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8946   __builtin_altivec_compiletime_error ("vec_dstst")))))))))))))))))))))
8947
8948 #define vec_dststt(a1, a2, a3) \
8949 __ch (__un_args_eq (const __vector unsigned char, *(a1)), \
8950       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8951 __ch (__un_args_eq (const __vector signed char, *(a1)), \
8952       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8953 __ch (__un_args_eq (const __vector bool char, *(a1)), \
8954       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8955 __ch (__un_args_eq (const __vector unsigned short, *(a1)), \
8956       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8957 __ch (__un_args_eq (const __vector signed short, *(a1)), \
8958       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8959 __ch (__un_args_eq (const __vector bool short, *(a1)), \
8960       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8961 __ch (__un_args_eq (const __vector pixel, *(a1)), \
8962       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8963 __ch (__un_args_eq (const __vector unsigned int, *(a1)), \
8964       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8965 __ch (__un_args_eq (const __vector signed int, *(a1)), \
8966       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8967 __ch (__un_args_eq (const __vector bool int, *(a1)), \
8968       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8969 __ch (__un_args_eq (const __vector float, *(a1)), \
8970       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8971 __ch (__un_args_eq (const unsigned char, *(a1)), \
8972       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8973 __ch (__un_args_eq (const signed char, *(a1)), \
8974       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8975 __ch (__un_args_eq (const unsigned short, *(a1)), \
8976       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8977 __ch (__un_args_eq (const short, *(a1)), \
8978       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8979 __ch (__un_args_eq (const unsigned int, *(a1)), \
8980       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8981 __ch (__un_args_eq (const int, *(a1)), \
8982       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8983 __ch (__un_args_eq (const unsigned long, *(a1)), \
8984       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8985 __ch (__un_args_eq (const long, *(a1)), \
8986       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8987 __ch (__un_args_eq (const float, *(a1)), \
8988       __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
8989   __builtin_altivec_compiletime_error ("vec_dststt")))))))))))))))))))))
8990
8991 #define vec_dstt(a1, a2, a3) \
8992 __ch (__un_args_eq (const __vector unsigned char, *(a1)), \
8993       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
8994 __ch (__un_args_eq (const __vector signed char, *(a1)), \
8995       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
8996 __ch (__un_args_eq (const __vector bool char, *(a1)), \
8997       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
8998 __ch (__un_args_eq (const __vector unsigned short, *(a1)), \
8999       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9000 __ch (__un_args_eq (const __vector signed short, *(a1)), \
9001       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9002 __ch (__un_args_eq (const __vector bool short, *(a1)), \
9003       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9004 __ch (__un_args_eq (const __vector pixel, *(a1)), \
9005       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9006 __ch (__un_args_eq (const __vector unsigned int, *(a1)), \
9007       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9008 __ch (__un_args_eq (const __vector signed int, *(a1)), \
9009       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9010 __ch (__un_args_eq (const __vector bool int, *(a1)), \
9011       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9012 __ch (__un_args_eq (const __vector float, *(a1)), \
9013       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9014 __ch (__un_args_eq (const unsigned char, *(a1)), \
9015       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9016 __ch (__un_args_eq (const signed char, *(a1)), \
9017       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9018 __ch (__un_args_eq (const unsigned short, *(a1)), \
9019       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9020 __ch (__un_args_eq (const short, *(a1)), \
9021       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9022 __ch (__un_args_eq (const unsigned int, *(a1)), \
9023       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9024 __ch (__un_args_eq (const int, *(a1)), \
9025       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9026 __ch (__un_args_eq (const unsigned long, *(a1)), \
9027       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9028 __ch (__un_args_eq (const long, *(a1)), \
9029       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9030 __ch (__un_args_eq (const float, *(a1)), \
9031       __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9032   __builtin_altivec_compiletime_error ("vec_dstt")))))))))))))))))))))
9033
9034 #define vec_expte(a1) \
9035 __ch (__un_args_eq (__vector float, (a1)), \
9036       ((__vector float) __builtin_altivec_vexptefp ((__vector float) (a1))), \
9037   __builtin_altivec_compiletime_error ("vec_expte"))
9038
9039 #define vec_floor(a1) \
9040 __ch (__un_args_eq (__vector float, (a1)), \
9041       ((__vector float) __builtin_altivec_vrfim ((__vector float) (a1))), \
9042   __builtin_altivec_compiletime_error ("vec_floor"))
9043
9044 #define vec_ld(a, b) \
9045 __ch (__un_args_eq (const __vector unsigned char, *(b)), \
9046       ((__vector unsigned char) __builtin_altivec_lvx ((a), (b))), \
9047 __ch (__un_args_eq (const unsigned char, *(b)), \
9048       ((__vector unsigned char) __builtin_altivec_lvx ((a), (b))), \
9049 __ch (__un_args_eq (const __vector signed char, *(b)), \
9050       ((__vector signed char) __builtin_altivec_lvx ((a), (b))), \
9051 __ch (__un_args_eq (const signed char, *(b)), \
9052       ((__vector signed char) __builtin_altivec_lvx ((a), (b))), \
9053 __ch (__un_args_eq (const __vector bool char, *(b)), \
9054       ((__vector bool char) __builtin_altivec_lvx ((a), (b))), \
9055 __ch (__un_args_eq (const __vector unsigned short, *(b)), \
9056       ((__vector unsigned short) __builtin_altivec_lvx ((a), (b))), \
9057 __ch (__un_args_eq (const unsigned short, *(b)), \
9058       ((__vector unsigned short) __builtin_altivec_lvx ((a), (b))), \
9059 __ch (__un_args_eq (const __vector signed short, *(b)), \
9060       ((__vector signed short) __builtin_altivec_lvx ((a), (b))), \
9061 __ch (__un_args_eq (const short, *(b)), \
9062       ((__vector signed short) __builtin_altivec_lvx ((a), (b))), \
9063 __ch (__un_args_eq (const __vector bool short, *(b)), \
9064       ((__vector bool short) __builtin_altivec_lvx ((a), (b))), \
9065 __ch (__un_args_eq (const __vector pixel, *(b)), \
9066       ((__vector pixel) __builtin_altivec_lvx ((a), (b))), \
9067 __ch (__un_args_eq (const __vector unsigned int, *(b)), \
9068       ((__vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
9069 __ch (__un_args_eq (const unsigned int, *(b)), \
9070       ((__vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
9071 __ch (__un_args_eq (const unsigned long, *(b)), \
9072       ((__vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
9073 __ch (__un_args_eq (const __vector signed int, *(b)), \
9074       ((__vector signed int) __builtin_altivec_lvx ((a), (b))), \
9075 __ch (__un_args_eq (const int, *(b)), \
9076       ((__vector signed int) __builtin_altivec_lvx ((a), (b))), \
9077 __ch (__un_args_eq (const long, *(b)), \
9078       ((__vector signed int) __builtin_altivec_lvx ((a), (b))), \
9079 __ch (__un_args_eq (const __vector bool int, *(b)), \
9080       ((__vector bool int) __builtin_altivec_lvx ((a), (b))), \
9081 __ch (__un_args_eq (const __vector float, *(b)), \
9082       ((__vector float) __builtin_altivec_lvx ((a), (b))), \
9083 __ch (__un_args_eq (const float, *(b)), \
9084       ((__vector float) __builtin_altivec_lvx ((a), (b))), \
9085 __builtin_altivec_compiletime_error ("vec_ld")))))))))))))))))))))
9086
9087 #define vec_lde(a, b) \
9088 __ch (__un_args_eq (const unsigned char, *(b)), \
9089       ((__vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \
9090 __ch (__un_args_eq (const signed char, *(b)), \
9091       ((__vector signed char) __builtin_altivec_lvebx ((a), (b))), \
9092 __ch (__un_args_eq (const unsigned short, *(b)), \
9093       ((__vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \
9094 __ch (__un_args_eq (const short, *(b)), \
9095       ((__vector signed short) __builtin_altivec_lvehx ((a), (b))), \
9096 __ch (__un_args_eq (const unsigned long, *(b)), \
9097       ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
9098 __ch (__un_args_eq (const long, *(b)), \
9099       ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \
9100 __ch (__un_args_eq (const unsigned int, *(b)), \
9101       ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
9102 __ch (__un_args_eq (const int, *(b)), \
9103       ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \
9104 __ch (__un_args_eq (const float, *(b)), \
9105       ((__vector float) __builtin_altivec_lvewx ((a), (b))), \
9106 __builtin_altivec_compiletime_error ("vec_lde"))))))))))
9107
9108 #define vec_lvewx(a, b) \
9109 __ch (__un_args_eq (unsigned int, *(b)), \
9110       ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
9111 __ch (__un_args_eq (signed int, *(b)), \
9112       ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \
9113 __ch (__un_args_eq (unsigned long, *(b)), \
9114       ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
9115 __ch (__un_args_eq (signed long, *(b)), \
9116       ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \
9117 __ch (__un_args_eq (float, *(b)), \
9118       ((__vector float) __builtin_altivec_lvewx ((a), (b))), \
9119 __builtin_altivec_compiletime_error ("vec_lvewx"))))))
9120
9121 #define vec_lvehx(a, b) \
9122 __ch (__un_args_eq (unsigned short, *(b)), \
9123       ((__vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \
9124 __ch (__un_args_eq (signed short, *(b)), \
9125       ((__vector signed short) __builtin_altivec_lvehx ((a), (b))), \
9126 __builtin_altivec_compiletime_error ("vec_lvehx")))
9127
9128 #define vec_lvebx(a, b) \
9129 __ch (__un_args_eq (unsigned char, *(b)), \
9130       ((__vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \
9131 __ch (__un_args_eq (signed char, *(b)), \
9132       ((__vector signed char) __builtin_altivec_lvebx ((a), (b))), \
9133 __builtin_altivec_compiletime_error ("vec_lvebx")))
9134
9135 #define vec_ldl(a, b) \
9136 __ch (__un_args_eq (const __vector unsigned char, *(b)), \
9137       ((__vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \
9138 __ch (__un_args_eq (const unsigned char, *(b)), \
9139       ((__vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \
9140 __ch (__un_args_eq (const __vector signed char, *(b)), \
9141       ((__vector signed char) __builtin_altivec_lvxl ((a), (b))), \
9142 __ch (__un_args_eq (const signed char, *(b)), \
9143       ((__vector signed char) __builtin_altivec_lvxl ((a), (b))), \
9144 __ch (__un_args_eq (const __vector bool char, *(b)), \
9145       ((__vector bool char) __builtin_altivec_lvxl ((a), (b))), \
9146 __ch (__un_args_eq (const __vector unsigned short, *(b)), \
9147       ((__vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \
9148 __ch (__un_args_eq (const unsigned short, *(b)), \
9149       ((__vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \
9150 __ch (__un_args_eq (const __vector signed short, *(b)), \
9151       ((__vector signed short) __builtin_altivec_lvxl ((a), (b))), \
9152 __ch (__un_args_eq (const short, *(b)), \
9153       ((__vector signed short) __builtin_altivec_lvxl ((a), (b))), \
9154 __ch (__un_args_eq (const __vector bool short, *(b)), \
9155       ((__vector bool short) __builtin_altivec_lvxl ((a), (b))), \
9156 __ch (__un_args_eq (const __vector pixel, *(b)), \
9157       ((__vector pixel) __builtin_altivec_lvxl ((a), (b))), \
9158 __ch (__un_args_eq (const __vector unsigned int, *(b)), \
9159       ((__vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
9160 __ch (__un_args_eq (const unsigned int, *(b)), \
9161       ((__vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
9162 __ch (__un_args_eq (const unsigned long, *(b)), \
9163       ((__vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
9164 __ch (__un_args_eq (const __vector signed int, *(b)), \
9165       ((__vector signed int) __builtin_altivec_lvxl ((a), (b))), \
9166 __ch (__un_args_eq (const int, *(b)), \
9167       ((__vector signed int) __builtin_altivec_lvxl ((a), (b))), \
9168 __ch (__un_args_eq (const long, *(b)), \
9169       ((__vector signed int) __builtin_altivec_lvxl ((a), (b))), \
9170 __ch (__un_args_eq (const __vector bool int, *(b)), \
9171       ((__vector bool int) __builtin_altivec_lvxl ((a), (b))), \
9172 __ch (__un_args_eq (const __vector float, *(b)), \
9173       ((__vector float) __builtin_altivec_lvxl ((a), (b))), \
9174 __ch (__un_args_eq (const float, *(b)), \
9175       ((__vector float) __builtin_altivec_lvxl ((a), (b))), \
9176 __builtin_altivec_compiletime_error ("vec_ldl")))))))))))))))))))))
9177
9178 #define vec_loge(a1) \
9179 __ch (__un_args_eq (__vector float, (a1)), \
9180       ((__vector float) __builtin_altivec_vlogefp ((__vector float) (a1))), \
9181   __builtin_altivec_compiletime_error ("vec_loge"))
9182
9183 #define vec_lvsl(a1, a2) \
9184 __ch (__un_args_eq (const volatile unsigned char, *(a2)), \
9185       ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9186 __ch (__un_args_eq (const volatile signed char, *(a2)), \
9187       ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9188 __ch (__un_args_eq (const volatile unsigned short, *(a2)), \
9189       ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9190 __ch (__un_args_eq (const volatile signed short, *(a2)), \
9191       ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9192 __ch (__un_args_eq (const volatile unsigned int, *(a2)), \
9193       ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9194 __ch (__un_args_eq (const volatile signed int, *(a2)), \
9195       ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9196 __ch (__un_args_eq (const volatile unsigned long, *(a2)), \
9197       ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9198 __ch (__un_args_eq (const volatile signed long, *(a2)), \
9199       ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9200 __ch (__un_args_eq (const volatile float, *(a2)), \
9201       ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9202 __builtin_altivec_compiletime_error ("vec_lvsl"))))))))))
9203
9204 #define vec_lvsr(a1, a2) \
9205 __ch (__un_args_eq (const volatile unsigned char, *(a2)), \
9206       ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9207 __ch (__un_args_eq (const volatile signed char, *(a2)), \
9208       ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9209 __ch (__un_args_eq (const volatile unsigned short, *(a2)), \
9210       ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9211 __ch (__un_args_eq (const volatile signed short, *(a2)), \
9212       ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9213 __ch (__un_args_eq (const volatile unsigned int, *(a2)), \
9214       ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9215 __ch (__un_args_eq (const volatile signed int, *(a2)), \
9216       ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9217 __ch (__un_args_eq (const volatile unsigned long, *(a2)), \
9218       ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9219 __ch (__un_args_eq (const volatile signed long, *(a2)), \
9220       ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9221 __ch (__un_args_eq (const volatile float, *(a2)), \
9222       ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9223 __builtin_altivec_compiletime_error ("vec_lvsr"))))))))))
9224
9225 #define vec_madd(a1, a2, a3) \
9226 __ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector float, (a3)), \
9227       ((__vector float) __builtin_altivec_vmaddfp ((a1), (a2), (a3))), \
9228 __builtin_altivec_compiletime_error ("vec_madd"))
9229
9230 #define vec_madds(a1, a2, a3) \
9231 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \
9232       ((__vector signed short) __builtin_altivec_vmhaddshs ((a1), (a2), (a3))), \
9233 __builtin_altivec_compiletime_error ("vec_madds"))
9234
9235 #define vec_max(a1, a2) \
9236 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
9237       ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9238 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
9239       ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9240 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9241       ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9242 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
9243       ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9244 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
9245       ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9246 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9247       ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9248 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
9249       ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9250 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
9251       ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9252 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9253       ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9254 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
9255       ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9256 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
9257       ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9258 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9259       ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9260 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
9261       ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9262 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
9263       ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9264 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9265       ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9266 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
9267       ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9268 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
9269       ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9270 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9271       ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9272 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9273       ((__vector float) __builtin_altivec_vmaxfp ((__vector float) (a1), (__vector float) (a2))), \
9274     __builtin_altivec_compiletime_error ("vec_max"))))))))))))))))))))
9275
9276 #define vec_vmaxfp(a1, a2) \
9277 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9278       ((__vector float) __builtin_altivec_vmaxfp ((__vector float) (a1), (__vector float) (a2))), \
9279 __builtin_altivec_compiletime_error ("vec_vmaxfp"))
9280
9281 #define vec_vmaxsw(a1, a2) \
9282 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
9283       ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9284 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
9285       ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9286 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9287       ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9288 __builtin_altivec_compiletime_error ("vec_vmaxsw"))))
9289
9290 #define vec_vmaxuw(a1, a2) \
9291 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
9292       ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9293 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
9294       ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9295 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9296       ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9297 __builtin_altivec_compiletime_error ("vec_vmaxuw"))))
9298
9299 #define vec_vmaxsh(a1, a2) \
9300 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
9301       ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9302 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
9303       ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9304 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9305       ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9306 __builtin_altivec_compiletime_error ("vec_vmaxsh"))))
9307
9308 #define vec_vmaxuh(a1, a2) \
9309 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
9310       ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9311 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
9312       ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9313 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9314       ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9315 __builtin_altivec_compiletime_error ("vec_vmaxuh"))))
9316
9317 #define vec_vmaxsb(a1, a2) \
9318 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
9319       ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9320 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
9321       ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9322 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9323       ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9324 __builtin_altivec_compiletime_error ("vec_vmaxsb"))))
9325
9326 #define vec_vmaxub(a1, a2) \
9327 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
9328       ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9329 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
9330       ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9331 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9332       ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9333 __builtin_altivec_compiletime_error ("vec_vmaxub"))))
9334
9335 #define vec_mergeh(a1, a2) \
9336 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9337       ((__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9338 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9339       ((__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9340 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
9341       ((__vector bool char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9342 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9343       ((__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9344 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9345       ((__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9346 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
9347       ((__vector bool short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9348 __ch (__bin_args_eq (__vector pixel, (a1), __vector pixel, (a2)), \
9349       ((__vector pixel) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9350 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9351       ((__vector float) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9352 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9353       ((__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9354 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9355       ((__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9356 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
9357       ((__vector bool int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9358     __builtin_altivec_compiletime_error ("vec_mergeh"))))))))))))
9359
9360 #define vec_vmrghw(a1, a2) \
9361 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9362       ((__vector float) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9363 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
9364       ((__vector bool int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9365 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9366       ((__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9367 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9368       ((__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9369 __builtin_altivec_compiletime_error ("vec_vmrghw")))))
9370
9371 #define vec_vmrghh(a1, a2) \
9372 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
9373       ((__vector bool short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9374 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9375       ((__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9376 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9377       ((__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9378 __ch (__bin_args_eq (__vector pixel, (a1), __vector pixel, (a2)), \
9379       ((__vector pixel) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9380 __builtin_altivec_compiletime_error ("vec_vmrghh")))))
9381
9382 #define vec_vmrghb(a1, a2) \
9383 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
9384       ((__vector bool char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9385 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9386       ((__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9387 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9388       ((__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9389 __builtin_altivec_compiletime_error ("vec_vmrghb"))))
9390
9391 #define vec_mergel(a1, a2) \
9392 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9393       ((__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9394 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9395       ((__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9396 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
9397       ((__vector bool char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9398 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9399       ((__vector signed short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9400 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9401       ((__vector unsigned short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9402 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
9403       ((__vector bool short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9404 __ch (__bin_args_eq (__vector pixel, (a1), __vector pixel, (a2)), \
9405       ((__vector pixel) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9406 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9407       ((__vector float) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9408 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9409       ((__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9410 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9411       ((__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9412 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
9413       ((__vector bool int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9414     __builtin_altivec_compiletime_error ("vec_mergel"))))))))))))
9415
9416 #define vec_vmrglw(a1, a2) \
9417 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9418       ((__vector float) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9419 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9420       ((__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9421 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9422       ((__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9423 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
9424       ((__vector bool int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9425 __builtin_altivec_compiletime_error ("vec_vmrglw")))))
9426
9427 #define vec_vmrglh(a1, a2) \
9428 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
9429       ((__vector bool short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9430 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9431       ((__vector signed short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9432 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9433       ((__vector unsigned short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9434 __ch (__bin_args_eq (__vector pixel, (a1), __vector pixel, (a2)), \
9435       ((__vector pixel) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9436 __builtin_altivec_compiletime_error ("vec_vmrglh")))))
9437
9438 #define vec_vmrglb(a1, a2) \
9439 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
9440       ((__vector bool char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9441 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9442       ((__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9443 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9444       ((__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9445 __builtin_altivec_compiletime_error ("vec_vmrglb"))))
9446
9447 #define vec_mfvscr()  (((__vector unsigned short) __builtin_altivec_mfvscr ()))
9448
9449 #define vec_min(a1, a2) \
9450 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
9451       ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9452 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
9453       ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9454 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9455       ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9456 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
9457       ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9458 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
9459       ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9460 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9461       ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9462 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
9463       ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9464 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
9465       ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9466 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9467       ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9468 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
9469       ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9470 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
9471       ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9472 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9473       ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9474 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
9475       ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9476 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
9477       ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9478 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9479       ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9480 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
9481       ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9482 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
9483       ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9484 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9485       ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9486 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9487       ((__vector float) __builtin_altivec_vminfp ((__vector float) (a1), (__vector float) (a2))), \
9488     __builtin_altivec_compiletime_error ("vec_min"))))))))))))))))))))
9489
9490 #define vec_vminfp(a1, a2) \
9491 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9492       ((__vector float) __builtin_altivec_vminfp ((__vector float) (a1), (__vector float) (a2))), \
9493 __builtin_altivec_compiletime_error ("vec_vminfp"))
9494
9495 #define vec_vminsw(a1, a2) \
9496 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
9497       ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9498 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
9499       ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9500 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9501       ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9502 __builtin_altivec_compiletime_error ("vec_vminsw"))))
9503
9504 #define vec_vminuw(a1, a2) \
9505 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
9506       ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9507 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
9508       ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9509 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9510       ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9511 __builtin_altivec_compiletime_error ("vec_vminuw"))))
9512
9513 #define vec_vminsh(a1, a2) \
9514 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
9515       ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9516 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
9517       ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9518 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9519       ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9520 __builtin_altivec_compiletime_error ("vec_vminsh"))))
9521
9522 #define vec_vminuh(a1, a2) \
9523 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
9524       ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9525 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
9526       ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9527 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9528       ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9529 __builtin_altivec_compiletime_error ("vec_vminuh"))))
9530
9531 #define vec_vminsb(a1, a2) \
9532 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
9533       ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9534 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
9535       ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9536 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9537       ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9538 __builtin_altivec_compiletime_error ("vec_minsb"))))
9539
9540 #define vec_vminub(a1, a2) \
9541 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
9542       ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9543 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
9544       ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9545 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9546       ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9547 __builtin_altivec_compiletime_error ("vec_vminub"))))
9548
9549 #define vec_mladd(a1, a2, a3) \
9550 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \
9551       ((__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \
9552 __ch (__tern_args_eq (__vector signed short, (a1), __vector unsigned short, (a2), __vector unsigned short, (a3)), \
9553       ((__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \
9554 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \
9555       ((__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \
9556 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned short, (a3)), \
9557       ((__vector unsigned short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \
9558     __builtin_altivec_compiletime_error ("vec_mladd")))))
9559
9560 #define vec_mradds(a1, a2, a3) \
9561 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \
9562       ((__vector signed short) __builtin_altivec_vmhraddshs ((a1), (a2), (a3))), \
9563 __builtin_altivec_compiletime_error ("vec_mradds"))
9564
9565 #define vec_msum(a1, a2, a3) \
9566 __ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned int, (a3)), \
9567       ((__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \
9568 __ch (__tern_args_eq (__vector signed char, (a1), __vector unsigned char, (a2), __vector signed int, (a3)), \
9569       ((__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \
9570 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \
9571       ((__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9572 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \
9573       ((__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9574     __builtin_altivec_compiletime_error ("vec_msum")))))
9575
9576 #define vec_vmsumshm(a1, a2, a3) \
9577 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \
9578       ((__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9579 __builtin_altivec_compiletime_error ("vec_vmsumshm"))
9580
9581 #define vec_vmsumuhm(a1, a2, a3) \
9582 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \
9583       ((__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9584 __builtin_altivec_compiletime_error ("vec_vmsumuhm"))
9585
9586 #define vec_vmsummbm(a1, a2, a3) \
9587 __ch (__tern_args_eq (__vector signed char, (a1), __vector unsigned char, (a2), __vector signed int, (a3)), \
9588       ((__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \
9589 __builtin_altivec_compiletime_error ("vec_vmsummbm"))
9590
9591 #define vec_vmsumubm(a1, a2, a3) \
9592 __ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned int, (a3)), \
9593       ((__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \
9594 __builtin_altivec_compiletime_error ("vec_vmsummbm"))
9595
9596 #define vec_msums(a1, a2, a3) \
9597 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \
9598       ((__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9599 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \
9600       ((__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9601     __builtin_altivec_compiletime_error ("vec_msums")))
9602
9603 #define vec_vmsumshs(a1, a2, a3) \
9604 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \
9605       ((__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9606 __builtin_altivec_compiletime_error ("vec_vmsumshs"))
9607
9608 #define vec_vmsumuhs(a1, a2, a3) \
9609 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \
9610       ((__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9611 __builtin_altivec_compiletime_error ("vec_vmsumuhs"))
9612
9613 #define vec_mtvscr(a1) \
9614 __ch (__un_args_eq (__vector signed int, (a1)), \
9615       __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9616 __ch (__un_args_eq (__vector unsigned int, (a1)), \
9617       __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9618 __ch (__un_args_eq (__vector bool int, (a1)), \
9619       __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9620 __ch (__un_args_eq (__vector signed short, (a1)), \
9621       __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9622 __ch (__un_args_eq (__vector unsigned short, (a1)), \
9623       __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9624 __ch (__un_args_eq (__vector bool short, (a1)), \
9625       __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9626 __ch (__un_args_eq (__vector pixel, (a1)), \
9627       __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9628 __ch (__un_args_eq (__vector signed char, (a1)), \
9629       __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9630 __ch (__un_args_eq (__vector unsigned char, (a1)), \
9631       __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9632 __ch (__un_args_eq (__vector bool char, (a1)), \
9633       __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9634     __builtin_altivec_compiletime_error ("vec_mtvscr")))))))))))
9635
9636 #define vec_mule(a1, a2) \
9637 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9638       ((__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9639 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9640       ((__vector signed short) __builtin_altivec_vmulesb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9641 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9642       ((__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9643 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9644       ((__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9645     __builtin_altivec_compiletime_error ("vec_mule")))))
9646
9647 #define vec_vmulesh(a1, a2) \
9648 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9649       ((__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9650 __builtin_altivec_compiletime_error ("vec_vmulesh"))
9651
9652 #define vec_vmuleuh(a1, a2) \
9653 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9654       ((__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9655 __builtin_altivec_compiletime_error ("vec_vmuleuh"))
9656
9657 #define vec_vmulesb(a1, a2) \
9658 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9659       ((__vector signed short) __builtin_altivec_vmulesb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9660 __builtin_altivec_compiletime_error ("vec_vmulesb"))
9661
9662 #define vec_vmuleub(a1, a2) \
9663 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9664       ((__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9665 __builtin_altivec_compiletime_error ("vec_vmuleub"))
9666
9667 #define vec_mulo(a1, a2) \
9668 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9669       ((__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9670 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9671       ((__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9672 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9673       ((__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9674 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9675       ((__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9676     __builtin_altivec_compiletime_error ("vec_mulo")))))
9677
9678 #define vec_vmulosh(a1, a2) \
9679 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9680       ((__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9681 __builtin_altivec_compiletime_error ("vec_vmulosh"))
9682
9683 #define vec_vmulouh(a1, a2) \
9684 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9685       ((__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9686 __builtin_altivec_compiletime_error ("vec_vmulouh"))
9687
9688 #define vec_vmulosb(a1, a2) \
9689 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9690       ((__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9691 __builtin_altivec_compiletime_error ("vec_vmulosb"))
9692
9693 #define vec_vmuloub(a1, a2) \
9694 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9695       ((__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9696 __builtin_altivec_compiletime_error ("vec_vmuloub"))
9697
9698 #define vec_nmsub(a1, a2, a3) \
9699 __ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector float, (a3)), \
9700       ((__vector float) __builtin_altivec_vnmsubfp ((__vector float) (a1), (__vector float) (a2), (__vector float) (a3))), \
9701     __builtin_altivec_compiletime_error ("vec_nmsub"))
9702
9703 #define vec_nor(a1, a2) \
9704 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9705       ((__vector float) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9706 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9707       ((__vector signed int) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9708 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9709       ((__vector unsigned int) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9710 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
9711       ((__vector bool int) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9712 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9713       ((__vector signed short) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9714 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9715       ((__vector unsigned short) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9716 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
9717       ((__vector bool short) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9718 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9719       ((__vector signed char) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9720 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9721       ((__vector unsigned char) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9722 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
9723       ((__vector bool char) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9724     __builtin_altivec_compiletime_error ("vec_nor")))))))))))
9725
9726 #define vec_or(a1, a2) \
9727 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9728       ((__vector float) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9729 __ch (__bin_args_eq (__vector float, (a1), __vector bool int, (a2)), \
9730       ((__vector float) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9731 __ch (__bin_args_eq (__vector bool int, (a1), __vector float, (a2)), \
9732       ((__vector float) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9733 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
9734       ((__vector bool int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9735 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
9736       ((__vector signed int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9737 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
9738       ((__vector signed int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9739 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9740       ((__vector signed int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9741 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
9742       ((__vector unsigned int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9743 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
9744       ((__vector unsigned int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9745 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9746       ((__vector unsigned int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9747 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
9748       ((__vector bool short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9749 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
9750       ((__vector signed short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9751 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
9752       ((__vector signed short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9753 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9754       ((__vector signed short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9755 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
9756       ((__vector unsigned short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9757 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
9758       ((__vector unsigned short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9759 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9760       ((__vector unsigned short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9761 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
9762       ((__vector bool char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9763 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
9764       ((__vector signed char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9765 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
9766       ((__vector signed char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9767 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9768       ((__vector signed char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9769 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
9770       ((__vector unsigned char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9771 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
9772       ((__vector unsigned char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9773 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9774       ((__vector unsigned char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9775     __builtin_altivec_compiletime_error ("vec_or")))))))))))))))))))))))))
9776
9777 #define vec_pack(a1, a2) \
9778 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9779       ((__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9780 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9781       ((__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9782 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
9783       ((__vector bool char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9784 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9785       ((__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9786 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9787       ((__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9788 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
9789       ((__vector bool short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9790     __builtin_altivec_compiletime_error ("vec_pack")))))))
9791
9792 #define vec_vpkuwum(a1, a2) \
9793 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
9794       ((__vector bool short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9795 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9796       ((__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9797 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9798       ((__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9799 __builtin_altivec_compiletime_error ("vec_vpkuwum"))))
9800
9801 #define vec_vpkuhum(a1, a2) \
9802 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
9803       ((__vector bool char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9804 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9805       ((__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9806 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9807       ((__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9808 __builtin_altivec_compiletime_error ("vec_vpkuhum"))))
9809
9810 #define vec_packpx(a1, a2) \
9811 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9812   ((__vector pixel) __builtin_altivec_vpkpx ((__vector signed int) (a1), (__vector signed int) (a2))), \
9813 __builtin_altivec_compiletime_error ("vec_packpx"))
9814
9815 #define vec_packs(a1, a2) \
9816 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9817       ((__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) (a1), (__vector signed short) (a2))), \
9818 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9819       ((__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) (a1), (__vector signed short) (a2))), \
9820 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9821       ((__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) (a1), (__vector signed int) (a2))), \
9822 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9823       ((__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) (a1), (__vector signed int) (a2))), \
9824     __builtin_altivec_compiletime_error ("vec_packs")))))
9825
9826 #define vec_vpkswss(a1, a2) \
9827 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9828       ((__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) (a1), (__vector signed int) (a2))), \
9829 __builtin_altivec_compiletime_error ("vec_vpkswss"))
9830
9831 #define vec_vpkuwus(a1, a2) \
9832 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9833       ((__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) (a1), (__vector signed int) (a2))), \
9834 __builtin_altivec_compiletime_error ("vec_vpkuwus"))
9835
9836 #define vec_vpkshss(a1, a2) \
9837 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9838       ((__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) (a1), (__vector signed short) (a2))), \
9839 __builtin_altivec_compiletime_error ("vec_vpkshss"))
9840
9841 #define vec_vpkuhus(a1, a2) \
9842 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9843       ((__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) (a1), (__vector signed short) (a2))), \
9844 __builtin_altivec_compiletime_error ("vec_vpkuhus"))
9845
9846 #define vec_packsu(a1, a2) \
9847 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9848       ((__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) (a1), (__vector signed short) (a2))), \
9849 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9850       ((__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) (a1), (__vector signed short) (a2))), \
9851 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9852       ((__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) (a1), (__vector signed int) (a2))), \
9853 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9854       ((__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) (a1), (__vector signed int) (a2))), \
9855     __builtin_altivec_compiletime_error ("vec_packsu")))))
9856
9857 #define vec_vpkswus(a1, a2) \
9858 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9859       ((__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) (a1), (__vector signed int) (a2))), \
9860 __builtin_altivec_compiletime_error ("vec_vpkswus"))
9861
9862 #define vec_vpkshus(a1, a2) \
9863 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9864       ((__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) (a1), (__vector signed short) (a2))), \
9865 __builtin_altivec_compiletime_error ("vec_vpkshus"))
9866
9867 #define vec_perm(a1, a2, a3) \
9868 __ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector unsigned char, (a3)), \
9869       ((__vector float) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9870 __ch (__tern_args_eq (__vector signed int, (a1), __vector signed int, (a2), __vector unsigned char, (a3)), \
9871       ((__vector signed int) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9872 __ch (__tern_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2), __vector unsigned char, (a3)), \
9873       ((__vector unsigned int) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9874 __ch (__tern_args_eq (__vector bool int, (a1), __vector bool int, (a2), __vector unsigned char, (a3)), \
9875       ((__vector bool int) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9876 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector unsigned char, (a3)), \
9877       ((__vector signed short) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9878 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned char, (a3)), \
9879       ((__vector unsigned short) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9880 __ch (__tern_args_eq (__vector bool short, (a1), __vector bool short, (a2), __vector unsigned char, (a3)), \
9881       ((__vector bool short) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9882 __ch (__tern_args_eq (__vector pixel, (a1), __vector pixel, (a2), __vector unsigned char, (a3)), \
9883       ((__vector pixel) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9884 __ch (__tern_args_eq (__vector signed char, (a1), __vector signed char, (a2), __vector unsigned char, (a3)), \
9885       ((__vector signed char) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9886 __ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned char, (a3)), \
9887       ((__vector unsigned char) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9888 __ch (__tern_args_eq (__vector bool char, (a1), __vector bool char, (a2), __vector unsigned char, (a3)), \
9889       ((__vector bool char) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9890     __builtin_altivec_compiletime_error ("vec_perm"))))))))))))
9891
9892 #define vec_re(a1) \
9893 __ch (__un_args_eq (__vector float, (a1)), \
9894       ((__vector float) __builtin_altivec_vrefp ((__vector float) (a1))), \
9895 __builtin_altivec_compiletime_error ("vec_re"))
9896
9897 #define vec_rl(a1, a2) \
9898 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
9899       ((__vector signed char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9900 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9901       ((__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9902 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
9903       ((__vector signed short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9904 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9905       ((__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9906 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
9907       ((__vector signed int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9908 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9909       ((__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9910     __builtin_altivec_compiletime_error ("vec_rl")))))))
9911
9912 #define vec_vrlw(a1, a2) \
9913 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
9914       ((__vector signed int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9915 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9916       ((__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9917 __builtin_altivec_compiletime_error ("vec_vrlw")))
9918
9919 #define vec_vrlh(a1, a2) \
9920 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
9921       ((__vector signed short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9922 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9923       ((__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9924 __builtin_altivec_compiletime_error ("vec_vrlh")))
9925
9926 #define vec_vrlb(a1, a2) \
9927 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
9928       ((__vector signed char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9929 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9930       ((__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9931 __builtin_altivec_compiletime_error ("vec_vrlb")))
9932
9933 #define vec_round(a1) \
9934 __ch (__un_args_eq (__vector float, (a1)), \
9935       ((__vector float) __builtin_altivec_vrfin ((__vector float) (a1))), \
9936 __builtin_altivec_compiletime_error ("vec_round"))
9937
9938 #define vec_rsqrte(a1) \
9939 __ch (__un_args_eq (__vector float, (a1)), \
9940       ((__vector float) __builtin_altivec_vrsqrtefp ((__vector float) (a1))), \
9941 __builtin_altivec_compiletime_error ("vec_rsqrte"))
9942
9943 #define vec_sel(a1, a2, a3) \
9944 __ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector bool int, (a3)), \
9945       ((__vector float) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9946 __ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector unsigned int, (a3)), \
9947       ((__vector float) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9948 __ch (__tern_args_eq (__vector bool int, (a1), __vector bool int, (a2), __vector bool int, (a3)), \
9949       ((__vector bool int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9950 __ch (__tern_args_eq (__vector bool int, (a1), __vector bool int, (a2), __vector unsigned int, (a3)), \
9951       ((__vector bool int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9952 __ch (__tern_args_eq (__vector signed int, (a1), __vector signed int, (a2), __vector bool int, (a3)), \
9953       ((__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9954 __ch (__tern_args_eq (__vector signed int, (a1), __vector signed int, (a2), __vector unsigned int, (a3)), \
9955       ((__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9956 __ch (__tern_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2), __vector bool int, (a3)), \
9957       ((__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9958 __ch (__tern_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2), __vector unsigned int, (a3)), \
9959       ((__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9960 __ch (__tern_args_eq (__vector bool short, (a1), __vector bool short, (a2), __vector bool short, (a3)), \
9961       ((__vector bool short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9962 __ch (__tern_args_eq (__vector bool short, (a1), __vector bool short, (a2), __vector unsigned short, (a3)), \
9963       ((__vector bool short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9964 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector bool short, (a3)), \
9965       ((__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9966 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector unsigned short, (a3)), \
9967       ((__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9968 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector bool short, (a3)), \
9969       ((__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9970 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned short, (a3)), \
9971       ((__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9972 __ch (__tern_args_eq (__vector bool char, (a1), __vector bool char, (a2), __vector bool char, (a3)), \
9973       ((__vector bool char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9974 __ch (__tern_args_eq (__vector bool char, (a1), __vector bool char, (a2), __vector unsigned char, (a3)), \
9975       ((__vector bool char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9976 __ch (__tern_args_eq (__vector signed char, (a1), __vector signed char, (a2), __vector bool char, (a3)), \
9977       ((__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9978 __ch (__tern_args_eq (__vector signed char, (a1), __vector signed char, (a2), __vector unsigned char, (a3)), \
9979       ((__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9980 __ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector bool char, (a3)), \
9981       ((__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9982 __ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned char, (a3)), \
9983       ((__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
9984     __builtin_altivec_compiletime_error ("vec_sel")))))))))))))))))))))
9985
9986 #define vec_sl(a1, a2) \
9987 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
9988       ((__vector signed char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9989 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9990       ((__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9991 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
9992       ((__vector signed short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9993 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9994       ((__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9995 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
9996       ((__vector signed int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9997 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9998       ((__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9999     __builtin_altivec_compiletime_error ("vec_sl")))))))
10000
10001 #define vec_vslw(a1, a2) \
10002 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10003       ((__vector signed int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10004 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10005       ((__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10006 __builtin_altivec_compiletime_error ("vec_vslw")))
10007
10008 #define vec_vslh(a1, a2) \
10009 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10010       ((__vector signed short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10011 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10012       ((__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10013 __builtin_altivec_compiletime_error ("vec_vslh")))
10014
10015 #define vec_vslb(a1, a2) \
10016 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10017       ((__vector signed char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10018 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10019       ((__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10020 __builtin_altivec_compiletime_error ("vec_vslb")))
10021
10022 #define vec_sld(a1, a2, a3) \
10023 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
10024       ((__vector float) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10025 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10026       ((__vector signed int) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10027 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10028       ((__vector unsigned int) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10029 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
10030       ((__vector bool int) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10031 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10032       ((__vector signed short) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10033 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10034       ((__vector unsigned short) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10035 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
10036       ((__vector bool short) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10037 __ch (__bin_args_eq (__vector pixel, (a1), __vector pixel, (a2)), \
10038       ((__vector pixel) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10039 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10040       ((__vector signed char) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10041 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10042       ((__vector unsigned char) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10043 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
10044       ((__vector bool char) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10045     __builtin_altivec_compiletime_error ("vec_sld"))))))))))))
10046
10047 #define vec_sll(a1, a2) \
10048 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10049       ((__vector signed int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10050 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned short, (a2)), \
10051       ((__vector signed int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10052 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \
10053       ((__vector signed int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10054 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10055       ((__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10056 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned short, (a2)), \
10057       ((__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10058 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \
10059       ((__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10060 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
10061       ((__vector bool int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10062 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned short, (a2)), \
10063       ((__vector bool int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10064 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned char, (a2)), \
10065       ((__vector bool int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10066 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned int, (a2)), \
10067       ((__vector signed short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10068 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10069       ((__vector signed short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10070 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \
10071       ((__vector signed short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10072 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned int, (a2)), \
10073       ((__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10074 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10075       ((__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10076 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \
10077       ((__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10078 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned int, (a2)), \
10079       ((__vector bool short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10080 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
10081       ((__vector bool short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10082 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned char, (a2)), \
10083       ((__vector bool short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10084 __ch (__bin_args_eq (__vector pixel, (a1), __vector unsigned int, (a2)), \
10085       ((__vector pixel) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10086 __ch (__bin_args_eq (__vector pixel, (a1), __vector unsigned short, (a2)), \
10087       ((__vector pixel) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10088 __ch (__bin_args_eq (__vector pixel, (a1), __vector unsigned char, (a2)), \
10089       ((__vector pixel) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10090 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned int, (a2)), \
10091       ((__vector signed char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10092 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned short, (a2)), \
10093       ((__vector signed char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10094 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10095       ((__vector signed char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10096 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \
10097       ((__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10098 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned short, (a2)), \
10099       ((__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10100 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10101       ((__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10102 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned int, (a2)), \
10103       ((__vector bool char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10104 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned short, (a2)), \
10105       ((__vector bool char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10106 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
10107       ((__vector bool char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10108     __builtin_altivec_compiletime_error ("vec_sll")))))))))))))))))))))))))))))))
10109
10110 #define vec_slo(a1, a2) \
10111 __ch (__bin_args_eq (__vector float, (a1), __vector signed char, (a2)), \
10112       ((__vector float) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10113 __ch (__bin_args_eq (__vector float, (a1), __vector unsigned char, (a2)), \
10114       ((__vector float) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10115 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed char, (a2)), \
10116       ((__vector signed int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10117 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \
10118       ((__vector signed int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10119 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed char, (a2)), \
10120       ((__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10121 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \
10122       ((__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10123 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed char, (a2)), \
10124       ((__vector signed short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10125 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \
10126       ((__vector signed short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10127 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed char, (a2)), \
10128       ((__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10129 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \
10130       ((__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10131 __ch (__bin_args_eq (__vector pixel, (a1), __vector signed char, (a2)), \
10132       ((__vector pixel) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10133 __ch (__bin_args_eq (__vector pixel, (a1), __vector unsigned char, (a2)), \
10134       ((__vector pixel) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10135 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10136       ((__vector signed char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10137 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10138       ((__vector signed char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10139 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \
10140       ((__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10141 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10142       ((__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10143     __builtin_altivec_compiletime_error ("vec_slo")))))))))))))))))
10144
10145 #define vec_splat(a1, a2) \
10146 __ch (__un_args_eq (__vector signed char, (a1)), \
10147       ((__vector signed char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10148 __ch (__un_args_eq (__vector unsigned char, (a1)), \
10149       ((__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10150 __ch (__un_args_eq (__vector bool char, (a1)), \
10151       ((__vector bool char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10152 __ch (__un_args_eq (__vector signed short, (a1)), \
10153       ((__vector signed short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10154 __ch (__un_args_eq (__vector unsigned short, (a1)), \
10155       ((__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10156 __ch (__un_args_eq (__vector bool short, (a1)), \
10157       ((__vector bool short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10158 __ch (__un_args_eq (__vector pixel, (a1)), \
10159       ((__vector pixel) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10160 __ch (__un_args_eq (__vector float, (a1)), \
10161       ((__vector float) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10162 __ch (__un_args_eq (__vector signed int, (a1)), \
10163       ((__vector signed int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10164 __ch (__un_args_eq (__vector unsigned int, (a1)), \
10165       ((__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10166 __ch (__un_args_eq (__vector bool int, (a1)), \
10167       ((__vector bool int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10168     __builtin_altivec_compiletime_error ("vec_splat"))))))))))))
10169
10170 #define vec_vspltw(a1, a2) \
10171 __ch (__un_args_eq (__vector float, (a1)), \
10172       ((__vector float) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10173 __ch (__un_args_eq (__vector bool int, (a1)), \
10174       ((__vector bool int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10175 __ch (__un_args_eq (__vector signed int, (a1)), \
10176       ((__vector signed int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10177 __ch (__un_args_eq (__vector unsigned int, (a1)), \
10178       ((__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10179 __builtin_altivec_compiletime_error ("vec_vspltw")))))
10180
10181 #define vec_vsplth(a1, a2) \
10182 __ch (__un_args_eq (__vector bool short, (a1)), \
10183       ((__vector bool short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10184 __ch (__un_args_eq (__vector signed short, (a1)), \
10185       ((__vector signed short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10186 __ch (__un_args_eq (__vector unsigned short, (a1)), \
10187       ((__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10188 __ch (__un_args_eq (__vector pixel, (a1)), \
10189       ((__vector pixel) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10190 __builtin_altivec_compiletime_error ("vec_vsplth")))))
10191
10192 #define vec_vspltb(a1, a2) \
10193 __ch (__un_args_eq (__vector bool char, (a1)), \
10194       ((__vector bool char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10195 __ch (__un_args_eq (__vector signed char, (a1)), \
10196       ((__vector signed char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10197 __ch (__un_args_eq (__vector unsigned char, (a1)), \
10198       ((__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10199 __builtin_altivec_compiletime_error ("vec_vspltb"))))
10200
10201 #define vec_splat_s8(a1) ((__vector signed char) __builtin_altivec_vspltisb (a1))
10202
10203 #define vec_splat_s16(a1) ((__vector signed short) __builtin_altivec_vspltish (a1))
10204
10205 #define vec_splat_s32(a1) ((__vector signed int) __builtin_altivec_vspltisw (a1))
10206
10207 #define vec_splat_u8(a1) ((__vector unsigned char) __builtin_altivec_vspltisb (a1))
10208
10209 #define vec_splat_u16(a1) ((__vector unsigned short) __builtin_altivec_vspltish (a1))
10210
10211 #define vec_splat_u32(a1) ((__vector unsigned int) __builtin_altivec_vspltisw (a1))
10212
10213 #define vec_sr(a1, a2) \
10214 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10215       ((__vector signed char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10216 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10217       ((__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10218 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10219       ((__vector signed short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10220 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10221       ((__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10222 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10223       ((__vector signed int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10224 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10225       ((__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10226     __builtin_altivec_compiletime_error ("vec_sr")))))))
10227
10228 #define vec_vsrw(a1, a2) \
10229 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10230       ((__vector signed int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10231 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10232       ((__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10233 __builtin_altivec_compiletime_error ("vec_vsrw")))
10234
10235 #define vec_vsrh(a1, a2) \
10236 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10237       ((__vector signed short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10238 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10239       ((__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10240 __builtin_altivec_compiletime_error ("vec_vsrh")))
10241
10242 #define vec_vsrb(a1, a2) \
10243 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10244       ((__vector signed char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10245 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10246       ((__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10247 __builtin_altivec_compiletime_error ("vec_vsrb")))
10248
10249 #define vec_sra(a1, a2) \
10250 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10251       ((__vector signed char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \
10252 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10253       ((__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \
10254 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10255       ((__vector signed short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \
10256 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10257       ((__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \
10258 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10259       ((__vector signed int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10260 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10261       ((__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10262     __builtin_altivec_compiletime_error ("vec_sra")))))))
10263
10264 #define vec_vsraw(a1, a2) \
10265 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10266       ((__vector signed int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10267 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10268       ((__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10269 __builtin_altivec_compiletime_error ("vec_vsraw")))
10270
10271 #define vec_vsrah(a1, a2) \
10272 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10273       ((__vector signed short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \
10274 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10275       ((__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \
10276 __builtin_altivec_compiletime_error ("vec_vsrah")))
10277
10278 #define vec_vsrab(a1, a2) \
10279 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10280       ((__vector signed char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \
10281 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10282       ((__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \
10283 __builtin_altivec_compiletime_error ("vec_vsrab")))
10284
10285 #define vec_srl(a1, a2) \
10286 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10287       ((__vector signed int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10288 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned short, (a2)), \
10289       ((__vector signed int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10290 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \
10291       ((__vector signed int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10292 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10293       ((__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10294 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned short, (a2)), \
10295       ((__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10296 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \
10297       ((__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10298 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
10299       ((__vector bool int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10300 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned short, (a2)), \
10301       ((__vector bool int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10302 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned char, (a2)), \
10303       ((__vector bool int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10304 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned int, (a2)), \
10305       ((__vector signed short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10306 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10307       ((__vector signed short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10308 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \
10309       ((__vector signed short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10310 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned int, (a2)), \
10311       ((__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10312 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10313       ((__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10314 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \
10315       ((__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10316 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned int, (a2)), \
10317       ((__vector bool short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10318 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
10319       ((__vector bool short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10320 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned char, (a2)), \
10321       ((__vector bool short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10322 __ch (__bin_args_eq (__vector pixel, (a1), __vector unsigned int, (a2)), \
10323       ((__vector pixel) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10324 __ch (__bin_args_eq (__vector pixel, (a1), __vector unsigned short, (a2)), \
10325       ((__vector pixel) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10326 __ch (__bin_args_eq (__vector pixel, (a1), __vector unsigned char, (a2)), \
10327       ((__vector pixel) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10328 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned int, (a2)), \
10329       ((__vector signed char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10330 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned short, (a2)), \
10331       ((__vector signed char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10332 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10333       ((__vector signed char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10334 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \
10335       ((__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10336 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned short, (a2)), \
10337       ((__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10338 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10339       ((__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10340 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned int, (a2)), \
10341       ((__vector bool char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10342 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned short, (a2)), \
10343       ((__vector bool char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10344 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
10345       ((__vector bool char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10346     __builtin_altivec_compiletime_error ("vec_srl")))))))))))))))))))))))))))))))
10347
10348 #define vec_sro(a1, a2) \
10349 __ch (__bin_args_eq (__vector float, (a1), __vector signed char, (a2)), \
10350       ((__vector float) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10351 __ch (__bin_args_eq (__vector float, (a1), __vector unsigned char, (a2)), \
10352       ((__vector float) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10353 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed char, (a2)), \
10354       ((__vector signed int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10355 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \
10356       ((__vector signed int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10357 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed char, (a2)), \
10358       ((__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10359 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \
10360       ((__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10361 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed char, (a2)), \
10362       ((__vector signed short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10363 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \
10364       ((__vector signed short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10365 __ch (__bin_args_eq (__vector pixel, (a1), __vector signed char, (a2)), \
10366       ((__vector pixel) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10367 __ch (__bin_args_eq (__vector pixel, (a1), __vector unsigned char, (a2)), \
10368       ((__vector pixel) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10369 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed char, (a2)), \
10370       ((__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10371 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \
10372       ((__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10373 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10374       ((__vector signed char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10375 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10376       ((__vector signed char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10377 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \
10378       ((__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10379 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10380       ((__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10381     __builtin_altivec_compiletime_error ("vec_sro")))))))))))))))))
10382
10383 #define vec_st(a1, a2, a3) \
10384 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, *(a3)), \
10385   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10386 __ch (__bin_args_eq (__vector unsigned char, (a1), unsigned char, *(a3)), \
10387   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10388 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, *(a3)), \
10389   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10390 __ch (__bin_args_eq (__vector signed char, (a1), signed char, *(a3)), \
10391   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10392 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, *(a3)), \
10393   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10394 __ch (__bin_args_eq (__vector bool char, (a1), unsigned char, *(a3)), \
10395   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10396 __ch (__bin_args_eq (__vector bool char, (a1), signed char, *(a3)), \
10397   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10398 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, *(a3)), \
10399   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10400 __ch (__bin_args_eq (__vector unsigned short, (a1), unsigned short, *(a3)), \
10401   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10402 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, *(a3)), \
10403   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10404 __ch (__bin_args_eq (__vector signed short, (a1), short, *(a3)), \
10405   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10406 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, *(a3)), \
10407   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10408 __ch (__bin_args_eq (__vector bool short, (a1), unsigned short, *(a3)), \
10409   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10410 __ch (__bin_args_eq (__vector bool short, (a1), short, *(a3)), \
10411   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10412 __ch (__bin_args_eq (__vector pixel, (a1), __vector pixel, *(a3)), \
10413   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10414 __ch (__bin_args_eq (__vector pixel, (a1), unsigned short, *(a3)), \
10415   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10416 __ch (__bin_args_eq (__vector pixel, (a1), short, *(a3)), \
10417   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10418 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, *(a3)), \
10419   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10420 __ch (__bin_args_eq (__vector unsigned int, (a1), unsigned int, *(a3)), \
10421   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10422 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, *(a3)), \
10423   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10424 __ch (__bin_args_eq (__vector signed int, (a1), int, *(a3)), \
10425   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10426 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, *(a3)), \
10427   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10428 __ch (__bin_args_eq (__vector bool int, (a1), unsigned int, *(a3)), \
10429   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10430 __ch (__bin_args_eq (__vector bool int, (a1), int, *(a3)), \
10431   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10432 __ch (__bin_args_eq (__vector float, (a1), __vector float, *(a3)), \
10433   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10434 __ch (__bin_args_eq (__vector float, (a1), float, *(a3)), \
10435   __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10436 __builtin_altivec_compiletime_error ("vec_st")))))))))))))))))))))))))))
10437
10438 #define vec_stl(a1, a2, a3) \
10439 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, *(a3)), \
10440   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10441 __ch (__bin_args_eq (__vector unsigned char, (a1), unsigned char, *(a3)), \
10442   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10443 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, *(a3)), \
10444   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10445 __ch (__bin_args_eq (__vector signed char, (a1), signed char, *(a3)), \
10446   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10447 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, *(a3)), \
10448   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10449 __ch (__bin_args_eq (__vector bool char, (a1), unsigned char, *(a3)), \
10450   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10451 __ch (__bin_args_eq (__vector bool char, (a1), signed char, *(a3)), \
10452   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10453 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, *(a3)), \
10454   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10455 __ch (__bin_args_eq (__vector unsigned short, (a1), unsigned short, *(a3)), \
10456   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10457 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, *(a3)), \
10458   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10459 __ch (__bin_args_eq (__vector signed short, (a1), short, *(a3)), \
10460   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10461 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, *(a3)), \
10462   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10463 __ch (__bin_args_eq (__vector bool short, (a1), unsigned short, *(a3)), \
10464   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10465 __ch (__bin_args_eq (__vector bool short, (a1), short, *(a3)), \
10466   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10467 __ch (__bin_args_eq (__vector pixel, (a1), __vector pixel, *(a3)), \
10468   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10469 __ch (__bin_args_eq (__vector pixel, (a1), unsigned short, *(a3)), \
10470   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10471 __ch (__bin_args_eq (__vector pixel, (a1), short, *(a3)), \
10472   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10473 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, *(a3)), \
10474   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10475 __ch (__bin_args_eq (__vector unsigned int, (a1), unsigned int, *(a3)), \
10476   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10477 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, *(a3)), \
10478   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10479 __ch (__bin_args_eq (__vector signed int, (a1), int, *(a3)), \
10480   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10481 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, *(a3)), \
10482   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10483 __ch (__bin_args_eq (__vector bool int, (a1), unsigned int, *(a3)), \
10484   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10485 __ch (__bin_args_eq (__vector bool int, (a1), int, *(a3)), \
10486   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10487 __ch (__bin_args_eq (__vector float, (a1), __vector float, *(a3)), \
10488   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10489 __ch (__bin_args_eq (__vector float, (a1), float, *(a3)), \
10490   __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10491 __builtin_altivec_compiletime_error ("vec_stl")))))))))))))))))))))))))))
10492
10493 #define vec_ste(a, b, c) \
10494 __ch (__bin_args_eq (__vector unsigned char, (a), unsigned char, *(c)), \
10495       __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \
10496 __ch (__bin_args_eq (__vector signed char, (a), signed char, *(c)), \
10497       __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \
10498 __ch (__bin_args_eq (__vector bool char, (a), unsigned char, *(c)), \
10499       __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \
10500 __ch (__bin_args_eq (__vector bool char, (a), signed char, *(c)), \
10501       __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \
10502 __ch (__bin_args_eq (__vector unsigned short, (a), unsigned short, *(c)), \
10503      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10504 __ch (__bin_args_eq (__vector signed short, (a), short, *(c)), \
10505      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10506 __ch (__bin_args_eq (__vector bool short, (a), unsigned short, *(c)), \
10507      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10508 __ch (__bin_args_eq (__vector bool short, (a), short, *(c)), \
10509      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10510 __ch (__bin_args_eq (__vector pixel, (a), unsigned short, *(c)), \
10511      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10512 __ch (__bin_args_eq (__vector pixel, (a), short, *(c)), \
10513      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10514 __ch (__bin_args_eq (__vector unsigned int, (a), unsigned int, *(c)), \
10515      __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \
10516 __ch (__bin_args_eq (__vector signed int, (a), int, *(c)), \
10517      __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \
10518 __ch (__bin_args_eq (__vector bool int, (a), unsigned int, *(c)), \
10519      __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \
10520 __ch (__bin_args_eq (__vector bool int, (a), int, *(c)), \
10521      __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \
10522 __ch (__bin_args_eq (__vector float, (a), float, *(c)), \
10523      __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \
10524      __builtin_altivec_compiletime_error ("vec_ste"))))))))))))))))
10525
10526 #define vec_stvewx(a, b, c) \
10527 __ch (__bin_args_eq (__vector unsigned int, (a), unsigned int, *(c)), \
10528      __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \
10529 __ch (__bin_args_eq (__vector signed int, (a), int, *(c)), \
10530      __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \
10531 __ch (__bin_args_eq (__vector bool int, (a), unsigned int, *(c)), \
10532      __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \
10533 __ch (__bin_args_eq (__vector bool int, (a), int, *(c)), \
10534      __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \
10535 __ch (__bin_args_eq (__vector float, (a), float, *(c)), \
10536      __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \
10537 __builtin_altivec_compiletime_error ("vec_stvewx"))))))
10538
10539 #define vec_stvehx(a, b, c) \
10540 __ch (__bin_args_eq (__vector unsigned short, (a), unsigned short, *(c)), \
10541      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10542 __ch (__bin_args_eq (__vector signed short, (a), short, *(c)), \
10543      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10544 __ch (__bin_args_eq (__vector bool short, (a), unsigned short, *(c)), \
10545      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10546 __ch (__bin_args_eq (__vector bool short, (a), short, *(c)), \
10547      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10548 __ch (__bin_args_eq (__vector pixel, (a), unsigned short, *(c)), \
10549      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10550 __ch (__bin_args_eq (__vector pixel, (a), short, *(c)), \
10551      __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10552 __builtin_altivec_compiletime_error ("vec_stvehx")))))))
10553
10554 #define vec_stvebx(a, b, c) \
10555 __ch (__bin_args_eq (__vector unsigned char, (a), unsigned char, *(c)), \
10556       __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \
10557 __ch (__bin_args_eq (__vector signed char, (a), signed char, *(c)), \
10558       __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \
10559 __ch (__bin_args_eq (__vector bool char, (a), unsigned char, *(c)), \
10560       __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \
10561 __ch (__bin_args_eq (__vector bool char, (a), signed char, *(c)), \
10562       __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \
10563 __builtin_altivec_compiletime_error ("vec_stvebx")))))
10564
10565 #define vec_sub(a1, a2) \
10566 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
10567       ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10568 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
10569       ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10570 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10571       ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10572 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
10573       ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10574 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
10575       ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10576 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10577       ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10578 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
10579       ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10580 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
10581       ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10582 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10583       ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10584 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
10585       ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10586 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
10587       ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10588 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10589       ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10590 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
10591       ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10592 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
10593       ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10594 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10595       ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10596 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
10597       ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10598 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
10599       ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10600 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10601       ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10602 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
10603       ((__vector float) __builtin_altivec_vsubfp ((__vector float) (a1), (__vector float) (a2))), \
10604     __builtin_altivec_compiletime_error ("vec_sub"))))))))))))))))))))
10605
10606 #define vec_vsubfp(a1, a2) \
10607 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
10608       ((__vector float) __builtin_altivec_vsubfp ((__vector float) (a1), (__vector float) (a2))), \
10609 __builtin_altivec_compiletime_error ("vec_vsubfp"))
10610
10611 #define vec_vsubuwm(a1, a2) \
10612 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
10613       ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10614 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
10615       ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10616 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10617       ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10618 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
10619       ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10620 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
10621       ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10622 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10623       ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10624 __builtin_altivec_compiletime_error ("vec_vsubuwm")))))))
10625
10626 #define vec_vsubuhm(a1, a2) \
10627 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
10628       ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10629 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
10630       ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10631 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10632       ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10633 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
10634       ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10635 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
10636       ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10637 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10638       ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10639 __builtin_altivec_compiletime_error ("vec_vsubuhm")))))))
10640
10641 #define vec_vsububm(a1, a2) \
10642 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
10643       ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10644 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
10645       ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10646 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10647       ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10648 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
10649       ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10650 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
10651       ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10652 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10653       ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10654 __builtin_altivec_compiletime_error ("vec_vsububm")))))))
10655
10656 #define vec_subc(a1, a2) \
10657 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10658   ((__vector unsigned int) __builtin_altivec_vsubcuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10659 __builtin_altivec_compiletime_error ("vec_subc"))
10660
10661 #define vec_subs(a1, a2) \
10662 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
10663       ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10664 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
10665       ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10666 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10667       ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10668 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
10669       ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10670 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
10671       ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10672 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10673       ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10674 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
10675       ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10676 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
10677       ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10678 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10679       ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10680 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
10681       ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10682 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
10683       ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10684 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10685       ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10686 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
10687       ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10688 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
10689       ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10690 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10691       ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10692 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
10693       ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10694 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
10695       ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10696 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10697       ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10698     __builtin_altivec_compiletime_error ("vec_subs")))))))))))))))))))
10699
10700 #define vec_vsubsws(a1, a2) \
10701 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
10702       ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10703 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
10704       ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10705 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10706       ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10707 __builtin_altivec_compiletime_error ("vec_vsubsws"))))
10708
10709 #define vec_vsubuws(a1, a2) \
10710 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
10711       ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10712 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
10713       ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10714 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10715       ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10716 __builtin_altivec_compiletime_error ("vec_vsubuws"))))
10717
10718 #define vec_vsubshs(a1, a2) \
10719 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
10720       ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10721 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
10722       ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10723 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10724       ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10725 __builtin_altivec_compiletime_error ("vec_vsubshs"))))
10726
10727 #define vec_vsubuhs(a1, a2) \
10728 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
10729       ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10730 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
10731       ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10732 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10733       ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10734 __builtin_altivec_compiletime_error ("vec_vsubuhs"))))
10735
10736 #define vec_vsubsbs(a1, a2) \
10737 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
10738       ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10739 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
10740       ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10741 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10742       ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10743 __builtin_altivec_compiletime_error ("vec_vsubsbs"))))
10744
10745 #define vec_vsububs(a1, a2) \
10746 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
10747       ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10748 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
10749       ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10750 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10751       ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10752 __builtin_altivec_compiletime_error ("vec_vsububs"))))
10753
10754 #define vec_sum4s(a1, a2) \
10755 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \
10756       ((__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) (a1), (__vector signed int) (a2))), \
10757 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed int, (a2)), \
10758       ((__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) (a1), (__vector signed int) (a2))), \
10759 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed int, (a2)), \
10760       ((__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) (a1), (__vector signed int) (a2))), \
10761     __builtin_altivec_compiletime_error ("vec_sum4s"))))
10762
10763 #define vec_vsum4shs(a1, a2) \
10764 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed int, (a2)), \
10765       ((__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) (a1), (__vector signed int) (a2))), \
10766 __builtin_altivec_compiletime_error ("vec_vsum4shs"))
10767
10768 #define vec_vsum4sbs(a1, a2) \
10769 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed int, (a2)), \
10770       ((__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) (a1), (__vector signed int) (a2))), \
10771 __builtin_altivec_compiletime_error ("vec_vsum4sbs"))
10772
10773 #define vec_vsum4ubs(a1, a2) \
10774 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \
10775       ((__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) (a1), (__vector signed int) (a2))), \
10776 __builtin_altivec_compiletime_error ("vec_vsum4ubs"))
10777
10778 #define vec_sum2s(a1, a2) \
10779 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10780       ((__vector signed int) __builtin_altivec_vsum2sws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10781 __builtin_altivec_compiletime_error ("vec_sum2s"))
10782
10783 #define vec_sums(a1, a2) \
10784 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10785       ((__vector signed int) __builtin_altivec_vsumsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10786 __builtin_altivec_compiletime_error ("vec_sums"))
10787
10788 #define vec_trunc(a1) \
10789 __ch (__un_args_eq (__vector float, (a1)), \
10790       ((__vector float) __builtin_altivec_vrfiz ((__vector float) (a1))), \
10791 __builtin_altivec_compiletime_error ("vec_trunc"))
10792
10793 #define vec_unpackh(a1) \
10794 __ch (__un_args_eq (__vector signed char, (a1)), \
10795       ((__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) (a1))), \
10796 __ch (__un_args_eq (__vector bool char, (a1)), \
10797       ((__vector bool short) __builtin_altivec_vupkhsb ((__vector signed char) (a1))), \
10798 __ch (__un_args_eq (__vector pixel, (a1)), \
10799       ((__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) (a1))), \
10800 __ch (__un_args_eq (__vector signed short, (a1)), \
10801       ((__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) (a1))), \
10802 __ch (__un_args_eq (__vector bool short, (a1)), \
10803       ((__vector bool int) __builtin_altivec_vupkhsh ((__vector signed short) (a1))), \
10804     __builtin_altivec_compiletime_error ("vec_unpackh"))))))
10805
10806 #define vec_vupkhsh(a1) \
10807 __ch (__un_args_eq (__vector bool short, (a1)), \
10808       ((__vector bool int) __builtin_altivec_vupkhsh ((__vector signed short) (a1))), \
10809 __ch (__un_args_eq (__vector signed short, (a1)), \
10810       ((__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) (a1))), \
10811 __builtin_altivec_compiletime_error ("vec_vupkhsh")))
10812
10813 #define vec_vupkhpx(a1) \
10814 __ch (__un_args_eq (__vector pixel, (a1)), \
10815       ((__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) (a1))), \
10816 __builtin_altivec_compiletime_error ("vec_vupkhpx"))
10817
10818 #define vec_vupkhsb(a1) \
10819 __ch (__un_args_eq (__vector bool char, (a1)), \
10820       ((__vector bool short) __builtin_altivec_vupkhsb ((__vector signed char) (a1))), \
10821 __ch (__un_args_eq (__vector signed char, (a1)), \
10822       ((__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) (a1))), \
10823 __builtin_altivec_compiletime_error ("vec_vupkhsb")))
10824
10825 #define vec_unpackl(a1) \
10826 __ch (__un_args_eq (__vector signed char, (a1)), \
10827       ((__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) (a1))), \
10828 __ch (__un_args_eq (__vector bool char, (a1)), \
10829       ((__vector bool short) __builtin_altivec_vupklsb ((__vector signed char) (a1))), \
10830 __ch (__un_args_eq (__vector pixel, (a1)), \
10831       ((__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) (a1))), \
10832 __ch (__un_args_eq (__vector signed short, (a1)), \
10833       ((__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) (a1))), \
10834 __ch (__un_args_eq (__vector bool short, (a1)), \
10835       ((__vector bool int) __builtin_altivec_vupklsh ((__vector signed short) (a1))), \
10836     __builtin_altivec_compiletime_error ("vec_unpackl"))))))
10837
10838 #define vec_vupklsh(a1) \
10839 __ch (__un_args_eq (__vector bool short, (a1)), \
10840       ((__vector bool int) __builtin_altivec_vupklsh ((__vector signed short) (a1))), \
10841 __ch (__un_args_eq (__vector signed short, (a1)), \
10842       ((__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) (a1))), \
10843 __builtin_altivec_compiletime_error ("vec_vupklsh")))
10844
10845 #define vec_vupklpx(a1) \
10846 __ch (__un_args_eq (__vector pixel, (a1)), \
10847       ((__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) (a1))), \
10848 __builtin_altivec_compiletime_error ("vec_vupklpx"))
10849
10850 #define vec_vupklsb(a1) \
10851 __ch (__un_args_eq (__vector bool char, (a1)), \
10852       ((__vector bool short) __builtin_altivec_vupklsb ((__vector signed char) (a1))), \
10853 __ch (__un_args_eq (__vector signed char, (a1)), \
10854       ((__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) (a1))), \
10855 __builtin_altivec_compiletime_error ("vec_vupklsb")))
10856
10857 #define vec_xor(a1, a2) \
10858 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
10859       ((__vector float) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10860 __ch (__bin_args_eq (__vector float, (a1), __vector bool int, (a2)), \
10861       ((__vector float) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10862 __ch (__bin_args_eq (__vector bool int, (a1), __vector float, (a2)), \
10863       ((__vector float) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10864 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
10865       ((__vector bool int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10866 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
10867       ((__vector signed int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10868 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
10869       ((__vector signed int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10870 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10871       ((__vector signed int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10872 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
10873       ((__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10874 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
10875       ((__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10876 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10877       ((__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10878 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
10879       ((__vector bool short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10880 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
10881       ((__vector signed short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10882 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
10883       ((__vector signed short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10884 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10885       ((__vector signed short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10886 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
10887       ((__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10888 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
10889       ((__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10890 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10891       ((__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10892 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
10893       ((__vector bool char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10894 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
10895       ((__vector signed char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10896 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
10897       ((__vector signed char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10898 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10899       ((__vector signed char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10900 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
10901       ((__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10902 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
10903       ((__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10904 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10905       ((__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10906     __builtin_altivec_compiletime_error ("vec_xor")))))))))))))))))))))))))
10907
10908 /* Predicates.  */
10909
10910 #define vec_all_eq(a1, a2) \
10911 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
10912       __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10913 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10914       __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10915 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
10916       __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10917 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
10918       __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10919 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
10920       __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10921 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10922       __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10923 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
10924       __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10925 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
10926       __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10927 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10928       __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10929 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
10930       __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10931 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
10932       __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10933 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
10934       __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10935 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10936       __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10937 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
10938       __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10939 __ch (__bin_args_eq (__vector pixel, (a1), __vector pixel, (a2)), \
10940       __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10941 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
10942       __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
10943 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
10944       __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
10945 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10946       __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
10947 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
10948       __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
10949 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
10950       __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
10951 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10952       __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
10953 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
10954       __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
10955 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
10956       __builtin_altivec_vcmpeqfp_p (__CR6_LT, (__vector float) (a1), (__vector float) (a2)), \
10957     __builtin_altivec_compiletime_error ("vec_all_eq"))))))))))))))))))))))))
10958
10959 #define vec_all_ge(a1, a2) \
10960 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
10961       __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
10962 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
10963       __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
10964 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10965       __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
10966 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
10967       __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
10968 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
10969       __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
10970 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10971       __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
10972 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
10973       __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
10974 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
10975       __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
10976 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10977       __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
10978 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
10979       __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
10980 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
10981       __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
10982 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10983       __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
10984 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
10985       __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
10986 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
10987       __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
10988 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10989       __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
10990 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
10991       __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
10992 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
10993       __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
10994 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10995       __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
10996 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
10997       __builtin_altivec_vcmpgefp_p (__CR6_LT, (__vector float) (a1), (__vector float) (a2)), \
10998     __builtin_altivec_compiletime_error ("vec_all_ge"))))))))))))))))))))
10999
11000 #define vec_all_gt(a1, a2) \
11001 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
11002       __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11003 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
11004       __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11005 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11006       __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11007 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
11008       __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11009 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
11010       __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11011 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11012       __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11013 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
11014       __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11015 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
11016       __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11017 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11018       __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11019 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
11020       __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11021 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
11022       __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11023 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11024       __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11025 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
11026       __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11027 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
11028       __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11029 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11030       __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11031 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
11032       __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11033 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
11034       __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11035 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11036       __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11037 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11038       __builtin_altivec_vcmpgtfp_p (__CR6_LT, (__vector float) (a1), (__vector float) (a2)), \
11039     __builtin_altivec_compiletime_error ("vec_all_gt"))))))))))))))))))))
11040
11041 #define vec_all_in(a1, a2) \
11042 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11043       __builtin_altivec_vcmpbfp_p (__CR6_EQ, (a1), (a2)), \
11044     __builtin_altivec_compiletime_error ("vec_all_in"))
11045
11046 #define vec_all_le(a1, a2) \
11047 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
11048       __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11049 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
11050       __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11051 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11052       __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11053 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
11054       __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11055 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
11056       __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11057 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11058       __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11059 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
11060       __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11061 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
11062       __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11063 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11064       __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11065 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
11066       __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11067 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
11068       __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11069 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11070       __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11071 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
11072       __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11073 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
11074       __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11075 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11076       __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11077 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
11078       __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11079 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
11080       __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11081 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11082       __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11083 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11084       __builtin_altivec_vcmpgefp_p (__CR6_LT, (__vector float) (a2), (__vector float) (a1)), \
11085     __builtin_altivec_compiletime_error ("vec_all_le"))))))))))))))))))))
11086
11087 #define vec_all_lt(a1, a2) \
11088 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
11089       __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11090 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
11091       __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11092 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11093       __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11094 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
11095       __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11096 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
11097       __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11098 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11099       __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11100 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
11101       __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11102 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
11103       __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11104 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11105       __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11106 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
11107       __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11108 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
11109       __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11110 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11111       __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11112 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
11113       __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11114 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
11115       __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11116 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11117       __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11118 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
11119       __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11120 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
11121       __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11122 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11123       __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11124 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11125       __builtin_altivec_vcmpgtfp_p (__CR6_LT, (__vector float) (a2), (__vector float) (a1)), \
11126     __builtin_altivec_compiletime_error ("vec_all_lt"))))))))))))))))))))
11127
11128 #define vec_all_nan(a1) \
11129 __ch (__un_args_eq (__vector float, (a1)), \
11130       __builtin_altivec_vcmpeqfp_p (__CR6_EQ, (a1), (a1)), \
11131     __builtin_altivec_compiletime_error ("vec_all_nan"))
11132
11133 #define vec_all_ne(a1, a2) \
11134 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
11135       __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11136 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
11137       __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11138 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
11139       __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11140 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11141       __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11142 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
11143       __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11144 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11145       __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11146 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
11147       __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11148 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
11149       __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11150 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
11151       __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11152 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
11153       __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11154 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11155       __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11156 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
11157       __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11158 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11159       __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11160 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
11161       __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11162 __ch (__bin_args_eq (__vector pixel, (a1), __vector pixel, (a2)), \
11163       __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11164 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
11165       __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11166 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
11167       __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11168 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
11169       __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11170 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11171       __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11172 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
11173       __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11174 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11175       __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11176 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
11177       __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11178 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11179       __builtin_altivec_vcmpeqfp_p (__CR6_EQ, (__vector float) (a1), (__vector float) (a2)), \
11180     __builtin_altivec_compiletime_error ("vec_all_ne"))))))))))))))))))))))))
11181
11182 #define vec_all_nge(a1, a2) \
11183 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11184       __builtin_altivec_vcmpgefp_p (__CR6_EQ, (a1), (a2)), \
11185     __builtin_altivec_compiletime_error ("vec_all_nge"))
11186
11187 #define vec_all_ngt(a1, a2) \
11188 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11189       __builtin_altivec_vcmpgtfp_p (__CR6_EQ, (a1), (a2)), \
11190     __builtin_altivec_compiletime_error ("vec_all_ngt"))
11191
11192 #define vec_all_nle(a1, a2) \
11193 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11194       __builtin_altivec_vcmpgefp_p (__CR6_EQ, (a2), (a1)), \
11195     __builtin_altivec_compiletime_error ("vec_all_nle"))
11196
11197 #define vec_all_nlt(a1, a2) \
11198 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11199       __builtin_altivec_vcmpgtfp_p (__CR6_EQ, (a2), (a1)), \
11200     __builtin_altivec_compiletime_error ("vec_all_nlt"))
11201
11202 #define vec_all_numeric(a1) \
11203 __ch (__un_args_eq (__vector float, (a1)), \
11204       __builtin_altivec_vcmpeqfp_p (__CR6_LT, (a1), (a1)), \
11205     __builtin_altivec_compiletime_error ("vec_all_numeric"))
11206
11207 #define vec_any_eq(a1, a2) \
11208 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
11209       __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11210 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
11211       __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11212 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
11213       __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11214 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11215       __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11216 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
11217       __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11218 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11219       __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11220 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
11221       __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11222 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
11223       __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11224 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
11225       __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11226 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
11227       __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11228 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11229       __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11230 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
11231       __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11232 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11233       __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11234 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
11235       __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11236 __ch (__bin_args_eq (__vector pixel, (a1), __vector pixel, (a2)), \
11237       __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11238 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
11239       __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11240 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
11241       __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11242 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
11243       __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11244 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11245       __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11246 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
11247       __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11248 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11249       __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11250 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
11251       __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11252 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11253       __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, (__vector float) (a1), (__vector float) (a2)), \
11254     __builtin_altivec_compiletime_error ("vec_any_eq"))))))))))))))))))))))))
11255
11256 #define vec_any_ge(a1, a2) \
11257 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
11258       __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11259 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
11260       __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11261 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11262       __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11263 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
11264       __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11265 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
11266       __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11267 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11268       __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11269 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
11270       __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11271 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
11272       __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11273 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11274       __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11275 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
11276       __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11277 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
11278       __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11279 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11280       __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11281 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
11282       __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11283 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
11284       __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11285 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11286       __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11287 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
11288       __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11289 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
11290       __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11291 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11292       __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11293 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11294       __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, (__vector float) (a1), (__vector float) (a2)), \
11295     __builtin_altivec_compiletime_error ("vec_any_ge"))))))))))))))))))))
11296
11297 #define vec_any_gt(a1, a2) \
11298 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
11299       __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11300 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
11301       __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11302 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11303       __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11304 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
11305       __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11306 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
11307       __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11308 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11309       __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11310 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
11311       __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11312 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
11313       __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11314 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11315       __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11316 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
11317       __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11318 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
11319       __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11320 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11321       __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11322 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
11323       __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11324 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
11325       __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11326 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11327       __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11328 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
11329       __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11330 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
11331       __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11332 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11333       __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11334 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11335       __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, (__vector float) (a1), (__vector float) (a2)), \
11336     __builtin_altivec_compiletime_error ("vec_any_gt"))))))))))))))))))))
11337
11338 #define vec_any_le(a1, a2) \
11339 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
11340       __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11341 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
11342       __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11343 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11344       __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11345 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
11346       __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11347 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
11348       __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11349 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11350       __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11351 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
11352       __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11353 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
11354       __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11355 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11356       __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11357 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
11358       __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11359 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
11360       __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11361 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11362       __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11363 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
11364       __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11365 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
11366       __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11367 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11368       __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11369 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
11370       __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11371 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
11372       __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11373 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11374       __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11375 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11376       __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, (__vector float) (a2), (__vector float) (a1)), \
11377     __builtin_altivec_compiletime_error ("vec_any_le"))))))))))))))))))))
11378
11379 #define vec_any_lt(a1, a2) \
11380 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
11381       __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11382 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
11383       __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11384 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11385       __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11386 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
11387       __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11388 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
11389       __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11390 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11391       __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11392 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
11393       __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11394 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
11395       __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11396 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11397       __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11398 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
11399       __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11400 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
11401       __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11402 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11403       __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11404 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
11405       __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11406 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
11407       __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11408 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11409       __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11410 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
11411       __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11412 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
11413       __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11414 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11415       __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11416 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11417       __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, (__vector float) (a2), (__vector float) (a1)), \
11418     __builtin_altivec_compiletime_error ("vec_any_lt"))))))))))))))))))))
11419
11420 #define vec_any_nan(a1) \
11421 __ch (__un_args_eq (__vector float, (a1)), \
11422       __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, (a1), (a1)), \
11423     __builtin_altivec_compiletime_error ("vec_any_nan"))
11424
11425 #define vec_any_ne(a1, a2) \
11426 __ch (__bin_args_eq (__vector bool char, (a1), __vector unsigned char, (a2)), \
11427       __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11428 __ch (__bin_args_eq (__vector bool char, (a1), __vector signed char, (a2)), \
11429       __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11430 __ch (__bin_args_eq (__vector signed char, (a1), __vector bool char, (a2)), \
11431       __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11432 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11433       __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11434 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector bool char, (a2)), \
11435       __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11436 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11437       __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11438 __ch (__bin_args_eq (__vector bool char, (a1), __vector bool char, (a2)), \
11439       __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11440 __ch (__bin_args_eq (__vector bool short, (a1), __vector unsigned short, (a2)), \
11441       __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11442 __ch (__bin_args_eq (__vector bool short, (a1), __vector signed short, (a2)), \
11443       __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11444 __ch (__bin_args_eq (__vector signed short, (a1), __vector bool short, (a2)), \
11445       __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11446 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11447       __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11448 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector bool short, (a2)), \
11449       __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11450 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11451       __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11452 __ch (__bin_args_eq (__vector bool short, (a1), __vector bool short, (a2)), \
11453       __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11454 __ch (__bin_args_eq (__vector pixel, (a1), __vector pixel, (a2)), \
11455       __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11456 __ch (__bin_args_eq (__vector bool int, (a1), __vector unsigned int, (a2)), \
11457       __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11458 __ch (__bin_args_eq (__vector bool int, (a1), __vector signed int, (a2)), \
11459       __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11460 __ch (__bin_args_eq (__vector signed int, (a1), __vector bool int, (a2)), \
11461       __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11462 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11463       __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11464 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector bool int, (a2)), \
11465       __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11466 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11467       __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11468 __ch (__bin_args_eq (__vector bool int, (a1), __vector bool int, (a2)), \
11469       __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11470 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11471       __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, (__vector float) (a1), (__vector float) (a2)), \
11472     __builtin_altivec_compiletime_error ("vec_any_ne"))))))))))))))))))))))))
11473
11474 #define vec_any_nge(a1, a2) \
11475 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11476       __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, (a1), (a2)), \
11477     __builtin_altivec_compiletime_error ("vec_any_nge"))
11478
11479 #define vec_any_ngt(a1, a2) \
11480 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11481       __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, (a1), (a2)), \
11482     __builtin_altivec_compiletime_error ("vec_any_ngt"))
11483
11484 #define vec_any_nle(a1, a2) \
11485 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11486       __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, (a2), (a1)), \
11487     __builtin_altivec_compiletime_error ("vec_any_nle"))
11488
11489 #define vec_any_nlt(a1, a2) \
11490 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11491       __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, (a2), (a1)), \
11492     __builtin_altivec_compiletime_error ("vec_any_nlt"))
11493
11494 #define vec_any_numeric(a1) \
11495 __ch (__un_args_eq (__vector float, (a1)), \
11496       __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, (a1), (a1)), \
11497     __builtin_altivec_compiletime_error ("vec_any_numeric"))
11498
11499 #define vec_any_out(a1, a2) \
11500 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11501       __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, (a1), (a2)), \
11502     __builtin_altivec_compiletime_error ("vec_any_out"))
11503
11504
11505 #endif /* __cplusplus */
11506
11507 #endif /* _ALTIVEC_H */