Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / config / rs6000 / altivec.h
blob0447d9e1fc4c4e787322cd9bc35b47e991dad6a2
1 /* PowerPC AltiVec include file.
2 Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
3 Contributed by Aldy Hernandez (aldyh@redhat.com).
5 This file is part of GCC.
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.
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.
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. */
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. */
29 /* Implemented to conform to the specification included in the AltiVec
30 Technology Programming Interface Manual (ALTIVECPIM/D 6/1999 Rev 0). */
32 #ifndef _ALTIVEC_H
33 #define _ALTIVEC_H 1
35 #if !defined(__VEC__) || !defined(__ALTIVEC__)
36 #error Use the "-maltivec" flag to enable PowerPC AltiVec support
37 #endif
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. */
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
51 /* Condition register codes for AltiVec predicates. */
53 #define __CR6_EQ 0
54 #define __CR6_EQ_REV 1
55 #define __CR6_LT 2
56 #define __CR6_LT_REV 3
58 /* These are easy... Same exact arguments. */
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
102 #ifdef __cplusplus
104 extern "C++" {
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));
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));
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));
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));
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));
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));
240 /* vec_step */
242 template<typename _Tp>
243 struct __vec_step_help
245 // All proper __vector types will specialize _S_elem.
248 template<>
249 struct __vec_step_help<__vector signed short>
251 static const int _S_elem = 8;
254 template<>
255 struct __vec_step_help<const __vector signed short>
257 static const int _S_elem = 8;
260 template<>
261 struct __vec_step_help<__vector unsigned short>
263 static const int _S_elem = 8;
266 template<>
267 struct __vec_step_help<const __vector unsigned short>
269 static const int _S_elem = 8;
272 template<>
273 struct __vec_step_help<__vector bool short>
275 static const int _S_elem = 8;
278 template<>
279 struct __vec_step_help<const __vector bool short>
281 static const int _S_elem = 8;
284 template<>
285 struct __vec_step_help<__vector pixel>
287 static const int _S_elem = 8;
290 template<>
291 struct __vec_step_help<const __vector pixel>
293 static const int _S_elem = 8;
296 template<>
297 struct __vec_step_help<__vector signed int>
299 static const int _S_elem = 4;
302 template<>
303 struct __vec_step_help<const __vector signed int>
305 static const int _S_elem = 4;
308 template<>
309 struct __vec_step_help<__vector unsigned int>
311 static const int _S_elem = 4;
314 template<>
315 struct __vec_step_help<const __vector unsigned int>
317 static const int _S_elem = 4;
320 template<>
321 struct __vec_step_help<__vector bool int>
323 static const int _S_elem = 4;
326 template<>
327 struct __vec_step_help<const __vector bool int>
329 static const int _S_elem = 4;
332 template<>
333 struct __vec_step_help<__vector unsigned char>
335 static const int _S_elem = 16;
338 template<>
339 struct __vec_step_help<const __vector unsigned char>
341 static const int _S_elem = 16;
344 template<>
345 struct __vec_step_help<__vector signed char>
347 static const int _S_elem = 16;
350 template<>
351 struct __vec_step_help<const __vector signed char>
353 static const int _S_elem = 16;
356 template<>
357 struct __vec_step_help<__vector bool char>
359 static const int _S_elem = 16;
362 template<>
363 struct __vec_step_help<const __vector bool char>
365 static const int _S_elem = 16;
368 template<>
369 struct __vec_step_help<__vector float>
371 static const int _S_elem = 4;
374 template<>
375 struct __vec_step_help<const __vector float>
377 static const int _S_elem = 4;
380 #define vec_step(t) __vec_step_help<__typeof__(t)>::_S_elem
382 /* vec_abs */
384 inline __vector signed char
385 vec_abs (__vector signed char a1)
387 return __builtin_altivec_abs_v16qi (a1);
390 inline __vector signed short
391 vec_abs (__vector signed short a1)
393 return __builtin_altivec_abs_v8hi (a1);
396 inline __vector signed int
397 vec_abs (__vector signed int a1)
399 return __builtin_altivec_abs_v4si (a1);
402 inline __vector float
403 vec_abs (__vector float a1)
405 return __builtin_altivec_abs_v4sf (a1);
408 /* vec_abss */
410 inline __vector signed char
411 vec_abss (__vector signed char a1)
413 return __builtin_altivec_abss_v16qi (a1);
416 inline __vector signed short
417 vec_abss (__vector signed short a1)
419 return __builtin_altivec_abss_v8hi (a1);
422 inline __vector signed int
423 vec_abss (__vector signed int a1)
425 return __builtin_altivec_abss_v4si (a1);
428 /* vec_add */
430 inline __vector signed char
431 vec_add (__vector bool char a1, __vector signed char a2)
433 return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
436 inline __vector signed char
437 vec_add (__vector signed char a1, __vector bool char a2)
439 return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
442 inline __vector signed char
443 vec_add (__vector signed char a1, __vector signed char a2)
445 return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
448 inline __vector unsigned char
449 vec_add (__vector bool char a1, __vector unsigned char a2)
451 return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
454 inline __vector unsigned char
455 vec_add (__vector unsigned char a1, __vector bool char a2)
457 return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
460 inline __vector unsigned char
461 vec_add (__vector unsigned char a1, __vector unsigned char a2)
463 return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
466 inline __vector signed short
467 vec_add (__vector bool short a1, __vector signed short a2)
469 return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
472 inline __vector signed short
473 vec_add (__vector signed short a1, __vector bool short a2)
475 return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
478 inline __vector signed short
479 vec_add (__vector signed short a1, __vector signed short a2)
481 return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
484 inline __vector unsigned short
485 vec_add (__vector bool short a1, __vector unsigned short a2)
487 return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
490 inline __vector unsigned short
491 vec_add (__vector unsigned short a1, __vector bool short a2)
493 return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
496 inline __vector unsigned short
497 vec_add (__vector unsigned short a1, __vector unsigned short a2)
499 return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
502 inline __vector signed int
503 vec_add (__vector bool int a1, __vector signed int a2)
505 return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
508 inline __vector signed int
509 vec_add (__vector signed int a1, __vector bool int a2)
511 return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
514 inline __vector signed int
515 vec_add (__vector signed int a1, __vector signed int a2)
517 return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
520 inline __vector unsigned int
521 vec_add (__vector bool int a1, __vector unsigned int a2)
523 return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
526 inline __vector unsigned int
527 vec_add (__vector unsigned int a1, __vector bool int a2)
529 return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
532 inline __vector unsigned int
533 vec_add (__vector unsigned int a1, __vector unsigned int a2)
535 return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
538 inline __vector float
539 vec_add (__vector float a1, __vector float a2)
541 return (__vector float) __builtin_altivec_vaddfp ((__vector float) a1, (__vector float) a2);
544 /* vec_vaddfp */
546 inline __vector float
547 vec_vaddfp (__vector float a1, __vector float a2)
549 return (__vector float) __builtin_altivec_vaddfp ((__vector float) a1, (__vector float) a2);
552 /* vec_vadduwm */
554 inline __vector signed int
555 vec_vadduwm (__vector bool int a1, __vector signed int a2)
557 return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
560 inline __vector signed int
561 vec_vadduwm (__vector signed int a1, __vector bool int a2)
563 return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
566 inline __vector signed int
567 vec_vadduwm (__vector signed int a1, __vector signed int a2)
569 return (__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
572 inline __vector unsigned int
573 vec_vadduwm (__vector bool int a1, __vector unsigned int a2)
575 return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
578 inline __vector unsigned int
579 vec_vadduwm (__vector unsigned int a1, __vector bool int a2)
581 return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
584 inline __vector unsigned int
585 vec_vadduwm (__vector unsigned int a1, __vector unsigned int a2)
587 return (__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) a1, (__vector signed int) a2);
590 /* vec_vadduhm */
592 inline __vector signed short
593 vec_vadduhm (__vector bool short a1, __vector signed short a2)
595 return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
598 inline __vector signed short
599 vec_vadduhm (__vector signed short a1, __vector bool short a2)
601 return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
604 inline __vector signed short
605 vec_vadduhm (__vector signed short a1, __vector signed short a2)
607 return (__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
610 inline __vector unsigned short
611 vec_vadduhm (__vector bool short a1, __vector unsigned short a2)
613 return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
616 inline __vector unsigned short
617 vec_vadduhm (__vector unsigned short a1, __vector bool short a2)
619 return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
622 inline __vector unsigned short
623 vec_vadduhm (__vector unsigned short a1, __vector unsigned short a2)
625 return (__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) a1, (__vector signed short) a2);
628 /* vec_vaddubm */
630 inline __vector signed char
631 vec_vaddubm (__vector bool char a1, __vector signed char a2)
633 return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
636 inline __vector signed char
637 vec_vaddubm (__vector signed char a1, __vector bool char a2)
639 return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
642 inline __vector signed char
643 vec_vaddubm (__vector signed char a1, __vector signed char a2)
645 return (__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
648 inline __vector unsigned char
649 vec_vaddubm (__vector bool char a1, __vector unsigned char a2)
651 return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
654 inline __vector unsigned char
655 vec_vaddubm (__vector unsigned char a1, __vector bool char a2)
657 return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
660 inline __vector unsigned char
661 vec_vaddubm (__vector unsigned char a1, __vector unsigned char a2)
663 return (__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) a1, (__vector signed char) a2);
666 /* vec_addc */
668 inline __vector unsigned int
669 vec_addc (__vector unsigned int a1, __vector unsigned int a2)
671 return (__vector unsigned int) __builtin_altivec_vaddcuw ((__vector signed int) a1, (__vector signed int) a2);
674 /* vec_adds */
676 inline __vector unsigned char
677 vec_adds (__vector bool char a1, __vector unsigned char a2)
679 return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
682 inline __vector unsigned char
683 vec_adds (__vector unsigned char a1, __vector bool char a2)
685 return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
688 inline __vector unsigned char
689 vec_adds (__vector unsigned char a1, __vector unsigned char a2)
691 return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
694 inline __vector signed char
695 vec_adds (__vector bool char a1, __vector signed char a2)
697 return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
700 inline __vector signed char
701 vec_adds (__vector signed char a1, __vector bool char a2)
703 return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
706 inline __vector signed char
707 vec_adds (__vector signed char a1, __vector signed char a2)
709 return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
712 inline __vector unsigned short
713 vec_adds (__vector bool short a1, __vector unsigned short a2)
715 return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
718 inline __vector unsigned short
719 vec_adds (__vector unsigned short a1, __vector bool short a2)
721 return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
724 inline __vector unsigned short
725 vec_adds (__vector unsigned short a1, __vector unsigned short a2)
727 return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
730 inline __vector signed short
731 vec_adds (__vector bool short a1, __vector signed short a2)
733 return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
736 inline __vector signed short
737 vec_adds (__vector signed short a1, __vector bool short a2)
739 return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
742 inline __vector signed short
743 vec_adds (__vector signed short a1, __vector signed short a2)
745 return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
748 inline __vector unsigned int
749 vec_adds (__vector bool int a1, __vector unsigned int a2)
751 return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
754 inline __vector unsigned int
755 vec_adds (__vector unsigned int a1, __vector bool int a2)
757 return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
760 inline __vector unsigned int
761 vec_adds (__vector unsigned int a1, __vector unsigned int a2)
763 return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
766 inline __vector signed int
767 vec_adds (__vector bool int a1, __vector signed int a2)
769 return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
772 inline __vector signed int
773 vec_adds (__vector signed int a1, __vector bool int a2)
775 return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
778 inline __vector signed int
779 vec_adds (__vector signed int a1, __vector signed int a2)
781 return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
784 /* vec_vaddsws */
786 inline __vector signed int
787 vec_vaddsws (__vector bool int a1, __vector signed int a2)
789 return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
792 inline __vector signed int
793 vec_vaddsws (__vector signed int a1, __vector bool int a2)
795 return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
798 inline __vector signed int
799 vec_vaddsws (__vector signed int a1, __vector signed int a2)
801 return (__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) a1, (__vector signed int) a2);
804 /* vec_vadduws */
806 inline __vector unsigned int
807 vec_vadduws (__vector bool int a1, __vector unsigned int a2)
809 return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
812 inline __vector unsigned int
813 vec_vadduws (__vector unsigned int a1, __vector bool int a2)
815 return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
818 inline __vector unsigned int
819 vec_vadduws (__vector unsigned int a1, __vector unsigned int a2)
821 return (__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) a1, (__vector signed int) a2);
824 /* vec_vaddshs */
826 inline __vector signed short
827 vec_vaddshs (__vector bool short a1, __vector signed short a2)
829 return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
832 inline __vector signed short
833 vec_vaddshs (__vector signed short a1, __vector bool short a2)
835 return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
838 inline __vector signed short
839 vec_vaddshs (__vector signed short a1, __vector signed short a2)
841 return (__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) a1, (__vector signed short) a2);
844 /* vec_vadduhs */
846 inline __vector unsigned short
847 vec_vadduhs (__vector bool short a1, __vector unsigned short a2)
849 return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
852 inline __vector unsigned short
853 vec_vadduhs (__vector unsigned short a1, __vector bool short a2)
855 return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
858 inline __vector unsigned short
859 vec_vadduhs (__vector unsigned short a1, __vector unsigned short a2)
861 return (__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) a1, (__vector signed short) a2);
864 /* vec_vaddsbs */
866 inline __vector signed char
867 vec_vaddsbs (__vector bool char a1, __vector signed char a2)
869 return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
872 inline __vector signed char
873 vec_vaddsbs (__vector signed char a1, __vector bool char a2)
875 return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
878 inline __vector signed char
879 vec_vaddsbs (__vector signed char a1, __vector signed char a2)
881 return (__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) a1, (__vector signed char) a2);
884 /* vec_vaddubs */
886 inline __vector unsigned char
887 vec_vaddubs (__vector bool char a1, __vector unsigned char a2)
889 return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
892 inline __vector unsigned char
893 vec_vaddubs (__vector unsigned char a1, __vector bool char a2)
895 return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
898 inline __vector unsigned char
899 vec_vaddubs (__vector unsigned char a1, __vector unsigned char a2)
901 return (__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) a1, (__vector signed char) a2);
904 /* vec_and */
906 inline __vector float
907 vec_and (__vector float a1, __vector float a2)
909 return (__vector float) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
912 inline __vector float
913 vec_and (__vector float a1, __vector bool int a2)
915 return (__vector float) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
918 inline __vector float
919 vec_and (__vector bool int a1, __vector float a2)
921 return (__vector float) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
924 inline __vector bool int
925 vec_and (__vector bool int a1, __vector bool int a2)
927 return (__vector bool int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
930 inline __vector signed int
931 vec_and (__vector bool int a1, __vector signed int a2)
933 return (__vector signed int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
936 inline __vector signed int
937 vec_and (__vector signed int a1, __vector bool int a2)
939 return (__vector signed int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
942 inline __vector signed int
943 vec_and (__vector signed int a1, __vector signed int a2)
945 return (__vector signed int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
948 inline __vector unsigned int
949 vec_and (__vector bool int a1, __vector unsigned int a2)
951 return (__vector unsigned int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
954 inline __vector unsigned int
955 vec_and (__vector unsigned int a1, __vector bool int a2)
957 return (__vector unsigned int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
960 inline __vector unsigned int
961 vec_and (__vector unsigned int a1, __vector unsigned int a2)
963 return (__vector unsigned int) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
966 inline __vector bool short
967 vec_and (__vector bool short a1, __vector bool short a2)
969 return (__vector bool short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
972 inline __vector signed short
973 vec_and (__vector bool short a1, __vector signed short a2)
975 return (__vector signed short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
978 inline __vector signed short
979 vec_and (__vector signed short a1, __vector bool short a2)
981 return (__vector signed short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
984 inline __vector signed short
985 vec_and (__vector signed short a1, __vector signed short a2)
987 return (__vector signed short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
990 inline __vector unsigned short
991 vec_and (__vector bool short a1, __vector unsigned short a2)
993 return (__vector unsigned short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
996 inline __vector unsigned short
997 vec_and (__vector unsigned short a1, __vector bool short a2)
999 return (__vector unsigned short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
1002 inline __vector unsigned short
1003 vec_and (__vector unsigned short a1, __vector unsigned short a2)
1005 return (__vector unsigned short) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
1008 inline __vector signed char
1009 vec_and (__vector bool char a1, __vector signed char a2)
1011 return (__vector signed char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
1014 inline __vector bool char
1015 vec_and (__vector bool char a1, __vector bool char a2)
1017 return (__vector bool char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
1020 inline __vector signed char
1021 vec_and (__vector signed char a1, __vector bool char a2)
1023 return (__vector signed char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
1026 inline __vector signed char
1027 vec_and (__vector signed char a1, __vector signed char a2)
1029 return (__vector signed char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
1032 inline __vector unsigned char
1033 vec_and (__vector bool char a1, __vector unsigned char a2)
1035 return (__vector unsigned char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
1038 inline __vector unsigned char
1039 vec_and (__vector unsigned char a1, __vector bool char a2)
1041 return (__vector unsigned char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
1044 inline __vector unsigned char
1045 vec_and (__vector unsigned char a1, __vector unsigned char a2)
1047 return (__vector unsigned char) __builtin_altivec_vand ((__vector signed int) a1, (__vector signed int) a2);
1050 /* vec_andc */
1052 inline __vector float
1053 vec_andc (__vector float a1, __vector float a2)
1055 return (__vector float) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1058 inline __vector float
1059 vec_andc (__vector float a1, __vector bool int a2)
1061 return (__vector float) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1064 inline __vector float
1065 vec_andc (__vector bool int a1, __vector float a2)
1067 return (__vector float) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1070 inline __vector bool int
1071 vec_andc (__vector bool int a1, __vector bool int a2)
1073 return (__vector bool int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1076 inline __vector signed int
1077 vec_andc (__vector bool int a1, __vector signed int a2)
1079 return (__vector signed int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1082 inline __vector signed int
1083 vec_andc (__vector signed int a1, __vector bool int a2)
1085 return (__vector signed int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1088 inline __vector signed int
1089 vec_andc (__vector signed int a1, __vector signed int a2)
1091 return (__vector signed int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1094 inline __vector unsigned int
1095 vec_andc (__vector bool int a1, __vector unsigned int a2)
1097 return (__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1100 inline __vector unsigned int
1101 vec_andc (__vector unsigned int a1, __vector bool int a2)
1103 return (__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1106 inline __vector unsigned int
1107 vec_andc (__vector unsigned int a1, __vector unsigned int a2)
1109 return (__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1112 inline __vector bool short
1113 vec_andc (__vector bool short a1, __vector bool short a2)
1115 return (__vector bool short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1118 inline __vector signed short
1119 vec_andc (__vector bool short a1, __vector signed short a2)
1121 return (__vector signed short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1124 inline __vector signed short
1125 vec_andc (__vector signed short a1, __vector bool short a2)
1127 return (__vector signed short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1130 inline __vector signed short
1131 vec_andc (__vector signed short a1, __vector signed short a2)
1133 return (__vector signed short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1136 inline __vector unsigned short
1137 vec_andc (__vector bool short a1, __vector unsigned short a2)
1139 return (__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1142 inline __vector unsigned short
1143 vec_andc (__vector unsigned short a1, __vector bool short a2)
1145 return (__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1148 inline __vector unsigned short
1149 vec_andc (__vector unsigned short a1, __vector unsigned short a2)
1151 return (__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1154 inline __vector signed char
1155 vec_andc (__vector bool char a1, __vector signed char a2)
1157 return (__vector signed char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1160 inline __vector bool char
1161 vec_andc (__vector bool char a1, __vector bool char a2)
1163 return (__vector bool char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1166 inline __vector signed char
1167 vec_andc (__vector signed char a1, __vector bool char a2)
1169 return (__vector signed char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1172 inline __vector signed char
1173 vec_andc (__vector signed char a1, __vector signed char a2)
1175 return (__vector signed char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1178 inline __vector unsigned char
1179 vec_andc (__vector bool char a1, __vector unsigned char a2)
1181 return (__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1184 inline __vector unsigned char
1185 vec_andc (__vector unsigned char a1, __vector bool char a2)
1187 return (__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1190 inline __vector unsigned char
1191 vec_andc (__vector unsigned char a1, __vector unsigned char a2)
1193 return (__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) a1, (__vector signed int) a2);
1196 /* vec_avg */
1198 inline __vector unsigned char
1199 vec_avg (__vector unsigned char a1, __vector unsigned char a2)
1201 return (__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) a1, (__vector signed char) a2);
1204 inline __vector signed char
1205 vec_avg (__vector signed char a1, __vector signed char a2)
1207 return (__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) a1, (__vector signed char) a2);
1210 inline __vector unsigned short
1211 vec_avg (__vector unsigned short a1, __vector unsigned short a2)
1213 return (__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) a1, (__vector signed short) a2);
1216 inline __vector signed short
1217 vec_avg (__vector signed short a1, __vector signed short a2)
1219 return (__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) a1, (__vector signed short) a2);
1222 inline __vector unsigned int
1223 vec_avg (__vector unsigned int a1, __vector unsigned int a2)
1225 return (__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) a1, (__vector signed int) a2);
1228 inline __vector signed int
1229 vec_avg (__vector signed int a1, __vector signed int a2)
1231 return (__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) a1, (__vector signed int) a2);
1234 /* vec_vavgsw */
1236 inline __vector signed int
1237 vec_vavgsw (__vector signed int a1, __vector signed int a2)
1239 return (__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) a1, (__vector signed int) a2);
1242 /* vec_vavguw */
1244 inline __vector unsigned int
1245 vec_vavguw (__vector unsigned int a1, __vector unsigned int a2)
1247 return (__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) a1, (__vector signed int) a2);
1250 /* vec_vavgsh */
1252 inline __vector signed short
1253 vec_vavgsh (__vector signed short a1, __vector signed short a2)
1255 return (__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) a1, (__vector signed short) a2);
1258 /* vec_vavguh */
1260 inline __vector unsigned short
1261 vec_vavguh (__vector unsigned short a1, __vector unsigned short a2)
1263 return (__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) a1, (__vector signed short) a2);
1266 /* vec_vavgsb */
1268 inline __vector signed char
1269 vec_vavgsb (__vector signed char a1, __vector signed char a2)
1271 return (__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) a1, (__vector signed char) a2);
1274 /* vec_vavgub */
1276 inline __vector unsigned char
1277 vec_vavgub (__vector unsigned char a1, __vector unsigned char a2)
1279 return (__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) a1, (__vector signed char) a2);
1282 /* vec_ceil */
1284 inline __vector float
1285 vec_ceil (__vector float a1)
1287 return (__vector float) __builtin_altivec_vrfip ((__vector float) a1);
1290 /* vec_cmpb */
1292 inline __vector signed int
1293 vec_cmpb (__vector float a1, __vector float a2)
1295 return (__vector signed int) __builtin_altivec_vcmpbfp ((__vector float) a1, (__vector float) a2);
1298 /* vec_cmpeq */
1300 inline __vector bool char
1301 vec_cmpeq (__vector signed char a1, __vector signed char a2)
1303 return (__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2);
1306 inline __vector bool char
1307 vec_cmpeq (__vector unsigned char a1, __vector unsigned char a2)
1309 return (__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2);
1312 inline __vector bool short
1313 vec_cmpeq (__vector signed short a1, __vector signed short a2)
1315 return (__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2);
1318 inline __vector bool short
1319 vec_cmpeq (__vector unsigned short a1, __vector unsigned short a2)
1321 return (__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2);
1324 inline __vector bool int
1325 vec_cmpeq (__vector signed int a1, __vector signed int a2)
1327 return (__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2);
1330 inline __vector bool int
1331 vec_cmpeq (__vector unsigned int a1, __vector unsigned int a2)
1333 return (__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2);
1336 inline __vector bool int
1337 vec_cmpeq (__vector float a1, __vector float a2)
1339 return (__vector bool int) __builtin_altivec_vcmpeqfp ((__vector float) a1, (__vector float) a2);
1342 /* vec_vcmpeqfp */
1344 inline __vector bool int
1345 vec_vcmpeqfp (__vector float a1, __vector float a2)
1347 return (__vector bool int) __builtin_altivec_vcmpeqfp ((__vector float) a1, (__vector float) a2);
1350 /* vec_vcmpequw */
1352 inline __vector bool int
1353 vec_vcmpequw (__vector signed int a1, __vector signed int a2)
1355 return (__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2);
1358 inline __vector bool int
1359 vec_vcmpequw (__vector unsigned int a1, __vector unsigned int a2)
1361 return (__vector bool int) __builtin_altivec_vcmpequw ((__vector signed int) a1, (__vector signed int) a2);
1364 /* vec_vcmpequh */
1366 inline __vector bool short
1367 vec_vcmpequh (__vector signed short a1, __vector signed short a2)
1369 return (__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2);
1372 inline __vector bool short
1373 vec_vcmpequh (__vector unsigned short a1, __vector unsigned short a2)
1375 return (__vector bool short) __builtin_altivec_vcmpequh ((__vector signed short) a1, (__vector signed short) a2);
1378 /* vec_vcmpequb */
1380 inline __vector bool char
1381 vec_vcmpequb (__vector signed char a1, __vector signed char a2)
1383 return (__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2);
1386 inline __vector bool char
1387 vec_vcmpequb (__vector unsigned char a1, __vector unsigned char a2)
1389 return (__vector bool char) __builtin_altivec_vcmpequb ((__vector signed char) a1, (__vector signed char) a2);
1392 /* vec_cmpge */
1394 inline __vector bool int
1395 vec_cmpge (__vector float a1, __vector float a2)
1397 return (__vector bool int) __builtin_altivec_vcmpgefp ((__vector float) a1, (__vector float) a2);
1400 /* vec_cmpgt */
1402 inline __vector bool char
1403 vec_cmpgt (__vector unsigned char a1, __vector unsigned char a2)
1405 return (__vector bool char) __builtin_altivec_vcmpgtub ((__vector signed char) a1, (__vector signed char) a2);
1408 inline __vector bool char
1409 vec_cmpgt (__vector signed char a1, __vector signed char a2)
1411 return (__vector bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) a1, (__vector signed char) a2);
1414 inline __vector bool short
1415 vec_cmpgt (__vector unsigned short a1, __vector unsigned short a2)
1417 return (__vector bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) a1, (__vector signed short) a2);
1420 inline __vector bool short
1421 vec_cmpgt (__vector signed short a1, __vector signed short a2)
1423 return (__vector bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) a1, (__vector signed short) a2);
1426 inline __vector bool int
1427 vec_cmpgt (__vector unsigned int a1, __vector unsigned int a2)
1429 return (__vector bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) a1, (__vector signed int) a2);
1432 inline __vector bool int
1433 vec_cmpgt (__vector signed int a1, __vector signed int a2)
1435 return (__vector bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) a1, (__vector signed int) a2);
1438 inline __vector bool int
1439 vec_cmpgt (__vector float a1, __vector float a2)
1441 return (__vector bool int) __builtin_altivec_vcmpgtfp ((__vector float) a1, (__vector float) a2);
1444 /* vec_vcmpgtfp */
1446 inline __vector bool int
1447 vec_vcmpgtfp (__vector float a1, __vector float a2)
1449 return (__vector bool int) __builtin_altivec_vcmpgtfp ((__vector float) a1, (__vector float) a2);
1452 /* vec_vcmpgtsw */
1454 inline __vector bool int
1455 vec_vcmpgtsw (__vector signed int a1, __vector signed int a2)
1457 return (__vector bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) a1, (__vector signed int) a2);
1460 /* vec_vcmpgtuw */
1462 inline __vector bool int
1463 vec_vcmpgtuw (__vector unsigned int a1, __vector unsigned int a2)
1465 return (__vector bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) a1, (__vector signed int) a2);
1468 /* vec_vcmpgtsh */
1470 inline __vector bool short
1471 vec_vcmpgtsh (__vector signed short a1, __vector signed short a2)
1473 return (__vector bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) a1, (__vector signed short) a2);
1476 /* vec_vcmpgtuh */
1478 inline __vector bool short
1479 vec_vcmpgtuh (__vector unsigned short a1, __vector unsigned short a2)
1481 return (__vector bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) a1, (__vector signed short) a2);
1484 /* vec_vcmpgtsb */
1486 inline __vector bool char
1487 vec_vcmpgtsb (__vector signed char a1, __vector signed char a2)
1489 return (__vector bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) a1, (__vector signed char) a2);
1492 /* vec_vcmpgtub */
1494 inline __vector bool char
1495 vec_vcmpgtub (__vector unsigned char a1, __vector unsigned char a2)
1497 return (__vector bool char) __builtin_altivec_vcmpgtub ((__vector signed char) a1, (__vector signed char) a2);
1500 /* vec_cmple */
1502 inline __vector bool int
1503 vec_cmple (__vector float a1, __vector float a2)
1505 return (__vector bool int) __builtin_altivec_vcmpgefp ((__vector float) a2, (__vector float) a1);
1508 /* vec_cmplt */
1510 inline __vector bool char
1511 vec_cmplt (__vector unsigned char a1, __vector unsigned char a2)
1513 return (__vector bool char) __builtin_altivec_vcmpgtub ((__vector signed char) a2, (__vector signed char) a1);
1516 inline __vector bool char
1517 vec_cmplt (__vector signed char a1, __vector signed char a2)
1519 return (__vector bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) a2, (__vector signed char) a1);
1522 inline __vector bool short
1523 vec_cmplt (__vector unsigned short a1, __vector unsigned short a2)
1525 return (__vector bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) a2, (__vector signed short) a1);
1528 inline __vector bool short
1529 vec_cmplt (__vector signed short a1, __vector signed short a2)
1531 return (__vector bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) a2, (__vector signed short) a1);
1534 inline __vector bool int
1535 vec_cmplt (__vector unsigned int a1, __vector unsigned int a2)
1537 return (__vector bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) a2, (__vector signed int) a1);
1540 inline __vector bool int
1541 vec_cmplt (__vector signed int a1, __vector signed int a2)
1543 return (__vector bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) a2, (__vector signed int) a1);
1546 inline __vector bool int
1547 vec_cmplt (__vector float a1, __vector float a2)
1549 return (__vector bool int) __builtin_altivec_vcmpgtfp ((__vector float) a2, (__vector float) a1);
1552 /* vec_ctf */
1554 inline __vector float
1555 vec_ctf (__vector unsigned int a1, const int a2)
1557 return (__vector float) __builtin_altivec_vcfux ((__vector signed int) a1, a2);
1560 inline __vector float
1561 vec_ctf (__vector signed int a1, const int a2)
1563 return (__vector float) __builtin_altivec_vcfsx ((__vector signed int) a1, a2);
1566 /* vec_vcfsx */
1568 inline __vector float
1569 vec_vcfsx (__vector signed int a1, const int a2)
1571 return (__vector float) __builtin_altivec_vcfsx ((__vector signed int) a1, a2);
1574 /* vec_vcfux */
1576 inline __vector float
1577 vec_vcfux (__vector unsigned int a1, const int a2)
1579 return (__vector float) __builtin_altivec_vcfux ((__vector signed int) a1, a2);
1582 /* vec_cts */
1584 inline __vector signed int
1585 vec_cts (__vector float a1, const int a2)
1587 return (__vector signed int) __builtin_altivec_vctsxs ((__vector float) a1, a2);
1590 /* vec_ctu */
1592 inline __vector unsigned int
1593 vec_ctu (__vector float a1, const int a2)
1595 return (__vector unsigned int) __builtin_altivec_vctuxs ((__vector float) a1, a2);
1598 /* vec_dss */
1600 inline void
1601 vec_dss (const int a1)
1603 __builtin_altivec_dss (a1);
1606 /* vec_dssall */
1608 inline void
1609 vec_dssall (void)
1611 __builtin_altivec_dssall ();
1614 /* vec_dst */
1616 inline void
1617 vec_dst (const __vector unsigned char *a1, int a2, const int a3)
1619 __builtin_altivec_dst ((void *) a1, a2, a3);
1622 inline void
1623 vec_dst (const __vector signed char *a1, int a2, const int a3)
1625 __builtin_altivec_dst ((void *) a1, a2, a3);
1628 inline void
1629 vec_dst (const __vector bool char *a1, int a2, const int a3)
1631 __builtin_altivec_dst ((void *) a1, a2, a3);
1634 inline void
1635 vec_dst (const __vector unsigned short *a1, int a2, const int a3)
1637 __builtin_altivec_dst ((void *) a1, a2, a3);
1640 inline void
1641 vec_dst (const __vector signed short *a1, int a2, const int a3)
1643 __builtin_altivec_dst ((void *) a1, a2, a3);
1646 inline void
1647 vec_dst (const __vector bool short *a1, int a2, const int a3)
1649 __builtin_altivec_dst ((void *) a1, a2, a3);
1652 inline void
1653 vec_dst (const __vector pixel *a1, int a2, const int a3)
1655 __builtin_altivec_dst ((void *) a1, a2, a3);
1658 inline void
1659 vec_dst (const __vector unsigned int *a1, int a2, const int a3)
1661 __builtin_altivec_dst ((void *) a1, a2, a3);
1664 inline void
1665 vec_dst (const __vector signed int *a1, int a2, const int a3)
1667 __builtin_altivec_dst ((void *) a1, a2, a3);
1670 inline void
1671 vec_dst (const __vector bool int *a1, int a2, const int a3)
1673 __builtin_altivec_dst ((void *) a1, a2, a3);
1676 inline void
1677 vec_dst (const __vector float *a1, int a2, const int a3)
1679 __builtin_altivec_dst ((void *) a1, a2, a3);
1682 inline void
1683 vec_dst (const unsigned char *a1, int a2, const int a3)
1685 __builtin_altivec_dst ((void *) a1, a2, a3);
1688 inline void
1689 vec_dst (const signed char *a1, int a2, const int a3)
1691 __builtin_altivec_dst ((void *) a1, a2, a3);
1694 inline void
1695 vec_dst (const unsigned short *a1, int a2, const int a3)
1697 __builtin_altivec_dst ((void *) a1, a2, a3);
1700 inline void
1701 vec_dst (const short *a1, int a2, const int a3)
1703 __builtin_altivec_dst ((void *) a1, a2, a3);
1706 inline void
1707 vec_dst (const unsigned int *a1, int a2, const int a3)
1709 __builtin_altivec_dst ((void *) a1, a2, a3);
1712 inline void
1713 vec_dst (const int *a1, int a2, const int a3)
1715 __builtin_altivec_dst ((void *) a1, a2, a3);
1718 inline void
1719 vec_dst (const unsigned long *a1, int a2, const int a3)
1721 __builtin_altivec_dst ((void *) a1, a2, a3);
1724 inline void
1725 vec_dst (const long *a1, int a2, const int a3)
1727 __builtin_altivec_dst ((void *) a1, a2, a3);
1730 inline void
1731 vec_dst (const float *a1, int a2, const int a3)
1733 __builtin_altivec_dst ((void *) a1, a2, a3);
1736 /* vec_dstst */
1738 inline void
1739 vec_dstst (const __vector unsigned char *a1, int a2, const int a3)
1741 __builtin_altivec_dstst ((void *) a1, a2, a3);
1744 inline void
1745 vec_dstst (const __vector signed char *a1, int a2, const int a3)
1747 __builtin_altivec_dstst ((void *) a1, a2, a3);
1750 inline void
1751 vec_dstst (const __vector bool char *a1, int a2, const int a3)
1753 __builtin_altivec_dstst ((void *) a1, a2, a3);
1756 inline void
1757 vec_dstst (const __vector unsigned short *a1, int a2, const int a3)
1759 __builtin_altivec_dstst ((void *) a1, a2, a3);
1762 inline void
1763 vec_dstst (const __vector signed short *a1, int a2, const int a3)
1765 __builtin_altivec_dstst ((void *) a1, a2, a3);
1768 inline void
1769 vec_dstst (const __vector bool short *a1, int a2, const int a3)
1771 __builtin_altivec_dstst ((void *) a1, a2, a3);
1774 inline void
1775 vec_dstst (const __vector pixel *a1, int a2, const int a3)
1777 __builtin_altivec_dstst ((void *) a1, a2, a3);
1780 inline void
1781 vec_dstst (const __vector unsigned int *a1, int a2, const int a3)
1783 __builtin_altivec_dstst ((void *) a1, a2, a3);
1786 inline void
1787 vec_dstst (const __vector signed int *a1, int a2, const int a3)
1789 __builtin_altivec_dstst ((void *) a1, a2, a3);
1792 inline void
1793 vec_dstst (const __vector bool int *a1, int a2, const int a3)
1795 __builtin_altivec_dstst ((void *) a1, a2, a3);
1798 inline void
1799 vec_dstst (const __vector float *a1, int a2, const int a3)
1801 __builtin_altivec_dstst ((void *) a1, a2, a3);
1804 inline void
1805 vec_dstst (const unsigned char *a1, int a2, const int a3)
1807 __builtin_altivec_dstst ((void *) a1, a2, a3);
1810 inline void
1811 vec_dstst (const signed char *a1, int a2, const int a3)
1813 __builtin_altivec_dstst ((void *) a1, a2, a3);
1816 inline void
1817 vec_dstst (const unsigned short *a1, int a2, const int a3)
1819 __builtin_altivec_dstst ((void *) a1, a2, a3);
1822 inline void
1823 vec_dstst (const short *a1, int a2, const int a3)
1825 __builtin_altivec_dstst ((void *) a1, a2, a3);
1828 inline void
1829 vec_dstst (const unsigned int *a1, int a2, const int a3)
1831 __builtin_altivec_dstst ((void *) a1, a2, a3);
1834 inline void
1835 vec_dstst (const int *a1, int a2, const int a3)
1837 __builtin_altivec_dstst ((void *) a1, a2, a3);
1840 inline void
1841 vec_dstst (const unsigned long *a1, int a2, const int a3)
1843 __builtin_altivec_dstst ((void *) a1, a2, a3);
1846 inline void
1847 vec_dstst (const long *a1, int a2, const int a3)
1849 __builtin_altivec_dstst ((void *) a1, a2, a3);
1852 inline void
1853 vec_dstst (const float *a1, int a2, const int a3)
1855 __builtin_altivec_dstst ((void *) a1, a2, a3);
1858 /* vec_dststt */
1860 inline void
1861 vec_dststt (const __vector unsigned char *a1, int a2, const int a3)
1863 __builtin_altivec_dststt ((void *) a1, a2, a3);
1866 inline void
1867 vec_dststt (const __vector signed char *a1, int a2, const int a3)
1869 __builtin_altivec_dststt ((void *) a1, a2, a3);
1872 inline void
1873 vec_dststt (const __vector bool char *a1, int a2, const int a3)
1875 __builtin_altivec_dststt ((void *) a1, a2, a3);
1878 inline void
1879 vec_dststt (const __vector unsigned short *a1, int a2, const int a3)
1881 __builtin_altivec_dststt ((void *) a1, a2, a3);
1884 inline void
1885 vec_dststt (const __vector signed short *a1, int a2, const int a3)
1887 __builtin_altivec_dststt ((void *) a1, a2, a3);
1890 inline void
1891 vec_dststt (const __vector bool short *a1, int a2, const int a3)
1893 __builtin_altivec_dststt ((void *) a1, a2, a3);
1896 inline void
1897 vec_dststt (const __vector pixel *a1, int a2, const int a3)
1899 __builtin_altivec_dststt ((void *) a1, a2, a3);
1902 inline void
1903 vec_dststt (const __vector unsigned int *a1, int a2, const int a3)
1905 __builtin_altivec_dststt ((void *) a1, a2, a3);
1908 inline void
1909 vec_dststt (const __vector signed int *a1, int a2, const int a3)
1911 __builtin_altivec_dststt ((void *) a1, a2, a3);
1914 inline void
1915 vec_dststt (const __vector bool int *a1, int a2, const int a3)
1917 __builtin_altivec_dststt ((void *) a1, a2, a3);
1920 inline void
1921 vec_dststt (const __vector float *a1, int a2, const int a3)
1923 __builtin_altivec_dststt ((void *) a1, a2, a3);
1926 inline void
1927 vec_dststt (const unsigned char *a1, int a2, const int a3)
1929 __builtin_altivec_dststt ((void *) a1, a2, a3);
1932 inline void
1933 vec_dststt (const signed char *a1, int a2, const int a3)
1935 __builtin_altivec_dststt ((void *) a1, a2, a3);
1938 inline void
1939 vec_dststt (const unsigned short *a1, int a2, const int a3)
1941 __builtin_altivec_dststt ((void *) a1, a2, a3);
1944 inline void
1945 vec_dststt (const short *a1, int a2, const int a3)
1947 __builtin_altivec_dststt ((void *) a1, a2, a3);
1950 inline void
1951 vec_dststt (const unsigned int *a1, int a2, const int a3)
1953 __builtin_altivec_dststt ((void *) a1, a2, a3);
1956 inline void
1957 vec_dststt (const int *a1, int a2, const int a3)
1959 __builtin_altivec_dststt ((void *) a1, a2, a3);
1962 inline void
1963 vec_dststt (const unsigned long *a1, int a2, const int a3)
1965 __builtin_altivec_dststt ((void *) a1, a2, a3);
1968 inline void
1969 vec_dststt (const long *a1, int a2, const int a3)
1971 __builtin_altivec_dststt ((void *) a1, a2, a3);
1974 inline void
1975 vec_dststt (const float *a1, int a2, const int a3)
1977 __builtin_altivec_dststt ((void *) a1, a2, a3);
1980 /* vec_dstt */
1982 inline void
1983 vec_dstt (const __vector unsigned char *a1, int a2, const int a3)
1985 __builtin_altivec_dstt ((void *) a1, a2, a3);
1988 inline void
1989 vec_dstt (const __vector signed char *a1, int a2, const int a3)
1991 __builtin_altivec_dstt ((void *) a1, a2, a3);
1994 inline void
1995 vec_dstt (const __vector bool char *a1, int a2, const int a3)
1997 __builtin_altivec_dstt ((void *) a1, a2, a3);
2000 inline void
2001 vec_dstt (const __vector unsigned short *a1, int a2, const int a3)
2003 __builtin_altivec_dstt ((void *) a1, a2, a3);
2006 inline void
2007 vec_dstt (const __vector signed short *a1, int a2, const int a3)
2009 __builtin_altivec_dstt ((void *) a1, a2, a3);
2012 inline void
2013 vec_dstt (const __vector bool short *a1, int a2, const int a3)
2015 __builtin_altivec_dstt ((void *) a1, a2, a3);
2018 inline void
2019 vec_dstt (const __vector pixel *a1, int a2, const int a3)
2021 __builtin_altivec_dstt ((void *) a1, a2, a3);
2024 inline void
2025 vec_dstt (const __vector unsigned int *a1, int a2, const int a3)
2027 __builtin_altivec_dstt ((void *) a1, a2, a3);
2030 inline void
2031 vec_dstt (const __vector signed int *a1, int a2, const int a3)
2033 __builtin_altivec_dstt ((void *) a1, a2, a3);
2036 inline void
2037 vec_dstt (const __vector bool int *a1, int a2, const int a3)
2039 __builtin_altivec_dstt ((void *) a1, a2, a3);
2042 inline void
2043 vec_dstt (const __vector float *a1, int a2, const int a3)
2045 __builtin_altivec_dstt ((void *) a1, a2, a3);
2048 inline void
2049 vec_dstt (const unsigned char *a1, int a2, const int a3)
2051 __builtin_altivec_dstt ((void *) a1, a2, a3);
2054 inline void
2055 vec_dstt (const signed char *a1, int a2, const int a3)
2057 __builtin_altivec_dstt ((void *) a1, a2, a3);
2060 inline void
2061 vec_dstt (const unsigned short *a1, int a2, const int a3)
2063 __builtin_altivec_dstt ((void *) a1, a2, a3);
2066 inline void
2067 vec_dstt (const short *a1, int a2, const int a3)
2069 __builtin_altivec_dstt ((void *) a1, a2, a3);
2072 inline void
2073 vec_dstt (const unsigned int *a1, int a2, const int a3)
2075 __builtin_altivec_dstt ((void *) a1, a2, a3);
2078 inline void
2079 vec_dstt (const int *a1, int a2, const int a3)
2081 __builtin_altivec_dstt ((void *) a1, a2, a3);
2084 inline void
2085 vec_dstt (const unsigned long *a1, int a2, const int a3)
2087 __builtin_altivec_dstt ((void *) a1, a2, a3);
2090 inline void
2091 vec_dstt (const long *a1, int a2, const int a3)
2093 __builtin_altivec_dstt ((void *) a1, a2, a3);
2096 inline void
2097 vec_dstt (const float *a1, int a2, const int a3)
2099 __builtin_altivec_dstt ((void *) a1, a2, a3);
2102 /* vec_expte */
2104 inline __vector float
2105 vec_expte (__vector float a1)
2107 return (__vector float) __builtin_altivec_vexptefp ((__vector float) a1);
2110 /* vec_floor */
2112 inline __vector float
2113 vec_floor (__vector float a1)
2115 return (__vector float) __builtin_altivec_vrfim ((__vector float) a1);
2118 /* vec_ld */
2120 inline __vector float
2121 vec_ld (int a1, const __vector float *a2)
2123 return (__vector float) __builtin_altivec_lvx (a1, (void *) a2);
2126 inline __vector float
2127 vec_ld (int a1, const float *a2)
2129 return (__vector float) __builtin_altivec_lvx (a1, (void *) a2);
2132 inline __vector bool int
2133 vec_ld (int a1, const __vector bool int *a2)
2135 return (__vector bool int) __builtin_altivec_lvx (a1, (void *) a2);
2138 inline __vector signed int
2139 vec_ld (int a1, const __vector signed int *a2)
2141 return (__vector signed int) __builtin_altivec_lvx (a1, (void *) a2);
2144 inline __vector signed int
2145 vec_ld (int a1, const int *a2)
2147 return (__vector signed int) __builtin_altivec_lvx (a1, (void *) a2);
2150 inline __vector signed int
2151 vec_ld (int a1, const long *a2)
2153 return (__vector signed int) __builtin_altivec_lvx (a1, (void *) a2);
2156 inline __vector unsigned int
2157 vec_ld (int a1, const __vector unsigned int *a2)
2159 return (__vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2);
2162 inline __vector unsigned int
2163 vec_ld (int a1, const unsigned int *a2)
2165 return (__vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2);
2168 inline __vector unsigned int
2169 vec_ld (int a1, const unsigned long *a2)
2171 return (__vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2);
2174 inline __vector bool short
2175 vec_ld (int a1, const __vector bool short *a2)
2177 return (__vector bool short) __builtin_altivec_lvx (a1, (void *) a2);
2180 inline __vector pixel
2181 vec_ld (int a1, const __vector pixel *a2)
2183 return (__vector pixel) __builtin_altivec_lvx (a1, (void *) a2);
2186 inline __vector signed short
2187 vec_ld (int a1, const __vector signed short *a2)
2189 return (__vector signed short) __builtin_altivec_lvx (a1, (void *) a2);
2192 inline __vector signed short
2193 vec_ld (int a1, const short *a2)
2195 return (__vector signed short) __builtin_altivec_lvx (a1, (void *) a2);
2198 inline __vector unsigned short
2199 vec_ld (int a1, const __vector unsigned short *a2)
2201 return (__vector unsigned short) __builtin_altivec_lvx (a1, (void *) a2);
2204 inline __vector unsigned short
2205 vec_ld (int a1, const unsigned short *a2)
2207 return (__vector unsigned short) __builtin_altivec_lvx (a1, (void *) a2);
2210 inline __vector bool char
2211 vec_ld (int a1, const __vector bool char *a2)
2213 return (__vector bool char) __builtin_altivec_lvx (a1, (void *) a2);
2216 inline __vector signed char
2217 vec_ld (int a1, const __vector signed char *a2)
2219 return (__vector signed char) __builtin_altivec_lvx (a1, (void *) a2);
2222 inline __vector signed char
2223 vec_ld (int a1, const signed char *a2)
2225 return (__vector signed char) __builtin_altivec_lvx (a1, (void *) a2);
2228 inline __vector unsigned char
2229 vec_ld (int a1, const __vector unsigned char *a2)
2231 return (__vector unsigned char) __builtin_altivec_lvx (a1, (void *) a2);
2234 inline __vector unsigned char
2235 vec_ld (int a1, const unsigned char *a2)
2237 return (__vector unsigned char) __builtin_altivec_lvx (a1, (void *) a2);
2240 /* vec_lde */
2242 inline __vector signed char
2243 vec_lde (int a1, const signed char *a2)
2245 return (__vector signed char) __builtin_altivec_lvebx (a1, (void *) a2);
2248 inline __vector unsigned char
2249 vec_lde (int a1, const unsigned char *a2)
2251 return (__vector unsigned char) __builtin_altivec_lvebx (a1, (void *) a2);
2254 inline __vector signed short
2255 vec_lde (int a1, const short *a2)
2257 return (__vector signed short) __builtin_altivec_lvehx (a1, (void *) a2);
2260 inline __vector unsigned short
2261 vec_lde (int a1, const unsigned short *a2)
2263 return (__vector unsigned short) __builtin_altivec_lvehx (a1, (void *) a2);
2266 inline __vector float
2267 vec_lde (int a1, const float *a2)
2269 return (__vector float) __builtin_altivec_lvewx (a1, (void *) a2);
2272 inline __vector signed int
2273 vec_lde (int a1, const int *a2)
2275 return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
2278 inline __vector unsigned int
2279 vec_lde (int a1, const unsigned int *a2)
2281 return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
2284 inline __vector signed int
2285 vec_lde (int a1, const long *a2)
2287 return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
2290 inline __vector unsigned int
2291 vec_lde (int a1, const unsigned long *a2)
2293 return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
2296 /* vec_lvewx */
2298 inline __vector float
2299 vec_lvewx (int a1, float *a2)
2301 return (__vector float) __builtin_altivec_lvewx (a1, (void *) a2);
2304 inline __vector signed int
2305 vec_lvewx (int a1, int *a2)
2307 return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
2310 inline __vector unsigned int
2311 vec_lvewx (int a1, unsigned int *a2)
2313 return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
2316 inline __vector signed int
2317 vec_lvewx (int a1, long *a2)
2319 return (__vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
2322 inline __vector unsigned int
2323 vec_lvewx (int a1, unsigned long *a2)
2325 return (__vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
2328 /* vec_lvehx */
2330 inline __vector signed short
2331 vec_lvehx (int a1, short *a2)
2333 return (__vector signed short) __builtin_altivec_lvehx (a1, (void *) a2);
2336 inline __vector unsigned short
2337 vec_lvehx (int a1, unsigned short *a2)
2339 return (__vector unsigned short) __builtin_altivec_lvehx (a1, (void *) a2);
2342 /* vec_lvebx */
2344 inline __vector signed char
2345 vec_lvebx (int a1, signed char *a2)
2347 return (__vector signed char) __builtin_altivec_lvebx (a1, (void *) a2);
2350 inline __vector unsigned char
2351 vec_lvebx (int a1, unsigned char *a2)
2353 return (__vector unsigned char) __builtin_altivec_lvebx (a1, (void *) a2);
2356 /* vec_ldl */
2358 inline __vector float
2359 vec_ldl (int a1, const __vector float *a2)
2361 return (__vector float) __builtin_altivec_lvxl (a1, (void *) a2);
2364 inline __vector float
2365 vec_ldl (int a1, const float *a2)
2367 return (__vector float) __builtin_altivec_lvxl (a1, (void *) a2);
2370 inline __vector bool int
2371 vec_ldl (int a1, const __vector bool int *a2)
2373 return (__vector bool int) __builtin_altivec_lvxl (a1, (void *) a2);
2376 inline __vector signed int
2377 vec_ldl (int a1, const __vector signed int *a2)
2379 return (__vector signed int) __builtin_altivec_lvxl (a1, (void *) a2);
2382 inline __vector signed int
2383 vec_ldl (int a1, const int *a2)
2385 return (__vector signed int) __builtin_altivec_lvxl (a1, (void *) a2);
2388 inline __vector signed int
2389 vec_ldl (int a1, const long *a2)
2391 return (__vector signed int) __builtin_altivec_lvxl (a1, (void *) a2);
2394 inline __vector unsigned int
2395 vec_ldl (int a1, const __vector unsigned int *a2)
2397 return (__vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2);
2400 inline __vector unsigned int
2401 vec_ldl (int a1, const unsigned int *a2)
2403 return (__vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2);
2406 inline __vector unsigned int
2407 vec_ldl (int a1, const unsigned long *a2)
2409 return (__vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2);
2412 inline __vector bool short
2413 vec_ldl (int a1, const __vector bool short *a2)
2415 return (__vector bool short) __builtin_altivec_lvxl (a1, (void *) a2);
2418 inline __vector pixel
2419 vec_ldl (int a1, const __vector pixel *a2)
2421 return (__vector pixel) __builtin_altivec_lvxl (a1, (void *) a2);
2424 inline __vector signed short
2425 vec_ldl (int a1, const __vector signed short *a2)
2427 return (__vector signed short) __builtin_altivec_lvxl (a1, (void *) a2);
2430 inline __vector signed short
2431 vec_ldl (int a1, const short *a2)
2433 return (__vector signed short) __builtin_altivec_lvxl (a1, (void *) a2);
2436 inline __vector unsigned short
2437 vec_ldl (int a1, const __vector unsigned short *a2)
2439 return (__vector unsigned short) __builtin_altivec_lvxl (a1, (void *) a2);
2442 inline __vector unsigned short
2443 vec_ldl (int a1, const unsigned short *a2)
2445 return (__vector unsigned short) __builtin_altivec_lvxl (a1, (void *) a2);
2448 inline __vector bool char
2449 vec_ldl (int a1, const __vector bool char *a2)
2451 return (__vector bool char) __builtin_altivec_lvxl (a1, (void *) a2);
2454 inline __vector signed char
2455 vec_ldl (int a1, const __vector signed char *a2)
2457 return (__vector signed char) __builtin_altivec_lvxl (a1, (void *) a2);
2460 inline __vector signed char
2461 vec_ldl (int a1, const signed char *a2)
2463 return (__vector signed char) __builtin_altivec_lvxl (a1, (void *) a2);
2466 inline __vector unsigned char
2467 vec_ldl (int a1, const __vector unsigned char *a2)
2469 return (__vector unsigned char) __builtin_altivec_lvxl (a1, (void *) a2);
2472 inline __vector unsigned char
2473 vec_ldl (int a1, const unsigned char *a2)
2475 return (__vector unsigned char) __builtin_altivec_lvxl (a1, (void *) a2);
2478 /* vec_loge */
2480 inline __vector float
2481 vec_loge (__vector float a1)
2483 return (__vector float) __builtin_altivec_vlogefp ((__vector float) a1);
2486 /* vec_lvsl */
2488 inline __vector unsigned char
2489 vec_lvsl (int a1, const volatile unsigned char *a2)
2491 return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2494 inline __vector unsigned char
2495 vec_lvsl (int a1, const volatile signed char *a2)
2497 return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2500 inline __vector unsigned char
2501 vec_lvsl (int a1, const volatile unsigned short *a2)
2503 return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2506 inline __vector unsigned char
2507 vec_lvsl (int a1, const volatile short *a2)
2509 return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2512 inline __vector unsigned char
2513 vec_lvsl (int a1, const volatile unsigned int *a2)
2515 return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2518 inline __vector unsigned char
2519 vec_lvsl (int a1, const volatile int *a2)
2521 return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2524 inline __vector unsigned char
2525 vec_lvsl (int a1, const volatile unsigned long *a2)
2527 return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2530 inline __vector unsigned char
2531 vec_lvsl (int a1, const volatile long *a2)
2533 return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2536 inline __vector unsigned char
2537 vec_lvsl (int a1, const volatile float *a2)
2539 return (__vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
2542 /* vec_lvsr */
2544 inline __vector unsigned char
2545 vec_lvsr (int a1, const volatile unsigned char *a2)
2547 return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2550 inline __vector unsigned char
2551 vec_lvsr (int a1, const volatile signed char *a2)
2553 return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2556 inline __vector unsigned char
2557 vec_lvsr (int a1, const volatile unsigned short *a2)
2559 return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2562 inline __vector unsigned char
2563 vec_lvsr (int a1, const volatile short *a2)
2565 return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2568 inline __vector unsigned char
2569 vec_lvsr (int a1, const volatile unsigned int *a2)
2571 return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2574 inline __vector unsigned char
2575 vec_lvsr (int a1, const volatile int *a2)
2577 return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2580 inline __vector unsigned char
2581 vec_lvsr (int a1, const volatile unsigned long *a2)
2583 return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2586 inline __vector unsigned char
2587 vec_lvsr (int a1, const volatile long *a2)
2589 return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2592 inline __vector unsigned char
2593 vec_lvsr (int a1, const volatile float *a2)
2595 return (__vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
2598 /* vec_madd */
2600 inline __vector float
2601 vec_madd (__vector float a1, __vector float a2, __vector float a3)
2603 return (__vector float) __builtin_altivec_vmaddfp ((__vector float) a1, (__vector float) a2, (__vector float) a3);
2606 /* vec_madds */
2608 inline __vector signed short
2609 vec_madds (__vector signed short a1, __vector signed short a2, __vector signed short a3)
2611 return (__vector signed short) __builtin_altivec_vmhaddshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
2614 /* vec_max */
2616 inline __vector unsigned char
2617 vec_max (__vector bool char a1, __vector unsigned char a2)
2619 return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2622 inline __vector unsigned char
2623 vec_max (__vector unsigned char a1, __vector bool char a2)
2625 return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2628 inline __vector unsigned char
2629 vec_max (__vector unsigned char a1, __vector unsigned char a2)
2631 return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2634 inline __vector signed char
2635 vec_max (__vector bool char a1, __vector signed char a2)
2637 return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2640 inline __vector signed char
2641 vec_max (__vector signed char a1, __vector bool char a2)
2643 return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2646 inline __vector signed char
2647 vec_max (__vector signed char a1, __vector signed char a2)
2649 return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2652 inline __vector unsigned short
2653 vec_max (__vector bool short a1, __vector unsigned short a2)
2655 return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2658 inline __vector unsigned short
2659 vec_max (__vector unsigned short a1, __vector bool short a2)
2661 return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2664 inline __vector unsigned short
2665 vec_max (__vector unsigned short a1, __vector unsigned short a2)
2667 return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2670 inline __vector signed short
2671 vec_max (__vector bool short a1, __vector signed short a2)
2673 return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2676 inline __vector signed short
2677 vec_max (__vector signed short a1, __vector bool short a2)
2679 return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2682 inline __vector signed short
2683 vec_max (__vector signed short a1, __vector signed short a2)
2685 return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2688 inline __vector unsigned int
2689 vec_max (__vector bool int a1, __vector unsigned int a2)
2691 return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2694 inline __vector unsigned int
2695 vec_max (__vector unsigned int a1, __vector bool int a2)
2697 return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2700 inline __vector unsigned int
2701 vec_max (__vector unsigned int a1, __vector unsigned int a2)
2703 return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2706 inline __vector signed int
2707 vec_max (__vector bool int a1, __vector signed int a2)
2709 return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2712 inline __vector signed int
2713 vec_max (__vector signed int a1, __vector bool int a2)
2715 return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2718 inline __vector signed int
2719 vec_max (__vector signed int a1, __vector signed int a2)
2721 return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2724 inline __vector float
2725 vec_max (__vector float a1, __vector float a2)
2727 return (__vector float) __builtin_altivec_vmaxfp ((__vector float) a1, (__vector float) a2);
2730 /* vec_vmaxfp */
2732 inline __vector float
2733 vec_vmaxfp (__vector float a1, __vector float a2)
2735 return (__vector float) __builtin_altivec_vmaxfp ((__vector float) a1, (__vector float) a2);
2738 /* vec_vmaxsw */
2740 inline __vector signed int
2741 vec_vmaxsw (__vector bool int a1, __vector signed int a2)
2743 return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2746 inline __vector signed int
2747 vec_vmaxsw (__vector signed int a1, __vector bool int a2)
2749 return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2752 inline __vector signed int
2753 vec_vmaxsw (__vector signed int a1, __vector signed int a2)
2755 return (__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) a1, (__vector signed int) a2);
2758 /* vec_vmaxuw */
2760 inline __vector unsigned int
2761 vec_vmaxuw (__vector bool int a1, __vector unsigned int a2)
2763 return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2766 inline __vector unsigned int
2767 vec_vmaxuw (__vector unsigned int a1, __vector bool int a2)
2769 return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2772 inline __vector unsigned int
2773 vec_vmaxuw (__vector unsigned int a1, __vector unsigned int a2)
2775 return (__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) a1, (__vector signed int) a2);
2778 /* vec_vmaxsh */
2780 inline __vector signed short
2781 vec_vmaxsh (__vector bool short a1, __vector signed short a2)
2783 return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2786 inline __vector signed short
2787 vec_vmaxsh (__vector signed short a1, __vector bool short a2)
2789 return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2792 inline __vector signed short
2793 vec_vmaxsh (__vector signed short a1, __vector signed short a2)
2795 return (__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) a1, (__vector signed short) a2);
2798 /* vec_vmaxuh */
2800 inline __vector unsigned short
2801 vec_vmaxuh (__vector bool short a1, __vector unsigned short a2)
2803 return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2806 inline __vector unsigned short
2807 vec_vmaxuh (__vector unsigned short a1, __vector bool short a2)
2809 return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2812 inline __vector unsigned short
2813 vec_vmaxuh (__vector unsigned short a1, __vector unsigned short a2)
2815 return (__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) a1, (__vector signed short) a2);
2818 /* vec_vmaxsb */
2820 inline __vector signed char
2821 vec_vmaxsb (__vector bool char a1, __vector signed char a2)
2823 return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2826 inline __vector signed char
2827 vec_vmaxsb (__vector signed char a1, __vector bool char a2)
2829 return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2832 inline __vector signed char
2833 vec_vmaxsb (__vector signed char a1, __vector signed char a2)
2835 return (__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) a1, (__vector signed char) a2);
2838 /* vec_vmaxub */
2840 inline __vector unsigned char
2841 vec_vmaxub (__vector bool char a1, __vector unsigned char a2)
2843 return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2846 inline __vector unsigned char
2847 vec_vmaxub (__vector unsigned char a1, __vector bool char a2)
2849 return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2852 inline __vector unsigned char
2853 vec_vmaxub (__vector unsigned char a1, __vector unsigned char a2)
2855 return (__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) a1, (__vector signed char) a2);
2858 /* vec_mergeh */
2860 inline __vector bool char
2861 vec_mergeh (__vector bool char a1, __vector bool char a2)
2863 return (__vector bool char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2866 inline __vector signed char
2867 vec_mergeh (__vector signed char a1, __vector signed char a2)
2869 return (__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2872 inline __vector unsigned char
2873 vec_mergeh (__vector unsigned char a1, __vector unsigned char a2)
2875 return (__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2878 inline __vector bool short
2879 vec_mergeh (__vector bool short a1, __vector bool short a2)
2881 return (__vector bool short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2884 inline __vector pixel
2885 vec_mergeh (__vector pixel a1, __vector pixel a2)
2887 return (__vector pixel) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2890 inline __vector signed short
2891 vec_mergeh (__vector signed short a1, __vector signed short a2)
2893 return (__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2896 inline __vector unsigned short
2897 vec_mergeh (__vector unsigned short a1, __vector unsigned short a2)
2899 return (__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2902 inline __vector float
2903 vec_mergeh (__vector float a1, __vector float a2)
2905 return (__vector float) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2908 inline __vector bool int
2909 vec_mergeh (__vector bool int a1, __vector bool int a2)
2911 return (__vector bool int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2914 inline __vector signed int
2915 vec_mergeh (__vector signed int a1, __vector signed int a2)
2917 return (__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2920 inline __vector unsigned int
2921 vec_mergeh (__vector unsigned int a1, __vector unsigned int a2)
2923 return (__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2926 /* vec_vmrghw */
2928 inline __vector float
2929 vec_vmrghw (__vector float a1, __vector float a2)
2931 return (__vector float) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2934 inline __vector bool int
2935 vec_vmrghw (__vector bool int a1, __vector bool int a2)
2937 return (__vector bool int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2940 inline __vector signed int
2941 vec_vmrghw (__vector signed int a1, __vector signed int a2)
2943 return (__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2946 inline __vector unsigned int
2947 vec_vmrghw (__vector unsigned int a1, __vector unsigned int a2)
2949 return (__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) a1, (__vector signed int) a2);
2952 /* vec_vmrghh */
2954 inline __vector bool short
2955 vec_vmrghh (__vector bool short a1, __vector bool short a2)
2957 return (__vector bool short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2960 inline __vector signed short
2961 vec_vmrghh (__vector signed short a1, __vector signed short a2)
2963 return (__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2966 inline __vector unsigned short
2967 vec_vmrghh (__vector unsigned short a1, __vector unsigned short a2)
2969 return (__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2972 inline __vector pixel
2973 vec_vmrghh (__vector pixel a1, __vector pixel a2)
2975 return (__vector pixel) __builtin_altivec_vmrghh ((__vector signed short) a1, (__vector signed short) a2);
2978 /* vec_vmrghb */
2980 inline __vector bool char
2981 vec_vmrghb (__vector bool char a1, __vector bool char a2)
2983 return (__vector bool char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2986 inline __vector signed char
2987 vec_vmrghb (__vector signed char a1, __vector signed char a2)
2989 return (__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2992 inline __vector unsigned char
2993 vec_vmrghb (__vector unsigned char a1, __vector unsigned char a2)
2995 return (__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) a1, (__vector signed char) a2);
2998 /* vec_mergel */
3000 inline __vector bool char
3001 vec_mergel (__vector bool char a1, __vector bool char a2)
3003 return (__vector bool char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
3006 inline __vector signed char
3007 vec_mergel (__vector signed char a1, __vector signed char a2)
3009 return (__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
3012 inline __vector unsigned char
3013 vec_mergel (__vector unsigned char a1, __vector unsigned char a2)
3015 return (__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
3018 inline __vector bool short
3019 vec_mergel (__vector bool short a1, __vector bool short a2)
3021 return (__vector bool short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3024 inline __vector pixel
3025 vec_mergel (__vector pixel a1, __vector pixel a2)
3027 return (__vector pixel) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3030 inline __vector signed short
3031 vec_mergel (__vector signed short a1, __vector signed short a2)
3033 return (__vector signed short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3036 inline __vector unsigned short
3037 vec_mergel (__vector unsigned short a1, __vector unsigned short a2)
3039 return (__vector unsigned short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3042 inline __vector float
3043 vec_mergel (__vector float a1, __vector float a2)
3045 return (__vector float) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3048 inline __vector bool int
3049 vec_mergel (__vector bool int a1, __vector bool int a2)
3051 return (__vector bool int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3054 inline __vector signed int
3055 vec_mergel (__vector signed int a1, __vector signed int a2)
3057 return (__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3060 inline __vector unsigned int
3061 vec_mergel (__vector unsigned int a1, __vector unsigned int a2)
3063 return (__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3066 /* vec_vmrglw */
3068 inline __vector float
3069 vec_vmrglw (__vector float a1, __vector float a2)
3071 return (__vector float) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3074 inline __vector signed int
3075 vec_vmrglw (__vector signed int a1, __vector signed int a2)
3077 return (__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3080 inline __vector unsigned int
3081 vec_vmrglw (__vector unsigned int a1, __vector unsigned int a2)
3083 return (__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3086 inline __vector bool int
3087 vec_vmrglw (__vector bool int a1, __vector bool int a2)
3089 return (__vector bool int) __builtin_altivec_vmrglw ((__vector signed int) a1, (__vector signed int) a2);
3092 /* vec_vmrglh */
3094 inline __vector bool short
3095 vec_vmrglh (__vector bool short a1, __vector bool short a2)
3097 return (__vector bool short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3100 inline __vector signed short
3101 vec_vmrglh (__vector signed short a1, __vector signed short a2)
3103 return (__vector signed short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3106 inline __vector unsigned short
3107 vec_vmrglh (__vector unsigned short a1, __vector unsigned short a2)
3109 return (__vector unsigned short) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3112 inline __vector pixel
3113 vec_vmrglh (__vector pixel a1, __vector pixel a2)
3115 return (__vector pixel) __builtin_altivec_vmrglh ((__vector signed short) a1, (__vector signed short) a2);
3118 /* vec_vmrglb */
3120 inline __vector bool char
3121 vec_vmrglb (__vector bool char a1, __vector bool char a2)
3123 return (__vector bool char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
3126 inline __vector signed char
3127 vec_vmrglb (__vector signed char a1, __vector signed char a2)
3129 return (__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
3132 inline __vector unsigned char
3133 vec_vmrglb (__vector unsigned char a1, __vector unsigned char a2)
3135 return (__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) a1, (__vector signed char) a2);
3138 /* vec_mfvscr */
3140 inline __vector unsigned short
3141 vec_mfvscr (void)
3143 return (__vector unsigned short) __builtin_altivec_mfvscr ();
3146 /* vec_min */
3148 inline __vector unsigned char
3149 vec_min (__vector bool char a1, __vector unsigned char a2)
3151 return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3154 inline __vector unsigned char
3155 vec_min (__vector unsigned char a1, __vector bool char a2)
3157 return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3160 inline __vector unsigned char
3161 vec_min (__vector unsigned char a1, __vector unsigned char a2)
3163 return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3166 inline __vector signed char
3167 vec_min (__vector bool char a1, __vector signed char a2)
3169 return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3172 inline __vector signed char
3173 vec_min (__vector signed char a1, __vector bool char a2)
3175 return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3178 inline __vector signed char
3179 vec_min (__vector signed char a1, __vector signed char a2)
3181 return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3184 inline __vector unsigned short
3185 vec_min (__vector bool short a1, __vector unsigned short a2)
3187 return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3190 inline __vector unsigned short
3191 vec_min (__vector unsigned short a1, __vector bool short a2)
3193 return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3196 inline __vector unsigned short
3197 vec_min (__vector unsigned short a1, __vector unsigned short a2)
3199 return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3202 inline __vector signed short
3203 vec_min (__vector bool short a1, __vector signed short a2)
3205 return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3208 inline __vector signed short
3209 vec_min (__vector signed short a1, __vector bool short a2)
3211 return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3214 inline __vector signed short
3215 vec_min (__vector signed short a1, __vector signed short a2)
3217 return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3220 inline __vector unsigned int
3221 vec_min (__vector bool int a1, __vector unsigned int a2)
3223 return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3226 inline __vector unsigned int
3227 vec_min (__vector unsigned int a1, __vector bool int a2)
3229 return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3232 inline __vector unsigned int
3233 vec_min (__vector unsigned int a1, __vector unsigned int a2)
3235 return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3238 inline __vector signed int
3239 vec_min (__vector bool int a1, __vector signed int a2)
3241 return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3244 inline __vector signed int
3245 vec_min (__vector signed int a1, __vector bool int a2)
3247 return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3250 inline __vector signed int
3251 vec_min (__vector signed int a1, __vector signed int a2)
3253 return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3256 inline __vector float
3257 vec_min (__vector float a1, __vector float a2)
3259 return (__vector float) __builtin_altivec_vminfp ((__vector float) a1, (__vector float) a2);
3262 /* vec_vminfp */
3264 inline __vector float
3265 vec_vminfp (__vector float a1, __vector float a2)
3267 return (__vector float) __builtin_altivec_vminfp ((__vector float) a1, (__vector float) a2);
3270 /* vec_vminsw */
3272 inline __vector signed int
3273 vec_vminsw (__vector bool int a1, __vector signed int a2)
3275 return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3278 inline __vector signed int
3279 vec_vminsw (__vector signed int a1, __vector bool int a2)
3281 return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3284 inline __vector signed int
3285 vec_vminsw (__vector signed int a1, __vector signed int a2)
3287 return (__vector signed int) __builtin_altivec_vminsw ((__vector signed int) a1, (__vector signed int) a2);
3290 /* vec_vminuw */
3292 inline __vector unsigned int
3293 vec_vminuw (__vector bool int a1, __vector unsigned int a2)
3295 return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3298 inline __vector unsigned int
3299 vec_vminuw (__vector unsigned int a1, __vector bool int a2)
3301 return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3304 inline __vector unsigned int
3305 vec_vminuw (__vector unsigned int a1, __vector unsigned int a2)
3307 return (__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) a1, (__vector signed int) a2);
3310 /* vec_vminsh */
3312 inline __vector signed short
3313 vec_vminsh (__vector bool short a1, __vector signed short a2)
3315 return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3318 inline __vector signed short
3319 vec_vminsh (__vector signed short a1, __vector bool short a2)
3321 return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3324 inline __vector signed short
3325 vec_vminsh (__vector signed short a1, __vector signed short a2)
3327 return (__vector signed short) __builtin_altivec_vminsh ((__vector signed short) a1, (__vector signed short) a2);
3330 /* vec_vminuh */
3332 inline __vector unsigned short
3333 vec_vminuh (__vector bool short a1, __vector unsigned short a2)
3335 return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3338 inline __vector unsigned short
3339 vec_vminuh (__vector unsigned short a1, __vector bool short a2)
3341 return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3344 inline __vector unsigned short
3345 vec_vminuh (__vector unsigned short a1, __vector unsigned short a2)
3347 return (__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) a1, (__vector signed short) a2);
3350 /* vec_vminsb */
3352 inline __vector signed char
3353 vec_vminsb (__vector bool char a1, __vector signed char a2)
3355 return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3358 inline __vector signed char
3359 vec_vminsb (__vector signed char a1, __vector bool char a2)
3361 return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3364 inline __vector signed char
3365 vec_vminsb (__vector signed char a1, __vector signed char a2)
3367 return (__vector signed char) __builtin_altivec_vminsb ((__vector signed char) a1, (__vector signed char) a2);
3370 /* vec_vminub */
3372 inline __vector unsigned char
3373 vec_vminub (__vector bool char a1, __vector unsigned char a2)
3375 return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3378 inline __vector unsigned char
3379 vec_vminub (__vector unsigned char a1, __vector bool char a2)
3381 return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3384 inline __vector unsigned char
3385 vec_vminub (__vector unsigned char a1, __vector unsigned char a2)
3387 return (__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) a1, (__vector signed char) a2);
3390 /* vec_mladd */
3392 inline __vector signed short
3393 vec_mladd (__vector signed short a1, __vector signed short a2, __vector signed short a3)
3395 return (__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
3398 inline __vector signed short
3399 vec_mladd (__vector signed short a1, __vector unsigned short a2, __vector unsigned short a3)
3401 return (__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
3404 inline __vector signed short
3405 vec_mladd (__vector unsigned short a1, __vector signed short a2, __vector signed short a3)
3407 return (__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
3410 inline __vector unsigned short
3411 vec_mladd (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned short a3)
3413 return (__vector unsigned short) __builtin_altivec_vmladduhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
3416 /* vec_mradds */
3418 inline __vector signed short
3419 vec_mradds (__vector signed short a1, __vector signed short a2, __vector signed short a3)
3421 return (__vector signed short) __builtin_altivec_vmhraddshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed short) a3);
3424 /* vec_msum */
3426 inline __vector unsigned int
3427 vec_msum (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned int a3)
3429 return (__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3);
3432 inline __vector signed int
3433 vec_msum (__vector signed char a1, __vector unsigned char a2, __vector signed int a3)
3435 return (__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3);
3438 inline __vector unsigned int
3439 vec_msum (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3)
3441 return (__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3444 inline __vector signed int
3445 vec_msum (__vector signed short a1, __vector signed short a2, __vector signed int a3)
3447 return (__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3450 /* vec_vmsumshm */
3452 inline __vector signed int
3453 vec_vmsumshm (__vector signed short a1, __vector signed short a2, __vector signed int a3)
3455 return (__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3458 /* vec_vmsumuhm */
3460 inline __vector unsigned int
3461 vec_vmsumuhm (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3)
3463 return (__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3466 /* vec_vmsummbm */
3468 inline __vector signed int
3469 vec_vmsummbm (__vector signed char a1, __vector unsigned char a2, __vector signed int a3)
3471 return (__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3);
3474 /* vec_vmsumubm */
3476 inline __vector unsigned int
3477 vec_vmsumubm (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned int a3)
3479 return (__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) a1, (__vector signed char) a2, (__vector signed int) a3);
3482 /* vec_msums */
3484 inline __vector unsigned int
3485 vec_msums (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3)
3487 return (__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3490 inline __vector signed int
3491 vec_msums (__vector signed short a1, __vector signed short a2, __vector signed int a3)
3493 return (__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3496 /* vec_vmsumshs */
3498 inline __vector signed int
3499 vec_vmsumshs (__vector signed short a1, __vector signed short a2, __vector signed int a3)
3501 return (__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3504 /* vec_vmsumuhs */
3506 inline __vector unsigned int
3507 vec_vmsumuhs (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned int a3)
3509 return (__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) a1, (__vector signed short) a2, (__vector signed int) a3);
3512 /* vec_mtvscr */
3514 inline void
3515 vec_mtvscr (__vector signed int a1)
3517 __builtin_altivec_mtvscr ((__vector signed int) a1);
3520 inline void
3521 vec_mtvscr (__vector unsigned int a1)
3523 __builtin_altivec_mtvscr ((__vector signed int) a1);
3526 inline void
3527 vec_mtvscr (__vector bool int a1)
3529 __builtin_altivec_mtvscr ((__vector signed int) a1);
3532 inline void
3533 vec_mtvscr (__vector signed short a1)
3535 __builtin_altivec_mtvscr ((__vector signed int) a1);
3538 inline void
3539 vec_mtvscr (__vector unsigned short a1)
3541 __builtin_altivec_mtvscr ((__vector signed int) a1);
3544 inline void
3545 vec_mtvscr (__vector bool short a1)
3547 __builtin_altivec_mtvscr ((__vector signed int) a1);
3550 inline void
3551 vec_mtvscr (__vector pixel a1)
3553 __builtin_altivec_mtvscr ((__vector signed int) a1);
3556 inline void
3557 vec_mtvscr (__vector signed char a1)
3559 __builtin_altivec_mtvscr ((__vector signed int) a1);
3562 inline void
3563 vec_mtvscr (__vector unsigned char a1)
3565 __builtin_altivec_mtvscr ((__vector signed int) a1);
3568 inline void
3569 vec_mtvscr (__vector bool char a1)
3571 __builtin_altivec_mtvscr ((__vector signed int) a1);
3574 /* vec_mule */
3576 inline __vector unsigned short
3577 vec_mule (__vector unsigned char a1, __vector unsigned char a2)
3579 return (__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) a1, (__vector signed char) a2);
3582 inline __vector signed short
3583 vec_mule (__vector signed char a1, __vector signed char a2)
3585 return (__vector signed short) __builtin_altivec_vmulesb ((__vector signed char) a1, (__vector signed char) a2);
3588 inline __vector unsigned int
3589 vec_mule (__vector unsigned short a1, __vector unsigned short a2)
3591 return (__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) a1, (__vector signed short) a2);
3594 inline __vector signed int
3595 vec_mule (__vector signed short a1, __vector signed short a2)
3597 return (__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) a1, (__vector signed short) a2);
3600 /* vec_vmulesh */
3602 inline __vector signed int
3603 vec_vmulesh (__vector signed short a1, __vector signed short a2)
3605 return (__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) a1, (__vector signed short) a2);
3608 /* vec_vmuleuh */
3610 inline __vector unsigned int
3611 vec_vmuleuh (__vector unsigned short a1, __vector unsigned short a2)
3613 return (__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) a1, (__vector signed short) a2);
3616 /* vec_vmulesb */
3618 inline __vector signed short
3619 vec_vmulesb (__vector signed char a1, __vector signed char a2)
3621 return (__vector signed short) __builtin_altivec_vmuleub ((__vector signed char) a1, (__vector signed char) a2);
3624 /* vec_vmuleub */
3626 inline __vector unsigned short
3627 vec_vmuleub (__vector unsigned char a1, __vector unsigned char a2)
3629 return (__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) a1, (__vector signed char) a2);
3632 /* vec_mulo */
3634 inline __vector unsigned short
3635 vec_mulo (__vector unsigned char a1, __vector unsigned char a2)
3637 return (__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) a1, (__vector signed char) a2);
3640 inline __vector signed short
3641 vec_mulo (__vector signed char a1, __vector signed char a2)
3643 return (__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) a1, (__vector signed char) a2);
3646 inline __vector unsigned int
3647 vec_mulo (__vector unsigned short a1, __vector unsigned short a2)
3649 return (__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) a1, (__vector signed short) a2);
3652 inline __vector signed int
3653 vec_mulo (__vector signed short a1, __vector signed short a2)
3655 return (__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) a1, (__vector signed short) a2);
3658 /* vec_vmulosh */
3660 inline __vector signed int
3661 vec_vmulosh (__vector signed short a1, __vector signed short a2)
3663 return (__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) a1, (__vector signed short) a2);
3666 /* vec_vmulouh */
3668 inline __vector unsigned int
3669 vec_vmulouh (__vector unsigned short a1, __vector unsigned short a2)
3671 return (__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) a1, (__vector signed short) a2);
3674 /* vec_vmulosb */
3676 inline __vector signed short
3677 vec_vmulosb (__vector signed char a1, __vector signed char a2)
3679 return (__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) a1, (__vector signed char) a2);
3682 /* vec_vmuloub */
3684 inline __vector unsigned short
3685 vec_vmuloub (__vector unsigned char a1, __vector unsigned char a2)
3687 return (__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) a1, (__vector signed char) a2);
3690 /* vec_nmsub */
3692 inline __vector float
3693 vec_nmsub (__vector float a1, __vector float a2, __vector float a3)
3695 return (__vector float) __builtin_altivec_vnmsubfp ((__vector float) a1, (__vector float) a2, (__vector float) a3);
3698 /* vec_nor */
3700 inline __vector float
3701 vec_nor (__vector float a1, __vector float a2)
3703 return (__vector float) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3706 inline __vector signed int
3707 vec_nor (__vector signed int a1, __vector signed int a2)
3709 return (__vector signed int) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3712 inline __vector unsigned int
3713 vec_nor (__vector unsigned int a1, __vector unsigned int a2)
3715 return (__vector unsigned int) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3718 inline __vector bool int
3719 vec_nor (__vector bool int a1, __vector bool int a2)
3721 return (__vector bool int) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3724 inline __vector signed short
3725 vec_nor (__vector signed short a1, __vector signed short a2)
3727 return (__vector signed short) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3730 inline __vector unsigned short
3731 vec_nor (__vector unsigned short a1, __vector unsigned short a2)
3733 return (__vector unsigned short) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3736 inline __vector bool short
3737 vec_nor (__vector bool short a1, __vector bool short a2)
3739 return (__vector bool short) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3742 inline __vector signed char
3743 vec_nor (__vector signed char a1, __vector signed char a2)
3745 return (__vector signed char) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3748 inline __vector unsigned char
3749 vec_nor (__vector unsigned char a1, __vector unsigned char a2)
3751 return (__vector unsigned char) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3754 inline __vector bool char
3755 vec_nor (__vector bool char a1, __vector bool char a2)
3757 return (__vector bool char) __builtin_altivec_vnor ((__vector signed int) a1, (__vector signed int) a2);
3760 /* vec_or */
3762 inline __vector float
3763 vec_or (__vector float a1, __vector float a2)
3765 return (__vector float) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3768 inline __vector float
3769 vec_or (__vector float a1, __vector bool int a2)
3771 return (__vector float) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3774 inline __vector float
3775 vec_or (__vector bool int a1, __vector float a2)
3777 return (__vector float) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3780 inline __vector bool int
3781 vec_or (__vector bool int a1, __vector bool int a2)
3783 return (__vector bool int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3786 inline __vector signed int
3787 vec_or (__vector bool int a1, __vector signed int a2)
3789 return (__vector signed int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3792 inline __vector signed int
3793 vec_or (__vector signed int a1, __vector bool int a2)
3795 return (__vector signed int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3798 inline __vector signed int
3799 vec_or (__vector signed int a1, __vector signed int a2)
3801 return (__vector signed int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3804 inline __vector unsigned int
3805 vec_or (__vector bool int a1, __vector unsigned int a2)
3807 return (__vector unsigned int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3810 inline __vector unsigned int
3811 vec_or (__vector unsigned int a1, __vector bool int a2)
3813 return (__vector unsigned int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3816 inline __vector unsigned int
3817 vec_or (__vector unsigned int a1, __vector unsigned int a2)
3819 return (__vector unsigned int) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3822 inline __vector bool short
3823 vec_or (__vector bool short a1, __vector bool short a2)
3825 return (__vector bool short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3828 inline __vector signed short
3829 vec_or (__vector bool short a1, __vector signed short a2)
3831 return (__vector signed short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3834 inline __vector signed short
3835 vec_or (__vector signed short a1, __vector bool short a2)
3837 return (__vector signed short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3840 inline __vector signed short
3841 vec_or (__vector signed short a1, __vector signed short a2)
3843 return (__vector signed short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3846 inline __vector unsigned short
3847 vec_or (__vector bool short a1, __vector unsigned short a2)
3849 return (__vector unsigned short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3852 inline __vector unsigned short
3853 vec_or (__vector unsigned short a1, __vector bool short a2)
3855 return (__vector unsigned short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3858 inline __vector unsigned short
3859 vec_or (__vector unsigned short a1, __vector unsigned short a2)
3861 return (__vector unsigned short) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3864 inline __vector signed char
3865 vec_or (__vector bool char a1, __vector signed char a2)
3867 return (__vector signed char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3870 inline __vector bool char
3871 vec_or (__vector bool char a1, __vector bool char a2)
3873 return (__vector bool char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3876 inline __vector signed char
3877 vec_or (__vector signed char a1, __vector bool char a2)
3879 return (__vector signed char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3882 inline __vector signed char
3883 vec_or (__vector signed char a1, __vector signed char a2)
3885 return (__vector signed char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3888 inline __vector unsigned char
3889 vec_or (__vector bool char a1, __vector unsigned char a2)
3891 return (__vector unsigned char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3894 inline __vector unsigned char
3895 vec_or (__vector unsigned char a1, __vector bool char a2)
3897 return (__vector unsigned char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3900 inline __vector unsigned char
3901 vec_or (__vector unsigned char a1, __vector unsigned char a2)
3903 return (__vector unsigned char) __builtin_altivec_vor ((__vector signed int) a1, (__vector signed int) a2);
3906 /* vec_pack */
3908 inline __vector signed char
3909 vec_pack (__vector signed short a1, __vector signed short a2)
3911 return (__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3914 inline __vector unsigned char
3915 vec_pack (__vector unsigned short a1, __vector unsigned short a2)
3917 return (__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3920 inline __vector bool char
3921 vec_pack (__vector bool short a1, __vector bool short a2)
3923 return (__vector bool char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3926 inline __vector signed short
3927 vec_pack (__vector signed int a1, __vector signed int a2)
3929 return (__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3932 inline __vector unsigned short
3933 vec_pack (__vector unsigned int a1, __vector unsigned int a2)
3935 return (__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3938 inline __vector bool short
3939 vec_pack (__vector bool int a1, __vector bool int a2)
3941 return (__vector bool short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3944 /* vec_vpkuwum */
3946 inline __vector bool short
3947 vec_vpkuwum (__vector bool int a1, __vector bool int a2)
3949 return (__vector bool short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3952 inline __vector signed short
3953 vec_vpkuwum (__vector signed int a1, __vector signed int a2)
3955 return (__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3958 inline __vector unsigned short
3959 vec_vpkuwum (__vector unsigned int a1, __vector unsigned int a2)
3961 return (__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) a1, (__vector signed int) a2);
3964 /* vec_vpkuhum */
3966 inline __vector bool char
3967 vec_vpkuhum (__vector bool short a1, __vector bool short a2)
3969 return (__vector bool char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3972 inline __vector signed char
3973 vec_vpkuhum (__vector signed short a1, __vector signed short a2)
3975 return (__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3978 inline __vector unsigned char
3979 vec_vpkuhum (__vector unsigned short a1, __vector unsigned short a2)
3981 return (__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) a1, (__vector signed short) a2);
3984 /* vec_packpx */
3986 inline __vector pixel
3987 vec_packpx (__vector unsigned int a1, __vector unsigned int a2)
3989 return (__vector pixel) __builtin_altivec_vpkpx ((__vector signed int) a1, (__vector signed int) a2);
3992 /* vec_packs */
3994 inline __vector unsigned char
3995 vec_packs (__vector unsigned short a1, __vector unsigned short a2)
3997 return (__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) a1, (__vector signed short) a2);
4000 inline __vector signed char
4001 vec_packs (__vector signed short a1, __vector signed short a2)
4003 return (__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) a1, (__vector signed short) a2);
4006 inline __vector unsigned short
4007 vec_packs (__vector unsigned int a1, __vector unsigned int a2)
4009 return (__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) a1, (__vector signed int) a2);
4012 inline __vector signed short
4013 vec_packs (__vector signed int a1, __vector signed int a2)
4015 return (__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) a1, (__vector signed int) a2);
4018 /* vec_vpkswss */
4020 inline __vector signed short
4021 vec_vpkswss (__vector signed int a1, __vector signed int a2)
4023 return (__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) a1, (__vector signed int) a2);
4026 /* vec_vpkuwus */
4028 inline __vector unsigned short
4029 vec_vpkuwus (__vector unsigned int a1, __vector unsigned int a2)
4031 return (__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) a1, (__vector signed int) a2);
4034 /* vec_vpkshss */
4036 inline __vector signed char
4037 vec_vpkshss (__vector signed short a1, __vector signed short a2)
4039 return (__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) a1, (__vector signed short) a2);
4042 /* vec_vpkuhus */
4044 inline __vector unsigned char
4045 vec_vpkuhus (__vector unsigned short a1, __vector unsigned short a2)
4047 return (__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) a1, (__vector signed short) a2);
4050 /* vec_packsu */
4052 inline __vector unsigned char
4053 vec_packsu (__vector unsigned short a1, __vector unsigned short a2)
4055 return (__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) a1, (__vector signed short) a2);
4058 inline __vector unsigned char
4059 vec_packsu (__vector signed short a1, __vector signed short a2)
4061 return (__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) a1, (__vector signed short) a2);
4064 inline __vector unsigned short
4065 vec_packsu (__vector unsigned int a1, __vector unsigned int a2)
4067 return (__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) a1, (__vector signed int) a2);
4070 inline __vector unsigned short
4071 vec_packsu (__vector signed int a1, __vector signed int a2)
4073 return (__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) a1, (__vector signed int) a2);
4076 /* vec_vpkswus */
4078 inline __vector unsigned short
4079 vec_vpkswus (__vector signed int a1, __vector signed int a2)
4081 return (__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) a1, (__vector signed int) a2);
4084 /* vec_vpkshus */
4086 inline __vector unsigned char
4087 vec_vpkshus (__vector signed short a1, __vector signed short a2)
4089 return (__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) a1, (__vector signed short) a2);
4092 /* vec_perm */
4094 inline __vector float
4095 vec_perm (__vector float a1, __vector float a2, __vector unsigned char a3)
4097 return (__vector float) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4100 inline __vector signed int
4101 vec_perm (__vector signed int a1, __vector signed int a2, __vector unsigned char a3)
4103 return (__vector signed int) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4106 inline __vector unsigned int
4107 vec_perm (__vector unsigned int a1, __vector unsigned int a2, __vector unsigned char a3)
4109 return (__vector unsigned int) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4112 inline __vector bool int
4113 vec_perm (__vector bool int a1, __vector bool int a2, __vector unsigned char a3)
4115 return (__vector bool int) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4118 inline __vector signed short
4119 vec_perm (__vector signed short a1, __vector signed short a2, __vector unsigned char a3)
4121 return (__vector signed short) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4124 inline __vector unsigned short
4125 vec_perm (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned char a3)
4127 return (__vector unsigned short) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4130 inline __vector bool short
4131 vec_perm (__vector bool short a1, __vector bool short a2, __vector unsigned char a3)
4133 return (__vector bool short) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4136 inline __vector pixel
4137 vec_perm (__vector pixel a1, __vector pixel a2, __vector unsigned char a3)
4139 return (__vector pixel) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4142 inline __vector signed char
4143 vec_perm (__vector signed char a1, __vector signed char a2, __vector unsigned char a3)
4145 return (__vector signed char) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4148 inline __vector unsigned char
4149 vec_perm (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned char a3)
4151 return (__vector unsigned char) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4154 inline __vector bool char
4155 vec_perm (__vector bool char a1, __vector bool char a2, __vector unsigned char a3)
4157 return (__vector bool char) __builtin_altivec_vperm_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed char) a3);
4160 /* vec_re */
4162 inline __vector float
4163 vec_re (__vector float a1)
4165 return (__vector float) __builtin_altivec_vrefp ((__vector float) a1);
4168 /* vec_rl */
4170 inline __vector signed char
4171 vec_rl (__vector signed char a1, __vector unsigned char a2)
4173 return (__vector signed char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2);
4176 inline __vector unsigned char
4177 vec_rl (__vector unsigned char a1, __vector unsigned char a2)
4179 return (__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2);
4182 inline __vector signed short
4183 vec_rl (__vector signed short a1, __vector unsigned short a2)
4185 return (__vector signed short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2);
4188 inline __vector unsigned short
4189 vec_rl (__vector unsigned short a1, __vector unsigned short a2)
4191 return (__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2);
4194 inline __vector signed int
4195 vec_rl (__vector signed int a1, __vector unsigned int a2)
4197 return (__vector signed int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2);
4200 inline __vector unsigned int
4201 vec_rl (__vector unsigned int a1, __vector unsigned int a2)
4203 return (__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2);
4206 /* vec_vrlw */
4208 inline __vector signed int
4209 vec_vrlw (__vector signed int a1, __vector unsigned int a2)
4211 return (__vector signed int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2);
4214 inline __vector unsigned int
4215 vec_vrlw (__vector unsigned int a1, __vector unsigned int a2)
4217 return (__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) a1, (__vector signed int) a2);
4220 /* vec_vrlh */
4222 inline __vector signed short
4223 vec_vrlh (__vector signed short a1, __vector unsigned short a2)
4225 return (__vector signed short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2);
4228 inline __vector unsigned short
4229 vec_vrlh (__vector unsigned short a1, __vector unsigned short a2)
4231 return (__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) a1, (__vector signed short) a2);
4234 /* vec_vrlb */
4236 inline __vector signed char
4237 vec_vrlb (__vector signed char a1, __vector unsigned char a2)
4239 return (__vector signed char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2);
4242 inline __vector unsigned char
4243 vec_vrlb (__vector unsigned char a1, __vector unsigned char a2)
4245 return (__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) a1, (__vector signed char) a2);
4248 /* vec_round */
4250 inline __vector float
4251 vec_round (__vector float a1)
4253 return (__vector float) __builtin_altivec_vrfin ((__vector float) a1);
4256 /* vec_rsqrte */
4258 inline __vector float
4259 vec_rsqrte (__vector float a1)
4261 return (__vector float) __builtin_altivec_vrsqrtefp ((__vector float) a1);
4264 /* vec_sel */
4266 inline __vector float
4267 vec_sel (__vector float a1, __vector float a2, __vector bool int a3)
4269 return (__vector float) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4272 inline __vector float
4273 vec_sel (__vector float a1, __vector float a2, __vector unsigned int a3)
4275 return (__vector float) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4278 inline __vector signed int
4279 vec_sel (__vector signed int a1, __vector signed int a2, __vector bool int a3)
4281 return (__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4284 inline __vector signed int
4285 vec_sel (__vector signed int a1, __vector signed int a2, __vector unsigned int a3)
4287 return (__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4290 inline __vector unsigned int
4291 vec_sel (__vector unsigned int a1, __vector unsigned int a2, __vector bool int a3)
4293 return (__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4296 inline __vector unsigned int
4297 vec_sel (__vector unsigned int a1, __vector unsigned int a2, __vector unsigned int a3)
4299 return (__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4302 inline __vector bool int
4303 vec_sel (__vector bool int a1, __vector bool int a2, __vector bool int a3)
4305 return (__vector bool int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4308 inline __vector bool int
4309 vec_sel (__vector bool int a1, __vector bool int a2, __vector unsigned int a3)
4311 return (__vector bool int) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4314 inline __vector signed short
4315 vec_sel (__vector signed short a1, __vector signed short a2, __vector bool short a3)
4317 return (__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4320 inline __vector signed short
4321 vec_sel (__vector signed short a1, __vector signed short a2, __vector unsigned short a3)
4323 return (__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4326 inline __vector unsigned short
4327 vec_sel (__vector unsigned short a1, __vector unsigned short a2, __vector bool short a3)
4329 return (__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4332 inline __vector unsigned short
4333 vec_sel (__vector unsigned short a1, __vector unsigned short a2, __vector unsigned short a3)
4335 return (__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4338 inline __vector bool short
4339 vec_sel (__vector bool short a1, __vector bool short a2, __vector bool short a3)
4341 return (__vector bool short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4344 inline __vector bool short
4345 vec_sel (__vector bool short a1, __vector bool short a2, __vector unsigned short a3)
4347 return (__vector bool short) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4350 inline __vector signed char
4351 vec_sel (__vector signed char a1, __vector signed char a2, __vector bool char a3)
4353 return (__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4356 inline __vector signed char
4357 vec_sel (__vector signed char a1, __vector signed char a2, __vector unsigned char a3)
4359 return (__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4362 inline __vector unsigned char
4363 vec_sel (__vector unsigned char a1, __vector unsigned char a2, __vector bool char a3)
4365 return (__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4368 inline __vector unsigned char
4369 vec_sel (__vector unsigned char a1, __vector unsigned char a2, __vector unsigned char a3)
4371 return (__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4374 inline __vector bool char
4375 vec_sel (__vector bool char a1, __vector bool char a2, __vector bool char a3)
4377 return (__vector bool char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4380 inline __vector bool char
4381 vec_sel (__vector bool char a1, __vector bool char a2, __vector unsigned char a3)
4383 return (__vector bool char) __builtin_altivec_vsel_4si ((__vector signed int) a1, (__vector signed int) a2, (__vector signed int) a3);
4386 /* vec_sl */
4388 inline __vector signed char
4389 vec_sl (__vector signed char a1, __vector unsigned char a2)
4391 return (__vector signed char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2);
4394 inline __vector unsigned char
4395 vec_sl (__vector unsigned char a1, __vector unsigned char a2)
4397 return (__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2);
4400 inline __vector signed short
4401 vec_sl (__vector signed short a1, __vector unsigned short a2)
4403 return (__vector signed short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2);
4406 inline __vector unsigned short
4407 vec_sl (__vector unsigned short a1, __vector unsigned short a2)
4409 return (__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2);
4412 inline __vector signed int
4413 vec_sl (__vector signed int a1, __vector unsigned int a2)
4415 return (__vector signed int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2);
4418 inline __vector unsigned int
4419 vec_sl (__vector unsigned int a1, __vector unsigned int a2)
4421 return (__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2);
4424 /* vec_vslw */
4426 inline __vector signed int
4427 vec_vslw (__vector signed int a1, __vector unsigned int a2)
4429 return (__vector signed int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2);
4432 inline __vector unsigned int
4433 vec_vslw (__vector unsigned int a1, __vector unsigned int a2)
4435 return (__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) a1, (__vector signed int) a2);
4438 /* vec_vslh */
4440 inline __vector signed short
4441 vec_vslh (__vector signed short a1, __vector unsigned short a2)
4443 return (__vector signed short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2);
4446 inline __vector unsigned short
4447 vec_vslh (__vector unsigned short a1, __vector unsigned short a2)
4449 return (__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) a1, (__vector signed short) a2);
4452 /* vec_vslb */
4454 inline __vector signed char
4455 vec_vslb (__vector signed char a1, __vector unsigned char a2)
4457 return (__vector signed char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2);
4460 inline __vector unsigned char
4461 vec_vslb (__vector unsigned char a1, __vector unsigned char a2)
4463 return (__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) a1, (__vector signed char) a2);
4466 /* vec_sld */
4468 inline __vector float
4469 vec_sld (__vector float a1, __vector float a2, const int a3)
4471 return (__vector float) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4474 inline __vector signed int
4475 vec_sld (__vector signed int a1, __vector signed int a2, const int a3)
4477 return (__vector signed int) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4480 inline __vector unsigned int
4481 vec_sld (__vector unsigned int a1, __vector unsigned int a2, const int a3)
4483 return (__vector unsigned int) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4486 inline __vector bool int
4487 vec_sld (__vector bool int a1, __vector bool int a2, const int a3)
4489 return (__vector bool int) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4492 inline __vector signed short
4493 vec_sld (__vector signed short a1, __vector signed short a2, const int a3)
4495 return (__vector signed short) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4498 inline __vector unsigned short
4499 vec_sld (__vector unsigned short a1, __vector unsigned short a2, const int a3)
4501 return (__vector unsigned short) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4504 inline __vector bool short
4505 vec_sld (__vector bool short a1, __vector bool short a2, const int a3)
4507 return (__vector bool short) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4510 inline __vector pixel
4511 vec_sld (__vector pixel a1, __vector pixel a2, const int a3)
4513 return (__vector pixel) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4516 inline __vector signed char
4517 vec_sld (__vector signed char a1, __vector signed char a2, const int a3)
4519 return (__vector signed char) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4522 inline __vector unsigned char
4523 vec_sld (__vector unsigned char a1, __vector unsigned char a2, const int a3)
4525 return (__vector unsigned char) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4528 inline __vector bool char
4529 vec_sld (__vector bool char a1, __vector bool char a2, const int a3)
4531 return (__vector bool char) __builtin_altivec_vsldoi_4si ((__vector signed int) a1, (__vector signed int) a2, a3);
4534 /* vec_sll */
4536 inline __vector signed int
4537 vec_sll (__vector signed int a1, __vector unsigned int a2)
4539 return (__vector signed int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4542 inline __vector signed int
4543 vec_sll (__vector signed int a1, __vector unsigned short a2)
4545 return (__vector signed int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4548 inline __vector signed int
4549 vec_sll (__vector signed int a1, __vector unsigned char a2)
4551 return (__vector signed int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4554 inline __vector unsigned int
4555 vec_sll (__vector unsigned int a1, __vector unsigned int a2)
4557 return (__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4560 inline __vector unsigned int
4561 vec_sll (__vector unsigned int a1, __vector unsigned short a2)
4563 return (__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4566 inline __vector unsigned int
4567 vec_sll (__vector unsigned int a1, __vector unsigned char a2)
4569 return (__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4572 inline __vector bool int
4573 vec_sll (__vector bool int a1, __vector unsigned int a2)
4575 return (__vector bool int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4578 inline __vector bool int
4579 vec_sll (__vector bool int a1, __vector unsigned short a2)
4581 return (__vector bool int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4584 inline __vector bool int
4585 vec_sll (__vector bool int a1, __vector unsigned char a2)
4587 return (__vector bool int) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4590 inline __vector signed short
4591 vec_sll (__vector signed short a1, __vector unsigned int a2)
4593 return (__vector signed short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4596 inline __vector signed short
4597 vec_sll (__vector signed short a1, __vector unsigned short a2)
4599 return (__vector signed short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4602 inline __vector signed short
4603 vec_sll (__vector signed short a1, __vector unsigned char a2)
4605 return (__vector signed short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4608 inline __vector unsigned short
4609 vec_sll (__vector unsigned short a1, __vector unsigned int a2)
4611 return (__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4614 inline __vector unsigned short
4615 vec_sll (__vector unsigned short a1, __vector unsigned short a2)
4617 return (__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4620 inline __vector unsigned short
4621 vec_sll (__vector unsigned short a1, __vector unsigned char a2)
4623 return (__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4626 inline __vector bool short
4627 vec_sll (__vector bool short a1, __vector unsigned int a2)
4629 return (__vector bool short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4632 inline __vector bool short
4633 vec_sll (__vector bool short a1, __vector unsigned short a2)
4635 return (__vector bool short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4638 inline __vector bool short
4639 vec_sll (__vector bool short a1, __vector unsigned char a2)
4641 return (__vector bool short) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4644 inline __vector pixel
4645 vec_sll (__vector pixel a1, __vector unsigned int a2)
4647 return (__vector pixel) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4650 inline __vector pixel
4651 vec_sll (__vector pixel a1, __vector unsigned short a2)
4653 return (__vector pixel) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4656 inline __vector pixel
4657 vec_sll (__vector pixel a1, __vector unsigned char a2)
4659 return (__vector pixel) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4662 inline __vector signed char
4663 vec_sll (__vector signed char a1, __vector unsigned int a2)
4665 return (__vector signed char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4668 inline __vector signed char
4669 vec_sll (__vector signed char a1, __vector unsigned short a2)
4671 return (__vector signed char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4674 inline __vector signed char
4675 vec_sll (__vector signed char a1, __vector unsigned char a2)
4677 return (__vector signed char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4680 inline __vector unsigned char
4681 vec_sll (__vector unsigned char a1, __vector unsigned int a2)
4683 return (__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4686 inline __vector unsigned char
4687 vec_sll (__vector unsigned char a1, __vector unsigned short a2)
4689 return (__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4692 inline __vector unsigned char
4693 vec_sll (__vector unsigned char a1, __vector unsigned char a2)
4695 return (__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4698 inline __vector bool char
4699 vec_sll (__vector bool char a1, __vector unsigned int a2)
4701 return (__vector bool char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4704 inline __vector bool char
4705 vec_sll (__vector bool char a1, __vector unsigned short a2)
4707 return (__vector bool char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4710 inline __vector bool char
4711 vec_sll (__vector bool char a1, __vector unsigned char a2)
4713 return (__vector bool char) __builtin_altivec_vsl ((__vector signed int) a1, (__vector signed int) a2);
4716 /* vec_slo */
4718 inline __vector float
4719 vec_slo (__vector float a1, __vector signed char a2)
4721 return (__vector float) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4724 inline __vector float
4725 vec_slo (__vector float a1, __vector unsigned char a2)
4727 return (__vector float) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4730 inline __vector signed int
4731 vec_slo (__vector signed int a1, __vector signed char a2)
4733 return (__vector signed int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4736 inline __vector signed int
4737 vec_slo (__vector signed int a1, __vector unsigned char a2)
4739 return (__vector signed int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4742 inline __vector unsigned int
4743 vec_slo (__vector unsigned int a1, __vector signed char a2)
4745 return (__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4748 inline __vector unsigned int
4749 vec_slo (__vector unsigned int a1, __vector unsigned char a2)
4751 return (__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4754 inline __vector signed short
4755 vec_slo (__vector signed short a1, __vector signed char a2)
4757 return (__vector signed short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4760 inline __vector signed short
4761 vec_slo (__vector signed short a1, __vector unsigned char a2)
4763 return (__vector signed short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4766 inline __vector unsigned short
4767 vec_slo (__vector unsigned short a1, __vector signed char a2)
4769 return (__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4772 inline __vector unsigned short
4773 vec_slo (__vector unsigned short a1, __vector unsigned char a2)
4775 return (__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4778 inline __vector pixel
4779 vec_slo (__vector pixel a1, __vector signed char a2)
4781 return (__vector pixel) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4784 inline __vector pixel
4785 vec_slo (__vector pixel a1, __vector unsigned char a2)
4787 return (__vector pixel) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4790 inline __vector signed char
4791 vec_slo (__vector signed char a1, __vector signed char a2)
4793 return (__vector signed char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4796 inline __vector signed char
4797 vec_slo (__vector signed char a1, __vector unsigned char a2)
4799 return (__vector signed char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4802 inline __vector unsigned char
4803 vec_slo (__vector unsigned char a1, __vector signed char a2)
4805 return (__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4808 inline __vector unsigned char
4809 vec_slo (__vector unsigned char a1, __vector unsigned char a2)
4811 return (__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) a1, (__vector signed int) a2);
4814 /* vec_splat */
4816 inline __vector signed char
4817 vec_splat (__vector signed char a1, const int a2)
4819 return (__vector signed char) __builtin_altivec_vspltb ((__vector signed char) a1, a2);
4822 inline __vector unsigned char
4823 vec_splat (__vector unsigned char a1, const int a2)
4825 return (__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) a1, a2);
4828 inline __vector bool char
4829 vec_splat (__vector bool char a1, const int a2)
4831 return (__vector bool char) __builtin_altivec_vspltb ((__vector signed char) a1, a2);
4834 inline __vector signed short
4835 vec_splat (__vector signed short a1, const int a2)
4837 return (__vector signed short) __builtin_altivec_vsplth ((__vector signed short) a1, a2);
4840 inline __vector unsigned short
4841 vec_splat (__vector unsigned short a1, const int a2)
4843 return (__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) a1, a2);
4846 inline __vector bool short
4847 vec_splat (__vector bool short a1, const int a2)
4849 return (__vector bool short) __builtin_altivec_vsplth ((__vector signed short) a1, a2);
4852 inline __vector pixel
4853 vec_splat (__vector pixel a1, const int a2)
4855 return (__vector pixel) __builtin_altivec_vsplth ((__vector signed short) a1, a2);
4858 inline __vector float
4859 vec_splat (__vector float a1, const int a2)
4861 return (__vector float) __builtin_altivec_vspltw ((__vector signed int) a1, a2);
4864 inline __vector signed int
4865 vec_splat (__vector signed int a1, const int a2)
4867 return (__vector signed int) __builtin_altivec_vspltw ((__vector signed int) a1, a2);
4870 inline __vector unsigned int
4871 vec_splat (__vector unsigned int a1, const int a2)
4873 return (__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) a1, a2);
4876 inline __vector bool int
4877 vec_splat (__vector bool int a1, const int a2)
4879 return (__vector bool int) __builtin_altivec_vspltw ((__vector signed int) a1, a2);
4882 /* vec_vspltw */
4884 inline __vector float
4885 vec_vspltw (__vector float a1, const int a2)
4887 return (__vector float) __builtin_altivec_vspltw ((__vector signed int) a1, a2);
4890 inline __vector signed int
4891 vec_vspltw (__vector signed int a1, const int a2)
4893 return (__vector signed int) __builtin_altivec_vspltw ((__vector signed int) a1, a2);
4896 inline __vector unsigned int
4897 vec_vspltw (__vector unsigned int a1, const int a2)
4899 return (__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) a1, a2);
4902 inline __vector bool int
4903 vec_vspltw (__vector bool int a1, const int a2)
4905 return (__vector bool int) __builtin_altivec_vspltw ((__vector signed int) a1, a2);
4908 /* vec_vsplth */
4910 inline __vector bool short
4911 vec_vsplth (__vector bool short a1, const int a2)
4913 return (__vector bool short) __builtin_altivec_vsplth ((__vector signed short) a1, a2);
4916 inline __vector signed short
4917 vec_vsplth (__vector signed short a1, const int a2)
4919 return (__vector signed short) __builtin_altivec_vsplth ((__vector signed short) a1, a2);
4922 inline __vector unsigned short
4923 vec_vsplth (__vector unsigned short a1, const int a2)
4925 return (__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) a1, a2);
4928 inline __vector pixel
4929 vec_vsplth (__vector pixel a1, const int a2)
4931 return (__vector pixel) __builtin_altivec_vsplth ((__vector signed short) a1, a2);
4934 /* vec_vspltb */
4936 inline __vector signed char
4937 vec_vspltb (__vector signed char a1, const int a2)
4939 return (__vector signed char) __builtin_altivec_vspltb ((__vector signed char) a1, a2);
4942 inline __vector unsigned char
4943 vec_vspltb (__vector unsigned char a1, const int a2)
4945 return (__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) a1, a2);
4948 inline __vector bool char
4949 vec_vspltb (__vector bool char a1, const int a2)
4951 return (__vector bool char) __builtin_altivec_vspltb ((__vector signed char) a1, a2);
4954 /* vec_splat_s8 */
4956 inline __vector signed char
4957 vec_splat_s8 (const int a1)
4959 return (__vector signed char) __builtin_altivec_vspltisb (a1);
4962 /* vec_splat_s16 */
4964 inline __vector signed short
4965 vec_splat_s16 (const int a1)
4967 return (__vector signed short) __builtin_altivec_vspltish (a1);
4970 /* vec_splat_s32 */
4972 inline __vector signed int
4973 vec_splat_s32 (const int a1)
4975 return (__vector signed int) __builtin_altivec_vspltisw (a1);
4978 /* vec_splat_u8 */
4980 inline __vector unsigned char
4981 vec_splat_u8 (const int a1)
4983 return (__vector unsigned char) __builtin_altivec_vspltisb (a1);
4986 /* vec_splat_u16 */
4988 inline __vector unsigned short
4989 vec_splat_u16 (const int a1)
4991 return (__vector unsigned short) __builtin_altivec_vspltish (a1);
4994 /* vec_splat_u32 */
4996 inline __vector unsigned int
4997 vec_splat_u32 (const int a1)
4999 return (__vector unsigned int) __builtin_altivec_vspltisw (a1);
5002 /* vec_sr */
5004 inline __vector signed char
5005 vec_sr (__vector signed char a1, __vector unsigned char a2)
5007 return (__vector signed char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2);
5010 inline __vector unsigned char
5011 vec_sr (__vector unsigned char a1, __vector unsigned char a2)
5013 return (__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2);
5016 inline __vector signed short
5017 vec_sr (__vector signed short a1, __vector unsigned short a2)
5019 return (__vector signed short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2);
5022 inline __vector unsigned short
5023 vec_sr (__vector unsigned short a1, __vector unsigned short a2)
5025 return (__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2);
5028 inline __vector signed int
5029 vec_sr (__vector signed int a1, __vector unsigned int a2)
5031 return (__vector signed int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2);
5034 inline __vector unsigned int
5035 vec_sr (__vector unsigned int a1, __vector unsigned int a2)
5037 return (__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2);
5040 /* vec_vsrw */
5042 inline __vector signed int
5043 vec_vsrw (__vector signed int a1, __vector unsigned int a2)
5045 return (__vector signed int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2);
5048 inline __vector unsigned int
5049 vec_vsrw (__vector unsigned int a1, __vector unsigned int a2)
5051 return (__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) a1, (__vector signed int) a2);
5054 /* vec_vsrh */
5056 inline __vector signed short
5057 vec_vsrh (__vector signed short a1, __vector unsigned short a2)
5059 return (__vector signed short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2);
5062 inline __vector unsigned short
5063 vec_vsrh (__vector unsigned short a1, __vector unsigned short a2)
5065 return (__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) a1, (__vector signed short) a2);
5068 /* vec_vsrb */
5070 inline __vector signed char
5071 vec_vsrb (__vector signed char a1, __vector unsigned char a2)
5073 return (__vector signed char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2);
5076 inline __vector unsigned char
5077 vec_vsrb (__vector unsigned char a1, __vector unsigned char a2)
5079 return (__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) a1, (__vector signed char) a2);
5082 /* vec_sra */
5084 inline __vector signed char
5085 vec_sra (__vector signed char a1, __vector unsigned char a2)
5087 return (__vector signed char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2);
5090 inline __vector unsigned char
5091 vec_sra (__vector unsigned char a1, __vector unsigned char a2)
5093 return (__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2);
5096 inline __vector signed short
5097 vec_sra (__vector signed short a1, __vector unsigned short a2)
5099 return (__vector signed short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2);
5102 inline __vector unsigned short
5103 vec_sra (__vector unsigned short a1, __vector unsigned short a2)
5105 return (__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2);
5108 inline __vector signed int
5109 vec_sra (__vector signed int a1, __vector unsigned int a2)
5111 return (__vector signed int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2);
5114 inline __vector unsigned int
5115 vec_sra (__vector unsigned int a1, __vector unsigned int a2)
5117 return (__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2);
5120 /* vec_vsraw */
5122 inline __vector signed int
5123 vec_vsraw (__vector signed int a1, __vector unsigned int a2)
5125 return (__vector signed int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2);
5128 inline __vector unsigned int
5129 vec_vsraw (__vector unsigned int a1, __vector unsigned int a2)
5131 return (__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) a1, (__vector signed int) a2);
5134 /* vec_vsrah */
5136 inline __vector signed short
5137 vec_vsrah (__vector signed short a1, __vector unsigned short a2)
5139 return (__vector signed short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2);
5142 inline __vector unsigned short
5143 vec_vsrah (__vector unsigned short a1, __vector unsigned short a2)
5145 return (__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) a1, (__vector signed short) a2);
5148 /* vec_vsrab */
5150 inline __vector signed char
5151 vec_vsrab (__vector signed char a1, __vector unsigned char a2)
5153 return (__vector signed char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2);
5156 inline __vector unsigned char
5157 vec_vsrab (__vector unsigned char a1, __vector unsigned char a2)
5159 return (__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) a1, (__vector signed char) a2);
5162 /* vec_srl */
5164 inline __vector signed int
5165 vec_srl (__vector signed int a1, __vector unsigned int a2)
5167 return (__vector signed int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5170 inline __vector signed int
5171 vec_srl (__vector signed int a1, __vector unsigned short a2)
5173 return (__vector signed int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5176 inline __vector signed int
5177 vec_srl (__vector signed int a1, __vector unsigned char a2)
5179 return (__vector signed int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5182 inline __vector unsigned int
5183 vec_srl (__vector unsigned int a1, __vector unsigned int a2)
5185 return (__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5188 inline __vector unsigned int
5189 vec_srl (__vector unsigned int a1, __vector unsigned short a2)
5191 return (__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5194 inline __vector unsigned int
5195 vec_srl (__vector unsigned int a1, __vector unsigned char a2)
5197 return (__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5200 inline __vector bool int
5201 vec_srl (__vector bool int a1, __vector unsigned int a2)
5203 return (__vector bool int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5206 inline __vector bool int
5207 vec_srl (__vector bool int a1, __vector unsigned short a2)
5209 return (__vector bool int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5212 inline __vector bool int
5213 vec_srl (__vector bool int a1, __vector unsigned char a2)
5215 return (__vector bool int) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5218 inline __vector signed short
5219 vec_srl (__vector signed short a1, __vector unsigned int a2)
5221 return (__vector signed short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5224 inline __vector signed short
5225 vec_srl (__vector signed short a1, __vector unsigned short a2)
5227 return (__vector signed short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5230 inline __vector signed short
5231 vec_srl (__vector signed short a1, __vector unsigned char a2)
5233 return (__vector signed short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5236 inline __vector unsigned short
5237 vec_srl (__vector unsigned short a1, __vector unsigned int a2)
5239 return (__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5242 inline __vector unsigned short
5243 vec_srl (__vector unsigned short a1, __vector unsigned short a2)
5245 return (__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5248 inline __vector unsigned short
5249 vec_srl (__vector unsigned short a1, __vector unsigned char a2)
5251 return (__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5254 inline __vector bool short
5255 vec_srl (__vector bool short a1, __vector unsigned int a2)
5257 return (__vector bool short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5260 inline __vector bool short
5261 vec_srl (__vector bool short a1, __vector unsigned short a2)
5263 return (__vector bool short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5266 inline __vector bool short
5267 vec_srl (__vector bool short a1, __vector unsigned char a2)
5269 return (__vector bool short) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5272 inline __vector pixel
5273 vec_srl (__vector pixel a1, __vector unsigned int a2)
5275 return (__vector pixel) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5278 inline __vector pixel
5279 vec_srl (__vector pixel a1, __vector unsigned short a2)
5281 return (__vector pixel) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5284 inline __vector pixel
5285 vec_srl (__vector pixel a1, __vector unsigned char a2)
5287 return (__vector pixel) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5290 inline __vector signed char
5291 vec_srl (__vector signed char a1, __vector unsigned int a2)
5293 return (__vector signed char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5296 inline __vector signed char
5297 vec_srl (__vector signed char a1, __vector unsigned short a2)
5299 return (__vector signed char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5302 inline __vector signed char
5303 vec_srl (__vector signed char a1, __vector unsigned char a2)
5305 return (__vector signed char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5308 inline __vector unsigned char
5309 vec_srl (__vector unsigned char a1, __vector unsigned int a2)
5311 return (__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5314 inline __vector unsigned char
5315 vec_srl (__vector unsigned char a1, __vector unsigned short a2)
5317 return (__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5320 inline __vector unsigned char
5321 vec_srl (__vector unsigned char a1, __vector unsigned char a2)
5323 return (__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5326 inline __vector bool char
5327 vec_srl (__vector bool char a1, __vector unsigned int a2)
5329 return (__vector bool char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5332 inline __vector bool char
5333 vec_srl (__vector bool char a1, __vector unsigned short a2)
5335 return (__vector bool char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5338 inline __vector bool char
5339 vec_srl (__vector bool char a1, __vector unsigned char a2)
5341 return (__vector bool char) __builtin_altivec_vsr ((__vector signed int) a1, (__vector signed int) a2);
5344 /* vec_sro */
5346 inline __vector float
5347 vec_sro (__vector float a1, __vector signed char a2)
5349 return (__vector float) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5352 inline __vector float
5353 vec_sro (__vector float a1, __vector unsigned char a2)
5355 return (__vector float) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5358 inline __vector signed int
5359 vec_sro (__vector signed int a1, __vector signed char a2)
5361 return (__vector signed int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5364 inline __vector signed int
5365 vec_sro (__vector signed int a1, __vector unsigned char a2)
5367 return (__vector signed int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5370 inline __vector unsigned int
5371 vec_sro (__vector unsigned int a1, __vector signed char a2)
5373 return (__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5376 inline __vector unsigned int
5377 vec_sro (__vector unsigned int a1, __vector unsigned char a2)
5379 return (__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5382 inline __vector signed short
5383 vec_sro (__vector signed short a1, __vector signed char a2)
5385 return (__vector signed short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5388 inline __vector signed short
5389 vec_sro (__vector signed short a1, __vector unsigned char a2)
5391 return (__vector signed short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5394 inline __vector unsigned short
5395 vec_sro (__vector unsigned short a1, __vector signed char a2)
5397 return (__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5400 inline __vector unsigned short
5401 vec_sro (__vector unsigned short a1, __vector unsigned char a2)
5403 return (__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5406 inline __vector pixel
5407 vec_sro (__vector pixel a1, __vector signed char a2)
5409 return (__vector pixel) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5412 inline __vector pixel
5413 vec_sro (__vector pixel a1, __vector unsigned char a2)
5415 return (__vector pixel) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5418 inline __vector signed char
5419 vec_sro (__vector signed char a1, __vector signed char a2)
5421 return (__vector signed char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5424 inline __vector signed char
5425 vec_sro (__vector signed char a1, __vector unsigned char a2)
5427 return (__vector signed char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5430 inline __vector unsigned char
5431 vec_sro (__vector unsigned char a1, __vector signed char a2)
5433 return (__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5436 inline __vector unsigned char
5437 vec_sro (__vector unsigned char a1, __vector unsigned char a2)
5439 return (__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) a1, (__vector signed int) a2);
5442 /* vec_st */
5444 inline void
5445 vec_st (__vector float a1, int a2, __vector float *a3)
5447 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5450 inline void
5451 vec_st (__vector float a1, int a2, float *a3)
5453 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5456 inline void
5457 vec_st (__vector signed int a1, int a2, __vector signed int *a3)
5459 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5462 inline void
5463 vec_st (__vector signed int a1, int a2, int *a3)
5465 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5468 inline void
5469 vec_st (__vector unsigned int a1, int a2, __vector unsigned int *a3)
5471 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5474 inline void
5475 vec_st (__vector unsigned int a1, int a2, unsigned int *a3)
5477 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5480 inline void
5481 vec_st (__vector bool int a1, int a2, __vector bool int *a3)
5483 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5486 inline void
5487 vec_st (__vector bool int a1, int a2, unsigned int *a3)
5489 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5492 inline void
5493 vec_st (__vector bool int a1, int a2, int *a3)
5495 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5498 inline void
5499 vec_st (__vector signed short a1, int a2, __vector signed short *a3)
5501 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5504 inline void
5505 vec_st (__vector signed short a1, int a2, short *a3)
5507 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5510 inline void
5511 vec_st (__vector unsigned short a1, int a2, __vector unsigned short *a3)
5513 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5516 inline void
5517 vec_st (__vector unsigned short a1, int a2, unsigned short *a3)
5519 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5522 inline void
5523 vec_st (__vector bool short a1, int a2, __vector bool short *a3)
5525 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5528 inline void
5529 vec_st (__vector bool short a1, int a2, unsigned short *a3)
5531 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5534 inline void
5535 vec_st (__vector pixel a1, int a2, __vector pixel *a3)
5537 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5540 inline void
5541 vec_st (__vector pixel a1, int a2, unsigned short *a3)
5543 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5546 inline void
5547 vec_st (__vector pixel a1, int a2, short *a3)
5549 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5552 inline void
5553 vec_st (__vector bool short a1, int a2, short *a3)
5555 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5558 inline void
5559 vec_st (__vector signed char a1, int a2, __vector signed char *a3)
5561 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5564 inline void
5565 vec_st (__vector signed char a1, int a2, signed char *a3)
5567 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5570 inline void
5571 vec_st (__vector unsigned char a1, int a2, __vector unsigned char *a3)
5573 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5576 inline void
5577 vec_st (__vector unsigned char a1, int a2, unsigned char *a3)
5579 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5582 inline void
5583 vec_st (__vector bool char a1, int a2, __vector bool char *a3)
5585 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5588 inline void
5589 vec_st (__vector bool char a1, int a2, unsigned char *a3)
5591 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5594 inline void
5595 vec_st (__vector bool char a1, int a2, signed char *a3)
5597 __builtin_altivec_stvx ((__vector signed int) a1, a2, (void *) a3);
5600 /* vec_ste */
5602 inline void
5603 vec_ste (__vector signed char a1, int a2, signed char *a3)
5605 __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5608 inline void
5609 vec_ste (__vector unsigned char a1, int a2, unsigned char *a3)
5611 __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5614 inline void
5615 vec_ste (__vector bool char a1, int a2, signed char *a3)
5617 __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5620 inline void
5621 vec_ste (__vector bool char a1, int a2, unsigned char *a3)
5623 __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5626 inline void
5627 vec_ste (__vector signed short a1, int a2, short *a3)
5629 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5632 inline void
5633 vec_ste (__vector unsigned short a1, int a2, unsigned short *a3)
5635 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5638 inline void
5639 vec_ste (__vector bool short a1, int a2, short *a3)
5641 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5644 inline void
5645 vec_ste (__vector bool short a1, int a2, unsigned short *a3)
5647 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5650 inline void
5651 vec_ste (__vector pixel a1, int a2, short *a3)
5653 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5656 inline void
5657 vec_ste (__vector pixel a1, int a2, unsigned short *a3)
5659 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5662 inline void
5663 vec_ste (__vector float a1, int a2, float *a3)
5665 __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5668 inline void
5669 vec_ste (__vector signed int a1, int a2, int *a3)
5671 __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5674 inline void
5675 vec_ste (__vector unsigned int a1, int a2, unsigned int *a3)
5677 __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5680 inline void
5681 vec_ste (__vector bool int a1, int a2, int *a3)
5683 __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5686 inline void
5687 vec_ste (__vector bool int a1, int a2, unsigned int *a3)
5689 __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5692 /* vec_stvewx */
5694 inline void
5695 vec_stvewx (__vector float a1, int a2, float *a3)
5697 __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5700 inline void
5701 vec_stvewx (__vector signed int a1, int a2, int *a3)
5703 __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5706 inline void
5707 vec_stvewx (__vector unsigned int a1, int a2, unsigned int *a3)
5709 __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5712 inline void
5713 vec_stvewx (__vector bool int a1, int a2, int *a3)
5715 __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5718 inline void
5719 vec_stvewx (__vector bool int a1, int a2, unsigned int *a3)
5721 __builtin_altivec_stvewx ((__vector signed int) a1, a2, (void *) a3);
5724 /* vec_stvehx */
5726 inline void
5727 vec_stvehx (__vector signed short a1, int a2, short *a3)
5729 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5732 inline void
5733 vec_stvehx (__vector unsigned short a1, int a2, unsigned short *a3)
5735 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5738 inline void
5739 vec_stvehx (__vector bool short a1, int a2, short *a3)
5741 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5744 inline void
5745 vec_stvehx (__vector bool short a1, int a2, unsigned short *a3)
5747 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5750 inline void
5751 vec_stvehx (__vector pixel a1, int a2, short *a3)
5753 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5756 inline void
5757 vec_stvehx (__vector pixel a1, int a2, unsigned short *a3)
5759 __builtin_altivec_stvehx ((__vector signed short) a1, a2, (void *) a3);
5762 /* vec_stvebx */
5764 inline void
5765 vec_stvebx (__vector signed char a1, int a2, signed char *a3)
5767 __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5770 inline void
5771 vec_stvebx (__vector unsigned char a1, int a2, unsigned char *a3)
5773 __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5776 inline void
5777 vec_stvebx (__vector bool char a1, int a2, signed char *a3)
5779 __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5782 inline void
5783 vec_stvebx (__vector bool char a1, int a2, unsigned char *a3)
5785 __builtin_altivec_stvebx ((__vector signed char) a1, a2, (void *) a3);
5788 /* vec_stl */
5790 inline void
5791 vec_stl (__vector float a1, int a2, __vector float *a3)
5793 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5796 inline void
5797 vec_stl (__vector float a1, int a2, float *a3)
5799 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5802 inline void
5803 vec_stl (__vector signed int a1, int a2, __vector signed int *a3)
5805 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5808 inline void
5809 vec_stl (__vector signed int a1, int a2, int *a3)
5811 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5814 inline void
5815 vec_stl (__vector unsigned int a1, int a2, __vector unsigned int *a3)
5817 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5820 inline void
5821 vec_stl (__vector unsigned int a1, int a2, unsigned int *a3)
5823 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5826 inline void
5827 vec_stl (__vector bool int a1, int a2, __vector bool int *a3)
5829 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5832 inline void
5833 vec_stl (__vector bool int a1, int a2, unsigned int *a3)
5835 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5838 inline void
5839 vec_stl (__vector bool int a1, int a2, int *a3)
5841 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5844 inline void
5845 vec_stl (__vector signed short a1, int a2, __vector signed short *a3)
5847 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5850 inline void
5851 vec_stl (__vector signed short a1, int a2, short *a3)
5853 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5856 inline void
5857 vec_stl (__vector unsigned short a1, int a2, __vector unsigned short *a3)
5859 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5862 inline void
5863 vec_stl (__vector unsigned short a1, int a2, unsigned short *a3)
5865 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5868 inline void
5869 vec_stl (__vector bool short a1, int a2, __vector bool short *a3)
5871 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5874 inline void
5875 vec_stl (__vector bool short a1, int a2, unsigned short *a3)
5877 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5880 inline void
5881 vec_stl (__vector bool short a1, int a2, short *a3)
5883 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5886 inline void
5887 vec_stl (__vector pixel a1, int a2, __vector pixel *a3)
5889 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5892 inline void
5893 vec_stl (__vector pixel a1, int a2, unsigned short *a3)
5895 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5898 inline void
5899 vec_stl (__vector pixel a1, int a2, short *a3)
5901 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5904 inline void
5905 vec_stl (__vector signed char a1, int a2, __vector signed char *a3)
5907 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5910 inline void
5911 vec_stl (__vector signed char a1, int a2, signed char *a3)
5913 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5916 inline void
5917 vec_stl (__vector unsigned char a1, int a2, __vector unsigned char *a3)
5919 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5922 inline void
5923 vec_stl (__vector unsigned char a1, int a2, unsigned char *a3)
5925 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5928 inline void
5929 vec_stl (__vector bool char a1, int a2, __vector bool char *a3)
5931 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5934 inline void
5935 vec_stl (__vector bool char a1, int a2, unsigned char *a3)
5937 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5940 inline void
5941 vec_stl (__vector bool char a1, int a2, signed char *a3)
5943 __builtin_altivec_stvxl ((__vector signed int) a1, a2, (void *) a3);
5946 /* vec_sub */
5948 inline __vector signed char
5949 vec_sub (__vector bool char a1, __vector signed char a2)
5951 return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5954 inline __vector signed char
5955 vec_sub (__vector signed char a1, __vector bool char a2)
5957 return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5960 inline __vector signed char
5961 vec_sub (__vector signed char a1, __vector signed char a2)
5963 return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5966 inline __vector unsigned char
5967 vec_sub (__vector bool char a1, __vector unsigned char a2)
5969 return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5972 inline __vector unsigned char
5973 vec_sub (__vector unsigned char a1, __vector bool char a2)
5975 return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5978 inline __vector unsigned char
5979 vec_sub (__vector unsigned char a1, __vector unsigned char a2)
5981 return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
5984 inline __vector signed short
5985 vec_sub (__vector bool short a1, __vector signed short a2)
5987 return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
5990 inline __vector signed short
5991 vec_sub (__vector signed short a1, __vector bool short a2)
5993 return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
5996 inline __vector signed short
5997 vec_sub (__vector signed short a1, __vector signed short a2)
5999 return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6002 inline __vector unsigned short
6003 vec_sub (__vector bool short a1, __vector unsigned short a2)
6005 return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6008 inline __vector unsigned short
6009 vec_sub (__vector unsigned short a1, __vector bool short a2)
6011 return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6014 inline __vector unsigned short
6015 vec_sub (__vector unsigned short a1, __vector unsigned short a2)
6017 return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6020 inline __vector signed int
6021 vec_sub (__vector bool int a1, __vector signed int a2)
6023 return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6026 inline __vector signed int
6027 vec_sub (__vector signed int a1, __vector bool int a2)
6029 return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6032 inline __vector signed int
6033 vec_sub (__vector signed int a1, __vector signed int a2)
6035 return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6038 inline __vector unsigned int
6039 vec_sub (__vector bool int a1, __vector unsigned int a2)
6041 return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6044 inline __vector unsigned int
6045 vec_sub (__vector unsigned int a1, __vector bool int a2)
6047 return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6050 inline __vector unsigned int
6051 vec_sub (__vector unsigned int a1, __vector unsigned int a2)
6053 return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6056 inline __vector float
6057 vec_sub (__vector float a1, __vector float a2)
6059 return (__vector float) __builtin_altivec_vsubfp ((__vector float) a1, (__vector float) a2);
6062 /* vec_vsubfp */
6064 inline __vector float
6065 vec_vsubfp (__vector float a1, __vector float a2)
6067 return (__vector float) __builtin_altivec_vsubfp ((__vector float) a1, (__vector float) a2);
6070 /* vec_vsubuwm */
6072 inline __vector signed int
6073 vec_vsubuwm (__vector bool int a1, __vector signed int a2)
6075 return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6078 inline __vector signed int
6079 vec_vsubuwm (__vector signed int a1, __vector bool int a2)
6081 return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6084 inline __vector signed int
6085 vec_vsubuwm (__vector signed int a1, __vector signed int a2)
6087 return (__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6090 inline __vector unsigned int
6091 vec_vsubuwm (__vector bool int a1, __vector unsigned int a2)
6093 return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6096 inline __vector unsigned int
6097 vec_vsubuwm (__vector unsigned int a1, __vector bool int a2)
6099 return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6102 inline __vector unsigned int
6103 vec_vsubuwm (__vector unsigned int a1, __vector unsigned int a2)
6105 return (__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) a1, (__vector signed int) a2);
6108 /* vec_vsubuhm */
6110 inline __vector signed short
6111 vec_vsubuhm (__vector bool short a1, __vector signed short a2)
6113 return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6116 inline __vector signed short
6117 vec_vsubuhm (__vector signed short a1, __vector bool short a2)
6119 return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6122 inline __vector signed short
6123 vec_vsubuhm (__vector signed short a1, __vector signed short a2)
6125 return (__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6128 inline __vector unsigned short
6129 vec_vsubuhm (__vector bool short a1, __vector unsigned short a2)
6131 return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6134 inline __vector unsigned short
6135 vec_vsubuhm (__vector unsigned short a1, __vector bool short a2)
6137 return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6140 inline __vector unsigned short
6141 vec_vsubuhm (__vector unsigned short a1, __vector unsigned short a2)
6143 return (__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) a1, (__vector signed short) a2);
6146 /* vec_vsububm */
6148 inline __vector signed char
6149 vec_vsububm (__vector bool char a1, __vector signed char a2)
6151 return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6154 inline __vector signed char
6155 vec_vsububm (__vector signed char a1, __vector bool char a2)
6157 return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6160 inline __vector signed char
6161 vec_vsububm (__vector signed char a1, __vector signed char a2)
6163 return (__vector signed char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6166 inline __vector unsigned char
6167 vec_vsububm (__vector bool char a1, __vector unsigned char a2)
6169 return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6172 inline __vector unsigned char
6173 vec_vsububm (__vector unsigned char a1, __vector bool char a2)
6175 return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6178 inline __vector unsigned char
6179 vec_vsububm (__vector unsigned char a1, __vector unsigned char a2)
6181 return (__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) a1, (__vector signed char) a2);
6184 /* vec_subc */
6186 inline __vector unsigned int
6187 vec_subc (__vector unsigned int a1, __vector unsigned int a2)
6189 return (__vector unsigned int) __builtin_altivec_vsubcuw ((__vector signed int) a1, (__vector signed int) a2);
6192 /* vec_subs */
6194 inline __vector unsigned char
6195 vec_subs (__vector bool char a1, __vector unsigned char a2)
6197 return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6200 inline __vector unsigned char
6201 vec_subs (__vector unsigned char a1, __vector bool char a2)
6203 return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6206 inline __vector unsigned char
6207 vec_subs (__vector unsigned char a1, __vector unsigned char a2)
6209 return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6212 inline __vector signed char
6213 vec_subs (__vector bool char a1, __vector signed char a2)
6215 return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6218 inline __vector signed char
6219 vec_subs (__vector signed char a1, __vector bool char a2)
6221 return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6224 inline __vector signed char
6225 vec_subs (__vector signed char a1, __vector signed char a2)
6227 return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6230 inline __vector unsigned short
6231 vec_subs (__vector bool short a1, __vector unsigned short a2)
6233 return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6236 inline __vector unsigned short
6237 vec_subs (__vector unsigned short a1, __vector bool short a2)
6239 return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6242 inline __vector unsigned short
6243 vec_subs (__vector unsigned short a1, __vector unsigned short a2)
6245 return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6248 inline __vector signed short
6249 vec_subs (__vector bool short a1, __vector signed short a2)
6251 return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6254 inline __vector signed short
6255 vec_subs (__vector signed short a1, __vector bool short a2)
6257 return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6260 inline __vector signed short
6261 vec_subs (__vector signed short a1, __vector signed short a2)
6263 return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6266 inline __vector unsigned int
6267 vec_subs (__vector bool int a1, __vector unsigned int a2)
6269 return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6272 inline __vector unsigned int
6273 vec_subs (__vector unsigned int a1, __vector bool int a2)
6275 return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6278 inline __vector unsigned int
6279 vec_subs (__vector unsigned int a1, __vector unsigned int a2)
6281 return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6284 inline __vector signed int
6285 vec_subs (__vector bool int a1, __vector signed int a2)
6287 return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6290 inline __vector signed int
6291 vec_subs (__vector signed int a1, __vector bool int a2)
6293 return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6296 inline __vector signed int
6297 vec_subs (__vector signed int a1, __vector signed int a2)
6299 return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6302 /* vec_vsubsws */
6304 inline __vector signed int
6305 vec_vsubsws (__vector bool int a1, __vector signed int a2)
6307 return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6310 inline __vector signed int
6311 vec_vsubsws (__vector signed int a1, __vector bool int a2)
6313 return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6316 inline __vector signed int
6317 vec_vsubsws (__vector signed int a1, __vector signed int a2)
6319 return (__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) a1, (__vector signed int) a2);
6322 /* vec_vsubuws */
6324 inline __vector unsigned int
6325 vec_vsubuws (__vector bool int a1, __vector unsigned int a2)
6327 return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6330 inline __vector unsigned int
6331 vec_vsubuws (__vector unsigned int a1, __vector bool int a2)
6333 return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6336 inline __vector unsigned int
6337 vec_vsubuws (__vector unsigned int a1, __vector unsigned int a2)
6339 return (__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) a1, (__vector signed int) a2);
6342 /* vec_vsubshs */
6344 inline __vector signed short
6345 vec_vsubshs (__vector bool short a1, __vector signed short a2)
6347 return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6350 inline __vector signed short
6351 vec_vsubshs (__vector signed short a1, __vector bool short a2)
6353 return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6356 inline __vector signed short
6357 vec_vsubshs (__vector signed short a1, __vector signed short a2)
6359 return (__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) a1, (__vector signed short) a2);
6362 /* vec_vsubuhs */
6364 inline __vector unsigned short
6365 vec_vsubuhs (__vector bool short a1, __vector unsigned short a2)
6367 return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6370 inline __vector unsigned short
6371 vec_vsubuhs (__vector unsigned short a1, __vector bool short a2)
6373 return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6376 inline __vector unsigned short
6377 vec_vsubuhs (__vector unsigned short a1, __vector unsigned short a2)
6379 return (__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) a1, (__vector signed short) a2);
6382 /* vec_vsubsbs */
6384 inline __vector signed char
6385 vec_vsubsbs (__vector bool char a1, __vector signed char a2)
6387 return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6390 inline __vector signed char
6391 vec_vsubsbs (__vector signed char a1, __vector bool char a2)
6393 return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6396 inline __vector signed char
6397 vec_vsubsbs (__vector signed char a1, __vector signed char a2)
6399 return (__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) a1, (__vector signed char) a2);
6402 /* vec_vsububs */
6404 inline __vector unsigned char
6405 vec_vsububs (__vector bool char a1, __vector unsigned char a2)
6407 return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6410 inline __vector unsigned char
6411 vec_vsububs (__vector unsigned char a1, __vector bool char a2)
6413 return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6416 inline __vector unsigned char
6417 vec_vsububs (__vector unsigned char a1, __vector unsigned char a2)
6419 return (__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) a1, (__vector signed char) a2);
6422 /* vec_sum4s */
6424 inline __vector unsigned int
6425 vec_sum4s (__vector unsigned char a1, __vector unsigned int a2)
6427 return (__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) a1, (__vector signed int) a2);
6430 inline __vector signed int
6431 vec_sum4s (__vector signed char a1, __vector signed int a2)
6433 return (__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) a1, (__vector signed int) a2);
6436 inline __vector signed int
6437 vec_sum4s (__vector signed short a1, __vector signed int a2)
6439 return (__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) a1, (__vector signed int) a2);
6442 /* vec_vsum4shs */
6444 inline __vector signed int
6445 vec_vsum4shs (__vector signed short a1, __vector signed int a2)
6447 return (__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) a1, (__vector signed int) a2);
6450 /* vec_vsum4sbs */
6452 inline __vector signed int
6453 vec_vsum4sbs (__vector signed char a1, __vector signed int a2)
6455 return (__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) a1, (__vector signed int) a2);
6458 /* vec_vsum4ubs */
6460 inline __vector unsigned int
6461 vec_vsum4ubs (__vector unsigned char a1, __vector unsigned int a2)
6463 return (__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) a1, (__vector signed int) a2);
6466 /* vec_sum2s */
6468 inline __vector signed int
6469 vec_sum2s (__vector signed int a1, __vector signed int a2)
6471 return (__vector signed int) __builtin_altivec_vsum2sws ((__vector signed int) a1, (__vector signed int) a2);
6474 /* vec_sums */
6476 inline __vector signed int
6477 vec_sums (__vector signed int a1, __vector signed int a2)
6479 return (__vector signed int) __builtin_altivec_vsumsws ((__vector signed int) a1, (__vector signed int) a2);
6482 /* vec_trunc */
6484 inline __vector float
6485 vec_trunc (__vector float a1)
6487 return (__vector float) __builtin_altivec_vrfiz ((__vector float) a1);
6490 /* vec_unpackh */
6492 inline __vector signed short
6493 vec_unpackh (__vector signed char a1)
6495 return (__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) a1);
6498 inline __vector bool short
6499 vec_unpackh (__vector bool char a1)
6501 return (__vector bool short) __builtin_altivec_vupkhsb ((__vector signed char) a1);
6504 inline __vector signed int
6505 vec_unpackh (__vector signed short a1)
6507 return (__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) a1);
6510 inline __vector bool int
6511 vec_unpackh (__vector bool short a1)
6513 return (__vector bool int) __builtin_altivec_vupkhsh ((__vector signed short) a1);
6516 inline __vector unsigned int
6517 vec_unpackh (__vector pixel a1)
6519 return (__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) a1);
6522 /* vec_vupkhsh */
6524 inline __vector bool int
6525 vec_vupkhsh (__vector bool short a1)
6527 return (__vector bool int) __builtin_altivec_vupkhsh ((__vector signed short) a1);
6530 inline __vector signed int
6531 vec_vupkhsh (__vector signed short a1)
6533 return (__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) a1);
6536 /* vec_vupkhpx */
6538 inline __vector unsigned int
6539 vec_vupkhpx (__vector pixel a1)
6541 return (__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) a1);
6544 /* vec_vupkhsb */
6546 inline __vector bool short
6547 vec_vupkhsb (__vector bool char a1)
6549 return (__vector bool short) __builtin_altivec_vupkhsb ((__vector signed char) a1);
6552 inline __vector signed short
6553 vec_vupkhsb (__vector signed char a1)
6555 return (__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) a1);
6558 /* vec_unpackl */
6560 inline __vector signed short
6561 vec_unpackl (__vector signed char a1)
6563 return (__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) a1);
6566 inline __vector bool short
6567 vec_unpackl (__vector bool char a1)
6569 return (__vector bool short) __builtin_altivec_vupklsb ((__vector signed char) a1);
6572 inline __vector unsigned int
6573 vec_unpackl (__vector pixel a1)
6575 return (__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) a1);
6578 inline __vector signed int
6579 vec_unpackl (__vector signed short a1)
6581 return (__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) a1);
6584 inline __vector bool int
6585 vec_unpackl (__vector bool short a1)
6587 return (__vector bool int) __builtin_altivec_vupklsh ((__vector signed short) a1);
6590 /* vec_vupklpx */
6592 inline __vector unsigned int
6593 vec_vupklpx (__vector pixel a1)
6595 return (__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) a1);
6598 /* vec_upklsh */
6600 inline __vector bool int
6601 vec_vupklsh (__vector bool short a1)
6603 return (__vector bool int) __builtin_altivec_vupklsh ((__vector signed short) a1);
6606 inline __vector signed int
6607 vec_vupklsh (__vector signed short a1)
6609 return (__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) a1);
6612 /* vec_vupklsb */
6614 inline __vector bool short
6615 vec_vupklsb (__vector bool char a1)
6617 return (__vector bool short) __builtin_altivec_vupklsb ((__vector signed char) a1);
6620 inline __vector signed short
6621 vec_vupklsb (__vector signed char a1)
6623 return (__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) a1);
6626 /* vec_xor */
6628 inline __vector float
6629 vec_xor (__vector float a1, __vector float a2)
6631 return (__vector float) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6634 inline __vector float
6635 vec_xor (__vector float a1, __vector bool int a2)
6637 return (__vector float) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6640 inline __vector float
6641 vec_xor (__vector bool int a1, __vector float a2)
6643 return (__vector float) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6646 inline __vector bool int
6647 vec_xor (__vector bool int a1, __vector bool int a2)
6649 return (__vector bool int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6652 inline __vector signed int
6653 vec_xor (__vector bool int a1, __vector signed int a2)
6655 return (__vector signed int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6658 inline __vector signed int
6659 vec_xor (__vector signed int a1, __vector bool int a2)
6661 return (__vector signed int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6664 inline __vector signed int
6665 vec_xor (__vector signed int a1, __vector signed int a2)
6667 return (__vector signed int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6670 inline __vector unsigned int
6671 vec_xor (__vector bool int a1, __vector unsigned int a2)
6673 return (__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6676 inline __vector unsigned int
6677 vec_xor (__vector unsigned int a1, __vector bool int a2)
6679 return (__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6682 inline __vector unsigned int
6683 vec_xor (__vector unsigned int a1, __vector unsigned int a2)
6685 return (__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6688 inline __vector bool short
6689 vec_xor (__vector bool short a1, __vector bool short a2)
6691 return (__vector bool short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6694 inline __vector signed short
6695 vec_xor (__vector bool short a1, __vector signed short a2)
6697 return (__vector signed short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6700 inline __vector signed short
6701 vec_xor (__vector signed short a1, __vector bool short a2)
6703 return (__vector signed short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6706 inline __vector signed short
6707 vec_xor (__vector signed short a1, __vector signed short a2)
6709 return (__vector signed short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6712 inline __vector unsigned short
6713 vec_xor (__vector bool short a1, __vector unsigned short a2)
6715 return (__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6718 inline __vector unsigned short
6719 vec_xor (__vector unsigned short a1, __vector bool short a2)
6721 return (__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6724 inline __vector unsigned short
6725 vec_xor (__vector unsigned short a1, __vector unsigned short a2)
6727 return (__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6730 inline __vector signed char
6731 vec_xor (__vector bool char a1, __vector signed char a2)
6733 return (__vector signed char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6736 inline __vector bool char
6737 vec_xor (__vector bool char a1, __vector bool char a2)
6739 return (__vector bool char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6742 inline __vector signed char
6743 vec_xor (__vector signed char a1, __vector bool char a2)
6745 return (__vector signed char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6748 inline __vector signed char
6749 vec_xor (__vector signed char a1, __vector signed char a2)
6751 return (__vector signed char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6754 inline __vector unsigned char
6755 vec_xor (__vector bool char a1, __vector unsigned char a2)
6757 return (__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6760 inline __vector unsigned char
6761 vec_xor (__vector unsigned char a1, __vector bool char a2)
6763 return (__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6766 inline __vector unsigned char
6767 vec_xor (__vector unsigned char a1, __vector unsigned char a2)
6769 return (__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) a1, (__vector signed int) a2);
6772 /* vec_all_eq */
6774 inline int
6775 vec_all_eq (__vector signed char a1, __vector bool char a2)
6777 return __builtin_altivec_vcmpequb_p (__CR6_LT, a1, (__vector signed char) a2);
6780 inline int
6781 vec_all_eq (__vector signed char a1, __vector signed char a2)
6783 return __builtin_altivec_vcmpequb_p (__CR6_LT, a1, a2);
6786 inline int
6787 vec_all_eq (__vector unsigned char a1, __vector bool char a2)
6789 return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6792 inline int
6793 vec_all_eq (__vector unsigned char a1, __vector unsigned char a2)
6795 return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6798 inline int
6799 vec_all_eq (__vector bool char a1, __vector bool char a2)
6801 return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6804 inline int
6805 vec_all_eq (__vector bool char a1, __vector unsigned char a2)
6807 return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6810 inline int
6811 vec_all_eq (__vector bool char a1, __vector signed char a2)
6813 return __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
6816 inline int
6817 vec_all_eq (__vector signed short a1, __vector bool short a2)
6819 return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6822 inline int
6823 vec_all_eq (__vector signed short a1, __vector signed short a2)
6825 return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6828 inline int
6829 vec_all_eq (__vector unsigned short a1, __vector bool short a2)
6831 return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6834 inline int
6835 vec_all_eq (__vector unsigned short a1, __vector unsigned short a2)
6837 return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6840 inline int
6841 vec_all_eq (__vector bool short a1, __vector bool short a2)
6843 return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6846 inline int
6847 vec_all_eq (__vector bool short a1, __vector unsigned short a2)
6849 return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6852 inline int
6853 vec_all_eq (__vector bool short a1, __vector signed short a2)
6855 return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6858 inline int
6859 vec_all_eq (__vector pixel a1, __vector pixel a2)
6861 return __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
6864 inline int
6865 vec_all_eq (__vector signed int a1, __vector bool int a2)
6867 return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6870 inline int
6871 vec_all_eq (__vector signed int a1, __vector signed int a2)
6873 return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6876 inline int
6877 vec_all_eq (__vector unsigned int a1, __vector bool int a2)
6879 return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6882 inline int
6883 vec_all_eq (__vector unsigned int a1, __vector unsigned int a2)
6885 return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6888 inline int
6889 vec_all_eq (__vector bool int a1, __vector bool int a2)
6891 return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6894 inline int
6895 vec_all_eq (__vector bool int a1, __vector unsigned int a2)
6897 return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6900 inline int
6901 vec_all_eq (__vector bool int a1, __vector signed int a2)
6903 return __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
6906 inline int
6907 vec_all_eq (__vector float a1, __vector float a2)
6909 return __builtin_altivec_vcmpeqfp_p (__CR6_LT, a1, a2);
6912 /* vec_all_ge */
6914 inline int
6915 vec_all_ge (__vector bool char a1, __vector unsigned char a2)
6917 return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6920 inline int
6921 vec_all_ge (__vector unsigned char a1, __vector bool char a2)
6923 return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6926 inline int
6927 vec_all_ge (__vector unsigned char a1, __vector unsigned char a2)
6929 return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6932 inline int
6933 vec_all_ge (__vector bool char a1, __vector signed char a2)
6935 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6938 inline int
6939 vec_all_ge (__vector signed char a1, __vector bool char a2)
6941 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6944 inline int
6945 vec_all_ge (__vector signed char a1, __vector signed char a2)
6947 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a2, (__vector signed char) a1);
6950 inline int
6951 vec_all_ge (__vector bool short a1, __vector unsigned short a2)
6953 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6956 inline int
6957 vec_all_ge (__vector unsigned short a1, __vector bool short a2)
6959 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6962 inline int
6963 vec_all_ge (__vector unsigned short a1, __vector unsigned short a2)
6965 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6968 inline int
6969 vec_all_ge (__vector signed short a1, __vector signed short a2)
6971 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6974 inline int
6975 vec_all_ge (__vector bool short a1, __vector signed short a2)
6977 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6980 inline int
6981 vec_all_ge (__vector signed short a1, __vector bool short a2)
6983 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a2, (__vector signed short) a1);
6986 inline int
6987 vec_all_ge (__vector bool int a1, __vector unsigned int a2)
6989 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
6992 inline int
6993 vec_all_ge (__vector unsigned int a1, __vector bool int a2)
6995 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
6998 inline int
6999 vec_all_ge (__vector unsigned int a1, __vector unsigned int a2)
7001 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
7004 inline int
7005 vec_all_ge (__vector bool int a1, __vector signed int a2)
7007 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
7010 inline int
7011 vec_all_ge (__vector signed int a1, __vector bool int a2)
7013 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
7016 inline int
7017 vec_all_ge (__vector signed int a1, __vector signed int a2)
7019 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a2, (__vector signed int) a1);
7022 inline int
7023 vec_all_ge (__vector float a1, __vector float a2)
7025 return __builtin_altivec_vcmpgefp_p (__CR6_LT, a1, a2);
7028 /* vec_all_gt */
7030 inline int
7031 vec_all_gt (__vector bool char a1, __vector unsigned char a2)
7033 return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
7036 inline int
7037 vec_all_gt (__vector unsigned char a1, __vector bool char a2)
7039 return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
7042 inline int
7043 vec_all_gt (__vector unsigned char a1, __vector unsigned char a2)
7045 return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
7048 inline int
7049 vec_all_gt (__vector bool char a1, __vector signed char a2)
7051 return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
7054 inline int
7055 vec_all_gt (__vector signed char a1, __vector bool char a2)
7057 return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
7060 inline int
7061 vec_all_gt (__vector signed char a1, __vector signed char a2)
7063 return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a1, (__vector signed char) a2);
7066 inline int
7067 vec_all_gt (__vector bool short a1, __vector unsigned short a2)
7069 return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7072 inline int
7073 vec_all_gt (__vector unsigned short a1, __vector bool short a2)
7075 return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7078 inline int
7079 vec_all_gt (__vector unsigned short a1, __vector unsigned short a2)
7081 return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7084 inline int
7085 vec_all_gt (__vector bool short a1, __vector signed short a2)
7087 return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7090 inline int
7091 vec_all_gt (__vector signed short a1, __vector bool short a2)
7093 return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7096 inline int
7097 vec_all_gt (__vector signed short a1, __vector signed short a2)
7099 return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a1, (__vector signed short) a2);
7102 inline int
7103 vec_all_gt (__vector bool int a1, __vector unsigned int a2)
7105 return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7108 inline int
7109 vec_all_gt (__vector unsigned int a1, __vector bool int a2)
7111 return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7114 inline int
7115 vec_all_gt (__vector unsigned int a1, __vector unsigned int a2)
7117 return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7120 inline int
7121 vec_all_gt (__vector bool int a1, __vector signed int a2)
7123 return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7126 inline int
7127 vec_all_gt (__vector signed int a1, __vector bool int a2)
7129 return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7132 inline int
7133 vec_all_gt (__vector signed int a1, __vector signed int a2)
7135 return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a1, (__vector signed int) a2);
7138 inline int
7139 vec_all_gt (__vector float a1, __vector float a2)
7141 return __builtin_altivec_vcmpgtfp_p (__CR6_LT, a1, a2);
7144 /* vec_all_in */
7146 inline int
7147 vec_all_in (__vector float a1, __vector float a2)
7149 return __builtin_altivec_vcmpbfp_p (__CR6_EQ, a1, a2);
7152 /* vec_all_le */
7154 inline int
7155 vec_all_le (__vector bool char a1, __vector unsigned char a2)
7157 return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7160 inline int
7161 vec_all_le (__vector unsigned char a1, __vector bool char a2)
7163 return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7166 inline int
7167 vec_all_le (__vector unsigned char a1, __vector unsigned char a2)
7169 return __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7172 inline int
7173 vec_all_le (__vector bool char a1, __vector signed char a2)
7175 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7178 inline int
7179 vec_all_le (__vector signed char a1, __vector bool char a2)
7181 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7184 inline int
7185 vec_all_le (__vector signed char a1, __vector signed char a2)
7187 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7190 inline int
7191 vec_all_le (__vector bool short a1, __vector unsigned short a2)
7193 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7196 inline int
7197 vec_all_le (__vector unsigned short a1, __vector bool short a2)
7199 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7202 inline int
7203 vec_all_le (__vector unsigned short a1, __vector unsigned short a2)
7205 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7208 inline int
7209 vec_all_le (__vector bool short a1, __vector signed short a2)
7211 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7214 inline int
7215 vec_all_le (__vector signed short a1, __vector bool short a2)
7217 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7220 inline int
7221 vec_all_le (__vector signed short a1, __vector signed short a2)
7223 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7226 inline int
7227 vec_all_le (__vector bool int a1, __vector unsigned int a2)
7229 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7232 inline int
7233 vec_all_le (__vector unsigned int a1, __vector bool int a2)
7235 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7238 inline int
7239 vec_all_le (__vector unsigned int a1, __vector unsigned int a2)
7241 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7244 inline int
7245 vec_all_le (__vector bool int a1, __vector signed int a2)
7247 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7250 inline int
7251 vec_all_le (__vector signed int a1, __vector bool int a2)
7253 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7256 inline int
7257 vec_all_le (__vector signed int a1, __vector signed int a2)
7259 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7262 inline int
7263 vec_all_le (__vector float a1, __vector float a2)
7265 return __builtin_altivec_vcmpgefp_p (__CR6_LT, a2, a1);
7268 /* vec_all_lt */
7270 inline int
7271 vec_all_lt (__vector bool char a1, __vector unsigned char a2)
7273 return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7276 inline int
7277 vec_all_lt (__vector unsigned char a1, __vector bool char a2)
7279 return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7282 inline int
7283 vec_all_lt (__vector unsigned char a1, __vector unsigned char a2)
7285 return __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7288 inline int
7289 vec_all_lt (__vector bool char a1, __vector signed char a2)
7291 return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7294 inline int
7295 vec_all_lt (__vector signed char a1, __vector bool char a2)
7297 return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7300 inline int
7301 vec_all_lt (__vector signed char a1, __vector signed char a2)
7303 return __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) a2, (__vector signed char) a1);
7306 inline int
7307 vec_all_lt (__vector bool short a1, __vector unsigned short a2)
7309 return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7312 inline int
7313 vec_all_lt (__vector unsigned short a1, __vector bool short a2)
7315 return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7318 inline int
7319 vec_all_lt (__vector unsigned short a1, __vector unsigned short a2)
7321 return __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7324 inline int
7325 vec_all_lt (__vector bool short a1, __vector signed short a2)
7327 return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7330 inline int
7331 vec_all_lt (__vector signed short a1, __vector bool short a2)
7333 return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7336 inline int
7337 vec_all_lt (__vector signed short a1, __vector signed short a2)
7339 return __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) a2, (__vector signed short) a1);
7342 inline int
7343 vec_all_lt (__vector bool int a1, __vector unsigned int a2)
7345 return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7348 inline int
7349 vec_all_lt (__vector unsigned int a1, __vector bool int a2)
7351 return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7354 inline int
7355 vec_all_lt (__vector unsigned int a1, __vector unsigned int a2)
7357 return __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7360 inline int
7361 vec_all_lt (__vector bool int a1, __vector signed int a2)
7363 return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7366 inline int
7367 vec_all_lt (__vector signed int a1, __vector bool int a2)
7369 return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7372 inline int
7373 vec_all_lt (__vector signed int a1, __vector signed int a2)
7375 return __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) a2, (__vector signed int) a1);
7378 inline int
7379 vec_all_lt (__vector float a1, __vector float a2)
7381 return __builtin_altivec_vcmpgtfp_p (__CR6_LT, a2, a1);
7384 /* vec_all_nan */
7386 inline int
7387 vec_all_nan (__vector float a1)
7389 return __builtin_altivec_vcmpeqfp_p (__CR6_EQ, a1, a1);
7392 /* vec_all_ne */
7394 inline int
7395 vec_all_ne (__vector signed char a1, __vector bool char a2)
7397 return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7400 inline int
7401 vec_all_ne (__vector signed char a1, __vector signed char a2)
7403 return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7406 inline int
7407 vec_all_ne (__vector unsigned char a1, __vector bool char a2)
7409 return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7412 inline int
7413 vec_all_ne (__vector unsigned char a1, __vector unsigned char a2)
7415 return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7418 inline int
7419 vec_all_ne (__vector bool char a1, __vector bool char a2)
7421 return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7424 inline int
7425 vec_all_ne (__vector bool char a1, __vector unsigned char a2)
7427 return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7430 inline int
7431 vec_all_ne (__vector bool char a1, __vector signed char a2)
7433 return __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) a1, (__vector signed char) a2);
7436 inline int
7437 vec_all_ne (__vector signed short a1, __vector bool short a2)
7439 return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7442 inline int
7443 vec_all_ne (__vector signed short a1, __vector signed short a2)
7445 return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7448 inline int
7449 vec_all_ne (__vector unsigned short a1, __vector bool short a2)
7451 return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7454 inline int
7455 vec_all_ne (__vector unsigned short a1, __vector unsigned short a2)
7457 return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7460 inline int
7461 vec_all_ne (__vector bool short a1, __vector bool short a2)
7463 return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7466 inline int
7467 vec_all_ne (__vector bool short a1, __vector unsigned short a2)
7469 return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7472 inline int
7473 vec_all_ne (__vector bool short a1, __vector signed short a2)
7475 return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7478 inline int
7479 vec_all_ne (__vector pixel a1, __vector pixel a2)
7481 return __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) a1, (__vector signed short) a2);
7484 inline int
7485 vec_all_ne (__vector signed int a1, __vector bool int a2)
7487 return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7490 inline int
7491 vec_all_ne (__vector signed int a1, __vector signed int a2)
7493 return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7496 inline int
7497 vec_all_ne (__vector unsigned int a1, __vector bool int a2)
7499 return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7502 inline int
7503 vec_all_ne (__vector unsigned int a1, __vector unsigned int a2)
7505 return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7508 inline int
7509 vec_all_ne (__vector bool int a1, __vector bool int a2)
7511 return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7514 inline int
7515 vec_all_ne (__vector bool int a1, __vector unsigned int a2)
7517 return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7520 inline int
7521 vec_all_ne (__vector bool int a1, __vector signed int a2)
7523 return __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) a1, (__vector signed int) a2);
7526 inline int
7527 vec_all_ne (__vector float a1, __vector float a2)
7529 return __builtin_altivec_vcmpeqfp_p (__CR6_EQ, a1, a2);
7532 /* vec_all_nge */
7534 inline int
7535 vec_all_nge (__vector float a1, __vector float a2)
7537 return __builtin_altivec_vcmpgefp_p (__CR6_EQ, a1, a2);
7540 /* vec_all_ngt */
7542 inline int
7543 vec_all_ngt (__vector float a1, __vector float a2)
7545 return __builtin_altivec_vcmpgtfp_p (__CR6_EQ, a1, a2);
7548 /* vec_all_nle */
7550 inline int
7551 vec_all_nle (__vector float a1, __vector float a2)
7553 return __builtin_altivec_vcmpgefp_p (__CR6_EQ, a2, a1);
7556 /* vec_all_nlt */
7558 inline int
7559 vec_all_nlt (__vector float a1, __vector float a2)
7561 return __builtin_altivec_vcmpgtfp_p (__CR6_EQ, a2, a1);
7564 /* vec_all_numeric */
7566 inline int
7567 vec_all_numeric (__vector float a1)
7569 return __builtin_altivec_vcmpeqfp_p (__CR6_LT, a1, a1);
7572 /* vec_any_eq */
7574 inline int
7575 vec_any_eq (__vector signed char a1, __vector bool char a2)
7577 return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7580 inline int
7581 vec_any_eq (__vector signed char a1, __vector signed char a2)
7583 return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7586 inline int
7587 vec_any_eq (__vector unsigned char a1, __vector bool char a2)
7589 return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7592 inline int
7593 vec_any_eq (__vector unsigned char a1, __vector unsigned char a2)
7595 return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7598 inline int
7599 vec_any_eq (__vector bool char a1, __vector bool char a2)
7601 return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7604 inline int
7605 vec_any_eq (__vector bool char a1, __vector unsigned char a2)
7607 return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7610 inline int
7611 vec_any_eq (__vector bool char a1, __vector signed char a2)
7613 return __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7616 inline int
7617 vec_any_eq (__vector signed short a1, __vector bool short a2)
7619 return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7622 inline int
7623 vec_any_eq (__vector signed short a1, __vector signed short a2)
7625 return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7628 inline int
7629 vec_any_eq (__vector unsigned short a1, __vector bool short a2)
7631 return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7634 inline int
7635 vec_any_eq (__vector unsigned short a1, __vector unsigned short a2)
7637 return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7640 inline int
7641 vec_any_eq (__vector bool short a1, __vector bool short a2)
7643 return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7646 inline int
7647 vec_any_eq (__vector bool short a1, __vector unsigned short a2)
7649 return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7652 inline int
7653 vec_any_eq (__vector bool short a1, __vector signed short a2)
7655 return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7658 inline int
7659 vec_any_eq (__vector pixel a1, __vector pixel a2)
7661 return __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7664 inline int
7665 vec_any_eq (__vector signed int a1, __vector bool int a2)
7667 return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7670 inline int
7671 vec_any_eq (__vector signed int a1, __vector signed int a2)
7673 return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7676 inline int
7677 vec_any_eq (__vector unsigned int a1, __vector bool int a2)
7679 return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7682 inline int
7683 vec_any_eq (__vector unsigned int a1, __vector unsigned int a2)
7685 return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7688 inline int
7689 vec_any_eq (__vector bool int a1, __vector bool int a2)
7691 return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7694 inline int
7695 vec_any_eq (__vector bool int a1, __vector unsigned int a2)
7697 return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7700 inline int
7701 vec_any_eq (__vector bool int a1, __vector signed int a2)
7703 return __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7706 inline int
7707 vec_any_eq (__vector float a1, __vector float a2)
7709 return __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, a1, a2);
7712 /* vec_any_ge */
7714 inline int
7715 vec_any_ge (__vector signed char a1, __vector bool char a2)
7717 return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7720 inline int
7721 vec_any_ge (__vector unsigned char a1, __vector bool char a2)
7723 return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7726 inline int
7727 vec_any_ge (__vector unsigned char a1, __vector unsigned char a2)
7729 return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7732 inline int
7733 vec_any_ge (__vector signed char a1, __vector signed char a2)
7735 return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7738 inline int
7739 vec_any_ge (__vector bool char a1, __vector unsigned char a2)
7741 return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7744 inline int
7745 vec_any_ge (__vector bool char a1, __vector signed char a2)
7747 return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a2, (__vector signed char) a1);
7750 inline int
7751 vec_any_ge (__vector unsigned short a1, __vector bool short a2)
7753 return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7756 inline int
7757 vec_any_ge (__vector unsigned short a1, __vector unsigned short a2)
7759 return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7762 inline int
7763 vec_any_ge (__vector signed short a1, __vector signed short a2)
7765 return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7768 inline int
7769 vec_any_ge (__vector signed short a1, __vector bool short a2)
7771 return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7774 inline int
7775 vec_any_ge (__vector bool short a1, __vector unsigned short a2)
7777 return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7780 inline int
7781 vec_any_ge (__vector bool short a1, __vector signed short a2)
7783 return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a2, (__vector signed short) a1);
7786 inline int
7787 vec_any_ge (__vector signed int a1, __vector bool int a2)
7789 return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7792 inline int
7793 vec_any_ge (__vector unsigned int a1, __vector bool int a2)
7795 return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7798 inline int
7799 vec_any_ge (__vector unsigned int a1, __vector unsigned int a2)
7801 return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7804 inline int
7805 vec_any_ge (__vector signed int a1, __vector signed int a2)
7807 return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7810 inline int
7811 vec_any_ge (__vector bool int a1, __vector unsigned int a2)
7813 return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7816 inline int
7817 vec_any_ge (__vector bool int a1, __vector signed int a2)
7819 return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a2, (__vector signed int) a1);
7822 inline int
7823 vec_any_ge (__vector float a1, __vector float a2)
7825 return __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, a1, a2);
7828 /* vec_any_gt */
7830 inline int
7831 vec_any_gt (__vector bool char a1, __vector unsigned char a2)
7833 return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7836 inline int
7837 vec_any_gt (__vector unsigned char a1, __vector bool char a2)
7839 return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7842 inline int
7843 vec_any_gt (__vector unsigned char a1, __vector unsigned char a2)
7845 return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7848 inline int
7849 vec_any_gt (__vector bool char a1, __vector signed char a2)
7851 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7854 inline int
7855 vec_any_gt (__vector signed char a1, __vector bool char a2)
7857 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7860 inline int
7861 vec_any_gt (__vector signed char a1, __vector signed char a2)
7863 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a1, (__vector signed char) a2);
7866 inline int
7867 vec_any_gt (__vector bool short a1, __vector unsigned short a2)
7869 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7872 inline int
7873 vec_any_gt (__vector unsigned short a1, __vector bool short a2)
7875 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7878 inline int
7879 vec_any_gt (__vector unsigned short a1, __vector unsigned short a2)
7881 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7884 inline int
7885 vec_any_gt (__vector bool short a1, __vector signed short a2)
7887 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7890 inline int
7891 vec_any_gt (__vector signed short a1, __vector bool short a2)
7893 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7896 inline int
7897 vec_any_gt (__vector signed short a1, __vector signed short a2)
7899 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a1, (__vector signed short) a2);
7902 inline int
7903 vec_any_gt (__vector bool int a1, __vector unsigned int a2)
7905 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7908 inline int
7909 vec_any_gt (__vector unsigned int a1, __vector bool int a2)
7911 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7914 inline int
7915 vec_any_gt (__vector unsigned int a1, __vector unsigned int a2)
7917 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7920 inline int
7921 vec_any_gt (__vector bool int a1, __vector signed int a2)
7923 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7926 inline int
7927 vec_any_gt (__vector signed int a1, __vector bool int a2)
7929 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7932 inline int
7933 vec_any_gt (__vector signed int a1, __vector signed int a2)
7935 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a1, (__vector signed int) a2);
7938 inline int
7939 vec_any_gt (__vector float a1, __vector float a2)
7941 return __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, a1, a2);
7944 /* vec_any_le */
7946 inline int
7947 vec_any_le (__vector bool char a1, __vector unsigned char a2)
7949 return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7952 inline int
7953 vec_any_le (__vector unsigned char a1, __vector bool char a2)
7955 return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7958 inline int
7959 vec_any_le (__vector unsigned char a1, __vector unsigned char a2)
7961 return __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7964 inline int
7965 vec_any_le (__vector bool char a1, __vector signed char a2)
7967 return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7970 inline int
7971 vec_any_le (__vector signed char a1, __vector bool char a2)
7973 return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7976 inline int
7977 vec_any_le (__vector signed char a1, __vector signed char a2)
7979 return __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
7982 inline int
7983 vec_any_le (__vector bool short a1, __vector unsigned short a2)
7985 return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
7988 inline int
7989 vec_any_le (__vector unsigned short a1, __vector bool short a2)
7991 return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
7994 inline int
7995 vec_any_le (__vector unsigned short a1, __vector unsigned short a2)
7997 return __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8000 inline int
8001 vec_any_le (__vector bool short a1, __vector signed short a2)
8003 return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8006 inline int
8007 vec_any_le (__vector signed short a1, __vector bool short a2)
8009 return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8012 inline int
8013 vec_any_le (__vector signed short a1, __vector signed short a2)
8015 return __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8018 inline int
8019 vec_any_le (__vector bool int a1, __vector unsigned int a2)
8021 return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8024 inline int
8025 vec_any_le (__vector unsigned int a1, __vector bool int a2)
8027 return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8030 inline int
8031 vec_any_le (__vector unsigned int a1, __vector unsigned int a2)
8033 return __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8036 inline int
8037 vec_any_le (__vector bool int a1, __vector signed int a2)
8039 return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8042 inline int
8043 vec_any_le (__vector signed int a1, __vector bool int a2)
8045 return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8048 inline int
8049 vec_any_le (__vector signed int a1, __vector signed int a2)
8051 return __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8054 inline int
8055 vec_any_le (__vector float a1, __vector float a2)
8057 return __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, a2, a1);
8060 /* vec_any_lt */
8062 inline int
8063 vec_any_lt (__vector bool char a1, __vector unsigned char a2)
8065 return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8068 inline int
8069 vec_any_lt (__vector unsigned char a1, __vector bool char a2)
8071 return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8074 inline int
8075 vec_any_lt (__vector unsigned char a1, __vector unsigned char a2)
8077 return __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8080 inline int
8081 vec_any_lt (__vector bool char a1, __vector signed char a2)
8083 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8086 inline int
8087 vec_any_lt (__vector signed char a1, __vector bool char a2)
8089 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8092 inline int
8093 vec_any_lt (__vector signed char a1, __vector signed char a2)
8095 return __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) a2, (__vector signed char) a1);
8098 inline int
8099 vec_any_lt (__vector bool short a1, __vector unsigned short a2)
8101 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8104 inline int
8105 vec_any_lt (__vector unsigned short a1, __vector bool short a2)
8107 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8110 inline int
8111 vec_any_lt (__vector unsigned short a1, __vector unsigned short a2)
8113 return __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8116 inline int
8117 vec_any_lt (__vector bool short a1, __vector signed short a2)
8119 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8122 inline int
8123 vec_any_lt (__vector signed short a1, __vector bool short a2)
8125 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8128 inline int
8129 vec_any_lt (__vector signed short a1, __vector signed short a2)
8131 return __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) a2, (__vector signed short) a1);
8134 inline int
8135 vec_any_lt (__vector bool int a1, __vector unsigned int a2)
8137 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8140 inline int
8141 vec_any_lt (__vector unsigned int a1, __vector bool int a2)
8143 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8146 inline int
8147 vec_any_lt (__vector unsigned int a1, __vector unsigned int a2)
8149 return __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8152 inline int
8153 vec_any_lt (__vector bool int a1, __vector signed int a2)
8155 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8158 inline int
8159 vec_any_lt (__vector signed int a1, __vector bool int a2)
8161 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8164 inline int
8165 vec_any_lt (__vector signed int a1, __vector signed int a2)
8167 return __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) a2, (__vector signed int) a1);
8170 inline int
8171 vec_any_lt (__vector float a1, __vector float a2)
8173 return __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, a2, a1);
8176 /* vec_any_nan */
8178 inline int
8179 vec_any_nan (__vector float a1)
8181 return __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, a1, a1);
8184 /* vec_any_ne */
8186 inline int
8187 vec_any_ne (__vector signed char a1, __vector bool char a2)
8189 return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8192 inline int
8193 vec_any_ne (__vector signed char a1, __vector signed char a2)
8195 return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8198 inline int
8199 vec_any_ne (__vector unsigned char a1, __vector bool char a2)
8201 return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8204 inline int
8205 vec_any_ne (__vector unsigned char a1, __vector unsigned char a2)
8207 return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8210 inline int
8211 vec_any_ne (__vector bool char a1, __vector bool char a2)
8213 return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8216 inline int
8217 vec_any_ne (__vector bool char a1, __vector unsigned char a2)
8219 return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8222 inline int
8223 vec_any_ne (__vector bool char a1, __vector signed char a2)
8225 return __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) a1, (__vector signed char) a2);
8228 inline int
8229 vec_any_ne (__vector signed short a1, __vector bool short a2)
8231 return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8234 inline int
8235 vec_any_ne (__vector signed short a1, __vector signed short a2)
8237 return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8240 inline int
8241 vec_any_ne (__vector unsigned short a1, __vector bool short a2)
8243 return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8246 inline int
8247 vec_any_ne (__vector unsigned short a1, __vector unsigned short a2)
8249 return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8252 inline int
8253 vec_any_ne (__vector bool short a1, __vector bool short a2)
8255 return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8258 inline int
8259 vec_any_ne (__vector bool short a1, __vector unsigned short a2)
8261 return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8264 inline int
8265 vec_any_ne (__vector bool short a1, __vector signed short a2)
8267 return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8270 inline int
8271 vec_any_ne (__vector pixel a1, __vector pixel a2)
8273 return __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) a1, (__vector signed short) a2);
8276 inline int
8277 vec_any_ne (__vector signed int a1, __vector bool int a2)
8279 return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8282 inline int
8283 vec_any_ne (__vector signed int a1, __vector signed int a2)
8285 return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8288 inline int
8289 vec_any_ne (__vector unsigned int a1, __vector bool int a2)
8291 return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8294 inline int
8295 vec_any_ne (__vector unsigned int a1, __vector unsigned int a2)
8297 return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8300 inline int
8301 vec_any_ne (__vector bool int a1, __vector bool int a2)
8303 return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8306 inline int
8307 vec_any_ne (__vector bool int a1, __vector unsigned int a2)
8309 return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8312 inline int
8313 vec_any_ne (__vector bool int a1, __vector signed int a2)
8315 return __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) a1, (__vector signed int) a2);
8318 inline int
8319 vec_any_ne (__vector float a1, __vector float a2)
8321 return __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, a1, a2);
8324 /* vec_any_nge */
8326 inline int
8327 vec_any_nge (__vector float a1, __vector float a2)
8329 return __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, a1, a2);
8332 /* vec_any_ngt */
8334 inline int
8335 vec_any_ngt (__vector float a1, __vector float a2)
8337 return __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, a1, a2);
8340 /* vec_any_nle */
8342 inline int
8343 vec_any_nle (__vector float a1, __vector float a2)
8345 return __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, a2, a1);
8348 /* vec_any_nlt */
8350 inline int
8351 vec_any_nlt (__vector float a1, __vector float a2)
8353 return __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, a2, a1);
8356 /* vec_any_numeric */
8358 inline int
8359 vec_any_numeric (__vector float a1)
8361 return __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, a1, a1);
8364 /* vec_any_out */
8366 inline int
8367 vec_any_out (__vector float a1, __vector float a2)
8369 return __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, a1, a2);
8372 } /* extern "C++" */
8374 #else /* not C++ */
8376 /* "... and so I think no man in a century will suffer as greatly as
8377 you will." */
8379 /* Helper macros. */
8381 #define __un_args_eq(xtype, x) \
8382 __builtin_types_compatible_p (xtype, __typeof__ (x))
8384 #define __bin_args_eq(xtype, x, ytype, y) \
8385 (__builtin_types_compatible_p (xtype, __typeof__ (x)) \
8386 && __builtin_types_compatible_p (ytype, __typeof__ (y)))
8388 #define __tern_args_eq(xtype, x, ytype, y, ztype, z) \
8389 (__builtin_types_compatible_p (xtype, __typeof__ (x)) \
8390 && __builtin_types_compatible_p (ytype, __typeof__ (y)) \
8391 && __builtin_types_compatible_p (ztype, __typeof__ (z)))
8393 #define __ch(x, y, z) __builtin_choose_expr (x, y, z)
8395 #define vec_step(t) \
8396 __ch (__builtin_types_compatible_p (__typeof__ (t), __vector signed int), 4, \
8397 __ch (__builtin_types_compatible_p (__typeof__ (t), __vector unsigned int), 4, \
8398 __ch (__builtin_types_compatible_p (__typeof__ (t), __vector __bool int), 4, \
8399 __ch (__builtin_types_compatible_p (__typeof__ (t), __vector signed short), 8, \
8400 __ch (__builtin_types_compatible_p (__typeof__ (t), __vector unsigned short), 8, \
8401 __ch (__builtin_types_compatible_p (__typeof__ (t), __vector __bool short), 8, \
8402 __ch (__builtin_types_compatible_p (__typeof__ (t), __vector __pixel), 8, \
8403 __ch (__builtin_types_compatible_p (__typeof__ (t), __vector signed char), 16, \
8404 __ch (__builtin_types_compatible_p (__typeof__ (t), __vector unsigned char), 16, \
8405 __ch (__builtin_types_compatible_p (__typeof__ (t), __vector __bool char), 16, \
8406 __ch (__builtin_types_compatible_p (__typeof__ (t), __vector float), 4, \
8407 __builtin_altivec_compiletime_error ("vec_step"))))))))))))
8409 #define vec_abs(a) \
8410 __ch (__un_args_eq (__vector signed char, (a)), \
8411 ((__vector signed char) __builtin_altivec_abs_v16qi ((__vector signed char) (a))), \
8412 __ch (__un_args_eq (__vector signed short, (a)), \
8413 ((__vector signed short) __builtin_altivec_abs_v8hi ((__vector signed short) (a))), \
8414 __ch (__un_args_eq (__vector signed int, (a)), \
8415 ((__vector signed int) __builtin_altivec_abs_v4si ((__vector signed int) (a))), \
8416 __ch (__un_args_eq (__vector float, (a)), \
8417 ((__vector float) __builtin_altivec_abs_v4sf ((__vector float) (a))), \
8418 __builtin_altivec_compiletime_error ("vec_abs")))))
8420 #define vec_abss(a) \
8421 __ch (__un_args_eq (__vector signed char, (a)), \
8422 ((__vector signed char) __builtin_altivec_abss_v16qi ((__vector signed char) (a))), \
8423 __ch (__un_args_eq (__vector signed short, (a)), \
8424 ((__vector signed short) __builtin_altivec_abss_v8hi ((__vector signed short) (a))), \
8425 __ch (__un_args_eq (__vector signed int, (a)), \
8426 ((__vector signed int) __builtin_altivec_abss_v4si ((__vector signed int) (a))), \
8427 __builtin_altivec_compiletime_error ("vec_abss"))))
8429 #define vec_vaddubm(a1, a2) \
8430 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
8431 ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8432 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
8433 ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8434 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8435 ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8436 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
8437 ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8438 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
8439 ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8440 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8441 ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8442 __builtin_altivec_compiletime_error ("vec_vaddubm")))))))
8444 #define vec_vadduhm(a1, a2) \
8445 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
8446 ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8447 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
8448 ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8449 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8450 ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8451 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
8452 ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8453 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
8454 ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8455 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8456 ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8457 __builtin_altivec_compiletime_error ("vec_vadduhm")))))))
8459 #define vec_vadduwm(a1, a2) \
8460 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
8461 ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8462 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
8463 ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8464 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8465 ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8466 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
8467 ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8468 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
8469 ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8470 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8471 ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8472 __builtin_altivec_compiletime_error ("vec_vadduwm")))))))
8474 #define vec_vaddfp(a1, a2) \
8475 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8476 ((__vector float) __builtin_altivec_vaddfp ((__vector float) (a1), (__vector float) (a2))), \
8477 __builtin_altivec_compiletime_error ("vec_vaddfp"))
8479 #define vec_add(a1, a2) \
8480 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
8481 ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8482 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
8483 ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8484 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8485 ((__vector signed char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8486 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
8487 ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8488 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
8489 ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8490 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8491 ((__vector unsigned char) __builtin_altivec_vaddubm ((__vector signed char) (a1), (__vector signed char) (a2))), \
8492 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
8493 ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8494 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
8495 ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8496 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8497 ((__vector signed short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8498 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
8499 ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8500 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
8501 ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8502 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8503 ((__vector unsigned short) __builtin_altivec_vadduhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
8504 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
8505 ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8506 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
8507 ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8508 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8509 ((__vector signed int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8510 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
8511 ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8512 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
8513 ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8514 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8515 ((__vector unsigned int) __builtin_altivec_vadduwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
8516 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8517 ((__vector float) __builtin_altivec_vaddfp ((__vector float) (a1), (__vector float) (a2))), \
8518 __builtin_altivec_compiletime_error ("vec_add"))))))))))))))))))))
8520 #define vec_addc(a1, a2) \
8521 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8522 ((__vector unsigned int) __builtin_altivec_vaddcuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8523 __builtin_altivec_compiletime_error ("vec_addc"))
8525 #define vec_adds(a1, a2) \
8526 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
8527 ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8528 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
8529 ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8530 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8531 ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8532 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
8533 ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8534 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
8535 ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8536 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8537 ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8538 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
8539 ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8540 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
8541 ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8542 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8543 ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8544 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
8545 ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8546 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
8547 ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8548 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8549 ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8550 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
8551 ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8552 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
8553 ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8554 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8555 ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8556 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
8557 ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8558 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
8559 ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8560 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8561 ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8562 __builtin_altivec_compiletime_error ("vec_adds")))))))))))))))))))
8564 #define vec_vaddsws(a1, a2) \
8565 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
8566 ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8567 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
8568 ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8569 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8570 ((__vector signed int) __builtin_altivec_vaddsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8571 __builtin_altivec_compiletime_error ("vec_vaddsws"))))
8573 #define vec_vadduws(a1, a2) \
8574 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
8575 ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8576 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
8577 ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8578 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8579 ((__vector unsigned int) __builtin_altivec_vadduws ((__vector signed int) (a1), (__vector signed int) (a2))), \
8580 __builtin_altivec_compiletime_error ("vec_vadduws"))))
8582 #define vec_vaddshs(a1, a2) \
8583 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
8584 ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8585 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8586 ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8587 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
8588 ((__vector signed short) __builtin_altivec_vaddshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8589 __builtin_altivec_compiletime_error ("vec_vaddshs"))))
8591 #define vec_vadduhs(a1, a2) \
8592 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
8593 ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8594 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
8595 ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8596 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8597 ((__vector unsigned short) __builtin_altivec_vadduhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
8598 __builtin_altivec_compiletime_error ("vec_vadduhs"))))
8600 #define vec_vaddsbs(a1, a2) \
8601 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
8602 ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8603 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
8604 ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8605 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8606 ((__vector signed char) __builtin_altivec_vaddsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8607 __builtin_altivec_compiletime_error ("vec_vaddsbs"))))
8609 #define vec_vaddubs(a1, a2) \
8610 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
8611 ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8612 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
8613 ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8614 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8615 ((__vector unsigned char) __builtin_altivec_vaddubs ((__vector signed char) (a1), (__vector signed char) (a2))), \
8616 __builtin_altivec_compiletime_error ("vec_vaddubs"))))
8618 #define vec_and(a1, a2) \
8619 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8620 ((__vector float) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8621 __ch (__bin_args_eq (__vector float, (a1), __vector __bool int, (a2)), \
8622 ((__vector float) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8623 __ch (__bin_args_eq (__vector __bool int, (a1), __vector float, (a2)), \
8624 ((__vector float) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8625 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
8626 ((__vector __bool int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8627 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
8628 ((__vector signed int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8629 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
8630 ((__vector signed int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8631 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8632 ((__vector signed int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8633 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
8634 ((__vector unsigned int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8635 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
8636 ((__vector unsigned int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8637 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8638 ((__vector unsigned int) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8639 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
8640 ((__vector __bool short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8641 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
8642 ((__vector signed short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8643 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
8644 ((__vector signed short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8645 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8646 ((__vector signed short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8647 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
8648 ((__vector unsigned short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8649 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
8650 ((__vector unsigned short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8651 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8652 ((__vector unsigned short) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8653 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
8654 ((__vector __bool char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8655 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
8656 ((__vector signed char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8657 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
8658 ((__vector signed char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8659 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8660 ((__vector signed char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8661 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
8662 ((__vector unsigned char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8663 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
8664 ((__vector unsigned char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8665 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8666 ((__vector unsigned char) __builtin_altivec_vand ((__vector signed int) (a1), (__vector signed int) (a2))), \
8667 __builtin_altivec_compiletime_error ("vec_and")))))))))))))))))))))))))
8669 #define vec_andc(a1, a2) \
8670 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8671 ((__vector float) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8672 __ch (__bin_args_eq (__vector float, (a1), __vector __bool int, (a2)), \
8673 ((__vector float) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8674 __ch (__bin_args_eq (__vector __bool int, (a1), __vector float, (a2)), \
8675 ((__vector float) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8676 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
8677 ((__vector __bool int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8678 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
8679 ((__vector signed int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8680 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
8681 ((__vector signed int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8682 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8683 ((__vector signed int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8684 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
8685 ((__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8686 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
8687 ((__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8688 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8689 ((__vector unsigned int) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8690 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
8691 ((__vector __bool short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8692 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
8693 ((__vector signed short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8694 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
8695 ((__vector signed short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8696 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8697 ((__vector signed short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8698 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
8699 ((__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8700 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
8701 ((__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8702 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8703 ((__vector unsigned short) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8704 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
8705 ((__vector __bool char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8706 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
8707 ((__vector signed char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8708 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
8709 ((__vector signed char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8710 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8711 ((__vector signed char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8712 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
8713 ((__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8714 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
8715 ((__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8716 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8717 ((__vector unsigned char) __builtin_altivec_vandc ((__vector signed int) (a1), (__vector signed int) (a2))), \
8718 __builtin_altivec_compiletime_error ("vec_andc")))))))))))))))))))))))))
8720 #define vec_avg(a1, a2) \
8721 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8722 ((__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) (a1), (__vector signed char) (a2))), \
8723 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8724 ((__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8725 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8726 ((__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8727 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8728 ((__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8729 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8730 ((__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8731 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8732 ((__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8733 __builtin_altivec_compiletime_error ("vec_avg")))))))
8735 #define vec_vavgsw(a1, a2) \
8736 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8737 ((__vector signed int) __builtin_altivec_vavgsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8738 __builtin_altivec_compiletime_error ("vec_vavgsw"))
8740 #define vec_vavguw(a1, a2) \
8741 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8742 ((__vector unsigned int) __builtin_altivec_vavguw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8743 __builtin_altivec_compiletime_error ("vec_vavguw"))
8745 #define vec_vavgsh(a1, a2) \
8746 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8747 ((__vector signed short) __builtin_altivec_vavgsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8748 __builtin_altivec_compiletime_error ("vec_vavgsh"))
8750 #define vec_vavguh(a1, a2) \
8751 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8752 ((__vector unsigned short) __builtin_altivec_vavguh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8753 __builtin_altivec_compiletime_error ("vec_vavguh"))
8755 #define vec_vavgsb(a1, a2) \
8756 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8757 ((__vector signed char) __builtin_altivec_vavgsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8758 __builtin_altivec_compiletime_error ("vec_vavgsb"))
8760 #define vec_vavgub(a1, a2) \
8761 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8762 ((__vector unsigned char) __builtin_altivec_vavgub ((__vector signed char) (a1), (__vector signed char) (a2))), \
8763 __builtin_altivec_compiletime_error ("vec_vavgub"))
8765 #define vec_ceil(a1) \
8766 __ch (__un_args_eq (__vector float, (a1)), \
8767 ((__vector float) __builtin_altivec_vrfip ((__vector float) (a1))), \
8768 __builtin_altivec_compiletime_error ("vec_ceil"))
8770 #define vec_cmpb(a1, a2) \
8771 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8772 ((__vector signed int) __builtin_altivec_vcmpbfp ((__vector float) (a1), (__vector float) (a2))), \
8773 __builtin_altivec_compiletime_error ("vec_cmpb"))
8775 #define vec_cmpeq(a1, a2) \
8776 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8777 ((__vector __bool char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8778 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8779 ((__vector __bool char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8780 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8781 ((__vector __bool short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8782 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8783 ((__vector __bool short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8784 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8785 ((__vector __bool int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8786 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8787 ((__vector __bool int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8788 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8789 ((__vector __bool int) __builtin_altivec_vcmpeqfp ((__vector float) (a1), (__vector float) (a2))), \
8790 __builtin_altivec_compiletime_error ("vec_cmpeq"))))))))
8792 #define vec_vcmpeqfp(a1, a2) \
8793 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8794 ((__vector __bool int) __builtin_altivec_vcmpeqfp ((__vector float) (a1), (__vector float) (a2))), \
8795 __builtin_altivec_compiletime_error ("vec_vcmpeqfp"))
8797 #define vec_vcmpequw(a1, a2) \
8798 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8799 ((__vector __bool int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8800 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8801 ((__vector __bool int) __builtin_altivec_vcmpequw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8802 __builtin_altivec_compiletime_error ("vec_vcmpequw")))
8804 #define vec_vcmpequh(a1, a2) \
8805 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8806 ((__vector __bool short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8807 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8808 ((__vector __bool short) __builtin_altivec_vcmpequh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8809 __builtin_altivec_compiletime_error ("vec_vcmpequh")))
8811 #define vec_vcmpequb(a1, a2) \
8812 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8813 ((__vector __bool char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8814 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8815 ((__vector __bool char) __builtin_altivec_vcmpequb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8816 __builtin_altivec_compiletime_error ("vec_vcmpequb")))
8818 #define vec_cmpge(a1, a2) \
8819 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8820 ((__vector __bool int) __builtin_altivec_vcmpgefp ((__vector float) (a1), (__vector float) (a2))), \
8821 __builtin_altivec_compiletime_error ("vec_cmpge"))
8823 #define vec_cmpgt(a1, a2) \
8824 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8825 ((__vector __bool char) __builtin_altivec_vcmpgtub ((__vector signed char) (a1), (__vector signed char) (a2))), \
8826 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8827 ((__vector __bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8828 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8829 ((__vector __bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8830 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8831 ((__vector __bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8832 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8833 ((__vector __bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8834 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8835 ((__vector __bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8836 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8837 ((__vector __bool int) __builtin_altivec_vcmpgtfp ((__vector float) (a1), (__vector float) (a2))), \
8838 __builtin_altivec_compiletime_error ("vec_cmpgt"))))))))
8840 #define vec_vcmpgtfp(a1, a2) \
8841 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8842 ((__vector __bool int) __builtin_altivec_vcmpgtfp ((__vector float) (a1), (__vector float) (a2))), \
8843 __builtin_altivec_compiletime_error ("vec_vcmpgtfp"))
8845 #define vec_vcmpgtsw(a1, a2) \
8846 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8847 ((__vector __bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8848 __builtin_altivec_compiletime_error ("vec_vcmpgtsw"))
8850 #define vec_vcmpgtuw(a1, a2) \
8851 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8852 ((__vector __bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8853 __builtin_altivec_compiletime_error ("vec_vcmpgtuw"))
8855 #define vec_vcmpgtsh(a1, a2) \
8856 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8857 ((__vector __bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8858 __builtin_altivec_compiletime_error ("vec_vcmpgtsh"))
8860 #define vec_vcmpgtuh(a1, a2) \
8861 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8862 ((__vector __bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8863 __builtin_altivec_compiletime_error ("vec_vcmpgtuh"))
8865 #define vec_vcmpgtsb(a1, a2) \
8866 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8867 ((__vector __bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8868 __builtin_altivec_compiletime_error ("vec_vcmpgtsb"))
8870 #define vec_vcmpgtub(a1, a2) \
8871 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8872 ((__vector __bool char) __builtin_altivec_vcmpgtub ((__vector signed char) (a1), (__vector signed char) (a2))), \
8873 __builtin_altivec_compiletime_error ("vec_vcmpgtub"))
8875 #define vec_cmple(a1, a2) \
8876 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8877 ((__vector __bool int) __builtin_altivec_vcmpgefp ((__vector float) (a2), (__vector float) (a1))), \
8878 __builtin_altivec_compiletime_error ("vec_cmple"))
8880 #define vec_cmplt(a2, a1) \
8881 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
8882 ((__vector __bool char) __builtin_altivec_vcmpgtub ((__vector signed char) (a1), (__vector signed char) (a2))), \
8883 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
8884 ((__vector __bool char) __builtin_altivec_vcmpgtsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
8885 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
8886 ((__vector __bool short) __builtin_altivec_vcmpgtuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8887 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
8888 ((__vector __bool short) __builtin_altivec_vcmpgtsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
8889 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
8890 ((__vector __bool int) __builtin_altivec_vcmpgtuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8891 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
8892 ((__vector __bool int) __builtin_altivec_vcmpgtsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
8893 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
8894 ((__vector __bool int) __builtin_altivec_vcmpgtfp ((__vector float) (a1), (__vector float) (a2))), \
8895 __builtin_altivec_compiletime_error ("vec_cmplt"))))))))
8897 #define vec_ctf(a1, a2) \
8898 __ch (__un_args_eq (__vector unsigned int, (a1)), \
8899 ((__vector float) __builtin_altivec_vcfux ((__vector signed int) (a1), (const int) (a2))), \
8900 __ch (__un_args_eq (__vector signed int, (a1)), \
8901 ((__vector float) __builtin_altivec_vcfsx ((__vector signed int) (a1), (const int) (a2))), \
8902 __builtin_altivec_compiletime_error ("vec_ctf")))
8904 #define vec_vcfsx(a1, a2) \
8905 __ch (__un_args_eq (__vector signed int, (a1)), \
8906 ((__vector float) __builtin_altivec_vcfsx ((__vector signed int) (a1), (const int) (a2))), \
8907 __builtin_altivec_compiletime_error ("vec_vcfsx"))
8909 #define vec_vcfux(a1, a2) \
8910 __ch (__un_args_eq (__vector unsigned int, (a1)), \
8911 ((__vector float) __builtin_altivec_vcfux ((__vector signed int) (a1), (const int) (a2))), \
8912 __builtin_altivec_compiletime_error ("vec_vcfux"))
8914 #define vec_cts(a1, a2) \
8915 __ch (__un_args_eq (__vector float, (a1)), \
8916 ((__vector signed int) __builtin_altivec_vctsxs ((__vector float) (a1), (const int) (a2))), \
8917 __builtin_altivec_compiletime_error ("vec_cts"))
8919 #define vec_ctu(a1, a2) \
8920 __ch (__un_args_eq (__vector float, (a1)), \
8921 ((__vector unsigned int) __builtin_altivec_vctuxs ((__vector float) (a1), (const int) (a2))), \
8922 __builtin_altivec_compiletime_error ("vec_ctu"))
8924 #define vec_dss(a1) __builtin_altivec_dss ((const int) (a1));
8926 #define vec_dssall() __builtin_altivec_dssall ()
8928 #define vec_dst(a1, a2, a3) \
8929 __ch (__un_args_eq (const __vector unsigned char, *(a1)), \
8930 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8931 __ch (__un_args_eq (const __vector signed char, *(a1)), \
8932 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8933 __ch (__un_args_eq (const __vector __bool char, *(a1)), \
8934 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8935 __ch (__un_args_eq (const __vector unsigned short, *(a1)), \
8936 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8937 __ch (__un_args_eq (const __vector signed short, *(a1)), \
8938 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8939 __ch (__un_args_eq (const __vector __bool short, *(a1)), \
8940 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8941 __ch (__un_args_eq (const __vector __pixel, *(a1)), \
8942 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8943 __ch (__un_args_eq (const __vector unsigned int, *(a1)), \
8944 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8945 __ch (__un_args_eq (const __vector signed int, *(a1)), \
8946 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8947 __ch (__un_args_eq (const __vector __bool int, *(a1)), \
8948 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8949 __ch (__un_args_eq (const __vector float, *(a1)), \
8950 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8951 __ch (__un_args_eq (const unsigned char, *(a1)), \
8952 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8953 __ch (__un_args_eq (const signed char, *(a1)), \
8954 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8955 __ch (__un_args_eq (const unsigned short, *(a1)), \
8956 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8957 __ch (__un_args_eq (const short, *(a1)), \
8958 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8959 __ch (__un_args_eq (const unsigned int, *(a1)), \
8960 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8961 __ch (__un_args_eq (const int, *(a1)), \
8962 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8963 __ch (__un_args_eq (const unsigned long, *(a1)), \
8964 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8965 __ch (__un_args_eq (const long, *(a1)), \
8966 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8967 __ch (__un_args_eq (const float, *(a1)), \
8968 __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
8969 __builtin_altivec_compiletime_error ("vec_dst")))))))))))))))))))))
8971 #define vec_dstst(a1, a2, a3) \
8972 __ch (__un_args_eq (const __vector unsigned char, *(a1)), \
8973 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8974 __ch (__un_args_eq (const __vector signed char, *(a1)), \
8975 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8976 __ch (__un_args_eq (const __vector __bool char, *(a1)), \
8977 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8978 __ch (__un_args_eq (const __vector unsigned short, *(a1)), \
8979 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8980 __ch (__un_args_eq (const __vector signed short, *(a1)), \
8981 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8982 __ch (__un_args_eq (const __vector __bool short, *(a1)), \
8983 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8984 __ch (__un_args_eq (const __vector __pixel, *(a1)), \
8985 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8986 __ch (__un_args_eq (const __vector unsigned int, *(a1)), \
8987 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8988 __ch (__un_args_eq (const __vector signed int, *(a1)), \
8989 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8990 __ch (__un_args_eq (const __vector __bool int, *(a1)), \
8991 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8992 __ch (__un_args_eq (const __vector float, *(a1)), \
8993 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8994 __ch (__un_args_eq (const unsigned char, *(a1)), \
8995 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8996 __ch (__un_args_eq (const signed char, *(a1)), \
8997 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
8998 __ch (__un_args_eq (const unsigned short, *(a1)), \
8999 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
9000 __ch (__un_args_eq (const short, *(a1)), \
9001 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
9002 __ch (__un_args_eq (const unsigned int, *(a1)), \
9003 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
9004 __ch (__un_args_eq (const int, *(a1)), \
9005 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
9006 __ch (__un_args_eq (const unsigned long, *(a1)), \
9007 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
9008 __ch (__un_args_eq (const long, *(a1)), \
9009 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
9010 __ch (__un_args_eq (const float, *(a1)), \
9011 __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
9012 __builtin_altivec_compiletime_error ("vec_dstst")))))))))))))))))))))
9014 #define vec_dststt(a1, a2, a3) \
9015 __ch (__un_args_eq (const __vector unsigned char, *(a1)), \
9016 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9017 __ch (__un_args_eq (const __vector signed char, *(a1)), \
9018 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9019 __ch (__un_args_eq (const __vector __bool char, *(a1)), \
9020 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9021 __ch (__un_args_eq (const __vector unsigned short, *(a1)), \
9022 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9023 __ch (__un_args_eq (const __vector signed short, *(a1)), \
9024 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9025 __ch (__un_args_eq (const __vector __bool short, *(a1)), \
9026 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9027 __ch (__un_args_eq (const __vector __pixel, *(a1)), \
9028 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9029 __ch (__un_args_eq (const __vector unsigned int, *(a1)), \
9030 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9031 __ch (__un_args_eq (const __vector signed int, *(a1)), \
9032 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9033 __ch (__un_args_eq (const __vector __bool int, *(a1)), \
9034 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9035 __ch (__un_args_eq (const __vector float, *(a1)), \
9036 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9037 __ch (__un_args_eq (const unsigned char, *(a1)), \
9038 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9039 __ch (__un_args_eq (const signed char, *(a1)), \
9040 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9041 __ch (__un_args_eq (const unsigned short, *(a1)), \
9042 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9043 __ch (__un_args_eq (const short, *(a1)), \
9044 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9045 __ch (__un_args_eq (const unsigned int, *(a1)), \
9046 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9047 __ch (__un_args_eq (const int, *(a1)), \
9048 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9049 __ch (__un_args_eq (const unsigned long, *(a1)), \
9050 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9051 __ch (__un_args_eq (const long, *(a1)), \
9052 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9053 __ch (__un_args_eq (const float, *(a1)), \
9054 __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
9055 __builtin_altivec_compiletime_error ("vec_dststt")))))))))))))))))))))
9057 #define vec_dstt(a1, a2, a3) \
9058 __ch (__un_args_eq (const __vector unsigned char, *(a1)), \
9059 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9060 __ch (__un_args_eq (const __vector signed char, *(a1)), \
9061 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9062 __ch (__un_args_eq (const __vector __bool char, *(a1)), \
9063 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9064 __ch (__un_args_eq (const __vector unsigned short, *(a1)), \
9065 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9066 __ch (__un_args_eq (const __vector signed short, *(a1)), \
9067 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9068 __ch (__un_args_eq (const __vector __bool short, *(a1)), \
9069 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9070 __ch (__un_args_eq (const __vector __pixel, *(a1)), \
9071 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9072 __ch (__un_args_eq (const __vector unsigned int, *(a1)), \
9073 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9074 __ch (__un_args_eq (const __vector signed int, *(a1)), \
9075 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9076 __ch (__un_args_eq (const __vector __bool int, *(a1)), \
9077 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9078 __ch (__un_args_eq (const __vector float, *(a1)), \
9079 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9080 __ch (__un_args_eq (const unsigned char, *(a1)), \
9081 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9082 __ch (__un_args_eq (const signed char, *(a1)), \
9083 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9084 __ch (__un_args_eq (const unsigned short, *(a1)), \
9085 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9086 __ch (__un_args_eq (const short, *(a1)), \
9087 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9088 __ch (__un_args_eq (const unsigned int, *(a1)), \
9089 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9090 __ch (__un_args_eq (const int, *(a1)), \
9091 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9092 __ch (__un_args_eq (const unsigned long, *(a1)), \
9093 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9094 __ch (__un_args_eq (const long, *(a1)), \
9095 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9096 __ch (__un_args_eq (const float, *(a1)), \
9097 __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
9098 __builtin_altivec_compiletime_error ("vec_dstt")))))))))))))))))))))
9100 #define vec_expte(a1) \
9101 __ch (__un_args_eq (__vector float, (a1)), \
9102 ((__vector float) __builtin_altivec_vexptefp ((__vector float) (a1))), \
9103 __builtin_altivec_compiletime_error ("vec_expte"))
9105 #define vec_floor(a1) \
9106 __ch (__un_args_eq (__vector float, (a1)), \
9107 ((__vector float) __builtin_altivec_vrfim ((__vector float) (a1))), \
9108 __builtin_altivec_compiletime_error ("vec_floor"))
9110 #define vec_ld(a, b) \
9111 __ch (__un_args_eq (const __vector unsigned char, *(b)), \
9112 ((__vector unsigned char) __builtin_altivec_lvx ((a), (b))), \
9113 __ch (__un_args_eq (const unsigned char, *(b)), \
9114 ((__vector unsigned char) __builtin_altivec_lvx ((a), (b))), \
9115 __ch (__un_args_eq (const __vector signed char, *(b)), \
9116 ((__vector signed char) __builtin_altivec_lvx ((a), (b))), \
9117 __ch (__un_args_eq (const signed char, *(b)), \
9118 ((__vector signed char) __builtin_altivec_lvx ((a), (b))), \
9119 __ch (__un_args_eq (const __vector __bool char, *(b)), \
9120 ((__vector __bool char) __builtin_altivec_lvx ((a), (b))), \
9121 __ch (__un_args_eq (const __vector unsigned short, *(b)), \
9122 ((__vector unsigned short) __builtin_altivec_lvx ((a), (b))), \
9123 __ch (__un_args_eq (const unsigned short, *(b)), \
9124 ((__vector unsigned short) __builtin_altivec_lvx ((a), (b))), \
9125 __ch (__un_args_eq (const __vector signed short, *(b)), \
9126 ((__vector signed short) __builtin_altivec_lvx ((a), (b))), \
9127 __ch (__un_args_eq (const short, *(b)), \
9128 ((__vector signed short) __builtin_altivec_lvx ((a), (b))), \
9129 __ch (__un_args_eq (const __vector __bool short, *(b)), \
9130 ((__vector __bool short) __builtin_altivec_lvx ((a), (b))), \
9131 __ch (__un_args_eq (const __vector __pixel, *(b)), \
9132 ((__vector __pixel) __builtin_altivec_lvx ((a), (b))), \
9133 __ch (__un_args_eq (const __vector unsigned int, *(b)), \
9134 ((__vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
9135 __ch (__un_args_eq (const unsigned int, *(b)), \
9136 ((__vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
9137 __ch (__un_args_eq (const unsigned long, *(b)), \
9138 ((__vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
9139 __ch (__un_args_eq (const __vector signed int, *(b)), \
9140 ((__vector signed int) __builtin_altivec_lvx ((a), (b))), \
9141 __ch (__un_args_eq (const int, *(b)), \
9142 ((__vector signed int) __builtin_altivec_lvx ((a), (b))), \
9143 __ch (__un_args_eq (const long, *(b)), \
9144 ((__vector signed int) __builtin_altivec_lvx ((a), (b))), \
9145 __ch (__un_args_eq (const __vector __bool int, *(b)), \
9146 ((__vector __bool int) __builtin_altivec_lvx ((a), (b))), \
9147 __ch (__un_args_eq (const __vector float, *(b)), \
9148 ((__vector float) __builtin_altivec_lvx ((a), (b))), \
9149 __ch (__un_args_eq (const float, *(b)), \
9150 ((__vector float) __builtin_altivec_lvx ((a), (b))), \
9151 __builtin_altivec_compiletime_error ("vec_ld")))))))))))))))))))))
9153 #define vec_lde(a, b) \
9154 __ch (__un_args_eq (const unsigned char, *(b)), \
9155 ((__vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \
9156 __ch (__un_args_eq (const signed char, *(b)), \
9157 ((__vector signed char) __builtin_altivec_lvebx ((a), (b))), \
9158 __ch (__un_args_eq (const unsigned short, *(b)), \
9159 ((__vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \
9160 __ch (__un_args_eq (const short, *(b)), \
9161 ((__vector signed short) __builtin_altivec_lvehx ((a), (b))), \
9162 __ch (__un_args_eq (const unsigned long, *(b)), \
9163 ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
9164 __ch (__un_args_eq (const long, *(b)), \
9165 ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \
9166 __ch (__un_args_eq (const unsigned int, *(b)), \
9167 ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
9168 __ch (__un_args_eq (const int, *(b)), \
9169 ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \
9170 __ch (__un_args_eq (const float, *(b)), \
9171 ((__vector float) __builtin_altivec_lvewx ((a), (b))), \
9172 __builtin_altivec_compiletime_error ("vec_lde"))))))))))
9174 #define vec_lvewx(a, b) \
9175 __ch (__un_args_eq (unsigned int, *(b)), \
9176 ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
9177 __ch (__un_args_eq (signed int, *(b)), \
9178 ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \
9179 __ch (__un_args_eq (unsigned long, *(b)), \
9180 ((__vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
9181 __ch (__un_args_eq (signed long, *(b)), \
9182 ((__vector signed int) __builtin_altivec_lvewx ((a), (b))), \
9183 __ch (__un_args_eq (float, *(b)), \
9184 ((__vector float) __builtin_altivec_lvewx ((a), (b))), \
9185 __builtin_altivec_compiletime_error ("vec_lvewx"))))))
9187 #define vec_lvehx(a, b) \
9188 __ch (__un_args_eq (unsigned short, *(b)), \
9189 ((__vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \
9190 __ch (__un_args_eq (signed short, *(b)), \
9191 ((__vector signed short) __builtin_altivec_lvehx ((a), (b))), \
9192 __builtin_altivec_compiletime_error ("vec_lvehx")))
9194 #define vec_lvebx(a, b) \
9195 __ch (__un_args_eq (unsigned char, *(b)), \
9196 ((__vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \
9197 __ch (__un_args_eq (signed char, *(b)), \
9198 ((__vector signed char) __builtin_altivec_lvebx ((a), (b))), \
9199 __builtin_altivec_compiletime_error ("vec_lvebx")))
9201 #define vec_ldl(a, b) \
9202 __ch (__un_args_eq (const __vector unsigned char, *(b)), \
9203 ((__vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \
9204 __ch (__un_args_eq (const unsigned char, *(b)), \
9205 ((__vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \
9206 __ch (__un_args_eq (const __vector signed char, *(b)), \
9207 ((__vector signed char) __builtin_altivec_lvxl ((a), (b))), \
9208 __ch (__un_args_eq (const signed char, *(b)), \
9209 ((__vector signed char) __builtin_altivec_lvxl ((a), (b))), \
9210 __ch (__un_args_eq (const __vector __bool char, *(b)), \
9211 ((__vector __bool char) __builtin_altivec_lvxl ((a), (b))), \
9212 __ch (__un_args_eq (const __vector unsigned short, *(b)), \
9213 ((__vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \
9214 __ch (__un_args_eq (const unsigned short, *(b)), \
9215 ((__vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \
9216 __ch (__un_args_eq (const __vector signed short, *(b)), \
9217 ((__vector signed short) __builtin_altivec_lvxl ((a), (b))), \
9218 __ch (__un_args_eq (const short, *(b)), \
9219 ((__vector signed short) __builtin_altivec_lvxl ((a), (b))), \
9220 __ch (__un_args_eq (const __vector __bool short, *(b)), \
9221 ((__vector __bool short) __builtin_altivec_lvxl ((a), (b))), \
9222 __ch (__un_args_eq (const __vector __pixel, *(b)), \
9223 ((__vector __pixel) __builtin_altivec_lvxl ((a), (b))), \
9224 __ch (__un_args_eq (const __vector unsigned int, *(b)), \
9225 ((__vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
9226 __ch (__un_args_eq (const unsigned int, *(b)), \
9227 ((__vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
9228 __ch (__un_args_eq (const unsigned long, *(b)), \
9229 ((__vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
9230 __ch (__un_args_eq (const __vector signed int, *(b)), \
9231 ((__vector signed int) __builtin_altivec_lvxl ((a), (b))), \
9232 __ch (__un_args_eq (const int, *(b)), \
9233 ((__vector signed int) __builtin_altivec_lvxl ((a), (b))), \
9234 __ch (__un_args_eq (const long, *(b)), \
9235 ((__vector signed int) __builtin_altivec_lvxl ((a), (b))), \
9236 __ch (__un_args_eq (const __vector __bool int, *(b)), \
9237 ((__vector __bool int) __builtin_altivec_lvxl ((a), (b))), \
9238 __ch (__un_args_eq (const __vector float, *(b)), \
9239 ((__vector float) __builtin_altivec_lvxl ((a), (b))), \
9240 __ch (__un_args_eq (const float, *(b)), \
9241 ((__vector float) __builtin_altivec_lvxl ((a), (b))), \
9242 __builtin_altivec_compiletime_error ("vec_ldl")))))))))))))))))))))
9244 #define vec_loge(a1) \
9245 __ch (__un_args_eq (__vector float, (a1)), \
9246 ((__vector float) __builtin_altivec_vlogefp ((__vector float) (a1))), \
9247 __builtin_altivec_compiletime_error ("vec_loge"))
9249 #define vec_lvsl(a1, a2) \
9250 __ch (__un_args_eq (const volatile unsigned char, *(a2)), \
9251 ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9252 __ch (__un_args_eq (const volatile signed char, *(a2)), \
9253 ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9254 __ch (__un_args_eq (const volatile unsigned short, *(a2)), \
9255 ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9256 __ch (__un_args_eq (const volatile signed short, *(a2)), \
9257 ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9258 __ch (__un_args_eq (const volatile unsigned int, *(a2)), \
9259 ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9260 __ch (__un_args_eq (const volatile signed int, *(a2)), \
9261 ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9262 __ch (__un_args_eq (const volatile unsigned long, *(a2)), \
9263 ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9264 __ch (__un_args_eq (const volatile signed long, *(a2)), \
9265 ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9266 __ch (__un_args_eq (const volatile float, *(a2)), \
9267 ((__vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
9268 __builtin_altivec_compiletime_error ("vec_lvsl"))))))))))
9270 #define vec_lvsr(a1, a2) \
9271 __ch (__un_args_eq (const volatile unsigned char, *(a2)), \
9272 ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9273 __ch (__un_args_eq (const volatile signed char, *(a2)), \
9274 ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9275 __ch (__un_args_eq (const volatile unsigned short, *(a2)), \
9276 ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9277 __ch (__un_args_eq (const volatile signed short, *(a2)), \
9278 ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9279 __ch (__un_args_eq (const volatile unsigned int, *(a2)), \
9280 ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9281 __ch (__un_args_eq (const volatile signed int, *(a2)), \
9282 ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9283 __ch (__un_args_eq (const volatile unsigned long, *(a2)), \
9284 ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9285 __ch (__un_args_eq (const volatile signed long, *(a2)), \
9286 ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9287 __ch (__un_args_eq (const volatile float, *(a2)), \
9288 ((__vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
9289 __builtin_altivec_compiletime_error ("vec_lvsr"))))))))))
9291 #define vec_madd(a1, a2, a3) \
9292 __ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector float, (a3)), \
9293 ((__vector float) __builtin_altivec_vmaddfp ((a1), (a2), (a3))), \
9294 __builtin_altivec_compiletime_error ("vec_madd"))
9296 #define vec_madds(a1, a2, a3) \
9297 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \
9298 ((__vector signed short) __builtin_altivec_vmhaddshs ((a1), (a2), (a3))), \
9299 __builtin_altivec_compiletime_error ("vec_madds"))
9301 #define vec_max(a1, a2) \
9302 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
9303 ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9304 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
9305 ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9306 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9307 ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9308 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
9309 ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9310 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
9311 ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9312 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9313 ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9314 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
9315 ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9316 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
9317 ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9318 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9319 ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9320 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
9321 ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9322 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
9323 ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9324 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9325 ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9326 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
9327 ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9328 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
9329 ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9330 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9331 ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9332 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
9333 ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9334 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
9335 ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9336 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9337 ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9338 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9339 ((__vector float) __builtin_altivec_vmaxfp ((__vector float) (a1), (__vector float) (a2))), \
9340 __builtin_altivec_compiletime_error ("vec_max"))))))))))))))))))))
9342 #define vec_vmaxfp(a1, a2) \
9343 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9344 ((__vector float) __builtin_altivec_vmaxfp ((__vector float) (a1), (__vector float) (a2))), \
9345 __builtin_altivec_compiletime_error ("vec_vmaxfp"))
9347 #define vec_vmaxsw(a1, a2) \
9348 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
9349 ((__vector signed int) __builtin_altivec_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9350 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
9351 ((__vector signed int) __builtin_altivec_vmaxsw ((__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_vmaxsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9354 __builtin_altivec_compiletime_error ("vec_vmaxsw"))))
9356 #define vec_vmaxuw(a1, a2) \
9357 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
9358 ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9359 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
9360 ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9361 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9362 ((__vector unsigned int) __builtin_altivec_vmaxuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9363 __builtin_altivec_compiletime_error ("vec_vmaxuw"))))
9365 #define vec_vmaxsh(a1, a2) \
9366 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
9367 ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9368 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
9369 ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9370 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9371 ((__vector signed short) __builtin_altivec_vmaxsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9372 __builtin_altivec_compiletime_error ("vec_vmaxsh"))))
9374 #define vec_vmaxuh(a1, a2) \
9375 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
9376 ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9377 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
9378 ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9379 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9380 ((__vector unsigned short) __builtin_altivec_vmaxuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9381 __builtin_altivec_compiletime_error ("vec_vmaxuh"))))
9383 #define vec_vmaxsb(a1, a2) \
9384 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
9385 ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9386 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
9387 ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9388 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9389 ((__vector signed char) __builtin_altivec_vmaxsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9390 __builtin_altivec_compiletime_error ("vec_vmaxsb"))))
9392 #define vec_vmaxub(a1, a2) \
9393 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
9394 ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9395 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
9396 ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9397 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9398 ((__vector unsigned char) __builtin_altivec_vmaxub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9399 __builtin_altivec_compiletime_error ("vec_vmaxub"))))
9401 #define vec_mergeh(a1, a2) \
9402 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9403 ((__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9404 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9405 ((__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9406 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
9407 ((__vector __bool char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9408 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9409 ((__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9410 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9411 ((__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9412 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
9413 ((__vector __bool short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9414 __ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \
9415 ((__vector __pixel) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9416 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9417 ((__vector float) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9418 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9419 ((__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9420 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9421 ((__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9422 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
9423 ((__vector __bool int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9424 __builtin_altivec_compiletime_error ("vec_mergeh"))))))))))))
9426 #define vec_vmrghw(a1, a2) \
9427 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9428 ((__vector float) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9429 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
9430 ((__vector __bool int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9431 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9432 ((__vector signed int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9433 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9434 ((__vector unsigned int) __builtin_altivec_vmrghw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9435 __builtin_altivec_compiletime_error ("vec_vmrghw")))))
9437 #define vec_vmrghh(a1, a2) \
9438 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
9439 ((__vector __bool short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9440 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9441 ((__vector signed short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9442 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9443 ((__vector unsigned short) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9444 __ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \
9445 ((__vector __pixel) __builtin_altivec_vmrghh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9446 __builtin_altivec_compiletime_error ("vec_vmrghh")))))
9448 #define vec_vmrghb(a1, a2) \
9449 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
9450 ((__vector __bool char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9451 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9452 ((__vector signed char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9453 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9454 ((__vector unsigned char) __builtin_altivec_vmrghb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9455 __builtin_altivec_compiletime_error ("vec_vmrghb"))))
9457 #define vec_mergel(a1, a2) \
9458 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9459 ((__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9460 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9461 ((__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9462 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
9463 ((__vector __bool char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9464 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9465 ((__vector signed short) __builtin_altivec_vmrglh ((__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_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9468 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
9469 ((__vector __bool short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9470 __ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \
9471 ((__vector __pixel) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9472 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9473 ((__vector float) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9474 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9475 ((__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9476 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9477 ((__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9478 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
9479 ((__vector __bool int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9480 __builtin_altivec_compiletime_error ("vec_mergel"))))))))))))
9482 #define vec_vmrglw(a1, a2) \
9483 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9484 ((__vector float) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9485 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9486 ((__vector signed int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9487 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9488 ((__vector unsigned int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9489 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
9490 ((__vector __bool int) __builtin_altivec_vmrglw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9491 __builtin_altivec_compiletime_error ("vec_vmrglw")))))
9493 #define vec_vmrglh(a1, a2) \
9494 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
9495 ((__vector __bool short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9496 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9497 ((__vector signed short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9498 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9499 ((__vector unsigned short) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9500 __ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \
9501 ((__vector __pixel) __builtin_altivec_vmrglh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9502 __builtin_altivec_compiletime_error ("vec_vmrglh")))))
9504 #define vec_vmrglb(a1, a2) \
9505 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
9506 ((__vector __bool char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9507 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9508 ((__vector signed char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9509 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9510 ((__vector unsigned char) __builtin_altivec_vmrglb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9511 __builtin_altivec_compiletime_error ("vec_vmrglb"))))
9513 #define vec_mfvscr() (((__vector unsigned short) __builtin_altivec_mfvscr ()))
9515 #define vec_min(a1, a2) \
9516 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
9517 ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9518 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
9519 ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9520 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9521 ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9522 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
9523 ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9524 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
9525 ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9526 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9527 ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9528 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
9529 ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9530 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
9531 ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9532 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9533 ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9534 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
9535 ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9536 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
9537 ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9538 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9539 ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9540 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
9541 ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9542 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
9543 ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9544 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9545 ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9546 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
9547 ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9548 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
9549 ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9550 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9551 ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9552 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9553 ((__vector float) __builtin_altivec_vminfp ((__vector float) (a1), (__vector float) (a2))), \
9554 __builtin_altivec_compiletime_error ("vec_min"))))))))))))))))))))
9556 #define vec_vminfp(a1, a2) \
9557 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9558 ((__vector float) __builtin_altivec_vminfp ((__vector float) (a1), (__vector float) (a2))), \
9559 __builtin_altivec_compiletime_error ("vec_vminfp"))
9561 #define vec_vminsw(a1, a2) \
9562 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
9563 ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9564 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
9565 ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9566 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9567 ((__vector signed int) __builtin_altivec_vminsw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9568 __builtin_altivec_compiletime_error ("vec_vminsw"))))
9570 #define vec_vminuw(a1, a2) \
9571 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
9572 ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9573 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
9574 ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9575 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9576 ((__vector unsigned int) __builtin_altivec_vminuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9577 __builtin_altivec_compiletime_error ("vec_vminuw"))))
9579 #define vec_vminsh(a1, a2) \
9580 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
9581 ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9582 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
9583 ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9584 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9585 ((__vector signed short) __builtin_altivec_vminsh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9586 __builtin_altivec_compiletime_error ("vec_vminsh"))))
9588 #define vec_vminuh(a1, a2) \
9589 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
9590 ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9591 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
9592 ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9593 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9594 ((__vector unsigned short) __builtin_altivec_vminuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9595 __builtin_altivec_compiletime_error ("vec_vminuh"))))
9597 #define vec_vminsb(a1, a2) \
9598 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
9599 ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9600 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
9601 ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9602 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9603 ((__vector signed char) __builtin_altivec_vminsb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9604 __builtin_altivec_compiletime_error ("vec_minsb"))))
9606 #define vec_vminub(a1, a2) \
9607 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
9608 ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9609 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
9610 ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9611 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9612 ((__vector unsigned char) __builtin_altivec_vminub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9613 __builtin_altivec_compiletime_error ("vec_vminub"))))
9615 #define vec_mladd(a1, a2, a3) \
9616 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \
9617 ((__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \
9618 __ch (__tern_args_eq (__vector signed short, (a1), __vector unsigned short, (a2), __vector unsigned short, (a3)), \
9619 ((__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \
9620 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \
9621 ((__vector signed short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \
9622 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned short, (a3)), \
9623 ((__vector unsigned short) __builtin_altivec_vmladduhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed short) (a3))), \
9624 __builtin_altivec_compiletime_error ("vec_mladd")))))
9626 #define vec_mradds(a1, a2, a3) \
9627 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed short, (a3)), \
9628 ((__vector signed short) __builtin_altivec_vmhraddshs ((a1), (a2), (a3))), \
9629 __builtin_altivec_compiletime_error ("vec_mradds"))
9631 #define vec_msum(a1, a2, a3) \
9632 __ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned int, (a3)), \
9633 ((__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \
9634 __ch (__tern_args_eq (__vector signed char, (a1), __vector unsigned char, (a2), __vector signed int, (a3)), \
9635 ((__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \
9636 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \
9637 ((__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9638 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \
9639 ((__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9640 __builtin_altivec_compiletime_error ("vec_msum")))))
9642 #define vec_vmsumshm(a1, a2, a3) \
9643 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \
9644 ((__vector signed int) __builtin_altivec_vmsumshm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9645 __builtin_altivec_compiletime_error ("vec_vmsumshm"))
9647 #define vec_vmsumuhm(a1, a2, a3) \
9648 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \
9649 ((__vector unsigned int) __builtin_altivec_vmsumuhm ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9650 __builtin_altivec_compiletime_error ("vec_vmsumuhm"))
9652 #define vec_vmsummbm(a1, a2, a3) \
9653 __ch (__tern_args_eq (__vector signed char, (a1), __vector unsigned char, (a2), __vector signed int, (a3)), \
9654 ((__vector signed int) __builtin_altivec_vmsummbm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \
9655 __builtin_altivec_compiletime_error ("vec_vmsummbm"))
9657 #define vec_vmsumubm(a1, a2, a3) \
9658 __ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned int, (a3)), \
9659 ((__vector unsigned int) __builtin_altivec_vmsumubm ((__vector signed char) (a1), (__vector signed char) (a2), (__vector signed int) (a3))), \
9660 __builtin_altivec_compiletime_error ("vec_vmsummbm"))
9662 #define vec_msums(a1, a2, a3) \
9663 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \
9664 ((__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9665 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \
9666 ((__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9667 __builtin_altivec_compiletime_error ("vec_msums")))
9669 #define vec_vmsumshs(a1, a2, a3) \
9670 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector signed int, (a3)), \
9671 ((__vector signed int) __builtin_altivec_vmsumshs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9672 __builtin_altivec_compiletime_error ("vec_vmsumshs"))
9674 #define vec_vmsumuhs(a1, a2, a3) \
9675 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned int, (a3)), \
9676 ((__vector unsigned int) __builtin_altivec_vmsumuhs ((__vector signed short) (a1), (__vector signed short) (a2), (__vector signed int) (a3))), \
9677 __builtin_altivec_compiletime_error ("vec_vmsumuhs"))
9679 #define vec_mtvscr(a1) \
9680 __ch (__un_args_eq (__vector signed int, (a1)), \
9681 __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9682 __ch (__un_args_eq (__vector unsigned int, (a1)), \
9683 __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9684 __ch (__un_args_eq (__vector __bool int, (a1)), \
9685 __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9686 __ch (__un_args_eq (__vector signed short, (a1)), \
9687 __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9688 __ch (__un_args_eq (__vector unsigned short, (a1)), \
9689 __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9690 __ch (__un_args_eq (__vector __bool short, (a1)), \
9691 __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9692 __ch (__un_args_eq (__vector __pixel, (a1)), \
9693 __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9694 __ch (__un_args_eq (__vector signed char, (a1)), \
9695 __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9696 __ch (__un_args_eq (__vector unsigned char, (a1)), \
9697 __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9698 __ch (__un_args_eq (__vector __bool char, (a1)), \
9699 __builtin_altivec_mtvscr ((__vector signed int) (a1)), \
9700 __builtin_altivec_compiletime_error ("vec_mtvscr")))))))))))
9702 #define vec_mule(a1, a2) \
9703 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9704 ((__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9705 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9706 ((__vector signed short) __builtin_altivec_vmulesb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9707 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9708 ((__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9709 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9710 ((__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9711 __builtin_altivec_compiletime_error ("vec_mule")))))
9713 #define vec_vmulesh(a1, a2) \
9714 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9715 ((__vector signed int) __builtin_altivec_vmulesh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9716 __builtin_altivec_compiletime_error ("vec_vmulesh"))
9718 #define vec_vmuleuh(a1, a2) \
9719 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9720 ((__vector unsigned int) __builtin_altivec_vmuleuh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9721 __builtin_altivec_compiletime_error ("vec_vmuleuh"))
9723 #define vec_vmulesb(a1, a2) \
9724 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9725 ((__vector signed short) __builtin_altivec_vmulesb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9726 __builtin_altivec_compiletime_error ("vec_vmulesb"))
9728 #define vec_vmuleub(a1, a2) \
9729 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9730 ((__vector unsigned short) __builtin_altivec_vmuleub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9731 __builtin_altivec_compiletime_error ("vec_vmuleub"))
9733 #define vec_mulo(a1, a2) \
9734 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9735 ((__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9736 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9737 ((__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9738 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9739 ((__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9740 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9741 ((__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9742 __builtin_altivec_compiletime_error ("vec_mulo")))))
9744 #define vec_vmulosh(a1, a2) \
9745 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9746 ((__vector signed int) __builtin_altivec_vmulosh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9747 __builtin_altivec_compiletime_error ("vec_vmulosh"))
9749 #define vec_vmulouh(a1, a2) \
9750 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9751 ((__vector unsigned int) __builtin_altivec_vmulouh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9752 __builtin_altivec_compiletime_error ("vec_vmulouh"))
9754 #define vec_vmulosb(a1, a2) \
9755 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9756 ((__vector signed short) __builtin_altivec_vmulosb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9757 __builtin_altivec_compiletime_error ("vec_vmulosb"))
9759 #define vec_vmuloub(a1, a2) \
9760 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9761 ((__vector unsigned short) __builtin_altivec_vmuloub ((__vector signed char) (a1), (__vector signed char) (a2))), \
9762 __builtin_altivec_compiletime_error ("vec_vmuloub"))
9764 #define vec_nmsub(a1, a2, a3) \
9765 __ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector float, (a3)), \
9766 ((__vector float) __builtin_altivec_vnmsubfp ((__vector float) (a1), (__vector float) (a2), (__vector float) (a3))), \
9767 __builtin_altivec_compiletime_error ("vec_nmsub"))
9769 #define vec_nor(a1, a2) \
9770 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9771 ((__vector float) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9772 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9773 ((__vector signed int) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9774 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9775 ((__vector unsigned int) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9776 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
9777 ((__vector __bool int) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9778 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9779 ((__vector signed short) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9780 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9781 ((__vector unsigned short) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9782 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
9783 ((__vector __bool short) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9784 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9785 ((__vector signed char) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9786 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9787 ((__vector unsigned char) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9788 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
9789 ((__vector __bool char) __builtin_altivec_vnor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9790 __builtin_altivec_compiletime_error ("vec_nor")))))))))))
9792 #define vec_or(a1, a2) \
9793 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
9794 ((__vector float) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9795 __ch (__bin_args_eq (__vector float, (a1), __vector __bool int, (a2)), \
9796 ((__vector float) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9797 __ch (__bin_args_eq (__vector __bool int, (a1), __vector float, (a2)), \
9798 ((__vector float) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9799 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
9800 ((__vector __bool int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9801 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
9802 ((__vector signed int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9803 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
9804 ((__vector signed int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9805 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9806 ((__vector signed int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9807 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
9808 ((__vector unsigned int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9809 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
9810 ((__vector unsigned int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9811 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9812 ((__vector unsigned int) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9813 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
9814 ((__vector __bool short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9815 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
9816 ((__vector signed short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9817 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
9818 ((__vector signed short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9819 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9820 ((__vector signed short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9821 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
9822 ((__vector unsigned short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9823 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
9824 ((__vector unsigned short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9825 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9826 ((__vector unsigned short) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9827 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
9828 ((__vector __bool char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9829 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
9830 ((__vector signed char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9831 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
9832 ((__vector signed char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9833 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
9834 ((__vector signed char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9835 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
9836 ((__vector unsigned char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9837 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
9838 ((__vector unsigned char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9839 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9840 ((__vector unsigned char) __builtin_altivec_vor ((__vector signed int) (a1), (__vector signed int) (a2))), \
9841 __builtin_altivec_compiletime_error ("vec_or")))))))))))))))))))))))))
9843 #define vec_pack(a1, a2) \
9844 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9845 ((__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9846 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9847 ((__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9848 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
9849 ((__vector __bool char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9850 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9851 ((__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9852 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9853 ((__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9854 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
9855 ((__vector __bool short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9856 __builtin_altivec_compiletime_error ("vec_pack")))))))
9858 #define vec_vpkuwum(a1, a2) \
9859 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
9860 ((__vector __bool short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9861 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9862 ((__vector signed short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9863 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9864 ((__vector unsigned short) __builtin_altivec_vpkuwum ((__vector signed int) (a1), (__vector signed int) (a2))), \
9865 __builtin_altivec_compiletime_error ("vec_vpkuwum"))))
9867 #define vec_vpkuhum(a1, a2) \
9868 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
9869 ((__vector __bool char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9870 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9871 ((__vector signed char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9872 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9873 ((__vector unsigned char) __builtin_altivec_vpkuhum ((__vector signed short) (a1), (__vector signed short) (a2))), \
9874 __builtin_altivec_compiletime_error ("vec_vpkuhum"))))
9876 #define vec_packpx(a1, a2) \
9877 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9878 ((__vector __pixel) __builtin_altivec_vpkpx ((__vector signed int) (a1), (__vector signed int) (a2))), \
9879 __builtin_altivec_compiletime_error ("vec_packpx"))
9881 #define vec_packs(a1, a2) \
9882 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9883 ((__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) (a1), (__vector signed short) (a2))), \
9884 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9885 ((__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) (a1), (__vector signed short) (a2))), \
9886 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9887 ((__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) (a1), (__vector signed int) (a2))), \
9888 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9889 ((__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) (a1), (__vector signed int) (a2))), \
9890 __builtin_altivec_compiletime_error ("vec_packs")))))
9892 #define vec_vpkswss(a1, a2) \
9893 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9894 ((__vector signed short) __builtin_altivec_vpkswss ((__vector signed int) (a1), (__vector signed int) (a2))), \
9895 __builtin_altivec_compiletime_error ("vec_vpkswss"))
9897 #define vec_vpkuwus(a1, a2) \
9898 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9899 ((__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) (a1), (__vector signed int) (a2))), \
9900 __builtin_altivec_compiletime_error ("vec_vpkuwus"))
9902 #define vec_vpkshss(a1, a2) \
9903 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9904 ((__vector signed char) __builtin_altivec_vpkshss ((__vector signed short) (a1), (__vector signed short) (a2))), \
9905 __builtin_altivec_compiletime_error ("vec_vpkshss"))
9907 #define vec_vpkuhus(a1, a2) \
9908 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9909 ((__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) (a1), (__vector signed short) (a2))), \
9910 __builtin_altivec_compiletime_error ("vec_vpkuhus"))
9912 #define vec_packsu(a1, a2) \
9913 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9914 ((__vector unsigned char) __builtin_altivec_vpkuhus ((__vector signed short) (a1), (__vector signed short) (a2))), \
9915 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9916 ((__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) (a1), (__vector signed short) (a2))), \
9917 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9918 ((__vector unsigned short) __builtin_altivec_vpkuwus ((__vector signed int) (a1), (__vector signed int) (a2))), \
9919 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9920 ((__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) (a1), (__vector signed int) (a2))), \
9921 __builtin_altivec_compiletime_error ("vec_packsu")))))
9923 #define vec_vpkswus(a1, a2) \
9924 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
9925 ((__vector unsigned short) __builtin_altivec_vpkswus ((__vector signed int) (a1), (__vector signed int) (a2))), \
9926 __builtin_altivec_compiletime_error ("vec_vpkswus"))
9928 #define vec_vpkshus(a1, a2) \
9929 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
9930 ((__vector unsigned char) __builtin_altivec_vpkshus ((__vector signed short) (a1), (__vector signed short) (a2))), \
9931 __builtin_altivec_compiletime_error ("vec_vpkshus"))
9933 #define vec_perm(a1, a2, a3) \
9934 __ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector unsigned char, (a3)), \
9935 ((__vector float) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9936 __ch (__tern_args_eq (__vector signed int, (a1), __vector signed int, (a2), __vector unsigned char, (a3)), \
9937 ((__vector signed int) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9938 __ch (__tern_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2), __vector unsigned char, (a3)), \
9939 ((__vector unsigned int) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9940 __ch (__tern_args_eq (__vector __bool int, (a1), __vector __bool int, (a2), __vector unsigned char, (a3)), \
9941 ((__vector __bool int) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9942 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector unsigned char, (a3)), \
9943 ((__vector signed short) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9944 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned char, (a3)), \
9945 ((__vector unsigned short) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9946 __ch (__tern_args_eq (__vector __bool short, (a1), __vector __bool short, (a2), __vector unsigned char, (a3)), \
9947 ((__vector __bool short) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9948 __ch (__tern_args_eq (__vector __pixel, (a1), __vector __pixel, (a2), __vector unsigned char, (a3)), \
9949 ((__vector __pixel) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9950 __ch (__tern_args_eq (__vector signed char, (a1), __vector signed char, (a2), __vector unsigned char, (a3)), \
9951 ((__vector signed char) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9952 __ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned char, (a3)), \
9953 ((__vector unsigned char) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9954 __ch (__tern_args_eq (__vector __bool char, (a1), __vector __bool char, (a2), __vector unsigned char, (a3)), \
9955 ((__vector __bool char) __builtin_altivec_vperm_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed char) (a3))), \
9956 __builtin_altivec_compiletime_error ("vec_perm"))))))))))))
9958 #define vec_re(a1) \
9959 __ch (__un_args_eq (__vector float, (a1)), \
9960 ((__vector float) __builtin_altivec_vrefp ((__vector float) (a1))), \
9961 __builtin_altivec_compiletime_error ("vec_re"))
9963 #define vec_rl(a1, a2) \
9964 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
9965 ((__vector signed char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9966 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9967 ((__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9968 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
9969 ((__vector signed short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9970 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9971 ((__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9972 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
9973 ((__vector signed int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9974 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9975 ((__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9976 __builtin_altivec_compiletime_error ("vec_rl")))))))
9978 #define vec_vrlw(a1, a2) \
9979 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
9980 ((__vector signed int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9981 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
9982 ((__vector unsigned int) __builtin_altivec_vrlw ((__vector signed int) (a1), (__vector signed int) (a2))), \
9983 __builtin_altivec_compiletime_error ("vec_vrlw")))
9985 #define vec_vrlh(a1, a2) \
9986 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
9987 ((__vector signed short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9988 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
9989 ((__vector unsigned short) __builtin_altivec_vrlh ((__vector signed short) (a1), (__vector signed short) (a2))), \
9990 __builtin_altivec_compiletime_error ("vec_vrlh")))
9992 #define vec_vrlb(a1, a2) \
9993 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
9994 ((__vector signed char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9995 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
9996 ((__vector unsigned char) __builtin_altivec_vrlb ((__vector signed char) (a1), (__vector signed char) (a2))), \
9997 __builtin_altivec_compiletime_error ("vec_vrlb")))
9999 #define vec_round(a1) \
10000 __ch (__un_args_eq (__vector float, (a1)), \
10001 ((__vector float) __builtin_altivec_vrfin ((__vector float) (a1))), \
10002 __builtin_altivec_compiletime_error ("vec_round"))
10004 #define vec_rsqrte(a1) \
10005 __ch (__un_args_eq (__vector float, (a1)), \
10006 ((__vector float) __builtin_altivec_vrsqrtefp ((__vector float) (a1))), \
10007 __builtin_altivec_compiletime_error ("vec_rsqrte"))
10009 #define vec_sel(a1, a2, a3) \
10010 __ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector __bool int, (a3)), \
10011 ((__vector float) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10012 __ch (__tern_args_eq (__vector float, (a1), __vector float, (a2), __vector unsigned int, (a3)), \
10013 ((__vector float) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10014 __ch (__tern_args_eq (__vector __bool int, (a1), __vector __bool int, (a2), __vector __bool int, (a3)), \
10015 ((__vector __bool int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10016 __ch (__tern_args_eq (__vector __bool int, (a1), __vector __bool int, (a2), __vector unsigned int, (a3)), \
10017 ((__vector __bool int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10018 __ch (__tern_args_eq (__vector signed int, (a1), __vector signed int, (a2), __vector __bool int, (a3)), \
10019 ((__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10020 __ch (__tern_args_eq (__vector signed int, (a1), __vector signed int, (a2), __vector unsigned int, (a3)), \
10021 ((__vector signed int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10022 __ch (__tern_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2), __vector __bool int, (a3)), \
10023 ((__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10024 __ch (__tern_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2), __vector unsigned int, (a3)), \
10025 ((__vector unsigned int) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10026 __ch (__tern_args_eq (__vector __bool short, (a1), __vector __bool short, (a2), __vector __bool short, (a3)), \
10027 ((__vector __bool short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10028 __ch (__tern_args_eq (__vector __bool short, (a1), __vector __bool short, (a2), __vector unsigned short, (a3)), \
10029 ((__vector __bool short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10030 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector __bool short, (a3)), \
10031 ((__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10032 __ch (__tern_args_eq (__vector signed short, (a1), __vector signed short, (a2), __vector unsigned short, (a3)), \
10033 ((__vector signed short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10034 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector __bool short, (a3)), \
10035 ((__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10036 __ch (__tern_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2), __vector unsigned short, (a3)), \
10037 ((__vector unsigned short) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10038 __ch (__tern_args_eq (__vector __bool char, (a1), __vector __bool char, (a2), __vector __bool char, (a3)), \
10039 ((__vector __bool char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10040 __ch (__tern_args_eq (__vector __bool char, (a1), __vector __bool char, (a2), __vector unsigned char, (a3)), \
10041 ((__vector __bool char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10042 __ch (__tern_args_eq (__vector signed char, (a1), __vector signed char, (a2), __vector __bool char, (a3)), \
10043 ((__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10044 __ch (__tern_args_eq (__vector signed char, (a1), __vector signed char, (a2), __vector unsigned char, (a3)), \
10045 ((__vector signed char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10046 __ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector __bool char, (a3)), \
10047 ((__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10048 __ch (__tern_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2), __vector unsigned char, (a3)), \
10049 ((__vector unsigned char) __builtin_altivec_vsel_4si ((__vector signed int) (a1), (__vector signed int) (a2), (__vector signed int) (a3))), \
10050 __builtin_altivec_compiletime_error ("vec_sel")))))))))))))))))))))
10052 #define vec_sl(a1, a2) \
10053 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10054 ((__vector signed char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10055 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10056 ((__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10057 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10058 ((__vector signed short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10059 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10060 ((__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10061 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10062 ((__vector signed int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10063 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10064 ((__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10065 __builtin_altivec_compiletime_error ("vec_sl")))))))
10067 #define vec_vslw(a1, a2) \
10068 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10069 ((__vector signed int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10070 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10071 ((__vector unsigned int) __builtin_altivec_vslw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10072 __builtin_altivec_compiletime_error ("vec_vslw")))
10074 #define vec_vslh(a1, a2) \
10075 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10076 ((__vector signed short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10077 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10078 ((__vector unsigned short) __builtin_altivec_vslh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10079 __builtin_altivec_compiletime_error ("vec_vslh")))
10081 #define vec_vslb(a1, a2) \
10082 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10083 ((__vector signed char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10084 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10085 ((__vector unsigned char) __builtin_altivec_vslb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10086 __builtin_altivec_compiletime_error ("vec_vslb")))
10088 #define vec_sld(a1, a2, a3) \
10089 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
10090 ((__vector float) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10091 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10092 ((__vector signed int) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10093 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10094 ((__vector unsigned int) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10095 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
10096 ((__vector __bool int) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10097 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10098 ((__vector signed short) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10099 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10100 ((__vector unsigned short) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10101 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
10102 ((__vector __bool short) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10103 __ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \
10104 ((__vector __pixel) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10105 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10106 ((__vector signed char) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10107 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10108 ((__vector unsigned char) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10109 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
10110 ((__vector __bool char) __builtin_altivec_vsldoi_4si ((__vector signed int) (a1), (__vector signed int) (a2), (const int) (a3))), \
10111 __builtin_altivec_compiletime_error ("vec_sld"))))))))))))
10113 #define vec_sll(a1, a2) \
10114 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10115 ((__vector signed int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10116 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned short, (a2)), \
10117 ((__vector signed int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10118 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \
10119 ((__vector signed int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10120 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10121 ((__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10122 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned short, (a2)), \
10123 ((__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10124 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \
10125 ((__vector unsigned int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10126 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
10127 ((__vector __bool int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10128 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned short, (a2)), \
10129 ((__vector __bool int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10130 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned char, (a2)), \
10131 ((__vector __bool int) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10132 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned int, (a2)), \
10133 ((__vector signed short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10134 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10135 ((__vector signed short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10136 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \
10137 ((__vector signed short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10138 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned int, (a2)), \
10139 ((__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10140 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10141 ((__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10142 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \
10143 ((__vector unsigned short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10144 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned int, (a2)), \
10145 ((__vector __bool short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10146 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
10147 ((__vector __bool short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10148 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned char, (a2)), \
10149 ((__vector __bool short) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10150 __ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned int, (a2)), \
10151 ((__vector __pixel) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10152 __ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned short, (a2)), \
10153 ((__vector __pixel) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10154 __ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned char, (a2)), \
10155 ((__vector __pixel) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10156 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned int, (a2)), \
10157 ((__vector signed char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10158 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned short, (a2)), \
10159 ((__vector signed char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10160 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10161 ((__vector signed char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10162 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \
10163 ((__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10164 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned short, (a2)), \
10165 ((__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10166 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10167 ((__vector unsigned char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10168 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned int, (a2)), \
10169 ((__vector __bool char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10170 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned short, (a2)), \
10171 ((__vector __bool char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10172 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
10173 ((__vector __bool char) __builtin_altivec_vsl ((__vector signed int) (a1), (__vector signed int) (a2))), \
10174 __builtin_altivec_compiletime_error ("vec_sll")))))))))))))))))))))))))))))))
10176 #define vec_slo(a1, a2) \
10177 __ch (__bin_args_eq (__vector float, (a1), __vector signed char, (a2)), \
10178 ((__vector float) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10179 __ch (__bin_args_eq (__vector float, (a1), __vector unsigned char, (a2)), \
10180 ((__vector float) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10181 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed char, (a2)), \
10182 ((__vector signed int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10183 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \
10184 ((__vector signed int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10185 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed char, (a2)), \
10186 ((__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10187 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \
10188 ((__vector unsigned int) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10189 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed char, (a2)), \
10190 ((__vector signed short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10191 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \
10192 ((__vector signed short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10193 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed char, (a2)), \
10194 ((__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10195 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \
10196 ((__vector unsigned short) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10197 __ch (__bin_args_eq (__vector __pixel, (a1), __vector signed char, (a2)), \
10198 ((__vector __pixel) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10199 __ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned char, (a2)), \
10200 ((__vector __pixel) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10201 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10202 ((__vector signed char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10203 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10204 ((__vector signed char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10205 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \
10206 ((__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10207 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10208 ((__vector unsigned char) __builtin_altivec_vslo ((__vector signed int) (a1), (__vector signed int) (a2))), \
10209 __builtin_altivec_compiletime_error ("vec_slo")))))))))))))))))
10211 #define vec_splat(a1, a2) \
10212 __ch (__un_args_eq (__vector signed char, (a1)), \
10213 ((__vector signed char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10214 __ch (__un_args_eq (__vector unsigned char, (a1)), \
10215 ((__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10216 __ch (__un_args_eq (__vector __bool char, (a1)), \
10217 ((__vector __bool char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10218 __ch (__un_args_eq (__vector signed short, (a1)), \
10219 ((__vector signed short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10220 __ch (__un_args_eq (__vector unsigned short, (a1)), \
10221 ((__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10222 __ch (__un_args_eq (__vector __bool short, (a1)), \
10223 ((__vector __bool short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10224 __ch (__un_args_eq (__vector __pixel, (a1)), \
10225 ((__vector __pixel) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10226 __ch (__un_args_eq (__vector float, (a1)), \
10227 ((__vector float) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10228 __ch (__un_args_eq (__vector signed int, (a1)), \
10229 ((__vector signed int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10230 __ch (__un_args_eq (__vector unsigned int, (a1)), \
10231 ((__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10232 __ch (__un_args_eq (__vector __bool int, (a1)), \
10233 ((__vector __bool int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10234 __builtin_altivec_compiletime_error ("vec_splat"))))))))))))
10236 #define vec_vspltw(a1, a2) \
10237 __ch (__un_args_eq (__vector float, (a1)), \
10238 ((__vector float) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10239 __ch (__un_args_eq (__vector __bool int, (a1)), \
10240 ((__vector __bool int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10241 __ch (__un_args_eq (__vector signed int, (a1)), \
10242 ((__vector signed int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10243 __ch (__un_args_eq (__vector unsigned int, (a1)), \
10244 ((__vector unsigned int) __builtin_altivec_vspltw ((__vector signed int) (a1), (const int) (a2))), \
10245 __builtin_altivec_compiletime_error ("vec_vspltw")))))
10247 #define vec_vsplth(a1, a2) \
10248 __ch (__un_args_eq (__vector __bool short, (a1)), \
10249 ((__vector __bool short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10250 __ch (__un_args_eq (__vector signed short, (a1)), \
10251 ((__vector signed short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10252 __ch (__un_args_eq (__vector unsigned short, (a1)), \
10253 ((__vector unsigned short) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10254 __ch (__un_args_eq (__vector __pixel, (a1)), \
10255 ((__vector __pixel) __builtin_altivec_vsplth ((__vector signed short) (a1), (const int) (a2))), \
10256 __builtin_altivec_compiletime_error ("vec_vsplth")))))
10258 #define vec_vspltb(a1, a2) \
10259 __ch (__un_args_eq (__vector __bool char, (a1)), \
10260 ((__vector __bool char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10261 __ch (__un_args_eq (__vector signed char, (a1)), \
10262 ((__vector signed char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10263 __ch (__un_args_eq (__vector unsigned char, (a1)), \
10264 ((__vector unsigned char) __builtin_altivec_vspltb ((__vector signed char) (a1), (const int) (a2))), \
10265 __builtin_altivec_compiletime_error ("vec_vspltb"))))
10267 #define vec_splat_s8(a1) ((__vector signed char) __builtin_altivec_vspltisb (a1))
10269 #define vec_splat_s16(a1) ((__vector signed short) __builtin_altivec_vspltish (a1))
10271 #define vec_splat_s32(a1) ((__vector signed int) __builtin_altivec_vspltisw (a1))
10273 #define vec_splat_u8(a1) ((__vector unsigned char) __builtin_altivec_vspltisb (a1))
10275 #define vec_splat_u16(a1) ((__vector unsigned short) __builtin_altivec_vspltish (a1))
10277 #define vec_splat_u32(a1) ((__vector unsigned int) __builtin_altivec_vspltisw (a1))
10279 #define vec_sr(a1, a2) \
10280 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10281 ((__vector signed char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10282 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10283 ((__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10284 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10285 ((__vector signed short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10286 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10287 ((__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10288 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10289 ((__vector signed int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10290 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10291 ((__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10292 __builtin_altivec_compiletime_error ("vec_sr")))))))
10294 #define vec_vsrw(a1, a2) \
10295 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10296 ((__vector signed int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10297 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10298 ((__vector unsigned int) __builtin_altivec_vsrw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10299 __builtin_altivec_compiletime_error ("vec_vsrw")))
10301 #define vec_vsrh(a1, a2) \
10302 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10303 ((__vector signed short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10304 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10305 ((__vector unsigned short) __builtin_altivec_vsrh ((__vector signed short) (a1), (__vector signed short) (a2))), \
10306 __builtin_altivec_compiletime_error ("vec_vsrh")))
10308 #define vec_vsrb(a1, a2) \
10309 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10310 ((__vector signed char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10311 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10312 ((__vector unsigned char) __builtin_altivec_vsrb ((__vector signed char) (a1), (__vector signed char) (a2))), \
10313 __builtin_altivec_compiletime_error ("vec_vsrb")))
10315 #define vec_sra(a1, a2) \
10316 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10317 ((__vector signed char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \
10318 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10319 ((__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \
10320 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10321 ((__vector signed short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \
10322 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10323 ((__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \
10324 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10325 ((__vector signed int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10326 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10327 ((__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10328 __builtin_altivec_compiletime_error ("vec_sra")))))))
10330 #define vec_vsraw(a1, a2) \
10331 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10332 ((__vector signed int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10333 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10334 ((__vector unsigned int) __builtin_altivec_vsraw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10335 __builtin_altivec_compiletime_error ("vec_vsraw")))
10337 #define vec_vsrah(a1, a2) \
10338 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10339 ((__vector signed short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \
10340 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10341 ((__vector unsigned short) __builtin_altivec_vsrah ((__vector signed short) (a1), (__vector signed short) (a2))), \
10342 __builtin_altivec_compiletime_error ("vec_vsrah")))
10344 #define vec_vsrab(a1, a2) \
10345 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10346 ((__vector signed char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \
10347 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10348 ((__vector unsigned char) __builtin_altivec_vsrab ((__vector signed char) (a1), (__vector signed char) (a2))), \
10349 __builtin_altivec_compiletime_error ("vec_vsrab")))
10351 #define vec_srl(a1, a2) \
10352 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned int, (a2)), \
10353 ((__vector signed int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10354 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned short, (a2)), \
10355 ((__vector signed int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10356 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \
10357 ((__vector signed int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10358 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10359 ((__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10360 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned short, (a2)), \
10361 ((__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10362 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \
10363 ((__vector unsigned int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10364 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
10365 ((__vector __bool int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10366 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned short, (a2)), \
10367 ((__vector __bool int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10368 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned char, (a2)), \
10369 ((__vector __bool int) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10370 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned int, (a2)), \
10371 ((__vector signed short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10372 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned short, (a2)), \
10373 ((__vector signed short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10374 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \
10375 ((__vector signed short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10376 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned int, (a2)), \
10377 ((__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10378 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10379 ((__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10380 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \
10381 ((__vector unsigned short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10382 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned int, (a2)), \
10383 ((__vector __bool short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10384 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
10385 ((__vector __bool short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10386 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned char, (a2)), \
10387 ((__vector __bool short) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10388 __ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned int, (a2)), \
10389 ((__vector __pixel) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10390 __ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned short, (a2)), \
10391 ((__vector __pixel) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10392 __ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned char, (a2)), \
10393 ((__vector __pixel) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10394 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned int, (a2)), \
10395 ((__vector signed char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10396 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned short, (a2)), \
10397 ((__vector signed char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10398 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10399 ((__vector signed char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10400 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \
10401 ((__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10402 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned short, (a2)), \
10403 ((__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10404 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10405 ((__vector unsigned char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10406 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned int, (a2)), \
10407 ((__vector __bool char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10408 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned short, (a2)), \
10409 ((__vector __bool char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10410 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
10411 ((__vector __bool char) __builtin_altivec_vsr ((__vector signed int) (a1), (__vector signed int) (a2))), \
10412 __builtin_altivec_compiletime_error ("vec_srl")))))))))))))))))))))))))))))))
10414 #define vec_sro(a1, a2) \
10415 __ch (__bin_args_eq (__vector float, (a1), __vector signed char, (a2)), \
10416 ((__vector float) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10417 __ch (__bin_args_eq (__vector float, (a1), __vector unsigned char, (a2)), \
10418 ((__vector float) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10419 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed char, (a2)), \
10420 ((__vector signed int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10421 __ch (__bin_args_eq (__vector signed int, (a1), __vector unsigned char, (a2)), \
10422 ((__vector signed int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10423 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector signed char, (a2)), \
10424 ((__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10425 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned char, (a2)), \
10426 ((__vector unsigned int) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10427 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed char, (a2)), \
10428 ((__vector signed short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10429 __ch (__bin_args_eq (__vector signed short, (a1), __vector unsigned char, (a2)), \
10430 ((__vector signed short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10431 __ch (__bin_args_eq (__vector __pixel, (a1), __vector signed char, (a2)), \
10432 ((__vector __pixel) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10433 __ch (__bin_args_eq (__vector __pixel, (a1), __vector unsigned char, (a2)), \
10434 ((__vector __pixel) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10435 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector signed char, (a2)), \
10436 ((__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10437 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned char, (a2)), \
10438 ((__vector unsigned short) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10439 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10440 ((__vector signed char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10441 __ch (__bin_args_eq (__vector signed char, (a1), __vector unsigned char, (a2)), \
10442 ((__vector signed char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10443 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector signed char, (a2)), \
10444 ((__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10445 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10446 ((__vector unsigned char) __builtin_altivec_vsro ((__vector signed int) (a1), (__vector signed int) (a2))), \
10447 __builtin_altivec_compiletime_error ("vec_sro")))))))))))))))))
10449 #define vec_st(a1, a2, a3) \
10450 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, *(a3)), \
10451 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10452 __ch (__bin_args_eq (__vector unsigned char, (a1), unsigned char, *(a3)), \
10453 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10454 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, *(a3)), \
10455 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10456 __ch (__bin_args_eq (__vector signed char, (a1), signed char, *(a3)), \
10457 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10458 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, *(a3)), \
10459 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10460 __ch (__bin_args_eq (__vector __bool char, (a1), unsigned char, *(a3)), \
10461 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10462 __ch (__bin_args_eq (__vector __bool char, (a1), signed char, *(a3)), \
10463 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10464 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, *(a3)), \
10465 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10466 __ch (__bin_args_eq (__vector unsigned short, (a1), unsigned short, *(a3)), \
10467 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10468 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, *(a3)), \
10469 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10470 __ch (__bin_args_eq (__vector signed short, (a1), short, *(a3)), \
10471 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10472 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, *(a3)), \
10473 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10474 __ch (__bin_args_eq (__vector __bool short, (a1), unsigned short, *(a3)), \
10475 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10476 __ch (__bin_args_eq (__vector __bool short, (a1), short, *(a3)), \
10477 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10478 __ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, *(a3)), \
10479 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10480 __ch (__bin_args_eq (__vector __pixel, (a1), unsigned short, *(a3)), \
10481 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10482 __ch (__bin_args_eq (__vector __pixel, (a1), short, *(a3)), \
10483 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10484 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, *(a3)), \
10485 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10486 __ch (__bin_args_eq (__vector unsigned int, (a1), unsigned int, *(a3)), \
10487 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10488 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, *(a3)), \
10489 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10490 __ch (__bin_args_eq (__vector signed int, (a1), int, *(a3)), \
10491 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10492 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, *(a3)), \
10493 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10494 __ch (__bin_args_eq (__vector __bool int, (a1), unsigned int, *(a3)), \
10495 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10496 __ch (__bin_args_eq (__vector __bool int, (a1), int, *(a3)), \
10497 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10498 __ch (__bin_args_eq (__vector float, (a1), __vector float, *(a3)), \
10499 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10500 __ch (__bin_args_eq (__vector float, (a1), float, *(a3)), \
10501 __builtin_altivec_stvx ((__vector signed int) (a1), (a2), (void *) (a3)), \
10502 __builtin_altivec_compiletime_error ("vec_st")))))))))))))))))))))))))))
10504 #define vec_stl(a1, a2, a3) \
10505 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, *(a3)), \
10506 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10507 __ch (__bin_args_eq (__vector unsigned char, (a1), unsigned char, *(a3)), \
10508 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10509 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, *(a3)), \
10510 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10511 __ch (__bin_args_eq (__vector signed char, (a1), signed char, *(a3)), \
10512 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10513 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, *(a3)), \
10514 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10515 __ch (__bin_args_eq (__vector __bool char, (a1), unsigned char, *(a3)), \
10516 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10517 __ch (__bin_args_eq (__vector __bool char, (a1), signed char, *(a3)), \
10518 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10519 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, *(a3)), \
10520 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10521 __ch (__bin_args_eq (__vector unsigned short, (a1), unsigned short, *(a3)), \
10522 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10523 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, *(a3)), \
10524 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10525 __ch (__bin_args_eq (__vector signed short, (a1), short, *(a3)), \
10526 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10527 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, *(a3)), \
10528 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10529 __ch (__bin_args_eq (__vector __bool short, (a1), unsigned short, *(a3)), \
10530 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10531 __ch (__bin_args_eq (__vector __bool short, (a1), short, *(a3)), \
10532 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10533 __ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, *(a3)), \
10534 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10535 __ch (__bin_args_eq (__vector __pixel, (a1), unsigned short, *(a3)), \
10536 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10537 __ch (__bin_args_eq (__vector __pixel, (a1), short, *(a3)), \
10538 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10539 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, *(a3)), \
10540 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10541 __ch (__bin_args_eq (__vector unsigned int, (a1), unsigned int, *(a3)), \
10542 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10543 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, *(a3)), \
10544 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10545 __ch (__bin_args_eq (__vector signed int, (a1), int, *(a3)), \
10546 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10547 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, *(a3)), \
10548 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10549 __ch (__bin_args_eq (__vector __bool int, (a1), unsigned int, *(a3)), \
10550 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10551 __ch (__bin_args_eq (__vector __bool int, (a1), int, *(a3)), \
10552 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10553 __ch (__bin_args_eq (__vector float, (a1), __vector float, *(a3)), \
10554 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10555 __ch (__bin_args_eq (__vector float, (a1), float, *(a3)), \
10556 __builtin_altivec_stvxl ((__vector signed int) (a1), (a2), (void *) (a3)), \
10557 __builtin_altivec_compiletime_error ("vec_stl")))))))))))))))))))))))))))
10559 #define vec_ste(a, b, c) \
10560 __ch (__bin_args_eq (__vector unsigned char, (a), unsigned char, *(c)), \
10561 __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \
10562 __ch (__bin_args_eq (__vector signed char, (a), signed char, *(c)), \
10563 __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \
10564 __ch (__bin_args_eq (__vector __bool char, (a), unsigned char, *(c)), \
10565 __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \
10566 __ch (__bin_args_eq (__vector __bool char, (a), signed char, *(c)), \
10567 __builtin_altivec_stvebx ((__vector signed char) (a), (b), (void *) (c)), \
10568 __ch (__bin_args_eq (__vector unsigned short, (a), unsigned short, *(c)), \
10569 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10570 __ch (__bin_args_eq (__vector signed short, (a), short, *(c)), \
10571 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10572 __ch (__bin_args_eq (__vector __bool short, (a), unsigned short, *(c)), \
10573 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10574 __ch (__bin_args_eq (__vector __bool short, (a), short, *(c)), \
10575 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10576 __ch (__bin_args_eq (__vector __pixel, (a), unsigned short, *(c)), \
10577 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10578 __ch (__bin_args_eq (__vector __pixel, (a), short, *(c)), \
10579 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (void *) (c)), \
10580 __ch (__bin_args_eq (__vector unsigned int, (a), unsigned int, *(c)), \
10581 __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \
10582 __ch (__bin_args_eq (__vector signed int, (a), int, *(c)), \
10583 __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \
10584 __ch (__bin_args_eq (__vector __bool int, (a), unsigned int, *(c)), \
10585 __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \
10586 __ch (__bin_args_eq (__vector __bool int, (a), int, *(c)), \
10587 __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \
10588 __ch (__bin_args_eq (__vector float, (a), float, *(c)), \
10589 __builtin_altivec_stvewx ((__vector signed int) (a), (b), (void *) (c)), \
10590 __builtin_altivec_compiletime_error ("vec_ste"))))))))))))))))
10592 #define vec_stvewx(a, b, c) \
10593 __ch (__bin_args_eq (__vector unsigned int, (a), unsigned int, *(c)), \
10594 __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \
10595 __ch (__bin_args_eq (__vector signed int, (a), int, *(c)), \
10596 __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \
10597 __ch (__bin_args_eq (__vector __bool int, (a), unsigned int, *(c)), \
10598 __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \
10599 __ch (__bin_args_eq (__vector __bool int, (a), int, *(c)), \
10600 __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \
10601 __ch (__bin_args_eq (__vector float, (a), float, *(c)), \
10602 __builtin_altivec_stvewx ((__vector signed int) (a), (b), (c)), \
10603 __builtin_altivec_compiletime_error ("vec_stvewx"))))))
10605 #define vec_stvehx(a, b, c) \
10606 __ch (__bin_args_eq (__vector unsigned short, (a), unsigned short, *(c)), \
10607 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10608 __ch (__bin_args_eq (__vector signed short, (a), short, *(c)), \
10609 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10610 __ch (__bin_args_eq (__vector __bool short, (a), unsigned short, *(c)), \
10611 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10612 __ch (__bin_args_eq (__vector __bool short, (a), short, *(c)), \
10613 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10614 __ch (__bin_args_eq (__vector __pixel, (a), unsigned short, *(c)), \
10615 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10616 __ch (__bin_args_eq (__vector __pixel, (a), short, *(c)), \
10617 __builtin_altivec_stvehx ((__vector signed short) (a), (b), (c)), \
10618 __builtin_altivec_compiletime_error ("vec_stvehx")))))))
10620 #define vec_stvebx(a, b, c) \
10621 __ch (__bin_args_eq (__vector unsigned char, (a), unsigned char, *(c)), \
10622 __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \
10623 __ch (__bin_args_eq (__vector signed char, (a), signed char, *(c)), \
10624 __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \
10625 __ch (__bin_args_eq (__vector __bool char, (a), unsigned char, *(c)), \
10626 __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \
10627 __ch (__bin_args_eq (__vector __bool char, (a), signed char, *(c)), \
10628 __builtin_altivec_stvebx ((__vector signed char) (a), (b), (c)), \
10629 __builtin_altivec_compiletime_error ("vec_stvebx")))))
10631 #define vec_sub(a1, a2) \
10632 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
10633 ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10634 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
10635 ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10636 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10637 ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10638 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
10639 ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10640 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
10641 ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10642 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10643 ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10644 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
10645 ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10646 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
10647 ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10648 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10649 ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10650 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
10651 ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10652 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
10653 ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10654 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10655 ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10656 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
10657 ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10658 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
10659 ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10660 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10661 ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10662 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
10663 ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10664 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
10665 ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10666 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10667 ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10668 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
10669 ((__vector float) __builtin_altivec_vsubfp ((__vector float) (a1), (__vector float) (a2))), \
10670 __builtin_altivec_compiletime_error ("vec_sub"))))))))))))))))))))
10672 #define vec_vsubfp(a1, a2) \
10673 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
10674 ((__vector float) __builtin_altivec_vsubfp ((__vector float) (a1), (__vector float) (a2))), \
10675 __builtin_altivec_compiletime_error ("vec_vsubfp"))
10677 #define vec_vsubuwm(a1, a2) \
10678 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
10679 ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10680 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
10681 ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10682 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10683 ((__vector signed int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10684 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
10685 ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10686 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
10687 ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10688 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10689 ((__vector unsigned int) __builtin_altivec_vsubuwm ((__vector signed int) (a1), (__vector signed int) (a2))), \
10690 __builtin_altivec_compiletime_error ("vec_vsubuwm")))))))
10692 #define vec_vsubuhm(a1, a2) \
10693 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
10694 ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10695 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
10696 ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10697 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10698 ((__vector signed short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10699 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
10700 ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10701 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
10702 ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10703 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10704 ((__vector unsigned short) __builtin_altivec_vsubuhm ((__vector signed short) (a1), (__vector signed short) (a2))), \
10705 __builtin_altivec_compiletime_error ("vec_vsubuhm")))))))
10707 #define vec_vsububm(a1, a2) \
10708 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
10709 ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10710 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
10711 ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10712 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10713 ((__vector signed char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10714 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
10715 ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10716 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
10717 ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10718 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10719 ((__vector unsigned char) __builtin_altivec_vsububm ((__vector signed char) (a1), (__vector signed char) (a2))), \
10720 __builtin_altivec_compiletime_error ("vec_vsububm")))))))
10722 #define vec_subc(a1, a2) \
10723 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10724 ((__vector unsigned int) __builtin_altivec_vsubcuw ((__vector signed int) (a1), (__vector signed int) (a2))), \
10725 __builtin_altivec_compiletime_error ("vec_subc"))
10727 #define vec_subs(a1, a2) \
10728 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
10729 ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10730 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
10731 ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10732 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10733 ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10734 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
10735 ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10736 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
10737 ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10738 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10739 ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10740 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
10741 ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10742 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
10743 ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10744 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10745 ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10746 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
10747 ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10748 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
10749 ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10750 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10751 ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10752 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
10753 ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10754 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
10755 ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10756 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10757 ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10758 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
10759 ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10760 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
10761 ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10762 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10763 ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10764 __builtin_altivec_compiletime_error ("vec_subs")))))))))))))))))))
10766 #define vec_vsubsws(a1, a2) \
10767 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
10768 ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10769 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
10770 ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10771 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10772 ((__vector signed int) __builtin_altivec_vsubsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10773 __builtin_altivec_compiletime_error ("vec_vsubsws"))))
10775 #define vec_vsubuws(a1, a2) \
10776 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
10777 ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10778 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
10779 ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10780 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10781 ((__vector unsigned int) __builtin_altivec_vsubuws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10782 __builtin_altivec_compiletime_error ("vec_vsubuws"))))
10784 #define vec_vsubshs(a1, a2) \
10785 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
10786 ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10787 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
10788 ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10789 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10790 ((__vector signed short) __builtin_altivec_vsubshs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10791 __builtin_altivec_compiletime_error ("vec_vsubshs"))))
10793 #define vec_vsubuhs(a1, a2) \
10794 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
10795 ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10796 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
10797 ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10798 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10799 ((__vector unsigned short) __builtin_altivec_vsubuhs ((__vector signed short) (a1), (__vector signed short) (a2))), \
10800 __builtin_altivec_compiletime_error ("vec_vsubuhs"))))
10802 #define vec_vsubsbs(a1, a2) \
10803 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
10804 ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10805 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
10806 ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10807 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10808 ((__vector signed char) __builtin_altivec_vsubsbs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10809 __builtin_altivec_compiletime_error ("vec_vsubsbs"))))
10811 #define vec_vsububs(a1, a2) \
10812 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
10813 ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10814 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
10815 ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10816 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10817 ((__vector unsigned char) __builtin_altivec_vsububs ((__vector signed char) (a1), (__vector signed char) (a2))), \
10818 __builtin_altivec_compiletime_error ("vec_vsububs"))))
10820 #define vec_sum4s(a1, a2) \
10821 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \
10822 ((__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) (a1), (__vector signed int) (a2))), \
10823 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed int, (a2)), \
10824 ((__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) (a1), (__vector signed int) (a2))), \
10825 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed int, (a2)), \
10826 ((__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) (a1), (__vector signed int) (a2))), \
10827 __builtin_altivec_compiletime_error ("vec_sum4s"))))
10829 #define vec_vsum4shs(a1, a2) \
10830 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed int, (a2)), \
10831 ((__vector signed int) __builtin_altivec_vsum4shs ((__vector signed short) (a1), (__vector signed int) (a2))), \
10832 __builtin_altivec_compiletime_error ("vec_vsum4shs"))
10834 #define vec_vsum4sbs(a1, a2) \
10835 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed int, (a2)), \
10836 ((__vector signed int) __builtin_altivec_vsum4sbs ((__vector signed char) (a1), (__vector signed int) (a2))), \
10837 __builtin_altivec_compiletime_error ("vec_vsum4sbs"))
10839 #define vec_vsum4ubs(a1, a2) \
10840 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned int, (a2)), \
10841 ((__vector unsigned int) __builtin_altivec_vsum4ubs ((__vector signed char) (a1), (__vector signed int) (a2))), \
10842 __builtin_altivec_compiletime_error ("vec_vsum4ubs"))
10844 #define vec_sum2s(a1, a2) \
10845 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10846 ((__vector signed int) __builtin_altivec_vsum2sws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10847 __builtin_altivec_compiletime_error ("vec_sum2s"))
10849 #define vec_sums(a1, a2) \
10850 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10851 ((__vector signed int) __builtin_altivec_vsumsws ((__vector signed int) (a1), (__vector signed int) (a2))), \
10852 __builtin_altivec_compiletime_error ("vec_sums"))
10854 #define vec_trunc(a1) \
10855 __ch (__un_args_eq (__vector float, (a1)), \
10856 ((__vector float) __builtin_altivec_vrfiz ((__vector float) (a1))), \
10857 __builtin_altivec_compiletime_error ("vec_trunc"))
10859 #define vec_unpackh(a1) \
10860 __ch (__un_args_eq (__vector signed char, (a1)), \
10861 ((__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) (a1))), \
10862 __ch (__un_args_eq (__vector __bool char, (a1)), \
10863 ((__vector __bool short) __builtin_altivec_vupkhsb ((__vector signed char) (a1))), \
10864 __ch (__un_args_eq (__vector __pixel, (a1)), \
10865 ((__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) (a1))), \
10866 __ch (__un_args_eq (__vector signed short, (a1)), \
10867 ((__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) (a1))), \
10868 __ch (__un_args_eq (__vector __bool short, (a1)), \
10869 ((__vector __bool int) __builtin_altivec_vupkhsh ((__vector signed short) (a1))), \
10870 __builtin_altivec_compiletime_error ("vec_unpackh"))))))
10872 #define vec_vupkhsh(a1) \
10873 __ch (__un_args_eq (__vector __bool short, (a1)), \
10874 ((__vector __bool int) __builtin_altivec_vupkhsh ((__vector signed short) (a1))), \
10875 __ch (__un_args_eq (__vector signed short, (a1)), \
10876 ((__vector signed int) __builtin_altivec_vupkhsh ((__vector signed short) (a1))), \
10877 __builtin_altivec_compiletime_error ("vec_vupkhsh")))
10879 #define vec_vupkhpx(a1) \
10880 __ch (__un_args_eq (__vector __pixel, (a1)), \
10881 ((__vector unsigned int) __builtin_altivec_vupkhpx ((__vector signed short) (a1))), \
10882 __builtin_altivec_compiletime_error ("vec_vupkhpx"))
10884 #define vec_vupkhsb(a1) \
10885 __ch (__un_args_eq (__vector __bool char, (a1)), \
10886 ((__vector __bool short) __builtin_altivec_vupkhsb ((__vector signed char) (a1))), \
10887 __ch (__un_args_eq (__vector signed char, (a1)), \
10888 ((__vector signed short) __builtin_altivec_vupkhsb ((__vector signed char) (a1))), \
10889 __builtin_altivec_compiletime_error ("vec_vupkhsb")))
10891 #define vec_unpackl(a1) \
10892 __ch (__un_args_eq (__vector signed char, (a1)), \
10893 ((__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) (a1))), \
10894 __ch (__un_args_eq (__vector __bool char, (a1)), \
10895 ((__vector __bool short) __builtin_altivec_vupklsb ((__vector signed char) (a1))), \
10896 __ch (__un_args_eq (__vector __pixel, (a1)), \
10897 ((__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) (a1))), \
10898 __ch (__un_args_eq (__vector signed short, (a1)), \
10899 ((__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) (a1))), \
10900 __ch (__un_args_eq (__vector __bool short, (a1)), \
10901 ((__vector __bool int) __builtin_altivec_vupklsh ((__vector signed short) (a1))), \
10902 __builtin_altivec_compiletime_error ("vec_unpackl"))))))
10904 #define vec_vupklsh(a1) \
10905 __ch (__un_args_eq (__vector __bool short, (a1)), \
10906 ((__vector __bool int) __builtin_altivec_vupklsh ((__vector signed short) (a1))), \
10907 __ch (__un_args_eq (__vector signed short, (a1)), \
10908 ((__vector signed int) __builtin_altivec_vupklsh ((__vector signed short) (a1))), \
10909 __builtin_altivec_compiletime_error ("vec_vupklsh")))
10911 #define vec_vupklpx(a1) \
10912 __ch (__un_args_eq (__vector __pixel, (a1)), \
10913 ((__vector unsigned int) __builtin_altivec_vupklpx ((__vector signed short) (a1))), \
10914 __builtin_altivec_compiletime_error ("vec_vupklpx"))
10916 #define vec_vupklsb(a1) \
10917 __ch (__un_args_eq (__vector __bool char, (a1)), \
10918 ((__vector __bool short) __builtin_altivec_vupklsb ((__vector signed char) (a1))), \
10919 __ch (__un_args_eq (__vector signed char, (a1)), \
10920 ((__vector signed short) __builtin_altivec_vupklsb ((__vector signed char) (a1))), \
10921 __builtin_altivec_compiletime_error ("vec_vupklsb")))
10923 #define vec_xor(a1, a2) \
10924 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
10925 ((__vector float) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10926 __ch (__bin_args_eq (__vector float, (a1), __vector __bool int, (a2)), \
10927 ((__vector float) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10928 __ch (__bin_args_eq (__vector __bool int, (a1), __vector float, (a2)), \
10929 ((__vector float) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10930 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
10931 ((__vector __bool int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10932 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
10933 ((__vector signed int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10934 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
10935 ((__vector signed int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10936 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
10937 ((__vector signed int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10938 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
10939 ((__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10940 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
10941 ((__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10942 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
10943 ((__vector unsigned int) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10944 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
10945 ((__vector __bool short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10946 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
10947 ((__vector signed short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10948 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
10949 ((__vector signed short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10950 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10951 ((__vector signed short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10952 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
10953 ((__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10954 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
10955 ((__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10956 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
10957 ((__vector unsigned short) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10958 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
10959 ((__vector __bool char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10960 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
10961 ((__vector signed char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10962 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
10963 ((__vector signed char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10964 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10965 ((__vector signed char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10966 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
10967 ((__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10968 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
10969 ((__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10970 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10971 ((__vector unsigned char) __builtin_altivec_vxor ((__vector signed int) (a1), (__vector signed int) (a2))), \
10972 __builtin_altivec_compiletime_error ("vec_xor")))))))))))))))))))))))))
10974 /* Predicates. */
10976 #define vec_all_eq(a1, a2) \
10977 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
10978 __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10979 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
10980 __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10981 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
10982 __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10983 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
10984 __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10985 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
10986 __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10987 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
10988 __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10989 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
10990 __builtin_altivec_vcmpequb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
10991 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
10992 __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10993 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
10994 __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10995 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
10996 __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10997 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
10998 __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
10999 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11000 __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11001 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11002 __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11003 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
11004 __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11005 __ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \
11006 __builtin_altivec_vcmpequh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11007 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11008 __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11009 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11010 __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11011 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11012 __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11013 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11014 __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11015 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11016 __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11017 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11018 __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11019 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
11020 __builtin_altivec_vcmpequw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11021 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11022 __builtin_altivec_vcmpeqfp_p (__CR6_LT, (__vector float) (a1), (__vector float) (a2)), \
11023 __builtin_altivec_compiletime_error ("vec_all_eq"))))))))))))))))))))))))
11025 #define vec_all_ge(a1, a2) \
11026 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
11027 __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
11028 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
11029 __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
11030 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11031 __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
11032 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
11033 __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
11034 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
11035 __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
11036 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11037 __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a2), (__vector signed char) (a1)), \
11038 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
11039 __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
11040 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11041 __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
11042 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11043 __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
11044 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
11045 __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
11046 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
11047 __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
11048 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11049 __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a2), (__vector signed short) (a1)), \
11050 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11051 __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
11052 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11053 __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
11054 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11055 __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
11056 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11057 __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
11058 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11059 __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
11060 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11061 __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a2), (__vector signed int) (a1)), \
11062 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11063 __builtin_altivec_vcmpgefp_p (__CR6_LT, (__vector float) (a1), (__vector float) (a2)), \
11064 __builtin_altivec_compiletime_error ("vec_all_ge"))))))))))))))))))))
11066 #define vec_all_gt(a1, a2) \
11067 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
11068 __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11069 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
11070 __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11071 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11072 __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11073 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
11074 __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11075 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
11076 __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11077 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11078 __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a1), (__vector signed char) (a2)), \
11079 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
11080 __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11081 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11082 __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11083 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11084 __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11085 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
11086 __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11087 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
11088 __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11089 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11090 __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a1), (__vector signed short) (a2)), \
11091 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11092 __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11093 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11094 __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11095 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11096 __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11097 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11098 __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11099 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11100 __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11101 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11102 __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a1), (__vector signed int) (a2)), \
11103 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11104 __builtin_altivec_vcmpgtfp_p (__CR6_LT, (__vector float) (a1), (__vector float) (a2)), \
11105 __builtin_altivec_compiletime_error ("vec_all_gt"))))))))))))))))))))
11107 #define vec_all_in(a1, a2) \
11108 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11109 __builtin_altivec_vcmpbfp_p (__CR6_EQ, (a1), (a2)), \
11110 __builtin_altivec_compiletime_error ("vec_all_in"))
11112 #define vec_all_le(a1, a2) \
11113 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
11114 __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11115 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
11116 __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11117 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11118 __builtin_altivec_vcmpgtub_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11119 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
11120 __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11121 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
11122 __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11123 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11124 __builtin_altivec_vcmpgtsb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11125 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
11126 __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11127 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11128 __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11129 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11130 __builtin_altivec_vcmpgtuh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11131 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
11132 __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11133 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
11134 __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11135 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11136 __builtin_altivec_vcmpgtsh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11137 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11138 __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11139 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11140 __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11141 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11142 __builtin_altivec_vcmpgtuw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11143 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11144 __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11145 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11146 __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11147 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11148 __builtin_altivec_vcmpgtsw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11149 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11150 __builtin_altivec_vcmpgefp_p (__CR6_LT, (__vector float) (a2), (__vector float) (a1)), \
11151 __builtin_altivec_compiletime_error ("vec_all_le"))))))))))))))))))))
11153 #define vec_all_lt(a1, a2) \
11154 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
11155 __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11156 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
11157 __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11158 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11159 __builtin_altivec_vcmpgtub_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11160 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
11161 __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11162 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
11163 __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11164 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11165 __builtin_altivec_vcmpgtsb_p (__CR6_LT, (__vector signed char) (a2), (__vector signed char) (a1)), \
11166 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
11167 __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11168 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11169 __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11170 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11171 __builtin_altivec_vcmpgtuh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11172 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
11173 __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11174 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
11175 __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11176 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11177 __builtin_altivec_vcmpgtsh_p (__CR6_LT, (__vector signed short) (a2), (__vector signed short) (a1)), \
11178 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11179 __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11180 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11181 __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11182 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11183 __builtin_altivec_vcmpgtuw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11184 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11185 __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11186 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11187 __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11188 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11189 __builtin_altivec_vcmpgtsw_p (__CR6_LT, (__vector signed int) (a2), (__vector signed int) (a1)), \
11190 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11191 __builtin_altivec_vcmpgtfp_p (__CR6_LT, (__vector float) (a2), (__vector float) (a1)), \
11192 __builtin_altivec_compiletime_error ("vec_all_lt"))))))))))))))))))))
11194 #define vec_all_nan(a1) \
11195 __ch (__un_args_eq (__vector float, (a1)), \
11196 __builtin_altivec_vcmpeqfp_p (__CR6_EQ, (a1), (a1)), \
11197 __builtin_altivec_compiletime_error ("vec_all_nan"))
11199 #define vec_all_ne(a1, a2) \
11200 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
11201 __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11202 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
11203 __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11204 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
11205 __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11206 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11207 __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11208 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
11209 __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11210 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11211 __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11212 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
11213 __builtin_altivec_vcmpequb_p (__CR6_EQ, (__vector signed char) (a1), (__vector signed char) (a2)), \
11214 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
11215 __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11216 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
11217 __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11218 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
11219 __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11220 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11221 __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11222 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11223 __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11224 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11225 __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11226 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
11227 __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11228 __ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \
11229 __builtin_altivec_vcmpequh_p (__CR6_EQ, (__vector signed short) (a1), (__vector signed short) (a2)), \
11230 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11231 __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11232 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11233 __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11234 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11235 __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11236 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11237 __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11238 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11239 __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11240 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11241 __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11242 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
11243 __builtin_altivec_vcmpequw_p (__CR6_EQ, (__vector signed int) (a1), (__vector signed int) (a2)), \
11244 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11245 __builtin_altivec_vcmpeqfp_p (__CR6_EQ, (__vector float) (a1), (__vector float) (a2)), \
11246 __builtin_altivec_compiletime_error ("vec_all_ne"))))))))))))))))))))))))
11248 #define vec_all_nge(a1, a2) \
11249 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11250 __builtin_altivec_vcmpgefp_p (__CR6_EQ, (a1), (a2)), \
11251 __builtin_altivec_compiletime_error ("vec_all_nge"))
11253 #define vec_all_ngt(a1, a2) \
11254 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11255 __builtin_altivec_vcmpgtfp_p (__CR6_EQ, (a1), (a2)), \
11256 __builtin_altivec_compiletime_error ("vec_all_ngt"))
11258 #define vec_all_nle(a1, a2) \
11259 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11260 __builtin_altivec_vcmpgefp_p (__CR6_EQ, (a2), (a1)), \
11261 __builtin_altivec_compiletime_error ("vec_all_nle"))
11263 #define vec_all_nlt(a1, a2) \
11264 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11265 __builtin_altivec_vcmpgtfp_p (__CR6_EQ, (a2), (a1)), \
11266 __builtin_altivec_compiletime_error ("vec_all_nlt"))
11268 #define vec_all_numeric(a1) \
11269 __ch (__un_args_eq (__vector float, (a1)), \
11270 __builtin_altivec_vcmpeqfp_p (__CR6_LT, (a1), (a1)), \
11271 __builtin_altivec_compiletime_error ("vec_all_numeric"))
11273 #define vec_any_eq(a1, a2) \
11274 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
11275 __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11276 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
11277 __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11278 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
11279 __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11280 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11281 __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11282 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
11283 __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11284 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11285 __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11286 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
11287 __builtin_altivec_vcmpequb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11288 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
11289 __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11290 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
11291 __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11292 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
11293 __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11294 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11295 __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11296 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11297 __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11298 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11299 __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11300 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
11301 __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11302 __ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \
11303 __builtin_altivec_vcmpequh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11304 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11305 __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11306 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11307 __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11308 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11309 __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11310 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11311 __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11312 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11313 __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11314 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11315 __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11316 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
11317 __builtin_altivec_vcmpequw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11318 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11319 __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, (__vector float) (a1), (__vector float) (a2)), \
11320 __builtin_altivec_compiletime_error ("vec_any_eq"))))))))))))))))))))))))
11322 #define vec_any_ge(a1, a2) \
11323 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
11324 __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11325 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
11326 __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11327 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11328 __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11329 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
11330 __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11331 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
11332 __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11333 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11334 __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11335 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
11336 __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11337 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11338 __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11339 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11340 __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11341 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
11342 __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11343 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
11344 __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11345 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11346 __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11347 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11348 __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11349 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11350 __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11351 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11352 __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11353 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11354 __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11355 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11356 __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11357 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11358 __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11359 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11360 __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, (__vector float) (a1), (__vector float) (a2)), \
11361 __builtin_altivec_compiletime_error ("vec_any_ge"))))))))))))))))))))
11363 #define vec_any_gt(a1, a2) \
11364 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
11365 __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11366 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
11367 __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11368 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11369 __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11370 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
11371 __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11372 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
11373 __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11374 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11375 __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11376 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
11377 __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11378 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11379 __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11380 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11381 __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11382 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
11383 __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11384 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
11385 __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11386 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11387 __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11388 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11389 __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11390 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11391 __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11392 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11393 __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11394 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11395 __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11396 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11397 __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11398 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11399 __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11400 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11401 __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, (__vector float) (a1), (__vector float) (a2)), \
11402 __builtin_altivec_compiletime_error ("vec_any_gt"))))))))))))))))))))
11404 #define vec_any_le(a1, a2) \
11405 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
11406 __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11407 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
11408 __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11409 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11410 __builtin_altivec_vcmpgtub_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11411 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
11412 __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11413 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
11414 __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11415 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11416 __builtin_altivec_vcmpgtsb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11417 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
11418 __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11419 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11420 __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11421 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11422 __builtin_altivec_vcmpgtuh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11423 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
11424 __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11425 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
11426 __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11427 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11428 __builtin_altivec_vcmpgtsh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11429 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11430 __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11431 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11432 __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11433 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11434 __builtin_altivec_vcmpgtuw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11435 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11436 __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11437 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11438 __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11439 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11440 __builtin_altivec_vcmpgtsw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11441 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11442 __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, (__vector float) (a2), (__vector float) (a1)), \
11443 __builtin_altivec_compiletime_error ("vec_any_le"))))))))))))))))))))
11445 #define vec_any_lt(a1, a2) \
11446 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
11447 __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11448 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
11449 __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11450 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11451 __builtin_altivec_vcmpgtub_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11452 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
11453 __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11454 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
11455 __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11456 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11457 __builtin_altivec_vcmpgtsb_p (__CR6_EQ_REV, (__vector signed char) (a2), (__vector signed char) (a1)), \
11458 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
11459 __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11460 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11461 __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11462 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11463 __builtin_altivec_vcmpgtuh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11464 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
11465 __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11466 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
11467 __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11468 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11469 __builtin_altivec_vcmpgtsh_p (__CR6_EQ_REV, (__vector signed short) (a2), (__vector signed short) (a1)), \
11470 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11471 __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11472 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11473 __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11474 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11475 __builtin_altivec_vcmpgtuw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11476 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11477 __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11478 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11479 __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11480 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11481 __builtin_altivec_vcmpgtsw_p (__CR6_EQ_REV, (__vector signed int) (a2), (__vector signed int) (a1)), \
11482 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11483 __builtin_altivec_vcmpgtfp_p (__CR6_EQ_REV, (__vector float) (a2), (__vector float) (a1)), \
11484 __builtin_altivec_compiletime_error ("vec_any_lt"))))))))))))))))))))
11486 #define vec_any_nan(a1) \
11487 __ch (__un_args_eq (__vector float, (a1)), \
11488 __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, (a1), (a1)), \
11489 __builtin_altivec_compiletime_error ("vec_any_nan"))
11491 #define vec_any_ne(a1, a2) \
11492 __ch (__bin_args_eq (__vector __bool char, (a1), __vector unsigned char, (a2)), \
11493 __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11494 __ch (__bin_args_eq (__vector __bool char, (a1), __vector signed char, (a2)), \
11495 __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11496 __ch (__bin_args_eq (__vector signed char, (a1), __vector __bool char, (a2)), \
11497 __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11498 __ch (__bin_args_eq (__vector signed char, (a1), __vector signed char, (a2)), \
11499 __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11500 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector __bool char, (a2)), \
11501 __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11502 __ch (__bin_args_eq (__vector unsigned char, (a1), __vector unsigned char, (a2)), \
11503 __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11504 __ch (__bin_args_eq (__vector __bool char, (a1), __vector __bool char, (a2)), \
11505 __builtin_altivec_vcmpequb_p (__CR6_LT_REV, (__vector signed char) (a1), (__vector signed char) (a2)), \
11506 __ch (__bin_args_eq (__vector __bool short, (a1), __vector unsigned short, (a2)), \
11507 __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11508 __ch (__bin_args_eq (__vector __bool short, (a1), __vector signed short, (a2)), \
11509 __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11510 __ch (__bin_args_eq (__vector signed short, (a1), __vector __bool short, (a2)), \
11511 __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11512 __ch (__bin_args_eq (__vector signed short, (a1), __vector signed short, (a2)), \
11513 __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11514 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector __bool short, (a2)), \
11515 __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11516 __ch (__bin_args_eq (__vector unsigned short, (a1), __vector unsigned short, (a2)), \
11517 __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11518 __ch (__bin_args_eq (__vector __bool short, (a1), __vector __bool short, (a2)), \
11519 __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11520 __ch (__bin_args_eq (__vector __pixel, (a1), __vector __pixel, (a2)), \
11521 __builtin_altivec_vcmpequh_p (__CR6_LT_REV, (__vector signed short) (a1), (__vector signed short) (a2)), \
11522 __ch (__bin_args_eq (__vector __bool int, (a1), __vector unsigned int, (a2)), \
11523 __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11524 __ch (__bin_args_eq (__vector __bool int, (a1), __vector signed int, (a2)), \
11525 __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11526 __ch (__bin_args_eq (__vector signed int, (a1), __vector __bool int, (a2)), \
11527 __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11528 __ch (__bin_args_eq (__vector signed int, (a1), __vector signed int, (a2)), \
11529 __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11530 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector __bool int, (a2)), \
11531 __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11532 __ch (__bin_args_eq (__vector unsigned int, (a1), __vector unsigned int, (a2)), \
11533 __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11534 __ch (__bin_args_eq (__vector __bool int, (a1), __vector __bool int, (a2)), \
11535 __builtin_altivec_vcmpequw_p (__CR6_LT_REV, (__vector signed int) (a1), (__vector signed int) (a2)), \
11536 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11537 __builtin_altivec_vcmpeqfp_p (__CR6_LT_REV, (__vector float) (a1), (__vector float) (a2)), \
11538 __builtin_altivec_compiletime_error ("vec_any_ne"))))))))))))))))))))))))
11540 #define vec_any_nge(a1, a2) \
11541 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11542 __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, (a1), (a2)), \
11543 __builtin_altivec_compiletime_error ("vec_any_nge"))
11545 #define vec_any_ngt(a1, a2) \
11546 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11547 __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, (a1), (a2)), \
11548 __builtin_altivec_compiletime_error ("vec_any_ngt"))
11550 #define vec_any_nle(a1, a2) \
11551 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11552 __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, (a2), (a1)), \
11553 __builtin_altivec_compiletime_error ("vec_any_nle"))
11555 #define vec_any_nlt(a1, a2) \
11556 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11557 __builtin_altivec_vcmpgtfp_p (__CR6_LT_REV, (a2), (a1)), \
11558 __builtin_altivec_compiletime_error ("vec_any_nlt"))
11560 #define vec_any_numeric(a1) \
11561 __ch (__un_args_eq (__vector float, (a1)), \
11562 __builtin_altivec_vcmpeqfp_p (__CR6_EQ_REV, (a1), (a1)), \
11563 __builtin_altivec_compiletime_error ("vec_any_numeric"))
11565 #define vec_any_out(a1, a2) \
11566 __ch (__bin_args_eq (__vector float, (a1), __vector float, (a2)), \
11567 __builtin_altivec_vcmpbfp_p (__CR6_EQ_REV, (a1), (a2)), \
11568 __builtin_altivec_compiletime_error ("vec_any_out"))
11571 #endif /* __cplusplus */
11573 #endif /* _ALTIVEC_H */