1 /*===---- altivec.h - Standard header for type generic math ---------------===*\
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
9 *
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
12 *
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 * THE SOFTWARE.
20 *
21 \*===----------------------------------------------------------------------===*/
22
23 #ifndef __ALTIVEC_H
24 #define __ALTIVEC_H
25
26 #ifndef __ALTIVEC__
27 #error "AltiVec support not enabled"
28 #endif
29
30 /* constants for mapping CR6 bits to predicate result. */
31
32 #define __CR6_EQ 0
33 #define __CR6_EQ_REV 1
34 #define __CR6_LT 2
35 #define __CR6_LT_REV 3
36
37 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
38
39 static vector signed char __ATTRS_o_ai
40 vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c);
41
42 static vector unsigned char __ATTRS_o_ai
43 vec_perm(vector unsigned char __a,
44 vector unsigned char __b,
45 vector unsigned char __c);
46
47 static vector bool char __ATTRS_o_ai
48 vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c);
49
50 static vector short __ATTRS_o_ai
51 vec_perm(vector short __a, vector short __b, vector unsigned char __c);
52
53 static vector unsigned short __ATTRS_o_ai
54 vec_perm(vector unsigned short __a,
55 vector unsigned short __b,
56 vector unsigned char __c);
57
58 static vector bool short __ATTRS_o_ai
59 vec_perm(vector bool short __a, vector bool short __b, vector unsigned char __c);
60
61 static vector pixel __ATTRS_o_ai
62 vec_perm(vector pixel __a, vector pixel __b, vector unsigned char __c);
63
64 static vector int __ATTRS_o_ai
65 vec_perm(vector int __a, vector int __b, vector unsigned char __c);
66
67 static vector unsigned int __ATTRS_o_ai
68 vec_perm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c);
69
70 static vector bool int __ATTRS_o_ai
71 vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c);
72
73 static vector float __ATTRS_o_ai
74 vec_perm(vector float __a, vector float __b, vector unsigned char __c);
75
76 static vector unsigned char __ATTRS_o_ai
77 vec_xor(vector unsigned char __a, vector unsigned char __b);
78
79 /* vec_abs */
80
81 #define __builtin_altivec_abs_v16qi vec_abs
82 #define __builtin_altivec_abs_v8hi vec_abs
83 #define __builtin_altivec_abs_v4si vec_abs
84
85 static vector signed char __ATTRS_o_ai
vec_abs(vector signed char __a)86 vec_abs(vector signed char __a)
87 {
88 return __builtin_altivec_vmaxsb(__a, -__a);
89 }
90
91 static vector signed short __ATTRS_o_ai
vec_abs(vector signed short __a)92 vec_abs(vector signed short __a)
93 {
94 return __builtin_altivec_vmaxsh(__a, -__a);
95 }
96
97 static vector signed int __ATTRS_o_ai
vec_abs(vector signed int __a)98 vec_abs(vector signed int __a)
99 {
100 return __builtin_altivec_vmaxsw(__a, -__a);
101 }
102
103 static vector float __ATTRS_o_ai
vec_abs(vector float __a)104 vec_abs(vector float __a)
105 {
106 vector unsigned int __res = (vector unsigned int)__a
107 & (vector unsigned int)(0x7FFFFFFF);
108 return (vector float)__res;
109 }
110
111 /* vec_abss */
112
113 #define __builtin_altivec_abss_v16qi vec_abss
114 #define __builtin_altivec_abss_v8hi vec_abss
115 #define __builtin_altivec_abss_v4si vec_abss
116
117 static vector signed char __ATTRS_o_ai
vec_abss(vector signed char __a)118 vec_abss(vector signed char __a)
119 {
120 return __builtin_altivec_vmaxsb
121 (__a, __builtin_altivec_vsubsbs((vector signed char)(0), __a));
122 }
123
124 static vector signed short __ATTRS_o_ai
vec_abss(vector signed short __a)125 vec_abss(vector signed short __a)
126 {
127 return __builtin_altivec_vmaxsh
128 (__a, __builtin_altivec_vsubshs((vector signed short)(0), __a));
129 }
130
131 static vector signed int __ATTRS_o_ai
vec_abss(vector signed int __a)132 vec_abss(vector signed int __a)
133 {
134 return __builtin_altivec_vmaxsw
135 (__a, __builtin_altivec_vsubsws((vector signed int)(0), __a));
136 }
137
138 /* vec_add */
139
140 static vector signed char __ATTRS_o_ai
vec_add(vector signed char __a,vector signed char __b)141 vec_add(vector signed char __a, vector signed char __b)
142 {
143 return __a + __b;
144 }
145
146 static vector signed char __ATTRS_o_ai
vec_add(vector bool char __a,vector signed char __b)147 vec_add(vector bool char __a, vector signed char __b)
148 {
149 return (vector signed char)__a + __b;
150 }
151
152 static vector signed char __ATTRS_o_ai
vec_add(vector signed char __a,vector bool char __b)153 vec_add(vector signed char __a, vector bool char __b)
154 {
155 return __a + (vector signed char)__b;
156 }
157
158 static vector unsigned char __ATTRS_o_ai
vec_add(vector unsigned char __a,vector unsigned char __b)159 vec_add(vector unsigned char __a, vector unsigned char __b)
160 {
161 return __a + __b;
162 }
163
164 static vector unsigned char __ATTRS_o_ai
vec_add(vector bool char __a,vector unsigned char __b)165 vec_add(vector bool char __a, vector unsigned char __b)
166 {
167 return (vector unsigned char)__a + __b;
168 }
169
170 static vector unsigned char __ATTRS_o_ai
vec_add(vector unsigned char __a,vector bool char __b)171 vec_add(vector unsigned char __a, vector bool char __b)
172 {
173 return __a + (vector unsigned char)__b;
174 }
175
176 static vector short __ATTRS_o_ai
vec_add(vector short __a,vector short __b)177 vec_add(vector short __a, vector short __b)
178 {
179 return __a + __b;
180 }
181
182 static vector short __ATTRS_o_ai
vec_add(vector bool short __a,vector short __b)183 vec_add(vector bool short __a, vector short __b)
184 {
185 return (vector short)__a + __b;
186 }
187
188 static vector short __ATTRS_o_ai
vec_add(vector short __a,vector bool short __b)189 vec_add(vector short __a, vector bool short __b)
190 {
191 return __a + (vector short)__b;
192 }
193
194 static vector unsigned short __ATTRS_o_ai
vec_add(vector unsigned short __a,vector unsigned short __b)195 vec_add(vector unsigned short __a, vector unsigned short __b)
196 {
197 return __a + __b;
198 }
199
200 static vector unsigned short __ATTRS_o_ai
vec_add(vector bool short __a,vector unsigned short __b)201 vec_add(vector bool short __a, vector unsigned short __b)
202 {
203 return (vector unsigned short)__a + __b;
204 }
205
206 static vector unsigned short __ATTRS_o_ai
vec_add(vector unsigned short __a,vector bool short __b)207 vec_add(vector unsigned short __a, vector bool short __b)
208 {
209 return __a + (vector unsigned short)__b;
210 }
211
212 static vector int __ATTRS_o_ai
vec_add(vector int __a,vector int __b)213 vec_add(vector int __a, vector int __b)
214 {
215 return __a + __b;
216 }
217
218 static vector int __ATTRS_o_ai
vec_add(vector bool int __a,vector int __b)219 vec_add(vector bool int __a, vector int __b)
220 {
221 return (vector int)__a + __b;
222 }
223
224 static vector int __ATTRS_o_ai
vec_add(vector int __a,vector bool int __b)225 vec_add(vector int __a, vector bool int __b)
226 {
227 return __a + (vector int)__b;
228 }
229
230 static vector unsigned int __ATTRS_o_ai
vec_add(vector unsigned int __a,vector unsigned int __b)231 vec_add(vector unsigned int __a, vector unsigned int __b)
232 {
233 return __a + __b;
234 }
235
236 static vector unsigned int __ATTRS_o_ai
vec_add(vector bool int __a,vector unsigned int __b)237 vec_add(vector bool int __a, vector unsigned int __b)
238 {
239 return (vector unsigned int)__a + __b;
240 }
241
242 static vector unsigned int __ATTRS_o_ai
vec_add(vector unsigned int __a,vector bool int __b)243 vec_add(vector unsigned int __a, vector bool int __b)
244 {
245 return __a + (vector unsigned int)__b;
246 }
247
248 static vector float __ATTRS_o_ai
vec_add(vector float __a,vector float __b)249 vec_add(vector float __a, vector float __b)
250 {
251 return __a + __b;
252 }
253
254 /* vec_vaddubm */
255
256 #define __builtin_altivec_vaddubm vec_vaddubm
257
258 static vector signed char __ATTRS_o_ai
vec_vaddubm(vector signed char __a,vector signed char __b)259 vec_vaddubm(vector signed char __a, vector signed char __b)
260 {
261 return __a + __b;
262 }
263
264 static vector signed char __ATTRS_o_ai
vec_vaddubm(vector bool char __a,vector signed char __b)265 vec_vaddubm(vector bool char __a, vector signed char __b)
266 {
267 return (vector signed char)__a + __b;
268 }
269
270 static vector signed char __ATTRS_o_ai
vec_vaddubm(vector signed char __a,vector bool char __b)271 vec_vaddubm(vector signed char __a, vector bool char __b)
272 {
273 return __a + (vector signed char)__b;
274 }
275
276 static vector unsigned char __ATTRS_o_ai
vec_vaddubm(vector unsigned char __a,vector unsigned char __b)277 vec_vaddubm(vector unsigned char __a, vector unsigned char __b)
278 {
279 return __a + __b;
280 }
281
282 static vector unsigned char __ATTRS_o_ai
vec_vaddubm(vector bool char __a,vector unsigned char __b)283 vec_vaddubm(vector bool char __a, vector unsigned char __b)
284 {
285 return (vector unsigned char)__a + __b;
286 }
287
288 static vector unsigned char __ATTRS_o_ai
vec_vaddubm(vector unsigned char __a,vector bool char __b)289 vec_vaddubm(vector unsigned char __a, vector bool char __b)
290 {
291 return __a + (vector unsigned char)__b;
292 }
293
294 /* vec_vadduhm */
295
296 #define __builtin_altivec_vadduhm vec_vadduhm
297
298 static vector short __ATTRS_o_ai
vec_vadduhm(vector short __a,vector short __b)299 vec_vadduhm(vector short __a, vector short __b)
300 {
301 return __a + __b;
302 }
303
304 static vector short __ATTRS_o_ai
vec_vadduhm(vector bool short __a,vector short __b)305 vec_vadduhm(vector bool short __a, vector short __b)
306 {
307 return (vector short)__a + __b;
308 }
309
310 static vector short __ATTRS_o_ai
vec_vadduhm(vector short __a,vector bool short __b)311 vec_vadduhm(vector short __a, vector bool short __b)
312 {
313 return __a + (vector short)__b;
314 }
315
316 static vector unsigned short __ATTRS_o_ai
vec_vadduhm(vector unsigned short __a,vector unsigned short __b)317 vec_vadduhm(vector unsigned short __a, vector unsigned short __b)
318 {
319 return __a + __b;
320 }
321
322 static vector unsigned short __ATTRS_o_ai
vec_vadduhm(vector bool short __a,vector unsigned short __b)323 vec_vadduhm(vector bool short __a, vector unsigned short __b)
324 {
325 return (vector unsigned short)__a + __b;
326 }
327
328 static vector unsigned short __ATTRS_o_ai
vec_vadduhm(vector unsigned short __a,vector bool short __b)329 vec_vadduhm(vector unsigned short __a, vector bool short __b)
330 {
331 return __a + (vector unsigned short)__b;
332 }
333
334 /* vec_vadduwm */
335
336 #define __builtin_altivec_vadduwm vec_vadduwm
337
338 static vector int __ATTRS_o_ai
vec_vadduwm(vector int __a,vector int __b)339 vec_vadduwm(vector int __a, vector int __b)
340 {
341 return __a + __b;
342 }
343
344 static vector int __ATTRS_o_ai
vec_vadduwm(vector bool int __a,vector int __b)345 vec_vadduwm(vector bool int __a, vector int __b)
346 {
347 return (vector int)__a + __b;
348 }
349
350 static vector int __ATTRS_o_ai
vec_vadduwm(vector int __a,vector bool int __b)351 vec_vadduwm(vector int __a, vector bool int __b)
352 {
353 return __a + (vector int)__b;
354 }
355
356 static vector unsigned int __ATTRS_o_ai
vec_vadduwm(vector unsigned int __a,vector unsigned int __b)357 vec_vadduwm(vector unsigned int __a, vector unsigned int __b)
358 {
359 return __a + __b;
360 }
361
362 static vector unsigned int __ATTRS_o_ai
vec_vadduwm(vector bool int __a,vector unsigned int __b)363 vec_vadduwm(vector bool int __a, vector unsigned int __b)
364 {
365 return (vector unsigned int)__a + __b;
366 }
367
368 static vector unsigned int __ATTRS_o_ai
vec_vadduwm(vector unsigned int __a,vector bool int __b)369 vec_vadduwm(vector unsigned int __a, vector bool int __b)
370 {
371 return __a + (vector unsigned int)__b;
372 }
373
374 /* vec_vaddfp */
375
376 #define __builtin_altivec_vaddfp vec_vaddfp
377
378 static vector float __attribute__((__always_inline__))
vec_vaddfp(vector float __a,vector float __b)379 vec_vaddfp(vector float __a, vector float __b)
380 {
381 return __a + __b;
382 }
383
384 /* vec_addc */
385
386 static vector unsigned int __attribute__((__always_inline__))
vec_addc(vector unsigned int __a,vector unsigned int __b)387 vec_addc(vector unsigned int __a, vector unsigned int __b)
388 {
389 return __builtin_altivec_vaddcuw(__a, __b);
390 }
391
392 /* vec_vaddcuw */
393
394 static vector unsigned int __attribute__((__always_inline__))
vec_vaddcuw(vector unsigned int __a,vector unsigned int __b)395 vec_vaddcuw(vector unsigned int __a, vector unsigned int __b)
396 {
397 return __builtin_altivec_vaddcuw(__a, __b);
398 }
399
400 /* vec_adds */
401
402 static vector signed char __ATTRS_o_ai
vec_adds(vector signed char __a,vector signed char __b)403 vec_adds(vector signed char __a, vector signed char __b)
404 {
405 return __builtin_altivec_vaddsbs(__a, __b);
406 }
407
408 static vector signed char __ATTRS_o_ai
vec_adds(vector bool char __a,vector signed char __b)409 vec_adds(vector bool char __a, vector signed char __b)
410 {
411 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
412 }
413
414 static vector signed char __ATTRS_o_ai
vec_adds(vector signed char __a,vector bool char __b)415 vec_adds(vector signed char __a, vector bool char __b)
416 {
417 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
418 }
419
420 static vector unsigned char __ATTRS_o_ai
vec_adds(vector unsigned char __a,vector unsigned char __b)421 vec_adds(vector unsigned char __a, vector unsigned char __b)
422 {
423 return __builtin_altivec_vaddubs(__a, __b);
424 }
425
426 static vector unsigned char __ATTRS_o_ai
vec_adds(vector bool char __a,vector unsigned char __b)427 vec_adds(vector bool char __a, vector unsigned char __b)
428 {
429 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
430 }
431
432 static vector unsigned char __ATTRS_o_ai
vec_adds(vector unsigned char __a,vector bool char __b)433 vec_adds(vector unsigned char __a, vector bool char __b)
434 {
435 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
436 }
437
438 static vector short __ATTRS_o_ai
vec_adds(vector short __a,vector short __b)439 vec_adds(vector short __a, vector short __b)
440 {
441 return __builtin_altivec_vaddshs(__a, __b);
442 }
443
444 static vector short __ATTRS_o_ai
vec_adds(vector bool short __a,vector short __b)445 vec_adds(vector bool short __a, vector short __b)
446 {
447 return __builtin_altivec_vaddshs((vector short)__a, __b);
448 }
449
450 static vector short __ATTRS_o_ai
vec_adds(vector short __a,vector bool short __b)451 vec_adds(vector short __a, vector bool short __b)
452 {
453 return __builtin_altivec_vaddshs(__a, (vector short)__b);
454 }
455
456 static vector unsigned short __ATTRS_o_ai
vec_adds(vector unsigned short __a,vector unsigned short __b)457 vec_adds(vector unsigned short __a, vector unsigned short __b)
458 {
459 return __builtin_altivec_vadduhs(__a, __b);
460 }
461
462 static vector unsigned short __ATTRS_o_ai
vec_adds(vector bool short __a,vector unsigned short __b)463 vec_adds(vector bool short __a, vector unsigned short __b)
464 {
465 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
466 }
467
468 static vector unsigned short __ATTRS_o_ai
vec_adds(vector unsigned short __a,vector bool short __b)469 vec_adds(vector unsigned short __a, vector bool short __b)
470 {
471 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
472 }
473
474 static vector int __ATTRS_o_ai
vec_adds(vector int __a,vector int __b)475 vec_adds(vector int __a, vector int __b)
476 {
477 return __builtin_altivec_vaddsws(__a, __b);
478 }
479
480 static vector int __ATTRS_o_ai
vec_adds(vector bool int __a,vector int __b)481 vec_adds(vector bool int __a, vector int __b)
482 {
483 return __builtin_altivec_vaddsws((vector int)__a, __b);
484 }
485
486 static vector int __ATTRS_o_ai
vec_adds(vector int __a,vector bool int __b)487 vec_adds(vector int __a, vector bool int __b)
488 {
489 return __builtin_altivec_vaddsws(__a, (vector int)__b);
490 }
491
492 static vector unsigned int __ATTRS_o_ai
vec_adds(vector unsigned int __a,vector unsigned int __b)493 vec_adds(vector unsigned int __a, vector unsigned int __b)
494 {
495 return __builtin_altivec_vadduws(__a, __b);
496 }
497
498 static vector unsigned int __ATTRS_o_ai
vec_adds(vector bool int __a,vector unsigned int __b)499 vec_adds(vector bool int __a, vector unsigned int __b)
500 {
501 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
502 }
503
504 static vector unsigned int __ATTRS_o_ai
vec_adds(vector unsigned int __a,vector bool int __b)505 vec_adds(vector unsigned int __a, vector bool int __b)
506 {
507 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
508 }
509
510 /* vec_vaddsbs */
511
512 static vector signed char __ATTRS_o_ai
vec_vaddsbs(vector signed char __a,vector signed char __b)513 vec_vaddsbs(vector signed char __a, vector signed char __b)
514 {
515 return __builtin_altivec_vaddsbs(__a, __b);
516 }
517
518 static vector signed char __ATTRS_o_ai
vec_vaddsbs(vector bool char __a,vector signed char __b)519 vec_vaddsbs(vector bool char __a, vector signed char __b)
520 {
521 return __builtin_altivec_vaddsbs((vector signed char)__a, __b);
522 }
523
524 static vector signed char __ATTRS_o_ai
vec_vaddsbs(vector signed char __a,vector bool char __b)525 vec_vaddsbs(vector signed char __a, vector bool char __b)
526 {
527 return __builtin_altivec_vaddsbs(__a, (vector signed char)__b);
528 }
529
530 /* vec_vaddubs */
531
532 static vector unsigned char __ATTRS_o_ai
vec_vaddubs(vector unsigned char __a,vector unsigned char __b)533 vec_vaddubs(vector unsigned char __a, vector unsigned char __b)
534 {
535 return __builtin_altivec_vaddubs(__a, __b);
536 }
537
538 static vector unsigned char __ATTRS_o_ai
vec_vaddubs(vector bool char __a,vector unsigned char __b)539 vec_vaddubs(vector bool char __a, vector unsigned char __b)
540 {
541 return __builtin_altivec_vaddubs((vector unsigned char)__a, __b);
542 }
543
544 static vector unsigned char __ATTRS_o_ai
vec_vaddubs(vector unsigned char __a,vector bool char __b)545 vec_vaddubs(vector unsigned char __a, vector bool char __b)
546 {
547 return __builtin_altivec_vaddubs(__a, (vector unsigned char)__b);
548 }
549
550 /* vec_vaddshs */
551
552 static vector short __ATTRS_o_ai
vec_vaddshs(vector short __a,vector short __b)553 vec_vaddshs(vector short __a, vector short __b)
554 {
555 return __builtin_altivec_vaddshs(__a, __b);
556 }
557
558 static vector short __ATTRS_o_ai
vec_vaddshs(vector bool short __a,vector short __b)559 vec_vaddshs(vector bool short __a, vector short __b)
560 {
561 return __builtin_altivec_vaddshs((vector short)__a, __b);
562 }
563
564 static vector short __ATTRS_o_ai
vec_vaddshs(vector short __a,vector bool short __b)565 vec_vaddshs(vector short __a, vector bool short __b)
566 {
567 return __builtin_altivec_vaddshs(__a, (vector short)__b);
568 }
569
570 /* vec_vadduhs */
571
572 static vector unsigned short __ATTRS_o_ai
vec_vadduhs(vector unsigned short __a,vector unsigned short __b)573 vec_vadduhs(vector unsigned short __a, vector unsigned short __b)
574 {
575 return __builtin_altivec_vadduhs(__a, __b);
576 }
577
578 static vector unsigned short __ATTRS_o_ai
vec_vadduhs(vector bool short __a,vector unsigned short __b)579 vec_vadduhs(vector bool short __a, vector unsigned short __b)
580 {
581 return __builtin_altivec_vadduhs((vector unsigned short)__a, __b);
582 }
583
584 static vector unsigned short __ATTRS_o_ai
vec_vadduhs(vector unsigned short __a,vector bool short __b)585 vec_vadduhs(vector unsigned short __a, vector bool short __b)
586 {
587 return __builtin_altivec_vadduhs(__a, (vector unsigned short)__b);
588 }
589
590 /* vec_vaddsws */
591
592 static vector int __ATTRS_o_ai
vec_vaddsws(vector int __a,vector int __b)593 vec_vaddsws(vector int __a, vector int __b)
594 {
595 return __builtin_altivec_vaddsws(__a, __b);
596 }
597
598 static vector int __ATTRS_o_ai
vec_vaddsws(vector bool int __a,vector int __b)599 vec_vaddsws(vector bool int __a, vector int __b)
600 {
601 return __builtin_altivec_vaddsws((vector int)__a, __b);
602 }
603
604 static vector int __ATTRS_o_ai
vec_vaddsws(vector int __a,vector bool int __b)605 vec_vaddsws(vector int __a, vector bool int __b)
606 {
607 return __builtin_altivec_vaddsws(__a, (vector int)__b);
608 }
609
610 /* vec_vadduws */
611
612 static vector unsigned int __ATTRS_o_ai
vec_vadduws(vector unsigned int __a,vector unsigned int __b)613 vec_vadduws(vector unsigned int __a, vector unsigned int __b)
614 {
615 return __builtin_altivec_vadduws(__a, __b);
616 }
617
618 static vector unsigned int __ATTRS_o_ai
vec_vadduws(vector bool int __a,vector unsigned int __b)619 vec_vadduws(vector bool int __a, vector unsigned int __b)
620 {
621 return __builtin_altivec_vadduws((vector unsigned int)__a, __b);
622 }
623
624 static vector unsigned int __ATTRS_o_ai
vec_vadduws(vector unsigned int __a,vector bool int __b)625 vec_vadduws(vector unsigned int __a, vector bool int __b)
626 {
627 return __builtin_altivec_vadduws(__a, (vector unsigned int)__b);
628 }
629
630 /* vec_and */
631
632 #define __builtin_altivec_vand vec_and
633
634 static vector signed char __ATTRS_o_ai
vec_and(vector signed char __a,vector signed char __b)635 vec_and(vector signed char __a, vector signed char __b)
636 {
637 return __a & __b;
638 }
639
640 static vector signed char __ATTRS_o_ai
vec_and(vector bool char __a,vector signed char __b)641 vec_and(vector bool char __a, vector signed char __b)
642 {
643 return (vector signed char)__a & __b;
644 }
645
646 static vector signed char __ATTRS_o_ai
vec_and(vector signed char __a,vector bool char __b)647 vec_and(vector signed char __a, vector bool char __b)
648 {
649 return __a & (vector signed char)__b;
650 }
651
652 static vector unsigned char __ATTRS_o_ai
vec_and(vector unsigned char __a,vector unsigned char __b)653 vec_and(vector unsigned char __a, vector unsigned char __b)
654 {
655 return __a & __b;
656 }
657
658 static vector unsigned char __ATTRS_o_ai
vec_and(vector bool char __a,vector unsigned char __b)659 vec_and(vector bool char __a, vector unsigned char __b)
660 {
661 return (vector unsigned char)__a & __b;
662 }
663
664 static vector unsigned char __ATTRS_o_ai
vec_and(vector unsigned char __a,vector bool char __b)665 vec_and(vector unsigned char __a, vector bool char __b)
666 {
667 return __a & (vector unsigned char)__b;
668 }
669
670 static vector bool char __ATTRS_o_ai
vec_and(vector bool char __a,vector bool char __b)671 vec_and(vector bool char __a, vector bool char __b)
672 {
673 return __a & __b;
674 }
675
676 static vector short __ATTRS_o_ai
vec_and(vector short __a,vector short __b)677 vec_and(vector short __a, vector short __b)
678 {
679 return __a & __b;
680 }
681
682 static vector short __ATTRS_o_ai
vec_and(vector bool short __a,vector short __b)683 vec_and(vector bool short __a, vector short __b)
684 {
685 return (vector short)__a & __b;
686 }
687
688 static vector short __ATTRS_o_ai
vec_and(vector short __a,vector bool short __b)689 vec_and(vector short __a, vector bool short __b)
690 {
691 return __a & (vector short)__b;
692 }
693
694 static vector unsigned short __ATTRS_o_ai
vec_and(vector unsigned short __a,vector unsigned short __b)695 vec_and(vector unsigned short __a, vector unsigned short __b)
696 {
697 return __a & __b;
698 }
699
700 static vector unsigned short __ATTRS_o_ai
vec_and(vector bool short __a,vector unsigned short __b)701 vec_and(vector bool short __a, vector unsigned short __b)
702 {
703 return (vector unsigned short)__a & __b;
704 }
705
706 static vector unsigned short __ATTRS_o_ai
vec_and(vector unsigned short __a,vector bool short __b)707 vec_and(vector unsigned short __a, vector bool short __b)
708 {
709 return __a & (vector unsigned short)__b;
710 }
711
712 static vector bool short __ATTRS_o_ai
vec_and(vector bool short __a,vector bool short __b)713 vec_and(vector bool short __a, vector bool short __b)
714 {
715 return __a & __b;
716 }
717
718 static vector int __ATTRS_o_ai
vec_and(vector int __a,vector int __b)719 vec_and(vector int __a, vector int __b)
720 {
721 return __a & __b;
722 }
723
724 static vector int __ATTRS_o_ai
vec_and(vector bool int __a,vector int __b)725 vec_and(vector bool int __a, vector int __b)
726 {
727 return (vector int)__a & __b;
728 }
729
730 static vector int __ATTRS_o_ai
vec_and(vector int __a,vector bool int __b)731 vec_and(vector int __a, vector bool int __b)
732 {
733 return __a & (vector int)__b;
734 }
735
736 static vector unsigned int __ATTRS_o_ai
vec_and(vector unsigned int __a,vector unsigned int __b)737 vec_and(vector unsigned int __a, vector unsigned int __b)
738 {
739 return __a & __b;
740 }
741
742 static vector unsigned int __ATTRS_o_ai
vec_and(vector bool int __a,vector unsigned int __b)743 vec_and(vector bool int __a, vector unsigned int __b)
744 {
745 return (vector unsigned int)__a & __b;
746 }
747
748 static vector unsigned int __ATTRS_o_ai
vec_and(vector unsigned int __a,vector bool int __b)749 vec_and(vector unsigned int __a, vector bool int __b)
750 {
751 return __a & (vector unsigned int)__b;
752 }
753
754 static vector bool int __ATTRS_o_ai
vec_and(vector bool int __a,vector bool int __b)755 vec_and(vector bool int __a, vector bool int __b)
756 {
757 return __a & __b;
758 }
759
760 static vector float __ATTRS_o_ai
vec_and(vector float __a,vector float __b)761 vec_and(vector float __a, vector float __b)
762 {
763 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
764 return (vector float)__res;
765 }
766
767 static vector float __ATTRS_o_ai
vec_and(vector bool int __a,vector float __b)768 vec_and(vector bool int __a, vector float __b)
769 {
770 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
771 return (vector float)__res;
772 }
773
774 static vector float __ATTRS_o_ai
vec_and(vector float __a,vector bool int __b)775 vec_and(vector float __a, vector bool int __b)
776 {
777 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
778 return (vector float)__res;
779 }
780
781 /* vec_vand */
782
783 static vector signed char __ATTRS_o_ai
vec_vand(vector signed char __a,vector signed char __b)784 vec_vand(vector signed char __a, vector signed char __b)
785 {
786 return __a & __b;
787 }
788
789 static vector signed char __ATTRS_o_ai
vec_vand(vector bool char __a,vector signed char __b)790 vec_vand(vector bool char __a, vector signed char __b)
791 {
792 return (vector signed char)__a & __b;
793 }
794
795 static vector signed char __ATTRS_o_ai
vec_vand(vector signed char __a,vector bool char __b)796 vec_vand(vector signed char __a, vector bool char __b)
797 {
798 return __a & (vector signed char)__b;
799 }
800
801 static vector unsigned char __ATTRS_o_ai
vec_vand(vector unsigned char __a,vector unsigned char __b)802 vec_vand(vector unsigned char __a, vector unsigned char __b)
803 {
804 return __a & __b;
805 }
806
807 static vector unsigned char __ATTRS_o_ai
vec_vand(vector bool char __a,vector unsigned char __b)808 vec_vand(vector bool char __a, vector unsigned char __b)
809 {
810 return (vector unsigned char)__a & __b;
811 }
812
813 static vector unsigned char __ATTRS_o_ai
vec_vand(vector unsigned char __a,vector bool char __b)814 vec_vand(vector unsigned char __a, vector bool char __b)
815 {
816 return __a & (vector unsigned char)__b;
817 }
818
819 static vector bool char __ATTRS_o_ai
vec_vand(vector bool char __a,vector bool char __b)820 vec_vand(vector bool char __a, vector bool char __b)
821 {
822 return __a & __b;
823 }
824
825 static vector short __ATTRS_o_ai
vec_vand(vector short __a,vector short __b)826 vec_vand(vector short __a, vector short __b)
827 {
828 return __a & __b;
829 }
830
831 static vector short __ATTRS_o_ai
vec_vand(vector bool short __a,vector short __b)832 vec_vand(vector bool short __a, vector short __b)
833 {
834 return (vector short)__a & __b;
835 }
836
837 static vector short __ATTRS_o_ai
vec_vand(vector short __a,vector bool short __b)838 vec_vand(vector short __a, vector bool short __b)
839 {
840 return __a & (vector short)__b;
841 }
842
843 static vector unsigned short __ATTRS_o_ai
vec_vand(vector unsigned short __a,vector unsigned short __b)844 vec_vand(vector unsigned short __a, vector unsigned short __b)
845 {
846 return __a & __b;
847 }
848
849 static vector unsigned short __ATTRS_o_ai
vec_vand(vector bool short __a,vector unsigned short __b)850 vec_vand(vector bool short __a, vector unsigned short __b)
851 {
852 return (vector unsigned short)__a & __b;
853 }
854
855 static vector unsigned short __ATTRS_o_ai
vec_vand(vector unsigned short __a,vector bool short __b)856 vec_vand(vector unsigned short __a, vector bool short __b)
857 {
858 return __a & (vector unsigned short)__b;
859 }
860
861 static vector bool short __ATTRS_o_ai
vec_vand(vector bool short __a,vector bool short __b)862 vec_vand(vector bool short __a, vector bool short __b)
863 {
864 return __a & __b;
865 }
866
867 static vector int __ATTRS_o_ai
vec_vand(vector int __a,vector int __b)868 vec_vand(vector int __a, vector int __b)
869 {
870 return __a & __b;
871 }
872
873 static vector int __ATTRS_o_ai
vec_vand(vector bool int __a,vector int __b)874 vec_vand(vector bool int __a, vector int __b)
875 {
876 return (vector int)__a & __b;
877 }
878
879 static vector int __ATTRS_o_ai
vec_vand(vector int __a,vector bool int __b)880 vec_vand(vector int __a, vector bool int __b)
881 {
882 return __a & (vector int)__b;
883 }
884
885 static vector unsigned int __ATTRS_o_ai
vec_vand(vector unsigned int __a,vector unsigned int __b)886 vec_vand(vector unsigned int __a, vector unsigned int __b)
887 {
888 return __a & __b;
889 }
890
891 static vector unsigned int __ATTRS_o_ai
vec_vand(vector bool int __a,vector unsigned int __b)892 vec_vand(vector bool int __a, vector unsigned int __b)
893 {
894 return (vector unsigned int)__a & __b;
895 }
896
897 static vector unsigned int __ATTRS_o_ai
vec_vand(vector unsigned int __a,vector bool int __b)898 vec_vand(vector unsigned int __a, vector bool int __b)
899 {
900 return __a & (vector unsigned int)__b;
901 }
902
903 static vector bool int __ATTRS_o_ai
vec_vand(vector bool int __a,vector bool int __b)904 vec_vand(vector bool int __a, vector bool int __b)
905 {
906 return __a & __b;
907 }
908
909 static vector float __ATTRS_o_ai
vec_vand(vector float __a,vector float __b)910 vec_vand(vector float __a, vector float __b)
911 {
912 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
913 return (vector float)__res;
914 }
915
916 static vector float __ATTRS_o_ai
vec_vand(vector bool int __a,vector float __b)917 vec_vand(vector bool int __a, vector float __b)
918 {
919 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
920 return (vector float)__res;
921 }
922
923 static vector float __ATTRS_o_ai
vec_vand(vector float __a,vector bool int __b)924 vec_vand(vector float __a, vector bool int __b)
925 {
926 vector unsigned int __res = (vector unsigned int)__a & (vector unsigned int)__b;
927 return (vector float)__res;
928 }
929
930 /* vec_andc */
931
932 #define __builtin_altivec_vandc vec_andc
933
934 static vector signed char __ATTRS_o_ai
vec_andc(vector signed char __a,vector signed char __b)935 vec_andc(vector signed char __a, vector signed char __b)
936 {
937 return __a & ~__b;
938 }
939
940 static vector signed char __ATTRS_o_ai
vec_andc(vector bool char __a,vector signed char __b)941 vec_andc(vector bool char __a, vector signed char __b)
942 {
943 return (vector signed char)__a & ~__b;
944 }
945
946 static vector signed char __ATTRS_o_ai
vec_andc(vector signed char __a,vector bool char __b)947 vec_andc(vector signed char __a, vector bool char __b)
948 {
949 return __a & ~(vector signed char)__b;
950 }
951
952 static vector unsigned char __ATTRS_o_ai
vec_andc(vector unsigned char __a,vector unsigned char __b)953 vec_andc(vector unsigned char __a, vector unsigned char __b)
954 {
955 return __a & ~__b;
956 }
957
958 static vector unsigned char __ATTRS_o_ai
vec_andc(vector bool char __a,vector unsigned char __b)959 vec_andc(vector bool char __a, vector unsigned char __b)
960 {
961 return (vector unsigned char)__a & ~__b;
962 }
963
964 static vector unsigned char __ATTRS_o_ai
vec_andc(vector unsigned char __a,vector bool char __b)965 vec_andc(vector unsigned char __a, vector bool char __b)
966 {
967 return __a & ~(vector unsigned char)__b;
968 }
969
970 static vector bool char __ATTRS_o_ai
vec_andc(vector bool char __a,vector bool char __b)971 vec_andc(vector bool char __a, vector bool char __b)
972 {
973 return __a & ~__b;
974 }
975
976 static vector short __ATTRS_o_ai
vec_andc(vector short __a,vector short __b)977 vec_andc(vector short __a, vector short __b)
978 {
979 return __a & ~__b;
980 }
981
982 static vector short __ATTRS_o_ai
vec_andc(vector bool short __a,vector short __b)983 vec_andc(vector bool short __a, vector short __b)
984 {
985 return (vector short)__a & ~__b;
986 }
987
988 static vector short __ATTRS_o_ai
vec_andc(vector short __a,vector bool short __b)989 vec_andc(vector short __a, vector bool short __b)
990 {
991 return __a & ~(vector short)__b;
992 }
993
994 static vector unsigned short __ATTRS_o_ai
vec_andc(vector unsigned short __a,vector unsigned short __b)995 vec_andc(vector unsigned short __a, vector unsigned short __b)
996 {
997 return __a & ~__b;
998 }
999
1000 static vector unsigned short __ATTRS_o_ai
vec_andc(vector bool short __a,vector unsigned short __b)1001 vec_andc(vector bool short __a, vector unsigned short __b)
1002 {
1003 return (vector unsigned short)__a & ~__b;
1004 }
1005
1006 static vector unsigned short __ATTRS_o_ai
vec_andc(vector unsigned short __a,vector bool short __b)1007 vec_andc(vector unsigned short __a, vector bool short __b)
1008 {
1009 return __a & ~(vector unsigned short)__b;
1010 }
1011
1012 static vector bool short __ATTRS_o_ai
vec_andc(vector bool short __a,vector bool short __b)1013 vec_andc(vector bool short __a, vector bool short __b)
1014 {
1015 return __a & ~__b;
1016 }
1017
1018 static vector int __ATTRS_o_ai
vec_andc(vector int __a,vector int __b)1019 vec_andc(vector int __a, vector int __b)
1020 {
1021 return __a & ~__b;
1022 }
1023
1024 static vector int __ATTRS_o_ai
vec_andc(vector bool int __a,vector int __b)1025 vec_andc(vector bool int __a, vector int __b)
1026 {
1027 return (vector int)__a & ~__b;
1028 }
1029
1030 static vector int __ATTRS_o_ai
vec_andc(vector int __a,vector bool int __b)1031 vec_andc(vector int __a, vector bool int __b)
1032 {
1033 return __a & ~(vector int)__b;
1034 }
1035
1036 static vector unsigned int __ATTRS_o_ai
vec_andc(vector unsigned int __a,vector unsigned int __b)1037 vec_andc(vector unsigned int __a, vector unsigned int __b)
1038 {
1039 return __a & ~__b;
1040 }
1041
1042 static vector unsigned int __ATTRS_o_ai
vec_andc(vector bool int __a,vector unsigned int __b)1043 vec_andc(vector bool int __a, vector unsigned int __b)
1044 {
1045 return (vector unsigned int)__a & ~__b;
1046 }
1047
1048 static vector unsigned int __ATTRS_o_ai
vec_andc(vector unsigned int __a,vector bool int __b)1049 vec_andc(vector unsigned int __a, vector bool int __b)
1050 {
1051 return __a & ~(vector unsigned int)__b;
1052 }
1053
1054 static vector bool int __ATTRS_o_ai
vec_andc(vector bool int __a,vector bool int __b)1055 vec_andc(vector bool int __a, vector bool int __b)
1056 {
1057 return __a & ~__b;
1058 }
1059
1060 static vector float __ATTRS_o_ai
vec_andc(vector float __a,vector float __b)1061 vec_andc(vector float __a, vector float __b)
1062 {
1063 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1064 return (vector float)__res;
1065 }
1066
1067 static vector float __ATTRS_o_ai
vec_andc(vector bool int __a,vector float __b)1068 vec_andc(vector bool int __a, vector float __b)
1069 {
1070 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1071 return (vector float)__res;
1072 }
1073
1074 static vector float __ATTRS_o_ai
vec_andc(vector float __a,vector bool int __b)1075 vec_andc(vector float __a, vector bool int __b)
1076 {
1077 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1078 return (vector float)__res;
1079 }
1080
1081 /* vec_vandc */
1082
1083 static vector signed char __ATTRS_o_ai
vec_vandc(vector signed char __a,vector signed char __b)1084 vec_vandc(vector signed char __a, vector signed char __b)
1085 {
1086 return __a & ~__b;
1087 }
1088
1089 static vector signed char __ATTRS_o_ai
vec_vandc(vector bool char __a,vector signed char __b)1090 vec_vandc(vector bool char __a, vector signed char __b)
1091 {
1092 return (vector signed char)__a & ~__b;
1093 }
1094
1095 static vector signed char __ATTRS_o_ai
vec_vandc(vector signed char __a,vector bool char __b)1096 vec_vandc(vector signed char __a, vector bool char __b)
1097 {
1098 return __a & ~(vector signed char)__b;
1099 }
1100
1101 static vector unsigned char __ATTRS_o_ai
vec_vandc(vector unsigned char __a,vector unsigned char __b)1102 vec_vandc(vector unsigned char __a, vector unsigned char __b)
1103 {
1104 return __a & ~__b;
1105 }
1106
1107 static vector unsigned char __ATTRS_o_ai
vec_vandc(vector bool char __a,vector unsigned char __b)1108 vec_vandc(vector bool char __a, vector unsigned char __b)
1109 {
1110 return (vector unsigned char)__a & ~__b;
1111 }
1112
1113 static vector unsigned char __ATTRS_o_ai
vec_vandc(vector unsigned char __a,vector bool char __b)1114 vec_vandc(vector unsigned char __a, vector bool char __b)
1115 {
1116 return __a & ~(vector unsigned char)__b;
1117 }
1118
1119 static vector bool char __ATTRS_o_ai
vec_vandc(vector bool char __a,vector bool char __b)1120 vec_vandc(vector bool char __a, vector bool char __b)
1121 {
1122 return __a & ~__b;
1123 }
1124
1125 static vector short __ATTRS_o_ai
vec_vandc(vector short __a,vector short __b)1126 vec_vandc(vector short __a, vector short __b)
1127 {
1128 return __a & ~__b;
1129 }
1130
1131 static vector short __ATTRS_o_ai
vec_vandc(vector bool short __a,vector short __b)1132 vec_vandc(vector bool short __a, vector short __b)
1133 {
1134 return (vector short)__a & ~__b;
1135 }
1136
1137 static vector short __ATTRS_o_ai
vec_vandc(vector short __a,vector bool short __b)1138 vec_vandc(vector short __a, vector bool short __b)
1139 {
1140 return __a & ~(vector short)__b;
1141 }
1142
1143 static vector unsigned short __ATTRS_o_ai
vec_vandc(vector unsigned short __a,vector unsigned short __b)1144 vec_vandc(vector unsigned short __a, vector unsigned short __b)
1145 {
1146 return __a & ~__b;
1147 }
1148
1149 static vector unsigned short __ATTRS_o_ai
vec_vandc(vector bool short __a,vector unsigned short __b)1150 vec_vandc(vector bool short __a, vector unsigned short __b)
1151 {
1152 return (vector unsigned short)__a & ~__b;
1153 }
1154
1155 static vector unsigned short __ATTRS_o_ai
vec_vandc(vector unsigned short __a,vector bool short __b)1156 vec_vandc(vector unsigned short __a, vector bool short __b)
1157 {
1158 return __a & ~(vector unsigned short)__b;
1159 }
1160
1161 static vector bool short __ATTRS_o_ai
vec_vandc(vector bool short __a,vector bool short __b)1162 vec_vandc(vector bool short __a, vector bool short __b)
1163 {
1164 return __a & ~__b;
1165 }
1166
1167 static vector int __ATTRS_o_ai
vec_vandc(vector int __a,vector int __b)1168 vec_vandc(vector int __a, vector int __b)
1169 {
1170 return __a & ~__b;
1171 }
1172
1173 static vector int __ATTRS_o_ai
vec_vandc(vector bool int __a,vector int __b)1174 vec_vandc(vector bool int __a, vector int __b)
1175 {
1176 return (vector int)__a & ~__b;
1177 }
1178
1179 static vector int __ATTRS_o_ai
vec_vandc(vector int __a,vector bool int __b)1180 vec_vandc(vector int __a, vector bool int __b)
1181 {
1182 return __a & ~(vector int)__b;
1183 }
1184
1185 static vector unsigned int __ATTRS_o_ai
vec_vandc(vector unsigned int __a,vector unsigned int __b)1186 vec_vandc(vector unsigned int __a, vector unsigned int __b)
1187 {
1188 return __a & ~__b;
1189 }
1190
1191 static vector unsigned int __ATTRS_o_ai
vec_vandc(vector bool int __a,vector unsigned int __b)1192 vec_vandc(vector bool int __a, vector unsigned int __b)
1193 {
1194 return (vector unsigned int)__a & ~__b;
1195 }
1196
1197 static vector unsigned int __ATTRS_o_ai
vec_vandc(vector unsigned int __a,vector bool int __b)1198 vec_vandc(vector unsigned int __a, vector bool int __b)
1199 {
1200 return __a & ~(vector unsigned int)__b;
1201 }
1202
1203 static vector bool int __ATTRS_o_ai
vec_vandc(vector bool int __a,vector bool int __b)1204 vec_vandc(vector bool int __a, vector bool int __b)
1205 {
1206 return __a & ~__b;
1207 }
1208
1209 static vector float __ATTRS_o_ai
vec_vandc(vector float __a,vector float __b)1210 vec_vandc(vector float __a, vector float __b)
1211 {
1212 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1213 return (vector float)__res;
1214 }
1215
1216 static vector float __ATTRS_o_ai
vec_vandc(vector bool int __a,vector float __b)1217 vec_vandc(vector bool int __a, vector float __b)
1218 {
1219 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1220 return (vector float)__res;
1221 }
1222
1223 static vector float __ATTRS_o_ai
vec_vandc(vector float __a,vector bool int __b)1224 vec_vandc(vector float __a, vector bool int __b)
1225 {
1226 vector unsigned int __res = (vector unsigned int)__a & ~(vector unsigned int)__b;
1227 return (vector float)__res;
1228 }
1229
1230 /* vec_avg */
1231
1232 static vector signed char __ATTRS_o_ai
vec_avg(vector signed char __a,vector signed char __b)1233 vec_avg(vector signed char __a, vector signed char __b)
1234 {
1235 return __builtin_altivec_vavgsb(__a, __b);
1236 }
1237
1238 static vector unsigned char __ATTRS_o_ai
vec_avg(vector unsigned char __a,vector unsigned char __b)1239 vec_avg(vector unsigned char __a, vector unsigned char __b)
1240 {
1241 return __builtin_altivec_vavgub(__a, __b);
1242 }
1243
1244 static vector short __ATTRS_o_ai
vec_avg(vector short __a,vector short __b)1245 vec_avg(vector short __a, vector short __b)
1246 {
1247 return __builtin_altivec_vavgsh(__a, __b);
1248 }
1249
1250 static vector unsigned short __ATTRS_o_ai
vec_avg(vector unsigned short __a,vector unsigned short __b)1251 vec_avg(vector unsigned short __a, vector unsigned short __b)
1252 {
1253 return __builtin_altivec_vavguh(__a, __b);
1254 }
1255
1256 static vector int __ATTRS_o_ai
vec_avg(vector int __a,vector int __b)1257 vec_avg(vector int __a, vector int __b)
1258 {
1259 return __builtin_altivec_vavgsw(__a, __b);
1260 }
1261
1262 static vector unsigned int __ATTRS_o_ai
vec_avg(vector unsigned int __a,vector unsigned int __b)1263 vec_avg(vector unsigned int __a, vector unsigned int __b)
1264 {
1265 return __builtin_altivec_vavguw(__a, __b);
1266 }
1267
1268 /* vec_vavgsb */
1269
1270 static vector signed char __attribute__((__always_inline__))
vec_vavgsb(vector signed char __a,vector signed char __b)1271 vec_vavgsb(vector signed char __a, vector signed char __b)
1272 {
1273 return __builtin_altivec_vavgsb(__a, __b);
1274 }
1275
1276 /* vec_vavgub */
1277
1278 static vector unsigned char __attribute__((__always_inline__))
vec_vavgub(vector unsigned char __a,vector unsigned char __b)1279 vec_vavgub(vector unsigned char __a, vector unsigned char __b)
1280 {
1281 return __builtin_altivec_vavgub(__a, __b);
1282 }
1283
1284 /* vec_vavgsh */
1285
1286 static vector short __attribute__((__always_inline__))
vec_vavgsh(vector short __a,vector short __b)1287 vec_vavgsh(vector short __a, vector short __b)
1288 {
1289 return __builtin_altivec_vavgsh(__a, __b);
1290 }
1291
1292 /* vec_vavguh */
1293
1294 static vector unsigned short __attribute__((__always_inline__))
vec_vavguh(vector unsigned short __a,vector unsigned short __b)1295 vec_vavguh(vector unsigned short __a, vector unsigned short __b)
1296 {
1297 return __builtin_altivec_vavguh(__a, __b);
1298 }
1299
1300 /* vec_vavgsw */
1301
1302 static vector int __attribute__((__always_inline__))
vec_vavgsw(vector int __a,vector int __b)1303 vec_vavgsw(vector int __a, vector int __b)
1304 {
1305 return __builtin_altivec_vavgsw(__a, __b);
1306 }
1307
1308 /* vec_vavguw */
1309
1310 static vector unsigned int __attribute__((__always_inline__))
vec_vavguw(vector unsigned int __a,vector unsigned int __b)1311 vec_vavguw(vector unsigned int __a, vector unsigned int __b)
1312 {
1313 return __builtin_altivec_vavguw(__a, __b);
1314 }
1315
1316 /* vec_ceil */
1317
1318 static vector float __attribute__((__always_inline__))
vec_ceil(vector float __a)1319 vec_ceil(vector float __a)
1320 {
1321 return __builtin_altivec_vrfip(__a);
1322 }
1323
1324 /* vec_vrfip */
1325
1326 static vector float __attribute__((__always_inline__))
vec_vrfip(vector float __a)1327 vec_vrfip(vector float __a)
1328 {
1329 return __builtin_altivec_vrfip(__a);
1330 }
1331
1332 /* vec_cmpb */
1333
1334 static vector int __attribute__((__always_inline__))
vec_cmpb(vector float __a,vector float __b)1335 vec_cmpb(vector float __a, vector float __b)
1336 {
1337 return __builtin_altivec_vcmpbfp(__a, __b);
1338 }
1339
1340 /* vec_vcmpbfp */
1341
1342 static vector int __attribute__((__always_inline__))
vec_vcmpbfp(vector float __a,vector float __b)1343 vec_vcmpbfp(vector float __a, vector float __b)
1344 {
1345 return __builtin_altivec_vcmpbfp(__a, __b);
1346 }
1347
1348 /* vec_cmpeq */
1349
1350 static vector bool char __ATTRS_o_ai
vec_cmpeq(vector signed char __a,vector signed char __b)1351 vec_cmpeq(vector signed char __a, vector signed char __b)
1352 {
1353 return (vector bool char)
1354 __builtin_altivec_vcmpequb((vector char)__a, (vector char)__b);
1355 }
1356
1357 static vector bool char __ATTRS_o_ai
vec_cmpeq(vector unsigned char __a,vector unsigned char __b)1358 vec_cmpeq(vector unsigned char __a, vector unsigned char __b)
1359 {
1360 return (vector bool char)
1361 __builtin_altivec_vcmpequb((vector char)__a, (vector char)__b);
1362 }
1363
1364 static vector bool short __ATTRS_o_ai
vec_cmpeq(vector short __a,vector short __b)1365 vec_cmpeq(vector short __a, vector short __b)
1366 {
1367 return (vector bool short)__builtin_altivec_vcmpequh(__a, __b);
1368 }
1369
1370 static vector bool short __ATTRS_o_ai
vec_cmpeq(vector unsigned short __a,vector unsigned short __b)1371 vec_cmpeq(vector unsigned short __a, vector unsigned short __b)
1372 {
1373 return (vector bool short)
1374 __builtin_altivec_vcmpequh((vector short)__a, (vector short)__b);
1375 }
1376
1377 static vector bool int __ATTRS_o_ai
vec_cmpeq(vector int __a,vector int __b)1378 vec_cmpeq(vector int __a, vector int __b)
1379 {
1380 return (vector bool int)__builtin_altivec_vcmpequw(__a, __b);
1381 }
1382
1383 static vector bool int __ATTRS_o_ai
vec_cmpeq(vector unsigned int __a,vector unsigned int __b)1384 vec_cmpeq(vector unsigned int __a, vector unsigned int __b)
1385 {
1386 return (vector bool int)
1387 __builtin_altivec_vcmpequw((vector int)__a, (vector int)__b);
1388 }
1389
1390 #ifdef __POWER8_VECTOR__
1391 static vector bool long long __ATTRS_o_ai
vec_cmpeq(vector signed long long __a,vector signed long long __b)1392 vec_cmpeq(vector signed long long __a, vector signed long long __b)
1393 {
1394 return (vector bool long long) __builtin_altivec_vcmpequd(__a, __b);
1395 }
1396
1397 static vector bool long long __ATTRS_o_ai
vec_cmpeq(vector unsigned long long __a,vector unsigned long long __b)1398 vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b)
1399 {
1400 return (vector bool long long)
1401 __builtin_altivec_vcmpequd((vector long long)__a, (vector long long) __b);
1402 }
1403 #endif
1404
1405 static vector bool int __ATTRS_o_ai
vec_cmpeq(vector float __a,vector float __b)1406 vec_cmpeq(vector float __a, vector float __b)
1407 {
1408 return (vector bool int)__builtin_altivec_vcmpeqfp(__a, __b);
1409 }
1410
1411 /* vec_cmpge */
1412
1413 static vector bool int __attribute__((__always_inline__))
vec_cmpge(vector float __a,vector float __b)1414 vec_cmpge(vector float __a, vector float __b)
1415 {
1416 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1417 }
1418
1419 /* vec_vcmpgefp */
1420
1421 static vector bool int __attribute__((__always_inline__))
vec_vcmpgefp(vector float __a,vector float __b)1422 vec_vcmpgefp(vector float __a, vector float __b)
1423 {
1424 return (vector bool int)__builtin_altivec_vcmpgefp(__a, __b);
1425 }
1426
1427 /* vec_cmpgt */
1428
1429 static vector bool char __ATTRS_o_ai
vec_cmpgt(vector signed char __a,vector signed char __b)1430 vec_cmpgt(vector signed char __a, vector signed char __b)
1431 {
1432 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1433 }
1434
1435 static vector bool char __ATTRS_o_ai
vec_cmpgt(vector unsigned char __a,vector unsigned char __b)1436 vec_cmpgt(vector unsigned char __a, vector unsigned char __b)
1437 {
1438 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1439 }
1440
1441 static vector bool short __ATTRS_o_ai
vec_cmpgt(vector short __a,vector short __b)1442 vec_cmpgt(vector short __a, vector short __b)
1443 {
1444 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1445 }
1446
1447 static vector bool short __ATTRS_o_ai
vec_cmpgt(vector unsigned short __a,vector unsigned short __b)1448 vec_cmpgt(vector unsigned short __a, vector unsigned short __b)
1449 {
1450 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1451 }
1452
1453 static vector bool int __ATTRS_o_ai
vec_cmpgt(vector int __a,vector int __b)1454 vec_cmpgt(vector int __a, vector int __b)
1455 {
1456 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1457 }
1458
1459 static vector bool int __ATTRS_o_ai
vec_cmpgt(vector unsigned int __a,vector unsigned int __b)1460 vec_cmpgt(vector unsigned int __a, vector unsigned int __b)
1461 {
1462 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1463 }
1464
1465 #ifdef __POWER8_VECTOR__
1466 static vector bool long long __ATTRS_o_ai
vec_cmpgt(vector signed long long __a,vector signed long long __b)1467 vec_cmpgt(vector signed long long __a, vector signed long long __b)
1468 {
1469 return (vector bool long long)__builtin_altivec_vcmpgtsd(__a, __b);
1470 }
1471
1472 static vector bool long long __ATTRS_o_ai
vec_cmpgt(vector unsigned long long __a,vector unsigned long long __b)1473 vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b)
1474 {
1475 return (vector bool long long)__builtin_altivec_vcmpgtud(__a, __b);
1476 }
1477 #endif
1478
1479 static vector bool int __ATTRS_o_ai
vec_cmpgt(vector float __a,vector float __b)1480 vec_cmpgt(vector float __a, vector float __b)
1481 {
1482 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1483 }
1484
1485 /* vec_vcmpgtsb */
1486
1487 static vector bool char __attribute__((__always_inline__))
vec_vcmpgtsb(vector signed char __a,vector signed char __b)1488 vec_vcmpgtsb(vector signed char __a, vector signed char __b)
1489 {
1490 return (vector bool char)__builtin_altivec_vcmpgtsb(__a, __b);
1491 }
1492
1493 /* vec_vcmpgtub */
1494
1495 static vector bool char __attribute__((__always_inline__))
vec_vcmpgtub(vector unsigned char __a,vector unsigned char __b)1496 vec_vcmpgtub(vector unsigned char __a, vector unsigned char __b)
1497 {
1498 return (vector bool char)__builtin_altivec_vcmpgtub(__a, __b);
1499 }
1500
1501 /* vec_vcmpgtsh */
1502
1503 static vector bool short __attribute__((__always_inline__))
vec_vcmpgtsh(vector short __a,vector short __b)1504 vec_vcmpgtsh(vector short __a, vector short __b)
1505 {
1506 return (vector bool short)__builtin_altivec_vcmpgtsh(__a, __b);
1507 }
1508
1509 /* vec_vcmpgtuh */
1510
1511 static vector bool short __attribute__((__always_inline__))
vec_vcmpgtuh(vector unsigned short __a,vector unsigned short __b)1512 vec_vcmpgtuh(vector unsigned short __a, vector unsigned short __b)
1513 {
1514 return (vector bool short)__builtin_altivec_vcmpgtuh(__a, __b);
1515 }
1516
1517 /* vec_vcmpgtsw */
1518
1519 static vector bool int __attribute__((__always_inline__))
vec_vcmpgtsw(vector int __a,vector int __b)1520 vec_vcmpgtsw(vector int __a, vector int __b)
1521 {
1522 return (vector bool int)__builtin_altivec_vcmpgtsw(__a, __b);
1523 }
1524
1525 /* vec_vcmpgtuw */
1526
1527 static vector bool int __attribute__((__always_inline__))
vec_vcmpgtuw(vector unsigned int __a,vector unsigned int __b)1528 vec_vcmpgtuw(vector unsigned int __a, vector unsigned int __b)
1529 {
1530 return (vector bool int)__builtin_altivec_vcmpgtuw(__a, __b);
1531 }
1532
1533 /* vec_vcmpgtfp */
1534
1535 static vector bool int __attribute__((__always_inline__))
vec_vcmpgtfp(vector float __a,vector float __b)1536 vec_vcmpgtfp(vector float __a, vector float __b)
1537 {
1538 return (vector bool int)__builtin_altivec_vcmpgtfp(__a, __b);
1539 }
1540
1541 /* vec_cmple */
1542
1543 static vector bool int __attribute__((__always_inline__))
vec_cmple(vector float __a,vector float __b)1544 vec_cmple(vector float __a, vector float __b)
1545 {
1546 return (vector bool int)__builtin_altivec_vcmpgefp(__b, __a);
1547 }
1548
1549 /* vec_cmplt */
1550
1551 static vector bool char __ATTRS_o_ai
vec_cmplt(vector signed char __a,vector signed char __b)1552 vec_cmplt(vector signed char __a, vector signed char __b)
1553 {
1554 return (vector bool char)__builtin_altivec_vcmpgtsb(__b, __a);
1555 }
1556
1557 static vector bool char __ATTRS_o_ai
vec_cmplt(vector unsigned char __a,vector unsigned char __b)1558 vec_cmplt(vector unsigned char __a, vector unsigned char __b)
1559 {
1560 return (vector bool char)__builtin_altivec_vcmpgtub(__b, __a);
1561 }
1562
1563 static vector bool short __ATTRS_o_ai
vec_cmplt(vector short __a,vector short __b)1564 vec_cmplt(vector short __a, vector short __b)
1565 {
1566 return (vector bool short)__builtin_altivec_vcmpgtsh(__b, __a);
1567 }
1568
1569 static vector bool short __ATTRS_o_ai
vec_cmplt(vector unsigned short __a,vector unsigned short __b)1570 vec_cmplt(vector unsigned short __a, vector unsigned short __b)
1571 {
1572 return (vector bool short)__builtin_altivec_vcmpgtuh(__b, __a);
1573 }
1574
1575 static vector bool int __ATTRS_o_ai
vec_cmplt(vector int __a,vector int __b)1576 vec_cmplt(vector int __a, vector int __b)
1577 {
1578 return (vector bool int)__builtin_altivec_vcmpgtsw(__b, __a);
1579 }
1580
1581 static vector bool int __ATTRS_o_ai
vec_cmplt(vector unsigned int __a,vector unsigned int __b)1582 vec_cmplt(vector unsigned int __a, vector unsigned int __b)
1583 {
1584 return (vector bool int)__builtin_altivec_vcmpgtuw(__b, __a);
1585 }
1586
1587 static vector bool int __ATTRS_o_ai
vec_cmplt(vector float __a,vector float __b)1588 vec_cmplt(vector float __a, vector float __b)
1589 {
1590 return (vector bool int)__builtin_altivec_vcmpgtfp(__b, __a);
1591 }
1592
1593 /* vec_ctf */
1594
1595 static vector float __ATTRS_o_ai
vec_ctf(vector int __a,int __b)1596 vec_ctf(vector int __a, int __b)
1597 {
1598 return __builtin_altivec_vcfsx(__a, __b);
1599 }
1600
1601 static vector float __ATTRS_o_ai
vec_ctf(vector unsigned int __a,int __b)1602 vec_ctf(vector unsigned int __a, int __b)
1603 {
1604 return __builtin_altivec_vcfux((vector int)__a, __b);
1605 }
1606
1607 /* vec_vcfsx */
1608
1609 static vector float __attribute__((__always_inline__))
vec_vcfsx(vector int __a,int __b)1610 vec_vcfsx(vector int __a, int __b)
1611 {
1612 return __builtin_altivec_vcfsx(__a, __b);
1613 }
1614
1615 /* vec_vcfux */
1616
1617 static vector float __attribute__((__always_inline__))
vec_vcfux(vector unsigned int __a,int __b)1618 vec_vcfux(vector unsigned int __a, int __b)
1619 {
1620 return __builtin_altivec_vcfux((vector int)__a, __b);
1621 }
1622
1623 /* vec_cts */
1624
1625 static vector int __attribute__((__always_inline__))
vec_cts(vector float __a,int __b)1626 vec_cts(vector float __a, int __b)
1627 {
1628 return __builtin_altivec_vctsxs(__a, __b);
1629 }
1630
1631 /* vec_vctsxs */
1632
1633 static vector int __attribute__((__always_inline__))
vec_vctsxs(vector float __a,int __b)1634 vec_vctsxs(vector float __a, int __b)
1635 {
1636 return __builtin_altivec_vctsxs(__a, __b);
1637 }
1638
1639 /* vec_ctu */
1640
1641 static vector unsigned int __attribute__((__always_inline__))
vec_ctu(vector float __a,int __b)1642 vec_ctu(vector float __a, int __b)
1643 {
1644 return __builtin_altivec_vctuxs(__a, __b);
1645 }
1646
1647 /* vec_vctuxs */
1648
1649 static vector unsigned int __attribute__((__always_inline__))
vec_vctuxs(vector float __a,int __b)1650 vec_vctuxs(vector float __a, int __b)
1651 {
1652 return __builtin_altivec_vctuxs(__a, __b);
1653 }
1654
1655 /* vec_div */
1656 #ifdef __VSX__
1657 static vector float __ATTRS_o_ai
vec_div(vector float __a,vector float __b)1658 vec_div(vector float __a, vector float __b)
1659 {
1660 return __builtin_vsx_xvdivsp(__a, __b);
1661 }
1662
1663 static vector double __ATTRS_o_ai
vec_div(vector double __a,vector double __b)1664 vec_div(vector double __a, vector double __b)
1665 {
1666 return __builtin_vsx_xvdivdp(__a, __b);
1667 }
1668 #endif
1669
1670 /* vec_dss */
1671
1672 static void __attribute__((__always_inline__))
vec_dss(int __a)1673 vec_dss(int __a)
1674 {
1675 __builtin_altivec_dss(__a);
1676 }
1677
1678 /* vec_dssall */
1679
1680 static void __attribute__((__always_inline__))
vec_dssall(void)1681 vec_dssall(void)
1682 {
1683 __builtin_altivec_dssall();
1684 }
1685
1686 /* vec_dst */
1687
1688 static void __attribute__((__always_inline__))
vec_dst(const void * __a,int __b,int __c)1689 vec_dst(const void *__a, int __b, int __c)
1690 {
1691 __builtin_altivec_dst(__a, __b, __c);
1692 }
1693
1694 /* vec_dstst */
1695
1696 static void __attribute__((__always_inline__))
vec_dstst(const void * __a,int __b,int __c)1697 vec_dstst(const void *__a, int __b, int __c)
1698 {
1699 __builtin_altivec_dstst(__a, __b, __c);
1700 }
1701
1702 /* vec_dststt */
1703
1704 static void __attribute__((__always_inline__))
vec_dststt(const void * __a,int __b,int __c)1705 vec_dststt(const void *__a, int __b, int __c)
1706 {
1707 __builtin_altivec_dststt(__a, __b, __c);
1708 }
1709
1710 /* vec_dstt */
1711
1712 static void __attribute__((__always_inline__))
vec_dstt(const void * __a,int __b,int __c)1713 vec_dstt(const void *__a, int __b, int __c)
1714 {
1715 __builtin_altivec_dstt(__a, __b, __c);
1716 }
1717
1718 /* vec_expte */
1719
1720 static vector float __attribute__((__always_inline__))
vec_expte(vector float __a)1721 vec_expte(vector float __a)
1722 {
1723 return __builtin_altivec_vexptefp(__a);
1724 }
1725
1726 /* vec_vexptefp */
1727
1728 static vector float __attribute__((__always_inline__))
vec_vexptefp(vector float __a)1729 vec_vexptefp(vector float __a)
1730 {
1731 return __builtin_altivec_vexptefp(__a);
1732 }
1733
1734 /* vec_floor */
1735
1736 static vector float __attribute__((__always_inline__))
vec_floor(vector float __a)1737 vec_floor(vector float __a)
1738 {
1739 return __builtin_altivec_vrfim(__a);
1740 }
1741
1742 /* vec_vrfim */
1743
1744 static vector float __attribute__((__always_inline__))
vec_vrfim(vector float __a)1745 vec_vrfim(vector float __a)
1746 {
1747 return __builtin_altivec_vrfim(__a);
1748 }
1749
1750 /* vec_ld */
1751
1752 static vector signed char __ATTRS_o_ai
vec_ld(int __a,const vector signed char * __b)1753 vec_ld(int __a, const vector signed char *__b)
1754 {
1755 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1756 }
1757
1758 static vector signed char __ATTRS_o_ai
vec_ld(int __a,const signed char * __b)1759 vec_ld(int __a, const signed char *__b)
1760 {
1761 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1762 }
1763
1764 static vector unsigned char __ATTRS_o_ai
vec_ld(int __a,const vector unsigned char * __b)1765 vec_ld(int __a, const vector unsigned char *__b)
1766 {
1767 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1768 }
1769
1770 static vector unsigned char __ATTRS_o_ai
vec_ld(int __a,const unsigned char * __b)1771 vec_ld(int __a, const unsigned char *__b)
1772 {
1773 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1774 }
1775
1776 static vector bool char __ATTRS_o_ai
vec_ld(int __a,const vector bool char * __b)1777 vec_ld(int __a, const vector bool char *__b)
1778 {
1779 return (vector bool char)__builtin_altivec_lvx(__a, __b);
1780 }
1781
1782 static vector short __ATTRS_o_ai
vec_ld(int __a,const vector short * __b)1783 vec_ld(int __a, const vector short *__b)
1784 {
1785 return (vector short)__builtin_altivec_lvx(__a, __b);
1786 }
1787
1788 static vector short __ATTRS_o_ai
vec_ld(int __a,const short * __b)1789 vec_ld(int __a, const short *__b)
1790 {
1791 return (vector short)__builtin_altivec_lvx(__a, __b);
1792 }
1793
1794 static vector unsigned short __ATTRS_o_ai
vec_ld(int __a,const vector unsigned short * __b)1795 vec_ld(int __a, const vector unsigned short *__b)
1796 {
1797 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1798 }
1799
1800 static vector unsigned short __ATTRS_o_ai
vec_ld(int __a,const unsigned short * __b)1801 vec_ld(int __a, const unsigned short *__b)
1802 {
1803 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1804 }
1805
1806 static vector bool short __ATTRS_o_ai
vec_ld(int __a,const vector bool short * __b)1807 vec_ld(int __a, const vector bool short *__b)
1808 {
1809 return (vector bool short)__builtin_altivec_lvx(__a, __b);
1810 }
1811
1812 static vector pixel __ATTRS_o_ai
vec_ld(int __a,const vector pixel * __b)1813 vec_ld(int __a, const vector pixel *__b)
1814 {
1815 return (vector pixel)__builtin_altivec_lvx(__a, __b);
1816 }
1817
1818 static vector int __ATTRS_o_ai
vec_ld(int __a,const vector int * __b)1819 vec_ld(int __a, const vector int *__b)
1820 {
1821 return (vector int)__builtin_altivec_lvx(__a, __b);
1822 }
1823
1824 static vector int __ATTRS_o_ai
vec_ld(int __a,const int * __b)1825 vec_ld(int __a, const int *__b)
1826 {
1827 return (vector int)__builtin_altivec_lvx(__a, __b);
1828 }
1829
1830 static vector unsigned int __ATTRS_o_ai
vec_ld(int __a,const vector unsigned int * __b)1831 vec_ld(int __a, const vector unsigned int *__b)
1832 {
1833 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1834 }
1835
1836 static vector unsigned int __ATTRS_o_ai
vec_ld(int __a,const unsigned int * __b)1837 vec_ld(int __a, const unsigned int *__b)
1838 {
1839 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1840 }
1841
1842 static vector bool int __ATTRS_o_ai
vec_ld(int __a,const vector bool int * __b)1843 vec_ld(int __a, const vector bool int *__b)
1844 {
1845 return (vector bool int)__builtin_altivec_lvx(__a, __b);
1846 }
1847
1848 static vector float __ATTRS_o_ai
vec_ld(int __a,const vector float * __b)1849 vec_ld(int __a, const vector float *__b)
1850 {
1851 return (vector float)__builtin_altivec_lvx(__a, __b);
1852 }
1853
1854 static vector float __ATTRS_o_ai
vec_ld(int __a,const float * __b)1855 vec_ld(int __a, const float *__b)
1856 {
1857 return (vector float)__builtin_altivec_lvx(__a, __b);
1858 }
1859
1860 /* vec_lvx */
1861
1862 static vector signed char __ATTRS_o_ai
vec_lvx(int __a,const vector signed char * __b)1863 vec_lvx(int __a, const vector signed char *__b)
1864 {
1865 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1866 }
1867
1868 static vector signed char __ATTRS_o_ai
vec_lvx(int __a,const signed char * __b)1869 vec_lvx(int __a, const signed char *__b)
1870 {
1871 return (vector signed char)__builtin_altivec_lvx(__a, __b);
1872 }
1873
1874 static vector unsigned char __ATTRS_o_ai
vec_lvx(int __a,const vector unsigned char * __b)1875 vec_lvx(int __a, const vector unsigned char *__b)
1876 {
1877 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1878 }
1879
1880 static vector unsigned char __ATTRS_o_ai
vec_lvx(int __a,const unsigned char * __b)1881 vec_lvx(int __a, const unsigned char *__b)
1882 {
1883 return (vector unsigned char)__builtin_altivec_lvx(__a, __b);
1884 }
1885
1886 static vector bool char __ATTRS_o_ai
vec_lvx(int __a,const vector bool char * __b)1887 vec_lvx(int __a, const vector bool char *__b)
1888 {
1889 return (vector bool char)__builtin_altivec_lvx(__a, __b);
1890 }
1891
1892 static vector short __ATTRS_o_ai
vec_lvx(int __a,const vector short * __b)1893 vec_lvx(int __a, const vector short *__b)
1894 {
1895 return (vector short)__builtin_altivec_lvx(__a, __b);
1896 }
1897
1898 static vector short __ATTRS_o_ai
vec_lvx(int __a,const short * __b)1899 vec_lvx(int __a, const short *__b)
1900 {
1901 return (vector short)__builtin_altivec_lvx(__a, __b);
1902 }
1903
1904 static vector unsigned short __ATTRS_o_ai
vec_lvx(int __a,const vector unsigned short * __b)1905 vec_lvx(int __a, const vector unsigned short *__b)
1906 {
1907 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1908 }
1909
1910 static vector unsigned short __ATTRS_o_ai
vec_lvx(int __a,const unsigned short * __b)1911 vec_lvx(int __a, const unsigned short *__b)
1912 {
1913 return (vector unsigned short)__builtin_altivec_lvx(__a, __b);
1914 }
1915
1916 static vector bool short __ATTRS_o_ai
vec_lvx(int __a,const vector bool short * __b)1917 vec_lvx(int __a, const vector bool short *__b)
1918 {
1919 return (vector bool short)__builtin_altivec_lvx(__a, __b);
1920 }
1921
1922 static vector pixel __ATTRS_o_ai
vec_lvx(int __a,const vector pixel * __b)1923 vec_lvx(int __a, const vector pixel *__b)
1924 {
1925 return (vector pixel)__builtin_altivec_lvx(__a, __b);
1926 }
1927
1928 static vector int __ATTRS_o_ai
vec_lvx(int __a,const vector int * __b)1929 vec_lvx(int __a, const vector int *__b)
1930 {
1931 return (vector int)__builtin_altivec_lvx(__a, __b);
1932 }
1933
1934 static vector int __ATTRS_o_ai
vec_lvx(int __a,const int * __b)1935 vec_lvx(int __a, const int *__b)
1936 {
1937 return (vector int)__builtin_altivec_lvx(__a, __b);
1938 }
1939
1940 static vector unsigned int __ATTRS_o_ai
vec_lvx(int __a,const vector unsigned int * __b)1941 vec_lvx(int __a, const vector unsigned int *__b)
1942 {
1943 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1944 }
1945
1946 static vector unsigned int __ATTRS_o_ai
vec_lvx(int __a,const unsigned int * __b)1947 vec_lvx(int __a, const unsigned int *__b)
1948 {
1949 return (vector unsigned int)__builtin_altivec_lvx(__a, __b);
1950 }
1951
1952 static vector bool int __ATTRS_o_ai
vec_lvx(int __a,const vector bool int * __b)1953 vec_lvx(int __a, const vector bool int *__b)
1954 {
1955 return (vector bool int)__builtin_altivec_lvx(__a, __b);
1956 }
1957
1958 static vector float __ATTRS_o_ai
vec_lvx(int __a,const vector float * __b)1959 vec_lvx(int __a, const vector float *__b)
1960 {
1961 return (vector float)__builtin_altivec_lvx(__a, __b);
1962 }
1963
1964 static vector float __ATTRS_o_ai
vec_lvx(int __a,const float * __b)1965 vec_lvx(int __a, const float *__b)
1966 {
1967 return (vector float)__builtin_altivec_lvx(__a, __b);
1968 }
1969
1970 /* vec_lde */
1971
1972 static vector signed char __ATTRS_o_ai
vec_lde(int __a,const signed char * __b)1973 vec_lde(int __a, const signed char *__b)
1974 {
1975 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
1976 }
1977
1978 static vector unsigned char __ATTRS_o_ai
vec_lde(int __a,const unsigned char * __b)1979 vec_lde(int __a, const unsigned char *__b)
1980 {
1981 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
1982 }
1983
1984 static vector short __ATTRS_o_ai
vec_lde(int __a,const short * __b)1985 vec_lde(int __a, const short *__b)
1986 {
1987 return (vector short)__builtin_altivec_lvehx(__a, __b);
1988 }
1989
1990 static vector unsigned short __ATTRS_o_ai
vec_lde(int __a,const unsigned short * __b)1991 vec_lde(int __a, const unsigned short *__b)
1992 {
1993 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
1994 }
1995
1996 static vector int __ATTRS_o_ai
vec_lde(int __a,const int * __b)1997 vec_lde(int __a, const int *__b)
1998 {
1999 return (vector int)__builtin_altivec_lvewx(__a, __b);
2000 }
2001
2002 static vector unsigned int __ATTRS_o_ai
vec_lde(int __a,const unsigned int * __b)2003 vec_lde(int __a, const unsigned int *__b)
2004 {
2005 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2006 }
2007
2008 static vector float __ATTRS_o_ai
vec_lde(int __a,const float * __b)2009 vec_lde(int __a, const float *__b)
2010 {
2011 return (vector float)__builtin_altivec_lvewx(__a, __b);
2012 }
2013
2014 /* vec_lvebx */
2015
2016 static vector signed char __ATTRS_o_ai
vec_lvebx(int __a,const signed char * __b)2017 vec_lvebx(int __a, const signed char *__b)
2018 {
2019 return (vector signed char)__builtin_altivec_lvebx(__a, __b);
2020 }
2021
2022 static vector unsigned char __ATTRS_o_ai
vec_lvebx(int __a,const unsigned char * __b)2023 vec_lvebx(int __a, const unsigned char *__b)
2024 {
2025 return (vector unsigned char)__builtin_altivec_lvebx(__a, __b);
2026 }
2027
2028 /* vec_lvehx */
2029
2030 static vector short __ATTRS_o_ai
vec_lvehx(int __a,const short * __b)2031 vec_lvehx(int __a, const short *__b)
2032 {
2033 return (vector short)__builtin_altivec_lvehx(__a, __b);
2034 }
2035
2036 static vector unsigned short __ATTRS_o_ai
vec_lvehx(int __a,const unsigned short * __b)2037 vec_lvehx(int __a, const unsigned short *__b)
2038 {
2039 return (vector unsigned short)__builtin_altivec_lvehx(__a, __b);
2040 }
2041
2042 /* vec_lvewx */
2043
2044 static vector int __ATTRS_o_ai
vec_lvewx(int __a,const int * __b)2045 vec_lvewx(int __a, const int *__b)
2046 {
2047 return (vector int)__builtin_altivec_lvewx(__a, __b);
2048 }
2049
2050 static vector unsigned int __ATTRS_o_ai
vec_lvewx(int __a,const unsigned int * __b)2051 vec_lvewx(int __a, const unsigned int *__b)
2052 {
2053 return (vector unsigned int)__builtin_altivec_lvewx(__a, __b);
2054 }
2055
2056 static vector float __ATTRS_o_ai
vec_lvewx(int __a,const float * __b)2057 vec_lvewx(int __a, const float *__b)
2058 {
2059 return (vector float)__builtin_altivec_lvewx(__a, __b);
2060 }
2061
2062 /* vec_ldl */
2063
2064 static vector signed char __ATTRS_o_ai
vec_ldl(int __a,const vector signed char * __b)2065 vec_ldl(int __a, const vector signed char *__b)
2066 {
2067 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2068 }
2069
2070 static vector signed char __ATTRS_o_ai
vec_ldl(int __a,const signed char * __b)2071 vec_ldl(int __a, const signed char *__b)
2072 {
2073 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2074 }
2075
2076 static vector unsigned char __ATTRS_o_ai
vec_ldl(int __a,const vector unsigned char * __b)2077 vec_ldl(int __a, const vector unsigned char *__b)
2078 {
2079 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2080 }
2081
2082 static vector unsigned char __ATTRS_o_ai
vec_ldl(int __a,const unsigned char * __b)2083 vec_ldl(int __a, const unsigned char *__b)
2084 {
2085 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2086 }
2087
2088 static vector bool char __ATTRS_o_ai
vec_ldl(int __a,const vector bool char * __b)2089 vec_ldl(int __a, const vector bool char *__b)
2090 {
2091 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2092 }
2093
2094 static vector short __ATTRS_o_ai
vec_ldl(int __a,const vector short * __b)2095 vec_ldl(int __a, const vector short *__b)
2096 {
2097 return (vector short)__builtin_altivec_lvxl(__a, __b);
2098 }
2099
2100 static vector short __ATTRS_o_ai
vec_ldl(int __a,const short * __b)2101 vec_ldl(int __a, const short *__b)
2102 {
2103 return (vector short)__builtin_altivec_lvxl(__a, __b);
2104 }
2105
2106 static vector unsigned short __ATTRS_o_ai
vec_ldl(int __a,const vector unsigned short * __b)2107 vec_ldl(int __a, const vector unsigned short *__b)
2108 {
2109 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2110 }
2111
2112 static vector unsigned short __ATTRS_o_ai
vec_ldl(int __a,const unsigned short * __b)2113 vec_ldl(int __a, const unsigned short *__b)
2114 {
2115 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2116 }
2117
2118 static vector bool short __ATTRS_o_ai
vec_ldl(int __a,const vector bool short * __b)2119 vec_ldl(int __a, const vector bool short *__b)
2120 {
2121 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2122 }
2123
2124 static vector pixel __ATTRS_o_ai
vec_ldl(int __a,const vector pixel * __b)2125 vec_ldl(int __a, const vector pixel *__b)
2126 {
2127 return (vector pixel short)__builtin_altivec_lvxl(__a, __b);
2128 }
2129
2130 static vector int __ATTRS_o_ai
vec_ldl(int __a,const vector int * __b)2131 vec_ldl(int __a, const vector int *__b)
2132 {
2133 return (vector int)__builtin_altivec_lvxl(__a, __b);
2134 }
2135
2136 static vector int __ATTRS_o_ai
vec_ldl(int __a,const int * __b)2137 vec_ldl(int __a, const int *__b)
2138 {
2139 return (vector int)__builtin_altivec_lvxl(__a, __b);
2140 }
2141
2142 static vector unsigned int __ATTRS_o_ai
vec_ldl(int __a,const vector unsigned int * __b)2143 vec_ldl(int __a, const vector unsigned int *__b)
2144 {
2145 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2146 }
2147
2148 static vector unsigned int __ATTRS_o_ai
vec_ldl(int __a,const unsigned int * __b)2149 vec_ldl(int __a, const unsigned int *__b)
2150 {
2151 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2152 }
2153
2154 static vector bool int __ATTRS_o_ai
vec_ldl(int __a,const vector bool int * __b)2155 vec_ldl(int __a, const vector bool int *__b)
2156 {
2157 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2158 }
2159
2160 static vector float __ATTRS_o_ai
vec_ldl(int __a,const vector float * __b)2161 vec_ldl(int __a, const vector float *__b)
2162 {
2163 return (vector float)__builtin_altivec_lvxl(__a, __b);
2164 }
2165
2166 static vector float __ATTRS_o_ai
vec_ldl(int __a,const float * __b)2167 vec_ldl(int __a, const float *__b)
2168 {
2169 return (vector float)__builtin_altivec_lvxl(__a, __b);
2170 }
2171
2172 /* vec_lvxl */
2173
2174 static vector signed char __ATTRS_o_ai
vec_lvxl(int __a,const vector signed char * __b)2175 vec_lvxl(int __a, const vector signed char *__b)
2176 {
2177 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2178 }
2179
2180 static vector signed char __ATTRS_o_ai
vec_lvxl(int __a,const signed char * __b)2181 vec_lvxl(int __a, const signed char *__b)
2182 {
2183 return (vector signed char)__builtin_altivec_lvxl(__a, __b);
2184 }
2185
2186 static vector unsigned char __ATTRS_o_ai
vec_lvxl(int __a,const vector unsigned char * __b)2187 vec_lvxl(int __a, const vector unsigned char *__b)
2188 {
2189 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2190 }
2191
2192 static vector unsigned char __ATTRS_o_ai
vec_lvxl(int __a,const unsigned char * __b)2193 vec_lvxl(int __a, const unsigned char *__b)
2194 {
2195 return (vector unsigned char)__builtin_altivec_lvxl(__a, __b);
2196 }
2197
2198 static vector bool char __ATTRS_o_ai
vec_lvxl(int __a,const vector bool char * __b)2199 vec_lvxl(int __a, const vector bool char *__b)
2200 {
2201 return (vector bool char)__builtin_altivec_lvxl(__a, __b);
2202 }
2203
2204 static vector short __ATTRS_o_ai
vec_lvxl(int __a,const vector short * __b)2205 vec_lvxl(int __a, const vector short *__b)
2206 {
2207 return (vector short)__builtin_altivec_lvxl(__a, __b);
2208 }
2209
2210 static vector short __ATTRS_o_ai
vec_lvxl(int __a,const short * __b)2211 vec_lvxl(int __a, const short *__b)
2212 {
2213 return (vector short)__builtin_altivec_lvxl(__a, __b);
2214 }
2215
2216 static vector unsigned short __ATTRS_o_ai
vec_lvxl(int __a,const vector unsigned short * __b)2217 vec_lvxl(int __a, const vector unsigned short *__b)
2218 {
2219 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2220 }
2221
2222 static vector unsigned short __ATTRS_o_ai
vec_lvxl(int __a,const unsigned short * __b)2223 vec_lvxl(int __a, const unsigned short *__b)
2224 {
2225 return (vector unsigned short)__builtin_altivec_lvxl(__a, __b);
2226 }
2227
2228 static vector bool short __ATTRS_o_ai
vec_lvxl(int __a,const vector bool short * __b)2229 vec_lvxl(int __a, const vector bool short *__b)
2230 {
2231 return (vector bool short)__builtin_altivec_lvxl(__a, __b);
2232 }
2233
2234 static vector pixel __ATTRS_o_ai
vec_lvxl(int __a,const vector pixel * __b)2235 vec_lvxl(int __a, const vector pixel *__b)
2236 {
2237 return (vector pixel)__builtin_altivec_lvxl(__a, __b);
2238 }
2239
2240 static vector int __ATTRS_o_ai
vec_lvxl(int __a,const vector int * __b)2241 vec_lvxl(int __a, const vector int *__b)
2242 {
2243 return (vector int)__builtin_altivec_lvxl(__a, __b);
2244 }
2245
2246 static vector int __ATTRS_o_ai
vec_lvxl(int __a,const int * __b)2247 vec_lvxl(int __a, const int *__b)
2248 {
2249 return (vector int)__builtin_altivec_lvxl(__a, __b);
2250 }
2251
2252 static vector unsigned int __ATTRS_o_ai
vec_lvxl(int __a,const vector unsigned int * __b)2253 vec_lvxl(int __a, const vector unsigned int *__b)
2254 {
2255 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2256 }
2257
2258 static vector unsigned int __ATTRS_o_ai
vec_lvxl(int __a,const unsigned int * __b)2259 vec_lvxl(int __a, const unsigned int *__b)
2260 {
2261 return (vector unsigned int)__builtin_altivec_lvxl(__a, __b);
2262 }
2263
2264 static vector bool int __ATTRS_o_ai
vec_lvxl(int __a,const vector bool int * __b)2265 vec_lvxl(int __a, const vector bool int *__b)
2266 {
2267 return (vector bool int)__builtin_altivec_lvxl(__a, __b);
2268 }
2269
2270 static vector float __ATTRS_o_ai
vec_lvxl(int __a,const vector float * __b)2271 vec_lvxl(int __a, const vector float *__b)
2272 {
2273 return (vector float)__builtin_altivec_lvxl(__a, __b);
2274 }
2275
2276 static vector float __ATTRS_o_ai
vec_lvxl(int __a,const float * __b)2277 vec_lvxl(int __a, const float *__b)
2278 {
2279 return (vector float)__builtin_altivec_lvxl(__a, __b);
2280 }
2281
2282 /* vec_loge */
2283
2284 static vector float __attribute__((__always_inline__))
vec_loge(vector float __a)2285 vec_loge(vector float __a)
2286 {
2287 return __builtin_altivec_vlogefp(__a);
2288 }
2289
2290 /* vec_vlogefp */
2291
2292 static vector float __attribute__((__always_inline__))
vec_vlogefp(vector float __a)2293 vec_vlogefp(vector float __a)
2294 {
2295 return __builtin_altivec_vlogefp(__a);
2296 }
2297
2298 /* vec_lvsl */
2299
2300 #ifdef __LITTLE_ENDIAN__
2301 static vector unsigned char __ATTRS_o_ai
2302 __attribute__((__deprecated__("use assignment for unaligned little endian \
2303 loads/stores")))
vec_lvsl(int __a,const signed char * __b)2304 vec_lvsl(int __a, const signed char *__b)
2305 {
2306 vector unsigned char mask =
2307 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2308 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2309 return vec_perm(mask, mask, reverse);
2310 }
2311 #else
2312 static vector unsigned char __ATTRS_o_ai
vec_lvsl(int __a,const signed char * __b)2313 vec_lvsl(int __a, const signed char *__b)
2314 {
2315 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2316 }
2317 #endif
2318
2319 #ifdef __LITTLE_ENDIAN__
2320 static vector unsigned char __ATTRS_o_ai
2321 __attribute__((__deprecated__("use assignment for unaligned little endian \
2322 loads/stores")))
vec_lvsl(int __a,const unsigned char * __b)2323 vec_lvsl(int __a, const unsigned char *__b)
2324 {
2325 vector unsigned char mask =
2326 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2327 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2328 return vec_perm(mask, mask, reverse);
2329 }
2330 #else
2331 static vector unsigned char __ATTRS_o_ai
vec_lvsl(int __a,const unsigned char * __b)2332 vec_lvsl(int __a, const unsigned char *__b)
2333 {
2334 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2335 }
2336 #endif
2337
2338 #ifdef __LITTLE_ENDIAN__
2339 static vector unsigned char __ATTRS_o_ai
2340 __attribute__((__deprecated__("use assignment for unaligned little endian \
2341 loads/stores")))
vec_lvsl(int __a,const short * __b)2342 vec_lvsl(int __a, const short *__b)
2343 {
2344 vector unsigned char mask =
2345 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2346 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2347 return vec_perm(mask, mask, reverse);
2348 }
2349 #else
2350 static vector unsigned char __ATTRS_o_ai
vec_lvsl(int __a,const short * __b)2351 vec_lvsl(int __a, const short *__b)
2352 {
2353 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2354 }
2355 #endif
2356
2357 #ifdef __LITTLE_ENDIAN__
2358 static vector unsigned char __ATTRS_o_ai
2359 __attribute__((__deprecated__("use assignment for unaligned little endian \
2360 loads/stores")))
vec_lvsl(int __a,const unsigned short * __b)2361 vec_lvsl(int __a, const unsigned short *__b)
2362 {
2363 vector unsigned char mask =
2364 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2365 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2366 return vec_perm(mask, mask, reverse);
2367 }
2368 #else
2369 static vector unsigned char __ATTRS_o_ai
vec_lvsl(int __a,const unsigned short * __b)2370 vec_lvsl(int __a, const unsigned short *__b)
2371 {
2372 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2373 }
2374 #endif
2375
2376 #ifdef __LITTLE_ENDIAN__
2377 static vector unsigned char __ATTRS_o_ai
2378 __attribute__((__deprecated__("use assignment for unaligned little endian \
2379 loads/stores")))
vec_lvsl(int __a,const int * __b)2380 vec_lvsl(int __a, const int *__b)
2381 {
2382 vector unsigned char mask =
2383 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2384 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2385 return vec_perm(mask, mask, reverse);
2386 }
2387 #else
2388 static vector unsigned char __ATTRS_o_ai
vec_lvsl(int __a,const int * __b)2389 vec_lvsl(int __a, const int *__b)
2390 {
2391 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2392 }
2393 #endif
2394
2395 #ifdef __LITTLE_ENDIAN__
2396 static vector unsigned char __ATTRS_o_ai
2397 __attribute__((__deprecated__("use assignment for unaligned little endian \
2398 loads/stores")))
vec_lvsl(int __a,const unsigned int * __b)2399 vec_lvsl(int __a, const unsigned int *__b)
2400 {
2401 vector unsigned char mask =
2402 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2403 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2404 return vec_perm(mask, mask, reverse);
2405 }
2406 #else
2407 static vector unsigned char __ATTRS_o_ai
vec_lvsl(int __a,const unsigned int * __b)2408 vec_lvsl(int __a, const unsigned int *__b)
2409 {
2410 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2411 }
2412 #endif
2413
2414 #ifdef __LITTLE_ENDIAN__
2415 static vector unsigned char __ATTRS_o_ai
2416 __attribute__((__deprecated__("use assignment for unaligned little endian \
2417 loads/stores")))
vec_lvsl(int __a,const float * __b)2418 vec_lvsl(int __a, const float *__b)
2419 {
2420 vector unsigned char mask =
2421 (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2422 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2423 return vec_perm(mask, mask, reverse);
2424 }
2425 #else
2426 static vector unsigned char __ATTRS_o_ai
vec_lvsl(int __a,const float * __b)2427 vec_lvsl(int __a, const float *__b)
2428 {
2429 return (vector unsigned char)__builtin_altivec_lvsl(__a, __b);
2430 }
2431 #endif
2432
2433 /* vec_lvsr */
2434
2435 #ifdef __LITTLE_ENDIAN__
2436 static vector unsigned char __ATTRS_o_ai
2437 __attribute__((__deprecated__("use assignment for unaligned little endian \
2438 loads/stores")))
vec_lvsr(int __a,const signed char * __b)2439 vec_lvsr(int __a, const signed char *__b)
2440 {
2441 vector unsigned char mask =
2442 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2443 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2444 return vec_perm(mask, mask, reverse);
2445 }
2446 #else
2447 static vector unsigned char __ATTRS_o_ai
vec_lvsr(int __a,const signed char * __b)2448 vec_lvsr(int __a, const signed char *__b)
2449 {
2450 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2451 }
2452 #endif
2453
2454 #ifdef __LITTLE_ENDIAN__
2455 static vector unsigned char __ATTRS_o_ai
2456 __attribute__((__deprecated__("use assignment for unaligned little endian \
2457 loads/stores")))
vec_lvsr(int __a,const unsigned char * __b)2458 vec_lvsr(int __a, const unsigned char *__b)
2459 {
2460 vector unsigned char mask =
2461 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2462 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2463 return vec_perm(mask, mask, reverse);
2464 }
2465 #else
2466 static vector unsigned char __ATTRS_o_ai
vec_lvsr(int __a,const unsigned char * __b)2467 vec_lvsr(int __a, const unsigned char *__b)
2468 {
2469 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2470 }
2471 #endif
2472
2473 #ifdef __LITTLE_ENDIAN__
2474 static vector unsigned char __ATTRS_o_ai
2475 __attribute__((__deprecated__("use assignment for unaligned little endian \
2476 loads/stores")))
vec_lvsr(int __a,const short * __b)2477 vec_lvsr(int __a, const short *__b)
2478 {
2479 vector unsigned char mask =
2480 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2481 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2482 return vec_perm(mask, mask, reverse);
2483 }
2484 #else
2485 static vector unsigned char __ATTRS_o_ai
vec_lvsr(int __a,const short * __b)2486 vec_lvsr(int __a, const short *__b)
2487 {
2488 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2489 }
2490 #endif
2491
2492 #ifdef __LITTLE_ENDIAN__
2493 static vector unsigned char __ATTRS_o_ai
2494 __attribute__((__deprecated__("use assignment for unaligned little endian \
2495 loads/stores")))
vec_lvsr(int __a,const unsigned short * __b)2496 vec_lvsr(int __a, const unsigned short *__b)
2497 {
2498 vector unsigned char mask =
2499 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2500 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2501 return vec_perm(mask, mask, reverse);
2502 }
2503 #else
2504 static vector unsigned char __ATTRS_o_ai
vec_lvsr(int __a,const unsigned short * __b)2505 vec_lvsr(int __a, const unsigned short *__b)
2506 {
2507 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2508 }
2509 #endif
2510
2511 #ifdef __LITTLE_ENDIAN__
2512 static vector unsigned char __ATTRS_o_ai
2513 __attribute__((__deprecated__("use assignment for unaligned little endian \
2514 loads/stores")))
vec_lvsr(int __a,const int * __b)2515 vec_lvsr(int __a, const int *__b)
2516 {
2517 vector unsigned char mask =
2518 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2519 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2520 return vec_perm(mask, mask, reverse);
2521 }
2522 #else
2523 static vector unsigned char __ATTRS_o_ai
vec_lvsr(int __a,const int * __b)2524 vec_lvsr(int __a, const int *__b)
2525 {
2526 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2527 }
2528 #endif
2529
2530 #ifdef __LITTLE_ENDIAN__
2531 static vector unsigned char __ATTRS_o_ai
2532 __attribute__((__deprecated__("use assignment for unaligned little endian \
2533 loads/stores")))
vec_lvsr(int __a,const unsigned int * __b)2534 vec_lvsr(int __a, const unsigned int *__b)
2535 {
2536 vector unsigned char mask =
2537 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2538 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2539 return vec_perm(mask, mask, reverse);
2540 }
2541 #else
2542 static vector unsigned char __ATTRS_o_ai
vec_lvsr(int __a,const unsigned int * __b)2543 vec_lvsr(int __a, const unsigned int *__b)
2544 {
2545 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2546 }
2547 #endif
2548
2549 #ifdef __LITTLE_ENDIAN__
2550 static vector unsigned char __ATTRS_o_ai
2551 __attribute__((__deprecated__("use assignment for unaligned little endian \
2552 loads/stores")))
vec_lvsr(int __a,const float * __b)2553 vec_lvsr(int __a, const float *__b)
2554 {
2555 vector unsigned char mask =
2556 (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2557 vector unsigned char reverse = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
2558 return vec_perm(mask, mask, reverse);
2559 }
2560 #else
2561 static vector unsigned char __ATTRS_o_ai
vec_lvsr(int __a,const float * __b)2562 vec_lvsr(int __a, const float *__b)
2563 {
2564 return (vector unsigned char)__builtin_altivec_lvsr(__a, __b);
2565 }
2566 #endif
2567
2568 /* vec_madd */
2569
2570 static vector float __attribute__((__always_inline__))
vec_madd(vector float __a,vector float __b,vector float __c)2571 vec_madd(vector float __a, vector float __b, vector float __c)
2572 {
2573 return __builtin_altivec_vmaddfp(__a, __b, __c);
2574 }
2575
2576 /* vec_vmaddfp */
2577
2578 static vector float __attribute__((__always_inline__))
vec_vmaddfp(vector float __a,vector float __b,vector float __c)2579 vec_vmaddfp(vector float __a, vector float __b, vector float __c)
2580 {
2581 return __builtin_altivec_vmaddfp(__a, __b, __c);
2582 }
2583
2584 /* vec_madds */
2585
2586 static vector signed short __attribute__((__always_inline__))
vec_madds(vector signed short __a,vector signed short __b,vector signed short __c)2587 vec_madds(vector signed short __a, vector signed short __b, vector signed short __c)
2588 {
2589 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2590 }
2591
2592 /* vec_vmhaddshs */
2593 static vector signed short __attribute__((__always_inline__))
vec_vmhaddshs(vector signed short __a,vector signed short __b,vector signed short __c)2594 vec_vmhaddshs(vector signed short __a,
2595 vector signed short __b,
2596 vector signed short __c)
2597 {
2598 return __builtin_altivec_vmhaddshs(__a, __b, __c);
2599 }
2600
2601 /* vec_max */
2602
2603 static vector signed char __ATTRS_o_ai
vec_max(vector signed char __a,vector signed char __b)2604 vec_max(vector signed char __a, vector signed char __b)
2605 {
2606 return __builtin_altivec_vmaxsb(__a, __b);
2607 }
2608
2609 static vector signed char __ATTRS_o_ai
vec_max(vector bool char __a,vector signed char __b)2610 vec_max(vector bool char __a, vector signed char __b)
2611 {
2612 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2613 }
2614
2615 static vector signed char __ATTRS_o_ai
vec_max(vector signed char __a,vector bool char __b)2616 vec_max(vector signed char __a, vector bool char __b)
2617 {
2618 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2619 }
2620
2621 static vector unsigned char __ATTRS_o_ai
vec_max(vector unsigned char __a,vector unsigned char __b)2622 vec_max(vector unsigned char __a, vector unsigned char __b)
2623 {
2624 return __builtin_altivec_vmaxub(__a, __b);
2625 }
2626
2627 static vector unsigned char __ATTRS_o_ai
vec_max(vector bool char __a,vector unsigned char __b)2628 vec_max(vector bool char __a, vector unsigned char __b)
2629 {
2630 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2631 }
2632
2633 static vector unsigned char __ATTRS_o_ai
vec_max(vector unsigned char __a,vector bool char __b)2634 vec_max(vector unsigned char __a, vector bool char __b)
2635 {
2636 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2637 }
2638
2639 static vector short __ATTRS_o_ai
vec_max(vector short __a,vector short __b)2640 vec_max(vector short __a, vector short __b)
2641 {
2642 return __builtin_altivec_vmaxsh(__a, __b);
2643 }
2644
2645 static vector short __ATTRS_o_ai
vec_max(vector bool short __a,vector short __b)2646 vec_max(vector bool short __a, vector short __b)
2647 {
2648 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2649 }
2650
2651 static vector short __ATTRS_o_ai
vec_max(vector short __a,vector bool short __b)2652 vec_max(vector short __a, vector bool short __b)
2653 {
2654 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2655 }
2656
2657 static vector unsigned short __ATTRS_o_ai
vec_max(vector unsigned short __a,vector unsigned short __b)2658 vec_max(vector unsigned short __a, vector unsigned short __b)
2659 {
2660 return __builtin_altivec_vmaxuh(__a, __b);
2661 }
2662
2663 static vector unsigned short __ATTRS_o_ai
vec_max(vector bool short __a,vector unsigned short __b)2664 vec_max(vector bool short __a, vector unsigned short __b)
2665 {
2666 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2667 }
2668
2669 static vector unsigned short __ATTRS_o_ai
vec_max(vector unsigned short __a,vector bool short __b)2670 vec_max(vector unsigned short __a, vector bool short __b)
2671 {
2672 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2673 }
2674
2675 static vector int __ATTRS_o_ai
vec_max(vector int __a,vector int __b)2676 vec_max(vector int __a, vector int __b)
2677 {
2678 return __builtin_altivec_vmaxsw(__a, __b);
2679 }
2680
2681 static vector int __ATTRS_o_ai
vec_max(vector bool int __a,vector int __b)2682 vec_max(vector bool int __a, vector int __b)
2683 {
2684 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2685 }
2686
2687 static vector int __ATTRS_o_ai
vec_max(vector int __a,vector bool int __b)2688 vec_max(vector int __a, vector bool int __b)
2689 {
2690 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2691 }
2692
2693 static vector unsigned int __ATTRS_o_ai
vec_max(vector unsigned int __a,vector unsigned int __b)2694 vec_max(vector unsigned int __a, vector unsigned int __b)
2695 {
2696 return __builtin_altivec_vmaxuw(__a, __b);
2697 }
2698
2699 static vector unsigned int __ATTRS_o_ai
vec_max(vector bool int __a,vector unsigned int __b)2700 vec_max(vector bool int __a, vector unsigned int __b)
2701 {
2702 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2703 }
2704
2705 static vector unsigned int __ATTRS_o_ai
vec_max(vector unsigned int __a,vector bool int __b)2706 vec_max(vector unsigned int __a, vector bool int __b)
2707 {
2708 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2709 }
2710
2711 #ifdef __POWER8_VECTOR__
2712 static vector signed long long __ATTRS_o_ai
vec_max(vector signed long long __a,vector signed long long __b)2713 vec_max(vector signed long long __a, vector signed long long __b)
2714 {
2715 return __builtin_altivec_vmaxsd(__a, __b);
2716 }
2717
2718 static vector unsigned long long __ATTRS_o_ai
vec_max(vector unsigned long long __a,vector unsigned long long __b)2719 vec_max(vector unsigned long long __a, vector unsigned long long __b)
2720 {
2721 return __builtin_altivec_vmaxud(__a, __b);
2722 }
2723 #endif
2724
2725 static vector float __ATTRS_o_ai
vec_max(vector float __a,vector float __b)2726 vec_max(vector float __a, vector float __b)
2727 {
2728 #ifdef __VSX__
2729 return __builtin_vsx_xvmaxsp(__a, __b);
2730 #else
2731 return __builtin_altivec_vmaxfp(__a, __b);
2732 #endif
2733 }
2734
2735 #ifdef __VSX__
2736 static vector double __ATTRS_o_ai
vec_max(vector double __a,vector double __b)2737 vec_max(vector double __a, vector double __b)
2738 {
2739 return __builtin_vsx_xvmaxdp(__a, __b);
2740 }
2741 #endif
2742
2743 /* vec_vmaxsb */
2744
2745 static vector signed char __ATTRS_o_ai
vec_vmaxsb(vector signed char __a,vector signed char __b)2746 vec_vmaxsb(vector signed char __a, vector signed char __b)
2747 {
2748 return __builtin_altivec_vmaxsb(__a, __b);
2749 }
2750
2751 static vector signed char __ATTRS_o_ai
vec_vmaxsb(vector bool char __a,vector signed char __b)2752 vec_vmaxsb(vector bool char __a, vector signed char __b)
2753 {
2754 return __builtin_altivec_vmaxsb((vector signed char)__a, __b);
2755 }
2756
2757 static vector signed char __ATTRS_o_ai
vec_vmaxsb(vector signed char __a,vector bool char __b)2758 vec_vmaxsb(vector signed char __a, vector bool char __b)
2759 {
2760 return __builtin_altivec_vmaxsb(__a, (vector signed char)__b);
2761 }
2762
2763 /* vec_vmaxub */
2764
2765 static vector unsigned char __ATTRS_o_ai
vec_vmaxub(vector unsigned char __a,vector unsigned char __b)2766 vec_vmaxub(vector unsigned char __a, vector unsigned char __b)
2767 {
2768 return __builtin_altivec_vmaxub(__a, __b);
2769 }
2770
2771 static vector unsigned char __ATTRS_o_ai
vec_vmaxub(vector bool char __a,vector unsigned char __b)2772 vec_vmaxub(vector bool char __a, vector unsigned char __b)
2773 {
2774 return __builtin_altivec_vmaxub((vector unsigned char)__a, __b);
2775 }
2776
2777 static vector unsigned char __ATTRS_o_ai
vec_vmaxub(vector unsigned char __a,vector bool char __b)2778 vec_vmaxub(vector unsigned char __a, vector bool char __b)
2779 {
2780 return __builtin_altivec_vmaxub(__a, (vector unsigned char)__b);
2781 }
2782
2783 /* vec_vmaxsh */
2784
2785 static vector short __ATTRS_o_ai
vec_vmaxsh(vector short __a,vector short __b)2786 vec_vmaxsh(vector short __a, vector short __b)
2787 {
2788 return __builtin_altivec_vmaxsh(__a, __b);
2789 }
2790
2791 static vector short __ATTRS_o_ai
vec_vmaxsh(vector bool short __a,vector short __b)2792 vec_vmaxsh(vector bool short __a, vector short __b)
2793 {
2794 return __builtin_altivec_vmaxsh((vector short)__a, __b);
2795 }
2796
2797 static vector short __ATTRS_o_ai
vec_vmaxsh(vector short __a,vector bool short __b)2798 vec_vmaxsh(vector short __a, vector bool short __b)
2799 {
2800 return __builtin_altivec_vmaxsh(__a, (vector short)__b);
2801 }
2802
2803 /* vec_vmaxuh */
2804
2805 static vector unsigned short __ATTRS_o_ai
vec_vmaxuh(vector unsigned short __a,vector unsigned short __b)2806 vec_vmaxuh(vector unsigned short __a, vector unsigned short __b)
2807 {
2808 return __builtin_altivec_vmaxuh(__a, __b);
2809 }
2810
2811 static vector unsigned short __ATTRS_o_ai
vec_vmaxuh(vector bool short __a,vector unsigned short __b)2812 vec_vmaxuh(vector bool short __a, vector unsigned short __b)
2813 {
2814 return __builtin_altivec_vmaxuh((vector unsigned short)__a, __b);
2815 }
2816
2817 static vector unsigned short __ATTRS_o_ai
vec_vmaxuh(vector unsigned short __a,vector bool short __b)2818 vec_vmaxuh(vector unsigned short __a, vector bool short __b)
2819 {
2820 return __builtin_altivec_vmaxuh(__a, (vector unsigned short)__b);
2821 }
2822
2823 /* vec_vmaxsw */
2824
2825 static vector int __ATTRS_o_ai
vec_vmaxsw(vector int __a,vector int __b)2826 vec_vmaxsw(vector int __a, vector int __b)
2827 {
2828 return __builtin_altivec_vmaxsw(__a, __b);
2829 }
2830
2831 static vector int __ATTRS_o_ai
vec_vmaxsw(vector bool int __a,vector int __b)2832 vec_vmaxsw(vector bool int __a, vector int __b)
2833 {
2834 return __builtin_altivec_vmaxsw((vector int)__a, __b);
2835 }
2836
2837 static vector int __ATTRS_o_ai
vec_vmaxsw(vector int __a,vector bool int __b)2838 vec_vmaxsw(vector int __a, vector bool int __b)
2839 {
2840 return __builtin_altivec_vmaxsw(__a, (vector int)__b);
2841 }
2842
2843 /* vec_vmaxuw */
2844
2845 static vector unsigned int __ATTRS_o_ai
vec_vmaxuw(vector unsigned int __a,vector unsigned int __b)2846 vec_vmaxuw(vector unsigned int __a, vector unsigned int __b)
2847 {
2848 return __builtin_altivec_vmaxuw(__a, __b);
2849 }
2850
2851 static vector unsigned int __ATTRS_o_ai
vec_vmaxuw(vector bool int __a,vector unsigned int __b)2852 vec_vmaxuw(vector bool int __a, vector unsigned int __b)
2853 {
2854 return __builtin_altivec_vmaxuw((vector unsigned int)__a, __b);
2855 }
2856
2857 static vector unsigned int __ATTRS_o_ai
vec_vmaxuw(vector unsigned int __a,vector bool int __b)2858 vec_vmaxuw(vector unsigned int __a, vector bool int __b)
2859 {
2860 return __builtin_altivec_vmaxuw(__a, (vector unsigned int)__b);
2861 }
2862
2863 /* vec_vmaxfp */
2864
2865 static vector float __attribute__((__always_inline__))
vec_vmaxfp(vector float __a,vector float __b)2866 vec_vmaxfp(vector float __a, vector float __b)
2867 {
2868 #ifdef __VSX__
2869 return __builtin_vsx_xvmaxsp(__a, __b);
2870 #else
2871 return __builtin_altivec_vmaxfp(__a, __b);
2872 #endif
2873 }
2874
2875 /* vec_mergeh */
2876
2877 static vector signed char __ATTRS_o_ai
vec_mergeh(vector signed char __a,vector signed char __b)2878 vec_mergeh(vector signed char __a, vector signed char __b)
2879 {
2880 return vec_perm(__a, __b, (vector unsigned char)
2881 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2882 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2883 }
2884
2885 static vector unsigned char __ATTRS_o_ai
vec_mergeh(vector unsigned char __a,vector unsigned char __b)2886 vec_mergeh(vector unsigned char __a, vector unsigned char __b)
2887 {
2888 return vec_perm(__a, __b, (vector unsigned char)
2889 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2890 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2891 }
2892
2893 static vector bool char __ATTRS_o_ai
vec_mergeh(vector bool char __a,vector bool char __b)2894 vec_mergeh(vector bool char __a, vector bool char __b)
2895 {
2896 return vec_perm(__a, __b, (vector unsigned char)
2897 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2898 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2899 }
2900
2901 static vector short __ATTRS_o_ai
vec_mergeh(vector short __a,vector short __b)2902 vec_mergeh(vector short __a, vector short __b)
2903 {
2904 return vec_perm(__a, __b, (vector unsigned char)
2905 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2906 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2907 }
2908
2909 static vector unsigned short __ATTRS_o_ai
vec_mergeh(vector unsigned short __a,vector unsigned short __b)2910 vec_mergeh(vector unsigned short __a, vector unsigned short __b)
2911 {
2912 return vec_perm(__a, __b, (vector unsigned char)
2913 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2914 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2915 }
2916
2917 static vector bool short __ATTRS_o_ai
vec_mergeh(vector bool short __a,vector bool short __b)2918 vec_mergeh(vector bool short __a, vector bool short __b)
2919 {
2920 return vec_perm(__a, __b, (vector unsigned char)
2921 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2922 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2923 }
2924
2925 static vector pixel __ATTRS_o_ai
vec_mergeh(vector pixel __a,vector pixel __b)2926 vec_mergeh(vector pixel __a, vector pixel __b)
2927 {
2928 return vec_perm(__a, __b, (vector unsigned char)
2929 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
2930 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
2931 }
2932
2933 static vector int __ATTRS_o_ai
vec_mergeh(vector int __a,vector int __b)2934 vec_mergeh(vector int __a, vector int __b)
2935 {
2936 return vec_perm(__a, __b, (vector unsigned char)
2937 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2938 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2939 }
2940
2941 static vector unsigned int __ATTRS_o_ai
vec_mergeh(vector unsigned int __a,vector unsigned int __b)2942 vec_mergeh(vector unsigned int __a, vector unsigned int __b)
2943 {
2944 return vec_perm(__a, __b, (vector unsigned char)
2945 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2946 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2947 }
2948
2949 static vector bool int __ATTRS_o_ai
vec_mergeh(vector bool int __a,vector bool int __b)2950 vec_mergeh(vector bool int __a, vector bool int __b)
2951 {
2952 return vec_perm(__a, __b, (vector unsigned char)
2953 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2954 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2955 }
2956
2957 static vector float __ATTRS_o_ai
vec_mergeh(vector float __a,vector float __b)2958 vec_mergeh(vector float __a, vector float __b)
2959 {
2960 return vec_perm(__a, __b, (vector unsigned char)
2961 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
2962 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
2963 }
2964
2965 /* vec_vmrghb */
2966
2967 #define __builtin_altivec_vmrghb vec_vmrghb
2968
2969 static vector signed char __ATTRS_o_ai
vec_vmrghb(vector signed char __a,vector signed char __b)2970 vec_vmrghb(vector signed char __a, vector signed char __b)
2971 {
2972 return vec_perm(__a, __b, (vector unsigned char)
2973 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2974 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2975 }
2976
2977 static vector unsigned char __ATTRS_o_ai
vec_vmrghb(vector unsigned char __a,vector unsigned char __b)2978 vec_vmrghb(vector unsigned char __a, vector unsigned char __b)
2979 {
2980 return vec_perm(__a, __b, (vector unsigned char)
2981 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2982 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2983 }
2984
2985 static vector bool char __ATTRS_o_ai
vec_vmrghb(vector bool char __a,vector bool char __b)2986 vec_vmrghb(vector bool char __a, vector bool char __b)
2987 {
2988 return vec_perm(__a, __b, (vector unsigned char)
2989 (0x00, 0x10, 0x01, 0x11, 0x02, 0x12, 0x03, 0x13,
2990 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17));
2991 }
2992
2993 /* vec_vmrghh */
2994
2995 #define __builtin_altivec_vmrghh vec_vmrghh
2996
2997 static vector short __ATTRS_o_ai
vec_vmrghh(vector short __a,vector short __b)2998 vec_vmrghh(vector short __a, vector short __b)
2999 {
3000 return vec_perm(__a, __b, (vector unsigned char)
3001 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3002 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3003 }
3004
3005 static vector unsigned short __ATTRS_o_ai
vec_vmrghh(vector unsigned short __a,vector unsigned short __b)3006 vec_vmrghh(vector unsigned short __a, vector unsigned short __b)
3007 {
3008 return vec_perm(__a, __b, (vector unsigned char)
3009 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3010 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3011 }
3012
3013 static vector bool short __ATTRS_o_ai
vec_vmrghh(vector bool short __a,vector bool short __b)3014 vec_vmrghh(vector bool short __a, vector bool short __b)
3015 {
3016 return vec_perm(__a, __b, (vector unsigned char)
3017 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3018 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3019 }
3020
3021 static vector pixel __ATTRS_o_ai
vec_vmrghh(vector pixel __a,vector pixel __b)3022 vec_vmrghh(vector pixel __a, vector pixel __b)
3023 {
3024 return vec_perm(__a, __b, (vector unsigned char)
3025 (0x00, 0x01, 0x10, 0x11, 0x02, 0x03, 0x12, 0x13,
3026 0x04, 0x05, 0x14, 0x15, 0x06, 0x07, 0x16, 0x17));
3027 }
3028
3029 /* vec_vmrghw */
3030
3031 #define __builtin_altivec_vmrghw vec_vmrghw
3032
3033 static vector int __ATTRS_o_ai
vec_vmrghw(vector int __a,vector int __b)3034 vec_vmrghw(vector int __a, vector int __b)
3035 {
3036 return vec_perm(__a, __b, (vector unsigned char)
3037 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3038 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3039 }
3040
3041 static vector unsigned int __ATTRS_o_ai
vec_vmrghw(vector unsigned int __a,vector unsigned int __b)3042 vec_vmrghw(vector unsigned int __a, vector unsigned int __b)
3043 {
3044 return vec_perm(__a, __b, (vector unsigned char)
3045 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3046 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3047 }
3048
3049 static vector bool int __ATTRS_o_ai
vec_vmrghw(vector bool int __a,vector bool int __b)3050 vec_vmrghw(vector bool int __a, vector bool int __b)
3051 {
3052 return vec_perm(__a, __b, (vector unsigned char)
3053 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3054 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3055 }
3056
3057 static vector float __ATTRS_o_ai
vec_vmrghw(vector float __a,vector float __b)3058 vec_vmrghw(vector float __a, vector float __b)
3059 {
3060 return vec_perm(__a, __b, (vector unsigned char)
3061 (0x00, 0x01, 0x02, 0x03, 0x10, 0x11, 0x12, 0x13,
3062 0x04, 0x05, 0x06, 0x07, 0x14, 0x15, 0x16, 0x17));
3063 }
3064
3065 /* vec_mergel */
3066
3067 static vector signed char __ATTRS_o_ai
vec_mergel(vector signed char __a,vector signed char __b)3068 vec_mergel(vector signed char __a, vector signed char __b)
3069 {
3070 return vec_perm(__a, __b, (vector unsigned char)
3071 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3072 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3073 }
3074
3075 static vector unsigned char __ATTRS_o_ai
vec_mergel(vector unsigned char __a,vector unsigned char __b)3076 vec_mergel(vector unsigned char __a, vector unsigned char __b)
3077 {
3078 return vec_perm(__a, __b, (vector unsigned char)
3079 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3080 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3081 }
3082
3083 static vector bool char __ATTRS_o_ai
vec_mergel(vector bool char __a,vector bool char __b)3084 vec_mergel(vector bool char __a, vector bool char __b)
3085 {
3086 return vec_perm(__a, __b, (vector unsigned char)
3087 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3088 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3089 }
3090
3091 static vector short __ATTRS_o_ai
vec_mergel(vector short __a,vector short __b)3092 vec_mergel(vector short __a, vector short __b)
3093 {
3094 return vec_perm(__a, __b, (vector unsigned char)
3095 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3096 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3097 }
3098
3099 static vector unsigned short __ATTRS_o_ai
vec_mergel(vector unsigned short __a,vector unsigned short __b)3100 vec_mergel(vector unsigned short __a, vector unsigned short __b)
3101 {
3102 return vec_perm(__a, __b, (vector unsigned char)
3103 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3104 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3105 }
3106
3107 static vector bool short __ATTRS_o_ai
vec_mergel(vector bool short __a,vector bool short __b)3108 vec_mergel(vector bool short __a, vector bool short __b)
3109 {
3110 return vec_perm(__a, __b, (vector unsigned char)
3111 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3112 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3113 }
3114
3115 static vector pixel __ATTRS_o_ai
vec_mergel(vector pixel __a,vector pixel __b)3116 vec_mergel(vector pixel __a, vector pixel __b)
3117 {
3118 return vec_perm(__a, __b, (vector unsigned char)
3119 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3120 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3121 }
3122
3123 static vector int __ATTRS_o_ai
vec_mergel(vector int __a,vector int __b)3124 vec_mergel(vector int __a, vector int __b)
3125 {
3126 return vec_perm(__a, __b, (vector unsigned char)
3127 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3128 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3129 }
3130
3131 static vector unsigned int __ATTRS_o_ai
vec_mergel(vector unsigned int __a,vector unsigned int __b)3132 vec_mergel(vector unsigned int __a, vector unsigned int __b)
3133 {
3134 return vec_perm(__a, __b, (vector unsigned char)
3135 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3136 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3137 }
3138
3139 static vector bool int __ATTRS_o_ai
vec_mergel(vector bool int __a,vector bool int __b)3140 vec_mergel(vector bool int __a, vector bool int __b)
3141 {
3142 return vec_perm(__a, __b, (vector unsigned char)
3143 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3144 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3145 }
3146
3147 static vector float __ATTRS_o_ai
vec_mergel(vector float __a,vector float __b)3148 vec_mergel(vector float __a, vector float __b)
3149 {
3150 return vec_perm(__a, __b, (vector unsigned char)
3151 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3152 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3153 }
3154
3155 /* vec_vmrglb */
3156
3157 #define __builtin_altivec_vmrglb vec_vmrglb
3158
3159 static vector signed char __ATTRS_o_ai
vec_vmrglb(vector signed char __a,vector signed char __b)3160 vec_vmrglb(vector signed char __a, vector signed char __b)
3161 {
3162 return vec_perm(__a, __b, (vector unsigned char)
3163 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3164 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3165 }
3166
3167 static vector unsigned char __ATTRS_o_ai
vec_vmrglb(vector unsigned char __a,vector unsigned char __b)3168 vec_vmrglb(vector unsigned char __a, vector unsigned char __b)
3169 {
3170 return vec_perm(__a, __b, (vector unsigned char)
3171 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3172 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3173 }
3174
3175 static vector bool char __ATTRS_o_ai
vec_vmrglb(vector bool char __a,vector bool char __b)3176 vec_vmrglb(vector bool char __a, vector bool char __b)
3177 {
3178 return vec_perm(__a, __b, (vector unsigned char)
3179 (0x08, 0x18, 0x09, 0x19, 0x0A, 0x1A, 0x0B, 0x1B,
3180 0x0C, 0x1C, 0x0D, 0x1D, 0x0E, 0x1E, 0x0F, 0x1F));
3181 }
3182
3183 /* vec_vmrglh */
3184
3185 #define __builtin_altivec_vmrglh vec_vmrglh
3186
3187 static vector short __ATTRS_o_ai
vec_vmrglh(vector short __a,vector short __b)3188 vec_vmrglh(vector short __a, vector short __b)
3189 {
3190 return vec_perm(__a, __b, (vector unsigned char)
3191 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3192 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3193 }
3194
3195 static vector unsigned short __ATTRS_o_ai
vec_vmrglh(vector unsigned short __a,vector unsigned short __b)3196 vec_vmrglh(vector unsigned short __a, vector unsigned short __b)
3197 {
3198 return vec_perm(__a, __b, (vector unsigned char)
3199 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3200 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3201 }
3202
3203 static vector bool short __ATTRS_o_ai
vec_vmrglh(vector bool short __a,vector bool short __b)3204 vec_vmrglh(vector bool short __a, vector bool short __b)
3205 {
3206 return vec_perm(__a, __b, (vector unsigned char)
3207 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3208 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3209 }
3210
3211 static vector pixel __ATTRS_o_ai
vec_vmrglh(vector pixel __a,vector pixel __b)3212 vec_vmrglh(vector pixel __a, vector pixel __b)
3213 {
3214 return vec_perm(__a, __b, (vector unsigned char)
3215 (0x08, 0x09, 0x18, 0x19, 0x0A, 0x0B, 0x1A, 0x1B,
3216 0x0C, 0x0D, 0x1C, 0x1D, 0x0E, 0x0F, 0x1E, 0x1F));
3217 }
3218
3219 /* vec_vmrglw */
3220
3221 #define __builtin_altivec_vmrglw vec_vmrglw
3222
3223 static vector int __ATTRS_o_ai
vec_vmrglw(vector int __a,vector int __b)3224 vec_vmrglw(vector int __a, vector int __b)
3225 {
3226 return vec_perm(__a, __b, (vector unsigned char)
3227 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3228 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3229 }
3230
3231 static vector unsigned int __ATTRS_o_ai
vec_vmrglw(vector unsigned int __a,vector unsigned int __b)3232 vec_vmrglw(vector unsigned int __a, vector unsigned int __b)
3233 {
3234 return vec_perm(__a, __b, (vector unsigned char)
3235 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3236 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3237 }
3238
3239 static vector bool int __ATTRS_o_ai
vec_vmrglw(vector bool int __a,vector bool int __b)3240 vec_vmrglw(vector bool int __a, vector bool int __b)
3241 {
3242 return vec_perm(__a, __b, (vector unsigned char)
3243 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3244 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3245 }
3246
3247 static vector float __ATTRS_o_ai
vec_vmrglw(vector float __a,vector float __b)3248 vec_vmrglw(vector float __a, vector float __b)
3249 {
3250 return vec_perm(__a, __b, (vector unsigned char)
3251 (0x08, 0x09, 0x0A, 0x0B, 0x18, 0x19, 0x1A, 0x1B,
3252 0x0C, 0x0D, 0x0E, 0x0F, 0x1C, 0x1D, 0x1E, 0x1F));
3253 }
3254
3255 /* vec_mfvscr */
3256
3257 static vector unsigned short __attribute__((__always_inline__))
vec_mfvscr(void)3258 vec_mfvscr(void)
3259 {
3260 return __builtin_altivec_mfvscr();
3261 }
3262
3263 /* vec_min */
3264
3265 static vector signed char __ATTRS_o_ai
vec_min(vector signed char __a,vector signed char __b)3266 vec_min(vector signed char __a, vector signed char __b)
3267 {
3268 return __builtin_altivec_vminsb(__a, __b);
3269 }
3270
3271 static vector signed char __ATTRS_o_ai
vec_min(vector bool char __a,vector signed char __b)3272 vec_min(vector bool char __a, vector signed char __b)
3273 {
3274 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3275 }
3276
3277 static vector signed char __ATTRS_o_ai
vec_min(vector signed char __a,vector bool char __b)3278 vec_min(vector signed char __a, vector bool char __b)
3279 {
3280 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3281 }
3282
3283 static vector unsigned char __ATTRS_o_ai
vec_min(vector unsigned char __a,vector unsigned char __b)3284 vec_min(vector unsigned char __a, vector unsigned char __b)
3285 {
3286 return __builtin_altivec_vminub(__a, __b);
3287 }
3288
3289 static vector unsigned char __ATTRS_o_ai
vec_min(vector bool char __a,vector unsigned char __b)3290 vec_min(vector bool char __a, vector unsigned char __b)
3291 {
3292 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3293 }
3294
3295 static vector unsigned char __ATTRS_o_ai
vec_min(vector unsigned char __a,vector bool char __b)3296 vec_min(vector unsigned char __a, vector bool char __b)
3297 {
3298 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3299 }
3300
3301 static vector short __ATTRS_o_ai
vec_min(vector short __a,vector short __b)3302 vec_min(vector short __a, vector short __b)
3303 {
3304 return __builtin_altivec_vminsh(__a, __b);
3305 }
3306
3307 static vector short __ATTRS_o_ai
vec_min(vector bool short __a,vector short __b)3308 vec_min(vector bool short __a, vector short __b)
3309 {
3310 return __builtin_altivec_vminsh((vector short)__a, __b);
3311 }
3312
3313 static vector short __ATTRS_o_ai
vec_min(vector short __a,vector bool short __b)3314 vec_min(vector short __a, vector bool short __b)
3315 {
3316 return __builtin_altivec_vminsh(__a, (vector short)__b);
3317 }
3318
3319 static vector unsigned short __ATTRS_o_ai
vec_min(vector unsigned short __a,vector unsigned short __b)3320 vec_min(vector unsigned short __a, vector unsigned short __b)
3321 {
3322 return __builtin_altivec_vminuh(__a, __b);
3323 }
3324
3325 static vector unsigned short __ATTRS_o_ai
vec_min(vector bool short __a,vector unsigned short __b)3326 vec_min(vector bool short __a, vector unsigned short __b)
3327 {
3328 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3329 }
3330
3331 static vector unsigned short __ATTRS_o_ai
vec_min(vector unsigned short __a,vector bool short __b)3332 vec_min(vector unsigned short __a, vector bool short __b)
3333 {
3334 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3335 }
3336
3337 static vector int __ATTRS_o_ai
vec_min(vector int __a,vector int __b)3338 vec_min(vector int __a, vector int __b)
3339 {
3340 return __builtin_altivec_vminsw(__a, __b);
3341 }
3342
3343 static vector int __ATTRS_o_ai
vec_min(vector bool int __a,vector int __b)3344 vec_min(vector bool int __a, vector int __b)
3345 {
3346 return __builtin_altivec_vminsw((vector int)__a, __b);
3347 }
3348
3349 static vector int __ATTRS_o_ai
vec_min(vector int __a,vector bool int __b)3350 vec_min(vector int __a, vector bool int __b)
3351 {
3352 return __builtin_altivec_vminsw(__a, (vector int)__b);
3353 }
3354
3355 static vector unsigned int __ATTRS_o_ai
vec_min(vector unsigned int __a,vector unsigned int __b)3356 vec_min(vector unsigned int __a, vector unsigned int __b)
3357 {
3358 return __builtin_altivec_vminuw(__a, __b);
3359 }
3360
3361 static vector unsigned int __ATTRS_o_ai
vec_min(vector bool int __a,vector unsigned int __b)3362 vec_min(vector bool int __a, vector unsigned int __b)
3363 {
3364 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3365 }
3366
3367 static vector unsigned int __ATTRS_o_ai
vec_min(vector unsigned int __a,vector bool int __b)3368 vec_min(vector unsigned int __a, vector bool int __b)
3369 {
3370 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3371 }
3372
3373 #ifdef __POWER8_VECTOR__
3374 static vector signed long long __ATTRS_o_ai
vec_min(vector signed long long __a,vector signed long long __b)3375 vec_min(vector signed long long __a, vector signed long long __b)
3376 {
3377 return __builtin_altivec_vminsd(__a, __b);
3378 }
3379
3380 static vector unsigned long long __ATTRS_o_ai
vec_min(vector unsigned long long __a,vector unsigned long long __b)3381 vec_min(vector unsigned long long __a, vector unsigned long long __b)
3382 {
3383 return __builtin_altivec_vminud(__a, __b);
3384 }
3385 #endif
3386
3387 static vector float __ATTRS_o_ai
vec_min(vector float __a,vector float __b)3388 vec_min(vector float __a, vector float __b)
3389 {
3390 #ifdef __VSX__
3391 return __builtin_vsx_xvminsp(__a, __b);
3392 #else
3393 return __builtin_altivec_vminfp(__a, __b);
3394 #endif
3395 }
3396
3397 #ifdef __VSX__
3398 static vector double __ATTRS_o_ai
vec_min(vector double __a,vector double __b)3399 vec_min(vector double __a, vector double __b)
3400 {
3401 return __builtin_vsx_xvmindp(__a, __b);
3402 }
3403 #endif
3404
3405 /* vec_vminsb */
3406
3407 static vector signed char __ATTRS_o_ai
vec_vminsb(vector signed char __a,vector signed char __b)3408 vec_vminsb(vector signed char __a, vector signed char __b)
3409 {
3410 return __builtin_altivec_vminsb(__a, __b);
3411 }
3412
3413 static vector signed char __ATTRS_o_ai
vec_vminsb(vector bool char __a,vector signed char __b)3414 vec_vminsb(vector bool char __a, vector signed char __b)
3415 {
3416 return __builtin_altivec_vminsb((vector signed char)__a, __b);
3417 }
3418
3419 static vector signed char __ATTRS_o_ai
vec_vminsb(vector signed char __a,vector bool char __b)3420 vec_vminsb(vector signed char __a, vector bool char __b)
3421 {
3422 return __builtin_altivec_vminsb(__a, (vector signed char)__b);
3423 }
3424
3425 /* vec_vminub */
3426
3427 static vector unsigned char __ATTRS_o_ai
vec_vminub(vector unsigned char __a,vector unsigned char __b)3428 vec_vminub(vector unsigned char __a, vector unsigned char __b)
3429 {
3430 return __builtin_altivec_vminub(__a, __b);
3431 }
3432
3433 static vector unsigned char __ATTRS_o_ai
vec_vminub(vector bool char __a,vector unsigned char __b)3434 vec_vminub(vector bool char __a, vector unsigned char __b)
3435 {
3436 return __builtin_altivec_vminub((vector unsigned char)__a, __b);
3437 }
3438
3439 static vector unsigned char __ATTRS_o_ai
vec_vminub(vector unsigned char __a,vector bool char __b)3440 vec_vminub(vector unsigned char __a, vector bool char __b)
3441 {
3442 return __builtin_altivec_vminub(__a, (vector unsigned char)__b);
3443 }
3444
3445 /* vec_vminsh */
3446
3447 static vector short __ATTRS_o_ai
vec_vminsh(vector short __a,vector short __b)3448 vec_vminsh(vector short __a, vector short __b)
3449 {
3450 return __builtin_altivec_vminsh(__a, __b);
3451 }
3452
3453 static vector short __ATTRS_o_ai
vec_vminsh(vector bool short __a,vector short __b)3454 vec_vminsh(vector bool short __a, vector short __b)
3455 {
3456 return __builtin_altivec_vminsh((vector short)__a, __b);
3457 }
3458
3459 static vector short __ATTRS_o_ai
vec_vminsh(vector short __a,vector bool short __b)3460 vec_vminsh(vector short __a, vector bool short __b)
3461 {
3462 return __builtin_altivec_vminsh(__a, (vector short)__b);
3463 }
3464
3465 /* vec_vminuh */
3466
3467 static vector unsigned short __ATTRS_o_ai
vec_vminuh(vector unsigned short __a,vector unsigned short __b)3468 vec_vminuh(vector unsigned short __a, vector unsigned short __b)
3469 {
3470 return __builtin_altivec_vminuh(__a, __b);
3471 }
3472
3473 static vector unsigned short __ATTRS_o_ai
vec_vminuh(vector bool short __a,vector unsigned short __b)3474 vec_vminuh(vector bool short __a, vector unsigned short __b)
3475 {
3476 return __builtin_altivec_vminuh((vector unsigned short)__a, __b);
3477 }
3478
3479 static vector unsigned short __ATTRS_o_ai
vec_vminuh(vector unsigned short __a,vector bool short __b)3480 vec_vminuh(vector unsigned short __a, vector bool short __b)
3481 {
3482 return __builtin_altivec_vminuh(__a, (vector unsigned short)__b);
3483 }
3484
3485 /* vec_vminsw */
3486
3487 static vector int __ATTRS_o_ai
vec_vminsw(vector int __a,vector int __b)3488 vec_vminsw(vector int __a, vector int __b)
3489 {
3490 return __builtin_altivec_vminsw(__a, __b);
3491 }
3492
3493 static vector int __ATTRS_o_ai
vec_vminsw(vector bool int __a,vector int __b)3494 vec_vminsw(vector bool int __a, vector int __b)
3495 {
3496 return __builtin_altivec_vminsw((vector int)__a, __b);
3497 }
3498
3499 static vector int __ATTRS_o_ai
vec_vminsw(vector int __a,vector bool int __b)3500 vec_vminsw(vector int __a, vector bool int __b)
3501 {
3502 return __builtin_altivec_vminsw(__a, (vector int)__b);
3503 }
3504
3505 /* vec_vminuw */
3506
3507 static vector unsigned int __ATTRS_o_ai
vec_vminuw(vector unsigned int __a,vector unsigned int __b)3508 vec_vminuw(vector unsigned int __a, vector unsigned int __b)
3509 {
3510 return __builtin_altivec_vminuw(__a, __b);
3511 }
3512
3513 static vector unsigned int __ATTRS_o_ai
vec_vminuw(vector bool int __a,vector unsigned int __b)3514 vec_vminuw(vector bool int __a, vector unsigned int __b)
3515 {
3516 return __builtin_altivec_vminuw((vector unsigned int)__a, __b);
3517 }
3518
3519 static vector unsigned int __ATTRS_o_ai
vec_vminuw(vector unsigned int __a,vector bool int __b)3520 vec_vminuw(vector unsigned int __a, vector bool int __b)
3521 {
3522 return __builtin_altivec_vminuw(__a, (vector unsigned int)__b);
3523 }
3524
3525 /* vec_vminfp */
3526
3527 static vector float __attribute__((__always_inline__))
vec_vminfp(vector float __a,vector float __b)3528 vec_vminfp(vector float __a, vector float __b)
3529 {
3530 #ifdef __VSX__
3531 return __builtin_vsx_xvminsp(__a, __b);
3532 #else
3533 return __builtin_altivec_vminfp(__a, __b);
3534 #endif
3535 }
3536
3537 /* vec_mladd */
3538
3539 #define __builtin_altivec_vmladduhm vec_mladd
3540
3541 static vector short __ATTRS_o_ai
vec_mladd(vector short __a,vector short __b,vector short __c)3542 vec_mladd(vector short __a, vector short __b, vector short __c)
3543 {
3544 return __a * __b + __c;
3545 }
3546
3547 static vector short __ATTRS_o_ai
vec_mladd(vector short __a,vector unsigned short __b,vector unsigned short __c)3548 vec_mladd(vector short __a, vector unsigned short __b, vector unsigned short __c)
3549 {
3550 return __a * (vector short)__b + (vector short)__c;
3551 }
3552
3553 static vector short __ATTRS_o_ai
vec_mladd(vector unsigned short __a,vector short __b,vector short __c)3554 vec_mladd(vector unsigned short __a, vector short __b, vector short __c)
3555 {
3556 return (vector short)__a * __b + __c;
3557 }
3558
3559 static vector unsigned short __ATTRS_o_ai
vec_mladd(vector unsigned short __a,vector unsigned short __b,vector unsigned short __c)3560 vec_mladd(vector unsigned short __a,
3561 vector unsigned short __b,
3562 vector unsigned short __c)
3563 {
3564 return __a * __b + __c;
3565 }
3566
3567 /* vec_vmladduhm */
3568
3569 static vector short __ATTRS_o_ai
vec_vmladduhm(vector short __a,vector short __b,vector short __c)3570 vec_vmladduhm(vector short __a, vector short __b, vector short __c)
3571 {
3572 return __a * __b + __c;
3573 }
3574
3575 static vector short __ATTRS_o_ai
vec_vmladduhm(vector short __a,vector unsigned short __b,vector unsigned short __c)3576 vec_vmladduhm(vector short __a, vector unsigned short __b, vector unsigned short __c)
3577 {
3578 return __a * (vector short)__b + (vector short)__c;
3579 }
3580
3581 static vector short __ATTRS_o_ai
vec_vmladduhm(vector unsigned short __a,vector short __b,vector short __c)3582 vec_vmladduhm(vector unsigned short __a, vector short __b, vector short __c)
3583 {
3584 return (vector short)__a * __b + __c;
3585 }
3586
3587 static vector unsigned short __ATTRS_o_ai
vec_vmladduhm(vector unsigned short __a,vector unsigned short __b,vector unsigned short __c)3588 vec_vmladduhm(vector unsigned short __a,
3589 vector unsigned short __b,
3590 vector unsigned short __c)
3591 {
3592 return __a * __b + __c;
3593 }
3594
3595 /* vec_mradds */
3596
3597 static vector short __attribute__((__always_inline__))
vec_mradds(vector short __a,vector short __b,vector short __c)3598 vec_mradds(vector short __a, vector short __b, vector short __c)
3599 {
3600 return __builtin_altivec_vmhraddshs(__a, __b, __c);
3601 }
3602
3603 /* vec_vmhraddshs */
3604
3605 static vector short __attribute__((__always_inline__))
vec_vmhraddshs(vector short __a,vector short __b,vector short __c)3606 vec_vmhraddshs(vector short __a, vector short __b, vector short __c)
3607 {
3608 return __builtin_altivec_vmhraddshs(__a, __b, __c);
3609 }
3610
3611 /* vec_msum */
3612
3613 static vector int __ATTRS_o_ai
vec_msum(vector signed char __a,vector unsigned char __b,vector int __c)3614 vec_msum(vector signed char __a, vector unsigned char __b, vector int __c)
3615 {
3616 return __builtin_altivec_vmsummbm(__a, __b, __c);
3617 }
3618
3619 static vector unsigned int __ATTRS_o_ai
vec_msum(vector unsigned char __a,vector unsigned char __b,vector unsigned int __c)3620 vec_msum(vector unsigned char __a, vector unsigned char __b, vector unsigned int __c)
3621 {
3622 return __builtin_altivec_vmsumubm(__a, __b, __c);
3623 }
3624
3625 static vector int __ATTRS_o_ai
vec_msum(vector short __a,vector short __b,vector int __c)3626 vec_msum(vector short __a, vector short __b, vector int __c)
3627 {
3628 return __builtin_altivec_vmsumshm(__a, __b, __c);
3629 }
3630
3631 static vector unsigned int __ATTRS_o_ai
vec_msum(vector unsigned short __a,vector unsigned short __b,vector unsigned int __c)3632 vec_msum(vector unsigned short __a,
3633 vector unsigned short __b,
3634 vector unsigned int __c)
3635 {
3636 return __builtin_altivec_vmsumuhm(__a, __b, __c);
3637 }
3638
3639 /* vec_vmsummbm */
3640
3641 static vector int __attribute__((__always_inline__))
vec_vmsummbm(vector signed char __a,vector unsigned char __b,vector int __c)3642 vec_vmsummbm(vector signed char __a, vector unsigned char __b, vector int __c)
3643 {
3644 return __builtin_altivec_vmsummbm(__a, __b, __c);
3645 }
3646
3647 /* vec_vmsumubm */
3648
3649 static vector unsigned int __attribute__((__always_inline__))
vec_vmsumubm(vector unsigned char __a,vector unsigned char __b,vector unsigned int __c)3650 vec_vmsumubm(vector unsigned char __a,
3651 vector unsigned char __b,
3652 vector unsigned int __c)
3653 {
3654 return __builtin_altivec_vmsumubm(__a, __b, __c);
3655 }
3656
3657 /* vec_vmsumshm */
3658
3659 static vector int __attribute__((__always_inline__))
vec_vmsumshm(vector short __a,vector short __b,vector int __c)3660 vec_vmsumshm(vector short __a, vector short __b, vector int __c)
3661 {
3662 return __builtin_altivec_vmsumshm(__a, __b, __c);
3663 }
3664
3665 /* vec_vmsumuhm */
3666
3667 static vector unsigned int __attribute__((__always_inline__))
vec_vmsumuhm(vector unsigned short __a,vector unsigned short __b,vector unsigned int __c)3668 vec_vmsumuhm(vector unsigned short __a,
3669 vector unsigned short __b,
3670 vector unsigned int __c)
3671 {
3672 return __builtin_altivec_vmsumuhm(__a, __b, __c);
3673 }
3674
3675 /* vec_msums */
3676
3677 static vector int __ATTRS_o_ai
vec_msums(vector short __a,vector short __b,vector int __c)3678 vec_msums(vector short __a, vector short __b, vector int __c)
3679 {
3680 return __builtin_altivec_vmsumshs(__a, __b, __c);
3681 }
3682
3683 static vector unsigned int __ATTRS_o_ai
vec_msums(vector unsigned short __a,vector unsigned short __b,vector unsigned int __c)3684 vec_msums(vector unsigned short __a,
3685 vector unsigned short __b,
3686 vector unsigned int __c)
3687 {
3688 return __builtin_altivec_vmsumuhs(__a, __b, __c);
3689 }
3690
3691 /* vec_vmsumshs */
3692
3693 static vector int __attribute__((__always_inline__))
vec_vmsumshs(vector short __a,vector short __b,vector int __c)3694 vec_vmsumshs(vector short __a, vector short __b, vector int __c)
3695 {
3696 return __builtin_altivec_vmsumshs(__a, __b, __c);
3697 }
3698
3699 /* vec_vmsumuhs */
3700
3701 static vector unsigned int __attribute__((__always_inline__))
vec_vmsumuhs(vector unsigned short __a,vector unsigned short __b,vector unsigned int __c)3702 vec_vmsumuhs(vector unsigned short __a,
3703 vector unsigned short __b,
3704 vector unsigned int __c)
3705 {
3706 return __builtin_altivec_vmsumuhs(__a, __b, __c);
3707 }
3708
3709 /* vec_mtvscr */
3710
3711 static void __ATTRS_o_ai
vec_mtvscr(vector signed char __a)3712 vec_mtvscr(vector signed char __a)
3713 {
3714 __builtin_altivec_mtvscr((vector int)__a);
3715 }
3716
3717 static void __ATTRS_o_ai
vec_mtvscr(vector unsigned char __a)3718 vec_mtvscr(vector unsigned char __a)
3719 {
3720 __builtin_altivec_mtvscr((vector int)__a);
3721 }
3722
3723 static void __ATTRS_o_ai
vec_mtvscr(vector bool char __a)3724 vec_mtvscr(vector bool char __a)
3725 {
3726 __builtin_altivec_mtvscr((vector int)__a);
3727 }
3728
3729 static void __ATTRS_o_ai
vec_mtvscr(vector short __a)3730 vec_mtvscr(vector short __a)
3731 {
3732 __builtin_altivec_mtvscr((vector int)__a);
3733 }
3734
3735 static void __ATTRS_o_ai
vec_mtvscr(vector unsigned short __a)3736 vec_mtvscr(vector unsigned short __a)
3737 {
3738 __builtin_altivec_mtvscr((vector int)__a);
3739 }
3740
3741 static void __ATTRS_o_ai
vec_mtvscr(vector bool short __a)3742 vec_mtvscr(vector bool short __a)
3743 {
3744 __builtin_altivec_mtvscr((vector int)__a);
3745 }
3746
3747 static void __ATTRS_o_ai
vec_mtvscr(vector pixel __a)3748 vec_mtvscr(vector pixel __a)
3749 {
3750 __builtin_altivec_mtvscr((vector int)__a);
3751 }
3752
3753 static void __ATTRS_o_ai
vec_mtvscr(vector int __a)3754 vec_mtvscr(vector int __a)
3755 {
3756 __builtin_altivec_mtvscr((vector int)__a);
3757 }
3758
3759 static void __ATTRS_o_ai
vec_mtvscr(vector unsigned int __a)3760 vec_mtvscr(vector unsigned int __a)
3761 {
3762 __builtin_altivec_mtvscr((vector int)__a);
3763 }
3764
3765 static void __ATTRS_o_ai
vec_mtvscr(vector bool int __a)3766 vec_mtvscr(vector bool int __a)
3767 {
3768 __builtin_altivec_mtvscr((vector int)__a);
3769 }
3770
3771 static void __ATTRS_o_ai
vec_mtvscr(vector float __a)3772 vec_mtvscr(vector float __a)
3773 {
3774 __builtin_altivec_mtvscr((vector int)__a);
3775 }
3776
3777 /* The vmulos* and vmules* instructions have a big endian bias, so
3778 we must reverse the meaning of "even" and "odd" for little endian. */
3779
3780 /* vec_mule */
3781
3782 static vector short __ATTRS_o_ai
vec_mule(vector signed char __a,vector signed char __b)3783 vec_mule(vector signed char __a, vector signed char __b)
3784 {
3785 #ifdef __LITTLE_ENDIAN__
3786 return __builtin_altivec_vmulosb(__a, __b);
3787 #else
3788 return __builtin_altivec_vmulesb(__a, __b);
3789 #endif
3790 }
3791
3792 static vector unsigned short __ATTRS_o_ai
vec_mule(vector unsigned char __a,vector unsigned char __b)3793 vec_mule(vector unsigned char __a, vector unsigned char __b)
3794 {
3795 #ifdef __LITTLE_ENDIAN__
3796 return __builtin_altivec_vmuloub(__a, __b);
3797 #else
3798 return __builtin_altivec_vmuleub(__a, __b);
3799 #endif
3800 }
3801
3802 static vector int __ATTRS_o_ai
vec_mule(vector short __a,vector short __b)3803 vec_mule(vector short __a, vector short __b)
3804 {
3805 #ifdef __LITTLE_ENDIAN__
3806 return __builtin_altivec_vmulosh(__a, __b);
3807 #else
3808 return __builtin_altivec_vmulesh(__a, __b);
3809 #endif
3810 }
3811
3812 static vector unsigned int __ATTRS_o_ai
vec_mule(vector unsigned short __a,vector unsigned short __b)3813 vec_mule(vector unsigned short __a, vector unsigned short __b)
3814 {
3815 #ifdef __LITTLE_ENDIAN__
3816 return __builtin_altivec_vmulouh(__a, __b);
3817 #else
3818 return __builtin_altivec_vmuleuh(__a, __b);
3819 #endif
3820 }
3821
3822 #ifdef __POWER8_VECTOR__
3823 static vector signed long long __ATTRS_o_ai
vec_mule(vector signed int __a,vector signed int __b)3824 vec_mule(vector signed int __a, vector signed int __b)
3825 {
3826 #ifdef __LITTLE_ENDIAN__
3827 return __builtin_altivec_vmulosw(__a, __b);
3828 #else
3829 return __builtin_altivec_vmulesw(__a, __b);
3830 #endif
3831 }
3832
3833 static vector unsigned long long __ATTRS_o_ai
vec_mule(vector unsigned int __a,vector unsigned int __b)3834 vec_mule(vector unsigned int __a, vector unsigned int __b)
3835 {
3836 #ifdef __LITTLE_ENDIAN__
3837 return __builtin_altivec_vmulouw(__a, __b);
3838 #else
3839 return __builtin_altivec_vmuleuw(__a, __b);
3840 #endif
3841 }
3842 #endif
3843
3844 /* vec_vmulesb */
3845
3846 static vector short __attribute__((__always_inline__))
vec_vmulesb(vector signed char __a,vector signed char __b)3847 vec_vmulesb(vector signed char __a, vector signed char __b)
3848 {
3849 #ifdef __LITTLE_ENDIAN__
3850 return __builtin_altivec_vmulosb(__a, __b);
3851 #else
3852 return __builtin_altivec_vmulesb(__a, __b);
3853 #endif
3854 }
3855
3856 /* vec_vmuleub */
3857
3858 static vector unsigned short __attribute__((__always_inline__))
vec_vmuleub(vector unsigned char __a,vector unsigned char __b)3859 vec_vmuleub(vector unsigned char __a, vector unsigned char __b)
3860 {
3861 #ifdef __LITTLE_ENDIAN__
3862 return __builtin_altivec_vmuloub(__a, __b);
3863 #else
3864 return __builtin_altivec_vmuleub(__a, __b);
3865 #endif
3866 }
3867
3868 /* vec_vmulesh */
3869
3870 static vector int __attribute__((__always_inline__))
vec_vmulesh(vector short __a,vector short __b)3871 vec_vmulesh(vector short __a, vector short __b)
3872 {
3873 #ifdef __LITTLE_ENDIAN__
3874 return __builtin_altivec_vmulosh(__a, __b);
3875 #else
3876 return __builtin_altivec_vmulesh(__a, __b);
3877 #endif
3878 }
3879
3880 /* vec_vmuleuh */
3881
3882 static vector unsigned int __attribute__((__always_inline__))
vec_vmuleuh(vector unsigned short __a,vector unsigned short __b)3883 vec_vmuleuh(vector unsigned short __a, vector unsigned short __b)
3884 {
3885 #ifdef __LITTLE_ENDIAN__
3886 return __builtin_altivec_vmulouh(__a, __b);
3887 #else
3888 return __builtin_altivec_vmuleuh(__a, __b);
3889 #endif
3890 }
3891
3892 /* vec_mulo */
3893
3894 static vector short __ATTRS_o_ai
vec_mulo(vector signed char __a,vector signed char __b)3895 vec_mulo(vector signed char __a, vector signed char __b)
3896 {
3897 #ifdef __LITTLE_ENDIAN__
3898 return __builtin_altivec_vmulesb(__a, __b);
3899 #else
3900 return __builtin_altivec_vmulosb(__a, __b);
3901 #endif
3902 }
3903
3904 static vector unsigned short __ATTRS_o_ai
vec_mulo(vector unsigned char __a,vector unsigned char __b)3905 vec_mulo(vector unsigned char __a, vector unsigned char __b)
3906 {
3907 #ifdef __LITTLE_ENDIAN__
3908 return __builtin_altivec_vmuleub(__a, __b);
3909 #else
3910 return __builtin_altivec_vmuloub(__a, __b);
3911 #endif
3912 }
3913
3914 static vector int __ATTRS_o_ai
vec_mulo(vector short __a,vector short __b)3915 vec_mulo(vector short __a, vector short __b)
3916 {
3917 #ifdef __LITTLE_ENDIAN__
3918 return __builtin_altivec_vmulesh(__a, __b);
3919 #else
3920 return __builtin_altivec_vmulosh(__a, __b);
3921 #endif
3922 }
3923
3924 static vector unsigned int __ATTRS_o_ai
vec_mulo(vector unsigned short __a,vector unsigned short __b)3925 vec_mulo(vector unsigned short __a, vector unsigned short __b)
3926 {
3927 #ifdef __LITTLE_ENDIAN__
3928 return __builtin_altivec_vmuleuh(__a, __b);
3929 #else
3930 return __builtin_altivec_vmulouh(__a, __b);
3931 #endif
3932 }
3933
3934 #ifdef __POWER8_VECTOR__
3935 static vector signed long long __ATTRS_o_ai
vec_mulo(vector signed int __a,vector signed int __b)3936 vec_mulo(vector signed int __a, vector signed int __b)
3937 {
3938 #ifdef __LITTLE_ENDIAN__
3939 return __builtin_altivec_vmulesw(__a, __b);
3940 #else
3941 return __builtin_altivec_vmulosw(__a, __b);
3942 #endif
3943 }
3944
3945 static vector unsigned long long __ATTRS_o_ai
vec_mulo(vector unsigned int __a,vector unsigned int __b)3946 vec_mulo(vector unsigned int __a, vector unsigned int __b)
3947 {
3948 #ifdef __LITTLE_ENDIAN__
3949 return __builtin_altivec_vmuleuw(__a, __b);
3950 #else
3951 return __builtin_altivec_vmulouw(__a, __b);
3952 #endif
3953 }
3954 #endif
3955
3956 /* vec_vmulosb */
3957
3958 static vector short __attribute__((__always_inline__))
vec_vmulosb(vector signed char __a,vector signed char __b)3959 vec_vmulosb(vector signed char __a, vector signed char __b)
3960 {
3961 #ifdef __LITTLE_ENDIAN__
3962 return __builtin_altivec_vmulesb(__a, __b);
3963 #else
3964 return __builtin_altivec_vmulosb(__a, __b);
3965 #endif
3966 }
3967
3968 /* vec_vmuloub */
3969
3970 static vector unsigned short __attribute__((__always_inline__))
vec_vmuloub(vector unsigned char __a,vector unsigned char __b)3971 vec_vmuloub(vector unsigned char __a, vector unsigned char __b)
3972 {
3973 #ifdef __LITTLE_ENDIAN__
3974 return __builtin_altivec_vmuleub(__a, __b);
3975 #else
3976 return __builtin_altivec_vmuloub(__a, __b);
3977 #endif
3978 }
3979
3980 /* vec_vmulosh */
3981
3982 static vector int __attribute__((__always_inline__))
vec_vmulosh(vector short __a,vector short __b)3983 vec_vmulosh(vector short __a, vector short __b)
3984 {
3985 #ifdef __LITTLE_ENDIAN__
3986 return __builtin_altivec_vmulesh(__a, __b);
3987 #else
3988 return __builtin_altivec_vmulosh(__a, __b);
3989 #endif
3990 }
3991
3992 /* vec_vmulouh */
3993
3994 static vector unsigned int __attribute__((__always_inline__))
vec_vmulouh(vector unsigned short __a,vector unsigned short __b)3995 vec_vmulouh(vector unsigned short __a, vector unsigned short __b)
3996 {
3997 #ifdef __LITTLE_ENDIAN__
3998 return __builtin_altivec_vmuleuh(__a, __b);
3999 #else
4000 return __builtin_altivec_vmulouh(__a, __b);
4001 #endif
4002 }
4003
4004 /* vec_nmsub */
4005
4006 static vector float __attribute__((__always_inline__))
vec_nmsub(vector float __a,vector float __b,vector float __c)4007 vec_nmsub(vector float __a, vector float __b, vector float __c)
4008 {
4009 return __builtin_altivec_vnmsubfp(__a, __b, __c);
4010 }
4011
4012 /* vec_vnmsubfp */
4013
4014 static vector float __attribute__((__always_inline__))
vec_vnmsubfp(vector float __a,vector float __b,vector float __c)4015 vec_vnmsubfp(vector float __a, vector float __b, vector float __c)
4016 {
4017 return __builtin_altivec_vnmsubfp(__a, __b, __c);
4018 }
4019
4020 /* vec_nor */
4021
4022 #define __builtin_altivec_vnor vec_nor
4023
4024 static vector signed char __ATTRS_o_ai
vec_nor(vector signed char __a,vector signed char __b)4025 vec_nor(vector signed char __a, vector signed char __b)
4026 {
4027 return ~(__a | __b);
4028 }
4029
4030 static vector unsigned char __ATTRS_o_ai
vec_nor(vector unsigned char __a,vector unsigned char __b)4031 vec_nor(vector unsigned char __a, vector unsigned char __b)
4032 {
4033 return ~(__a | __b);
4034 }
4035
4036 static vector bool char __ATTRS_o_ai
vec_nor(vector bool char __a,vector bool char __b)4037 vec_nor(vector bool char __a, vector bool char __b)
4038 {
4039 return ~(__a | __b);
4040 }
4041
4042 static vector short __ATTRS_o_ai
vec_nor(vector short __a,vector short __b)4043 vec_nor(vector short __a, vector short __b)
4044 {
4045 return ~(__a | __b);
4046 }
4047
4048 static vector unsigned short __ATTRS_o_ai
vec_nor(vector unsigned short __a,vector unsigned short __b)4049 vec_nor(vector unsigned short __a, vector unsigned short __b)
4050 {
4051 return ~(__a | __b);
4052 }
4053
4054 static vector bool short __ATTRS_o_ai
vec_nor(vector bool short __a,vector bool short __b)4055 vec_nor(vector bool short __a, vector bool short __b)
4056 {
4057 return ~(__a | __b);
4058 }
4059
4060 static vector int __ATTRS_o_ai
vec_nor(vector int __a,vector int __b)4061 vec_nor(vector int __a, vector int __b)
4062 {
4063 return ~(__a | __b);
4064 }
4065
4066 static vector unsigned int __ATTRS_o_ai
vec_nor(vector unsigned int __a,vector unsigned int __b)4067 vec_nor(vector unsigned int __a, vector unsigned int __b)
4068 {
4069 return ~(__a | __b);
4070 }
4071
4072 static vector bool int __ATTRS_o_ai
vec_nor(vector bool int __a,vector bool int __b)4073 vec_nor(vector bool int __a, vector bool int __b)
4074 {
4075 return ~(__a | __b);
4076 }
4077
4078 static vector float __ATTRS_o_ai
vec_nor(vector float __a,vector float __b)4079 vec_nor(vector float __a, vector float __b)
4080 {
4081 vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b);
4082 return (vector float)__res;
4083 }
4084
4085 /* vec_vnor */
4086
4087 static vector signed char __ATTRS_o_ai
vec_vnor(vector signed char __a,vector signed char __b)4088 vec_vnor(vector signed char __a, vector signed char __b)
4089 {
4090 return ~(__a | __b);
4091 }
4092
4093 static vector unsigned char __ATTRS_o_ai
vec_vnor(vector unsigned char __a,vector unsigned char __b)4094 vec_vnor(vector unsigned char __a, vector unsigned char __b)
4095 {
4096 return ~(__a | __b);
4097 }
4098
4099 static vector bool char __ATTRS_o_ai
vec_vnor(vector bool char __a,vector bool char __b)4100 vec_vnor(vector bool char __a, vector bool char __b)
4101 {
4102 return ~(__a | __b);
4103 }
4104
4105 static vector short __ATTRS_o_ai
vec_vnor(vector short __a,vector short __b)4106 vec_vnor(vector short __a, vector short __b)
4107 {
4108 return ~(__a | __b);
4109 }
4110
4111 static vector unsigned short __ATTRS_o_ai
vec_vnor(vector unsigned short __a,vector unsigned short __b)4112 vec_vnor(vector unsigned short __a, vector unsigned short __b)
4113 {
4114 return ~(__a | __b);
4115 }
4116
4117 static vector bool short __ATTRS_o_ai
vec_vnor(vector bool short __a,vector bool short __b)4118 vec_vnor(vector bool short __a, vector bool short __b)
4119 {
4120 return ~(__a | __b);
4121 }
4122
4123 static vector int __ATTRS_o_ai
vec_vnor(vector int __a,vector int __b)4124 vec_vnor(vector int __a, vector int __b)
4125 {
4126 return ~(__a | __b);
4127 }
4128
4129 static vector unsigned int __ATTRS_o_ai
vec_vnor(vector unsigned int __a,vector unsigned int __b)4130 vec_vnor(vector unsigned int __a, vector unsigned int __b)
4131 {
4132 return ~(__a | __b);
4133 }
4134
4135 static vector bool int __ATTRS_o_ai
vec_vnor(vector bool int __a,vector bool int __b)4136 vec_vnor(vector bool int __a, vector bool int __b)
4137 {
4138 return ~(__a | __b);
4139 }
4140
4141 static vector float __ATTRS_o_ai
vec_vnor(vector float __a,vector float __b)4142 vec_vnor(vector float __a, vector float __b)
4143 {
4144 vector unsigned int __res = ~((vector unsigned int)__a | (vector unsigned int)__b);
4145 return (vector float)__res;
4146 }
4147
4148 /* vec_or */
4149
4150 #define __builtin_altivec_vor vec_or
4151
4152 static vector signed char __ATTRS_o_ai
vec_or(vector signed char __a,vector signed char __b)4153 vec_or(vector signed char __a, vector signed char __b)
4154 {
4155 return __a | __b;
4156 }
4157
4158 static vector signed char __ATTRS_o_ai
vec_or(vector bool char __a,vector signed char __b)4159 vec_or(vector bool char __a, vector signed char __b)
4160 {
4161 return (vector signed char)__a | __b;
4162 }
4163
4164 static vector signed char __ATTRS_o_ai
vec_or(vector signed char __a,vector bool char __b)4165 vec_or(vector signed char __a, vector bool char __b)
4166 {
4167 return __a | (vector signed char)__b;
4168 }
4169
4170 static vector unsigned char __ATTRS_o_ai
vec_or(vector unsigned char __a,vector unsigned char __b)4171 vec_or(vector unsigned char __a, vector unsigned char __b)
4172 {
4173 return __a | __b;
4174 }
4175
4176 static vector unsigned char __ATTRS_o_ai
vec_or(vector bool char __a,vector unsigned char __b)4177 vec_or(vector bool char __a, vector unsigned char __b)
4178 {
4179 return (vector unsigned char)__a | __b;
4180 }
4181
4182 static vector unsigned char __ATTRS_o_ai
vec_or(vector unsigned char __a,vector bool char __b)4183 vec_or(vector unsigned char __a, vector bool char __b)
4184 {
4185 return __a | (vector unsigned char)__b;
4186 }
4187
4188 static vector bool char __ATTRS_o_ai
vec_or(vector bool char __a,vector bool char __b)4189 vec_or(vector bool char __a, vector bool char __b)
4190 {
4191 return __a | __b;
4192 }
4193
4194 static vector short __ATTRS_o_ai
vec_or(vector short __a,vector short __b)4195 vec_or(vector short __a, vector short __b)
4196 {
4197 return __a | __b;
4198 }
4199
4200 static vector short __ATTRS_o_ai
vec_or(vector bool short __a,vector short __b)4201 vec_or(vector bool short __a, vector short __b)
4202 {
4203 return (vector short)__a | __b;
4204 }
4205
4206 static vector short __ATTRS_o_ai
vec_or(vector short __a,vector bool short __b)4207 vec_or(vector short __a, vector bool short __b)
4208 {
4209 return __a | (vector short)__b;
4210 }
4211
4212 static vector unsigned short __ATTRS_o_ai
vec_or(vector unsigned short __a,vector unsigned short __b)4213 vec_or(vector unsigned short __a, vector unsigned short __b)
4214 {
4215 return __a | __b;
4216 }
4217
4218 static vector unsigned short __ATTRS_o_ai
vec_or(vector bool short __a,vector unsigned short __b)4219 vec_or(vector bool short __a, vector unsigned short __b)
4220 {
4221 return (vector unsigned short)__a | __b;
4222 }
4223
4224 static vector unsigned short __ATTRS_o_ai
vec_or(vector unsigned short __a,vector bool short __b)4225 vec_or(vector unsigned short __a, vector bool short __b)
4226 {
4227 return __a | (vector unsigned short)__b;
4228 }
4229
4230 static vector bool short __ATTRS_o_ai
vec_or(vector bool short __a,vector bool short __b)4231 vec_or(vector bool short __a, vector bool short __b)
4232 {
4233 return __a | __b;
4234 }
4235
4236 static vector int __ATTRS_o_ai
vec_or(vector int __a,vector int __b)4237 vec_or(vector int __a, vector int __b)
4238 {
4239 return __a | __b;
4240 }
4241
4242 static vector int __ATTRS_o_ai
vec_or(vector bool int __a,vector int __b)4243 vec_or(vector bool int __a, vector int __b)
4244 {
4245 return (vector int)__a | __b;
4246 }
4247
4248 static vector int __ATTRS_o_ai
vec_or(vector int __a,vector bool int __b)4249 vec_or(vector int __a, vector bool int __b)
4250 {
4251 return __a | (vector int)__b;
4252 }
4253
4254 static vector unsigned int __ATTRS_o_ai
vec_or(vector unsigned int __a,vector unsigned int __b)4255 vec_or(vector unsigned int __a, vector unsigned int __b)
4256 {
4257 return __a | __b;
4258 }
4259
4260 static vector unsigned int __ATTRS_o_ai
vec_or(vector bool int __a,vector unsigned int __b)4261 vec_or(vector bool int __a, vector unsigned int __b)
4262 {
4263 return (vector unsigned int)__a | __b;
4264 }
4265
4266 static vector unsigned int __ATTRS_o_ai
vec_or(vector unsigned int __a,vector bool int __b)4267 vec_or(vector unsigned int __a, vector bool int __b)
4268 {
4269 return __a | (vector unsigned int)__b;
4270 }
4271
4272 static vector bool int __ATTRS_o_ai
vec_or(vector bool int __a,vector bool int __b)4273 vec_or(vector bool int __a, vector bool int __b)
4274 {
4275 return __a | __b;
4276 }
4277
4278 static vector float __ATTRS_o_ai
vec_or(vector float __a,vector float __b)4279 vec_or(vector float __a, vector float __b)
4280 {
4281 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4282 return (vector float)__res;
4283 }
4284
4285 static vector float __ATTRS_o_ai
vec_or(vector bool int __a,vector float __b)4286 vec_or(vector bool int __a, vector float __b)
4287 {
4288 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4289 return (vector float)__res;
4290 }
4291
4292 static vector float __ATTRS_o_ai
vec_or(vector float __a,vector bool int __b)4293 vec_or(vector float __a, vector bool int __b)
4294 {
4295 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4296 return (vector float)__res;
4297 }
4298
4299 /* vec_vor */
4300
4301 static vector signed char __ATTRS_o_ai
vec_vor(vector signed char __a,vector signed char __b)4302 vec_vor(vector signed char __a, vector signed char __b)
4303 {
4304 return __a | __b;
4305 }
4306
4307 static vector signed char __ATTRS_o_ai
vec_vor(vector bool char __a,vector signed char __b)4308 vec_vor(vector bool char __a, vector signed char __b)
4309 {
4310 return (vector signed char)__a | __b;
4311 }
4312
4313 static vector signed char __ATTRS_o_ai
vec_vor(vector signed char __a,vector bool char __b)4314 vec_vor(vector signed char __a, vector bool char __b)
4315 {
4316 return __a | (vector signed char)__b;
4317 }
4318
4319 static vector unsigned char __ATTRS_o_ai
vec_vor(vector unsigned char __a,vector unsigned char __b)4320 vec_vor(vector unsigned char __a, vector unsigned char __b)
4321 {
4322 return __a | __b;
4323 }
4324
4325 static vector unsigned char __ATTRS_o_ai
vec_vor(vector bool char __a,vector unsigned char __b)4326 vec_vor(vector bool char __a, vector unsigned char __b)
4327 {
4328 return (vector unsigned char)__a | __b;
4329 }
4330
4331 static vector unsigned char __ATTRS_o_ai
vec_vor(vector unsigned char __a,vector bool char __b)4332 vec_vor(vector unsigned char __a, vector bool char __b)
4333 {
4334 return __a | (vector unsigned char)__b;
4335 }
4336
4337 static vector bool char __ATTRS_o_ai
vec_vor(vector bool char __a,vector bool char __b)4338 vec_vor(vector bool char __a, vector bool char __b)
4339 {
4340 return __a | __b;
4341 }
4342
4343 static vector short __ATTRS_o_ai
vec_vor(vector short __a,vector short __b)4344 vec_vor(vector short __a, vector short __b)
4345 {
4346 return __a | __b;
4347 }
4348
4349 static vector short __ATTRS_o_ai
vec_vor(vector bool short __a,vector short __b)4350 vec_vor(vector bool short __a, vector short __b)
4351 {
4352 return (vector short)__a | __b;
4353 }
4354
4355 static vector short __ATTRS_o_ai
vec_vor(vector short __a,vector bool short __b)4356 vec_vor(vector short __a, vector bool short __b)
4357 {
4358 return __a | (vector short)__b;
4359 }
4360
4361 static vector unsigned short __ATTRS_o_ai
vec_vor(vector unsigned short __a,vector unsigned short __b)4362 vec_vor(vector unsigned short __a, vector unsigned short __b)
4363 {
4364 return __a | __b;
4365 }
4366
4367 static vector unsigned short __ATTRS_o_ai
vec_vor(vector bool short __a,vector unsigned short __b)4368 vec_vor(vector bool short __a, vector unsigned short __b)
4369 {
4370 return (vector unsigned short)__a | __b;
4371 }
4372
4373 static vector unsigned short __ATTRS_o_ai
vec_vor(vector unsigned short __a,vector bool short __b)4374 vec_vor(vector unsigned short __a, vector bool short __b)
4375 {
4376 return __a | (vector unsigned short)__b;
4377 }
4378
4379 static vector bool short __ATTRS_o_ai
vec_vor(vector bool short __a,vector bool short __b)4380 vec_vor(vector bool short __a, vector bool short __b)
4381 {
4382 return __a | __b;
4383 }
4384
4385 static vector int __ATTRS_o_ai
vec_vor(vector int __a,vector int __b)4386 vec_vor(vector int __a, vector int __b)
4387 {
4388 return __a | __b;
4389 }
4390
4391 static vector int __ATTRS_o_ai
vec_vor(vector bool int __a,vector int __b)4392 vec_vor(vector bool int __a, vector int __b)
4393 {
4394 return (vector int)__a | __b;
4395 }
4396
4397 static vector int __ATTRS_o_ai
vec_vor(vector int __a,vector bool int __b)4398 vec_vor(vector int __a, vector bool int __b)
4399 {
4400 return __a | (vector int)__b;
4401 }
4402
4403 static vector unsigned int __ATTRS_o_ai
vec_vor(vector unsigned int __a,vector unsigned int __b)4404 vec_vor(vector unsigned int __a, vector unsigned int __b)
4405 {
4406 return __a | __b;
4407 }
4408
4409 static vector unsigned int __ATTRS_o_ai
vec_vor(vector bool int __a,vector unsigned int __b)4410 vec_vor(vector bool int __a, vector unsigned int __b)
4411 {
4412 return (vector unsigned int)__a | __b;
4413 }
4414
4415 static vector unsigned int __ATTRS_o_ai
vec_vor(vector unsigned int __a,vector bool int __b)4416 vec_vor(vector unsigned int __a, vector bool int __b)
4417 {
4418 return __a | (vector unsigned int)__b;
4419 }
4420
4421 static vector bool int __ATTRS_o_ai
vec_vor(vector bool int __a,vector bool int __b)4422 vec_vor(vector bool int __a, vector bool int __b)
4423 {
4424 return __a | __b;
4425 }
4426
4427 static vector float __ATTRS_o_ai
vec_vor(vector float __a,vector float __b)4428 vec_vor(vector float __a, vector float __b)
4429 {
4430 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4431 return (vector float)__res;
4432 }
4433
4434 static vector float __ATTRS_o_ai
vec_vor(vector bool int __a,vector float __b)4435 vec_vor(vector bool int __a, vector float __b)
4436 {
4437 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4438 return (vector float)__res;
4439 }
4440
4441 static vector float __ATTRS_o_ai
vec_vor(vector float __a,vector bool int __b)4442 vec_vor(vector float __a, vector bool int __b)
4443 {
4444 vector unsigned int __res = (vector unsigned int)__a | (vector unsigned int)__b;
4445 return (vector float)__res;
4446 }
4447
4448 /* vec_pack */
4449
4450 /* The various vector pack instructions have a big-endian bias, so for
4451 little endian we must handle reversed element numbering. */
4452
4453 static vector signed char __ATTRS_o_ai
vec_pack(vector signed short __a,vector signed short __b)4454 vec_pack(vector signed short __a, vector signed short __b)
4455 {
4456 #ifdef __LITTLE_ENDIAN__
4457 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4458 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4459 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4460 #else
4461 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4462 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4463 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4464 #endif
4465 }
4466
4467 static vector unsigned char __ATTRS_o_ai
vec_pack(vector unsigned short __a,vector unsigned short __b)4468 vec_pack(vector unsigned short __a, vector unsigned short __b)
4469 {
4470 #ifdef __LITTLE_ENDIAN__
4471 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4472 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4473 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4474 #else
4475 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4476 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4477 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4478 #endif
4479 }
4480
4481 static vector bool char __ATTRS_o_ai
vec_pack(vector bool short __a,vector bool short __b)4482 vec_pack(vector bool short __a, vector bool short __b)
4483 {
4484 #ifdef __LITTLE_ENDIAN__
4485 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4486 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4487 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4488 #else
4489 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4490 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4491 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4492 #endif
4493 }
4494
4495 static vector short __ATTRS_o_ai
vec_pack(vector int __a,vector int __b)4496 vec_pack(vector int __a, vector int __b)
4497 {
4498 #ifdef __LITTLE_ENDIAN__
4499 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4500 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4501 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4502 #else
4503 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4504 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4505 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4506 #endif
4507 }
4508
4509 static vector unsigned short __ATTRS_o_ai
vec_pack(vector unsigned int __a,vector unsigned int __b)4510 vec_pack(vector unsigned int __a, vector unsigned int __b)
4511 {
4512 #ifdef __LITTLE_ENDIAN__
4513 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4514 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4515 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4516 #else
4517 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4518 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4519 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4520 #endif
4521 }
4522
4523 static vector bool short __ATTRS_o_ai
vec_pack(vector bool int __a,vector bool int __b)4524 vec_pack(vector bool int __a, vector bool int __b)
4525 {
4526 #ifdef __LITTLE_ENDIAN__
4527 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4528 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4529 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4530 #else
4531 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4532 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4533 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4534 #endif
4535 }
4536
4537 /* vec_vpkuhum */
4538
4539 #define __builtin_altivec_vpkuhum vec_vpkuhum
4540
4541 static vector signed char __ATTRS_o_ai
vec_vpkuhum(vector signed short __a,vector signed short __b)4542 vec_vpkuhum(vector signed short __a, vector signed short __b)
4543 {
4544 #ifdef __LITTLE_ENDIAN__
4545 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4546 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4547 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4548 #else
4549 return (vector signed char)vec_perm(__a, __b, (vector unsigned char)
4550 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4551 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4552 #endif
4553 }
4554
4555 static vector unsigned char __ATTRS_o_ai
vec_vpkuhum(vector unsigned short __a,vector unsigned short __b)4556 vec_vpkuhum(vector unsigned short __a, vector unsigned short __b)
4557 {
4558 #ifdef __LITTLE_ENDIAN__
4559 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4560 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4561 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4562 #else
4563 return (vector unsigned char)vec_perm(__a, __b, (vector unsigned char)
4564 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4565 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4566 #endif
4567 }
4568
4569 static vector bool char __ATTRS_o_ai
vec_vpkuhum(vector bool short __a,vector bool short __b)4570 vec_vpkuhum(vector bool short __a, vector bool short __b)
4571 {
4572 #ifdef __LITTLE_ENDIAN__
4573 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4574 (0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E,
4575 0x10, 0x12, 0x14, 0x16, 0x18, 0x1A, 0x1C, 0x1E));
4576 #else
4577 return (vector bool char)vec_perm(__a, __b, (vector unsigned char)
4578 (0x01, 0x03, 0x05, 0x07, 0x09, 0x0B, 0x0D, 0x0F,
4579 0x11, 0x13, 0x15, 0x17, 0x19, 0x1B, 0x1D, 0x1F));
4580 #endif
4581 }
4582
4583 /* vec_vpkuwum */
4584
4585 #define __builtin_altivec_vpkuwum vec_vpkuwum
4586
4587 static vector short __ATTRS_o_ai
vec_vpkuwum(vector int __a,vector int __b)4588 vec_vpkuwum(vector int __a, vector int __b)
4589 {
4590 #ifdef __LITTLE_ENDIAN__
4591 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4592 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4593 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4594 #else
4595 return (vector short)vec_perm(__a, __b, (vector unsigned char)
4596 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4597 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4598 #endif
4599 }
4600
4601 static vector unsigned short __ATTRS_o_ai
vec_vpkuwum(vector unsigned int __a,vector unsigned int __b)4602 vec_vpkuwum(vector unsigned int __a, vector unsigned int __b)
4603 {
4604 #ifdef __LITTLE_ENDIAN__
4605 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4606 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4607 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4608 #else
4609 return (vector unsigned short)vec_perm(__a, __b, (vector unsigned char)
4610 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4611 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4612 #endif
4613 }
4614
4615 static vector bool short __ATTRS_o_ai
vec_vpkuwum(vector bool int __a,vector bool int __b)4616 vec_vpkuwum(vector bool int __a, vector bool int __b)
4617 {
4618 #ifdef __LITTLE_ENDIAN__
4619 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4620 (0x00, 0x01, 0x04, 0x05, 0x08, 0x09, 0x0C, 0x0D,
4621 0x10, 0x11, 0x14, 0x15, 0x18, 0x19, 0x1C, 0x1D));
4622 #else
4623 return (vector bool short)vec_perm(__a, __b, (vector unsigned char)
4624 (0x02, 0x03, 0x06, 0x07, 0x0A, 0x0B, 0x0E, 0x0F,
4625 0x12, 0x13, 0x16, 0x17, 0x1A, 0x1B, 0x1E, 0x1F));
4626 #endif
4627 }
4628
4629 /* vec_packpx */
4630
4631 static vector pixel __attribute__((__always_inline__))
vec_packpx(vector unsigned int __a,vector unsigned int __b)4632 vec_packpx(vector unsigned int __a, vector unsigned int __b)
4633 {
4634 #ifdef __LITTLE_ENDIAN__
4635 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4636 #else
4637 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4638 #endif
4639 }
4640
4641 /* vec_vpkpx */
4642
4643 static vector pixel __attribute__((__always_inline__))
vec_vpkpx(vector unsigned int __a,vector unsigned int __b)4644 vec_vpkpx(vector unsigned int __a, vector unsigned int __b)
4645 {
4646 #ifdef __LITTLE_ENDIAN__
4647 return (vector pixel)__builtin_altivec_vpkpx(__b, __a);
4648 #else
4649 return (vector pixel)__builtin_altivec_vpkpx(__a, __b);
4650 #endif
4651 }
4652
4653 /* vec_packs */
4654
4655 static vector signed char __ATTRS_o_ai
vec_packs(vector short __a,vector short __b)4656 vec_packs(vector short __a, vector short __b)
4657 {
4658 #ifdef __LITTLE_ENDIAN__
4659 return __builtin_altivec_vpkshss(__b, __a);
4660 #else
4661 return __builtin_altivec_vpkshss(__a, __b);
4662 #endif
4663 }
4664
4665 static vector unsigned char __ATTRS_o_ai
vec_packs(vector unsigned short __a,vector unsigned short __b)4666 vec_packs(vector unsigned short __a, vector unsigned short __b)
4667 {
4668 #ifdef __LITTLE_ENDIAN__
4669 return __builtin_altivec_vpkuhus(__b, __a);
4670 #else
4671 return __builtin_altivec_vpkuhus(__a, __b);
4672 #endif
4673 }
4674
4675 static vector signed short __ATTRS_o_ai
vec_packs(vector int __a,vector int __b)4676 vec_packs(vector int __a, vector int __b)
4677 {
4678 #ifdef __LITTLE_ENDIAN__
4679 return __builtin_altivec_vpkswss(__b, __a);
4680 #else
4681 return __builtin_altivec_vpkswss(__a, __b);
4682 #endif
4683 }
4684
4685 static vector unsigned short __ATTRS_o_ai
vec_packs(vector unsigned int __a,vector unsigned int __b)4686 vec_packs(vector unsigned int __a, vector unsigned int __b)
4687 {
4688 #ifdef __LITTLE_ENDIAN__
4689 return __builtin_altivec_vpkuwus(__b, __a);
4690 #else
4691 return __builtin_altivec_vpkuwus(__a, __b);
4692 #endif
4693 }
4694
4695 /* vec_vpkshss */
4696
4697 static vector signed char __attribute__((__always_inline__))
vec_vpkshss(vector short __a,vector short __b)4698 vec_vpkshss(vector short __a, vector short __b)
4699 {
4700 #ifdef __LITTLE_ENDIAN__
4701 return __builtin_altivec_vpkshss(__b, __a);
4702 #else
4703 return __builtin_altivec_vpkshss(__a, __b);
4704 #endif
4705 }
4706
4707 /* vec_vpkuhus */
4708
4709 static vector unsigned char __attribute__((__always_inline__))
vec_vpkuhus(vector unsigned short __a,vector unsigned short __b)4710 vec_vpkuhus(vector unsigned short __a, vector unsigned short __b)
4711 {
4712 #ifdef __LITTLE_ENDIAN__
4713 return __builtin_altivec_vpkuhus(__b, __a);
4714 #else
4715 return __builtin_altivec_vpkuhus(__a, __b);
4716 #endif
4717 }
4718
4719 /* vec_vpkswss */
4720
4721 static vector signed short __attribute__((__always_inline__))
vec_vpkswss(vector int __a,vector int __b)4722 vec_vpkswss(vector int __a, vector int __b)
4723 {
4724 #ifdef __LITTLE_ENDIAN__
4725 return __builtin_altivec_vpkswss(__b, __a);
4726 #else
4727 return __builtin_altivec_vpkswss(__a, __b);
4728 #endif
4729 }
4730
4731 /* vec_vpkuwus */
4732
4733 static vector unsigned short __attribute__((__always_inline__))
vec_vpkuwus(vector unsigned int __a,vector unsigned int __b)4734 vec_vpkuwus(vector unsigned int __a, vector unsigned int __b)
4735 {
4736 #ifdef __LITTLE_ENDIAN__
4737 return __builtin_altivec_vpkuwus(__b, __a);
4738 #else
4739 return __builtin_altivec_vpkuwus(__a, __b);
4740 #endif
4741 }
4742
4743 /* vec_packsu */
4744
4745 static vector unsigned char __ATTRS_o_ai
vec_packsu(vector short __a,vector short __b)4746 vec_packsu(vector short __a, vector short __b)
4747 {
4748 #ifdef __LITTLE_ENDIAN__
4749 return __builtin_altivec_vpkshus(__b, __a);
4750 #else
4751 return __builtin_altivec_vpkshus(__a, __b);
4752 #endif
4753 }
4754
4755 static vector unsigned char __ATTRS_o_ai
vec_packsu(vector unsigned short __a,vector unsigned short __b)4756 vec_packsu(vector unsigned short __a, vector unsigned short __b)
4757 {
4758 #ifdef __LITTLE_ENDIAN__
4759 return __builtin_altivec_vpkuhus(__b, __a);
4760 #else
4761 return __builtin_altivec_vpkuhus(__a, __b);
4762 #endif
4763 }
4764
4765 static vector unsigned short __ATTRS_o_ai
vec_packsu(vector int __a,vector int __b)4766 vec_packsu(vector int __a, vector int __b)
4767 {
4768 #ifdef __LITTLE_ENDIAN__
4769 return __builtin_altivec_vpkswus(__b, __a);
4770 #else
4771 return __builtin_altivec_vpkswus(__a, __b);
4772 #endif
4773 }
4774
4775 static vector unsigned short __ATTRS_o_ai
vec_packsu(vector unsigned int __a,vector unsigned int __b)4776 vec_packsu(vector unsigned int __a, vector unsigned int __b)
4777 {
4778 #ifdef __LITTLE_ENDIAN__
4779 return __builtin_altivec_vpkuwus(__b, __a);
4780 #else
4781 return __builtin_altivec_vpkuwus(__a, __b);
4782 #endif
4783 }
4784
4785 /* vec_vpkshus */
4786
4787 static vector unsigned char __ATTRS_o_ai
vec_vpkshus(vector short __a,vector short __b)4788 vec_vpkshus(vector short __a, vector short __b)
4789 {
4790 #ifdef __LITTLE_ENDIAN__
4791 return __builtin_altivec_vpkshus(__b, __a);
4792 #else
4793 return __builtin_altivec_vpkshus(__a, __b);
4794 #endif
4795 }
4796
4797 static vector unsigned char __ATTRS_o_ai
vec_vpkshus(vector unsigned short __a,vector unsigned short __b)4798 vec_vpkshus(vector unsigned short __a, vector unsigned short __b)
4799 {
4800 #ifdef __LITTLE_ENDIAN__
4801 return __builtin_altivec_vpkuhus(__b, __a);
4802 #else
4803 return __builtin_altivec_vpkuhus(__a, __b);
4804 #endif
4805 }
4806
4807 /* vec_vpkswus */
4808
4809 static vector unsigned short __ATTRS_o_ai
vec_vpkswus(vector int __a,vector int __b)4810 vec_vpkswus(vector int __a, vector int __b)
4811 {
4812 #ifdef __LITTLE_ENDIAN__
4813 return __builtin_altivec_vpkswus(__b, __a);
4814 #else
4815 return __builtin_altivec_vpkswus(__a, __b);
4816 #endif
4817 }
4818
4819 static vector unsigned short __ATTRS_o_ai
vec_vpkswus(vector unsigned int __a,vector unsigned int __b)4820 vec_vpkswus(vector unsigned int __a, vector unsigned int __b)
4821 {
4822 #ifdef __LITTLE_ENDIAN__
4823 return __builtin_altivec_vpkuwus(__b, __a);
4824 #else
4825 return __builtin_altivec_vpkuwus(__a, __b);
4826 #endif
4827 }
4828
4829 /* vec_perm */
4830
4831 // The vperm instruction is defined architecturally with a big-endian bias.
4832 // For little endian, we swap the input operands and invert the permute
4833 // control vector. Only the rightmost 5 bits matter, so we could use
4834 // a vector of all 31s instead of all 255s to perform the inversion.
4835 // However, when the PCV is not a constant, using 255 has an advantage
4836 // in that the vec_xor can be recognized as a vec_nor (and for P8 and
4837 // later, possibly a vec_nand).
4838
4839 static vector signed char __ATTRS_o_ai
vec_perm(vector signed char __a,vector signed char __b,vector unsigned char __c)4840 vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c)
4841 {
4842 #ifdef __LITTLE_ENDIAN__
4843 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4844 255,255,255,255,255,255,255,255};
4845 __d = vec_xor(__c, __d);
4846 return (vector signed char)
4847 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4848 #else
4849 return (vector signed char)
4850 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4851 #endif
4852 }
4853
4854 static vector unsigned char __ATTRS_o_ai
vec_perm(vector unsigned char __a,vector unsigned char __b,vector unsigned char __c)4855 vec_perm(vector unsigned char __a,
4856 vector unsigned char __b,
4857 vector unsigned char __c)
4858 {
4859 #ifdef __LITTLE_ENDIAN__
4860 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4861 255,255,255,255,255,255,255,255};
4862 __d = vec_xor(__c, __d);
4863 return (vector unsigned char)
4864 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4865 #else
4866 return (vector unsigned char)
4867 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4868 #endif
4869 }
4870
4871 static vector bool char __ATTRS_o_ai
vec_perm(vector bool char __a,vector bool char __b,vector unsigned char __c)4872 vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c)
4873 {
4874 #ifdef __LITTLE_ENDIAN__
4875 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4876 255,255,255,255,255,255,255,255};
4877 __d = vec_xor(__c, __d);
4878 return (vector bool char)
4879 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4880 #else
4881 return (vector bool char)
4882 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4883 #endif
4884 }
4885
4886 static vector short __ATTRS_o_ai
vec_perm(vector short __a,vector short __b,vector unsigned char __c)4887 vec_perm(vector short __a, vector short __b, vector unsigned char __c)
4888 {
4889 #ifdef __LITTLE_ENDIAN__
4890 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4891 255,255,255,255,255,255,255,255};
4892 __d = vec_xor(__c, __d);
4893 return (vector short)
4894 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4895 #else
4896 return (vector short)
4897 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4898 #endif
4899 }
4900
4901 static vector unsigned short __ATTRS_o_ai
vec_perm(vector unsigned short __a,vector unsigned short __b,vector unsigned char __c)4902 vec_perm(vector unsigned short __a,
4903 vector unsigned short __b,
4904 vector unsigned char __c)
4905 {
4906 #ifdef __LITTLE_ENDIAN__
4907 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4908 255,255,255,255,255,255,255,255};
4909 __d = vec_xor(__c, __d);
4910 return (vector unsigned short)
4911 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4912 #else
4913 return (vector unsigned short)
4914 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4915 #endif
4916 }
4917
4918 static vector bool short __ATTRS_o_ai
vec_perm(vector bool short __a,vector bool short __b,vector unsigned char __c)4919 vec_perm(vector bool short __a, vector bool short __b, vector unsigned char __c)
4920 {
4921 #ifdef __LITTLE_ENDIAN__
4922 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4923 255,255,255,255,255,255,255,255};
4924 __d = vec_xor(__c, __d);
4925 return (vector bool short)
4926 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4927 #else
4928 return (vector bool short)
4929 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4930 #endif
4931 }
4932
4933 static vector pixel __ATTRS_o_ai
vec_perm(vector pixel __a,vector pixel __b,vector unsigned char __c)4934 vec_perm(vector pixel __a, vector pixel __b, vector unsigned char __c)
4935 {
4936 #ifdef __LITTLE_ENDIAN__
4937 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4938 255,255,255,255,255,255,255,255};
4939 __d = vec_xor(__c, __d);
4940 return (vector pixel)
4941 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4942 #else
4943 return (vector pixel)
4944 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4945 #endif
4946 }
4947
4948 static vector int __ATTRS_o_ai
vec_perm(vector int __a,vector int __b,vector unsigned char __c)4949 vec_perm(vector int __a, vector int __b, vector unsigned char __c)
4950 {
4951 #ifdef __LITTLE_ENDIAN__
4952 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4953 255,255,255,255,255,255,255,255};
4954 __d = vec_xor(__c, __d);
4955 return (vector int)__builtin_altivec_vperm_4si(__b, __a, __d);
4956 #else
4957 return (vector int)__builtin_altivec_vperm_4si(__a, __b, __c);
4958 #endif
4959 }
4960
4961 static vector unsigned int __ATTRS_o_ai
vec_perm(vector unsigned int __a,vector unsigned int __b,vector unsigned char __c)4962 vec_perm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c)
4963 {
4964 #ifdef __LITTLE_ENDIAN__
4965 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4966 255,255,255,255,255,255,255,255};
4967 __d = vec_xor(__c, __d);
4968 return (vector unsigned int)
4969 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4970 #else
4971 return (vector unsigned int)
4972 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4973 #endif
4974 }
4975
4976 static vector bool int __ATTRS_o_ai
vec_perm(vector bool int __a,vector bool int __b,vector unsigned char __c)4977 vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c)
4978 {
4979 #ifdef __LITTLE_ENDIAN__
4980 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4981 255,255,255,255,255,255,255,255};
4982 __d = vec_xor(__c, __d);
4983 return (vector bool int)
4984 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
4985 #else
4986 return (vector bool int)
4987 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
4988 #endif
4989 }
4990
4991 static vector float __ATTRS_o_ai
vec_perm(vector float __a,vector float __b,vector unsigned char __c)4992 vec_perm(vector float __a, vector float __b, vector unsigned char __c)
4993 {
4994 #ifdef __LITTLE_ENDIAN__
4995 vector unsigned char __d = {255,255,255,255,255,255,255,255,
4996 255,255,255,255,255,255,255,255};
4997 __d = vec_xor(__c, __d);
4998 return (vector float)
4999 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5000 #else
5001 return (vector float)
5002 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5003 #endif
5004 }
5005
5006 #ifdef __VSX__
5007 static vector long long __ATTRS_o_ai
vec_perm(vector long long __a,vector long long __b,vector unsigned char __c)5008 vec_perm(vector long long __a, vector long long __b, vector unsigned char __c)
5009 {
5010 #ifdef __LITTLE_ENDIAN__
5011 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5012 255,255,255,255,255,255,255,255};
5013 __d = vec_xor(__c, __d);
5014 return (vector long long)__builtin_altivec_vperm_4si(__b, __a, __d);
5015 #else
5016 return (vector long long)__builtin_altivec_vperm_4si(__a, __b, __c);
5017 #endif
5018 }
5019
5020 static vector unsigned long long __ATTRS_o_ai
vec_perm(vector unsigned long long __a,vector unsigned long long __b,vector unsigned char __c)5021 vec_perm(vector unsigned long long __a, vector unsigned long long __b,
5022 vector unsigned char __c)
5023 {
5024 #ifdef __LITTLE_ENDIAN__
5025 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5026 255,255,255,255,255,255,255,255};
5027 __d = vec_xor(__c, __d);
5028 return (vector unsigned long long)
5029 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5030 #else
5031 return (vector unsigned long long)
5032 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5033 #endif
5034 }
5035
5036 static vector double __ATTRS_o_ai
vec_perm(vector double __a,vector double __b,vector unsigned char __c)5037 vec_perm(vector double __a, vector double __b, vector unsigned char __c)
5038 {
5039 #ifdef __LITTLE_ENDIAN__
5040 vector unsigned char __d = {255,255,255,255,255,255,255,255,
5041 255,255,255,255,255,255,255,255};
5042 __d = vec_xor(__c, __d);
5043 return (vector double)
5044 __builtin_altivec_vperm_4si((vector int)__b, (vector int)__a, __d);
5045 #else
5046 return (vector double)
5047 __builtin_altivec_vperm_4si((vector int)__a, (vector int)__b, __c);
5048 #endif
5049 }
5050 #endif
5051
5052 /* vec_vperm */
5053
5054 static vector signed char __ATTRS_o_ai
vec_vperm(vector signed char __a,vector signed char __b,vector unsigned char __c)5055 vec_vperm(vector signed char __a, vector signed char __b, vector unsigned char __c)
5056 {
5057 return vec_perm(__a, __b, __c);
5058 }
5059
5060 static vector unsigned char __ATTRS_o_ai
vec_vperm(vector unsigned char __a,vector unsigned char __b,vector unsigned char __c)5061 vec_vperm(vector unsigned char __a,
5062 vector unsigned char __b,
5063 vector unsigned char __c)
5064 {
5065 return vec_perm(__a, __b, __c);
5066 }
5067
5068 static vector bool char __ATTRS_o_ai
vec_vperm(vector bool char __a,vector bool char __b,vector unsigned char __c)5069 vec_vperm(vector bool char __a, vector bool char __b, vector unsigned char __c)
5070 {
5071 return vec_perm(__a, __b, __c);
5072 }
5073
5074 static vector short __ATTRS_o_ai
vec_vperm(vector short __a,vector short __b,vector unsigned char __c)5075 vec_vperm(vector short __a, vector short __b, vector unsigned char __c)
5076 {
5077 return vec_perm(__a, __b, __c);
5078 }
5079
5080 static vector unsigned short __ATTRS_o_ai
vec_vperm(vector unsigned short __a,vector unsigned short __b,vector unsigned char __c)5081 vec_vperm(vector unsigned short __a,
5082 vector unsigned short __b,
5083 vector unsigned char __c)
5084 {
5085 return vec_perm(__a, __b, __c);
5086 }
5087
5088 static vector bool short __ATTRS_o_ai
vec_vperm(vector bool short __a,vector bool short __b,vector unsigned char __c)5089 vec_vperm(vector bool short __a, vector bool short __b, vector unsigned char __c)
5090 {
5091 return vec_perm(__a, __b, __c);
5092 }
5093
5094 static vector pixel __ATTRS_o_ai
vec_vperm(vector pixel __a,vector pixel __b,vector unsigned char __c)5095 vec_vperm(vector pixel __a, vector pixel __b, vector unsigned char __c)
5096 {
5097 return vec_perm(__a, __b, __c);
5098 }
5099
5100 static vector int __ATTRS_o_ai
vec_vperm(vector int __a,vector int __b,vector unsigned char __c)5101 vec_vperm(vector int __a, vector int __b, vector unsigned char __c)
5102 {
5103 return vec_perm(__a, __b, __c);
5104 }
5105
5106 static vector unsigned int __ATTRS_o_ai
vec_vperm(vector unsigned int __a,vector unsigned int __b,vector unsigned char __c)5107 vec_vperm(vector unsigned int __a, vector unsigned int __b, vector unsigned char __c)
5108 {
5109 return vec_perm(__a, __b, __c);
5110 }
5111
5112 static vector bool int __ATTRS_o_ai
vec_vperm(vector bool int __a,vector bool int __b,vector unsigned char __c)5113 vec_vperm(vector bool int __a, vector bool int __b, vector unsigned char __c)
5114 {
5115 return vec_perm(__a, __b, __c);
5116 }
5117
5118 static vector float __ATTRS_o_ai
vec_vperm(vector float __a,vector float __b,vector unsigned char __c)5119 vec_vperm(vector float __a, vector float __b, vector unsigned char __c)
5120 {
5121 return vec_perm(__a, __b, __c);
5122 }
5123
5124 #ifdef __VSX__
5125 static vector long long __ATTRS_o_ai
vec_vperm(vector long long __a,vector long long __b,vector unsigned char __c)5126 vec_vperm(vector long long __a, vector long long __b, vector unsigned char __c)
5127 {
5128 return vec_perm(__a, __b, __c);
5129 }
5130
5131 static vector unsigned long long __ATTRS_o_ai
vec_vperm(vector unsigned long long __a,vector unsigned long long __b,vector unsigned char __c)5132 vec_vperm(vector unsigned long long __a, vector unsigned long long __b,
5133 vector unsigned char __c)
5134 {
5135 return vec_perm(__a, __b, __c);
5136 }
5137
5138 static vector double __ATTRS_o_ai
vec_vperm(vector double __a,vector double __b,vector unsigned char __c)5139 vec_vperm(vector double __a, vector double __b, vector unsigned char __c)
5140 {
5141 return vec_perm(__a, __b, __c);
5142 }
5143 #endif
5144
5145 /* vec_re */
5146
5147 static vector float __attribute__((__always_inline__))
vec_re(vector float __a)5148 vec_re(vector float __a)
5149 {
5150 return __builtin_altivec_vrefp(__a);
5151 }
5152
5153 /* vec_vrefp */
5154
5155 static vector float __attribute__((__always_inline__))
vec_vrefp(vector float __a)5156 vec_vrefp(vector float __a)
5157 {
5158 return __builtin_altivec_vrefp(__a);
5159 }
5160
5161 /* vec_rl */
5162
5163 static vector signed char __ATTRS_o_ai
vec_rl(vector signed char __a,vector unsigned char __b)5164 vec_rl(vector signed char __a, vector unsigned char __b)
5165 {
5166 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
5167 }
5168
5169 static vector unsigned char __ATTRS_o_ai
vec_rl(vector unsigned char __a,vector unsigned char __b)5170 vec_rl(vector unsigned char __a, vector unsigned char __b)
5171 {
5172 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
5173 }
5174
5175 static vector short __ATTRS_o_ai
vec_rl(vector short __a,vector unsigned short __b)5176 vec_rl(vector short __a, vector unsigned short __b)
5177 {
5178 return __builtin_altivec_vrlh(__a, __b);
5179 }
5180
5181 static vector unsigned short __ATTRS_o_ai
vec_rl(vector unsigned short __a,vector unsigned short __b)5182 vec_rl(vector unsigned short __a, vector unsigned short __b)
5183 {
5184 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
5185 }
5186
5187 static vector int __ATTRS_o_ai
vec_rl(vector int __a,vector unsigned int __b)5188 vec_rl(vector int __a, vector unsigned int __b)
5189 {
5190 return __builtin_altivec_vrlw(__a, __b);
5191 }
5192
5193 static vector unsigned int __ATTRS_o_ai
vec_rl(vector unsigned int __a,vector unsigned int __b)5194 vec_rl(vector unsigned int __a, vector unsigned int __b)
5195 {
5196 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
5197 }
5198
5199 #ifdef __POWER8_VECTOR__
5200 static vector signed long long __ATTRS_o_ai
vec_rl(vector signed long long __a,vector unsigned long long __b)5201 vec_rl(vector signed long long __a, vector unsigned long long __b)
5202 {
5203 return __builtin_altivec_vrld(__a, __b);
5204 }
5205
5206 static vector unsigned long long __ATTRS_o_ai
vec_rl(vector unsigned long long __a,vector unsigned long long __b)5207 vec_rl(vector unsigned long long __a, vector unsigned long long __b)
5208 {
5209 return __builtin_altivec_vrld(__a, __b);
5210 }
5211 #endif
5212
5213 /* vec_vrlb */
5214
5215 static vector signed char __ATTRS_o_ai
vec_vrlb(vector signed char __a,vector unsigned char __b)5216 vec_vrlb(vector signed char __a, vector unsigned char __b)
5217 {
5218 return (vector signed char)__builtin_altivec_vrlb((vector char)__a, __b);
5219 }
5220
5221 static vector unsigned char __ATTRS_o_ai
vec_vrlb(vector unsigned char __a,vector unsigned char __b)5222 vec_vrlb(vector unsigned char __a, vector unsigned char __b)
5223 {
5224 return (vector unsigned char)__builtin_altivec_vrlb((vector char)__a, __b);
5225 }
5226
5227 /* vec_vrlh */
5228
5229 static vector short __ATTRS_o_ai
vec_vrlh(vector short __a,vector unsigned short __b)5230 vec_vrlh(vector short __a, vector unsigned short __b)
5231 {
5232 return __builtin_altivec_vrlh(__a, __b);
5233 }
5234
5235 static vector unsigned short __ATTRS_o_ai
vec_vrlh(vector unsigned short __a,vector unsigned short __b)5236 vec_vrlh(vector unsigned short __a, vector unsigned short __b)
5237 {
5238 return (vector unsigned short)__builtin_altivec_vrlh((vector short)__a, __b);
5239 }
5240
5241 /* vec_vrlw */
5242
5243 static vector int __ATTRS_o_ai
vec_vrlw(vector int __a,vector unsigned int __b)5244 vec_vrlw(vector int __a, vector unsigned int __b)
5245 {
5246 return __builtin_altivec_vrlw(__a, __b);
5247 }
5248
5249 static vector unsigned int __ATTRS_o_ai
vec_vrlw(vector unsigned int __a,vector unsigned int __b)5250 vec_vrlw(vector unsigned int __a, vector unsigned int __b)
5251 {
5252 return (vector unsigned int)__builtin_altivec_vrlw((vector int)__a, __b);
5253 }
5254
5255 /* vec_round */
5256
5257 static vector float __attribute__((__always_inline__))
vec_round(vector float __a)5258 vec_round(vector float __a)
5259 {
5260 return __builtin_altivec_vrfin(__a);
5261 }
5262
5263 /* vec_vrfin */
5264
5265 static vector float __attribute__((__always_inline__))
vec_vrfin(vector float __a)5266 vec_vrfin(vector float __a)
5267 {
5268 return __builtin_altivec_vrfin(__a);
5269 }
5270
5271 /* vec_rsqrte */
5272
5273 static __vector float __attribute__((__always_inline__))
vec_rsqrte(vector float __a)5274 vec_rsqrte(vector float __a)
5275 {
5276 return __builtin_altivec_vrsqrtefp(__a);
5277 }
5278
5279 /* vec_vrsqrtefp */
5280
5281 static __vector float __attribute__((__always_inline__))
vec_vrsqrtefp(vector float __a)5282 vec_vrsqrtefp(vector float __a)
5283 {
5284 return __builtin_altivec_vrsqrtefp(__a);
5285 }
5286
5287 /* vec_sel */
5288
5289 #define __builtin_altivec_vsel_4si vec_sel
5290
5291 static vector signed char __ATTRS_o_ai
vec_sel(vector signed char __a,vector signed char __b,vector unsigned char __c)5292 vec_sel(vector signed char __a, vector signed char __b, vector unsigned char __c)
5293 {
5294 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5295 }
5296
5297 static vector signed char __ATTRS_o_ai
vec_sel(vector signed char __a,vector signed char __b,vector bool char __c)5298 vec_sel(vector signed char __a, vector signed char __b, vector bool char __c)
5299 {
5300 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5301 }
5302
5303 static vector unsigned char __ATTRS_o_ai
vec_sel(vector unsigned char __a,vector unsigned char __b,vector unsigned char __c)5304 vec_sel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c)
5305 {
5306 return (__a & ~__c) | (__b & __c);
5307 }
5308
5309 static vector unsigned char __ATTRS_o_ai
vec_sel(vector unsigned char __a,vector unsigned char __b,vector bool char __c)5310 vec_sel(vector unsigned char __a, vector unsigned char __b, vector bool char __c)
5311 {
5312 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
5313 }
5314
5315 static vector bool char __ATTRS_o_ai
vec_sel(vector bool char __a,vector bool char __b,vector unsigned char __c)5316 vec_sel(vector bool char __a, vector bool char __b, vector unsigned char __c)
5317 {
5318 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
5319 }
5320
5321 static vector bool char __ATTRS_o_ai
vec_sel(vector bool char __a,vector bool char __b,vector bool char __c)5322 vec_sel(vector bool char __a, vector bool char __b, vector bool char __c)
5323 {
5324 return (__a & ~__c) | (__b & __c);
5325 }
5326
5327 static vector short __ATTRS_o_ai
vec_sel(vector short __a,vector short __b,vector unsigned short __c)5328 vec_sel(vector short __a, vector short __b, vector unsigned short __c)
5329 {
5330 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5331 }
5332
5333 static vector short __ATTRS_o_ai
vec_sel(vector short __a,vector short __b,vector bool short __c)5334 vec_sel(vector short __a, vector short __b, vector bool short __c)
5335 {
5336 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5337 }
5338
5339 static vector unsigned short __ATTRS_o_ai
vec_sel(vector unsigned short __a,vector unsigned short __b,vector unsigned short __c)5340 vec_sel(vector unsigned short __a,
5341 vector unsigned short __b,
5342 vector unsigned short __c)
5343 {
5344 return (__a & ~__c) | (__b & __c);
5345 }
5346
5347 static vector unsigned short __ATTRS_o_ai
vec_sel(vector unsigned short __a,vector unsigned short __b,vector bool short __c)5348 vec_sel(vector unsigned short __a, vector unsigned short __b, vector bool short __c)
5349 {
5350 return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c);
5351 }
5352
5353 static vector bool short __ATTRS_o_ai
vec_sel(vector bool short __a,vector bool short __b,vector unsigned short __c)5354 vec_sel(vector bool short __a, vector bool short __b, vector unsigned short __c)
5355 {
5356 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
5357 }
5358
5359 static vector bool short __ATTRS_o_ai
vec_sel(vector bool short __a,vector bool short __b,vector bool short __c)5360 vec_sel(vector bool short __a, vector bool short __b, vector bool short __c)
5361 {
5362 return (__a & ~__c) | (__b & __c);
5363 }
5364
5365 static vector int __ATTRS_o_ai
vec_sel(vector int __a,vector int __b,vector unsigned int __c)5366 vec_sel(vector int __a, vector int __b, vector unsigned int __c)
5367 {
5368 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5369 }
5370
5371 static vector int __ATTRS_o_ai
vec_sel(vector int __a,vector int __b,vector bool int __c)5372 vec_sel(vector int __a, vector int __b, vector bool int __c)
5373 {
5374 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5375 }
5376
5377 static vector unsigned int __ATTRS_o_ai
vec_sel(vector unsigned int __a,vector unsigned int __b,vector unsigned int __c)5378 vec_sel(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c)
5379 {
5380 return (__a & ~__c) | (__b & __c);
5381 }
5382
5383 static vector unsigned int __ATTRS_o_ai
vec_sel(vector unsigned int __a,vector unsigned int __b,vector bool int __c)5384 vec_sel(vector unsigned int __a, vector unsigned int __b, vector bool int __c)
5385 {
5386 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
5387 }
5388
5389 static vector bool int __ATTRS_o_ai
vec_sel(vector bool int __a,vector bool int __b,vector unsigned int __c)5390 vec_sel(vector bool int __a, vector bool int __b, vector unsigned int __c)
5391 {
5392 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
5393 }
5394
5395 static vector bool int __ATTRS_o_ai
vec_sel(vector bool int __a,vector bool int __b,vector bool int __c)5396 vec_sel(vector bool int __a, vector bool int __b, vector bool int __c)
5397 {
5398 return (__a & ~__c) | (__b & __c);
5399 }
5400
5401 static vector float __ATTRS_o_ai
vec_sel(vector float __a,vector float __b,vector unsigned int __c)5402 vec_sel(vector float __a, vector float __b, vector unsigned int __c)
5403 {
5404 vector int __res = ((vector int)__a & ~(vector int)__c)
5405 | ((vector int)__b & (vector int)__c);
5406 return (vector float)__res;
5407 }
5408
5409 static vector float __ATTRS_o_ai
vec_sel(vector float __a,vector float __b,vector bool int __c)5410 vec_sel(vector float __a, vector float __b, vector bool int __c)
5411 {
5412 vector int __res = ((vector int)__a & ~(vector int)__c)
5413 | ((vector int)__b & (vector int)__c);
5414 return (vector float)__res;
5415 }
5416
5417 /* vec_vsel */
5418
5419 static vector signed char __ATTRS_o_ai
vec_vsel(vector signed char __a,vector signed char __b,vector unsigned char __c)5420 vec_vsel(vector signed char __a, vector signed char __b, vector unsigned char __c)
5421 {
5422 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5423 }
5424
5425 static vector signed char __ATTRS_o_ai
vec_vsel(vector signed char __a,vector signed char __b,vector bool char __c)5426 vec_vsel(vector signed char __a, vector signed char __b, vector bool char __c)
5427 {
5428 return (__a & ~(vector signed char)__c) | (__b & (vector signed char)__c);
5429 }
5430
5431 static vector unsigned char __ATTRS_o_ai
vec_vsel(vector unsigned char __a,vector unsigned char __b,vector unsigned char __c)5432 vec_vsel(vector unsigned char __a, vector unsigned char __b, vector unsigned char __c)
5433 {
5434 return (__a & ~__c) | (__b & __c);
5435 }
5436
5437 static vector unsigned char __ATTRS_o_ai
vec_vsel(vector unsigned char __a,vector unsigned char __b,vector bool char __c)5438 vec_vsel(vector unsigned char __a, vector unsigned char __b, vector bool char __c)
5439 {
5440 return (__a & ~(vector unsigned char)__c) | (__b & (vector unsigned char)__c);
5441 }
5442
5443 static vector bool char __ATTRS_o_ai
vec_vsel(vector bool char __a,vector bool char __b,vector unsigned char __c)5444 vec_vsel(vector bool char __a, vector bool char __b, vector unsigned char __c)
5445 {
5446 return (__a & ~(vector bool char)__c) | (__b & (vector bool char)__c);
5447 }
5448
5449 static vector bool char __ATTRS_o_ai
vec_vsel(vector bool char __a,vector bool char __b,vector bool char __c)5450 vec_vsel(vector bool char __a, vector bool char __b, vector bool char __c)
5451 {
5452 return (__a & ~__c) | (__b & __c);
5453 }
5454
5455 static vector short __ATTRS_o_ai
vec_vsel(vector short __a,vector short __b,vector unsigned short __c)5456 vec_vsel(vector short __a, vector short __b, vector unsigned short __c)
5457 {
5458 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5459 }
5460
5461 static vector short __ATTRS_o_ai
vec_vsel(vector short __a,vector short __b,vector bool short __c)5462 vec_vsel(vector short __a, vector short __b, vector bool short __c)
5463 {
5464 return (__a & ~(vector short)__c) | (__b & (vector short)__c);
5465 }
5466
5467 static vector unsigned short __ATTRS_o_ai
vec_vsel(vector unsigned short __a,vector unsigned short __b,vector unsigned short __c)5468 vec_vsel(vector unsigned short __a,
5469 vector unsigned short __b,
5470 vector unsigned short __c)
5471 {
5472 return (__a & ~__c) | (__b & __c);
5473 }
5474
5475 static vector unsigned short __ATTRS_o_ai
vec_vsel(vector unsigned short __a,vector unsigned short __b,vector bool short __c)5476 vec_vsel(vector unsigned short __a, vector unsigned short __b, vector bool short __c)
5477 {
5478 return (__a & ~(vector unsigned short)__c) | (__b & (vector unsigned short)__c);
5479 }
5480
5481 static vector bool short __ATTRS_o_ai
vec_vsel(vector bool short __a,vector bool short __b,vector unsigned short __c)5482 vec_vsel(vector bool short __a, vector bool short __b, vector unsigned short __c)
5483 {
5484 return (__a & ~(vector bool short)__c) | (__b & (vector bool short)__c);
5485 }
5486
5487 static vector bool short __ATTRS_o_ai
vec_vsel(vector bool short __a,vector bool short __b,vector bool short __c)5488 vec_vsel(vector bool short __a, vector bool short __b, vector bool short __c)
5489 {
5490 return (__a & ~__c) | (__b & __c);
5491 }
5492
5493 static vector int __ATTRS_o_ai
vec_vsel(vector int __a,vector int __b,vector unsigned int __c)5494 vec_vsel(vector int __a, vector int __b, vector unsigned int __c)
5495 {
5496 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5497 }
5498
5499 static vector int __ATTRS_o_ai
vec_vsel(vector int __a,vector int __b,vector bool int __c)5500 vec_vsel(vector int __a, vector int __b, vector bool int __c)
5501 {
5502 return (__a & ~(vector int)__c) | (__b & (vector int)__c);
5503 }
5504
5505 static vector unsigned int __ATTRS_o_ai
vec_vsel(vector unsigned int __a,vector unsigned int __b,vector unsigned int __c)5506 vec_vsel(vector unsigned int __a, vector unsigned int __b, vector unsigned int __c)
5507 {
5508 return (__a & ~__c) | (__b & __c);
5509 }
5510
5511 static vector unsigned int __ATTRS_o_ai
vec_vsel(vector unsigned int __a,vector unsigned int __b,vector bool int __c)5512 vec_vsel(vector unsigned int __a, vector unsigned int __b, vector bool int __c)
5513 {
5514 return (__a & ~(vector unsigned int)__c) | (__b & (vector unsigned int)__c);
5515 }
5516
5517 static vector bool int __ATTRS_o_ai
vec_vsel(vector bool int __a,vector bool int __b,vector unsigned int __c)5518 vec_vsel(vector bool int __a, vector bool int __b, vector unsigned int __c)
5519 {
5520 return (__a & ~(vector bool int)__c) | (__b & (vector bool int)__c);
5521 }
5522
5523 static vector bool int __ATTRS_o_ai
vec_vsel(vector bool int __a,vector bool int __b,vector bool int __c)5524 vec_vsel(vector bool int __a, vector bool int __b, vector bool int __c)
5525 {
5526 return (__a & ~__c) | (__b & __c);
5527 }
5528
5529 static vector float __ATTRS_o_ai
vec_vsel(vector float __a,vector float __b,vector unsigned int __c)5530 vec_vsel(vector float __a, vector float __b, vector unsigned int __c)
5531 {
5532 vector int __res = ((vector int)__a & ~(vector int)__c)
5533 | ((vector int)__b & (vector int)__c);
5534 return (vector float)__res;
5535 }
5536
5537 static vector float __ATTRS_o_ai
vec_vsel(vector float __a,vector float __b,vector bool int __c)5538 vec_vsel(vector float __a, vector float __b, vector bool int __c)
5539 {
5540 vector int __res = ((vector int)__a & ~(vector int)__c)
5541 | ((vector int)__b & (vector int)__c);
5542 return (vector float)__res;
5543 }
5544
5545 /* vec_sl */
5546
5547 static vector signed char __ATTRS_o_ai
vec_sl(vector signed char __a,vector unsigned char __b)5548 vec_sl(vector signed char __a, vector unsigned char __b)
5549 {
5550 return __a << (vector signed char)__b;
5551 }
5552
5553 static vector unsigned char __ATTRS_o_ai
vec_sl(vector unsigned char __a,vector unsigned char __b)5554 vec_sl(vector unsigned char __a, vector unsigned char __b)
5555 {
5556 return __a << __b;
5557 }
5558
5559 static vector short __ATTRS_o_ai
vec_sl(vector short __a,vector unsigned short __b)5560 vec_sl(vector short __a, vector unsigned short __b)
5561 {
5562 return __a << (vector short)__b;
5563 }
5564
5565 static vector unsigned short __ATTRS_o_ai
vec_sl(vector unsigned short __a,vector unsigned short __b)5566 vec_sl(vector unsigned short __a, vector unsigned short __b)
5567 {
5568 return __a << __b;
5569 }
5570
5571 static vector int __ATTRS_o_ai
vec_sl(vector int __a,vector unsigned int __b)5572 vec_sl(vector int __a, vector unsigned int __b)
5573 {
5574 return __a << (vector int)__b;
5575 }
5576
5577 static vector unsigned int __ATTRS_o_ai
vec_sl(vector unsigned int __a,vector unsigned int __b)5578 vec_sl(vector unsigned int __a, vector unsigned int __b)
5579 {
5580 return __a << __b;
5581 }
5582
5583 #ifdef __POWER8_VECTOR__
5584 static vector signed long long __ATTRS_o_ai
vec_sl(vector signed long long __a,vector unsigned long long __b)5585 vec_sl(vector signed long long __a, vector unsigned long long __b)
5586 {
5587 return __a << (vector long long)__b;
5588 }
5589
5590 static vector unsigned long long __ATTRS_o_ai
vec_sl(vector unsigned long long __a,vector unsigned long long __b)5591 vec_sl(vector unsigned long long __a, vector unsigned long long __b)
5592 {
5593 return __a << __b;
5594 }
5595 #endif
5596
5597 /* vec_vslb */
5598
5599 #define __builtin_altivec_vslb vec_vslb
5600
5601 static vector signed char __ATTRS_o_ai
vec_vslb(vector signed char __a,vector unsigned char __b)5602 vec_vslb(vector signed char __a, vector unsigned char __b)
5603 {
5604 return vec_sl(__a, __b);
5605 }
5606
5607 static vector unsigned char __ATTRS_o_ai
vec_vslb(vector unsigned char __a,vector unsigned char __b)5608 vec_vslb(vector unsigned char __a, vector unsigned char __b)
5609 {
5610 return vec_sl(__a, __b);
5611 }
5612
5613 /* vec_vslh */
5614
5615 #define __builtin_altivec_vslh vec_vslh
5616
5617 static vector short __ATTRS_o_ai
vec_vslh(vector short __a,vector unsigned short __b)5618 vec_vslh(vector short __a, vector unsigned short __b)
5619 {
5620 return vec_sl(__a, __b);
5621 }
5622
5623 static vector unsigned short __ATTRS_o_ai
vec_vslh(vector unsigned short __a,vector unsigned short __b)5624 vec_vslh(vector unsigned short __a, vector unsigned short __b)
5625 {
5626 return vec_sl(__a, __b);
5627 }
5628
5629 /* vec_vslw */
5630
5631 #define __builtin_altivec_vslw vec_vslw
5632
5633 static vector int __ATTRS_o_ai
vec_vslw(vector int __a,vector unsigned int __b)5634 vec_vslw(vector int __a, vector unsigned int __b)
5635 {
5636 return vec_sl(__a, __b);
5637 }
5638
5639 static vector unsigned int __ATTRS_o_ai
vec_vslw(vector unsigned int __a,vector unsigned int __b)5640 vec_vslw(vector unsigned int __a, vector unsigned int __b)
5641 {
5642 return vec_sl(__a, __b);
5643 }
5644
5645 /* vec_sld */
5646
5647 #define __builtin_altivec_vsldoi_4si vec_sld
5648
5649 static vector signed char __ATTRS_o_ai
vec_sld(vector signed char __a,vector signed char __b,unsigned char __c)5650 vec_sld(vector signed char __a, vector signed char __b, unsigned char __c)
5651 {
5652 return vec_perm(__a, __b, (vector unsigned char)
5653 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5654 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5655 }
5656
5657 static vector unsigned char __ATTRS_o_ai
vec_sld(vector unsigned char __a,vector unsigned char __b,unsigned char __c)5658 vec_sld(vector unsigned char __a, vector unsigned char __b, unsigned char __c)
5659 {
5660 return vec_perm(__a, __b, (vector unsigned char)
5661 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5662 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5663 }
5664
5665 static vector short __ATTRS_o_ai
vec_sld(vector short __a,vector short __b,unsigned char __c)5666 vec_sld(vector short __a, vector short __b, unsigned char __c)
5667 {
5668 return vec_perm(__a, __b, (vector unsigned char)
5669 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5670 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5671 }
5672
5673 static vector unsigned short __ATTRS_o_ai
vec_sld(vector unsigned short __a,vector unsigned short __b,unsigned char __c)5674 vec_sld(vector unsigned short __a, vector unsigned short __b, unsigned char __c)
5675 {
5676 return vec_perm(__a, __b, (vector unsigned char)
5677 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5678 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5679 }
5680
5681 static vector pixel __ATTRS_o_ai
vec_sld(vector pixel __a,vector pixel __b,unsigned char __c)5682 vec_sld(vector pixel __a, vector pixel __b, unsigned char __c)
5683 {
5684 return vec_perm(__a, __b, (vector unsigned char)
5685 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5686 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5687 }
5688
5689 static vector int __ATTRS_o_ai
vec_sld(vector int __a,vector int __b,unsigned char __c)5690 vec_sld(vector int __a, vector int __b, unsigned char __c)
5691 {
5692 return vec_perm(__a, __b, (vector unsigned char)
5693 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5694 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5695 }
5696
5697 static vector unsigned int __ATTRS_o_ai
vec_sld(vector unsigned int __a,vector unsigned int __b,unsigned char __c)5698 vec_sld(vector unsigned int __a, vector unsigned int __b, unsigned char __c)
5699 {
5700 return vec_perm(__a, __b, (vector unsigned char)
5701 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5702 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5703 }
5704
5705 static vector float __ATTRS_o_ai
vec_sld(vector float __a,vector float __b,unsigned char __c)5706 vec_sld(vector float __a, vector float __b, unsigned char __c)
5707 {
5708 return vec_perm(__a, __b, (vector unsigned char)
5709 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5710 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5711 }
5712
5713 /* vec_vsldoi */
5714
5715 static vector signed char __ATTRS_o_ai
vec_vsldoi(vector signed char __a,vector signed char __b,unsigned char __c)5716 vec_vsldoi(vector signed char __a, vector signed char __b, unsigned char __c)
5717 {
5718 return vec_perm(__a, __b, (vector unsigned char)
5719 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5720 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5721 }
5722
5723 static vector unsigned char __ATTRS_o_ai
vec_vsldoi(vector unsigned char __a,vector unsigned char __b,unsigned char __c)5724 vec_vsldoi(vector unsigned char __a, vector unsigned char __b, unsigned char __c)
5725 {
5726 return vec_perm(__a, __b, (vector unsigned char)
5727 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5728 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5729 }
5730
5731 static vector short __ATTRS_o_ai
vec_vsldoi(vector short __a,vector short __b,unsigned char __c)5732 vec_vsldoi(vector short __a, vector short __b, unsigned char __c)
5733 {
5734 return vec_perm(__a, __b, (vector unsigned char)
5735 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5736 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5737 }
5738
5739 static vector unsigned short __ATTRS_o_ai
vec_vsldoi(vector unsigned short __a,vector unsigned short __b,unsigned char __c)5740 vec_vsldoi(vector unsigned short __a, vector unsigned short __b, unsigned char __c)
5741 {
5742 return vec_perm(__a, __b, (vector unsigned char)
5743 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5744 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5745 }
5746
5747 static vector pixel __ATTRS_o_ai
vec_vsldoi(vector pixel __a,vector pixel __b,unsigned char __c)5748 vec_vsldoi(vector pixel __a, vector pixel __b, unsigned char __c)
5749 {
5750 return vec_perm(__a, __b, (vector unsigned char)
5751 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5752 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5753 }
5754
5755 static vector int __ATTRS_o_ai
vec_vsldoi(vector int __a,vector int __b,unsigned char __c)5756 vec_vsldoi(vector int __a, vector int __b, unsigned char __c)
5757 {
5758 return vec_perm(__a, __b, (vector unsigned char)
5759 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5760 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5761 }
5762
5763 static vector unsigned int __ATTRS_o_ai
vec_vsldoi(vector unsigned int __a,vector unsigned int __b,unsigned char __c)5764 vec_vsldoi(vector unsigned int __a, vector unsigned int __b, unsigned char __c)
5765 {
5766 return vec_perm(__a, __b, (vector unsigned char)
5767 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5768 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5769 }
5770
5771 static vector float __ATTRS_o_ai
vec_vsldoi(vector float __a,vector float __b,unsigned char __c)5772 vec_vsldoi(vector float __a, vector float __b, unsigned char __c)
5773 {
5774 return vec_perm(__a, __b, (vector unsigned char)
5775 (__c, __c+1, __c+2, __c+3, __c+4, __c+5, __c+6, __c+7,
5776 __c+8, __c+9, __c+10, __c+11, __c+12, __c+13, __c+14, __c+15));
5777 }
5778
5779 /* vec_sll */
5780
5781 static vector signed char __ATTRS_o_ai
vec_sll(vector signed char __a,vector unsigned char __b)5782 vec_sll(vector signed char __a, vector unsigned char __b)
5783 {
5784 return (vector signed char)
5785 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5786 }
5787
5788 static vector signed char __ATTRS_o_ai
vec_sll(vector signed char __a,vector unsigned short __b)5789 vec_sll(vector signed char __a, vector unsigned short __b)
5790 {
5791 return (vector signed char)
5792 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5793 }
5794
5795 static vector signed char __ATTRS_o_ai
vec_sll(vector signed char __a,vector unsigned int __b)5796 vec_sll(vector signed char __a, vector unsigned int __b)
5797 {
5798 return (vector signed char)
5799 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5800 }
5801
5802 static vector unsigned char __ATTRS_o_ai
vec_sll(vector unsigned char __a,vector unsigned char __b)5803 vec_sll(vector unsigned char __a, vector unsigned char __b)
5804 {
5805 return (vector unsigned char)
5806 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5807 }
5808
5809 static vector unsigned char __ATTRS_o_ai
vec_sll(vector unsigned char __a,vector unsigned short __b)5810 vec_sll(vector unsigned char __a, vector unsigned short __b)
5811 {
5812 return (vector unsigned char)
5813 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5814 }
5815
5816 static vector unsigned char __ATTRS_o_ai
vec_sll(vector unsigned char __a,vector unsigned int __b)5817 vec_sll(vector unsigned char __a, vector unsigned int __b)
5818 {
5819 return (vector unsigned char)
5820 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5821 }
5822
5823 static vector bool char __ATTRS_o_ai
vec_sll(vector bool char __a,vector unsigned char __b)5824 vec_sll(vector bool char __a, vector unsigned char __b)
5825 {
5826 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5827 }
5828
5829 static vector bool char __ATTRS_o_ai
vec_sll(vector bool char __a,vector unsigned short __b)5830 vec_sll(vector bool char __a, vector unsigned short __b)
5831 {
5832 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5833 }
5834
5835 static vector bool char __ATTRS_o_ai
vec_sll(vector bool char __a,vector unsigned int __b)5836 vec_sll(vector bool char __a, vector unsigned int __b)
5837 {
5838 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5839 }
5840
5841 static vector short __ATTRS_o_ai
vec_sll(vector short __a,vector unsigned char __b)5842 vec_sll(vector short __a, vector unsigned char __b)
5843 {
5844 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5845 }
5846
5847 static vector short __ATTRS_o_ai
vec_sll(vector short __a,vector unsigned short __b)5848 vec_sll(vector short __a, vector unsigned short __b)
5849 {
5850 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5851 }
5852
5853 static vector short __ATTRS_o_ai
vec_sll(vector short __a,vector unsigned int __b)5854 vec_sll(vector short __a, vector unsigned int __b)
5855 {
5856 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5857 }
5858
5859 static vector unsigned short __ATTRS_o_ai
vec_sll(vector unsigned short __a,vector unsigned char __b)5860 vec_sll(vector unsigned short __a, vector unsigned char __b)
5861 {
5862 return (vector unsigned short)
5863 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5864 }
5865
5866 static vector unsigned short __ATTRS_o_ai
vec_sll(vector unsigned short __a,vector unsigned short __b)5867 vec_sll(vector unsigned short __a, vector unsigned short __b)
5868 {
5869 return (vector unsigned short)
5870 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5871 }
5872
5873 static vector unsigned short __ATTRS_o_ai
vec_sll(vector unsigned short __a,vector unsigned int __b)5874 vec_sll(vector unsigned short __a, vector unsigned int __b)
5875 {
5876 return (vector unsigned short)
5877 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5878 }
5879
5880 static vector bool short __ATTRS_o_ai
vec_sll(vector bool short __a,vector unsigned char __b)5881 vec_sll(vector bool short __a, vector unsigned char __b)
5882 {
5883 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5884 }
5885
5886 static vector bool short __ATTRS_o_ai
vec_sll(vector bool short __a,vector unsigned short __b)5887 vec_sll(vector bool short __a, vector unsigned short __b)
5888 {
5889 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5890 }
5891
5892 static vector bool short __ATTRS_o_ai
vec_sll(vector bool short __a,vector unsigned int __b)5893 vec_sll(vector bool short __a, vector unsigned int __b)
5894 {
5895 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5896 }
5897
5898 static vector pixel __ATTRS_o_ai
vec_sll(vector pixel __a,vector unsigned char __b)5899 vec_sll(vector pixel __a, vector unsigned char __b)
5900 {
5901 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5902 }
5903
5904 static vector pixel __ATTRS_o_ai
vec_sll(vector pixel __a,vector unsigned short __b)5905 vec_sll(vector pixel __a, vector unsigned short __b)
5906 {
5907 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5908 }
5909
5910 static vector pixel __ATTRS_o_ai
vec_sll(vector pixel __a,vector unsigned int __b)5911 vec_sll(vector pixel __a, vector unsigned int __b)
5912 {
5913 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5914 }
5915
5916 static vector int __ATTRS_o_ai
vec_sll(vector int __a,vector unsigned char __b)5917 vec_sll(vector int __a, vector unsigned char __b)
5918 {
5919 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5920 }
5921
5922 static vector int __ATTRS_o_ai
vec_sll(vector int __a,vector unsigned short __b)5923 vec_sll(vector int __a, vector unsigned short __b)
5924 {
5925 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5926 }
5927
5928 static vector int __ATTRS_o_ai
vec_sll(vector int __a,vector unsigned int __b)5929 vec_sll(vector int __a, vector unsigned int __b)
5930 {
5931 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
5932 }
5933
5934 static vector unsigned int __ATTRS_o_ai
vec_sll(vector unsigned int __a,vector unsigned char __b)5935 vec_sll(vector unsigned int __a, vector unsigned char __b)
5936 {
5937 return (vector unsigned int)
5938 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5939 }
5940
5941 static vector unsigned int __ATTRS_o_ai
vec_sll(vector unsigned int __a,vector unsigned short __b)5942 vec_sll(vector unsigned int __a, vector unsigned short __b)
5943 {
5944 return (vector unsigned int)
5945 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5946 }
5947
5948 static vector unsigned int __ATTRS_o_ai
vec_sll(vector unsigned int __a,vector unsigned int __b)5949 vec_sll(vector unsigned int __a, vector unsigned int __b)
5950 {
5951 return (vector unsigned int)
5952 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5953 }
5954
5955 static vector bool int __ATTRS_o_ai
vec_sll(vector bool int __a,vector unsigned char __b)5956 vec_sll(vector bool int __a, vector unsigned char __b)
5957 {
5958 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5959 }
5960
5961 static vector bool int __ATTRS_o_ai
vec_sll(vector bool int __a,vector unsigned short __b)5962 vec_sll(vector bool int __a, vector unsigned short __b)
5963 {
5964 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5965 }
5966
5967 static vector bool int __ATTRS_o_ai
vec_sll(vector bool int __a,vector unsigned int __b)5968 vec_sll(vector bool int __a, vector unsigned int __b)
5969 {
5970 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
5971 }
5972
5973 /* vec_vsl */
5974
5975 static vector signed char __ATTRS_o_ai
vec_vsl(vector signed char __a,vector unsigned char __b)5976 vec_vsl(vector signed char __a, vector unsigned char __b)
5977 {
5978 return (vector signed char)
5979 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5980 }
5981
5982 static vector signed char __ATTRS_o_ai
vec_vsl(vector signed char __a,vector unsigned short __b)5983 vec_vsl(vector signed char __a, vector unsigned short __b)
5984 {
5985 return (vector signed char)
5986 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5987 }
5988
5989 static vector signed char __ATTRS_o_ai
vec_vsl(vector signed char __a,vector unsigned int __b)5990 vec_vsl(vector signed char __a, vector unsigned int __b)
5991 {
5992 return (vector signed char)
5993 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
5994 }
5995
5996 static vector unsigned char __ATTRS_o_ai
vec_vsl(vector unsigned char __a,vector unsigned char __b)5997 vec_vsl(vector unsigned char __a, vector unsigned char __b)
5998 {
5999 return (vector unsigned char)
6000 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6001 }
6002
6003 static vector unsigned char __ATTRS_o_ai
vec_vsl(vector unsigned char __a,vector unsigned short __b)6004 vec_vsl(vector unsigned char __a, vector unsigned short __b)
6005 {
6006 return (vector unsigned char)
6007 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6008 }
6009
6010 static vector unsigned char __ATTRS_o_ai
vec_vsl(vector unsigned char __a,vector unsigned int __b)6011 vec_vsl(vector unsigned char __a, vector unsigned int __b)
6012 {
6013 return (vector unsigned char)
6014 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6015 }
6016
6017 static vector bool char __ATTRS_o_ai
vec_vsl(vector bool char __a,vector unsigned char __b)6018 vec_vsl(vector bool char __a, vector unsigned char __b)
6019 {
6020 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6021 }
6022
6023 static vector bool char __ATTRS_o_ai
vec_vsl(vector bool char __a,vector unsigned short __b)6024 vec_vsl(vector bool char __a, vector unsigned short __b)
6025 {
6026 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6027 }
6028
6029 static vector bool char __ATTRS_o_ai
vec_vsl(vector bool char __a,vector unsigned int __b)6030 vec_vsl(vector bool char __a, vector unsigned int __b)
6031 {
6032 return (vector bool char)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6033 }
6034
6035 static vector short __ATTRS_o_ai
vec_vsl(vector short __a,vector unsigned char __b)6036 vec_vsl(vector short __a, vector unsigned char __b)
6037 {
6038 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6039 }
6040
6041 static vector short __ATTRS_o_ai
vec_vsl(vector short __a,vector unsigned short __b)6042 vec_vsl(vector short __a, vector unsigned short __b)
6043 {
6044 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6045 }
6046
6047 static vector short __ATTRS_o_ai
vec_vsl(vector short __a,vector unsigned int __b)6048 vec_vsl(vector short __a, vector unsigned int __b)
6049 {
6050 return (vector short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6051 }
6052
6053 static vector unsigned short __ATTRS_o_ai
vec_vsl(vector unsigned short __a,vector unsigned char __b)6054 vec_vsl(vector unsigned short __a, vector unsigned char __b)
6055 {
6056 return (vector unsigned short)
6057 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6058 }
6059
6060 static vector unsigned short __ATTRS_o_ai
vec_vsl(vector unsigned short __a,vector unsigned short __b)6061 vec_vsl(vector unsigned short __a, vector unsigned short __b)
6062 {
6063 return (vector unsigned short)
6064 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6065 }
6066
6067 static vector unsigned short __ATTRS_o_ai
vec_vsl(vector unsigned short __a,vector unsigned int __b)6068 vec_vsl(vector unsigned short __a, vector unsigned int __b)
6069 {
6070 return (vector unsigned short)
6071 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6072 }
6073
6074 static vector bool short __ATTRS_o_ai
vec_vsl(vector bool short __a,vector unsigned char __b)6075 vec_vsl(vector bool short __a, vector unsigned char __b)
6076 {
6077 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6078 }
6079
6080 static vector bool short __ATTRS_o_ai
vec_vsl(vector bool short __a,vector unsigned short __b)6081 vec_vsl(vector bool short __a, vector unsigned short __b)
6082 {
6083 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6084 }
6085
6086 static vector bool short __ATTRS_o_ai
vec_vsl(vector bool short __a,vector unsigned int __b)6087 vec_vsl(vector bool short __a, vector unsigned int __b)
6088 {
6089 return (vector bool short)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6090 }
6091
6092 static vector pixel __ATTRS_o_ai
vec_vsl(vector pixel __a,vector unsigned char __b)6093 vec_vsl(vector pixel __a, vector unsigned char __b)
6094 {
6095 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6096 }
6097
6098 static vector pixel __ATTRS_o_ai
vec_vsl(vector pixel __a,vector unsigned short __b)6099 vec_vsl(vector pixel __a, vector unsigned short __b)
6100 {
6101 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6102 }
6103
6104 static vector pixel __ATTRS_o_ai
vec_vsl(vector pixel __a,vector unsigned int __b)6105 vec_vsl(vector pixel __a, vector unsigned int __b)
6106 {
6107 return (vector pixel)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6108 }
6109
6110 static vector int __ATTRS_o_ai
vec_vsl(vector int __a,vector unsigned char __b)6111 vec_vsl(vector int __a, vector unsigned char __b)
6112 {
6113 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6114 }
6115
6116 static vector int __ATTRS_o_ai
vec_vsl(vector int __a,vector unsigned short __b)6117 vec_vsl(vector int __a, vector unsigned short __b)
6118 {
6119 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6120 }
6121
6122 static vector int __ATTRS_o_ai
vec_vsl(vector int __a,vector unsigned int __b)6123 vec_vsl(vector int __a, vector unsigned int __b)
6124 {
6125 return (vector int)__builtin_altivec_vsl(__a, (vector int)__b);
6126 }
6127
6128 static vector unsigned int __ATTRS_o_ai
vec_vsl(vector unsigned int __a,vector unsigned char __b)6129 vec_vsl(vector unsigned int __a, vector unsigned char __b)
6130 {
6131 return (vector unsigned int)
6132 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6133 }
6134
6135 static vector unsigned int __ATTRS_o_ai
vec_vsl(vector unsigned int __a,vector unsigned short __b)6136 vec_vsl(vector unsigned int __a, vector unsigned short __b)
6137 {
6138 return (vector unsigned int)
6139 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6140 }
6141
6142 static vector unsigned int __ATTRS_o_ai
vec_vsl(vector unsigned int __a,vector unsigned int __b)6143 vec_vsl(vector unsigned int __a, vector unsigned int __b)
6144 {
6145 return (vector unsigned int)
6146 __builtin_altivec_vsl((vector int)__a, (vector int)__b);
6147 }
6148
6149 static vector bool int __ATTRS_o_ai
vec_vsl(vector bool int __a,vector unsigned char __b)6150 vec_vsl(vector bool int __a, vector unsigned char __b)
6151 {
6152 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6153 }
6154
6155 static vector bool int __ATTRS_o_ai
vec_vsl(vector bool int __a,vector unsigned short __b)6156 vec_vsl(vector bool int __a, vector unsigned short __b)
6157 {
6158 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6159 }
6160
6161 static vector bool int __ATTRS_o_ai
vec_vsl(vector bool int __a,vector unsigned int __b)6162 vec_vsl(vector bool int __a, vector unsigned int __b)
6163 {
6164 return (vector bool int)__builtin_altivec_vsl((vector int)__a, (vector int)__b);
6165 }
6166
6167 /* vec_slo */
6168
6169 static vector signed char __ATTRS_o_ai
vec_slo(vector signed char __a,vector signed char __b)6170 vec_slo(vector signed char __a, vector signed char __b)
6171 {
6172 return (vector signed char)
6173 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6174 }
6175
6176 static vector signed char __ATTRS_o_ai
vec_slo(vector signed char __a,vector unsigned char __b)6177 vec_slo(vector signed char __a, vector unsigned char __b)
6178 {
6179 return (vector signed char)
6180 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6181 }
6182
6183 static vector unsigned char __ATTRS_o_ai
vec_slo(vector unsigned char __a,vector signed char __b)6184 vec_slo(vector unsigned char __a, vector signed char __b)
6185 {
6186 return (vector unsigned char)
6187 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6188 }
6189
6190 static vector unsigned char __ATTRS_o_ai
vec_slo(vector unsigned char __a,vector unsigned char __b)6191 vec_slo(vector unsigned char __a, vector unsigned char __b)
6192 {
6193 return (vector unsigned char)
6194 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6195 }
6196
6197 static vector short __ATTRS_o_ai
vec_slo(vector short __a,vector signed char __b)6198 vec_slo(vector short __a, vector signed char __b)
6199 {
6200 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6201 }
6202
6203 static vector short __ATTRS_o_ai
vec_slo(vector short __a,vector unsigned char __b)6204 vec_slo(vector short __a, vector unsigned char __b)
6205 {
6206 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6207 }
6208
6209 static vector unsigned short __ATTRS_o_ai
vec_slo(vector unsigned short __a,vector signed char __b)6210 vec_slo(vector unsigned short __a, vector signed char __b)
6211 {
6212 return (vector unsigned short)
6213 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6214 }
6215
6216 static vector unsigned short __ATTRS_o_ai
vec_slo(vector unsigned short __a,vector unsigned char __b)6217 vec_slo(vector unsigned short __a, vector unsigned char __b)
6218 {
6219 return (vector unsigned short)
6220 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6221 }
6222
6223 static vector pixel __ATTRS_o_ai
vec_slo(vector pixel __a,vector signed char __b)6224 vec_slo(vector pixel __a, vector signed char __b)
6225 {
6226 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6227 }
6228
6229 static vector pixel __ATTRS_o_ai
vec_slo(vector pixel __a,vector unsigned char __b)6230 vec_slo(vector pixel __a, vector unsigned char __b)
6231 {
6232 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6233 }
6234
6235 static vector int __ATTRS_o_ai
vec_slo(vector int __a,vector signed char __b)6236 vec_slo(vector int __a, vector signed char __b)
6237 {
6238 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6239 }
6240
6241 static vector int __ATTRS_o_ai
vec_slo(vector int __a,vector unsigned char __b)6242 vec_slo(vector int __a, vector unsigned char __b)
6243 {
6244 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6245 }
6246
6247 static vector unsigned int __ATTRS_o_ai
vec_slo(vector unsigned int __a,vector signed char __b)6248 vec_slo(vector unsigned int __a, vector signed char __b)
6249 {
6250 return (vector unsigned int)
6251 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6252 }
6253
6254 static vector unsigned int __ATTRS_o_ai
vec_slo(vector unsigned int __a,vector unsigned char __b)6255 vec_slo(vector unsigned int __a, vector unsigned char __b)
6256 {
6257 return (vector unsigned int)
6258 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6259 }
6260
6261 static vector float __ATTRS_o_ai
vec_slo(vector float __a,vector signed char __b)6262 vec_slo(vector float __a, vector signed char __b)
6263 {
6264 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6265 }
6266
6267 static vector float __ATTRS_o_ai
vec_slo(vector float __a,vector unsigned char __b)6268 vec_slo(vector float __a, vector unsigned char __b)
6269 {
6270 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6271 }
6272
6273 /* vec_vslo */
6274
6275 static vector signed char __ATTRS_o_ai
vec_vslo(vector signed char __a,vector signed char __b)6276 vec_vslo(vector signed char __a, vector signed char __b)
6277 {
6278 return (vector signed char)
6279 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6280 }
6281
6282 static vector signed char __ATTRS_o_ai
vec_vslo(vector signed char __a,vector unsigned char __b)6283 vec_vslo(vector signed char __a, vector unsigned char __b)
6284 {
6285 return (vector signed char)
6286 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6287 }
6288
6289 static vector unsigned char __ATTRS_o_ai
vec_vslo(vector unsigned char __a,vector signed char __b)6290 vec_vslo(vector unsigned char __a, vector signed char __b)
6291 {
6292 return (vector unsigned char)
6293 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6294 }
6295
6296 static vector unsigned char __ATTRS_o_ai
vec_vslo(vector unsigned char __a,vector unsigned char __b)6297 vec_vslo(vector unsigned char __a, vector unsigned char __b)
6298 {
6299 return (vector unsigned char)
6300 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6301 }
6302
6303 static vector short __ATTRS_o_ai
vec_vslo(vector short __a,vector signed char __b)6304 vec_vslo(vector short __a, vector signed char __b)
6305 {
6306 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6307 }
6308
6309 static vector short __ATTRS_o_ai
vec_vslo(vector short __a,vector unsigned char __b)6310 vec_vslo(vector short __a, vector unsigned char __b)
6311 {
6312 return (vector short)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6313 }
6314
6315 static vector unsigned short __ATTRS_o_ai
vec_vslo(vector unsigned short __a,vector signed char __b)6316 vec_vslo(vector unsigned short __a, vector signed char __b)
6317 {
6318 return (vector unsigned short)
6319 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6320 }
6321
6322 static vector unsigned short __ATTRS_o_ai
vec_vslo(vector unsigned short __a,vector unsigned char __b)6323 vec_vslo(vector unsigned short __a, vector unsigned char __b)
6324 {
6325 return (vector unsigned short)
6326 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6327 }
6328
6329 static vector pixel __ATTRS_o_ai
vec_vslo(vector pixel __a,vector signed char __b)6330 vec_vslo(vector pixel __a, vector signed char __b)
6331 {
6332 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6333 }
6334
6335 static vector pixel __ATTRS_o_ai
vec_vslo(vector pixel __a,vector unsigned char __b)6336 vec_vslo(vector pixel __a, vector unsigned char __b)
6337 {
6338 return (vector pixel)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6339 }
6340
6341 static vector int __ATTRS_o_ai
vec_vslo(vector int __a,vector signed char __b)6342 vec_vslo(vector int __a, vector signed char __b)
6343 {
6344 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6345 }
6346
6347 static vector int __ATTRS_o_ai
vec_vslo(vector int __a,vector unsigned char __b)6348 vec_vslo(vector int __a, vector unsigned char __b)
6349 {
6350 return (vector int)__builtin_altivec_vslo(__a, (vector int)__b);
6351 }
6352
6353 static vector unsigned int __ATTRS_o_ai
vec_vslo(vector unsigned int __a,vector signed char __b)6354 vec_vslo(vector unsigned int __a, vector signed char __b)
6355 {
6356 return (vector unsigned int)
6357 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6358 }
6359
6360 static vector unsigned int __ATTRS_o_ai
vec_vslo(vector unsigned int __a,vector unsigned char __b)6361 vec_vslo(vector unsigned int __a, vector unsigned char __b)
6362 {
6363 return (vector unsigned int)
6364 __builtin_altivec_vslo((vector int)__a, (vector int)__b);
6365 }
6366
6367 static vector float __ATTRS_o_ai
vec_vslo(vector float __a,vector signed char __b)6368 vec_vslo(vector float __a, vector signed char __b)
6369 {
6370 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6371 }
6372
6373 static vector float __ATTRS_o_ai
vec_vslo(vector float __a,vector unsigned char __b)6374 vec_vslo(vector float __a, vector unsigned char __b)
6375 {
6376 return (vector float)__builtin_altivec_vslo((vector int)__a, (vector int)__b);
6377 }
6378
6379 /* vec_splat */
6380
6381 static vector signed char __ATTRS_o_ai
vec_splat(vector signed char __a,unsigned char __b)6382 vec_splat(vector signed char __a, unsigned char __b)
6383 {
6384 return vec_perm(__a, __a, (vector unsigned char)(__b));
6385 }
6386
6387 static vector unsigned char __ATTRS_o_ai
vec_splat(vector unsigned char __a,unsigned char __b)6388 vec_splat(vector unsigned char __a, unsigned char __b)
6389 {
6390 return vec_perm(__a, __a, (vector unsigned char)(__b));
6391 }
6392
6393 static vector bool char __ATTRS_o_ai
vec_splat(vector bool char __a,unsigned char __b)6394 vec_splat(vector bool char __a, unsigned char __b)
6395 {
6396 return vec_perm(__a, __a, (vector unsigned char)(__b));
6397 }
6398
6399 static vector short __ATTRS_o_ai
vec_splat(vector short __a,unsigned char __b)6400 vec_splat(vector short __a, unsigned char __b)
6401 {
6402 __b *= 2;
6403 unsigned char b1=__b+1;
6404 return vec_perm(__a, __a, (vector unsigned char)
6405 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6406 }
6407
6408 static vector unsigned short __ATTRS_o_ai
vec_splat(vector unsigned short __a,unsigned char __b)6409 vec_splat(vector unsigned short __a, unsigned char __b)
6410 {
6411 __b *= 2;
6412 unsigned char b1=__b+1;
6413 return vec_perm(__a, __a, (vector unsigned char)
6414 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6415 }
6416
6417 static vector bool short __ATTRS_o_ai
vec_splat(vector bool short __a,unsigned char __b)6418 vec_splat(vector bool short __a, unsigned char __b)
6419 {
6420 __b *= 2;
6421 unsigned char b1=__b+1;
6422 return vec_perm(__a, __a, (vector unsigned char)
6423 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6424 }
6425
6426 static vector pixel __ATTRS_o_ai
vec_splat(vector pixel __a,unsigned char __b)6427 vec_splat(vector pixel __a, unsigned char __b)
6428 {
6429 __b *= 2;
6430 unsigned char b1=__b+1;
6431 return vec_perm(__a, __a, (vector unsigned char)
6432 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6433 }
6434
6435 static vector int __ATTRS_o_ai
vec_splat(vector int __a,unsigned char __b)6436 vec_splat(vector int __a, unsigned char __b)
6437 {
6438 __b *= 4;
6439 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6440 return vec_perm(__a, __a, (vector unsigned char)
6441 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6442 }
6443
6444 static vector unsigned int __ATTRS_o_ai
vec_splat(vector unsigned int __a,unsigned char __b)6445 vec_splat(vector unsigned int __a, unsigned char __b)
6446 {
6447 __b *= 4;
6448 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6449 return vec_perm(__a, __a, (vector unsigned char)
6450 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6451 }
6452
6453 static vector bool int __ATTRS_o_ai
vec_splat(vector bool int __a,unsigned char __b)6454 vec_splat(vector bool int __a, unsigned char __b)
6455 {
6456 __b *= 4;
6457 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6458 return vec_perm(__a, __a, (vector unsigned char)
6459 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6460 }
6461
6462 static vector float __ATTRS_o_ai
vec_splat(vector float __a,unsigned char __b)6463 vec_splat(vector float __a, unsigned char __b)
6464 {
6465 __b *= 4;
6466 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6467 return vec_perm(__a, __a, (vector unsigned char)
6468 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6469 }
6470
6471 /* vec_vspltb */
6472
6473 #define __builtin_altivec_vspltb vec_vspltb
6474
6475 static vector signed char __ATTRS_o_ai
vec_vspltb(vector signed char __a,unsigned char __b)6476 vec_vspltb(vector signed char __a, unsigned char __b)
6477 {
6478 return vec_perm(__a, __a, (vector unsigned char)(__b));
6479 }
6480
6481 static vector unsigned char __ATTRS_o_ai
vec_vspltb(vector unsigned char __a,unsigned char __b)6482 vec_vspltb(vector unsigned char __a, unsigned char __b)
6483 {
6484 return vec_perm(__a, __a, (vector unsigned char)(__b));
6485 }
6486
6487 static vector bool char __ATTRS_o_ai
vec_vspltb(vector bool char __a,unsigned char __b)6488 vec_vspltb(vector bool char __a, unsigned char __b)
6489 {
6490 return vec_perm(__a, __a, (vector unsigned char)(__b));
6491 }
6492
6493 /* vec_vsplth */
6494
6495 #define __builtin_altivec_vsplth vec_vsplth
6496
6497 static vector short __ATTRS_o_ai
vec_vsplth(vector short __a,unsigned char __b)6498 vec_vsplth(vector short __a, unsigned char __b)
6499 {
6500 __b *= 2;
6501 unsigned char b1=__b+1;
6502 return vec_perm(__a, __a, (vector unsigned char)
6503 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6504 }
6505
6506 static vector unsigned short __ATTRS_o_ai
vec_vsplth(vector unsigned short __a,unsigned char __b)6507 vec_vsplth(vector unsigned short __a, unsigned char __b)
6508 {
6509 __b *= 2;
6510 unsigned char b1=__b+1;
6511 return vec_perm(__a, __a, (vector unsigned char)
6512 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6513 }
6514
6515 static vector bool short __ATTRS_o_ai
vec_vsplth(vector bool short __a,unsigned char __b)6516 vec_vsplth(vector bool short __a, unsigned char __b)
6517 {
6518 __b *= 2;
6519 unsigned char b1=__b+1;
6520 return vec_perm(__a, __a, (vector unsigned char)
6521 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6522 }
6523
6524 static vector pixel __ATTRS_o_ai
vec_vsplth(vector pixel __a,unsigned char __b)6525 vec_vsplth(vector pixel __a, unsigned char __b)
6526 {
6527 __b *= 2;
6528 unsigned char b1=__b+1;
6529 return vec_perm(__a, __a, (vector unsigned char)
6530 (__b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1, __b, b1));
6531 }
6532
6533 /* vec_vspltw */
6534
6535 #define __builtin_altivec_vspltw vec_vspltw
6536
6537 static vector int __ATTRS_o_ai
vec_vspltw(vector int __a,unsigned char __b)6538 vec_vspltw(vector int __a, unsigned char __b)
6539 {
6540 __b *= 4;
6541 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6542 return vec_perm(__a, __a, (vector unsigned char)
6543 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6544 }
6545
6546 static vector unsigned int __ATTRS_o_ai
vec_vspltw(vector unsigned int __a,unsigned char __b)6547 vec_vspltw(vector unsigned int __a, unsigned char __b)
6548 {
6549 __b *= 4;
6550 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6551 return vec_perm(__a, __a, (vector unsigned char)
6552 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6553 }
6554
6555 static vector bool int __ATTRS_o_ai
vec_vspltw(vector bool int __a,unsigned char __b)6556 vec_vspltw(vector bool int __a, unsigned char __b)
6557 {
6558 __b *= 4;
6559 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6560 return vec_perm(__a, __a, (vector unsigned char)
6561 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6562 }
6563
6564 static vector float __ATTRS_o_ai
vec_vspltw(vector float __a,unsigned char __b)6565 vec_vspltw(vector float __a, unsigned char __b)
6566 {
6567 __b *= 4;
6568 unsigned char b1=__b+1, b2=__b+2, b3=__b+3;
6569 return vec_perm(__a, __a, (vector unsigned char)
6570 (__b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3, __b, b1, b2, b3));
6571 }
6572
6573 /* vec_splat_s8 */
6574
6575 #define __builtin_altivec_vspltisb vec_splat_s8
6576
6577 // FIXME: parameter should be treated as 5-bit signed literal
6578 static vector signed char __ATTRS_o_ai
vec_splat_s8(signed char __a)6579 vec_splat_s8(signed char __a)
6580 {
6581 return (vector signed char)(__a);
6582 }
6583
6584 /* vec_vspltisb */
6585
6586 // FIXME: parameter should be treated as 5-bit signed literal
6587 static vector signed char __ATTRS_o_ai
vec_vspltisb(signed char __a)6588 vec_vspltisb(signed char __a)
6589 {
6590 return (vector signed char)(__a);
6591 }
6592
6593 /* vec_splat_s16 */
6594
6595 #define __builtin_altivec_vspltish vec_splat_s16
6596
6597 // FIXME: parameter should be treated as 5-bit signed literal
6598 static vector short __ATTRS_o_ai
vec_splat_s16(signed char __a)6599 vec_splat_s16(signed char __a)
6600 {
6601 return (vector short)(__a);
6602 }
6603
6604 /* vec_vspltish */
6605
6606 // FIXME: parameter should be treated as 5-bit signed literal
6607 static vector short __ATTRS_o_ai
vec_vspltish(signed char __a)6608 vec_vspltish(signed char __a)
6609 {
6610 return (vector short)(__a);
6611 }
6612
6613 /* vec_splat_s32 */
6614
6615 #define __builtin_altivec_vspltisw vec_splat_s32
6616
6617 // FIXME: parameter should be treated as 5-bit signed literal
6618 static vector int __ATTRS_o_ai
vec_splat_s32(signed char __a)6619 vec_splat_s32(signed char __a)
6620 {
6621 return (vector int)(__a);
6622 }
6623
6624 /* vec_vspltisw */
6625
6626 // FIXME: parameter should be treated as 5-bit signed literal
6627 static vector int __ATTRS_o_ai
vec_vspltisw(signed char __a)6628 vec_vspltisw(signed char __a)
6629 {
6630 return (vector int)(__a);
6631 }
6632
6633 /* vec_splat_u8 */
6634
6635 // FIXME: parameter should be treated as 5-bit signed literal
6636 static vector unsigned char __ATTRS_o_ai
vec_splat_u8(unsigned char __a)6637 vec_splat_u8(unsigned char __a)
6638 {
6639 return (vector unsigned char)(__a);
6640 }
6641
6642 /* vec_splat_u16 */
6643
6644 // FIXME: parameter should be treated as 5-bit signed literal
6645 static vector unsigned short __ATTRS_o_ai
vec_splat_u16(signed char __a)6646 vec_splat_u16(signed char __a)
6647 {
6648 return (vector unsigned short)(__a);
6649 }
6650
6651 /* vec_splat_u32 */
6652
6653 // FIXME: parameter should be treated as 5-bit signed literal
6654 static vector unsigned int __ATTRS_o_ai
vec_splat_u32(signed char __a)6655 vec_splat_u32(signed char __a)
6656 {
6657 return (vector unsigned int)(__a);
6658 }
6659
6660 /* vec_sr */
6661
6662 static vector signed char __ATTRS_o_ai
vec_sr(vector signed char __a,vector unsigned char __b)6663 vec_sr(vector signed char __a, vector unsigned char __b)
6664 {
6665 return __a >> (vector signed char)__b;
6666 }
6667
6668 static vector unsigned char __ATTRS_o_ai
vec_sr(vector unsigned char __a,vector unsigned char __b)6669 vec_sr(vector unsigned char __a, vector unsigned char __b)
6670 {
6671 return __a >> __b;
6672 }
6673
6674 static vector short __ATTRS_o_ai
vec_sr(vector short __a,vector unsigned short __b)6675 vec_sr(vector short __a, vector unsigned short __b)
6676 {
6677 return __a >> (vector short)__b;
6678 }
6679
6680 static vector unsigned short __ATTRS_o_ai
vec_sr(vector unsigned short __a,vector unsigned short __b)6681 vec_sr(vector unsigned short __a, vector unsigned short __b)
6682 {
6683 return __a >> __b;
6684 }
6685
6686 static vector int __ATTRS_o_ai
vec_sr(vector int __a,vector unsigned int __b)6687 vec_sr(vector int __a, vector unsigned int __b)
6688 {
6689 return __a >> (vector int)__b;
6690 }
6691
6692 static vector unsigned int __ATTRS_o_ai
vec_sr(vector unsigned int __a,vector unsigned int __b)6693 vec_sr(vector unsigned int __a, vector unsigned int __b)
6694 {
6695 return __a >> __b;
6696 }
6697
6698 #ifdef __POWER8_VECTOR__
6699 static vector signed long long __ATTRS_o_ai
vec_sr(vector signed long long __a,vector unsigned long long __b)6700 vec_sr(vector signed long long __a, vector unsigned long long __b)
6701 {
6702 return __a >> (vector long long)__b;
6703 }
6704
6705 static vector unsigned long long __ATTRS_o_ai
vec_sr(vector unsigned long long __a,vector unsigned long long __b)6706 vec_sr(vector unsigned long long __a, vector unsigned long long __b)
6707 {
6708 return __a >> __b;
6709 }
6710 #endif
6711
6712 /* vec_vsrb */
6713
6714 #define __builtin_altivec_vsrb vec_vsrb
6715
6716 static vector signed char __ATTRS_o_ai
vec_vsrb(vector signed char __a,vector unsigned char __b)6717 vec_vsrb(vector signed char __a, vector unsigned char __b)
6718 {
6719 return __a >> (vector signed char)__b;
6720 }
6721
6722 static vector unsigned char __ATTRS_o_ai
vec_vsrb(vector unsigned char __a,vector unsigned char __b)6723 vec_vsrb(vector unsigned char __a, vector unsigned char __b)
6724 {
6725 return __a >> __b;
6726 }
6727
6728 /* vec_vsrh */
6729
6730 #define __builtin_altivec_vsrh vec_vsrh
6731
6732 static vector short __ATTRS_o_ai
vec_vsrh(vector short __a,vector unsigned short __b)6733 vec_vsrh(vector short __a, vector unsigned short __b)
6734 {
6735 return __a >> (vector short)__b;
6736 }
6737
6738 static vector unsigned short __ATTRS_o_ai
vec_vsrh(vector unsigned short __a,vector unsigned short __b)6739 vec_vsrh(vector unsigned short __a, vector unsigned short __b)
6740 {
6741 return __a >> __b;
6742 }
6743
6744 /* vec_vsrw */
6745
6746 #define __builtin_altivec_vsrw vec_vsrw
6747
6748 static vector int __ATTRS_o_ai
vec_vsrw(vector int __a,vector unsigned int __b)6749 vec_vsrw(vector int __a, vector unsigned int __b)
6750 {
6751 return __a >> (vector int)__b;
6752 }
6753
6754 static vector unsigned int __ATTRS_o_ai
vec_vsrw(vector unsigned int __a,vector unsigned int __b)6755 vec_vsrw(vector unsigned int __a, vector unsigned int __b)
6756 {
6757 return __a >> __b;
6758 }
6759
6760 /* vec_sra */
6761
6762 static vector signed char __ATTRS_o_ai
vec_sra(vector signed char __a,vector unsigned char __b)6763 vec_sra(vector signed char __a, vector unsigned char __b)
6764 {
6765 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
6766 }
6767
6768 static vector unsigned char __ATTRS_o_ai
vec_sra(vector unsigned char __a,vector unsigned char __b)6769 vec_sra(vector unsigned char __a, vector unsigned char __b)
6770 {
6771 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
6772 }
6773
6774 static vector short __ATTRS_o_ai
vec_sra(vector short __a,vector unsigned short __b)6775 vec_sra(vector short __a, vector unsigned short __b)
6776 {
6777 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
6778 }
6779
6780 static vector unsigned short __ATTRS_o_ai
vec_sra(vector unsigned short __a,vector unsigned short __b)6781 vec_sra(vector unsigned short __a, vector unsigned short __b)
6782 {
6783 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
6784 }
6785
6786 static vector int __ATTRS_o_ai
vec_sra(vector int __a,vector unsigned int __b)6787 vec_sra(vector int __a, vector unsigned int __b)
6788 {
6789 return __builtin_altivec_vsraw(__a, __b);
6790 }
6791
6792 static vector unsigned int __ATTRS_o_ai
vec_sra(vector unsigned int __a,vector unsigned int __b)6793 vec_sra(vector unsigned int __a, vector unsigned int __b)
6794 {
6795 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
6796 }
6797
6798 #ifdef __POWER8_VECTOR__
6799 static vector signed long long __ATTRS_o_ai
vec_sra(vector signed long long __a,vector unsigned long long __b)6800 vec_sra(vector signed long long __a, vector unsigned long long __b)
6801 {
6802 return __a >> __b;
6803 }
6804
6805 static vector unsigned long long __ATTRS_o_ai
vec_sra(vector unsigned long long __a,vector unsigned long long __b)6806 vec_sra(vector unsigned long long __a, vector unsigned long long __b)
6807 {
6808 return (vector unsigned long long) ( (vector signed long long) __a >> __b);
6809 }
6810 #endif
6811
6812 /* vec_vsrab */
6813
6814 static vector signed char __ATTRS_o_ai
vec_vsrab(vector signed char __a,vector unsigned char __b)6815 vec_vsrab(vector signed char __a, vector unsigned char __b)
6816 {
6817 return (vector signed char)__builtin_altivec_vsrab((vector char)__a, __b);
6818 }
6819
6820 static vector unsigned char __ATTRS_o_ai
vec_vsrab(vector unsigned char __a,vector unsigned char __b)6821 vec_vsrab(vector unsigned char __a, vector unsigned char __b)
6822 {
6823 return (vector unsigned char)__builtin_altivec_vsrab((vector char)__a, __b);
6824 }
6825
6826 /* vec_vsrah */
6827
6828 static vector short __ATTRS_o_ai
vec_vsrah(vector short __a,vector unsigned short __b)6829 vec_vsrah(vector short __a, vector unsigned short __b)
6830 {
6831 return __builtin_altivec_vsrah(__a, (vector unsigned short)__b);
6832 }
6833
6834 static vector unsigned short __ATTRS_o_ai
vec_vsrah(vector unsigned short __a,vector unsigned short __b)6835 vec_vsrah(vector unsigned short __a, vector unsigned short __b)
6836 {
6837 return (vector unsigned short)__builtin_altivec_vsrah((vector short)__a, __b);
6838 }
6839
6840 /* vec_vsraw */
6841
6842 static vector int __ATTRS_o_ai
vec_vsraw(vector int __a,vector unsigned int __b)6843 vec_vsraw(vector int __a, vector unsigned int __b)
6844 {
6845 return __builtin_altivec_vsraw(__a, __b);
6846 }
6847
6848 static vector unsigned int __ATTRS_o_ai
vec_vsraw(vector unsigned int __a,vector unsigned int __b)6849 vec_vsraw(vector unsigned int __a, vector unsigned int __b)
6850 {
6851 return (vector unsigned int)__builtin_altivec_vsraw((vector int)__a, __b);
6852 }
6853
6854 /* vec_srl */
6855
6856 static vector signed char __ATTRS_o_ai
vec_srl(vector signed char __a,vector unsigned char __b)6857 vec_srl(vector signed char __a, vector unsigned char __b)
6858 {
6859 return (vector signed char)
6860 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6861 }
6862
6863 static vector signed char __ATTRS_o_ai
vec_srl(vector signed char __a,vector unsigned short __b)6864 vec_srl(vector signed char __a, vector unsigned short __b)
6865 {
6866 return (vector signed char)
6867 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6868 }
6869
6870 static vector signed char __ATTRS_o_ai
vec_srl(vector signed char __a,vector unsigned int __b)6871 vec_srl(vector signed char __a, vector unsigned int __b)
6872 {
6873 return (vector signed char)
6874 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6875 }
6876
6877 static vector unsigned char __ATTRS_o_ai
vec_srl(vector unsigned char __a,vector unsigned char __b)6878 vec_srl(vector unsigned char __a, vector unsigned char __b)
6879 {
6880 return (vector unsigned char)
6881 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6882 }
6883
6884 static vector unsigned char __ATTRS_o_ai
vec_srl(vector unsigned char __a,vector unsigned short __b)6885 vec_srl(vector unsigned char __a, vector unsigned short __b)
6886 {
6887 return (vector unsigned char)
6888 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6889 }
6890
6891 static vector unsigned char __ATTRS_o_ai
vec_srl(vector unsigned char __a,vector unsigned int __b)6892 vec_srl(vector unsigned char __a, vector unsigned int __b)
6893 {
6894 return (vector unsigned char)
6895 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6896 }
6897
6898 static vector bool char __ATTRS_o_ai
vec_srl(vector bool char __a,vector unsigned char __b)6899 vec_srl(vector bool char __a, vector unsigned char __b)
6900 {
6901 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6902 }
6903
6904 static vector bool char __ATTRS_o_ai
vec_srl(vector bool char __a,vector unsigned short __b)6905 vec_srl(vector bool char __a, vector unsigned short __b)
6906 {
6907 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6908 }
6909
6910 static vector bool char __ATTRS_o_ai
vec_srl(vector bool char __a,vector unsigned int __b)6911 vec_srl(vector bool char __a, vector unsigned int __b)
6912 {
6913 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6914 }
6915
6916 static vector short __ATTRS_o_ai
vec_srl(vector short __a,vector unsigned char __b)6917 vec_srl(vector short __a, vector unsigned char __b)
6918 {
6919 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6920 }
6921
6922 static vector short __ATTRS_o_ai
vec_srl(vector short __a,vector unsigned short __b)6923 vec_srl(vector short __a, vector unsigned short __b)
6924 {
6925 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6926 }
6927
6928 static vector short __ATTRS_o_ai
vec_srl(vector short __a,vector unsigned int __b)6929 vec_srl(vector short __a, vector unsigned int __b)
6930 {
6931 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6932 }
6933
6934 static vector unsigned short __ATTRS_o_ai
vec_srl(vector unsigned short __a,vector unsigned char __b)6935 vec_srl(vector unsigned short __a, vector unsigned char __b)
6936 {
6937 return (vector unsigned short)
6938 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6939 }
6940
6941 static vector unsigned short __ATTRS_o_ai
vec_srl(vector unsigned short __a,vector unsigned short __b)6942 vec_srl(vector unsigned short __a, vector unsigned short __b)
6943 {
6944 return (vector unsigned short)
6945 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6946 }
6947
6948 static vector unsigned short __ATTRS_o_ai
vec_srl(vector unsigned short __a,vector unsigned int __b)6949 vec_srl(vector unsigned short __a, vector unsigned int __b)
6950 {
6951 return (vector unsigned short)
6952 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
6953 }
6954
6955 static vector bool short __ATTRS_o_ai
vec_srl(vector bool short __a,vector unsigned char __b)6956 vec_srl(vector bool short __a, vector unsigned char __b)
6957 {
6958 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6959 }
6960
6961 static vector bool short __ATTRS_o_ai
vec_srl(vector bool short __a,vector unsigned short __b)6962 vec_srl(vector bool short __a, vector unsigned short __b)
6963 {
6964 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6965 }
6966
6967 static vector bool short __ATTRS_o_ai
vec_srl(vector bool short __a,vector unsigned int __b)6968 vec_srl(vector bool short __a, vector unsigned int __b)
6969 {
6970 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6971 }
6972
6973 static vector pixel __ATTRS_o_ai
vec_srl(vector pixel __a,vector unsigned char __b)6974 vec_srl(vector pixel __a, vector unsigned char __b)
6975 {
6976 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6977 }
6978
6979 static vector pixel __ATTRS_o_ai
vec_srl(vector pixel __a,vector unsigned short __b)6980 vec_srl(vector pixel __a, vector unsigned short __b)
6981 {
6982 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6983 }
6984
6985 static vector pixel __ATTRS_o_ai
vec_srl(vector pixel __a,vector unsigned int __b)6986 vec_srl(vector pixel __a, vector unsigned int __b)
6987 {
6988 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
6989 }
6990
6991 static vector int __ATTRS_o_ai
vec_srl(vector int __a,vector unsigned char __b)6992 vec_srl(vector int __a, vector unsigned char __b)
6993 {
6994 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
6995 }
6996
6997 static vector int __ATTRS_o_ai
vec_srl(vector int __a,vector unsigned short __b)6998 vec_srl(vector int __a, vector unsigned short __b)
6999 {
7000 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7001 }
7002
7003 static vector int __ATTRS_o_ai
vec_srl(vector int __a,vector unsigned int __b)7004 vec_srl(vector int __a, vector unsigned int __b)
7005 {
7006 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7007 }
7008
7009 static vector unsigned int __ATTRS_o_ai
vec_srl(vector unsigned int __a,vector unsigned char __b)7010 vec_srl(vector unsigned int __a, vector unsigned char __b)
7011 {
7012 return (vector unsigned int)
7013 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7014 }
7015
7016 static vector unsigned int __ATTRS_o_ai
vec_srl(vector unsigned int __a,vector unsigned short __b)7017 vec_srl(vector unsigned int __a, vector unsigned short __b)
7018 {
7019 return (vector unsigned int)
7020 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7021 }
7022
7023 static vector unsigned int __ATTRS_o_ai
vec_srl(vector unsigned int __a,vector unsigned int __b)7024 vec_srl(vector unsigned int __a, vector unsigned int __b)
7025 {
7026 return (vector unsigned int)
7027 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7028 }
7029
7030 static vector bool int __ATTRS_o_ai
vec_srl(vector bool int __a,vector unsigned char __b)7031 vec_srl(vector bool int __a, vector unsigned char __b)
7032 {
7033 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7034 }
7035
7036 static vector bool int __ATTRS_o_ai
vec_srl(vector bool int __a,vector unsigned short __b)7037 vec_srl(vector bool int __a, vector unsigned short __b)
7038 {
7039 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7040 }
7041
7042 static vector bool int __ATTRS_o_ai
vec_srl(vector bool int __a,vector unsigned int __b)7043 vec_srl(vector bool int __a, vector unsigned int __b)
7044 {
7045 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7046 }
7047
7048 /* vec_vsr */
7049
7050 static vector signed char __ATTRS_o_ai
vec_vsr(vector signed char __a,vector unsigned char __b)7051 vec_vsr(vector signed char __a, vector unsigned char __b)
7052 {
7053 return (vector signed char)
7054 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7055 }
7056
7057 static vector signed char __ATTRS_o_ai
vec_vsr(vector signed char __a,vector unsigned short __b)7058 vec_vsr(vector signed char __a, vector unsigned short __b)
7059 {
7060 return (vector signed char)
7061 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7062 }
7063
7064 static vector signed char __ATTRS_o_ai
vec_vsr(vector signed char __a,vector unsigned int __b)7065 vec_vsr(vector signed char __a, vector unsigned int __b)
7066 {
7067 return (vector signed char)
7068 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7069 }
7070
7071 static vector unsigned char __ATTRS_o_ai
vec_vsr(vector unsigned char __a,vector unsigned char __b)7072 vec_vsr(vector unsigned char __a, vector unsigned char __b)
7073 {
7074 return (vector unsigned char)
7075 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7076 }
7077
7078 static vector unsigned char __ATTRS_o_ai
vec_vsr(vector unsigned char __a,vector unsigned short __b)7079 vec_vsr(vector unsigned char __a, vector unsigned short __b)
7080 {
7081 return (vector unsigned char)
7082 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7083 }
7084
7085 static vector unsigned char __ATTRS_o_ai
vec_vsr(vector unsigned char __a,vector unsigned int __b)7086 vec_vsr(vector unsigned char __a, vector unsigned int __b)
7087 {
7088 return (vector unsigned char)
7089 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7090 }
7091
7092 static vector bool char __ATTRS_o_ai
vec_vsr(vector bool char __a,vector unsigned char __b)7093 vec_vsr(vector bool char __a, vector unsigned char __b)
7094 {
7095 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7096 }
7097
7098 static vector bool char __ATTRS_o_ai
vec_vsr(vector bool char __a,vector unsigned short __b)7099 vec_vsr(vector bool char __a, vector unsigned short __b)
7100 {
7101 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7102 }
7103
7104 static vector bool char __ATTRS_o_ai
vec_vsr(vector bool char __a,vector unsigned int __b)7105 vec_vsr(vector bool char __a, vector unsigned int __b)
7106 {
7107 return (vector bool char)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7108 }
7109
7110 static vector short __ATTRS_o_ai
vec_vsr(vector short __a,vector unsigned char __b)7111 vec_vsr(vector short __a, vector unsigned char __b)
7112 {
7113 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7114 }
7115
7116 static vector short __ATTRS_o_ai
vec_vsr(vector short __a,vector unsigned short __b)7117 vec_vsr(vector short __a, vector unsigned short __b)
7118 {
7119 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7120 }
7121
7122 static vector short __ATTRS_o_ai
vec_vsr(vector short __a,vector unsigned int __b)7123 vec_vsr(vector short __a, vector unsigned int __b)
7124 {
7125 return (vector short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7126 }
7127
7128 static vector unsigned short __ATTRS_o_ai
vec_vsr(vector unsigned short __a,vector unsigned char __b)7129 vec_vsr(vector unsigned short __a, vector unsigned char __b)
7130 {
7131 return (vector unsigned short)
7132 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7133 }
7134
7135 static vector unsigned short __ATTRS_o_ai
vec_vsr(vector unsigned short __a,vector unsigned short __b)7136 vec_vsr(vector unsigned short __a, vector unsigned short __b)
7137 {
7138 return (vector unsigned short)
7139 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7140 }
7141
7142 static vector unsigned short __ATTRS_o_ai
vec_vsr(vector unsigned short __a,vector unsigned int __b)7143 vec_vsr(vector unsigned short __a, vector unsigned int __b)
7144 {
7145 return (vector unsigned short)
7146 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7147 }
7148
7149 static vector bool short __ATTRS_o_ai
vec_vsr(vector bool short __a,vector unsigned char __b)7150 vec_vsr(vector bool short __a, vector unsigned char __b)
7151 {
7152 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7153 }
7154
7155 static vector bool short __ATTRS_o_ai
vec_vsr(vector bool short __a,vector unsigned short __b)7156 vec_vsr(vector bool short __a, vector unsigned short __b)
7157 {
7158 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7159 }
7160
7161 static vector bool short __ATTRS_o_ai
vec_vsr(vector bool short __a,vector unsigned int __b)7162 vec_vsr(vector bool short __a, vector unsigned int __b)
7163 {
7164 return (vector bool short)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7165 }
7166
7167 static vector pixel __ATTRS_o_ai
vec_vsr(vector pixel __a,vector unsigned char __b)7168 vec_vsr(vector pixel __a, vector unsigned char __b)
7169 {
7170 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7171 }
7172
7173 static vector pixel __ATTRS_o_ai
vec_vsr(vector pixel __a,vector unsigned short __b)7174 vec_vsr(vector pixel __a, vector unsigned short __b)
7175 {
7176 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7177 }
7178
7179 static vector pixel __ATTRS_o_ai
vec_vsr(vector pixel __a,vector unsigned int __b)7180 vec_vsr(vector pixel __a, vector unsigned int __b)
7181 {
7182 return (vector pixel)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7183 }
7184
7185 static vector int __ATTRS_o_ai
vec_vsr(vector int __a,vector unsigned char __b)7186 vec_vsr(vector int __a, vector unsigned char __b)
7187 {
7188 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7189 }
7190
7191 static vector int __ATTRS_o_ai
vec_vsr(vector int __a,vector unsigned short __b)7192 vec_vsr(vector int __a, vector unsigned short __b)
7193 {
7194 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7195 }
7196
7197 static vector int __ATTRS_o_ai
vec_vsr(vector int __a,vector unsigned int __b)7198 vec_vsr(vector int __a, vector unsigned int __b)
7199 {
7200 return (vector int)__builtin_altivec_vsr(__a, (vector int)__b);
7201 }
7202
7203 static vector unsigned int __ATTRS_o_ai
vec_vsr(vector unsigned int __a,vector unsigned char __b)7204 vec_vsr(vector unsigned int __a, vector unsigned char __b)
7205 {
7206 return (vector unsigned int)
7207 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7208 }
7209
7210 static vector unsigned int __ATTRS_o_ai
vec_vsr(vector unsigned int __a,vector unsigned short __b)7211 vec_vsr(vector unsigned int __a, vector unsigned short __b)
7212 {
7213 return (vector unsigned int)
7214 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7215 }
7216
7217 static vector unsigned int __ATTRS_o_ai
vec_vsr(vector unsigned int __a,vector unsigned int __b)7218 vec_vsr(vector unsigned int __a, vector unsigned int __b)
7219 {
7220 return (vector unsigned int)
7221 __builtin_altivec_vsr((vector int)__a, (vector int)__b);
7222 }
7223
7224 static vector bool int __ATTRS_o_ai
vec_vsr(vector bool int __a,vector unsigned char __b)7225 vec_vsr(vector bool int __a, vector unsigned char __b)
7226 {
7227 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7228 }
7229
7230 static vector bool int __ATTRS_o_ai
vec_vsr(vector bool int __a,vector unsigned short __b)7231 vec_vsr(vector bool int __a, vector unsigned short __b)
7232 {
7233 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7234 }
7235
7236 static vector bool int __ATTRS_o_ai
vec_vsr(vector bool int __a,vector unsigned int __b)7237 vec_vsr(vector bool int __a, vector unsigned int __b)
7238 {
7239 return (vector bool int)__builtin_altivec_vsr((vector int)__a, (vector int)__b);
7240 }
7241
7242 /* vec_sro */
7243
7244 static vector signed char __ATTRS_o_ai
vec_sro(vector signed char __a,vector signed char __b)7245 vec_sro(vector signed char __a, vector signed char __b)
7246 {
7247 return (vector signed char)
7248 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7249 }
7250
7251 static vector signed char __ATTRS_o_ai
vec_sro(vector signed char __a,vector unsigned char __b)7252 vec_sro(vector signed char __a, vector unsigned char __b)
7253 {
7254 return (vector signed char)
7255 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7256 }
7257
7258 static vector unsigned char __ATTRS_o_ai
vec_sro(vector unsigned char __a,vector signed char __b)7259 vec_sro(vector unsigned char __a, vector signed char __b)
7260 {
7261 return (vector unsigned char)
7262 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7263 }
7264
7265 static vector unsigned char __ATTRS_o_ai
vec_sro(vector unsigned char __a,vector unsigned char __b)7266 vec_sro(vector unsigned char __a, vector unsigned char __b)
7267 {
7268 return (vector unsigned char)
7269 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7270 }
7271
7272 static vector short __ATTRS_o_ai
vec_sro(vector short __a,vector signed char __b)7273 vec_sro(vector short __a, vector signed char __b)
7274 {
7275 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7276 }
7277
7278 static vector short __ATTRS_o_ai
vec_sro(vector short __a,vector unsigned char __b)7279 vec_sro(vector short __a, vector unsigned char __b)
7280 {
7281 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7282 }
7283
7284 static vector unsigned short __ATTRS_o_ai
vec_sro(vector unsigned short __a,vector signed char __b)7285 vec_sro(vector unsigned short __a, vector signed char __b)
7286 {
7287 return (vector unsigned short)
7288 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7289 }
7290
7291 static vector unsigned short __ATTRS_o_ai
vec_sro(vector unsigned short __a,vector unsigned char __b)7292 vec_sro(vector unsigned short __a, vector unsigned char __b)
7293 {
7294 return (vector unsigned short)
7295 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7296 }
7297
7298 static vector pixel __ATTRS_o_ai
vec_sro(vector pixel __a,vector signed char __b)7299 vec_sro(vector pixel __a, vector signed char __b)
7300 {
7301 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7302 }
7303
7304 static vector pixel __ATTRS_o_ai
vec_sro(vector pixel __a,vector unsigned char __b)7305 vec_sro(vector pixel __a, vector unsigned char __b)
7306 {
7307 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7308 }
7309
7310 static vector int __ATTRS_o_ai
vec_sro(vector int __a,vector signed char __b)7311 vec_sro(vector int __a, vector signed char __b)
7312 {
7313 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7314 }
7315
7316 static vector int __ATTRS_o_ai
vec_sro(vector int __a,vector unsigned char __b)7317 vec_sro(vector int __a, vector unsigned char __b)
7318 {
7319 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7320 }
7321
7322 static vector unsigned int __ATTRS_o_ai
vec_sro(vector unsigned int __a,vector signed char __b)7323 vec_sro(vector unsigned int __a, vector signed char __b)
7324 {
7325 return (vector unsigned int)
7326 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7327 }
7328
7329 static vector unsigned int __ATTRS_o_ai
vec_sro(vector unsigned int __a,vector unsigned char __b)7330 vec_sro(vector unsigned int __a, vector unsigned char __b)
7331 {
7332 return (vector unsigned int)
7333 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7334 }
7335
7336 static vector float __ATTRS_o_ai
vec_sro(vector float __a,vector signed char __b)7337 vec_sro(vector float __a, vector signed char __b)
7338 {
7339 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7340 }
7341
7342 static vector float __ATTRS_o_ai
vec_sro(vector float __a,vector unsigned char __b)7343 vec_sro(vector float __a, vector unsigned char __b)
7344 {
7345 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7346 }
7347
7348 /* vec_vsro */
7349
7350 static vector signed char __ATTRS_o_ai
vec_vsro(vector signed char __a,vector signed char __b)7351 vec_vsro(vector signed char __a, vector signed char __b)
7352 {
7353 return (vector signed char)
7354 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7355 }
7356
7357 static vector signed char __ATTRS_o_ai
vec_vsro(vector signed char __a,vector unsigned char __b)7358 vec_vsro(vector signed char __a, vector unsigned char __b)
7359 {
7360 return (vector signed char)
7361 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7362 }
7363
7364 static vector unsigned char __ATTRS_o_ai
vec_vsro(vector unsigned char __a,vector signed char __b)7365 vec_vsro(vector unsigned char __a, vector signed char __b)
7366 {
7367 return (vector unsigned char)
7368 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7369 }
7370
7371 static vector unsigned char __ATTRS_o_ai
vec_vsro(vector unsigned char __a,vector unsigned char __b)7372 vec_vsro(vector unsigned char __a, vector unsigned char __b)
7373 {
7374 return (vector unsigned char)
7375 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7376 }
7377
7378 static vector short __ATTRS_o_ai
vec_vsro(vector short __a,vector signed char __b)7379 vec_vsro(vector short __a, vector signed char __b)
7380 {
7381 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7382 }
7383
7384 static vector short __ATTRS_o_ai
vec_vsro(vector short __a,vector unsigned char __b)7385 vec_vsro(vector short __a, vector unsigned char __b)
7386 {
7387 return (vector short)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7388 }
7389
7390 static vector unsigned short __ATTRS_o_ai
vec_vsro(vector unsigned short __a,vector signed char __b)7391 vec_vsro(vector unsigned short __a, vector signed char __b)
7392 {
7393 return (vector unsigned short)
7394 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7395 }
7396
7397 static vector unsigned short __ATTRS_o_ai
vec_vsro(vector unsigned short __a,vector unsigned char __b)7398 vec_vsro(vector unsigned short __a, vector unsigned char __b)
7399 {
7400 return (vector unsigned short)
7401 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7402 }
7403
7404 static vector pixel __ATTRS_o_ai
vec_vsro(vector pixel __a,vector signed char __b)7405 vec_vsro(vector pixel __a, vector signed char __b)
7406 {
7407 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7408 }
7409
7410 static vector pixel __ATTRS_o_ai
vec_vsro(vector pixel __a,vector unsigned char __b)7411 vec_vsro(vector pixel __a, vector unsigned char __b)
7412 {
7413 return (vector pixel)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7414 }
7415
7416 static vector int __ATTRS_o_ai
vec_vsro(vector int __a,vector signed char __b)7417 vec_vsro(vector int __a, vector signed char __b)
7418 {
7419 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7420 }
7421
7422 static vector int __ATTRS_o_ai
vec_vsro(vector int __a,vector unsigned char __b)7423 vec_vsro(vector int __a, vector unsigned char __b)
7424 {
7425 return (vector int)__builtin_altivec_vsro(__a, (vector int)__b);
7426 }
7427
7428 static vector unsigned int __ATTRS_o_ai
vec_vsro(vector unsigned int __a,vector signed char __b)7429 vec_vsro(vector unsigned int __a, vector signed char __b)
7430 {
7431 return (vector unsigned int)
7432 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7433 }
7434
7435 static vector unsigned int __ATTRS_o_ai
vec_vsro(vector unsigned int __a,vector unsigned char __b)7436 vec_vsro(vector unsigned int __a, vector unsigned char __b)
7437 {
7438 return (vector unsigned int)
7439 __builtin_altivec_vsro((vector int)__a, (vector int)__b);
7440 }
7441
7442 static vector float __ATTRS_o_ai
vec_vsro(vector float __a,vector signed char __b)7443 vec_vsro(vector float __a, vector signed char __b)
7444 {
7445 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7446 }
7447
7448 static vector float __ATTRS_o_ai
vec_vsro(vector float __a,vector unsigned char __b)7449 vec_vsro(vector float __a, vector unsigned char __b)
7450 {
7451 return (vector float)__builtin_altivec_vsro((vector int)__a, (vector int)__b);
7452 }
7453
7454 /* vec_st */
7455
7456 static void __ATTRS_o_ai
vec_st(vector signed char __a,int __b,vector signed char * __c)7457 vec_st(vector signed char __a, int __b, vector signed char *__c)
7458 {
7459 __builtin_altivec_stvx((vector int)__a, __b, __c);
7460 }
7461
7462 static void __ATTRS_o_ai
vec_st(vector signed char __a,int __b,signed char * __c)7463 vec_st(vector signed char __a, int __b, signed char *__c)
7464 {
7465 __builtin_altivec_stvx((vector int)__a, __b, __c);
7466 }
7467
7468 static void __ATTRS_o_ai
vec_st(vector unsigned char __a,int __b,vector unsigned char * __c)7469 vec_st(vector unsigned char __a, int __b, vector unsigned char *__c)
7470 {
7471 __builtin_altivec_stvx((vector int)__a, __b, __c);
7472 }
7473
7474 static void __ATTRS_o_ai
vec_st(vector unsigned char __a,int __b,unsigned char * __c)7475 vec_st(vector unsigned char __a, int __b, unsigned char *__c)
7476 {
7477 __builtin_altivec_stvx((vector int)__a, __b, __c);
7478 }
7479
7480 static void __ATTRS_o_ai
vec_st(vector bool char __a,int __b,signed char * __c)7481 vec_st(vector bool char __a, int __b, signed char *__c)
7482 {
7483 __builtin_altivec_stvx((vector int)__a, __b, __c);
7484 }
7485
7486 static void __ATTRS_o_ai
vec_st(vector bool char __a,int __b,unsigned char * __c)7487 vec_st(vector bool char __a, int __b, unsigned char *__c)
7488 {
7489 __builtin_altivec_stvx((vector int)__a, __b, __c);
7490 }
7491
7492 static void __ATTRS_o_ai
vec_st(vector bool char __a,int __b,vector bool char * __c)7493 vec_st(vector bool char __a, int __b, vector bool char *__c)
7494 {
7495 __builtin_altivec_stvx((vector int)__a, __b, __c);
7496 }
7497
7498 static void __ATTRS_o_ai
vec_st(vector short __a,int __b,vector short * __c)7499 vec_st(vector short __a, int __b, vector short *__c)
7500 {
7501 __builtin_altivec_stvx((vector int)__a, __b, __c);
7502 }
7503
7504 static void __ATTRS_o_ai
vec_st(vector short __a,int __b,short * __c)7505 vec_st(vector short __a, int __b, short *__c)
7506 {
7507 __builtin_altivec_stvx((vector int)__a, __b, __c);
7508 }
7509
7510 static void __ATTRS_o_ai
vec_st(vector unsigned short __a,int __b,vector unsigned short * __c)7511 vec_st(vector unsigned short __a, int __b, vector unsigned short *__c)
7512 {
7513 __builtin_altivec_stvx((vector int)__a, __b, __c);
7514 }
7515
7516 static void __ATTRS_o_ai
vec_st(vector unsigned short __a,int __b,unsigned short * __c)7517 vec_st(vector unsigned short __a, int __b, unsigned short *__c)
7518 {
7519 __builtin_altivec_stvx((vector int)__a, __b, __c);
7520 }
7521
7522 static void __ATTRS_o_ai
vec_st(vector bool short __a,int __b,short * __c)7523 vec_st(vector bool short __a, int __b, short *__c)
7524 {
7525 __builtin_altivec_stvx((vector int)__a, __b, __c);
7526 }
7527
7528 static void __ATTRS_o_ai
vec_st(vector bool short __a,int __b,unsigned short * __c)7529 vec_st(vector bool short __a, int __b, unsigned short *__c)
7530 {
7531 __builtin_altivec_stvx((vector int)__a, __b, __c);
7532 }
7533
7534 static void __ATTRS_o_ai
vec_st(vector bool short __a,int __b,vector bool short * __c)7535 vec_st(vector bool short __a, int __b, vector bool short *__c)
7536 {
7537 __builtin_altivec_stvx((vector int)__a, __b, __c);
7538 }
7539
7540 static void __ATTRS_o_ai
vec_st(vector pixel __a,int __b,short * __c)7541 vec_st(vector pixel __a, int __b, short *__c)
7542 {
7543 __builtin_altivec_stvx((vector int)__a, __b, __c);
7544 }
7545
7546 static void __ATTRS_o_ai
vec_st(vector pixel __a,int __b,unsigned short * __c)7547 vec_st(vector pixel __a, int __b, unsigned short *__c)
7548 {
7549 __builtin_altivec_stvx((vector int)__a, __b, __c);
7550 }
7551
7552 static void __ATTRS_o_ai
vec_st(vector pixel __a,int __b,vector pixel * __c)7553 vec_st(vector pixel __a, int __b, vector pixel *__c)
7554 {
7555 __builtin_altivec_stvx((vector int)__a, __b, __c);
7556 }
7557
7558 static void __ATTRS_o_ai
vec_st(vector int __a,int __b,vector int * __c)7559 vec_st(vector int __a, int __b, vector int *__c)
7560 {
7561 __builtin_altivec_stvx(__a, __b, __c);
7562 }
7563
7564 static void __ATTRS_o_ai
vec_st(vector int __a,int __b,int * __c)7565 vec_st(vector int __a, int __b, int *__c)
7566 {
7567 __builtin_altivec_stvx(__a, __b, __c);
7568 }
7569
7570 static void __ATTRS_o_ai
vec_st(vector unsigned int __a,int __b,vector unsigned int * __c)7571 vec_st(vector unsigned int __a, int __b, vector unsigned int *__c)
7572 {
7573 __builtin_altivec_stvx((vector int)__a, __b, __c);
7574 }
7575
7576 static void __ATTRS_o_ai
vec_st(vector unsigned int __a,int __b,unsigned int * __c)7577 vec_st(vector unsigned int __a, int __b, unsigned int *__c)
7578 {
7579 __builtin_altivec_stvx((vector int)__a, __b, __c);
7580 }
7581
7582 static void __ATTRS_o_ai
vec_st(vector bool int __a,int __b,int * __c)7583 vec_st(vector bool int __a, int __b, int *__c)
7584 {
7585 __builtin_altivec_stvx((vector int)__a, __b, __c);
7586 }
7587
7588 static void __ATTRS_o_ai
vec_st(vector bool int __a,int __b,unsigned int * __c)7589 vec_st(vector bool int __a, int __b, unsigned int *__c)
7590 {
7591 __builtin_altivec_stvx((vector int)__a, __b, __c);
7592 }
7593
7594 static void __ATTRS_o_ai
vec_st(vector bool int __a,int __b,vector bool int * __c)7595 vec_st(vector bool int __a, int __b, vector bool int *__c)
7596 {
7597 __builtin_altivec_stvx((vector int)__a, __b, __c);
7598 }
7599
7600 static void __ATTRS_o_ai
vec_st(vector float __a,int __b,vector float * __c)7601 vec_st(vector float __a, int __b, vector float *__c)
7602 {
7603 __builtin_altivec_stvx((vector int)__a, __b, __c);
7604 }
7605
7606 static void __ATTRS_o_ai
vec_st(vector float __a,int __b,float * __c)7607 vec_st(vector float __a, int __b, float *__c)
7608 {
7609 __builtin_altivec_stvx((vector int)__a, __b, __c);
7610 }
7611
7612 /* vec_stvx */
7613
7614 static void __ATTRS_o_ai
vec_stvx(vector signed char __a,int __b,vector signed char * __c)7615 vec_stvx(vector signed char __a, int __b, vector signed char *__c)
7616 {
7617 __builtin_altivec_stvx((vector int)__a, __b, __c);
7618 }
7619
7620 static void __ATTRS_o_ai
vec_stvx(vector signed char __a,int __b,signed char * __c)7621 vec_stvx(vector signed char __a, int __b, signed char *__c)
7622 {
7623 __builtin_altivec_stvx((vector int)__a, __b, __c);
7624 }
7625
7626 static void __ATTRS_o_ai
vec_stvx(vector unsigned char __a,int __b,vector unsigned char * __c)7627 vec_stvx(vector unsigned char __a, int __b, vector unsigned char *__c)
7628 {
7629 __builtin_altivec_stvx((vector int)__a, __b, __c);
7630 }
7631
7632 static void __ATTRS_o_ai
vec_stvx(vector unsigned char __a,int __b,unsigned char * __c)7633 vec_stvx(vector unsigned char __a, int __b, unsigned char *__c)
7634 {
7635 __builtin_altivec_stvx((vector int)__a, __b, __c);
7636 }
7637
7638 static void __ATTRS_o_ai
vec_stvx(vector bool char __a,int __b,signed char * __c)7639 vec_stvx(vector bool char __a, int __b, signed char *__c)
7640 {
7641 __builtin_altivec_stvx((vector int)__a, __b, __c);
7642 }
7643
7644 static void __ATTRS_o_ai
vec_stvx(vector bool char __a,int __b,unsigned char * __c)7645 vec_stvx(vector bool char __a, int __b, unsigned char *__c)
7646 {
7647 __builtin_altivec_stvx((vector int)__a, __b, __c);
7648 }
7649
7650 static void __ATTRS_o_ai
vec_stvx(vector bool char __a,int __b,vector bool char * __c)7651 vec_stvx(vector bool char __a, int __b, vector bool char *__c)
7652 {
7653 __builtin_altivec_stvx((vector int)__a, __b, __c);
7654 }
7655
7656 static void __ATTRS_o_ai
vec_stvx(vector short __a,int __b,vector short * __c)7657 vec_stvx(vector short __a, int __b, vector short *__c)
7658 {
7659 __builtin_altivec_stvx((vector int)__a, __b, __c);
7660 }
7661
7662 static void __ATTRS_o_ai
vec_stvx(vector short __a,int __b,short * __c)7663 vec_stvx(vector short __a, int __b, short *__c)
7664 {
7665 __builtin_altivec_stvx((vector int)__a, __b, __c);
7666 }
7667
7668 static void __ATTRS_o_ai
vec_stvx(vector unsigned short __a,int __b,vector unsigned short * __c)7669 vec_stvx(vector unsigned short __a, int __b, vector unsigned short *__c)
7670 {
7671 __builtin_altivec_stvx((vector int)__a, __b, __c);
7672 }
7673
7674 static void __ATTRS_o_ai
vec_stvx(vector unsigned short __a,int __b,unsigned short * __c)7675 vec_stvx(vector unsigned short __a, int __b, unsigned short *__c)
7676 {
7677 __builtin_altivec_stvx((vector int)__a, __b, __c);
7678 }
7679
7680 static void __ATTRS_o_ai
vec_stvx(vector bool short __a,int __b,short * __c)7681 vec_stvx(vector bool short __a, int __b, short *__c)
7682 {
7683 __builtin_altivec_stvx((vector int)__a, __b, __c);
7684 }
7685
7686 static void __ATTRS_o_ai
vec_stvx(vector bool short __a,int __b,unsigned short * __c)7687 vec_stvx(vector bool short __a, int __b, unsigned short *__c)
7688 {
7689 __builtin_altivec_stvx((vector int)__a, __b, __c);
7690 }
7691
7692 static void __ATTRS_o_ai
vec_stvx(vector bool short __a,int __b,vector bool short * __c)7693 vec_stvx(vector bool short __a, int __b, vector bool short *__c)
7694 {
7695 __builtin_altivec_stvx((vector int)__a, __b, __c);
7696 }
7697
7698 static void __ATTRS_o_ai
vec_stvx(vector pixel __a,int __b,short * __c)7699 vec_stvx(vector pixel __a, int __b, short *__c)
7700 {
7701 __builtin_altivec_stvx((vector int)__a, __b, __c);
7702 }
7703
7704 static void __ATTRS_o_ai
vec_stvx(vector pixel __a,int __b,unsigned short * __c)7705 vec_stvx(vector pixel __a, int __b, unsigned short *__c)
7706 {
7707 __builtin_altivec_stvx((vector int)__a, __b, __c);
7708 }
7709
7710 static void __ATTRS_o_ai
vec_stvx(vector pixel __a,int __b,vector pixel * __c)7711 vec_stvx(vector pixel __a, int __b, vector pixel *__c)
7712 {
7713 __builtin_altivec_stvx((vector int)__a, __b, __c);
7714 }
7715
7716 static void __ATTRS_o_ai
vec_stvx(vector int __a,int __b,vector int * __c)7717 vec_stvx(vector int __a, int __b, vector int *__c)
7718 {
7719 __builtin_altivec_stvx(__a, __b, __c);
7720 }
7721
7722 static void __ATTRS_o_ai
vec_stvx(vector int __a,int __b,int * __c)7723 vec_stvx(vector int __a, int __b, int *__c)
7724 {
7725 __builtin_altivec_stvx(__a, __b, __c);
7726 }
7727
7728 static void __ATTRS_o_ai
vec_stvx(vector unsigned int __a,int __b,vector unsigned int * __c)7729 vec_stvx(vector unsigned int __a, int __b, vector unsigned int *__c)
7730 {
7731 __builtin_altivec_stvx((vector int)__a, __b, __c);
7732 }
7733
7734 static void __ATTRS_o_ai
vec_stvx(vector unsigned int __a,int __b,unsigned int * __c)7735 vec_stvx(vector unsigned int __a, int __b, unsigned int *__c)
7736 {
7737 __builtin_altivec_stvx((vector int)__a, __b, __c);
7738 }
7739
7740 static void __ATTRS_o_ai
vec_stvx(vector bool int __a,int __b,int * __c)7741 vec_stvx(vector bool int __a, int __b, int *__c)
7742 {
7743 __builtin_altivec_stvx((vector int)__a, __b, __c);
7744 }
7745
7746 static void __ATTRS_o_ai
vec_stvx(vector bool int __a,int __b,unsigned int * __c)7747 vec_stvx(vector bool int __a, int __b, unsigned int *__c)
7748 {
7749 __builtin_altivec_stvx((vector int)__a, __b, __c);
7750 }
7751
7752 static void __ATTRS_o_ai
vec_stvx(vector bool int __a,int __b,vector bool int * __c)7753 vec_stvx(vector bool int __a, int __b, vector bool int *__c)
7754 {
7755 __builtin_altivec_stvx((vector int)__a, __b, __c);
7756 }
7757
7758 static void __ATTRS_o_ai
vec_stvx(vector float __a,int __b,vector float * __c)7759 vec_stvx(vector float __a, int __b, vector float *__c)
7760 {
7761 __builtin_altivec_stvx((vector int)__a, __b, __c);
7762 }
7763
7764 static void __ATTRS_o_ai
vec_stvx(vector float __a,int __b,float * __c)7765 vec_stvx(vector float __a, int __b, float *__c)
7766 {
7767 __builtin_altivec_stvx((vector int)__a, __b, __c);
7768 }
7769
7770 /* vec_ste */
7771
7772 static void __ATTRS_o_ai
vec_ste(vector signed char __a,int __b,signed char * __c)7773 vec_ste(vector signed char __a, int __b, signed char *__c)
7774 {
7775 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7776 }
7777
7778 static void __ATTRS_o_ai
vec_ste(vector unsigned char __a,int __b,unsigned char * __c)7779 vec_ste(vector unsigned char __a, int __b, unsigned char *__c)
7780 {
7781 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7782 }
7783
7784 static void __ATTRS_o_ai
vec_ste(vector bool char __a,int __b,signed char * __c)7785 vec_ste(vector bool char __a, int __b, signed char *__c)
7786 {
7787 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7788 }
7789
7790 static void __ATTRS_o_ai
vec_ste(vector bool char __a,int __b,unsigned char * __c)7791 vec_ste(vector bool char __a, int __b, unsigned char *__c)
7792 {
7793 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7794 }
7795
7796 static void __ATTRS_o_ai
vec_ste(vector short __a,int __b,short * __c)7797 vec_ste(vector short __a, int __b, short *__c)
7798 {
7799 __builtin_altivec_stvehx(__a, __b, __c);
7800 }
7801
7802 static void __ATTRS_o_ai
vec_ste(vector unsigned short __a,int __b,unsigned short * __c)7803 vec_ste(vector unsigned short __a, int __b, unsigned short *__c)
7804 {
7805 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7806 }
7807
7808 static void __ATTRS_o_ai
vec_ste(vector bool short __a,int __b,short * __c)7809 vec_ste(vector bool short __a, int __b, short *__c)
7810 {
7811 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7812 }
7813
7814 static void __ATTRS_o_ai
vec_ste(vector bool short __a,int __b,unsigned short * __c)7815 vec_ste(vector bool short __a, int __b, unsigned short *__c)
7816 {
7817 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7818 }
7819
7820 static void __ATTRS_o_ai
vec_ste(vector pixel __a,int __b,short * __c)7821 vec_ste(vector pixel __a, int __b, short *__c)
7822 {
7823 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7824 }
7825
7826 static void __ATTRS_o_ai
vec_ste(vector pixel __a,int __b,unsigned short * __c)7827 vec_ste(vector pixel __a, int __b, unsigned short *__c)
7828 {
7829 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7830 }
7831
7832 static void __ATTRS_o_ai
vec_ste(vector int __a,int __b,int * __c)7833 vec_ste(vector int __a, int __b, int *__c)
7834 {
7835 __builtin_altivec_stvewx(__a, __b, __c);
7836 }
7837
7838 static void __ATTRS_o_ai
vec_ste(vector unsigned int __a,int __b,unsigned int * __c)7839 vec_ste(vector unsigned int __a, int __b, unsigned int *__c)
7840 {
7841 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7842 }
7843
7844 static void __ATTRS_o_ai
vec_ste(vector bool int __a,int __b,int * __c)7845 vec_ste(vector bool int __a, int __b, int *__c)
7846 {
7847 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7848 }
7849
7850 static void __ATTRS_o_ai
vec_ste(vector bool int __a,int __b,unsigned int * __c)7851 vec_ste(vector bool int __a, int __b, unsigned int *__c)
7852 {
7853 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7854 }
7855
7856 static void __ATTRS_o_ai
vec_ste(vector float __a,int __b,float * __c)7857 vec_ste(vector float __a, int __b, float *__c)
7858 {
7859 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7860 }
7861
7862 /* vec_stvebx */
7863
7864 static void __ATTRS_o_ai
vec_stvebx(vector signed char __a,int __b,signed char * __c)7865 vec_stvebx(vector signed char __a, int __b, signed char *__c)
7866 {
7867 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7868 }
7869
7870 static void __ATTRS_o_ai
vec_stvebx(vector unsigned char __a,int __b,unsigned char * __c)7871 vec_stvebx(vector unsigned char __a, int __b, unsigned char *__c)
7872 {
7873 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7874 }
7875
7876 static void __ATTRS_o_ai
vec_stvebx(vector bool char __a,int __b,signed char * __c)7877 vec_stvebx(vector bool char __a, int __b, signed char *__c)
7878 {
7879 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7880 }
7881
7882 static void __ATTRS_o_ai
vec_stvebx(vector bool char __a,int __b,unsigned char * __c)7883 vec_stvebx(vector bool char __a, int __b, unsigned char *__c)
7884 {
7885 __builtin_altivec_stvebx((vector char)__a, __b, __c);
7886 }
7887
7888 /* vec_stvehx */
7889
7890 static void __ATTRS_o_ai
vec_stvehx(vector short __a,int __b,short * __c)7891 vec_stvehx(vector short __a, int __b, short *__c)
7892 {
7893 __builtin_altivec_stvehx(__a, __b, __c);
7894 }
7895
7896 static void __ATTRS_o_ai
vec_stvehx(vector unsigned short __a,int __b,unsigned short * __c)7897 vec_stvehx(vector unsigned short __a, int __b, unsigned short *__c)
7898 {
7899 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7900 }
7901
7902 static void __ATTRS_o_ai
vec_stvehx(vector bool short __a,int __b,short * __c)7903 vec_stvehx(vector bool short __a, int __b, short *__c)
7904 {
7905 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7906 }
7907
7908 static void __ATTRS_o_ai
vec_stvehx(vector bool short __a,int __b,unsigned short * __c)7909 vec_stvehx(vector bool short __a, int __b, unsigned short *__c)
7910 {
7911 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7912 }
7913
7914 static void __ATTRS_o_ai
vec_stvehx(vector pixel __a,int __b,short * __c)7915 vec_stvehx(vector pixel __a, int __b, short *__c)
7916 {
7917 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7918 }
7919
7920 static void __ATTRS_o_ai
vec_stvehx(vector pixel __a,int __b,unsigned short * __c)7921 vec_stvehx(vector pixel __a, int __b, unsigned short *__c)
7922 {
7923 __builtin_altivec_stvehx((vector short)__a, __b, __c);
7924 }
7925
7926 /* vec_stvewx */
7927
7928 static void __ATTRS_o_ai
vec_stvewx(vector int __a,int __b,int * __c)7929 vec_stvewx(vector int __a, int __b, int *__c)
7930 {
7931 __builtin_altivec_stvewx(__a, __b, __c);
7932 }
7933
7934 static void __ATTRS_o_ai
vec_stvewx(vector unsigned int __a,int __b,unsigned int * __c)7935 vec_stvewx(vector unsigned int __a, int __b, unsigned int *__c)
7936 {
7937 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7938 }
7939
7940 static void __ATTRS_o_ai
vec_stvewx(vector bool int __a,int __b,int * __c)7941 vec_stvewx(vector bool int __a, int __b, int *__c)
7942 {
7943 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7944 }
7945
7946 static void __ATTRS_o_ai
vec_stvewx(vector bool int __a,int __b,unsigned int * __c)7947 vec_stvewx(vector bool int __a, int __b, unsigned int *__c)
7948 {
7949 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7950 }
7951
7952 static void __ATTRS_o_ai
vec_stvewx(vector float __a,int __b,float * __c)7953 vec_stvewx(vector float __a, int __b, float *__c)
7954 {
7955 __builtin_altivec_stvewx((vector int)__a, __b, __c);
7956 }
7957
7958 /* vec_stl */
7959
7960 static void __ATTRS_o_ai
vec_stl(vector signed char __a,int __b,vector signed char * __c)7961 vec_stl(vector signed char __a, int __b, vector signed char *__c)
7962 {
7963 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7964 }
7965
7966 static void __ATTRS_o_ai
vec_stl(vector signed char __a,int __b,signed char * __c)7967 vec_stl(vector signed char __a, int __b, signed char *__c)
7968 {
7969 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7970 }
7971
7972 static void __ATTRS_o_ai
vec_stl(vector unsigned char __a,int __b,vector unsigned char * __c)7973 vec_stl(vector unsigned char __a, int __b, vector unsigned char *__c)
7974 {
7975 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7976 }
7977
7978 static void __ATTRS_o_ai
vec_stl(vector unsigned char __a,int __b,unsigned char * __c)7979 vec_stl(vector unsigned char __a, int __b, unsigned char *__c)
7980 {
7981 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7982 }
7983
7984 static void __ATTRS_o_ai
vec_stl(vector bool char __a,int __b,signed char * __c)7985 vec_stl(vector bool char __a, int __b, signed char *__c)
7986 {
7987 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7988 }
7989
7990 static void __ATTRS_o_ai
vec_stl(vector bool char __a,int __b,unsigned char * __c)7991 vec_stl(vector bool char __a, int __b, unsigned char *__c)
7992 {
7993 __builtin_altivec_stvxl((vector int)__a, __b, __c);
7994 }
7995
7996 static void __ATTRS_o_ai
vec_stl(vector bool char __a,int __b,vector bool char * __c)7997 vec_stl(vector bool char __a, int __b, vector bool char *__c)
7998 {
7999 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8000 }
8001
8002 static void __ATTRS_o_ai
vec_stl(vector short __a,int __b,vector short * __c)8003 vec_stl(vector short __a, int __b, vector short *__c)
8004 {
8005 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8006 }
8007
8008 static void __ATTRS_o_ai
vec_stl(vector short __a,int __b,short * __c)8009 vec_stl(vector short __a, int __b, short *__c)
8010 {
8011 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8012 }
8013
8014 static void __ATTRS_o_ai
vec_stl(vector unsigned short __a,int __b,vector unsigned short * __c)8015 vec_stl(vector unsigned short __a, int __b, vector unsigned short *__c)
8016 {
8017 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8018 }
8019
8020 static void __ATTRS_o_ai
vec_stl(vector unsigned short __a,int __b,unsigned short * __c)8021 vec_stl(vector unsigned short __a, int __b, unsigned short *__c)
8022 {
8023 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8024 }
8025
8026 static void __ATTRS_o_ai
vec_stl(vector bool short __a,int __b,short * __c)8027 vec_stl(vector bool short __a, int __b, short *__c)
8028 {
8029 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8030 }
8031
8032 static void __ATTRS_o_ai
vec_stl(vector bool short __a,int __b,unsigned short * __c)8033 vec_stl(vector bool short __a, int __b, unsigned short *__c)
8034 {
8035 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8036 }
8037
8038 static void __ATTRS_o_ai
vec_stl(vector bool short __a,int __b,vector bool short * __c)8039 vec_stl(vector bool short __a, int __b, vector bool short *__c)
8040 {
8041 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8042 }
8043
8044 static void __ATTRS_o_ai
vec_stl(vector pixel __a,int __b,short * __c)8045 vec_stl(vector pixel __a, int __b, short *__c)
8046 {
8047 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8048 }
8049
8050 static void __ATTRS_o_ai
vec_stl(vector pixel __a,int __b,unsigned short * __c)8051 vec_stl(vector pixel __a, int __b, unsigned short *__c)
8052 {
8053 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8054 }
8055
8056 static void __ATTRS_o_ai
vec_stl(vector pixel __a,int __b,vector pixel * __c)8057 vec_stl(vector pixel __a, int __b, vector pixel *__c)
8058 {
8059 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8060 }
8061
8062 static void __ATTRS_o_ai
vec_stl(vector int __a,int __b,vector int * __c)8063 vec_stl(vector int __a, int __b, vector int *__c)
8064 {
8065 __builtin_altivec_stvxl(__a, __b, __c);
8066 }
8067
8068 static void __ATTRS_o_ai
vec_stl(vector int __a,int __b,int * __c)8069 vec_stl(vector int __a, int __b, int *__c)
8070 {
8071 __builtin_altivec_stvxl(__a, __b, __c);
8072 }
8073
8074 static void __ATTRS_o_ai
vec_stl(vector unsigned int __a,int __b,vector unsigned int * __c)8075 vec_stl(vector unsigned int __a, int __b, vector unsigned int *__c)
8076 {
8077 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8078 }
8079
8080 static void __ATTRS_o_ai
vec_stl(vector unsigned int __a,int __b,unsigned int * __c)8081 vec_stl(vector unsigned int __a, int __b, unsigned int *__c)
8082 {
8083 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8084 }
8085
8086 static void __ATTRS_o_ai
vec_stl(vector bool int __a,int __b,int * __c)8087 vec_stl(vector bool int __a, int __b, int *__c)
8088 {
8089 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8090 }
8091
8092 static void __ATTRS_o_ai
vec_stl(vector bool int __a,int __b,unsigned int * __c)8093 vec_stl(vector bool int __a, int __b, unsigned int *__c)
8094 {
8095 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8096 }
8097
8098 static void __ATTRS_o_ai
vec_stl(vector bool int __a,int __b,vector bool int * __c)8099 vec_stl(vector bool int __a, int __b, vector bool int *__c)
8100 {
8101 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8102 }
8103
8104 static void __ATTRS_o_ai
vec_stl(vector float __a,int __b,vector float * __c)8105 vec_stl(vector float __a, int __b, vector float *__c)
8106 {
8107 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8108 }
8109
8110 static void __ATTRS_o_ai
vec_stl(vector float __a,int __b,float * __c)8111 vec_stl(vector float __a, int __b, float *__c)
8112 {
8113 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8114 }
8115
8116 /* vec_stvxl */
8117
8118 static void __ATTRS_o_ai
vec_stvxl(vector signed char __a,int __b,vector signed char * __c)8119 vec_stvxl(vector signed char __a, int __b, vector signed char *__c)
8120 {
8121 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8122 }
8123
8124 static void __ATTRS_o_ai
vec_stvxl(vector signed char __a,int __b,signed char * __c)8125 vec_stvxl(vector signed char __a, int __b, signed char *__c)
8126 {
8127 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8128 }
8129
8130 static void __ATTRS_o_ai
vec_stvxl(vector unsigned char __a,int __b,vector unsigned char * __c)8131 vec_stvxl(vector unsigned char __a, int __b, vector unsigned char *__c)
8132 {
8133 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8134 }
8135
8136 static void __ATTRS_o_ai
vec_stvxl(vector unsigned char __a,int __b,unsigned char * __c)8137 vec_stvxl(vector unsigned char __a, int __b, unsigned char *__c)
8138 {
8139 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8140 }
8141
8142 static void __ATTRS_o_ai
vec_stvxl(vector bool char __a,int __b,signed char * __c)8143 vec_stvxl(vector bool char __a, int __b, signed char *__c)
8144 {
8145 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8146 }
8147
8148 static void __ATTRS_o_ai
vec_stvxl(vector bool char __a,int __b,unsigned char * __c)8149 vec_stvxl(vector bool char __a, int __b, unsigned char *__c)
8150 {
8151 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8152 }
8153
8154 static void __ATTRS_o_ai
vec_stvxl(vector bool char __a,int __b,vector bool char * __c)8155 vec_stvxl(vector bool char __a, int __b, vector bool char *__c)
8156 {
8157 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8158 }
8159
8160 static void __ATTRS_o_ai
vec_stvxl(vector short __a,int __b,vector short * __c)8161 vec_stvxl(vector short __a, int __b, vector short *__c)
8162 {
8163 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8164 }
8165
8166 static void __ATTRS_o_ai
vec_stvxl(vector short __a,int __b,short * __c)8167 vec_stvxl(vector short __a, int __b, short *__c)
8168 {
8169 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8170 }
8171
8172 static void __ATTRS_o_ai
vec_stvxl(vector unsigned short __a,int __b,vector unsigned short * __c)8173 vec_stvxl(vector unsigned short __a, int __b, vector unsigned short *__c)
8174 {
8175 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8176 }
8177
8178 static void __ATTRS_o_ai
vec_stvxl(vector unsigned short __a,int __b,unsigned short * __c)8179 vec_stvxl(vector unsigned short __a, int __b, unsigned short *__c)
8180 {
8181 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8182 }
8183
8184 static void __ATTRS_o_ai
vec_stvxl(vector bool short __a,int __b,short * __c)8185 vec_stvxl(vector bool short __a, int __b, short *__c)
8186 {
8187 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8188 }
8189
8190 static void __ATTRS_o_ai
vec_stvxl(vector bool short __a,int __b,unsigned short * __c)8191 vec_stvxl(vector bool short __a, int __b, unsigned short *__c)
8192 {
8193 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8194 }
8195
8196 static void __ATTRS_o_ai
vec_stvxl(vector bool short __a,int __b,vector bool short * __c)8197 vec_stvxl(vector bool short __a, int __b, vector bool short *__c)
8198 {
8199 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8200 }
8201
8202 static void __ATTRS_o_ai
vec_stvxl(vector pixel __a,int __b,short * __c)8203 vec_stvxl(vector pixel __a, int __b, short *__c)
8204 {
8205 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8206 }
8207
8208 static void __ATTRS_o_ai
vec_stvxl(vector pixel __a,int __b,unsigned short * __c)8209 vec_stvxl(vector pixel __a, int __b, unsigned short *__c)
8210 {
8211 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8212 }
8213
8214 static void __ATTRS_o_ai
vec_stvxl(vector pixel __a,int __b,vector pixel * __c)8215 vec_stvxl(vector pixel __a, int __b, vector pixel *__c)
8216 {
8217 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8218 }
8219
8220 static void __ATTRS_o_ai
vec_stvxl(vector int __a,int __b,vector int * __c)8221 vec_stvxl(vector int __a, int __b, vector int *__c)
8222 {
8223 __builtin_altivec_stvxl(__a, __b, __c);
8224 }
8225
8226 static void __ATTRS_o_ai
vec_stvxl(vector int __a,int __b,int * __c)8227 vec_stvxl(vector int __a, int __b, int *__c)
8228 {
8229 __builtin_altivec_stvxl(__a, __b, __c);
8230 }
8231
8232 static void __ATTRS_o_ai
vec_stvxl(vector unsigned int __a,int __b,vector unsigned int * __c)8233 vec_stvxl(vector unsigned int __a, int __b, vector unsigned int *__c)
8234 {
8235 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8236 }
8237
8238 static void __ATTRS_o_ai
vec_stvxl(vector unsigned int __a,int __b,unsigned int * __c)8239 vec_stvxl(vector unsigned int __a, int __b, unsigned int *__c)
8240 {
8241 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8242 }
8243
8244 static void __ATTRS_o_ai
vec_stvxl(vector bool int __a,int __b,int * __c)8245 vec_stvxl(vector bool int __a, int __b, int *__c)
8246 {
8247 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8248 }
8249
8250 static void __ATTRS_o_ai
vec_stvxl(vector bool int __a,int __b,unsigned int * __c)8251 vec_stvxl(vector bool int __a, int __b, unsigned int *__c)
8252 {
8253 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8254 }
8255
8256 static void __ATTRS_o_ai
vec_stvxl(vector bool int __a,int __b,vector bool int * __c)8257 vec_stvxl(vector bool int __a, int __b, vector bool int *__c)
8258 {
8259 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8260 }
8261
8262 static void __ATTRS_o_ai
vec_stvxl(vector float __a,int __b,vector float * __c)8263 vec_stvxl(vector float __a, int __b, vector float *__c)
8264 {
8265 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8266 }
8267
8268 static void __ATTRS_o_ai
vec_stvxl(vector float __a,int __b,float * __c)8269 vec_stvxl(vector float __a, int __b, float *__c)
8270 {
8271 __builtin_altivec_stvxl((vector int)__a, __b, __c);
8272 }
8273
8274 /* vec_sub */
8275
8276 static vector signed char __ATTRS_o_ai
vec_sub(vector signed char __a,vector signed char __b)8277 vec_sub(vector signed char __a, vector signed char __b)
8278 {
8279 return __a - __b;
8280 }
8281
8282 static vector signed char __ATTRS_o_ai
vec_sub(vector bool char __a,vector signed char __b)8283 vec_sub(vector bool char __a, vector signed char __b)
8284 {
8285 return (vector signed char)__a - __b;
8286 }
8287
8288 static vector signed char __ATTRS_o_ai
vec_sub(vector signed char __a,vector bool char __b)8289 vec_sub(vector signed char __a, vector bool char __b)
8290 {
8291 return __a - (vector signed char)__b;
8292 }
8293
8294 static vector unsigned char __ATTRS_o_ai
vec_sub(vector unsigned char __a,vector unsigned char __b)8295 vec_sub(vector unsigned char __a, vector unsigned char __b)
8296 {
8297 return __a - __b;
8298 }
8299
8300 static vector unsigned char __ATTRS_o_ai
vec_sub(vector bool char __a,vector unsigned char __b)8301 vec_sub(vector bool char __a, vector unsigned char __b)
8302 {
8303 return (vector unsigned char)__a - __b;
8304 }
8305
8306 static vector unsigned char __ATTRS_o_ai
vec_sub(vector unsigned char __a,vector bool char __b)8307 vec_sub(vector unsigned char __a, vector bool char __b)
8308 {
8309 return __a - (vector unsigned char)__b;
8310 }
8311
8312 static vector short __ATTRS_o_ai
vec_sub(vector short __a,vector short __b)8313 vec_sub(vector short __a, vector short __b)
8314 {
8315 return __a - __b;
8316 }
8317
8318 static vector short __ATTRS_o_ai
vec_sub(vector bool short __a,vector short __b)8319 vec_sub(vector bool short __a, vector short __b)
8320 {
8321 return (vector short)__a - __b;
8322 }
8323
8324 static vector short __ATTRS_o_ai
vec_sub(vector short __a,vector bool short __b)8325 vec_sub(vector short __a, vector bool short __b)
8326 {
8327 return __a - (vector short)__b;
8328 }
8329
8330 static vector unsigned short __ATTRS_o_ai
vec_sub(vector unsigned short __a,vector unsigned short __b)8331 vec_sub(vector unsigned short __a, vector unsigned short __b)
8332 {
8333 return __a - __b;
8334 }
8335
8336 static vector unsigned short __ATTRS_o_ai
vec_sub(vector bool short __a,vector unsigned short __b)8337 vec_sub(vector bool short __a, vector unsigned short __b)
8338 {
8339 return (vector unsigned short)__a - __b;
8340 }
8341
8342 static vector unsigned short __ATTRS_o_ai
vec_sub(vector unsigned short __a,vector bool short __b)8343 vec_sub(vector unsigned short __a, vector bool short __b)
8344 {
8345 return __a - (vector unsigned short)__b;
8346 }
8347
8348 static vector int __ATTRS_o_ai
vec_sub(vector int __a,vector int __b)8349 vec_sub(vector int __a, vector int __b)
8350 {
8351 return __a - __b;
8352 }
8353
8354 static vector int __ATTRS_o_ai
vec_sub(vector bool int __a,vector int __b)8355 vec_sub(vector bool int __a, vector int __b)
8356 {
8357 return (vector int)__a - __b;
8358 }
8359
8360 static vector int __ATTRS_o_ai
vec_sub(vector int __a,vector bool int __b)8361 vec_sub(vector int __a, vector bool int __b)
8362 {
8363 return __a - (vector int)__b;
8364 }
8365
8366 static vector unsigned int __ATTRS_o_ai
vec_sub(vector unsigned int __a,vector unsigned int __b)8367 vec_sub(vector unsigned int __a, vector unsigned int __b)
8368 {
8369 return __a - __b;
8370 }
8371
8372 static vector unsigned int __ATTRS_o_ai
vec_sub(vector bool int __a,vector unsigned int __b)8373 vec_sub(vector bool int __a, vector unsigned int __b)
8374 {
8375 return (vector unsigned int)__a - __b;
8376 }
8377
8378 static vector unsigned int __ATTRS_o_ai
vec_sub(vector unsigned int __a,vector bool int __b)8379 vec_sub(vector unsigned int __a, vector bool int __b)
8380 {
8381 return __a - (vector unsigned int)__b;
8382 }
8383
8384 static vector float __ATTRS_o_ai
vec_sub(vector float __a,vector float __b)8385 vec_sub(vector float __a, vector float __b)
8386 {
8387 return __a - __b;
8388 }
8389
8390 /* vec_vsububm */
8391
8392 #define __builtin_altivec_vsububm vec_vsububm
8393
8394 static vector signed char __ATTRS_o_ai
vec_vsububm(vector signed char __a,vector signed char __b)8395 vec_vsububm(vector signed char __a, vector signed char __b)
8396 {
8397 return __a - __b;
8398 }
8399
8400 static vector signed char __ATTRS_o_ai
vec_vsububm(vector bool char __a,vector signed char __b)8401 vec_vsububm(vector bool char __a, vector signed char __b)
8402 {
8403 return (vector signed char)__a - __b;
8404 }
8405
8406 static vector signed char __ATTRS_o_ai
vec_vsububm(vector signed char __a,vector bool char __b)8407 vec_vsububm(vector signed char __a, vector bool char __b)
8408 {
8409 return __a - (vector signed char)__b;
8410 }
8411
8412 static vector unsigned char __ATTRS_o_ai
vec_vsububm(vector unsigned char __a,vector unsigned char __b)8413 vec_vsububm(vector unsigned char __a, vector unsigned char __b)
8414 {
8415 return __a - __b;
8416 }
8417
8418 static vector unsigned char __ATTRS_o_ai
vec_vsububm(vector bool char __a,vector unsigned char __b)8419 vec_vsububm(vector bool char __a, vector unsigned char __b)
8420 {
8421 return (vector unsigned char)__a - __b;
8422 }
8423
8424 static vector unsigned char __ATTRS_o_ai
vec_vsububm(vector unsigned char __a,vector bool char __b)8425 vec_vsububm(vector unsigned char __a, vector bool char __b)
8426 {
8427 return __a - (vector unsigned char)__b;
8428 }
8429
8430 /* vec_vsubuhm */
8431
8432 #define __builtin_altivec_vsubuhm vec_vsubuhm
8433
8434 static vector short __ATTRS_o_ai
vec_vsubuhm(vector short __a,vector short __b)8435 vec_vsubuhm(vector short __a, vector short __b)
8436 {
8437 return __a - __b;
8438 }
8439
8440 static vector short __ATTRS_o_ai
vec_vsubuhm(vector bool short __a,vector short __b)8441 vec_vsubuhm(vector bool short __a, vector short __b)
8442 {
8443 return (vector short)__a - __b;
8444 }
8445
8446 static vector short __ATTRS_o_ai
vec_vsubuhm(vector short __a,vector bool short __b)8447 vec_vsubuhm(vector short __a, vector bool short __b)
8448 {
8449 return __a - (vector short)__b;
8450 }
8451
8452 static vector unsigned short __ATTRS_o_ai
vec_vsubuhm(vector unsigned short __a,vector unsigned short __b)8453 vec_vsubuhm(vector unsigned short __a, vector unsigned short __b)
8454 {
8455 return __a - __b;
8456 }
8457
8458 static vector unsigned short __ATTRS_o_ai
vec_vsubuhm(vector bool short __a,vector unsigned short __b)8459 vec_vsubuhm(vector bool short __a, vector unsigned short __b)
8460 {
8461 return (vector unsigned short)__a - __b;
8462 }
8463
8464 static vector unsigned short __ATTRS_o_ai
vec_vsubuhm(vector unsigned short __a,vector bool short __b)8465 vec_vsubuhm(vector unsigned short __a, vector bool short __b)
8466 {
8467 return __a - (vector unsigned short)__b;
8468 }
8469
8470 /* vec_vsubuwm */
8471
8472 #define __builtin_altivec_vsubuwm vec_vsubuwm
8473
8474 static vector int __ATTRS_o_ai
vec_vsubuwm(vector int __a,vector int __b)8475 vec_vsubuwm(vector int __a, vector int __b)
8476 {
8477 return __a - __b;
8478 }
8479
8480 static vector int __ATTRS_o_ai
vec_vsubuwm(vector bool int __a,vector int __b)8481 vec_vsubuwm(vector bool int __a, vector int __b)
8482 {
8483 return (vector int)__a - __b;
8484 }
8485
8486 static vector int __ATTRS_o_ai
vec_vsubuwm(vector int __a,vector bool int __b)8487 vec_vsubuwm(vector int __a, vector bool int __b)
8488 {
8489 return __a - (vector int)__b;
8490 }
8491
8492 static vector unsigned int __ATTRS_o_ai
vec_vsubuwm(vector unsigned int __a,vector unsigned int __b)8493 vec_vsubuwm(vector unsigned int __a, vector unsigned int __b)
8494 {
8495 return __a - __b;
8496 }
8497
8498 static vector unsigned int __ATTRS_o_ai
vec_vsubuwm(vector bool int __a,vector unsigned int __b)8499 vec_vsubuwm(vector bool int __a, vector unsigned int __b)
8500 {
8501 return (vector unsigned int)__a - __b;
8502 }
8503
8504 static vector unsigned int __ATTRS_o_ai
vec_vsubuwm(vector unsigned int __a,vector bool int __b)8505 vec_vsubuwm(vector unsigned int __a, vector bool int __b)
8506 {
8507 return __a - (vector unsigned int)__b;
8508 }
8509
8510 /* vec_vsubfp */
8511
8512 #define __builtin_altivec_vsubfp vec_vsubfp
8513
8514 static vector float __attribute__((__always_inline__))
vec_vsubfp(vector float __a,vector float __b)8515 vec_vsubfp(vector float __a, vector float __b)
8516 {
8517 return __a - __b;
8518 }
8519
8520 /* vec_subc */
8521
8522 static vector unsigned int __attribute__((__always_inline__))
vec_subc(vector unsigned int __a,vector unsigned int __b)8523 vec_subc(vector unsigned int __a, vector unsigned int __b)
8524 {
8525 return __builtin_altivec_vsubcuw(__a, __b);
8526 }
8527
8528 /* vec_vsubcuw */
8529
8530 static vector unsigned int __attribute__((__always_inline__))
vec_vsubcuw(vector unsigned int __a,vector unsigned int __b)8531 vec_vsubcuw(vector unsigned int __a, vector unsigned int __b)
8532 {
8533 return __builtin_altivec_vsubcuw(__a, __b);
8534 }
8535
8536 /* vec_subs */
8537
8538 static vector signed char __ATTRS_o_ai
vec_subs(vector signed char __a,vector signed char __b)8539 vec_subs(vector signed char __a, vector signed char __b)
8540 {
8541 return __builtin_altivec_vsubsbs(__a, __b);
8542 }
8543
8544 static vector signed char __ATTRS_o_ai
vec_subs(vector bool char __a,vector signed char __b)8545 vec_subs(vector bool char __a, vector signed char __b)
8546 {
8547 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
8548 }
8549
8550 static vector signed char __ATTRS_o_ai
vec_subs(vector signed char __a,vector bool char __b)8551 vec_subs(vector signed char __a, vector bool char __b)
8552 {
8553 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
8554 }
8555
8556 static vector unsigned char __ATTRS_o_ai
vec_subs(vector unsigned char __a,vector unsigned char __b)8557 vec_subs(vector unsigned char __a, vector unsigned char __b)
8558 {
8559 return __builtin_altivec_vsububs(__a, __b);
8560 }
8561
8562 static vector unsigned char __ATTRS_o_ai
vec_subs(vector bool char __a,vector unsigned char __b)8563 vec_subs(vector bool char __a, vector unsigned char __b)
8564 {
8565 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
8566 }
8567
8568 static vector unsigned char __ATTRS_o_ai
vec_subs(vector unsigned char __a,vector bool char __b)8569 vec_subs(vector unsigned char __a, vector bool char __b)
8570 {
8571 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
8572 }
8573
8574 static vector short __ATTRS_o_ai
vec_subs(vector short __a,vector short __b)8575 vec_subs(vector short __a, vector short __b)
8576 {
8577 return __builtin_altivec_vsubshs(__a, __b);
8578 }
8579
8580 static vector short __ATTRS_o_ai
vec_subs(vector bool short __a,vector short __b)8581 vec_subs(vector bool short __a, vector short __b)
8582 {
8583 return __builtin_altivec_vsubshs((vector short)__a, __b);
8584 }
8585
8586 static vector short __ATTRS_o_ai
vec_subs(vector short __a,vector bool short __b)8587 vec_subs(vector short __a, vector bool short __b)
8588 {
8589 return __builtin_altivec_vsubshs(__a, (vector short)__b);
8590 }
8591
8592 static vector unsigned short __ATTRS_o_ai
vec_subs(vector unsigned short __a,vector unsigned short __b)8593 vec_subs(vector unsigned short __a, vector unsigned short __b)
8594 {
8595 return __builtin_altivec_vsubuhs(__a, __b);
8596 }
8597
8598 static vector unsigned short __ATTRS_o_ai
vec_subs(vector bool short __a,vector unsigned short __b)8599 vec_subs(vector bool short __a, vector unsigned short __b)
8600 {
8601 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
8602 }
8603
8604 static vector unsigned short __ATTRS_o_ai
vec_subs(vector unsigned short __a,vector bool short __b)8605 vec_subs(vector unsigned short __a, vector bool short __b)
8606 {
8607 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
8608 }
8609
8610 static vector int __ATTRS_o_ai
vec_subs(vector int __a,vector int __b)8611 vec_subs(vector int __a, vector int __b)
8612 {
8613 return __builtin_altivec_vsubsws(__a, __b);
8614 }
8615
8616 static vector int __ATTRS_o_ai
vec_subs(vector bool int __a,vector int __b)8617 vec_subs(vector bool int __a, vector int __b)
8618 {
8619 return __builtin_altivec_vsubsws((vector int)__a, __b);
8620 }
8621
8622 static vector int __ATTRS_o_ai
vec_subs(vector int __a,vector bool int __b)8623 vec_subs(vector int __a, vector bool int __b)
8624 {
8625 return __builtin_altivec_vsubsws(__a, (vector int)__b);
8626 }
8627
8628 static vector unsigned int __ATTRS_o_ai
vec_subs(vector unsigned int __a,vector unsigned int __b)8629 vec_subs(vector unsigned int __a, vector unsigned int __b)
8630 {
8631 return __builtin_altivec_vsubuws(__a, __b);
8632 }
8633
8634 static vector unsigned int __ATTRS_o_ai
vec_subs(vector bool int __a,vector unsigned int __b)8635 vec_subs(vector bool int __a, vector unsigned int __b)
8636 {
8637 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
8638 }
8639
8640 static vector unsigned int __ATTRS_o_ai
vec_subs(vector unsigned int __a,vector bool int __b)8641 vec_subs(vector unsigned int __a, vector bool int __b)
8642 {
8643 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
8644 }
8645
8646 /* vec_vsubsbs */
8647
8648 static vector signed char __ATTRS_o_ai
vec_vsubsbs(vector signed char __a,vector signed char __b)8649 vec_vsubsbs(vector signed char __a, vector signed char __b)
8650 {
8651 return __builtin_altivec_vsubsbs(__a, __b);
8652 }
8653
8654 static vector signed char __ATTRS_o_ai
vec_vsubsbs(vector bool char __a,vector signed char __b)8655 vec_vsubsbs(vector bool char __a, vector signed char __b)
8656 {
8657 return __builtin_altivec_vsubsbs((vector signed char)__a, __b);
8658 }
8659
8660 static vector signed char __ATTRS_o_ai
vec_vsubsbs(vector signed char __a,vector bool char __b)8661 vec_vsubsbs(vector signed char __a, vector bool char __b)
8662 {
8663 return __builtin_altivec_vsubsbs(__a, (vector signed char)__b);
8664 }
8665
8666 /* vec_vsububs */
8667
8668 static vector unsigned char __ATTRS_o_ai
vec_vsububs(vector unsigned char __a,vector unsigned char __b)8669 vec_vsububs(vector unsigned char __a, vector unsigned char __b)
8670 {
8671 return __builtin_altivec_vsububs(__a, __b);
8672 }
8673
8674 static vector unsigned char __ATTRS_o_ai
vec_vsububs(vector bool char __a,vector unsigned char __b)8675 vec_vsububs(vector bool char __a, vector unsigned char __b)
8676 {
8677 return __builtin_altivec_vsububs((vector unsigned char)__a, __b);
8678 }
8679
8680 static vector unsigned char __ATTRS_o_ai
vec_vsububs(vector unsigned char __a,vector bool char __b)8681 vec_vsububs(vector unsigned char __a, vector bool char __b)
8682 {
8683 return __builtin_altivec_vsububs(__a, (vector unsigned char)__b);
8684 }
8685
8686 /* vec_vsubshs */
8687
8688 static vector short __ATTRS_o_ai
vec_vsubshs(vector short __a,vector short __b)8689 vec_vsubshs(vector short __a, vector short __b)
8690 {
8691 return __builtin_altivec_vsubshs(__a, __b);
8692 }
8693
8694 static vector short __ATTRS_o_ai
vec_vsubshs(vector bool short __a,vector short __b)8695 vec_vsubshs(vector bool short __a, vector short __b)
8696 {
8697 return __builtin_altivec_vsubshs((vector short)__a, __b);
8698 }
8699
8700 static vector short __ATTRS_o_ai
vec_vsubshs(vector short __a,vector bool short __b)8701 vec_vsubshs(vector short __a, vector bool short __b)
8702 {
8703 return __builtin_altivec_vsubshs(__a, (vector short)__b);
8704 }
8705
8706 /* vec_vsubuhs */
8707
8708 static vector unsigned short __ATTRS_o_ai
vec_vsubuhs(vector unsigned short __a,vector unsigned short __b)8709 vec_vsubuhs(vector unsigned short __a, vector unsigned short __b)
8710 {
8711 return __builtin_altivec_vsubuhs(__a, __b);
8712 }
8713
8714 static vector unsigned short __ATTRS_o_ai
vec_vsubuhs(vector bool short __a,vector unsigned short __b)8715 vec_vsubuhs(vector bool short __a, vector unsigned short __b)
8716 {
8717 return __builtin_altivec_vsubuhs((vector unsigned short)__a, __b);
8718 }
8719
8720 static vector unsigned short __ATTRS_o_ai
vec_vsubuhs(vector unsigned short __a,vector bool short __b)8721 vec_vsubuhs(vector unsigned short __a, vector bool short __b)
8722 {
8723 return __builtin_altivec_vsubuhs(__a, (vector unsigned short)__b);
8724 }
8725
8726 /* vec_vsubsws */
8727
8728 static vector int __ATTRS_o_ai
vec_vsubsws(vector int __a,vector int __b)8729 vec_vsubsws(vector int __a, vector int __b)
8730 {
8731 return __builtin_altivec_vsubsws(__a, __b);
8732 }
8733
8734 static vector int __ATTRS_o_ai
vec_vsubsws(vector bool int __a,vector int __b)8735 vec_vsubsws(vector bool int __a, vector int __b)
8736 {
8737 return __builtin_altivec_vsubsws((vector int)__a, __b);
8738 }
8739
8740 static vector int __ATTRS_o_ai
vec_vsubsws(vector int __a,vector bool int __b)8741 vec_vsubsws(vector int __a, vector bool int __b)
8742 {
8743 return __builtin_altivec_vsubsws(__a, (vector int)__b);
8744 }
8745
8746 /* vec_vsubuws */
8747
8748 static vector unsigned int __ATTRS_o_ai
vec_vsubuws(vector unsigned int __a,vector unsigned int __b)8749 vec_vsubuws(vector unsigned int __a, vector unsigned int __b)
8750 {
8751 return __builtin_altivec_vsubuws(__a, __b);
8752 }
8753
8754 static vector unsigned int __ATTRS_o_ai
vec_vsubuws(vector bool int __a,vector unsigned int __b)8755 vec_vsubuws(vector bool int __a, vector unsigned int __b)
8756 {
8757 return __builtin_altivec_vsubuws((vector unsigned int)__a, __b);
8758 }
8759
8760 static vector unsigned int __ATTRS_o_ai
vec_vsubuws(vector unsigned int __a,vector bool int __b)8761 vec_vsubuws(vector unsigned int __a, vector bool int __b)
8762 {
8763 return __builtin_altivec_vsubuws(__a, (vector unsigned int)__b);
8764 }
8765
8766 /* vec_sum4s */
8767
8768 static vector int __ATTRS_o_ai
vec_sum4s(vector signed char __a,vector int __b)8769 vec_sum4s(vector signed char __a, vector int __b)
8770 {
8771 return __builtin_altivec_vsum4sbs(__a, __b);
8772 }
8773
8774 static vector unsigned int __ATTRS_o_ai
vec_sum4s(vector unsigned char __a,vector unsigned int __b)8775 vec_sum4s(vector unsigned char __a, vector unsigned int __b)
8776 {
8777 return __builtin_altivec_vsum4ubs(__a, __b);
8778 }
8779
8780 static vector int __ATTRS_o_ai
vec_sum4s(vector signed short __a,vector int __b)8781 vec_sum4s(vector signed short __a, vector int __b)
8782 {
8783 return __builtin_altivec_vsum4shs(__a, __b);
8784 }
8785
8786 /* vec_vsum4sbs */
8787
8788 static vector int __attribute__((__always_inline__))
vec_vsum4sbs(vector signed char __a,vector int __b)8789 vec_vsum4sbs(vector signed char __a, vector int __b)
8790 {
8791 return __builtin_altivec_vsum4sbs(__a, __b);
8792 }
8793
8794 /* vec_vsum4ubs */
8795
8796 static vector unsigned int __attribute__((__always_inline__))
vec_vsum4ubs(vector unsigned char __a,vector unsigned int __b)8797 vec_vsum4ubs(vector unsigned char __a, vector unsigned int __b)
8798 {
8799 return __builtin_altivec_vsum4ubs(__a, __b);
8800 }
8801
8802 /* vec_vsum4shs */
8803
8804 static vector int __attribute__((__always_inline__))
vec_vsum4shs(vector signed short __a,vector int __b)8805 vec_vsum4shs(vector signed short __a, vector int __b)
8806 {
8807 return __builtin_altivec_vsum4shs(__a, __b);
8808 }
8809
8810 /* vec_sum2s */
8811
8812 /* The vsum2sws instruction has a big-endian bias, so that the second
8813 input vector and the result always reference big-endian elements
8814 1 and 3 (little-endian element 0 and 2). For ease of porting the
8815 programmer wants elements 1 and 3 in both cases, so for little
8816 endian we must perform some permutes. */
8817
8818 static vector signed int __attribute__((__always_inline__))
vec_sum2s(vector int __a,vector int __b)8819 vec_sum2s(vector int __a, vector int __b)
8820 {
8821 #ifdef __LITTLE_ENDIAN__
8822 vector int __c = (vector signed int)
8823 vec_perm(__b, __b, (vector unsigned char)
8824 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8825 __c = __builtin_altivec_vsum2sws(__a, __c);
8826 return (vector signed int)
8827 vec_perm(__c, __c, (vector unsigned char)
8828 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8829 #else
8830 return __builtin_altivec_vsum2sws(__a, __b);
8831 #endif
8832 }
8833
8834 /* vec_vsum2sws */
8835
8836 static vector signed int __attribute__((__always_inline__))
vec_vsum2sws(vector int __a,vector int __b)8837 vec_vsum2sws(vector int __a, vector int __b)
8838 {
8839 #ifdef __LITTLE_ENDIAN__
8840 vector int __c = (vector signed int)
8841 vec_perm(__b, __b, (vector unsigned char)
8842 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8843 __c = __builtin_altivec_vsum2sws(__a, __c);
8844 return (vector signed int)
8845 vec_perm(__c, __c, (vector unsigned char)
8846 (4,5,6,7,0,1,2,3,12,13,14,15,8,9,10,11));
8847 #else
8848 return __builtin_altivec_vsum2sws(__a, __b);
8849 #endif
8850 }
8851
8852 /* vec_sums */
8853
8854 /* The vsumsws instruction has a big-endian bias, so that the second
8855 input vector and the result always reference big-endian element 3
8856 (little-endian element 0). For ease of porting the programmer
8857 wants element 3 in both cases, so for little endian we must perform
8858 some permutes. */
8859
8860 static vector signed int __attribute__((__always_inline__))
vec_sums(vector signed int __a,vector signed int __b)8861 vec_sums(vector signed int __a, vector signed int __b)
8862 {
8863 #ifdef __LITTLE_ENDIAN__
8864 __b = (vector signed int)vec_splat(__b, 3);
8865 __b = __builtin_altivec_vsumsws(__a, __b);
8866 return (vector signed int)(0, 0, 0, __b[0]);
8867 #else
8868 return __builtin_altivec_vsumsws(__a, __b);
8869 #endif
8870 }
8871
8872 /* vec_vsumsws */
8873
8874 static vector signed int __attribute__((__always_inline__))
vec_vsumsws(vector signed int __a,vector signed int __b)8875 vec_vsumsws(vector signed int __a, vector signed int __b)
8876 {
8877 #ifdef __LITTLE_ENDIAN__
8878 __b = (vector signed int)vec_splat(__b, 3);
8879 __b = __builtin_altivec_vsumsws(__a, __b);
8880 return (vector signed int)(0, 0, 0, __b[0]);
8881 #else
8882 return __builtin_altivec_vsumsws(__a, __b);
8883 #endif
8884 }
8885
8886 /* vec_trunc */
8887
8888 static vector float __attribute__((__always_inline__))
vec_trunc(vector float __a)8889 vec_trunc(vector float __a)
8890 {
8891 return __builtin_altivec_vrfiz(__a);
8892 }
8893
8894 /* vec_vrfiz */
8895
8896 static vector float __attribute__((__always_inline__))
vec_vrfiz(vector float __a)8897 vec_vrfiz(vector float __a)
8898 {
8899 return __builtin_altivec_vrfiz(__a);
8900 }
8901
8902 /* vec_unpackh */
8903
8904 /* The vector unpack instructions all have a big-endian bias, so for
8905 little endian we must reverse the meanings of "high" and "low." */
8906
8907 static vector short __ATTRS_o_ai
vec_unpackh(vector signed char __a)8908 vec_unpackh(vector signed char __a)
8909 {
8910 #ifdef __LITTLE_ENDIAN__
8911 return __builtin_altivec_vupklsb((vector char)__a);
8912 #else
8913 return __builtin_altivec_vupkhsb((vector char)__a);
8914 #endif
8915 }
8916
8917 static vector bool short __ATTRS_o_ai
vec_unpackh(vector bool char __a)8918 vec_unpackh(vector bool char __a)
8919 {
8920 #ifdef __LITTLE_ENDIAN__
8921 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8922 #else
8923 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8924 #endif
8925 }
8926
8927 static vector int __ATTRS_o_ai
vec_unpackh(vector short __a)8928 vec_unpackh(vector short __a)
8929 {
8930 #ifdef __LITTLE_ENDIAN__
8931 return __builtin_altivec_vupklsh(__a);
8932 #else
8933 return __builtin_altivec_vupkhsh(__a);
8934 #endif
8935 }
8936
8937 static vector bool int __ATTRS_o_ai
vec_unpackh(vector bool short __a)8938 vec_unpackh(vector bool short __a)
8939 {
8940 #ifdef __LITTLE_ENDIAN__
8941 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8942 #else
8943 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8944 #endif
8945 }
8946
8947 static vector unsigned int __ATTRS_o_ai
vec_unpackh(vector pixel __a)8948 vec_unpackh(vector pixel __a)
8949 {
8950 #ifdef __LITTLE_ENDIAN__
8951 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
8952 #else
8953 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
8954 #endif
8955 }
8956
8957 /* vec_vupkhsb */
8958
8959 static vector short __ATTRS_o_ai
vec_vupkhsb(vector signed char __a)8960 vec_vupkhsb(vector signed char __a)
8961 {
8962 #ifdef __LITTLE_ENDIAN__
8963 return __builtin_altivec_vupklsb((vector char)__a);
8964 #else
8965 return __builtin_altivec_vupkhsb((vector char)__a);
8966 #endif
8967 }
8968
8969 static vector bool short __ATTRS_o_ai
vec_vupkhsb(vector bool char __a)8970 vec_vupkhsb(vector bool char __a)
8971 {
8972 #ifdef __LITTLE_ENDIAN__
8973 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
8974 #else
8975 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
8976 #endif
8977 }
8978
8979 /* vec_vupkhsh */
8980
8981 static vector int __ATTRS_o_ai
vec_vupkhsh(vector short __a)8982 vec_vupkhsh(vector short __a)
8983 {
8984 #ifdef __LITTLE_ENDIAN__
8985 return __builtin_altivec_vupklsh(__a);
8986 #else
8987 return __builtin_altivec_vupkhsh(__a);
8988 #endif
8989 }
8990
8991 static vector bool int __ATTRS_o_ai
vec_vupkhsh(vector bool short __a)8992 vec_vupkhsh(vector bool short __a)
8993 {
8994 #ifdef __LITTLE_ENDIAN__
8995 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
8996 #else
8997 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
8998 #endif
8999 }
9000
9001 static vector unsigned int __ATTRS_o_ai
vec_vupkhsh(vector pixel __a)9002 vec_vupkhsh(vector pixel __a)
9003 {
9004 #ifdef __LITTLE_ENDIAN__
9005 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9006 #else
9007 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9008 #endif
9009 }
9010
9011 /* vec_unpackl */
9012
9013 static vector short __ATTRS_o_ai
vec_unpackl(vector signed char __a)9014 vec_unpackl(vector signed char __a)
9015 {
9016 #ifdef __LITTLE_ENDIAN__
9017 return __builtin_altivec_vupkhsb((vector char)__a);
9018 #else
9019 return __builtin_altivec_vupklsb((vector char)__a);
9020 #endif
9021 }
9022
9023 static vector bool short __ATTRS_o_ai
vec_unpackl(vector bool char __a)9024 vec_unpackl(vector bool char __a)
9025 {
9026 #ifdef __LITTLE_ENDIAN__
9027 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9028 #else
9029 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9030 #endif
9031 }
9032
9033 static vector int __ATTRS_o_ai
vec_unpackl(vector short __a)9034 vec_unpackl(vector short __a)
9035 {
9036 #ifdef __LITTLE_ENDIAN__
9037 return __builtin_altivec_vupkhsh(__a);
9038 #else
9039 return __builtin_altivec_vupklsh(__a);
9040 #endif
9041 }
9042
9043 static vector bool int __ATTRS_o_ai
vec_unpackl(vector bool short __a)9044 vec_unpackl(vector bool short __a)
9045 {
9046 #ifdef __LITTLE_ENDIAN__
9047 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9048 #else
9049 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9050 #endif
9051 }
9052
9053 static vector unsigned int __ATTRS_o_ai
vec_unpackl(vector pixel __a)9054 vec_unpackl(vector pixel __a)
9055 {
9056 #ifdef __LITTLE_ENDIAN__
9057 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9058 #else
9059 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9060 #endif
9061 }
9062
9063 /* vec_vupklsb */
9064
9065 static vector short __ATTRS_o_ai
vec_vupklsb(vector signed char __a)9066 vec_vupklsb(vector signed char __a)
9067 {
9068 #ifdef __LITTLE_ENDIAN__
9069 return __builtin_altivec_vupkhsb((vector char)__a);
9070 #else
9071 return __builtin_altivec_vupklsb((vector char)__a);
9072 #endif
9073 }
9074
9075 static vector bool short __ATTRS_o_ai
vec_vupklsb(vector bool char __a)9076 vec_vupklsb(vector bool char __a)
9077 {
9078 #ifdef __LITTLE_ENDIAN__
9079 return (vector bool short)__builtin_altivec_vupkhsb((vector char)__a);
9080 #else
9081 return (vector bool short)__builtin_altivec_vupklsb((vector char)__a);
9082 #endif
9083 }
9084
9085 /* vec_vupklsh */
9086
9087 static vector int __ATTRS_o_ai
vec_vupklsh(vector short __a)9088 vec_vupklsh(vector short __a)
9089 {
9090 #ifdef __LITTLE_ENDIAN__
9091 return __builtin_altivec_vupkhsh(__a);
9092 #else
9093 return __builtin_altivec_vupklsh(__a);
9094 #endif
9095 }
9096
9097 static vector bool int __ATTRS_o_ai
vec_vupklsh(vector bool short __a)9098 vec_vupklsh(vector bool short __a)
9099 {
9100 #ifdef __LITTLE_ENDIAN__
9101 return (vector bool int)__builtin_altivec_vupkhsh((vector short)__a);
9102 #else
9103 return (vector bool int)__builtin_altivec_vupklsh((vector short)__a);
9104 #endif
9105 }
9106
9107 static vector unsigned int __ATTRS_o_ai
vec_vupklsh(vector pixel __a)9108 vec_vupklsh(vector pixel __a)
9109 {
9110 #ifdef __LITTLE_ENDIAN__
9111 return (vector unsigned int)__builtin_altivec_vupkhpx((vector short)__a);
9112 #else
9113 return (vector unsigned int)__builtin_altivec_vupklpx((vector short)__a);
9114 #endif
9115 }
9116
9117 /* vec_vsx_ld */
9118
9119 #ifdef __VSX__
9120
9121 static vector signed int __ATTRS_o_ai
vec_vsx_ld(int __a,const vector signed int * __b)9122 vec_vsx_ld(int __a, const vector signed int *__b)
9123 {
9124 return (vector signed int)__builtin_vsx_lxvw4x(__a, __b);
9125 }
9126
9127 static vector unsigned int __ATTRS_o_ai
vec_vsx_ld(int __a,const vector unsigned int * __b)9128 vec_vsx_ld(int __a, const vector unsigned int *__b)
9129 {
9130 return (vector unsigned int)__builtin_vsx_lxvw4x(__a, __b);
9131 }
9132
9133 static vector float __ATTRS_o_ai
vec_vsx_ld(int __a,const vector float * __b)9134 vec_vsx_ld(int __a, const vector float *__b)
9135 {
9136 return (vector float)__builtin_vsx_lxvw4x(__a, __b);
9137 }
9138
9139 static vector signed long long __ATTRS_o_ai
vec_vsx_ld(int __a,const vector signed long long * __b)9140 vec_vsx_ld(int __a, const vector signed long long *__b)
9141 {
9142 return (vector signed long long)__builtin_vsx_lxvd2x(__a, __b);
9143 }
9144
9145 static vector unsigned long long __ATTRS_o_ai
vec_vsx_ld(int __a,const vector unsigned long long * __b)9146 vec_vsx_ld(int __a, const vector unsigned long long *__b)
9147 {
9148 return (vector unsigned long long)__builtin_vsx_lxvd2x(__a, __b);
9149 }
9150
9151 static vector double __ATTRS_o_ai
vec_vsx_ld(int __a,const vector double * __b)9152 vec_vsx_ld(int __a, const vector double *__b)
9153 {
9154 return (vector double)__builtin_vsx_lxvd2x(__a, __b);
9155 }
9156
9157 #endif
9158
9159 /* vec_vsx_st */
9160
9161 #ifdef __VSX__
9162
9163 static void __ATTRS_o_ai
vec_vsx_st(vector signed int __a,int __b,vector signed int * __c)9164 vec_vsx_st(vector signed int __a, int __b, vector signed int *__c)
9165 {
9166 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9167 }
9168
9169 static void __ATTRS_o_ai
vec_vsx_st(vector unsigned int __a,int __b,vector unsigned int * __c)9170 vec_vsx_st(vector unsigned int __a, int __b, vector unsigned int *__c)
9171 {
9172 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9173 }
9174
9175 static void __ATTRS_o_ai
vec_vsx_st(vector float __a,int __b,vector float * __c)9176 vec_vsx_st(vector float __a, int __b, vector float *__c)
9177 {
9178 __builtin_vsx_stxvw4x((vector int)__a, __b, __c);
9179 }
9180
9181 static void __ATTRS_o_ai
vec_vsx_st(vector signed long long __a,int __b,vector signed long long * __c)9182 vec_vsx_st(vector signed long long __a, int __b, vector signed long long *__c)
9183 {
9184 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9185 }
9186
9187 static void __ATTRS_o_ai
vec_vsx_st(vector unsigned long long __a,int __b,vector unsigned long long * __c)9188 vec_vsx_st(vector unsigned long long __a, int __b,
9189 vector unsigned long long *__c)
9190 {
9191 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9192 }
9193
9194 static void __ATTRS_o_ai
vec_vsx_st(vector double __a,int __b,vector double * __c)9195 vec_vsx_st(vector double __a, int __b, vector double *__c)
9196 {
9197 __builtin_vsx_stxvd2x((vector double)__a, __b, __c);
9198 }
9199
9200 #endif
9201
9202 /* vec_xor */
9203
9204 #define __builtin_altivec_vxor vec_xor
9205
9206 static vector signed char __ATTRS_o_ai
vec_xor(vector signed char __a,vector signed char __b)9207 vec_xor(vector signed char __a, vector signed char __b)
9208 {
9209 return __a ^ __b;
9210 }
9211
9212 static vector signed char __ATTRS_o_ai
vec_xor(vector bool char __a,vector signed char __b)9213 vec_xor(vector bool char __a, vector signed char __b)
9214 {
9215 return (vector signed char)__a ^ __b;
9216 }
9217
9218 static vector signed char __ATTRS_o_ai
vec_xor(vector signed char __a,vector bool char __b)9219 vec_xor(vector signed char __a, vector bool char __b)
9220 {
9221 return __a ^ (vector signed char)__b;
9222 }
9223
9224 static vector unsigned char __ATTRS_o_ai
vec_xor(vector unsigned char __a,vector unsigned char __b)9225 vec_xor(vector unsigned char __a, vector unsigned char __b)
9226 {
9227 return __a ^ __b;
9228 }
9229
9230 static vector unsigned char __ATTRS_o_ai
vec_xor(vector bool char __a,vector unsigned char __b)9231 vec_xor(vector bool char __a, vector unsigned char __b)
9232 {
9233 return (vector unsigned char)__a ^ __b;
9234 }
9235
9236 static vector unsigned char __ATTRS_o_ai
vec_xor(vector unsigned char __a,vector bool char __b)9237 vec_xor(vector unsigned char __a, vector bool char __b)
9238 {
9239 return __a ^ (vector unsigned char)__b;
9240 }
9241
9242 static vector bool char __ATTRS_o_ai
vec_xor(vector bool char __a,vector bool char __b)9243 vec_xor(vector bool char __a, vector bool char __b)
9244 {
9245 return __a ^ __b;
9246 }
9247
9248 static vector short __ATTRS_o_ai
vec_xor(vector short __a,vector short __b)9249 vec_xor(vector short __a, vector short __b)
9250 {
9251 return __a ^ __b;
9252 }
9253
9254 static vector short __ATTRS_o_ai
vec_xor(vector bool short __a,vector short __b)9255 vec_xor(vector bool short __a, vector short __b)
9256 {
9257 return (vector short)__a ^ __b;
9258 }
9259
9260 static vector short __ATTRS_o_ai
vec_xor(vector short __a,vector bool short __b)9261 vec_xor(vector short __a, vector bool short __b)
9262 {
9263 return __a ^ (vector short)__b;
9264 }
9265
9266 static vector unsigned short __ATTRS_o_ai
vec_xor(vector unsigned short __a,vector unsigned short __b)9267 vec_xor(vector unsigned short __a, vector unsigned short __b)
9268 {
9269 return __a ^ __b;
9270 }
9271
9272 static vector unsigned short __ATTRS_o_ai
vec_xor(vector bool short __a,vector unsigned short __b)9273 vec_xor(vector bool short __a, vector unsigned short __b)
9274 {
9275 return (vector unsigned short)__a ^ __b;
9276 }
9277
9278 static vector unsigned short __ATTRS_o_ai
vec_xor(vector unsigned short __a,vector bool short __b)9279 vec_xor(vector unsigned short __a, vector bool short __b)
9280 {
9281 return __a ^ (vector unsigned short)__b;
9282 }
9283
9284 static vector bool short __ATTRS_o_ai
vec_xor(vector bool short __a,vector bool short __b)9285 vec_xor(vector bool short __a, vector bool short __b)
9286 {
9287 return __a ^ __b;
9288 }
9289
9290 static vector int __ATTRS_o_ai
vec_xor(vector int __a,vector int __b)9291 vec_xor(vector int __a, vector int __b)
9292 {
9293 return __a ^ __b;
9294 }
9295
9296 static vector int __ATTRS_o_ai
vec_xor(vector bool int __a,vector int __b)9297 vec_xor(vector bool int __a, vector int __b)
9298 {
9299 return (vector int)__a ^ __b;
9300 }
9301
9302 static vector int __ATTRS_o_ai
vec_xor(vector int __a,vector bool int __b)9303 vec_xor(vector int __a, vector bool int __b)
9304 {
9305 return __a ^ (vector int)__b;
9306 }
9307
9308 static vector unsigned int __ATTRS_o_ai
vec_xor(vector unsigned int __a,vector unsigned int __b)9309 vec_xor(vector unsigned int __a, vector unsigned int __b)
9310 {
9311 return __a ^ __b;
9312 }
9313
9314 static vector unsigned int __ATTRS_o_ai
vec_xor(vector bool int __a,vector unsigned int __b)9315 vec_xor(vector bool int __a, vector unsigned int __b)
9316 {
9317 return (vector unsigned int)__a ^ __b;
9318 }
9319
9320 static vector unsigned int __ATTRS_o_ai
vec_xor(vector unsigned int __a,vector bool int __b)9321 vec_xor(vector unsigned int __a, vector bool int __b)
9322 {
9323 return __a ^ (vector unsigned int)__b;
9324 }
9325
9326 static vector bool int __ATTRS_o_ai
vec_xor(vector bool int __a,vector bool int __b)9327 vec_xor(vector bool int __a, vector bool int __b)
9328 {
9329 return __a ^ __b;
9330 }
9331
9332 static vector float __ATTRS_o_ai
vec_xor(vector float __a,vector float __b)9333 vec_xor(vector float __a, vector float __b)
9334 {
9335 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9336 return (vector float)__res;
9337 }
9338
9339 static vector float __ATTRS_o_ai
vec_xor(vector bool int __a,vector float __b)9340 vec_xor(vector bool int __a, vector float __b)
9341 {
9342 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9343 return (vector float)__res;
9344 }
9345
9346 static vector float __ATTRS_o_ai
vec_xor(vector float __a,vector bool int __b)9347 vec_xor(vector float __a, vector bool int __b)
9348 {
9349 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9350 return (vector float)__res;
9351 }
9352
9353 /* vec_vxor */
9354
9355 static vector signed char __ATTRS_o_ai
vec_vxor(vector signed char __a,vector signed char __b)9356 vec_vxor(vector signed char __a, vector signed char __b)
9357 {
9358 return __a ^ __b;
9359 }
9360
9361 static vector signed char __ATTRS_o_ai
vec_vxor(vector bool char __a,vector signed char __b)9362 vec_vxor(vector bool char __a, vector signed char __b)
9363 {
9364 return (vector signed char)__a ^ __b;
9365 }
9366
9367 static vector signed char __ATTRS_o_ai
vec_vxor(vector signed char __a,vector bool char __b)9368 vec_vxor(vector signed char __a, vector bool char __b)
9369 {
9370 return __a ^ (vector signed char)__b;
9371 }
9372
9373 static vector unsigned char __ATTRS_o_ai
vec_vxor(vector unsigned char __a,vector unsigned char __b)9374 vec_vxor(vector unsigned char __a, vector unsigned char __b)
9375 {
9376 return __a ^ __b;
9377 }
9378
9379 static vector unsigned char __ATTRS_o_ai
vec_vxor(vector bool char __a,vector unsigned char __b)9380 vec_vxor(vector bool char __a, vector unsigned char __b)
9381 {
9382 return (vector unsigned char)__a ^ __b;
9383 }
9384
9385 static vector unsigned char __ATTRS_o_ai
vec_vxor(vector unsigned char __a,vector bool char __b)9386 vec_vxor(vector unsigned char __a, vector bool char __b)
9387 {
9388 return __a ^ (vector unsigned char)__b;
9389 }
9390
9391 static vector bool char __ATTRS_o_ai
vec_vxor(vector bool char __a,vector bool char __b)9392 vec_vxor(vector bool char __a, vector bool char __b)
9393 {
9394 return __a ^ __b;
9395 }
9396
9397 static vector short __ATTRS_o_ai
vec_vxor(vector short __a,vector short __b)9398 vec_vxor(vector short __a, vector short __b)
9399 {
9400 return __a ^ __b;
9401 }
9402
9403 static vector short __ATTRS_o_ai
vec_vxor(vector bool short __a,vector short __b)9404 vec_vxor(vector bool short __a, vector short __b)
9405 {
9406 return (vector short)__a ^ __b;
9407 }
9408
9409 static vector short __ATTRS_o_ai
vec_vxor(vector short __a,vector bool short __b)9410 vec_vxor(vector short __a, vector bool short __b)
9411 {
9412 return __a ^ (vector short)__b;
9413 }
9414
9415 static vector unsigned short __ATTRS_o_ai
vec_vxor(vector unsigned short __a,vector unsigned short __b)9416 vec_vxor(vector unsigned short __a, vector unsigned short __b)
9417 {
9418 return __a ^ __b;
9419 }
9420
9421 static vector unsigned short __ATTRS_o_ai
vec_vxor(vector bool short __a,vector unsigned short __b)9422 vec_vxor(vector bool short __a, vector unsigned short __b)
9423 {
9424 return (vector unsigned short)__a ^ __b;
9425 }
9426
9427 static vector unsigned short __ATTRS_o_ai
vec_vxor(vector unsigned short __a,vector bool short __b)9428 vec_vxor(vector unsigned short __a, vector bool short __b)
9429 {
9430 return __a ^ (vector unsigned short)__b;
9431 }
9432
9433 static vector bool short __ATTRS_o_ai
vec_vxor(vector bool short __a,vector bool short __b)9434 vec_vxor(vector bool short __a, vector bool short __b)
9435 {
9436 return __a ^ __b;
9437 }
9438
9439 static vector int __ATTRS_o_ai
vec_vxor(vector int __a,vector int __b)9440 vec_vxor(vector int __a, vector int __b)
9441 {
9442 return __a ^ __b;
9443 }
9444
9445 static vector int __ATTRS_o_ai
vec_vxor(vector bool int __a,vector int __b)9446 vec_vxor(vector bool int __a, vector int __b)
9447 {
9448 return (vector int)__a ^ __b;
9449 }
9450
9451 static vector int __ATTRS_o_ai
vec_vxor(vector int __a,vector bool int __b)9452 vec_vxor(vector int __a, vector bool int __b)
9453 {
9454 return __a ^ (vector int)__b;
9455 }
9456
9457 static vector unsigned int __ATTRS_o_ai
vec_vxor(vector unsigned int __a,vector unsigned int __b)9458 vec_vxor(vector unsigned int __a, vector unsigned int __b)
9459 {
9460 return __a ^ __b;
9461 }
9462
9463 static vector unsigned int __ATTRS_o_ai
vec_vxor(vector bool int __a,vector unsigned int __b)9464 vec_vxor(vector bool int __a, vector unsigned int __b)
9465 {
9466 return (vector unsigned int)__a ^ __b;
9467 }
9468
9469 static vector unsigned int __ATTRS_o_ai
vec_vxor(vector unsigned int __a,vector bool int __b)9470 vec_vxor(vector unsigned int __a, vector bool int __b)
9471 {
9472 return __a ^ (vector unsigned int)__b;
9473 }
9474
9475 static vector bool int __ATTRS_o_ai
vec_vxor(vector bool int __a,vector bool int __b)9476 vec_vxor(vector bool int __a, vector bool int __b)
9477 {
9478 return __a ^ __b;
9479 }
9480
9481 static vector float __ATTRS_o_ai
vec_vxor(vector float __a,vector float __b)9482 vec_vxor(vector float __a, vector float __b)
9483 {
9484 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9485 return (vector float)__res;
9486 }
9487
9488 static vector float __ATTRS_o_ai
vec_vxor(vector bool int __a,vector float __b)9489 vec_vxor(vector bool int __a, vector float __b)
9490 {
9491 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9492 return (vector float)__res;
9493 }
9494
9495 static vector float __ATTRS_o_ai
vec_vxor(vector float __a,vector bool int __b)9496 vec_vxor(vector float __a, vector bool int __b)
9497 {
9498 vector unsigned int __res = (vector unsigned int)__a ^ (vector unsigned int)__b;
9499 return (vector float)__res;
9500 }
9501
9502 /* ------------------------ extensions for CBEA ----------------------------- */
9503
9504 /* vec_extract */
9505
9506 static signed char __ATTRS_o_ai
vec_extract(vector signed char __a,int __b)9507 vec_extract(vector signed char __a, int __b)
9508 {
9509 return __a[__b];
9510 }
9511
9512 static unsigned char __ATTRS_o_ai
vec_extract(vector unsigned char __a,int __b)9513 vec_extract(vector unsigned char __a, int __b)
9514 {
9515 return __a[__b];
9516 }
9517
9518 static short __ATTRS_o_ai
vec_extract(vector short __a,int __b)9519 vec_extract(vector short __a, int __b)
9520 {
9521 return __a[__b];
9522 }
9523
9524 static unsigned short __ATTRS_o_ai
vec_extract(vector unsigned short __a,int __b)9525 vec_extract(vector unsigned short __a, int __b)
9526 {
9527 return __a[__b];
9528 }
9529
9530 static int __ATTRS_o_ai
vec_extract(vector int __a,int __b)9531 vec_extract(vector int __a, int __b)
9532 {
9533 return __a[__b];
9534 }
9535
9536 static unsigned int __ATTRS_o_ai
vec_extract(vector unsigned int __a,int __b)9537 vec_extract(vector unsigned int __a, int __b)
9538 {
9539 return __a[__b];
9540 }
9541
9542 static float __ATTRS_o_ai
vec_extract(vector float __a,int __b)9543 vec_extract(vector float __a, int __b)
9544 {
9545 return __a[__b];
9546 }
9547
9548 /* vec_insert */
9549
9550 static vector signed char __ATTRS_o_ai
vec_insert(signed char __a,vector signed char __b,int __c)9551 vec_insert(signed char __a, vector signed char __b, int __c)
9552 {
9553 __b[__c] = __a;
9554 return __b;
9555 }
9556
9557 static vector unsigned char __ATTRS_o_ai
vec_insert(unsigned char __a,vector unsigned char __b,int __c)9558 vec_insert(unsigned char __a, vector unsigned char __b, int __c)
9559 {
9560 __b[__c] = __a;
9561 return __b;
9562 }
9563
9564 static vector short __ATTRS_o_ai
vec_insert(short __a,vector short __b,int __c)9565 vec_insert(short __a, vector short __b, int __c)
9566 {
9567 __b[__c] = __a;
9568 return __b;
9569 }
9570
9571 static vector unsigned short __ATTRS_o_ai
vec_insert(unsigned short __a,vector unsigned short __b,int __c)9572 vec_insert(unsigned short __a, vector unsigned short __b, int __c)
9573 {
9574 __b[__c] = __a;
9575 return __b;
9576 }
9577
9578 static vector int __ATTRS_o_ai
vec_insert(int __a,vector int __b,int __c)9579 vec_insert(int __a, vector int __b, int __c)
9580 {
9581 __b[__c] = __a;
9582 return __b;
9583 }
9584
9585 static vector unsigned int __ATTRS_o_ai
vec_insert(unsigned int __a,vector unsigned int __b,int __c)9586 vec_insert(unsigned int __a, vector unsigned int __b, int __c)
9587 {
9588 __b[__c] = __a;
9589 return __b;
9590 }
9591
9592 static vector float __ATTRS_o_ai
vec_insert(float __a,vector float __b,int __c)9593 vec_insert(float __a, vector float __b, int __c)
9594 {
9595 __b[__c] = __a;
9596 return __b;
9597 }
9598
9599 /* vec_lvlx */
9600
9601 static vector signed char __ATTRS_o_ai
vec_lvlx(int __a,const signed char * __b)9602 vec_lvlx(int __a, const signed char *__b)
9603 {
9604 return vec_perm(vec_ld(__a, __b),
9605 (vector signed char)(0),
9606 vec_lvsl(__a, __b));
9607 }
9608
9609 static vector signed char __ATTRS_o_ai
vec_lvlx(int __a,const vector signed char * __b)9610 vec_lvlx(int __a, const vector signed char *__b)
9611 {
9612 return vec_perm(vec_ld(__a, __b),
9613 (vector signed char)(0),
9614 vec_lvsl(__a, (unsigned char *)__b));
9615 }
9616
9617 static vector unsigned char __ATTRS_o_ai
vec_lvlx(int __a,const unsigned char * __b)9618 vec_lvlx(int __a, const unsigned char *__b)
9619 {
9620 return vec_perm(vec_ld(__a, __b),
9621 (vector unsigned char)(0),
9622 vec_lvsl(__a, __b));
9623 }
9624
9625 static vector unsigned char __ATTRS_o_ai
vec_lvlx(int __a,const vector unsigned char * __b)9626 vec_lvlx(int __a, const vector unsigned char *__b)
9627 {
9628 return vec_perm(vec_ld(__a, __b),
9629 (vector unsigned char)(0),
9630 vec_lvsl(__a, (unsigned char *)__b));
9631 }
9632
9633 static vector bool char __ATTRS_o_ai
vec_lvlx(int __a,const vector bool char * __b)9634 vec_lvlx(int __a, const vector bool char *__b)
9635 {
9636 return vec_perm(vec_ld(__a, __b),
9637 (vector bool char)(0),
9638 vec_lvsl(__a, (unsigned char *)__b));
9639 }
9640
9641 static vector short __ATTRS_o_ai
vec_lvlx(int __a,const short * __b)9642 vec_lvlx(int __a, const short *__b)
9643 {
9644 return vec_perm(vec_ld(__a, __b),
9645 (vector short)(0),
9646 vec_lvsl(__a, __b));
9647 }
9648
9649 static vector short __ATTRS_o_ai
vec_lvlx(int __a,const vector short * __b)9650 vec_lvlx(int __a, const vector short *__b)
9651 {
9652 return vec_perm(vec_ld(__a, __b),
9653 (vector short)(0),
9654 vec_lvsl(__a, (unsigned char *)__b));
9655 }
9656
9657 static vector unsigned short __ATTRS_o_ai
vec_lvlx(int __a,const unsigned short * __b)9658 vec_lvlx(int __a, const unsigned short *__b)
9659 {
9660 return vec_perm(vec_ld(__a, __b),
9661 (vector unsigned short)(0),
9662 vec_lvsl(__a, __b));
9663 }
9664
9665 static vector unsigned short __ATTRS_o_ai
vec_lvlx(int __a,const vector unsigned short * __b)9666 vec_lvlx(int __a, const vector unsigned short *__b)
9667 {
9668 return vec_perm(vec_ld(__a, __b),
9669 (vector unsigned short)(0),
9670 vec_lvsl(__a, (unsigned char *)__b));
9671 }
9672
9673 static vector bool short __ATTRS_o_ai
vec_lvlx(int __a,const vector bool short * __b)9674 vec_lvlx(int __a, const vector bool short *__b)
9675 {
9676 return vec_perm(vec_ld(__a, __b),
9677 (vector bool short)(0),
9678 vec_lvsl(__a, (unsigned char *)__b));
9679 }
9680
9681 static vector pixel __ATTRS_o_ai
vec_lvlx(int __a,const vector pixel * __b)9682 vec_lvlx(int __a, const vector pixel *__b)
9683 {
9684 return vec_perm(vec_ld(__a, __b),
9685 (vector pixel)(0),
9686 vec_lvsl(__a, (unsigned char *)__b));
9687 }
9688
9689 static vector int __ATTRS_o_ai
vec_lvlx(int __a,const int * __b)9690 vec_lvlx(int __a, const int *__b)
9691 {
9692 return vec_perm(vec_ld(__a, __b),
9693 (vector int)(0),
9694 vec_lvsl(__a, __b));
9695 }
9696
9697 static vector int __ATTRS_o_ai
vec_lvlx(int __a,const vector int * __b)9698 vec_lvlx(int __a, const vector int *__b)
9699 {
9700 return vec_perm(vec_ld(__a, __b),
9701 (vector int)(0),
9702 vec_lvsl(__a, (unsigned char *)__b));
9703 }
9704
9705 static vector unsigned int __ATTRS_o_ai
vec_lvlx(int __a,const unsigned int * __b)9706 vec_lvlx(int __a, const unsigned int *__b)
9707 {
9708 return vec_perm(vec_ld(__a, __b),
9709 (vector unsigned int)(0),
9710 vec_lvsl(__a, __b));
9711 }
9712
9713 static vector unsigned int __ATTRS_o_ai
vec_lvlx(int __a,const vector unsigned int * __b)9714 vec_lvlx(int __a, const vector unsigned int *__b)
9715 {
9716 return vec_perm(vec_ld(__a, __b),
9717 (vector unsigned int)(0),
9718 vec_lvsl(__a, (unsigned char *)__b));
9719 }
9720
9721 static vector bool int __ATTRS_o_ai
vec_lvlx(int __a,const vector bool int * __b)9722 vec_lvlx(int __a, const vector bool int *__b)
9723 {
9724 return vec_perm(vec_ld(__a, __b),
9725 (vector bool int)(0),
9726 vec_lvsl(__a, (unsigned char *)__b));
9727 }
9728
9729 static vector float __ATTRS_o_ai
vec_lvlx(int __a,const float * __b)9730 vec_lvlx(int __a, const float *__b)
9731 {
9732 return vec_perm(vec_ld(__a, __b),
9733 (vector float)(0),
9734 vec_lvsl(__a, __b));
9735 }
9736
9737 static vector float __ATTRS_o_ai
vec_lvlx(int __a,const vector float * __b)9738 vec_lvlx(int __a, const vector float *__b)
9739 {
9740 return vec_perm(vec_ld(__a, __b),
9741 (vector float)(0),
9742 vec_lvsl(__a, (unsigned char *)__b));
9743 }
9744
9745 /* vec_lvlxl */
9746
9747 static vector signed char __ATTRS_o_ai
vec_lvlxl(int __a,const signed char * __b)9748 vec_lvlxl(int __a, const signed char *__b)
9749 {
9750 return vec_perm(vec_ldl(__a, __b),
9751 (vector signed char)(0),
9752 vec_lvsl(__a, __b));
9753 }
9754
9755 static vector signed char __ATTRS_o_ai
vec_lvlxl(int __a,const vector signed char * __b)9756 vec_lvlxl(int __a, const vector signed char *__b)
9757 {
9758 return vec_perm(vec_ldl(__a, __b),
9759 (vector signed char)(0),
9760 vec_lvsl(__a, (unsigned char *)__b));
9761 }
9762
9763 static vector unsigned char __ATTRS_o_ai
vec_lvlxl(int __a,const unsigned char * __b)9764 vec_lvlxl(int __a, const unsigned char *__b)
9765 {
9766 return vec_perm(vec_ldl(__a, __b),
9767 (vector unsigned char)(0),
9768 vec_lvsl(__a, __b));
9769 }
9770
9771 static vector unsigned char __ATTRS_o_ai
vec_lvlxl(int __a,const vector unsigned char * __b)9772 vec_lvlxl(int __a, const vector unsigned char *__b)
9773 {
9774 return vec_perm(vec_ldl(__a, __b),
9775 (vector unsigned char)(0),
9776 vec_lvsl(__a, (unsigned char *)__b));
9777 }
9778
9779 static vector bool char __ATTRS_o_ai
vec_lvlxl(int __a,const vector bool char * __b)9780 vec_lvlxl(int __a, const vector bool char *__b)
9781 {
9782 return vec_perm(vec_ldl(__a, __b),
9783 (vector bool char)(0),
9784 vec_lvsl(__a, (unsigned char *)__b));
9785 }
9786
9787 static vector short __ATTRS_o_ai
vec_lvlxl(int __a,const short * __b)9788 vec_lvlxl(int __a, const short *__b)
9789 {
9790 return vec_perm(vec_ldl(__a, __b),
9791 (vector short)(0),
9792 vec_lvsl(__a, __b));
9793 }
9794
9795 static vector short __ATTRS_o_ai
vec_lvlxl(int __a,const vector short * __b)9796 vec_lvlxl(int __a, const vector short *__b)
9797 {
9798 return vec_perm(vec_ldl(__a, __b),
9799 (vector short)(0),
9800 vec_lvsl(__a, (unsigned char *)__b));
9801 }
9802
9803 static vector unsigned short __ATTRS_o_ai
vec_lvlxl(int __a,const unsigned short * __b)9804 vec_lvlxl(int __a, const unsigned short *__b)
9805 {
9806 return vec_perm(vec_ldl(__a, __b),
9807 (vector unsigned short)(0),
9808 vec_lvsl(__a, __b));
9809 }
9810
9811 static vector unsigned short __ATTRS_o_ai
vec_lvlxl(int __a,const vector unsigned short * __b)9812 vec_lvlxl(int __a, const vector unsigned short *__b)
9813 {
9814 return vec_perm(vec_ldl(__a, __b),
9815 (vector unsigned short)(0),
9816 vec_lvsl(__a, (unsigned char *)__b));
9817 }
9818
9819 static vector bool short __ATTRS_o_ai
vec_lvlxl(int __a,const vector bool short * __b)9820 vec_lvlxl(int __a, const vector bool short *__b)
9821 {
9822 return vec_perm(vec_ldl(__a, __b),
9823 (vector bool short)(0),
9824 vec_lvsl(__a, (unsigned char *)__b));
9825 }
9826
9827 static vector pixel __ATTRS_o_ai
vec_lvlxl(int __a,const vector pixel * __b)9828 vec_lvlxl(int __a, const vector pixel *__b)
9829 {
9830 return vec_perm(vec_ldl(__a, __b),
9831 (vector pixel)(0),
9832 vec_lvsl(__a, (unsigned char *)__b));
9833 }
9834
9835 static vector int __ATTRS_o_ai
vec_lvlxl(int __a,const int * __b)9836 vec_lvlxl(int __a, const int *__b)
9837 {
9838 return vec_perm(vec_ldl(__a, __b),
9839 (vector int)(0),
9840 vec_lvsl(__a, __b));
9841 }
9842
9843 static vector int __ATTRS_o_ai
vec_lvlxl(int __a,const vector int * __b)9844 vec_lvlxl(int __a, const vector int *__b)
9845 {
9846 return vec_perm(vec_ldl(__a, __b),
9847 (vector int)(0),
9848 vec_lvsl(__a, (unsigned char *)__b));
9849 }
9850
9851 static vector unsigned int __ATTRS_o_ai
vec_lvlxl(int __a,const unsigned int * __b)9852 vec_lvlxl(int __a, const unsigned int *__b)
9853 {
9854 return vec_perm(vec_ldl(__a, __b),
9855 (vector unsigned int)(0),
9856 vec_lvsl(__a, __b));
9857 }
9858
9859 static vector unsigned int __ATTRS_o_ai
vec_lvlxl(int __a,const vector unsigned int * __b)9860 vec_lvlxl(int __a, const vector unsigned int *__b)
9861 {
9862 return vec_perm(vec_ldl(__a, __b),
9863 (vector unsigned int)(0),
9864 vec_lvsl(__a, (unsigned char *)__b));
9865 }
9866
9867 static vector bool int __ATTRS_o_ai
vec_lvlxl(int __a,const vector bool int * __b)9868 vec_lvlxl(int __a, const vector bool int *__b)
9869 {
9870 return vec_perm(vec_ldl(__a, __b),
9871 (vector bool int)(0),
9872 vec_lvsl(__a, (unsigned char *)__b));
9873 }
9874
9875 static vector float __ATTRS_o_ai
vec_lvlxl(int __a,const float * __b)9876 vec_lvlxl(int __a, const float *__b)
9877 {
9878 return vec_perm(vec_ldl(__a, __b),
9879 (vector float)(0),
9880 vec_lvsl(__a, __b));
9881 }
9882
9883 static vector float __ATTRS_o_ai
vec_lvlxl(int __a,vector float * __b)9884 vec_lvlxl(int __a, vector float *__b)
9885 {
9886 return vec_perm(vec_ldl(__a, __b),
9887 (vector float)(0),
9888 vec_lvsl(__a, (unsigned char *)__b));
9889 }
9890
9891 /* vec_lvrx */
9892
9893 static vector signed char __ATTRS_o_ai
vec_lvrx(int __a,const signed char * __b)9894 vec_lvrx(int __a, const signed char *__b)
9895 {
9896 return vec_perm((vector signed char)(0),
9897 vec_ld(__a, __b),
9898 vec_lvsl(__a, __b));
9899 }
9900
9901 static vector signed char __ATTRS_o_ai
vec_lvrx(int __a,const vector signed char * __b)9902 vec_lvrx(int __a, const vector signed char *__b)
9903 {
9904 return vec_perm((vector signed char)(0),
9905 vec_ld(__a, __b),
9906 vec_lvsl(__a, (unsigned char *)__b));
9907 }
9908
9909 static vector unsigned char __ATTRS_o_ai
vec_lvrx(int __a,const unsigned char * __b)9910 vec_lvrx(int __a, const unsigned char *__b)
9911 {
9912 return vec_perm((vector unsigned char)(0),
9913 vec_ld(__a, __b),
9914 vec_lvsl(__a, __b));
9915 }
9916
9917 static vector unsigned char __ATTRS_o_ai
vec_lvrx(int __a,const vector unsigned char * __b)9918 vec_lvrx(int __a, const vector unsigned char *__b)
9919 {
9920 return vec_perm((vector unsigned char)(0),
9921 vec_ld(__a, __b),
9922 vec_lvsl(__a, (unsigned char *)__b));
9923 }
9924
9925 static vector bool char __ATTRS_o_ai
vec_lvrx(int __a,const vector bool char * __b)9926 vec_lvrx(int __a, const vector bool char *__b)
9927 {
9928 return vec_perm((vector bool char)(0),
9929 vec_ld(__a, __b),
9930 vec_lvsl(__a, (unsigned char *)__b));
9931 }
9932
9933 static vector short __ATTRS_o_ai
vec_lvrx(int __a,const short * __b)9934 vec_lvrx(int __a, const short *__b)
9935 {
9936 return vec_perm((vector short)(0),
9937 vec_ld(__a, __b),
9938 vec_lvsl(__a, __b));
9939 }
9940
9941 static vector short __ATTRS_o_ai
vec_lvrx(int __a,const vector short * __b)9942 vec_lvrx(int __a, const vector short *__b)
9943 {
9944 return vec_perm((vector short)(0),
9945 vec_ld(__a, __b),
9946 vec_lvsl(__a, (unsigned char *)__b));
9947 }
9948
9949 static vector unsigned short __ATTRS_o_ai
vec_lvrx(int __a,const unsigned short * __b)9950 vec_lvrx(int __a, const unsigned short *__b)
9951 {
9952 return vec_perm((vector unsigned short)(0),
9953 vec_ld(__a, __b),
9954 vec_lvsl(__a, __b));
9955 }
9956
9957 static vector unsigned short __ATTRS_o_ai
vec_lvrx(int __a,const vector unsigned short * __b)9958 vec_lvrx(int __a, const vector unsigned short *__b)
9959 {
9960 return vec_perm((vector unsigned short)(0),
9961 vec_ld(__a, __b),
9962 vec_lvsl(__a, (unsigned char *)__b));
9963 }
9964
9965 static vector bool short __ATTRS_o_ai
vec_lvrx(int __a,const vector bool short * __b)9966 vec_lvrx(int __a, const vector bool short *__b)
9967 {
9968 return vec_perm((vector bool short)(0),
9969 vec_ld(__a, __b),
9970 vec_lvsl(__a, (unsigned char *)__b));
9971 }
9972
9973 static vector pixel __ATTRS_o_ai
vec_lvrx(int __a,const vector pixel * __b)9974 vec_lvrx(int __a, const vector pixel *__b)
9975 {
9976 return vec_perm((vector pixel)(0),
9977 vec_ld(__a, __b),
9978 vec_lvsl(__a, (unsigned char *)__b));
9979 }
9980
9981 static vector int __ATTRS_o_ai
vec_lvrx(int __a,const int * __b)9982 vec_lvrx(int __a, const int *__b)
9983 {
9984 return vec_perm((vector int)(0),
9985 vec_ld(__a, __b),
9986 vec_lvsl(__a, __b));
9987 }
9988
9989 static vector int __ATTRS_o_ai
vec_lvrx(int __a,const vector int * __b)9990 vec_lvrx(int __a, const vector int *__b)
9991 {
9992 return vec_perm((vector int)(0),
9993 vec_ld(__a, __b),
9994 vec_lvsl(__a, (unsigned char *)__b));
9995 }
9996
9997 static vector unsigned int __ATTRS_o_ai
vec_lvrx(int __a,const unsigned int * __b)9998 vec_lvrx(int __a, const unsigned int *__b)
9999 {
10000 return vec_perm((vector unsigned int)(0),
10001 vec_ld(__a, __b),
10002 vec_lvsl(__a, __b));
10003 }
10004
10005 static vector unsigned int __ATTRS_o_ai
vec_lvrx(int __a,const vector unsigned int * __b)10006 vec_lvrx(int __a, const vector unsigned int *__b)
10007 {
10008 return vec_perm((vector unsigned int)(0),
10009 vec_ld(__a, __b),
10010 vec_lvsl(__a, (unsigned char *)__b));
10011 }
10012
10013 static vector bool int __ATTRS_o_ai
vec_lvrx(int __a,const vector bool int * __b)10014 vec_lvrx(int __a, const vector bool int *__b)
10015 {
10016 return vec_perm((vector bool int)(0),
10017 vec_ld(__a, __b),
10018 vec_lvsl(__a, (unsigned char *)__b));
10019 }
10020
10021 static vector float __ATTRS_o_ai
vec_lvrx(int __a,const float * __b)10022 vec_lvrx(int __a, const float *__b)
10023 {
10024 return vec_perm((vector float)(0),
10025 vec_ld(__a, __b),
10026 vec_lvsl(__a, __b));
10027 }
10028
10029 static vector float __ATTRS_o_ai
vec_lvrx(int __a,const vector float * __b)10030 vec_lvrx(int __a, const vector float *__b)
10031 {
10032 return vec_perm((vector float)(0),
10033 vec_ld(__a, __b),
10034 vec_lvsl(__a, (unsigned char *)__b));
10035 }
10036
10037 /* vec_lvrxl */
10038
10039 static vector signed char __ATTRS_o_ai
vec_lvrxl(int __a,const signed char * __b)10040 vec_lvrxl(int __a, const signed char *__b)
10041 {
10042 return vec_perm((vector signed char)(0),
10043 vec_ldl(__a, __b),
10044 vec_lvsl(__a, __b));
10045 }
10046
10047 static vector signed char __ATTRS_o_ai
vec_lvrxl(int __a,const vector signed char * __b)10048 vec_lvrxl(int __a, const vector signed char *__b)
10049 {
10050 return vec_perm((vector signed char)(0),
10051 vec_ldl(__a, __b),
10052 vec_lvsl(__a, (unsigned char *)__b));
10053 }
10054
10055 static vector unsigned char __ATTRS_o_ai
vec_lvrxl(int __a,const unsigned char * __b)10056 vec_lvrxl(int __a, const unsigned char *__b)
10057 {
10058 return vec_perm((vector unsigned char)(0),
10059 vec_ldl(__a, __b),
10060 vec_lvsl(__a, __b));
10061 }
10062
10063 static vector unsigned char __ATTRS_o_ai
vec_lvrxl(int __a,const vector unsigned char * __b)10064 vec_lvrxl(int __a, const vector unsigned char *__b)
10065 {
10066 return vec_perm((vector unsigned char)(0),
10067 vec_ldl(__a, __b),
10068 vec_lvsl(__a, (unsigned char *)__b));
10069 }
10070
10071 static vector bool char __ATTRS_o_ai
vec_lvrxl(int __a,const vector bool char * __b)10072 vec_lvrxl(int __a, const vector bool char *__b)
10073 {
10074 return vec_perm((vector bool char)(0),
10075 vec_ldl(__a, __b),
10076 vec_lvsl(__a, (unsigned char *)__b));
10077 }
10078
10079 static vector short __ATTRS_o_ai
vec_lvrxl(int __a,const short * __b)10080 vec_lvrxl(int __a, const short *__b)
10081 {
10082 return vec_perm((vector short)(0),
10083 vec_ldl(__a, __b),
10084 vec_lvsl(__a, __b));
10085 }
10086
10087 static vector short __ATTRS_o_ai
vec_lvrxl(int __a,const vector short * __b)10088 vec_lvrxl(int __a, const vector short *__b)
10089 {
10090 return vec_perm((vector short)(0),
10091 vec_ldl(__a, __b),
10092 vec_lvsl(__a, (unsigned char *)__b));
10093 }
10094
10095 static vector unsigned short __ATTRS_o_ai
vec_lvrxl(int __a,const unsigned short * __b)10096 vec_lvrxl(int __a, const unsigned short *__b)
10097 {
10098 return vec_perm((vector unsigned short)(0),
10099 vec_ldl(__a, __b),
10100 vec_lvsl(__a, __b));
10101 }
10102
10103 static vector unsigned short __ATTRS_o_ai
vec_lvrxl(int __a,const vector unsigned short * __b)10104 vec_lvrxl(int __a, const vector unsigned short *__b)
10105 {
10106 return vec_perm((vector unsigned short)(0),
10107 vec_ldl(__a, __b),
10108 vec_lvsl(__a, (unsigned char *)__b));
10109 }
10110
10111 static vector bool short __ATTRS_o_ai
vec_lvrxl(int __a,const vector bool short * __b)10112 vec_lvrxl(int __a, const vector bool short *__b)
10113 {
10114 return vec_perm((vector bool short)(0),
10115 vec_ldl(__a, __b),
10116 vec_lvsl(__a, (unsigned char *)__b));
10117 }
10118
10119 static vector pixel __ATTRS_o_ai
vec_lvrxl(int __a,const vector pixel * __b)10120 vec_lvrxl(int __a, const vector pixel *__b)
10121 {
10122 return vec_perm((vector pixel)(0),
10123 vec_ldl(__a, __b),
10124 vec_lvsl(__a, (unsigned char *)__b));
10125 }
10126
10127 static vector int __ATTRS_o_ai
vec_lvrxl(int __a,const int * __b)10128 vec_lvrxl(int __a, const int *__b)
10129 {
10130 return vec_perm((vector int)(0),
10131 vec_ldl(__a, __b),
10132 vec_lvsl(__a, __b));
10133 }
10134
10135 static vector int __ATTRS_o_ai
vec_lvrxl(int __a,const vector int * __b)10136 vec_lvrxl(int __a, const vector int *__b)
10137 {
10138 return vec_perm((vector int)(0),
10139 vec_ldl(__a, __b),
10140 vec_lvsl(__a, (unsigned char *)__b));
10141 }
10142
10143 static vector unsigned int __ATTRS_o_ai
vec_lvrxl(int __a,const unsigned int * __b)10144 vec_lvrxl(int __a, const unsigned int *__b)
10145 {
10146 return vec_perm((vector unsigned int)(0),
10147 vec_ldl(__a, __b),
10148 vec_lvsl(__a, __b));
10149 }
10150
10151 static vector unsigned int __ATTRS_o_ai
vec_lvrxl(int __a,const vector unsigned int * __b)10152 vec_lvrxl(int __a, const vector unsigned int *__b)
10153 {
10154 return vec_perm((vector unsigned int)(0),
10155 vec_ldl(__a, __b),
10156 vec_lvsl(__a, (unsigned char *)__b));
10157 }
10158
10159 static vector bool int __ATTRS_o_ai
vec_lvrxl(int __a,const vector bool int * __b)10160 vec_lvrxl(int __a, const vector bool int *__b)
10161 {
10162 return vec_perm((vector bool int)(0),
10163 vec_ldl(__a, __b),
10164 vec_lvsl(__a, (unsigned char *)__b));
10165 }
10166
10167 static vector float __ATTRS_o_ai
vec_lvrxl(int __a,const float * __b)10168 vec_lvrxl(int __a, const float *__b)
10169 {
10170 return vec_perm((vector float)(0),
10171 vec_ldl(__a, __b),
10172 vec_lvsl(__a, __b));
10173 }
10174
10175 static vector float __ATTRS_o_ai
vec_lvrxl(int __a,const vector float * __b)10176 vec_lvrxl(int __a, const vector float *__b)
10177 {
10178 return vec_perm((vector float)(0),
10179 vec_ldl(__a, __b),
10180 vec_lvsl(__a, (unsigned char *)__b));
10181 }
10182
10183 /* vec_stvlx */
10184
10185 static void __ATTRS_o_ai
vec_stvlx(vector signed char __a,int __b,signed char * __c)10186 vec_stvlx(vector signed char __a, int __b, signed char *__c)
10187 {
10188 return vec_st(vec_perm(vec_lvrx(__b, __c),
10189 __a,
10190 vec_lvsr(__b, __c)),
10191 __b, __c);
10192 }
10193
10194 static void __ATTRS_o_ai
vec_stvlx(vector signed char __a,int __b,vector signed char * __c)10195 vec_stvlx(vector signed char __a, int __b, vector signed char *__c)
10196 {
10197 return vec_st(vec_perm(vec_lvrx(__b, __c),
10198 __a,
10199 vec_lvsr(__b, (unsigned char *)__c)),
10200 __b, __c);
10201 }
10202
10203 static void __ATTRS_o_ai
vec_stvlx(vector unsigned char __a,int __b,unsigned char * __c)10204 vec_stvlx(vector unsigned char __a, int __b, unsigned char *__c)
10205 {
10206 return vec_st(vec_perm(vec_lvrx(__b, __c),
10207 __a,
10208 vec_lvsr(__b, __c)),
10209 __b, __c);
10210 }
10211
10212 static void __ATTRS_o_ai
vec_stvlx(vector unsigned char __a,int __b,vector unsigned char * __c)10213 vec_stvlx(vector unsigned char __a, int __b, vector unsigned char *__c)
10214 {
10215 return vec_st(vec_perm(vec_lvrx(__b, __c),
10216 __a,
10217 vec_lvsr(__b, (unsigned char *)__c)),
10218 __b, __c);
10219 }
10220
10221 static void __ATTRS_o_ai
vec_stvlx(vector bool char __a,int __b,vector bool char * __c)10222 vec_stvlx(vector bool char __a, int __b, vector bool char *__c)
10223 {
10224 return vec_st(vec_perm(vec_lvrx(__b, __c),
10225 __a,
10226 vec_lvsr(__b, (unsigned char *)__c)),
10227 __b, __c);
10228 }
10229
10230 static void __ATTRS_o_ai
vec_stvlx(vector short __a,int __b,short * __c)10231 vec_stvlx(vector short __a, int __b, short *__c)
10232 {
10233 return vec_st(vec_perm(vec_lvrx(__b, __c),
10234 __a,
10235 vec_lvsr(__b, __c)),
10236 __b, __c);
10237 }
10238
10239 static void __ATTRS_o_ai
vec_stvlx(vector short __a,int __b,vector short * __c)10240 vec_stvlx(vector short __a, int __b, vector short *__c)
10241 {
10242 return vec_st(vec_perm(vec_lvrx(__b, __c),
10243 __a,
10244 vec_lvsr(__b, (unsigned char *)__c)),
10245 __b, __c);
10246 }
10247
10248 static void __ATTRS_o_ai
vec_stvlx(vector unsigned short __a,int __b,unsigned short * __c)10249 vec_stvlx(vector unsigned short __a, int __b, unsigned short *__c)
10250 {
10251 return vec_st(vec_perm(vec_lvrx(__b, __c),
10252 __a,
10253 vec_lvsr(__b, __c)),
10254 __b, __c);
10255 }
10256
10257 static void __ATTRS_o_ai
vec_stvlx(vector unsigned short __a,int __b,vector unsigned short * __c)10258 vec_stvlx(vector unsigned short __a, int __b, vector unsigned short *__c)
10259 {
10260 return vec_st(vec_perm(vec_lvrx(__b, __c),
10261 __a,
10262 vec_lvsr(__b, (unsigned char *)__c)),
10263 __b, __c);
10264 }
10265
10266 static void __ATTRS_o_ai
vec_stvlx(vector bool short __a,int __b,vector bool short * __c)10267 vec_stvlx(vector bool short __a, int __b, vector bool short *__c)
10268 {
10269 return vec_st(vec_perm(vec_lvrx(__b, __c),
10270 __a,
10271 vec_lvsr(__b, (unsigned char *)__c)),
10272 __b, __c);
10273 }
10274
10275 static void __ATTRS_o_ai
vec_stvlx(vector pixel __a,int __b,vector pixel * __c)10276 vec_stvlx(vector pixel __a, int __b, vector pixel *__c)
10277 {
10278 return vec_st(vec_perm(vec_lvrx(__b, __c),
10279 __a,
10280 vec_lvsr(__b, (unsigned char *)__c)),
10281 __b, __c);
10282 }
10283
10284 static void __ATTRS_o_ai
vec_stvlx(vector int __a,int __b,int * __c)10285 vec_stvlx(vector int __a, int __b, int *__c)
10286 {
10287 return vec_st(vec_perm(vec_lvrx(__b, __c),
10288 __a,
10289 vec_lvsr(__b, __c)),
10290 __b, __c);
10291 }
10292
10293 static void __ATTRS_o_ai
vec_stvlx(vector int __a,int __b,vector int * __c)10294 vec_stvlx(vector int __a, int __b, vector int *__c)
10295 {
10296 return vec_st(vec_perm(vec_lvrx(__b, __c),
10297 __a,
10298 vec_lvsr(__b, (unsigned char *)__c)),
10299 __b, __c);
10300 }
10301
10302 static void __ATTRS_o_ai
vec_stvlx(vector unsigned int __a,int __b,unsigned int * __c)10303 vec_stvlx(vector unsigned int __a, int __b, unsigned int *__c)
10304 {
10305 return vec_st(vec_perm(vec_lvrx(__b, __c),
10306 __a,
10307 vec_lvsr(__b, __c)),
10308 __b, __c);
10309 }
10310
10311 static void __ATTRS_o_ai
vec_stvlx(vector unsigned int __a,int __b,vector unsigned int * __c)10312 vec_stvlx(vector unsigned int __a, int __b, vector unsigned int *__c)
10313 {
10314 return vec_st(vec_perm(vec_lvrx(__b, __c),
10315 __a,
10316 vec_lvsr(__b, (unsigned char *)__c)),
10317 __b, __c);
10318 }
10319
10320 static void __ATTRS_o_ai
vec_stvlx(vector bool int __a,int __b,vector bool int * __c)10321 vec_stvlx(vector bool int __a, int __b, vector bool int *__c)
10322 {
10323 return vec_st(vec_perm(vec_lvrx(__b, __c),
10324 __a,
10325 vec_lvsr(__b, (unsigned char *)__c)),
10326 __b, __c);
10327 }
10328
10329 static void __ATTRS_o_ai
vec_stvlx(vector float __a,int __b,vector float * __c)10330 vec_stvlx(vector float __a, int __b, vector float *__c)
10331 {
10332 return vec_st(vec_perm(vec_lvrx(__b, __c),
10333 __a,
10334 vec_lvsr(__b, (unsigned char *)__c)),
10335 __b, __c);
10336 }
10337
10338 /* vec_stvlxl */
10339
10340 static void __ATTRS_o_ai
vec_stvlxl(vector signed char __a,int __b,signed char * __c)10341 vec_stvlxl(vector signed char __a, int __b, signed char *__c)
10342 {
10343 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10344 __a,
10345 vec_lvsr(__b, __c)),
10346 __b, __c);
10347 }
10348
10349 static void __ATTRS_o_ai
vec_stvlxl(vector signed char __a,int __b,vector signed char * __c)10350 vec_stvlxl(vector signed char __a, int __b, vector signed char *__c)
10351 {
10352 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10353 __a,
10354 vec_lvsr(__b, (unsigned char *)__c)),
10355 __b, __c);
10356 }
10357
10358 static void __ATTRS_o_ai
vec_stvlxl(vector unsigned char __a,int __b,unsigned char * __c)10359 vec_stvlxl(vector unsigned char __a, int __b, unsigned char *__c)
10360 {
10361 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10362 __a,
10363 vec_lvsr(__b, __c)),
10364 __b, __c);
10365 }
10366
10367 static void __ATTRS_o_ai
vec_stvlxl(vector unsigned char __a,int __b,vector unsigned char * __c)10368 vec_stvlxl(vector unsigned char __a, int __b, vector unsigned char *__c)
10369 {
10370 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10371 __a,
10372 vec_lvsr(__b, (unsigned char *)__c)),
10373 __b, __c);
10374 }
10375
10376 static void __ATTRS_o_ai
vec_stvlxl(vector bool char __a,int __b,vector bool char * __c)10377 vec_stvlxl(vector bool char __a, int __b, vector bool char *__c)
10378 {
10379 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10380 __a,
10381 vec_lvsr(__b, (unsigned char *)__c)),
10382 __b, __c);
10383 }
10384
10385 static void __ATTRS_o_ai
vec_stvlxl(vector short __a,int __b,short * __c)10386 vec_stvlxl(vector short __a, int __b, short *__c)
10387 {
10388 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10389 __a,
10390 vec_lvsr(__b, __c)),
10391 __b, __c);
10392 }
10393
10394 static void __ATTRS_o_ai
vec_stvlxl(vector short __a,int __b,vector short * __c)10395 vec_stvlxl(vector short __a, int __b, vector short *__c)
10396 {
10397 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10398 __a,
10399 vec_lvsr(__b, (unsigned char *)__c)),
10400 __b, __c);
10401 }
10402
10403 static void __ATTRS_o_ai
vec_stvlxl(vector unsigned short __a,int __b,unsigned short * __c)10404 vec_stvlxl(vector unsigned short __a, int __b, unsigned short *__c)
10405 {
10406 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10407 __a,
10408 vec_lvsr(__b, __c)),
10409 __b, __c);
10410 }
10411
10412 static void __ATTRS_o_ai
vec_stvlxl(vector unsigned short __a,int __b,vector unsigned short * __c)10413 vec_stvlxl(vector unsigned short __a, int __b, vector unsigned short *__c)
10414 {
10415 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10416 __a,
10417 vec_lvsr(__b, (unsigned char *)__c)),
10418 __b, __c);
10419 }
10420
10421 static void __ATTRS_o_ai
vec_stvlxl(vector bool short __a,int __b,vector bool short * __c)10422 vec_stvlxl(vector bool short __a, int __b, vector bool short *__c)
10423 {
10424 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10425 __a,
10426 vec_lvsr(__b, (unsigned char *)__c)),
10427 __b, __c);
10428 }
10429
10430 static void __ATTRS_o_ai
vec_stvlxl(vector pixel __a,int __b,vector pixel * __c)10431 vec_stvlxl(vector pixel __a, int __b, vector pixel *__c)
10432 {
10433 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10434 __a,
10435 vec_lvsr(__b, (unsigned char *)__c)),
10436 __b, __c);
10437 }
10438
10439 static void __ATTRS_o_ai
vec_stvlxl(vector int __a,int __b,int * __c)10440 vec_stvlxl(vector int __a, int __b, int *__c)
10441 {
10442 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10443 __a,
10444 vec_lvsr(__b, __c)),
10445 __b, __c);
10446 }
10447
10448 static void __ATTRS_o_ai
vec_stvlxl(vector int __a,int __b,vector int * __c)10449 vec_stvlxl(vector int __a, int __b, vector int *__c)
10450 {
10451 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10452 __a,
10453 vec_lvsr(__b, (unsigned char *)__c)),
10454 __b, __c);
10455 }
10456
10457 static void __ATTRS_o_ai
vec_stvlxl(vector unsigned int __a,int __b,unsigned int * __c)10458 vec_stvlxl(vector unsigned int __a, int __b, unsigned int *__c)
10459 {
10460 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10461 __a,
10462 vec_lvsr(__b, __c)),
10463 __b, __c);
10464 }
10465
10466 static void __ATTRS_o_ai
vec_stvlxl(vector unsigned int __a,int __b,vector unsigned int * __c)10467 vec_stvlxl(vector unsigned int __a, int __b, vector unsigned int *__c)
10468 {
10469 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10470 __a,
10471 vec_lvsr(__b, (unsigned char *)__c)),
10472 __b, __c);
10473 }
10474
10475 static void __ATTRS_o_ai
vec_stvlxl(vector bool int __a,int __b,vector bool int * __c)10476 vec_stvlxl(vector bool int __a, int __b, vector bool int *__c)
10477 {
10478 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10479 __a,
10480 vec_lvsr(__b, (unsigned char *)__c)),
10481 __b, __c);
10482 }
10483
10484 static void __ATTRS_o_ai
vec_stvlxl(vector float __a,int __b,vector float * __c)10485 vec_stvlxl(vector float __a, int __b, vector float *__c)
10486 {
10487 return vec_stl(vec_perm(vec_lvrx(__b, __c),
10488 __a,
10489 vec_lvsr(__b, (unsigned char *)__c)),
10490 __b, __c);
10491 }
10492
10493 /* vec_stvrx */
10494
10495 static void __ATTRS_o_ai
vec_stvrx(vector signed char __a,int __b,signed char * __c)10496 vec_stvrx(vector signed char __a, int __b, signed char *__c)
10497 {
10498 return vec_st(vec_perm(__a,
10499 vec_lvlx(__b, __c),
10500 vec_lvsr(__b, __c)),
10501 __b, __c);
10502 }
10503
10504 static void __ATTRS_o_ai
vec_stvrx(vector signed char __a,int __b,vector signed char * __c)10505 vec_stvrx(vector signed char __a, int __b, vector signed char *__c)
10506 {
10507 return vec_st(vec_perm(__a,
10508 vec_lvlx(__b, __c),
10509 vec_lvsr(__b, (unsigned char *)__c)),
10510 __b, __c);
10511 }
10512
10513 static void __ATTRS_o_ai
vec_stvrx(vector unsigned char __a,int __b,unsigned char * __c)10514 vec_stvrx(vector unsigned char __a, int __b, unsigned char *__c)
10515 {
10516 return vec_st(vec_perm(__a,
10517 vec_lvlx(__b, __c),
10518 vec_lvsr(__b, __c)),
10519 __b, __c);
10520 }
10521
10522 static void __ATTRS_o_ai
vec_stvrx(vector unsigned char __a,int __b,vector unsigned char * __c)10523 vec_stvrx(vector unsigned char __a, int __b, vector unsigned char *__c)
10524 {
10525 return vec_st(vec_perm(__a,
10526 vec_lvlx(__b, __c),
10527 vec_lvsr(__b, (unsigned char *)__c)),
10528 __b, __c);
10529 }
10530
10531 static void __ATTRS_o_ai
vec_stvrx(vector bool char __a,int __b,vector bool char * __c)10532 vec_stvrx(vector bool char __a, int __b, vector bool char *__c)
10533 {
10534 return vec_st(vec_perm(__a,
10535 vec_lvlx(__b, __c),
10536 vec_lvsr(__b, (unsigned char *)__c)),
10537 __b, __c);
10538 }
10539
10540 static void __ATTRS_o_ai
vec_stvrx(vector short __a,int __b,short * __c)10541 vec_stvrx(vector short __a, int __b, short *__c)
10542 {
10543 return vec_st(vec_perm(__a,
10544 vec_lvlx(__b, __c),
10545 vec_lvsr(__b, __c)),
10546 __b, __c);
10547 }
10548
10549 static void __ATTRS_o_ai
vec_stvrx(vector short __a,int __b,vector short * __c)10550 vec_stvrx(vector short __a, int __b, vector short *__c)
10551 {
10552 return vec_st(vec_perm(__a,
10553 vec_lvlx(__b, __c),
10554 vec_lvsr(__b, (unsigned char *)__c)),
10555 __b, __c);
10556 }
10557
10558 static void __ATTRS_o_ai
vec_stvrx(vector unsigned short __a,int __b,unsigned short * __c)10559 vec_stvrx(vector unsigned short __a, int __b, unsigned short *__c)
10560 {
10561 return vec_st(vec_perm(__a,
10562 vec_lvlx(__b, __c),
10563 vec_lvsr(__b, __c)),
10564 __b, __c);
10565 }
10566
10567 static void __ATTRS_o_ai
vec_stvrx(vector unsigned short __a,int __b,vector unsigned short * __c)10568 vec_stvrx(vector unsigned short __a, int __b, vector unsigned short *__c)
10569 {
10570 return vec_st(vec_perm(__a,
10571 vec_lvlx(__b, __c),
10572 vec_lvsr(__b, (unsigned char *)__c)),
10573 __b, __c);
10574 }
10575
10576 static void __ATTRS_o_ai
vec_stvrx(vector bool short __a,int __b,vector bool short * __c)10577 vec_stvrx(vector bool short __a, int __b, vector bool short *__c)
10578 {
10579 return vec_st(vec_perm(__a,
10580 vec_lvlx(__b, __c),
10581 vec_lvsr(__b, (unsigned char *)__c)),
10582 __b, __c);
10583 }
10584
10585 static void __ATTRS_o_ai
vec_stvrx(vector pixel __a,int __b,vector pixel * __c)10586 vec_stvrx(vector pixel __a, int __b, vector pixel *__c)
10587 {
10588 return vec_st(vec_perm(__a,
10589 vec_lvlx(__b, __c),
10590 vec_lvsr(__b, (unsigned char *)__c)),
10591 __b, __c);
10592 }
10593
10594 static void __ATTRS_o_ai
vec_stvrx(vector int __a,int __b,int * __c)10595 vec_stvrx(vector int __a, int __b, int *__c)
10596 {
10597 return vec_st(vec_perm(__a,
10598 vec_lvlx(__b, __c),
10599 vec_lvsr(__b, __c)),
10600 __b, __c);
10601 }
10602
10603 static void __ATTRS_o_ai
vec_stvrx(vector int __a,int __b,vector int * __c)10604 vec_stvrx(vector int __a, int __b, vector int *__c)
10605 {
10606 return vec_st(vec_perm(__a,
10607 vec_lvlx(__b, __c),
10608 vec_lvsr(__b, (unsigned char *)__c)),
10609 __b, __c);
10610 }
10611
10612 static void __ATTRS_o_ai
vec_stvrx(vector unsigned int __a,int __b,unsigned int * __c)10613 vec_stvrx(vector unsigned int __a, int __b, unsigned int *__c)
10614 {
10615 return vec_st(vec_perm(__a,
10616 vec_lvlx(__b, __c),
10617 vec_lvsr(__b, __c)),
10618 __b, __c);
10619 }
10620
10621 static void __ATTRS_o_ai
vec_stvrx(vector unsigned int __a,int __b,vector unsigned int * __c)10622 vec_stvrx(vector unsigned int __a, int __b, vector unsigned int *__c)
10623 {
10624 return vec_st(vec_perm(__a,
10625 vec_lvlx(__b, __c),
10626 vec_lvsr(__b, (unsigned char *)__c)),
10627 __b, __c);
10628 }
10629
10630 static void __ATTRS_o_ai
vec_stvrx(vector bool int __a,int __b,vector bool int * __c)10631 vec_stvrx(vector bool int __a, int __b, vector bool int *__c)
10632 {
10633 return vec_st(vec_perm(__a,
10634 vec_lvlx(__b, __c),
10635 vec_lvsr(__b, (unsigned char *)__c)),
10636 __b, __c);
10637 }
10638
10639 static void __ATTRS_o_ai
vec_stvrx(vector float __a,int __b,vector float * __c)10640 vec_stvrx(vector float __a, int __b, vector float *__c)
10641 {
10642 return vec_st(vec_perm(__a,
10643 vec_lvlx(__b, __c),
10644 vec_lvsr(__b, (unsigned char *)__c)),
10645 __b, __c);
10646 }
10647
10648 /* vec_stvrxl */
10649
10650 static void __ATTRS_o_ai
vec_stvrxl(vector signed char __a,int __b,signed char * __c)10651 vec_stvrxl(vector signed char __a, int __b, signed char *__c)
10652 {
10653 return vec_stl(vec_perm(__a,
10654 vec_lvlx(__b, __c),
10655 vec_lvsr(__b, __c)),
10656 __b, __c);
10657 }
10658
10659 static void __ATTRS_o_ai
vec_stvrxl(vector signed char __a,int __b,vector signed char * __c)10660 vec_stvrxl(vector signed char __a, int __b, vector signed char *__c)
10661 {
10662 return vec_stl(vec_perm(__a,
10663 vec_lvlx(__b, __c),
10664 vec_lvsr(__b, (unsigned char *)__c)),
10665 __b, __c);
10666 }
10667
10668 static void __ATTRS_o_ai
vec_stvrxl(vector unsigned char __a,int __b,unsigned char * __c)10669 vec_stvrxl(vector unsigned char __a, int __b, unsigned char *__c)
10670 {
10671 return vec_stl(vec_perm(__a,
10672 vec_lvlx(__b, __c),
10673 vec_lvsr(__b, __c)),
10674 __b, __c);
10675 }
10676
10677 static void __ATTRS_o_ai
vec_stvrxl(vector unsigned char __a,int __b,vector unsigned char * __c)10678 vec_stvrxl(vector unsigned char __a, int __b, vector unsigned char *__c)
10679 {
10680 return vec_stl(vec_perm(__a,
10681 vec_lvlx(__b, __c),
10682 vec_lvsr(__b, (unsigned char *)__c)),
10683 __b, __c);
10684 }
10685
10686 static void __ATTRS_o_ai
vec_stvrxl(vector bool char __a,int __b,vector bool char * __c)10687 vec_stvrxl(vector bool char __a, int __b, vector bool char *__c)
10688 {
10689 return vec_stl(vec_perm(__a,
10690 vec_lvlx(__b, __c),
10691 vec_lvsr(__b, (unsigned char *)__c)),
10692 __b, __c);
10693 }
10694
10695 static void __ATTRS_o_ai
vec_stvrxl(vector short __a,int __b,short * __c)10696 vec_stvrxl(vector short __a, int __b, short *__c)
10697 {
10698 return vec_stl(vec_perm(__a,
10699 vec_lvlx(__b, __c),
10700 vec_lvsr(__b, __c)),
10701 __b, __c);
10702 }
10703
10704 static void __ATTRS_o_ai
vec_stvrxl(vector short __a,int __b,vector short * __c)10705 vec_stvrxl(vector short __a, int __b, vector short *__c)
10706 {
10707 return vec_stl(vec_perm(__a,
10708 vec_lvlx(__b, __c),
10709 vec_lvsr(__b, (unsigned char *)__c)),
10710 __b, __c);
10711 }
10712
10713 static void __ATTRS_o_ai
vec_stvrxl(vector unsigned short __a,int __b,unsigned short * __c)10714 vec_stvrxl(vector unsigned short __a, int __b, unsigned short *__c)
10715 {
10716 return vec_stl(vec_perm(__a,
10717 vec_lvlx(__b, __c),
10718 vec_lvsr(__b, __c)),
10719 __b, __c);
10720 }
10721
10722 static void __ATTRS_o_ai
vec_stvrxl(vector unsigned short __a,int __b,vector unsigned short * __c)10723 vec_stvrxl(vector unsigned short __a, int __b, vector unsigned short *__c)
10724 {
10725 return vec_stl(vec_perm(__a,
10726 vec_lvlx(__b, __c),
10727 vec_lvsr(__b, (unsigned char *)__c)),
10728 __b, __c);
10729 }
10730
10731 static void __ATTRS_o_ai
vec_stvrxl(vector bool short __a,int __b,vector bool short * __c)10732 vec_stvrxl(vector bool short __a, int __b, vector bool short *__c)
10733 {
10734 return vec_stl(vec_perm(__a,
10735 vec_lvlx(__b, __c),
10736 vec_lvsr(__b, (unsigned char *)__c)),
10737 __b, __c);
10738 }
10739
10740 static void __ATTRS_o_ai
vec_stvrxl(vector pixel __a,int __b,vector pixel * __c)10741 vec_stvrxl(vector pixel __a, int __b, vector pixel *__c)
10742 {
10743 return vec_stl(vec_perm(__a,
10744 vec_lvlx(__b, __c),
10745 vec_lvsr(__b, (unsigned char *)__c)),
10746 __b, __c);
10747 }
10748
10749 static void __ATTRS_o_ai
vec_stvrxl(vector int __a,int __b,int * __c)10750 vec_stvrxl(vector int __a, int __b, int *__c)
10751 {
10752 return vec_stl(vec_perm(__a,
10753 vec_lvlx(__b, __c),
10754 vec_lvsr(__b, __c)),
10755 __b, __c);
10756 }
10757
10758 static void __ATTRS_o_ai
vec_stvrxl(vector int __a,int __b,vector int * __c)10759 vec_stvrxl(vector int __a, int __b, vector int *__c)
10760 {
10761 return vec_stl(vec_perm(__a,
10762 vec_lvlx(__b, __c),
10763 vec_lvsr(__b, (unsigned char *)__c)),
10764 __b, __c);
10765 }
10766
10767 static void __ATTRS_o_ai
vec_stvrxl(vector unsigned int __a,int __b,unsigned int * __c)10768 vec_stvrxl(vector unsigned int __a, int __b, unsigned int *__c)
10769 {
10770 return vec_stl(vec_perm(__a,
10771 vec_lvlx(__b, __c),
10772 vec_lvsr(__b, __c)),
10773 __b, __c);
10774 }
10775
10776 static void __ATTRS_o_ai
vec_stvrxl(vector unsigned int __a,int __b,vector unsigned int * __c)10777 vec_stvrxl(vector unsigned int __a, int __b, vector unsigned int *__c)
10778 {
10779 return vec_stl(vec_perm(__a,
10780 vec_lvlx(__b, __c),
10781 vec_lvsr(__b, (unsigned char *)__c)),
10782 __b, __c);
10783 }
10784
10785 static void __ATTRS_o_ai
vec_stvrxl(vector bool int __a,int __b,vector bool int * __c)10786 vec_stvrxl(vector bool int __a, int __b, vector bool int *__c)
10787 {
10788 return vec_stl(vec_perm(__a,
10789 vec_lvlx(__b, __c),
10790 vec_lvsr(__b, (unsigned char *)__c)),
10791 __b, __c);
10792 }
10793
10794 static void __ATTRS_o_ai
vec_stvrxl(vector float __a,int __b,vector float * __c)10795 vec_stvrxl(vector float __a, int __b, vector float *__c)
10796 {
10797 return vec_stl(vec_perm(__a,
10798 vec_lvlx(__b, __c),
10799 vec_lvsr(__b, (unsigned char *)__c)),
10800 __b, __c);
10801 }
10802
10803 /* vec_promote */
10804
10805 static vector signed char __ATTRS_o_ai
vec_promote(signed char __a,int __b)10806 vec_promote(signed char __a, int __b)
10807 {
10808 vector signed char __res = (vector signed char)(0);
10809 __res[__b] = __a;
10810 return __res;
10811 }
10812
10813 static vector unsigned char __ATTRS_o_ai
vec_promote(unsigned char __a,int __b)10814 vec_promote(unsigned char __a, int __b)
10815 {
10816 vector unsigned char __res = (vector unsigned char)(0);
10817 __res[__b] = __a;
10818 return __res;
10819 }
10820
10821 static vector short __ATTRS_o_ai
vec_promote(short __a,int __b)10822 vec_promote(short __a, int __b)
10823 {
10824 vector short __res = (vector short)(0);
10825 __res[__b] = __a;
10826 return __res;
10827 }
10828
10829 static vector unsigned short __ATTRS_o_ai
vec_promote(unsigned short __a,int __b)10830 vec_promote(unsigned short __a, int __b)
10831 {
10832 vector unsigned short __res = (vector unsigned short)(0);
10833 __res[__b] = __a;
10834 return __res;
10835 }
10836
10837 static vector int __ATTRS_o_ai
vec_promote(int __a,int __b)10838 vec_promote(int __a, int __b)
10839 {
10840 vector int __res = (vector int)(0);
10841 __res[__b] = __a;
10842 return __res;
10843 }
10844
10845 static vector unsigned int __ATTRS_o_ai
vec_promote(unsigned int __a,int __b)10846 vec_promote(unsigned int __a, int __b)
10847 {
10848 vector unsigned int __res = (vector unsigned int)(0);
10849 __res[__b] = __a;
10850 return __res;
10851 }
10852
10853 static vector float __ATTRS_o_ai
vec_promote(float __a,int __b)10854 vec_promote(float __a, int __b)
10855 {
10856 vector float __res = (vector float)(0);
10857 __res[__b] = __a;
10858 return __res;
10859 }
10860
10861 /* vec_splats */
10862
10863 static vector signed char __ATTRS_o_ai
vec_splats(signed char __a)10864 vec_splats(signed char __a)
10865 {
10866 return (vector signed char)(__a);
10867 }
10868
10869 static vector unsigned char __ATTRS_o_ai
vec_splats(unsigned char __a)10870 vec_splats(unsigned char __a)
10871 {
10872 return (vector unsigned char)(__a);
10873 }
10874
10875 static vector short __ATTRS_o_ai
vec_splats(short __a)10876 vec_splats(short __a)
10877 {
10878 return (vector short)(__a);
10879 }
10880
10881 static vector unsigned short __ATTRS_o_ai
vec_splats(unsigned short __a)10882 vec_splats(unsigned short __a)
10883 {
10884 return (vector unsigned short)(__a);
10885 }
10886
10887 static vector int __ATTRS_o_ai
vec_splats(int __a)10888 vec_splats(int __a)
10889 {
10890 return (vector int)(__a);
10891 }
10892
10893 static vector unsigned int __ATTRS_o_ai
vec_splats(unsigned int __a)10894 vec_splats(unsigned int __a)
10895 {
10896 return (vector unsigned int)(__a);
10897 }
10898
10899 static vector float __ATTRS_o_ai
vec_splats(float __a)10900 vec_splats(float __a)
10901 {
10902 return (vector float)(__a);
10903 }
10904
10905 /* ----------------------------- predicates --------------------------------- */
10906
10907 /* vec_all_eq */
10908
10909 static int __ATTRS_o_ai
vec_all_eq(vector signed char __a,vector signed char __b)10910 vec_all_eq(vector signed char __a, vector signed char __b)
10911 {
10912 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10913 }
10914
10915 static int __ATTRS_o_ai
vec_all_eq(vector signed char __a,vector bool char __b)10916 vec_all_eq(vector signed char __a, vector bool char __b)
10917 {
10918 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10919 }
10920
10921 static int __ATTRS_o_ai
vec_all_eq(vector unsigned char __a,vector unsigned char __b)10922 vec_all_eq(vector unsigned char __a, vector unsigned char __b)
10923 {
10924 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10925 }
10926
10927 static int __ATTRS_o_ai
vec_all_eq(vector unsigned char __a,vector bool char __b)10928 vec_all_eq(vector unsigned char __a, vector bool char __b)
10929 {
10930 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10931 }
10932
10933 static int __ATTRS_o_ai
vec_all_eq(vector bool char __a,vector signed char __b)10934 vec_all_eq(vector bool char __a, vector signed char __b)
10935 {
10936 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10937 }
10938
10939 static int __ATTRS_o_ai
vec_all_eq(vector bool char __a,vector unsigned char __b)10940 vec_all_eq(vector bool char __a, vector unsigned char __b)
10941 {
10942 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10943 }
10944
10945 static int __ATTRS_o_ai
vec_all_eq(vector bool char __a,vector bool char __b)10946 vec_all_eq(vector bool char __a, vector bool char __b)
10947 {
10948 return __builtin_altivec_vcmpequb_p(__CR6_LT, (vector char)__a, (vector char)__b);
10949 }
10950
10951 static int __ATTRS_o_ai
vec_all_eq(vector short __a,vector short __b)10952 vec_all_eq(vector short __a, vector short __b)
10953 {
10954 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, __b);
10955 }
10956
10957 static int __ATTRS_o_ai
vec_all_eq(vector short __a,vector bool short __b)10958 vec_all_eq(vector short __a, vector bool short __b)
10959 {
10960 return __builtin_altivec_vcmpequh_p(__CR6_LT, __a, (vector short)__b);
10961 }
10962
10963 static int __ATTRS_o_ai
vec_all_eq(vector unsigned short __a,vector unsigned short __b)10964 vec_all_eq(vector unsigned short __a, vector unsigned short __b)
10965 {
10966 return
10967 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10968 }
10969
10970 static int __ATTRS_o_ai
vec_all_eq(vector unsigned short __a,vector bool short __b)10971 vec_all_eq(vector unsigned short __a, vector bool short __b)
10972 {
10973 return
10974 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10975 }
10976
10977 static int __ATTRS_o_ai
vec_all_eq(vector bool short __a,vector short __b)10978 vec_all_eq(vector bool short __a, vector short __b)
10979 {
10980 return
10981 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10982 }
10983
10984 static int __ATTRS_o_ai
vec_all_eq(vector bool short __a,vector unsigned short __b)10985 vec_all_eq(vector bool short __a, vector unsigned short __b)
10986 {
10987 return
10988 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10989 }
10990
10991 static int __ATTRS_o_ai
vec_all_eq(vector bool short __a,vector bool short __b)10992 vec_all_eq(vector bool short __a, vector bool short __b)
10993 {
10994 return
10995 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
10996 }
10997
10998 static int __ATTRS_o_ai
vec_all_eq(vector pixel __a,vector pixel __b)10999 vec_all_eq(vector pixel __a, vector pixel __b)
11000 {
11001 return
11002 __builtin_altivec_vcmpequh_p(__CR6_LT, (vector short)__a, (vector short)__b);
11003 }
11004
11005 static int __ATTRS_o_ai
vec_all_eq(vector int __a,vector int __b)11006 vec_all_eq(vector int __a, vector int __b)
11007 {
11008 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, __b);
11009 }
11010
11011 static int __ATTRS_o_ai
vec_all_eq(vector int __a,vector bool int __b)11012 vec_all_eq(vector int __a, vector bool int __b)
11013 {
11014 return __builtin_altivec_vcmpequw_p(__CR6_LT, __a, (vector int)__b);
11015 }
11016
11017 static int __ATTRS_o_ai
vec_all_eq(vector unsigned int __a,vector unsigned int __b)11018 vec_all_eq(vector unsigned int __a, vector unsigned int __b)
11019 {
11020 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
11021 }
11022
11023 static int __ATTRS_o_ai
vec_all_eq(vector unsigned int __a,vector bool int __b)11024 vec_all_eq(vector unsigned int __a, vector bool int __b)
11025 {
11026 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
11027 }
11028
11029 static int __ATTRS_o_ai
vec_all_eq(vector bool int __a,vector int __b)11030 vec_all_eq(vector bool int __a, vector int __b)
11031 {
11032 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
11033 }
11034
11035 static int __ATTRS_o_ai
vec_all_eq(vector bool int __a,vector unsigned int __b)11036 vec_all_eq(vector bool int __a, vector unsigned int __b)
11037 {
11038 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
11039 }
11040
11041 static int __ATTRS_o_ai
vec_all_eq(vector bool int __a,vector bool int __b)11042 vec_all_eq(vector bool int __a, vector bool int __b)
11043 {
11044 return __builtin_altivec_vcmpequw_p(__CR6_LT, (vector int)__a, (vector int)__b);
11045 }
11046
11047 #ifdef __POWER8_VECTOR__
11048 static int __ATTRS_o_ai
vec_all_eq(vector signed long long __a,vector signed long long __b)11049 vec_all_eq(vector signed long long __a, vector signed long long __b)
11050 {
11051 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, __b);
11052 }
11053
11054 static int __ATTRS_o_ai
vec_all_eq(vector long long __a,vector bool long long __b)11055 vec_all_eq(vector long long __a, vector bool long long __b)
11056 {
11057 return __builtin_altivec_vcmpequd_p(__CR6_LT, __a, (vector long long)__b);
11058 }
11059
11060 static int __ATTRS_o_ai
vec_all_eq(vector unsigned long long __a,vector unsigned long long __b)11061 vec_all_eq(vector unsigned long long __a, vector unsigned long long __b)
11062 {
11063 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11064 (vector long long)__b);
11065 }
11066
11067 static int __ATTRS_o_ai
vec_all_eq(vector unsigned long long __a,vector bool long long __b)11068 vec_all_eq(vector unsigned long long __a, vector bool long long __b)
11069 {
11070 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11071 (vector long long)__b);
11072 }
11073
11074 static int __ATTRS_o_ai
vec_all_eq(vector bool long long __a,vector long long __b)11075 vec_all_eq(vector bool long long __a, vector long long __b)
11076 {
11077 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11078 (vector long long)__b);
11079 }
11080
11081 static int __ATTRS_o_ai
vec_all_eq(vector bool long long __a,vector unsigned long long __b)11082 vec_all_eq(vector bool long long __a, vector unsigned long long __b)
11083 {
11084 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11085 (vector long long)__b);
11086 }
11087
11088 static int __ATTRS_o_ai
vec_all_eq(vector bool long long __a,vector bool long long __b)11089 vec_all_eq(vector bool long long __a, vector bool long long __b)
11090 {
11091 return __builtin_altivec_vcmpequd_p(__CR6_LT, (vector long long)__a,
11092 (vector long long)__b);
11093 }
11094 #endif
11095
11096 static int __ATTRS_o_ai
vec_all_eq(vector float __a,vector float __b)11097 vec_all_eq(vector float __a, vector float __b)
11098 {
11099 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __b);
11100 }
11101
11102 /* vec_all_ge */
11103
11104 static int __ATTRS_o_ai
vec_all_ge(vector signed char __a,vector signed char __b)11105 vec_all_ge(vector signed char __a, vector signed char __b)
11106 {
11107 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __b, __a);
11108 }
11109
11110 static int __ATTRS_o_ai
vec_all_ge(vector signed char __a,vector bool char __b)11111 vec_all_ge(vector signed char __a, vector bool char __b)
11112 {
11113 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, (vector signed char)__b, __a);
11114 }
11115
11116 static int __ATTRS_o_ai
vec_all_ge(vector unsigned char __a,vector unsigned char __b)11117 vec_all_ge(vector unsigned char __a, vector unsigned char __b)
11118 {
11119 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, __a);
11120 }
11121
11122 static int __ATTRS_o_ai
vec_all_ge(vector unsigned char __a,vector bool char __b)11123 vec_all_ge(vector unsigned char __a, vector bool char __b)
11124 {
11125 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__b, __a);
11126 }
11127
11128 static int __ATTRS_o_ai
vec_all_ge(vector bool char __a,vector signed char __b)11129 vec_all_ge(vector bool char __a, vector signed char __b)
11130 {
11131 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
11132 (vector unsigned char)__b,
11133 (vector unsigned char)__a);
11134 }
11135
11136 static int __ATTRS_o_ai
vec_all_ge(vector bool char __a,vector unsigned char __b)11137 vec_all_ge(vector bool char __a, vector unsigned char __b)
11138 {
11139 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __b, (vector unsigned char)__a);
11140 }
11141
11142 static int __ATTRS_o_ai
vec_all_ge(vector bool char __a,vector bool char __b)11143 vec_all_ge(vector bool char __a, vector bool char __b)
11144 {
11145 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
11146 (vector unsigned char)__b,
11147 (vector unsigned char)__a);
11148 }
11149
11150 static int __ATTRS_o_ai
vec_all_ge(vector short __a,vector short __b)11151 vec_all_ge(vector short __a, vector short __b)
11152 {
11153 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __b, __a);
11154 }
11155
11156 static int __ATTRS_o_ai
vec_all_ge(vector short __a,vector bool short __b)11157 vec_all_ge(vector short __a, vector bool short __b)
11158 {
11159 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, (vector short)__b, __a);
11160 }
11161
11162 static int __ATTRS_o_ai
vec_all_ge(vector unsigned short __a,vector unsigned short __b)11163 vec_all_ge(vector unsigned short __a, vector unsigned short __b)
11164 {
11165 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, __a);
11166 }
11167
11168 static int __ATTRS_o_ai
vec_all_ge(vector unsigned short __a,vector bool short __b)11169 vec_all_ge(vector unsigned short __a, vector bool short __b)
11170 {
11171 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__b, __a);
11172 }
11173
11174 static int __ATTRS_o_ai
vec_all_ge(vector bool short __a,vector short __b)11175 vec_all_ge(vector bool short __a, vector short __b)
11176 {
11177 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
11178 (vector unsigned short)__b,
11179 (vector unsigned short)__a);
11180 }
11181
11182 static int __ATTRS_o_ai
vec_all_ge(vector bool short __a,vector unsigned short __b)11183 vec_all_ge(vector bool short __a, vector unsigned short __b)
11184 {
11185 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __b, (vector unsigned short)__a);
11186 }
11187
11188 static int __ATTRS_o_ai
vec_all_ge(vector bool short __a,vector bool short __b)11189 vec_all_ge(vector bool short __a, vector bool short __b)
11190 {
11191 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
11192 (vector unsigned short)__b,
11193 (vector unsigned short)__a);
11194 }
11195
11196 static int __ATTRS_o_ai
vec_all_ge(vector int __a,vector int __b)11197 vec_all_ge(vector int __a, vector int __b)
11198 {
11199 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __b, __a);
11200 }
11201
11202 static int __ATTRS_o_ai
vec_all_ge(vector int __a,vector bool int __b)11203 vec_all_ge(vector int __a, vector bool int __b)
11204 {
11205 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, (vector int)__b, __a);
11206 }
11207
11208 static int __ATTRS_o_ai
vec_all_ge(vector unsigned int __a,vector unsigned int __b)11209 vec_all_ge(vector unsigned int __a, vector unsigned int __b)
11210 {
11211 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, __a);
11212 }
11213
11214 static int __ATTRS_o_ai
vec_all_ge(vector unsigned int __a,vector bool int __b)11215 vec_all_ge(vector unsigned int __a, vector bool int __b)
11216 {
11217 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__b, __a);
11218 }
11219
11220 static int __ATTRS_o_ai
vec_all_ge(vector bool int __a,vector int __b)11221 vec_all_ge(vector bool int __a, vector int __b)
11222 {
11223 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
11224 (vector unsigned int)__b,
11225 (vector unsigned int)__a);
11226 }
11227
11228 static int __ATTRS_o_ai
vec_all_ge(vector bool int __a,vector unsigned int __b)11229 vec_all_ge(vector bool int __a, vector unsigned int __b)
11230 {
11231 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __b, (vector unsigned int)__a);
11232 }
11233
11234 static int __ATTRS_o_ai
vec_all_ge(vector bool int __a,vector bool int __b)11235 vec_all_ge(vector bool int __a, vector bool int __b)
11236 {
11237 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
11238 (vector unsigned int)__b,
11239 (vector unsigned int)__a);
11240 }
11241
11242 #ifdef __POWER8_VECTOR__
11243 static int __ATTRS_o_ai
vec_all_ge(vector signed long long __a,vector signed long long __b)11244 vec_all_ge(vector signed long long __a, vector signed long long __b)
11245 {
11246 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __b, __a);
11247 }
11248 static int __ATTRS_o_ai
vec_all_ge(vector signed long long __a,vector bool long long __b)11249 vec_all_ge(vector signed long long __a, vector bool long long __b)
11250 {
11251 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, (vector signed long long)__b,
11252 __a);
11253 }
11254
11255 static int __ATTRS_o_ai
vec_all_ge(vector unsigned long long __a,vector unsigned long long __b)11256 vec_all_ge(vector unsigned long long __a, vector unsigned long long __b)
11257 {
11258 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b, __a);
11259 }
11260
11261 static int __ATTRS_o_ai
vec_all_ge(vector unsigned long long __a,vector bool long long __b)11262 vec_all_ge(vector unsigned long long __a, vector bool long long __b)
11263 {
11264 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__b,
11265 __a);
11266 }
11267
11268 static int __ATTRS_o_ai
vec_all_ge(vector bool long long __a,vector signed long long __b)11269 vec_all_ge(vector bool long long __a, vector signed long long __b)
11270 {
11271 return __builtin_altivec_vcmpgtud_p(__CR6_EQ,
11272 (vector unsigned long long)__b,
11273 (vector unsigned long long)__a);
11274 }
11275
11276 static int __ATTRS_o_ai
vec_all_ge(vector bool long long __a,vector unsigned long long __b)11277 vec_all_ge(vector bool long long __a, vector unsigned long long __b)
11278 {
11279 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __b,
11280 (vector unsigned long long)__a);
11281 }
11282
11283 static int __ATTRS_o_ai
vec_all_ge(vector bool long long __a,vector bool long long __b)11284 vec_all_ge(vector bool long long __a, vector bool long long __b)
11285 {
11286 return __builtin_altivec_vcmpgtud_p(__CR6_EQ,
11287 (vector unsigned long long)__b,
11288 (vector unsigned long long)__a);
11289 }
11290 #endif
11291
11292 static int __ATTRS_o_ai
vec_all_ge(vector float __a,vector float __b)11293 vec_all_ge(vector float __a, vector float __b)
11294 {
11295 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __a, __b);
11296 }
11297
11298 /* vec_all_gt */
11299
11300 static int __ATTRS_o_ai
vec_all_gt(vector signed char __a,vector signed char __b)11301 vec_all_gt(vector signed char __a, vector signed char __b)
11302 {
11303 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, __b);
11304 }
11305
11306 static int __ATTRS_o_ai
vec_all_gt(vector signed char __a,vector bool char __b)11307 vec_all_gt(vector signed char __a, vector bool char __b)
11308 {
11309 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __a, (vector signed char)__b);
11310 }
11311
11312 static int __ATTRS_o_ai
vec_all_gt(vector unsigned char __a,vector unsigned char __b)11313 vec_all_gt(vector unsigned char __a, vector unsigned char __b)
11314 {
11315 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, __b);
11316 }
11317
11318 static int __ATTRS_o_ai
vec_all_gt(vector unsigned char __a,vector bool char __b)11319 vec_all_gt(vector unsigned char __a, vector bool char __b)
11320 {
11321 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __a, (vector unsigned char)__b);
11322 }
11323
11324 static int __ATTRS_o_ai
vec_all_gt(vector bool char __a,vector signed char __b)11325 vec_all_gt(vector bool char __a, vector signed char __b)
11326 {
11327 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
11328 (vector unsigned char)__a,
11329 (vector unsigned char)__b);
11330 }
11331
11332 static int __ATTRS_o_ai
vec_all_gt(vector bool char __a,vector unsigned char __b)11333 vec_all_gt(vector bool char __a, vector unsigned char __b)
11334 {
11335 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__a, __b);
11336 }
11337
11338 static int __ATTRS_o_ai
vec_all_gt(vector bool char __a,vector bool char __b)11339 vec_all_gt(vector bool char __a, vector bool char __b)
11340 {
11341 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
11342 (vector unsigned char)__a,
11343 (vector unsigned char)__b);
11344 }
11345
11346 static int __ATTRS_o_ai
vec_all_gt(vector short __a,vector short __b)11347 vec_all_gt(vector short __a, vector short __b)
11348 {
11349 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, __b);
11350 }
11351
11352 static int __ATTRS_o_ai
vec_all_gt(vector short __a,vector bool short __b)11353 vec_all_gt(vector short __a, vector bool short __b)
11354 {
11355 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __a, (vector short)__b);
11356 }
11357
11358 static int __ATTRS_o_ai
vec_all_gt(vector unsigned short __a,vector unsigned short __b)11359 vec_all_gt(vector unsigned short __a, vector unsigned short __b)
11360 {
11361 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, __b);
11362 }
11363
11364 static int __ATTRS_o_ai
vec_all_gt(vector unsigned short __a,vector bool short __b)11365 vec_all_gt(vector unsigned short __a, vector bool short __b)
11366 {
11367 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __a, (vector unsigned short)__b);
11368 }
11369
11370 static int __ATTRS_o_ai
vec_all_gt(vector bool short __a,vector short __b)11371 vec_all_gt(vector bool short __a, vector short __b)
11372 {
11373 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11374 (vector unsigned short)__a,
11375 (vector unsigned short)__b);
11376 }
11377
11378 static int __ATTRS_o_ai
vec_all_gt(vector bool short __a,vector unsigned short __b)11379 vec_all_gt(vector bool short __a, vector unsigned short __b)
11380 {
11381 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__a, __b);
11382 }
11383
11384 static int __ATTRS_o_ai
vec_all_gt(vector bool short __a,vector bool short __b)11385 vec_all_gt(vector bool short __a, vector bool short __b)
11386 {
11387 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11388 (vector unsigned short)__a,
11389 (vector unsigned short)__b);
11390 }
11391
11392 static int __ATTRS_o_ai
vec_all_gt(vector int __a,vector int __b)11393 vec_all_gt(vector int __a, vector int __b)
11394 {
11395 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, __b);
11396 }
11397
11398 static int __ATTRS_o_ai
vec_all_gt(vector int __a,vector bool int __b)11399 vec_all_gt(vector int __a, vector bool int __b)
11400 {
11401 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __a, (vector int)__b);
11402 }
11403
11404 static int __ATTRS_o_ai
vec_all_gt(vector unsigned int __a,vector unsigned int __b)11405 vec_all_gt(vector unsigned int __a, vector unsigned int __b)
11406 {
11407 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, __b);
11408 }
11409
11410 static int __ATTRS_o_ai
vec_all_gt(vector unsigned int __a,vector bool int __b)11411 vec_all_gt(vector unsigned int __a, vector bool int __b)
11412 {
11413 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __a, (vector unsigned int)__b);
11414 }
11415
11416 static int __ATTRS_o_ai
vec_all_gt(vector bool int __a,vector int __b)11417 vec_all_gt(vector bool int __a, vector int __b)
11418 {
11419 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11420 (vector unsigned int)__a,
11421 (vector unsigned int)__b);
11422 }
11423
11424 static int __ATTRS_o_ai
vec_all_gt(vector bool int __a,vector unsigned int __b)11425 vec_all_gt(vector bool int __a, vector unsigned int __b)
11426 {
11427 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__a, __b);
11428 }
11429
11430 static int __ATTRS_o_ai
vec_all_gt(vector bool int __a,vector bool int __b)11431 vec_all_gt(vector bool int __a, vector bool int __b)
11432 {
11433 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11434 (vector unsigned int)__a,
11435 (vector unsigned int)__b);
11436 }
11437
11438 #ifdef __POWER8_VECTOR__
11439 static int __ATTRS_o_ai
vec_all_gt(vector signed long long __a,vector signed long long __b)11440 vec_all_gt(vector signed long long __a, vector signed long long __b)
11441 {
11442 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a, __b);
11443 }
11444 static int __ATTRS_o_ai
vec_all_gt(vector signed long long __a,vector bool long long __b)11445 vec_all_gt(vector signed long long __a, vector bool long long __b)
11446 {
11447 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __a,
11448 (vector signed long long)__b);
11449 }
11450
11451 static int __ATTRS_o_ai
vec_all_gt(vector unsigned long long __a,vector unsigned long long __b)11452 vec_all_gt(vector unsigned long long __a, vector unsigned long long __b)
11453 {
11454 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a, __b);
11455 }
11456
11457 static int __ATTRS_o_ai
vec_all_gt(vector unsigned long long __a,vector bool long long __b)11458 vec_all_gt(vector unsigned long long __a, vector bool long long __b)
11459 {
11460 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __a,
11461 (vector unsigned long long)__b);
11462 }
11463
11464 static int __ATTRS_o_ai
vec_all_gt(vector bool long long __a,vector signed long long __b)11465 vec_all_gt(vector bool long long __a, vector signed long long __b)
11466 {
11467 return __builtin_altivec_vcmpgtud_p(__CR6_LT,
11468 (vector unsigned long long)__a,
11469 (vector unsigned long long)__b);
11470 }
11471
11472 static int __ATTRS_o_ai
vec_all_gt(vector bool long long __a,vector unsigned long long __b)11473 vec_all_gt(vector bool long long __a, vector unsigned long long __b)
11474 {
11475 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__a,
11476 __b);
11477 }
11478
11479 static int __ATTRS_o_ai
vec_all_gt(vector bool long long __a,vector bool long long __b)11480 vec_all_gt(vector bool long long __a, vector bool long long __b)
11481 {
11482 return __builtin_altivec_vcmpgtud_p(__CR6_LT,
11483 (vector unsigned long long)__a,
11484 (vector unsigned long long)__b);
11485 }
11486 #endif
11487
11488 static int __ATTRS_o_ai
vec_all_gt(vector float __a,vector float __b)11489 vec_all_gt(vector float __a, vector float __b)
11490 {
11491 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __a, __b);
11492 }
11493
11494 /* vec_all_in */
11495
11496 static int __attribute__((__always_inline__))
vec_all_in(vector float __a,vector float __b)11497 vec_all_in(vector float __a, vector float __b)
11498 {
11499 return __builtin_altivec_vcmpbfp_p(__CR6_EQ, __a, __b);
11500 }
11501
11502 /* vec_all_le */
11503
11504 static int __ATTRS_o_ai
vec_all_le(vector signed char __a,vector signed char __b)11505 vec_all_le(vector signed char __a, vector signed char __b)
11506 {
11507 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, __b);
11508 }
11509
11510 static int __ATTRS_o_ai
vec_all_le(vector signed char __a,vector bool char __b)11511 vec_all_le(vector signed char __a, vector bool char __b)
11512 {
11513 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ, __a, (vector signed char)__b);
11514 }
11515
11516 static int __ATTRS_o_ai
vec_all_le(vector unsigned char __a,vector unsigned char __b)11517 vec_all_le(vector unsigned char __a, vector unsigned char __b)
11518 {
11519 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, __b);
11520 }
11521
11522 static int __ATTRS_o_ai
vec_all_le(vector unsigned char __a,vector bool char __b)11523 vec_all_le(vector unsigned char __a, vector bool char __b)
11524 {
11525 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, __a, (vector unsigned char)__b);
11526 }
11527
11528 static int __ATTRS_o_ai
vec_all_le(vector bool char __a,vector signed char __b)11529 vec_all_le(vector bool char __a, vector signed char __b)
11530 {
11531 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
11532 (vector unsigned char)__a,
11533 (vector unsigned char)__b);
11534 }
11535
11536 static int __ATTRS_o_ai
vec_all_le(vector bool char __a,vector unsigned char __b)11537 vec_all_le(vector bool char __a, vector unsigned char __b)
11538 {
11539 return __builtin_altivec_vcmpgtub_p(__CR6_EQ, (vector unsigned char)__a, __b);
11540 }
11541
11542 static int __ATTRS_o_ai
vec_all_le(vector bool char __a,vector bool char __b)11543 vec_all_le(vector bool char __a, vector bool char __b)
11544 {
11545 return __builtin_altivec_vcmpgtub_p(__CR6_EQ,
11546 (vector unsigned char)__a,
11547 (vector unsigned char)__b);
11548 }
11549
11550 static int __ATTRS_o_ai
vec_all_le(vector short __a,vector short __b)11551 vec_all_le(vector short __a, vector short __b)
11552 {
11553 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, __b);
11554 }
11555
11556 static int __ATTRS_o_ai
vec_all_le(vector short __a,vector bool short __b)11557 vec_all_le(vector short __a, vector bool short __b)
11558 {
11559 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ, __a, (vector short)__b);
11560 }
11561
11562 static int __ATTRS_o_ai
vec_all_le(vector unsigned short __a,vector unsigned short __b)11563 vec_all_le(vector unsigned short __a, vector unsigned short __b)
11564 {
11565 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, __b);
11566 }
11567
11568 static int __ATTRS_o_ai
vec_all_le(vector unsigned short __a,vector bool short __b)11569 vec_all_le(vector unsigned short __a, vector bool short __b)
11570 {
11571 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, __a, (vector unsigned short)__b);
11572 }
11573
11574 static int __ATTRS_o_ai
vec_all_le(vector bool short __a,vector short __b)11575 vec_all_le(vector bool short __a, vector short __b)
11576 {
11577 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
11578 (vector unsigned short)__a,
11579 (vector unsigned short)__b);
11580 }
11581
11582 static int __ATTRS_o_ai
vec_all_le(vector bool short __a,vector unsigned short __b)11583 vec_all_le(vector bool short __a, vector unsigned short __b)
11584 {
11585 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ, (vector unsigned short)__a, __b);
11586 }
11587
11588 static int __ATTRS_o_ai
vec_all_le(vector bool short __a,vector bool short __b)11589 vec_all_le(vector bool short __a, vector bool short __b)
11590 {
11591 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ,
11592 (vector unsigned short)__a,
11593 (vector unsigned short)__b);
11594 }
11595
11596 static int __ATTRS_o_ai
vec_all_le(vector int __a,vector int __b)11597 vec_all_le(vector int __a, vector int __b)
11598 {
11599 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, __b);
11600 }
11601
11602 static int __ATTRS_o_ai
vec_all_le(vector int __a,vector bool int __b)11603 vec_all_le(vector int __a, vector bool int __b)
11604 {
11605 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ, __a, (vector int)__b);
11606 }
11607
11608 static int __ATTRS_o_ai
vec_all_le(vector unsigned int __a,vector unsigned int __b)11609 vec_all_le(vector unsigned int __a, vector unsigned int __b)
11610 {
11611 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, __b);
11612 }
11613
11614 static int __ATTRS_o_ai
vec_all_le(vector unsigned int __a,vector bool int __b)11615 vec_all_le(vector unsigned int __a, vector bool int __b)
11616 {
11617 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, __a, (vector unsigned int)__b);
11618 }
11619
11620 static int __ATTRS_o_ai
vec_all_le(vector bool int __a,vector int __b)11621 vec_all_le(vector bool int __a, vector int __b)
11622 {
11623 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
11624 (vector unsigned int)__a,
11625 (vector unsigned int)__b);
11626 }
11627
11628 static int __ATTRS_o_ai
vec_all_le(vector bool int __a,vector unsigned int __b)11629 vec_all_le(vector bool int __a, vector unsigned int __b)
11630 {
11631 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ, (vector unsigned int)__a, __b);
11632 }
11633
11634 static int __ATTRS_o_ai
vec_all_le(vector bool int __a,vector bool int __b)11635 vec_all_le(vector bool int __a, vector bool int __b)
11636 {
11637 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ,
11638 (vector unsigned int)__a,
11639 (vector unsigned int)__b);
11640 }
11641
11642 #ifdef __POWER8_VECTOR__
11643 static int __ATTRS_o_ai
vec_all_le(vector signed long long __a,vector signed long long __b)11644 vec_all_le(vector signed long long __a, vector signed long long __b)
11645 {
11646 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a, __b);
11647 }
11648
11649 static int __ATTRS_o_ai
vec_all_le(vector unsigned long long __a,vector unsigned long long __b)11650 vec_all_le(vector unsigned long long __a, vector unsigned long long __b)
11651 {
11652 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a, __b);
11653 }
11654
11655 static int __ATTRS_o_ai
vec_all_le(vector signed long long __a,vector bool long long __b)11656 vec_all_le(vector signed long long __a, vector bool long long __b)
11657 {
11658 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ, __a,
11659 (vector signed long long)__b);
11660 }
11661
11662 static int __ATTRS_o_ai
vec_all_le(vector unsigned long long __a,vector bool long long __b)11663 vec_all_le(vector unsigned long long __a, vector bool long long __b)
11664 {
11665 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, __a,
11666 (vector unsigned long long)__b);
11667 }
11668
11669 static int __ATTRS_o_ai
vec_all_le(vector bool long long __a,vector signed long long __b)11670 vec_all_le(vector bool long long __a, vector signed long long __b)
11671 {
11672 return __builtin_altivec_vcmpgtud_p(__CR6_EQ,
11673 (vector unsigned long long)__a,
11674 (vector unsigned long long)__b);
11675 }
11676
11677 static int __ATTRS_o_ai
vec_all_le(vector bool long long __a,vector unsigned long long __b)11678 vec_all_le(vector bool long long __a, vector unsigned long long __b)
11679 {
11680 return __builtin_altivec_vcmpgtud_p(__CR6_EQ, (vector unsigned long long)__a,
11681 __b);
11682 }
11683
11684 static int __ATTRS_o_ai
vec_all_le(vector bool long long __a,vector bool long long __b)11685 vec_all_le(vector bool long long __a, vector bool long long __b)
11686 {
11687 return __builtin_altivec_vcmpgtud_p(__CR6_EQ,
11688 (vector unsigned long long)__a,
11689 (vector unsigned long long)__b);
11690 }
11691 #endif
11692
11693 static int __ATTRS_o_ai
vec_all_le(vector float __a,vector float __b)11694 vec_all_le(vector float __a, vector float __b)
11695 {
11696 return __builtin_altivec_vcmpgefp_p(__CR6_LT, __b, __a);
11697 }
11698
11699 /* vec_all_lt */
11700
11701 static int __ATTRS_o_ai
vec_all_lt(vector signed char __a,vector signed char __b)11702 vec_all_lt(vector signed char __a, vector signed char __b)
11703 {
11704 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, __b, __a);
11705 }
11706
11707 static int __ATTRS_o_ai
vec_all_lt(vector signed char __a,vector bool char __b)11708 vec_all_lt(vector signed char __a, vector bool char __b)
11709 {
11710 return __builtin_altivec_vcmpgtsb_p(__CR6_LT, (vector signed char)__b, __a);
11711 }
11712
11713 static int __ATTRS_o_ai
vec_all_lt(vector unsigned char __a,vector unsigned char __b)11714 vec_all_lt(vector unsigned char __a, vector unsigned char __b)
11715 {
11716 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, __a);
11717 }
11718
11719 static int __ATTRS_o_ai
vec_all_lt(vector unsigned char __a,vector bool char __b)11720 vec_all_lt(vector unsigned char __a, vector bool char __b)
11721 {
11722 return __builtin_altivec_vcmpgtub_p(__CR6_LT, (vector unsigned char)__b, __a);
11723 }
11724
11725 static int __ATTRS_o_ai
vec_all_lt(vector bool char __a,vector signed char __b)11726 vec_all_lt(vector bool char __a, vector signed char __b)
11727 {
11728 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
11729 (vector unsigned char)__b,
11730 (vector unsigned char)__a);
11731 }
11732
11733 static int __ATTRS_o_ai
vec_all_lt(vector bool char __a,vector unsigned char __b)11734 vec_all_lt(vector bool char __a, vector unsigned char __b)
11735 {
11736 return __builtin_altivec_vcmpgtub_p(__CR6_LT, __b, (vector unsigned char)__a);
11737 }
11738
11739 static int __ATTRS_o_ai
vec_all_lt(vector bool char __a,vector bool char __b)11740 vec_all_lt(vector bool char __a, vector bool char __b)
11741 {
11742 return __builtin_altivec_vcmpgtub_p(__CR6_LT,
11743 (vector unsigned char)__b,
11744 (vector unsigned char)__a);
11745 }
11746
11747 static int __ATTRS_o_ai
vec_all_lt(vector short __a,vector short __b)11748 vec_all_lt(vector short __a, vector short __b)
11749 {
11750 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, __b, __a);
11751 }
11752
11753 static int __ATTRS_o_ai
vec_all_lt(vector short __a,vector bool short __b)11754 vec_all_lt(vector short __a, vector bool short __b)
11755 {
11756 return __builtin_altivec_vcmpgtsh_p(__CR6_LT, (vector short)__b, __a);
11757 }
11758
11759 static int __ATTRS_o_ai
vec_all_lt(vector unsigned short __a,vector unsigned short __b)11760 vec_all_lt(vector unsigned short __a, vector unsigned short __b)
11761 {
11762 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, __a);
11763 }
11764
11765 static int __ATTRS_o_ai
vec_all_lt(vector unsigned short __a,vector bool short __b)11766 vec_all_lt(vector unsigned short __a, vector bool short __b)
11767 {
11768 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, (vector unsigned short)__b, __a);
11769 }
11770
11771 static int __ATTRS_o_ai
vec_all_lt(vector bool short __a,vector short __b)11772 vec_all_lt(vector bool short __a, vector short __b)
11773 {
11774 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11775 (vector unsigned short)__b,
11776 (vector unsigned short)__a);
11777 }
11778
11779 static int __ATTRS_o_ai
vec_all_lt(vector bool short __a,vector unsigned short __b)11780 vec_all_lt(vector bool short __a, vector unsigned short __b)
11781 {
11782 return __builtin_altivec_vcmpgtuh_p(__CR6_LT, __b, (vector unsigned short)__a);
11783 }
11784
11785 static int __ATTRS_o_ai
vec_all_lt(vector bool short __a,vector bool short __b)11786 vec_all_lt(vector bool short __a, vector bool short __b)
11787 {
11788 return __builtin_altivec_vcmpgtuh_p(__CR6_LT,
11789 (vector unsigned short)__b,
11790 (vector unsigned short)__a);
11791 }
11792
11793 static int __ATTRS_o_ai
vec_all_lt(vector int __a,vector int __b)11794 vec_all_lt(vector int __a, vector int __b)
11795 {
11796 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, __b, __a);
11797 }
11798
11799 static int __ATTRS_o_ai
vec_all_lt(vector int __a,vector bool int __b)11800 vec_all_lt(vector int __a, vector bool int __b)
11801 {
11802 return __builtin_altivec_vcmpgtsw_p(__CR6_LT, (vector int)__b, __a);
11803 }
11804
11805 static int __ATTRS_o_ai
vec_all_lt(vector unsigned int __a,vector unsigned int __b)11806 vec_all_lt(vector unsigned int __a, vector unsigned int __b)
11807 {
11808 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, __a);
11809 }
11810
11811 static int __ATTRS_o_ai
vec_all_lt(vector unsigned int __a,vector bool int __b)11812 vec_all_lt(vector unsigned int __a, vector bool int __b)
11813 {
11814 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, (vector unsigned int)__b, __a);
11815 }
11816
11817 static int __ATTRS_o_ai
vec_all_lt(vector bool int __a,vector int __b)11818 vec_all_lt(vector bool int __a, vector int __b)
11819 {
11820 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11821 (vector unsigned int)__b,
11822 (vector unsigned int)__a);
11823 }
11824
11825 static int __ATTRS_o_ai
vec_all_lt(vector bool int __a,vector unsigned int __b)11826 vec_all_lt(vector bool int __a, vector unsigned int __b)
11827 {
11828 return __builtin_altivec_vcmpgtuw_p(__CR6_LT, __b, (vector unsigned int)__a);
11829 }
11830
11831 static int __ATTRS_o_ai
vec_all_lt(vector bool int __a,vector bool int __b)11832 vec_all_lt(vector bool int __a, vector bool int __b)
11833 {
11834 return __builtin_altivec_vcmpgtuw_p(__CR6_LT,
11835 (vector unsigned int)__b,
11836 (vector unsigned int)__a);
11837 }
11838
11839 #ifdef __POWER8_VECTOR__
11840 static int __ATTRS_o_ai
vec_all_lt(vector signed long long __a,vector signed long long __b)11841 vec_all_lt(vector signed long long __a, vector signed long long __b)
11842 {
11843 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, __b, __a);
11844 }
11845
11846 static int __ATTRS_o_ai
vec_all_lt(vector unsigned long long __a,vector unsigned long long __b)11847 vec_all_lt(vector unsigned long long __a, vector unsigned long long __b)
11848 {
11849 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b, __a);
11850 }
11851
11852 static int __ATTRS_o_ai
vec_all_lt(vector signed long long __a,vector bool long long __b)11853 vec_all_lt(vector signed long long __a, vector bool long long __b)
11854 {
11855 return __builtin_altivec_vcmpgtsd_p(__CR6_LT, (vector signed long long)__b,
11856 __a);
11857 }
11858
11859 static int __ATTRS_o_ai
vec_all_lt(vector unsigned long long __a,vector bool long long __b)11860 vec_all_lt(vector unsigned long long __a, vector bool long long __b)
11861 {
11862 return __builtin_altivec_vcmpgtud_p(__CR6_LT, (vector unsigned long long)__b,
11863 __a);
11864 }
11865
11866 static int __ATTRS_o_ai
vec_all_lt(vector bool long long __a,vector signed long long __b)11867 vec_all_lt(vector bool long long __a, vector signed long long __b)
11868 {
11869 return __builtin_altivec_vcmpgtud_p(__CR6_LT,
11870 (vector unsigned long long)__b,
11871 (vector unsigned long long)__a);
11872 }
11873
11874 static int __ATTRS_o_ai
vec_all_lt(vector bool long long __a,vector unsigned long long __b)11875 vec_all_lt(vector bool long long __a, vector unsigned long long __b)
11876 {
11877 return __builtin_altivec_vcmpgtud_p(__CR6_LT, __b,
11878 (vector unsigned long long)__a);
11879 }
11880
11881 static int __ATTRS_o_ai
vec_all_lt(vector bool long long __a,vector bool long long __b)11882 vec_all_lt(vector bool long long __a, vector bool long long __b)
11883 {
11884 return __builtin_altivec_vcmpgtud_p(__CR6_LT,
11885 (vector unsigned long long)__b,
11886 (vector unsigned long long)__a);
11887 }
11888 #endif
11889
11890 static int __ATTRS_o_ai
vec_all_lt(vector float __a,vector float __b)11891 vec_all_lt(vector float __a, vector float __b)
11892 {
11893 return __builtin_altivec_vcmpgtfp_p(__CR6_LT, __b, __a);
11894 }
11895
11896 /* vec_all_nan */
11897
11898 static int __attribute__((__always_inline__))
vec_all_nan(vector float __a)11899 vec_all_nan(vector float __a)
11900 {
11901 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __a);
11902 }
11903
11904 /* vec_all_ne */
11905
11906 static int __ATTRS_o_ai
vec_all_ne(vector signed char __a,vector signed char __b)11907 vec_all_ne(vector signed char __a, vector signed char __b)
11908 {
11909 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11910 }
11911
11912 static int __ATTRS_o_ai
vec_all_ne(vector signed char __a,vector bool char __b)11913 vec_all_ne(vector signed char __a, vector bool char __b)
11914 {
11915 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11916 }
11917
11918 static int __ATTRS_o_ai
vec_all_ne(vector unsigned char __a,vector unsigned char __b)11919 vec_all_ne(vector unsigned char __a, vector unsigned char __b)
11920 {
11921 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11922 }
11923
11924 static int __ATTRS_o_ai
vec_all_ne(vector unsigned char __a,vector bool char __b)11925 vec_all_ne(vector unsigned char __a, vector bool char __b)
11926 {
11927 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11928 }
11929
11930 static int __ATTRS_o_ai
vec_all_ne(vector bool char __a,vector signed char __b)11931 vec_all_ne(vector bool char __a, vector signed char __b)
11932 {
11933 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11934 }
11935
11936 static int __ATTRS_o_ai
vec_all_ne(vector bool char __a,vector unsigned char __b)11937 vec_all_ne(vector bool char __a, vector unsigned char __b)
11938 {
11939 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11940 }
11941
11942 static int __ATTRS_o_ai
vec_all_ne(vector bool char __a,vector bool char __b)11943 vec_all_ne(vector bool char __a, vector bool char __b)
11944 {
11945 return __builtin_altivec_vcmpequb_p(__CR6_EQ, (vector char)__a, (vector char)__b);
11946 }
11947
11948 static int __ATTRS_o_ai
vec_all_ne(vector short __a,vector short __b)11949 vec_all_ne(vector short __a, vector short __b)
11950 {
11951 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, __b);
11952 }
11953
11954 static int __ATTRS_o_ai
vec_all_ne(vector short __a,vector bool short __b)11955 vec_all_ne(vector short __a, vector bool short __b)
11956 {
11957 return __builtin_altivec_vcmpequh_p(__CR6_EQ, __a, (vector short)__b);
11958 }
11959
11960 static int __ATTRS_o_ai
vec_all_ne(vector unsigned short __a,vector unsigned short __b)11961 vec_all_ne(vector unsigned short __a, vector unsigned short __b)
11962 {
11963 return
11964 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11965 }
11966
11967 static int __ATTRS_o_ai
vec_all_ne(vector unsigned short __a,vector bool short __b)11968 vec_all_ne(vector unsigned short __a, vector bool short __b)
11969 {
11970 return
11971 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11972 }
11973
11974 static int __ATTRS_o_ai
vec_all_ne(vector bool short __a,vector short __b)11975 vec_all_ne(vector bool short __a, vector short __b)
11976 {
11977 return
11978 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11979 }
11980
11981 static int __ATTRS_o_ai
vec_all_ne(vector bool short __a,vector unsigned short __b)11982 vec_all_ne(vector bool short __a, vector unsigned short __b)
11983 {
11984 return
11985 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11986 }
11987
11988 static int __ATTRS_o_ai
vec_all_ne(vector bool short __a,vector bool short __b)11989 vec_all_ne(vector bool short __a, vector bool short __b)
11990 {
11991 return
11992 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
11993 }
11994
11995 static int __ATTRS_o_ai
vec_all_ne(vector pixel __a,vector pixel __b)11996 vec_all_ne(vector pixel __a, vector pixel __b)
11997 {
11998 return
11999 __builtin_altivec_vcmpequh_p(__CR6_EQ, (vector short)__a, (vector short)__b);
12000 }
12001
12002 static int __ATTRS_o_ai
vec_all_ne(vector int __a,vector int __b)12003 vec_all_ne(vector int __a, vector int __b)
12004 {
12005 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, __b);
12006 }
12007
12008 static int __ATTRS_o_ai
vec_all_ne(vector int __a,vector bool int __b)12009 vec_all_ne(vector int __a, vector bool int __b)
12010 {
12011 return __builtin_altivec_vcmpequw_p(__CR6_EQ, __a, (vector int)__b);
12012 }
12013
12014 static int __ATTRS_o_ai
vec_all_ne(vector unsigned int __a,vector unsigned int __b)12015 vec_all_ne(vector unsigned int __a, vector unsigned int __b)
12016 {
12017 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
12018 }
12019
12020 static int __ATTRS_o_ai
vec_all_ne(vector unsigned int __a,vector bool int __b)12021 vec_all_ne(vector unsigned int __a, vector bool int __b)
12022 {
12023 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
12024 }
12025
12026 static int __ATTRS_o_ai
vec_all_ne(vector bool int __a,vector int __b)12027 vec_all_ne(vector bool int __a, vector int __b)
12028 {
12029 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
12030 }
12031
12032 static int __ATTRS_o_ai
vec_all_ne(vector bool int __a,vector unsigned int __b)12033 vec_all_ne(vector bool int __a, vector unsigned int __b)
12034 {
12035 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
12036 }
12037
12038 static int __ATTRS_o_ai
vec_all_ne(vector bool int __a,vector bool int __b)12039 vec_all_ne(vector bool int __a, vector bool int __b)
12040 {
12041 return __builtin_altivec_vcmpequw_p(__CR6_EQ, (vector int)__a, (vector int)__b);
12042 }
12043
12044 #ifdef __POWER8_VECTOR__
12045 static int __ATTRS_o_ai
vec_all_ne(vector signed long long __a,vector signed long long __b)12046 vec_all_ne(vector signed long long __a, vector signed long long __b)
12047 {
12048 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a, __b);
12049 }
12050
12051 static int __ATTRS_o_ai
vec_all_ne(vector unsigned long long __a,vector unsigned long long __b)12052 vec_all_ne(vector unsigned long long __a, vector unsigned long long __b)
12053 {
12054 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector long long)__a,
12055 (vector long long)__b);
12056 }
12057
12058 static int __ATTRS_o_ai
vec_all_ne(vector signed long long __a,vector bool long long __b)12059 vec_all_ne(vector signed long long __a, vector bool long long __b)
12060 {
12061 return __builtin_altivec_vcmpequd_p(__CR6_EQ, __a,
12062 (vector signed long long)__b);
12063 }
12064
12065 static int __ATTRS_o_ai
vec_all_ne(vector unsigned long long __a,vector bool long long __b)12066 vec_all_ne(vector unsigned long long __a, vector bool long long __b)
12067 {
12068 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12069 (vector signed long long)__b);
12070 }
12071
12072 static int __ATTRS_o_ai
vec_all_ne(vector bool long long __a,vector signed long long __b)12073 vec_all_ne(vector bool long long __a, vector signed long long __b)
12074 {
12075 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12076 (vector signed long long)__b);
12077 }
12078
12079 static int __ATTRS_o_ai
vec_all_ne(vector bool long long __a,vector unsigned long long __b)12080 vec_all_ne(vector bool long long __a, vector unsigned long long __b)
12081 {
12082 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12083 (vector signed long long)__b);
12084 }
12085
12086 static int __ATTRS_o_ai
vec_all_ne(vector bool long long __a,vector bool long long __b)12087 vec_all_ne(vector bool long long __a, vector bool long long __b)
12088 {
12089 return __builtin_altivec_vcmpequd_p(__CR6_EQ, (vector signed long long)__a,
12090 (vector signed long long)__b);
12091 }
12092 #endif
12093
12094 static int __ATTRS_o_ai
vec_all_ne(vector float __a,vector float __b)12095 vec_all_ne(vector float __a, vector float __b)
12096 {
12097 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ, __a, __b);
12098 }
12099
12100 /* vec_all_nge */
12101
12102 static int __attribute__((__always_inline__))
vec_all_nge(vector float __a,vector float __b)12103 vec_all_nge(vector float __a, vector float __b)
12104 {
12105 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __a, __b);
12106 }
12107
12108 /* vec_all_ngt */
12109
12110 static int __attribute__((__always_inline__))
vec_all_ngt(vector float __a,vector float __b)12111 vec_all_ngt(vector float __a, vector float __b)
12112 {
12113 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __a, __b);
12114 }
12115
12116 /* vec_all_nle */
12117
12118 static int __attribute__((__always_inline__))
vec_all_nle(vector float __a,vector float __b)12119 vec_all_nle(vector float __a, vector float __b)
12120 {
12121 return __builtin_altivec_vcmpgefp_p(__CR6_EQ, __b, __a);
12122 }
12123
12124 /* vec_all_nlt */
12125
12126 static int __attribute__((__always_inline__))
vec_all_nlt(vector float __a,vector float __b)12127 vec_all_nlt(vector float __a, vector float __b)
12128 {
12129 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ, __b, __a);
12130 }
12131
12132 /* vec_all_numeric */
12133
12134 static int __attribute__((__always_inline__))
vec_all_numeric(vector float __a)12135 vec_all_numeric(vector float __a)
12136 {
12137 return __builtin_altivec_vcmpeqfp_p(__CR6_LT, __a, __a);
12138 }
12139
12140 /* vec_any_eq */
12141
12142 static int __ATTRS_o_ai
vec_any_eq(vector signed char __a,vector signed char __b)12143 vec_any_eq(vector signed char __a, vector signed char __b)
12144 {
12145 return
12146 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12147 }
12148
12149 static int __ATTRS_o_ai
vec_any_eq(vector signed char __a,vector bool char __b)12150 vec_any_eq(vector signed char __a, vector bool char __b)
12151 {
12152 return
12153 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12154 }
12155
12156 static int __ATTRS_o_ai
vec_any_eq(vector unsigned char __a,vector unsigned char __b)12157 vec_any_eq(vector unsigned char __a, vector unsigned char __b)
12158 {
12159 return
12160 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12161 }
12162
12163 static int __ATTRS_o_ai
vec_any_eq(vector unsigned char __a,vector bool char __b)12164 vec_any_eq(vector unsigned char __a, vector bool char __b)
12165 {
12166 return
12167 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12168 }
12169
12170 static int __ATTRS_o_ai
vec_any_eq(vector bool char __a,vector signed char __b)12171 vec_any_eq(vector bool char __a, vector signed char __b)
12172 {
12173 return
12174 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12175 }
12176
12177 static int __ATTRS_o_ai
vec_any_eq(vector bool char __a,vector unsigned char __b)12178 vec_any_eq(vector bool char __a, vector unsigned char __b)
12179 {
12180 return
12181 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12182 }
12183
12184 static int __ATTRS_o_ai
vec_any_eq(vector bool char __a,vector bool char __b)12185 vec_any_eq(vector bool char __a, vector bool char __b)
12186 {
12187 return
12188 __builtin_altivec_vcmpequb_p(__CR6_EQ_REV, (vector char)__a, (vector char)__b);
12189 }
12190
12191 static int __ATTRS_o_ai
vec_any_eq(vector short __a,vector short __b)12192 vec_any_eq(vector short __a, vector short __b)
12193 {
12194 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, __b);
12195 }
12196
12197 static int __ATTRS_o_ai
vec_any_eq(vector short __a,vector bool short __b)12198 vec_any_eq(vector short __a, vector bool short __b)
12199 {
12200 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV, __a, (vector short)__b);
12201 }
12202
12203 static int __ATTRS_o_ai
vec_any_eq(vector unsigned short __a,vector unsigned short __b)12204 vec_any_eq(vector unsigned short __a, vector unsigned short __b)
12205 {
12206 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12207 (vector short)__a,
12208 (vector short)__b);
12209 }
12210
12211 static int __ATTRS_o_ai
vec_any_eq(vector unsigned short __a,vector bool short __b)12212 vec_any_eq(vector unsigned short __a, vector bool short __b)
12213 {
12214 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12215 (vector short)__a,
12216 (vector short)__b);
12217 }
12218
12219 static int __ATTRS_o_ai
vec_any_eq(vector bool short __a,vector short __b)12220 vec_any_eq(vector bool short __a, vector short __b)
12221 {
12222 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12223 (vector short)__a,
12224 (vector short)__b);
12225 }
12226
12227 static int __ATTRS_o_ai
vec_any_eq(vector bool short __a,vector unsigned short __b)12228 vec_any_eq(vector bool short __a, vector unsigned short __b)
12229 {
12230 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12231 (vector short)__a,
12232 (vector short)__b);
12233 }
12234
12235 static int __ATTRS_o_ai
vec_any_eq(vector bool short __a,vector bool short __b)12236 vec_any_eq(vector bool short __a, vector bool short __b)
12237 {
12238 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12239 (vector short)__a,
12240 (vector short)__b);
12241 }
12242
12243 static int __ATTRS_o_ai
vec_any_eq(vector pixel __a,vector pixel __b)12244 vec_any_eq(vector pixel __a, vector pixel __b)
12245 {
12246 return __builtin_altivec_vcmpequh_p(__CR6_EQ_REV,
12247 (vector short)__a,
12248 (vector short)__b);
12249 }
12250
12251 static int __ATTRS_o_ai
vec_any_eq(vector int __a,vector int __b)12252 vec_any_eq(vector int __a, vector int __b)
12253 {
12254 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, __b);
12255 }
12256
12257 static int __ATTRS_o_ai
vec_any_eq(vector int __a,vector bool int __b)12258 vec_any_eq(vector int __a, vector bool int __b)
12259 {
12260 return __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, __a, (vector int)__b);
12261 }
12262
12263 static int __ATTRS_o_ai
vec_any_eq(vector unsigned int __a,vector unsigned int __b)12264 vec_any_eq(vector unsigned int __a, vector unsigned int __b)
12265 {
12266 return
12267 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
12268 }
12269
12270 static int __ATTRS_o_ai
vec_any_eq(vector unsigned int __a,vector bool int __b)12271 vec_any_eq(vector unsigned int __a, vector bool int __b)
12272 {
12273 return
12274 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
12275 }
12276
12277 static int __ATTRS_o_ai
vec_any_eq(vector bool int __a,vector int __b)12278 vec_any_eq(vector bool int __a, vector int __b)
12279 {
12280 return
12281 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
12282 }
12283
12284 static int __ATTRS_o_ai
vec_any_eq(vector bool int __a,vector unsigned int __b)12285 vec_any_eq(vector bool int __a, vector unsigned int __b)
12286 {
12287 return
12288 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
12289 }
12290
12291 static int __ATTRS_o_ai
vec_any_eq(vector bool int __a,vector bool int __b)12292 vec_any_eq(vector bool int __a, vector bool int __b)
12293 {
12294 return
12295 __builtin_altivec_vcmpequw_p(__CR6_EQ_REV, (vector int)__a, (vector int)__b);
12296 }
12297
12298 #ifdef __POWER8_VECTOR__
12299 static int __ATTRS_o_ai
vec_any_eq(vector signed long long __a,vector signed long long __b)12300 vec_any_eq(vector signed long long __a, vector signed long long __b)
12301 {
12302 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a, __b);
12303 }
12304
12305 static int __ATTRS_o_ai
vec_any_eq(vector unsigned long long __a,vector unsigned long long __b)12306 vec_any_eq(vector unsigned long long __a, vector unsigned long long __b)
12307 {
12308 return
12309 __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector long long)__a,
12310 (vector long long)__b);
12311 }
12312
12313 static int __ATTRS_o_ai
vec_any_eq(vector signed long long __a,vector bool long long __b)12314 vec_any_eq(vector signed long long __a, vector bool long long __b)
12315 {
12316 return __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, __a,
12317 (vector signed long long)__b);
12318 }
12319
12320 static int __ATTRS_o_ai
vec_any_eq(vector unsigned long long __a,vector bool long long __b)12321 vec_any_eq(vector unsigned long long __a, vector bool long long __b)
12322 {
12323 return
12324 __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a,
12325 (vector signed long long)__b);
12326 }
12327
12328 static int __ATTRS_o_ai
vec_any_eq(vector bool long long __a,vector signed long long __b)12329 vec_any_eq(vector bool long long __a, vector signed long long __b)
12330 {
12331 return
12332 __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a,
12333 (vector signed long long)__b);
12334 }
12335
12336 static int __ATTRS_o_ai
vec_any_eq(vector bool long long __a,vector unsigned long long __b)12337 vec_any_eq(vector bool long long __a, vector unsigned long long __b)
12338 {
12339 return
12340 __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a,
12341 (vector signed long long)__b);
12342 }
12343
12344 static int __ATTRS_o_ai
vec_any_eq(vector bool long long __a,vector bool long long __b)12345 vec_any_eq(vector bool long long __a, vector bool long long __b)
12346 {
12347 return
12348 __builtin_altivec_vcmpequd_p(__CR6_EQ_REV, (vector signed long long)__a,
12349 (vector signed long long)__b);
12350 }
12351 #endif
12352
12353 static int __ATTRS_o_ai
vec_any_eq(vector float __a,vector float __b)12354 vec_any_eq(vector float __a, vector float __b)
12355 {
12356 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __b);
12357 }
12358
12359 /* vec_any_ge */
12360
12361 static int __ATTRS_o_ai
vec_any_ge(vector signed char __a,vector signed char __b)12362 vec_any_ge(vector signed char __a, vector signed char __b)
12363 {
12364 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __b, __a);
12365 }
12366
12367 static int __ATTRS_o_ai
vec_any_ge(vector signed char __a,vector bool char __b)12368 vec_any_ge(vector signed char __a, vector bool char __b)
12369 {
12370 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, (vector signed char)__b, __a);
12371 }
12372
12373 static int __ATTRS_o_ai
vec_any_ge(vector unsigned char __a,vector unsigned char __b)12374 vec_any_ge(vector unsigned char __a, vector unsigned char __b)
12375 {
12376 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, __a);
12377 }
12378
12379 static int __ATTRS_o_ai
vec_any_ge(vector unsigned char __a,vector bool char __b)12380 vec_any_ge(vector unsigned char __a, vector bool char __b)
12381 {
12382 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__b, __a);
12383 }
12384
12385 static int __ATTRS_o_ai
vec_any_ge(vector bool char __a,vector signed char __b)12386 vec_any_ge(vector bool char __a, vector signed char __b)
12387 {
12388 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
12389 (vector unsigned char)__b,
12390 (vector unsigned char)__a);
12391 }
12392
12393 static int __ATTRS_o_ai
vec_any_ge(vector bool char __a,vector unsigned char __b)12394 vec_any_ge(vector bool char __a, vector unsigned char __b)
12395 {
12396 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __b, (vector unsigned char)__a);
12397 }
12398
12399 static int __ATTRS_o_ai
vec_any_ge(vector bool char __a,vector bool char __b)12400 vec_any_ge(vector bool char __a, vector bool char __b)
12401 {
12402 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
12403 (vector unsigned char)__b,
12404 (vector unsigned char)__a);
12405 }
12406
12407 static int __ATTRS_o_ai
vec_any_ge(vector short __a,vector short __b)12408 vec_any_ge(vector short __a, vector short __b)
12409 {
12410 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __b, __a);
12411 }
12412
12413 static int __ATTRS_o_ai
vec_any_ge(vector short __a,vector bool short __b)12414 vec_any_ge(vector short __a, vector bool short __b)
12415 {
12416 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, (vector short)__b, __a);
12417 }
12418
12419 static int __ATTRS_o_ai
vec_any_ge(vector unsigned short __a,vector unsigned short __b)12420 vec_any_ge(vector unsigned short __a, vector unsigned short __b)
12421 {
12422 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, __a);
12423 }
12424
12425 static int __ATTRS_o_ai
vec_any_ge(vector unsigned short __a,vector bool short __b)12426 vec_any_ge(vector unsigned short __a, vector bool short __b)
12427 {
12428 return
12429 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__b, __a);
12430 }
12431
12432 static int __ATTRS_o_ai
vec_any_ge(vector bool short __a,vector short __b)12433 vec_any_ge(vector bool short __a, vector short __b)
12434 {
12435 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
12436 (vector unsigned short)__b,
12437 (vector unsigned short)__a);
12438 }
12439
12440 static int __ATTRS_o_ai
vec_any_ge(vector bool short __a,vector unsigned short __b)12441 vec_any_ge(vector bool short __a, vector unsigned short __b)
12442 {
12443 return
12444 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __b, (vector unsigned short)__a);
12445 }
12446
12447 static int __ATTRS_o_ai
vec_any_ge(vector bool short __a,vector bool short __b)12448 vec_any_ge(vector bool short __a, vector bool short __b)
12449 {
12450 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
12451 (vector unsigned short)__b,
12452 (vector unsigned short)__a);
12453 }
12454
12455 static int __ATTRS_o_ai
vec_any_ge(vector int __a,vector int __b)12456 vec_any_ge(vector int __a, vector int __b)
12457 {
12458 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __b, __a);
12459 }
12460
12461 static int __ATTRS_o_ai
vec_any_ge(vector int __a,vector bool int __b)12462 vec_any_ge(vector int __a, vector bool int __b)
12463 {
12464 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, (vector int)__b, __a);
12465 }
12466
12467 static int __ATTRS_o_ai
vec_any_ge(vector unsigned int __a,vector unsigned int __b)12468 vec_any_ge(vector unsigned int __a, vector unsigned int __b)
12469 {
12470 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, __a);
12471 }
12472
12473 static int __ATTRS_o_ai
vec_any_ge(vector unsigned int __a,vector bool int __b)12474 vec_any_ge(vector unsigned int __a, vector bool int __b)
12475 {
12476 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__b, __a);
12477 }
12478
12479 static int __ATTRS_o_ai
vec_any_ge(vector bool int __a,vector int __b)12480 vec_any_ge(vector bool int __a, vector int __b)
12481 {
12482 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
12483 (vector unsigned int)__b,
12484 (vector unsigned int)__a);
12485 }
12486
12487 static int __ATTRS_o_ai
vec_any_ge(vector bool int __a,vector unsigned int __b)12488 vec_any_ge(vector bool int __a, vector unsigned int __b)
12489 {
12490 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __b, (vector unsigned int)__a);
12491 }
12492
12493 static int __ATTRS_o_ai
vec_any_ge(vector bool int __a,vector bool int __b)12494 vec_any_ge(vector bool int __a, vector bool int __b)
12495 {
12496 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
12497 (vector unsigned int)__b,
12498 (vector unsigned int)__a);
12499 }
12500
12501 #ifdef __POWER8_VECTOR__
12502 static int __ATTRS_o_ai
vec_any_ge(vector signed long long __a,vector signed long long __b)12503 vec_any_ge(vector signed long long __a, vector signed long long __b)
12504 {
12505 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __b, __a);
12506 }
12507
12508 static int __ATTRS_o_ai
vec_any_ge(vector unsigned long long __a,vector unsigned long long __b)12509 vec_any_ge(vector unsigned long long __a, vector unsigned long long __b)
12510 {
12511 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b, __a);
12512 }
12513
12514 static int __ATTRS_o_ai
vec_any_ge(vector signed long long __a,vector bool long long __b)12515 vec_any_ge(vector signed long long __a, vector bool long long __b)
12516 {
12517 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV,
12518 (vector signed long long)__b, __a);
12519 }
12520
12521 static int __ATTRS_o_ai
vec_any_ge(vector unsigned long long __a,vector bool long long __b)12522 vec_any_ge(vector unsigned long long __a, vector bool long long __b)
12523 {
12524 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12525 (vector unsigned long long)__b, __a);
12526 }
12527
12528 static int __ATTRS_o_ai
vec_any_ge(vector bool long long __a,vector signed long long __b)12529 vec_any_ge(vector bool long long __a, vector signed long long __b)
12530 {
12531 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12532 (vector unsigned long long)__b,
12533 (vector unsigned long long)__a);
12534 }
12535
12536 static int __ATTRS_o_ai
vec_any_ge(vector bool long long __a,vector unsigned long long __b)12537 vec_any_ge(vector bool long long __a, vector unsigned long long __b)
12538 {
12539 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __b,
12540 (vector unsigned long long)__a);
12541 }
12542
12543 static int __ATTRS_o_ai
vec_any_ge(vector bool long long __a,vector bool long long __b)12544 vec_any_ge(vector bool long long __a, vector bool long long __b)
12545 {
12546 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12547 (vector unsigned long long)__b,
12548 (vector unsigned long long)__a);
12549 }
12550 #endif
12551
12552 static int __ATTRS_o_ai
vec_any_ge(vector float __a,vector float __b)12553 vec_any_ge(vector float __a, vector float __b)
12554 {
12555 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __a, __b);
12556 }
12557
12558 /* vec_any_gt */
12559
12560 static int __ATTRS_o_ai
vec_any_gt(vector signed char __a,vector signed char __b)12561 vec_any_gt(vector signed char __a, vector signed char __b)
12562 {
12563 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, __b);
12564 }
12565
12566 static int __ATTRS_o_ai
vec_any_gt(vector signed char __a,vector bool char __b)12567 vec_any_gt(vector signed char __a, vector bool char __b)
12568 {
12569 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __a, (vector signed char)__b);
12570 }
12571
12572 static int __ATTRS_o_ai
vec_any_gt(vector unsigned char __a,vector unsigned char __b)12573 vec_any_gt(vector unsigned char __a, vector unsigned char __b)
12574 {
12575 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, __b);
12576 }
12577
12578 static int __ATTRS_o_ai
vec_any_gt(vector unsigned char __a,vector bool char __b)12579 vec_any_gt(vector unsigned char __a, vector bool char __b)
12580 {
12581 return
12582 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __a, (vector unsigned char)__b);
12583 }
12584
12585 static int __ATTRS_o_ai
vec_any_gt(vector bool char __a,vector signed char __b)12586 vec_any_gt(vector bool char __a, vector signed char __b)
12587 {
12588 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
12589 (vector unsigned char)__a,
12590 (vector unsigned char)__b);
12591 }
12592
12593 static int __ATTRS_o_ai
vec_any_gt(vector bool char __a,vector unsigned char __b)12594 vec_any_gt(vector bool char __a, vector unsigned char __b)
12595 {
12596 return
12597 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__a, __b);
12598 }
12599
12600 static int __ATTRS_o_ai
vec_any_gt(vector bool char __a,vector bool char __b)12601 vec_any_gt(vector bool char __a, vector bool char __b)
12602 {
12603 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
12604 (vector unsigned char)__a,
12605 (vector unsigned char)__b);
12606 }
12607
12608 static int __ATTRS_o_ai
vec_any_gt(vector short __a,vector short __b)12609 vec_any_gt(vector short __a, vector short __b)
12610 {
12611 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, __b);
12612 }
12613
12614 static int __ATTRS_o_ai
vec_any_gt(vector short __a,vector bool short __b)12615 vec_any_gt(vector short __a, vector bool short __b)
12616 {
12617 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __a, (vector short)__b);
12618 }
12619
12620 static int __ATTRS_o_ai
vec_any_gt(vector unsigned short __a,vector unsigned short __b)12621 vec_any_gt(vector unsigned short __a, vector unsigned short __b)
12622 {
12623 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, __b);
12624 }
12625
12626 static int __ATTRS_o_ai
vec_any_gt(vector unsigned short __a,vector bool short __b)12627 vec_any_gt(vector unsigned short __a, vector bool short __b)
12628 {
12629 return
12630 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __a, (vector unsigned short)__b);
12631 }
12632
12633 static int __ATTRS_o_ai
vec_any_gt(vector bool short __a,vector short __b)12634 vec_any_gt(vector bool short __a, vector short __b)
12635 {
12636 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
12637 (vector unsigned short)__a,
12638 (vector unsigned short)__b);
12639 }
12640
12641 static int __ATTRS_o_ai
vec_any_gt(vector bool short __a,vector unsigned short __b)12642 vec_any_gt(vector bool short __a, vector unsigned short __b)
12643 {
12644 return
12645 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__a, __b);
12646 }
12647
12648 static int __ATTRS_o_ai
vec_any_gt(vector bool short __a,vector bool short __b)12649 vec_any_gt(vector bool short __a, vector bool short __b)
12650 {
12651 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
12652 (vector unsigned short)__a,
12653 (vector unsigned short)__b);
12654 }
12655
12656 static int __ATTRS_o_ai
vec_any_gt(vector int __a,vector int __b)12657 vec_any_gt(vector int __a, vector int __b)
12658 {
12659 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, __b);
12660 }
12661
12662 static int __ATTRS_o_ai
vec_any_gt(vector int __a,vector bool int __b)12663 vec_any_gt(vector int __a, vector bool int __b)
12664 {
12665 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __a, (vector int)__b);
12666 }
12667
12668 static int __ATTRS_o_ai
vec_any_gt(vector unsigned int __a,vector unsigned int __b)12669 vec_any_gt(vector unsigned int __a, vector unsigned int __b)
12670 {
12671 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, __b);
12672 }
12673
12674 static int __ATTRS_o_ai
vec_any_gt(vector unsigned int __a,vector bool int __b)12675 vec_any_gt(vector unsigned int __a, vector bool int __b)
12676 {
12677 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __a, (vector unsigned int)__b);
12678 }
12679
12680 static int __ATTRS_o_ai
vec_any_gt(vector bool int __a,vector int __b)12681 vec_any_gt(vector bool int __a, vector int __b)
12682 {
12683 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
12684 (vector unsigned int)__a,
12685 (vector unsigned int)__b);
12686 }
12687
12688 static int __ATTRS_o_ai
vec_any_gt(vector bool int __a,vector unsigned int __b)12689 vec_any_gt(vector bool int __a, vector unsigned int __b)
12690 {
12691 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__a, __b);
12692 }
12693
12694 static int __ATTRS_o_ai
vec_any_gt(vector bool int __a,vector bool int __b)12695 vec_any_gt(vector bool int __a, vector bool int __b)
12696 {
12697 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
12698 (vector unsigned int)__a,
12699 (vector unsigned int)__b);
12700 }
12701
12702 #ifdef __POWER8_VECTOR__
12703 static int __ATTRS_o_ai
vec_any_gt(vector signed long long __a,vector signed long long __b)12704 vec_any_gt(vector signed long long __a, vector signed long long __b)
12705 {
12706 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a, __b);
12707 }
12708
12709 static int __ATTRS_o_ai
vec_any_gt(vector unsigned long long __a,vector unsigned long long __b)12710 vec_any_gt(vector unsigned long long __a, vector unsigned long long __b)
12711 {
12712 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a, __b);
12713 }
12714
12715 static int __ATTRS_o_ai
vec_any_gt(vector signed long long __a,vector bool long long __b)12716 vec_any_gt(vector signed long long __a, vector bool long long __b)
12717 {
12718 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __a,
12719 (vector signed long long)__b);
12720 }
12721
12722
12723 static int __ATTRS_o_ai
vec_any_gt(vector unsigned long long __a,vector bool long long __b)12724 vec_any_gt(vector unsigned long long __a, vector bool long long __b)
12725 {
12726 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __a,
12727 (vector unsigned long long)__b);
12728 }
12729
12730 static int __ATTRS_o_ai
vec_any_gt(vector bool long long __a,vector signed long long __b)12731 vec_any_gt(vector bool long long __a, vector signed long long __b)
12732 {
12733 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12734 (vector unsigned long long)__a,
12735 (vector unsigned long long)__b);
12736 }
12737
12738 static int __ATTRS_o_ai
vec_any_gt(vector bool long long __a,vector unsigned long long __b)12739 vec_any_gt(vector bool long long __a, vector unsigned long long __b)
12740 {
12741 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12742 (vector unsigned long long)__a, __b);
12743 }
12744
12745 static int __ATTRS_o_ai
vec_any_gt(vector bool long long __a,vector bool long long __b)12746 vec_any_gt(vector bool long long __a, vector bool long long __b)
12747 {
12748 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
12749 (vector unsigned long long)__a,
12750 (vector unsigned long long)__b);
12751 }
12752 #endif
12753
12754 static int __ATTRS_o_ai
vec_any_gt(vector float __a,vector float __b)12755 vec_any_gt(vector float __a, vector float __b)
12756 {
12757 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __a, __b);
12758 }
12759
12760 /* vec_any_le */
12761
12762 static int __ATTRS_o_ai
vec_any_le(vector signed char __a,vector signed char __b)12763 vec_any_le(vector signed char __a, vector signed char __b)
12764 {
12765 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, __b);
12766 }
12767
12768 static int __ATTRS_o_ai
vec_any_le(vector signed char __a,vector bool char __b)12769 vec_any_le(vector signed char __a, vector bool char __b)
12770 {
12771 return __builtin_altivec_vcmpgtsb_p(__CR6_LT_REV, __a, (vector signed char)__b);
12772 }
12773
12774 static int __ATTRS_o_ai
vec_any_le(vector unsigned char __a,vector unsigned char __b)12775 vec_any_le(vector unsigned char __a, vector unsigned char __b)
12776 {
12777 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, __b);
12778 }
12779
12780 static int __ATTRS_o_ai
vec_any_le(vector unsigned char __a,vector bool char __b)12781 vec_any_le(vector unsigned char __a, vector bool char __b)
12782 {
12783 return
12784 __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, __a, (vector unsigned char)__b);
12785 }
12786
12787 static int __ATTRS_o_ai
vec_any_le(vector bool char __a,vector signed char __b)12788 vec_any_le(vector bool char __a, vector signed char __b)
12789 {
12790 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
12791 (vector unsigned char)__a,
12792 (vector unsigned char)__b);
12793 }
12794
12795 static int __ATTRS_o_ai
vec_any_le(vector bool char __a,vector unsigned char __b)12796 vec_any_le(vector bool char __a, vector unsigned char __b)
12797 {
12798 return
12799 __builtin_altivec_vcmpgtub_p(__CR6_LT_REV, (vector unsigned char)__a, __b);
12800 }
12801
12802 static int __ATTRS_o_ai
vec_any_le(vector bool char __a,vector bool char __b)12803 vec_any_le(vector bool char __a, vector bool char __b)
12804 {
12805 return __builtin_altivec_vcmpgtub_p(__CR6_LT_REV,
12806 (vector unsigned char)__a,
12807 (vector unsigned char)__b);
12808 }
12809
12810 static int __ATTRS_o_ai
vec_any_le(vector short __a,vector short __b)12811 vec_any_le(vector short __a, vector short __b)
12812 {
12813 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, __b);
12814 }
12815
12816 static int __ATTRS_o_ai
vec_any_le(vector short __a,vector bool short __b)12817 vec_any_le(vector short __a, vector bool short __b)
12818 {
12819 return __builtin_altivec_vcmpgtsh_p(__CR6_LT_REV, __a, (vector short)__b);
12820 }
12821
12822 static int __ATTRS_o_ai
vec_any_le(vector unsigned short __a,vector unsigned short __b)12823 vec_any_le(vector unsigned short __a, vector unsigned short __b)
12824 {
12825 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, __b);
12826 }
12827
12828 static int __ATTRS_o_ai
vec_any_le(vector unsigned short __a,vector bool short __b)12829 vec_any_le(vector unsigned short __a, vector bool short __b)
12830 {
12831 return
12832 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, __a, (vector unsigned short)__b);
12833 }
12834
12835 static int __ATTRS_o_ai
vec_any_le(vector bool short __a,vector short __b)12836 vec_any_le(vector bool short __a, vector short __b)
12837 {
12838 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
12839 (vector unsigned short)__a,
12840 (vector unsigned short)__b);
12841 }
12842
12843 static int __ATTRS_o_ai
vec_any_le(vector bool short __a,vector unsigned short __b)12844 vec_any_le(vector bool short __a, vector unsigned short __b)
12845 {
12846 return
12847 __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV, (vector unsigned short)__a, __b);
12848 }
12849
12850 static int __ATTRS_o_ai
vec_any_le(vector bool short __a,vector bool short __b)12851 vec_any_le(vector bool short __a, vector bool short __b)
12852 {
12853 return __builtin_altivec_vcmpgtuh_p(__CR6_LT_REV,
12854 (vector unsigned short)__a,
12855 (vector unsigned short)__b);
12856 }
12857
12858 static int __ATTRS_o_ai
vec_any_le(vector int __a,vector int __b)12859 vec_any_le(vector int __a, vector int __b)
12860 {
12861 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, __b);
12862 }
12863
12864 static int __ATTRS_o_ai
vec_any_le(vector int __a,vector bool int __b)12865 vec_any_le(vector int __a, vector bool int __b)
12866 {
12867 return __builtin_altivec_vcmpgtsw_p(__CR6_LT_REV, __a, (vector int)__b);
12868 }
12869
12870 static int __ATTRS_o_ai
vec_any_le(vector unsigned int __a,vector unsigned int __b)12871 vec_any_le(vector unsigned int __a, vector unsigned int __b)
12872 {
12873 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, __b);
12874 }
12875
12876 static int __ATTRS_o_ai
vec_any_le(vector unsigned int __a,vector bool int __b)12877 vec_any_le(vector unsigned int __a, vector bool int __b)
12878 {
12879 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, __a, (vector unsigned int)__b);
12880 }
12881
12882 static int __ATTRS_o_ai
vec_any_le(vector bool int __a,vector int __b)12883 vec_any_le(vector bool int __a, vector int __b)
12884 {
12885 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
12886 (vector unsigned int)__a,
12887 (vector unsigned int)__b);
12888 }
12889
12890 static int __ATTRS_o_ai
vec_any_le(vector bool int __a,vector unsigned int __b)12891 vec_any_le(vector bool int __a, vector unsigned int __b)
12892 {
12893 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV, (vector unsigned int)__a, __b);
12894 }
12895
12896 static int __ATTRS_o_ai
vec_any_le(vector bool int __a,vector bool int __b)12897 vec_any_le(vector bool int __a, vector bool int __b)
12898 {
12899 return __builtin_altivec_vcmpgtuw_p(__CR6_LT_REV,
12900 (vector unsigned int)__a,
12901 (vector unsigned int)__b);
12902 }
12903
12904 #ifdef __POWER8_VECTOR__
12905 static int __ATTRS_o_ai
vec_any_le(vector signed long long __a,vector signed long long __b)12906 vec_any_le(vector signed long long __a, vector signed long long __b)
12907 {
12908 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a, __b);
12909 }
12910
12911 static int __ATTRS_o_ai
vec_any_le(vector unsigned long long __a,vector unsigned long long __b)12912 vec_any_le(vector unsigned long long __a, vector unsigned long long __b)
12913 {
12914 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a, __b);
12915 }
12916
12917 static int __ATTRS_o_ai
vec_any_le(vector signed long long __a,vector bool long long __b)12918 vec_any_le(vector signed long long __a, vector bool long long __b)
12919 {
12920 return __builtin_altivec_vcmpgtsd_p(__CR6_LT_REV, __a,
12921 (vector signed long long)__b);
12922 }
12923
12924 static int __ATTRS_o_ai
vec_any_le(vector unsigned long long __a,vector bool long long __b)12925 vec_any_le(vector unsigned long long __a, vector bool long long __b)
12926 {
12927 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV, __a,
12928 (vector unsigned long long)__b);
12929 }
12930
12931 static int __ATTRS_o_ai
vec_any_le(vector bool long long __a,vector signed long long __b)12932 vec_any_le(vector bool long long __a, vector signed long long __b)
12933 {
12934 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12935 (vector unsigned long long)__a,
12936 (vector unsigned long long)__b);
12937 }
12938
12939 static int __ATTRS_o_ai
vec_any_le(vector bool long long __a,vector unsigned long long __b)12940 vec_any_le(vector bool long long __a, vector unsigned long long __b)
12941 {
12942 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12943 (vector unsigned long long)__a, __b);
12944 }
12945
12946 static int __ATTRS_o_ai
vec_any_le(vector bool long long __a,vector bool long long __b)12947 vec_any_le(vector bool long long __a, vector bool long long __b)
12948 {
12949 return __builtin_altivec_vcmpgtud_p(__CR6_LT_REV,
12950 (vector unsigned long long)__a,
12951 (vector unsigned long long)__b);
12952 }
12953 #endif
12954
12955 static int __ATTRS_o_ai
vec_any_le(vector float __a,vector float __b)12956 vec_any_le(vector float __a, vector float __b)
12957 {
12958 return __builtin_altivec_vcmpgefp_p(__CR6_EQ_REV, __b, __a);
12959 }
12960
12961 /* vec_any_lt */
12962
12963 static int __ATTRS_o_ai
vec_any_lt(vector signed char __a,vector signed char __b)12964 vec_any_lt(vector signed char __a, vector signed char __b)
12965 {
12966 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, __b, __a);
12967 }
12968
12969 static int __ATTRS_o_ai
vec_any_lt(vector signed char __a,vector bool char __b)12970 vec_any_lt(vector signed char __a, vector bool char __b)
12971 {
12972 return __builtin_altivec_vcmpgtsb_p(__CR6_EQ_REV, (vector signed char)__b, __a);
12973 }
12974
12975 static int __ATTRS_o_ai
vec_any_lt(vector unsigned char __a,vector unsigned char __b)12976 vec_any_lt(vector unsigned char __a, vector unsigned char __b)
12977 {
12978 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, __a);
12979 }
12980
12981 static int __ATTRS_o_ai
vec_any_lt(vector unsigned char __a,vector bool char __b)12982 vec_any_lt(vector unsigned char __a, vector bool char __b)
12983 {
12984 return
12985 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, (vector unsigned char)__b, __a);
12986 }
12987
12988 static int __ATTRS_o_ai
vec_any_lt(vector bool char __a,vector signed char __b)12989 vec_any_lt(vector bool char __a, vector signed char __b)
12990 {
12991 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
12992 (vector unsigned char)__b,
12993 (vector unsigned char)__a);
12994 }
12995
12996 static int __ATTRS_o_ai
vec_any_lt(vector bool char __a,vector unsigned char __b)12997 vec_any_lt(vector bool char __a, vector unsigned char __b)
12998 {
12999 return
13000 __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV, __b, (vector unsigned char)__a);
13001 }
13002
13003 static int __ATTRS_o_ai
vec_any_lt(vector bool char __a,vector bool char __b)13004 vec_any_lt(vector bool char __a, vector bool char __b)
13005 {
13006 return __builtin_altivec_vcmpgtub_p(__CR6_EQ_REV,
13007 (vector unsigned char)__b,
13008 (vector unsigned char)__a);
13009 }
13010
13011 static int __ATTRS_o_ai
vec_any_lt(vector short __a,vector short __b)13012 vec_any_lt(vector short __a, vector short __b)
13013 {
13014 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, __b, __a);
13015 }
13016
13017 static int __ATTRS_o_ai
vec_any_lt(vector short __a,vector bool short __b)13018 vec_any_lt(vector short __a, vector bool short __b)
13019 {
13020 return __builtin_altivec_vcmpgtsh_p(__CR6_EQ_REV, (vector short)__b, __a);
13021 }
13022
13023 static int __ATTRS_o_ai
vec_any_lt(vector unsigned short __a,vector unsigned short __b)13024 vec_any_lt(vector unsigned short __a, vector unsigned short __b)
13025 {
13026 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, __a);
13027 }
13028
13029 static int __ATTRS_o_ai
vec_any_lt(vector unsigned short __a,vector bool short __b)13030 vec_any_lt(vector unsigned short __a, vector bool short __b)
13031 {
13032 return
13033 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, (vector unsigned short)__b, __a);
13034 }
13035
13036 static int __ATTRS_o_ai
vec_any_lt(vector bool short __a,vector short __b)13037 vec_any_lt(vector bool short __a, vector short __b)
13038 {
13039 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
13040 (vector unsigned short)__b,
13041 (vector unsigned short)__a);
13042 }
13043
13044 static int __ATTRS_o_ai
vec_any_lt(vector bool short __a,vector unsigned short __b)13045 vec_any_lt(vector bool short __a, vector unsigned short __b)
13046 {
13047 return
13048 __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV, __b, (vector unsigned short)__a);
13049 }
13050
13051 static int __ATTRS_o_ai
vec_any_lt(vector bool short __a,vector bool short __b)13052 vec_any_lt(vector bool short __a, vector bool short __b)
13053 {
13054 return __builtin_altivec_vcmpgtuh_p(__CR6_EQ_REV,
13055 (vector unsigned short)__b,
13056 (vector unsigned short)__a);
13057 }
13058
13059 static int __ATTRS_o_ai
vec_any_lt(vector int __a,vector int __b)13060 vec_any_lt(vector int __a, vector int __b)
13061 {
13062 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, __b, __a);
13063 }
13064
13065 static int __ATTRS_o_ai
vec_any_lt(vector int __a,vector bool int __b)13066 vec_any_lt(vector int __a, vector bool int __b)
13067 {
13068 return __builtin_altivec_vcmpgtsw_p(__CR6_EQ_REV, (vector int)__b, __a);
13069 }
13070
13071 static int __ATTRS_o_ai
vec_any_lt(vector unsigned int __a,vector unsigned int __b)13072 vec_any_lt(vector unsigned int __a, vector unsigned int __b)
13073 {
13074 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, __a);
13075 }
13076
13077 static int __ATTRS_o_ai
vec_any_lt(vector unsigned int __a,vector bool int __b)13078 vec_any_lt(vector unsigned int __a, vector bool int __b)
13079 {
13080 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, (vector unsigned int)__b, __a);
13081 }
13082
13083 static int __ATTRS_o_ai
vec_any_lt(vector bool int __a,vector int __b)13084 vec_any_lt(vector bool int __a, vector int __b)
13085 {
13086 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
13087 (vector unsigned int)__b,
13088 (vector unsigned int)__a);
13089 }
13090
13091 static int __ATTRS_o_ai
vec_any_lt(vector bool int __a,vector unsigned int __b)13092 vec_any_lt(vector bool int __a, vector unsigned int __b)
13093 {
13094 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV, __b, (vector unsigned int)__a);
13095 }
13096
13097 static int __ATTRS_o_ai
vec_any_lt(vector bool int __a,vector bool int __b)13098 vec_any_lt(vector bool int __a, vector bool int __b)
13099 {
13100 return __builtin_altivec_vcmpgtuw_p(__CR6_EQ_REV,
13101 (vector unsigned int)__b,
13102 (vector unsigned int)__a);
13103 }
13104
13105 #ifdef __POWER8_VECTOR__
13106 static int __ATTRS_o_ai
vec_any_lt(vector signed long long __a,vector signed long long __b)13107 vec_any_lt(vector signed long long __a, vector signed long long __b)
13108 {
13109 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV, __b, __a);
13110 }
13111
13112 static int __ATTRS_o_ai
vec_any_lt(vector unsigned long long __a,vector unsigned long long __b)13113 vec_any_lt(vector unsigned long long __a, vector unsigned long long __b)
13114 {
13115 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b, __a);
13116 }
13117
13118 static int __ATTRS_o_ai
vec_any_lt(vector signed long long __a,vector bool long long __b)13119 vec_any_lt(vector signed long long __a, vector bool long long __b)
13120 {
13121 return __builtin_altivec_vcmpgtsd_p(__CR6_EQ_REV,
13122 (vector signed long long)__b, __a);
13123 }
13124
13125 static int __ATTRS_o_ai
vec_any_lt(vector unsigned long long __a,vector bool long long __b)13126 vec_any_lt(vector unsigned long long __a, vector bool long long __b)
13127 {
13128 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13129 (vector unsigned long long)__b, __a);
13130 }
13131
13132 static int __ATTRS_o_ai
vec_any_lt(vector bool long long __a,vector signed long long __b)13133 vec_any_lt(vector bool long long __a, vector signed long long __b)
13134 {
13135 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13136 (vector unsigned long long)__b,
13137 (vector unsigned long long)__a);
13138 }
13139
13140 static int __ATTRS_o_ai
vec_any_lt(vector bool long long __a,vector unsigned long long __b)13141 vec_any_lt(vector bool long long __a, vector unsigned long long __b)
13142 {
13143 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV, __b,
13144 (vector unsigned long long)__a);
13145 }
13146
13147 static int __ATTRS_o_ai
vec_any_lt(vector bool long long __a,vector bool long long __b)13148 vec_any_lt(vector bool long long __a, vector bool long long __b)
13149 {
13150 return __builtin_altivec_vcmpgtud_p(__CR6_EQ_REV,
13151 (vector unsigned long long)__b,
13152 (vector unsigned long long)__a);
13153 }
13154 #endif
13155
13156 static int __ATTRS_o_ai
vec_any_lt(vector float __a,vector float __b)13157 vec_any_lt(vector float __a, vector float __b)
13158 {
13159 return __builtin_altivec_vcmpgtfp_p(__CR6_EQ_REV, __b, __a);
13160 }
13161
13162 /* vec_any_nan */
13163
13164 static int __attribute__((__always_inline__))
vec_any_nan(vector float __a)13165 vec_any_nan(vector float __a)
13166 {
13167 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __a);
13168 }
13169
13170 /* vec_any_ne */
13171
13172 static int __ATTRS_o_ai
vec_any_ne(vector signed char __a,vector signed char __b)13173 vec_any_ne(vector signed char __a, vector signed char __b)
13174 {
13175 return
13176 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13177 }
13178
13179 static int __ATTRS_o_ai
vec_any_ne(vector signed char __a,vector bool char __b)13180 vec_any_ne(vector signed char __a, vector bool char __b)
13181 {
13182 return
13183 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13184 }
13185
13186 static int __ATTRS_o_ai
vec_any_ne(vector unsigned char __a,vector unsigned char __b)13187 vec_any_ne(vector unsigned char __a, vector unsigned char __b)
13188 {
13189 return
13190 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13191 }
13192
13193 static int __ATTRS_o_ai
vec_any_ne(vector unsigned char __a,vector bool char __b)13194 vec_any_ne(vector unsigned char __a, vector bool char __b)
13195 {
13196 return
13197 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13198 }
13199
13200 static int __ATTRS_o_ai
vec_any_ne(vector bool char __a,vector signed char __b)13201 vec_any_ne(vector bool char __a, vector signed char __b)
13202 {
13203 return
13204 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13205 }
13206
13207 static int __ATTRS_o_ai
vec_any_ne(vector bool char __a,vector unsigned char __b)13208 vec_any_ne(vector bool char __a, vector unsigned char __b)
13209 {
13210 return
13211 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13212 }
13213
13214 static int __ATTRS_o_ai
vec_any_ne(vector bool char __a,vector bool char __b)13215 vec_any_ne(vector bool char __a, vector bool char __b)
13216 {
13217 return
13218 __builtin_altivec_vcmpequb_p(__CR6_LT_REV, (vector char)__a, (vector char)__b);
13219 }
13220
13221 static int __ATTRS_o_ai
vec_any_ne(vector short __a,vector short __b)13222 vec_any_ne(vector short __a, vector short __b)
13223 {
13224 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, __b);
13225 }
13226
13227 static int __ATTRS_o_ai
vec_any_ne(vector short __a,vector bool short __b)13228 vec_any_ne(vector short __a, vector bool short __b)
13229 {
13230 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV, __a, (vector short)__b);
13231 }
13232
13233 static int __ATTRS_o_ai
vec_any_ne(vector unsigned short __a,vector unsigned short __b)13234 vec_any_ne(vector unsigned short __a, vector unsigned short __b)
13235 {
13236 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13237 (vector short)__a,
13238 (vector short)__b);
13239 }
13240
13241 static int __ATTRS_o_ai
vec_any_ne(vector unsigned short __a,vector bool short __b)13242 vec_any_ne(vector unsigned short __a, vector bool short __b)
13243 {
13244 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13245 (vector short)__a,
13246 (vector short)__b);
13247 }
13248
13249 static int __ATTRS_o_ai
vec_any_ne(vector bool short __a,vector short __b)13250 vec_any_ne(vector bool short __a, vector short __b)
13251 {
13252 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13253 (vector short)__a,
13254 (vector short)__b);
13255 }
13256
13257 static int __ATTRS_o_ai
vec_any_ne(vector bool short __a,vector unsigned short __b)13258 vec_any_ne(vector bool short __a, vector unsigned short __b)
13259 {
13260 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13261 (vector short)__a,
13262 (vector short)__b);
13263 }
13264
13265 static int __ATTRS_o_ai
vec_any_ne(vector bool short __a,vector bool short __b)13266 vec_any_ne(vector bool short __a, vector bool short __b)
13267 {
13268 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13269 (vector short)__a,
13270 (vector short)__b);
13271 }
13272
13273 static int __ATTRS_o_ai
vec_any_ne(vector pixel __a,vector pixel __b)13274 vec_any_ne(vector pixel __a, vector pixel __b)
13275 {
13276 return __builtin_altivec_vcmpequh_p(__CR6_LT_REV,
13277 (vector short)__a,
13278 (vector short)__b);
13279 }
13280
13281 static int __ATTRS_o_ai
vec_any_ne(vector int __a,vector int __b)13282 vec_any_ne(vector int __a, vector int __b)
13283 {
13284 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, __b);
13285 }
13286
13287 static int __ATTRS_o_ai
vec_any_ne(vector int __a,vector bool int __b)13288 vec_any_ne(vector int __a, vector bool int __b)
13289 {
13290 return __builtin_altivec_vcmpequw_p(__CR6_LT_REV, __a, (vector int)__b);
13291 }
13292
13293 static int __ATTRS_o_ai
vec_any_ne(vector unsigned int __a,vector unsigned int __b)13294 vec_any_ne(vector unsigned int __a, vector unsigned int __b)
13295 {
13296 return
13297 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
13298 }
13299
13300 static int __ATTRS_o_ai
vec_any_ne(vector unsigned int __a,vector bool int __b)13301 vec_any_ne(vector unsigned int __a, vector bool int __b)
13302 {
13303 return
13304 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
13305 }
13306
13307 static int __ATTRS_o_ai
vec_any_ne(vector bool int __a,vector int __b)13308 vec_any_ne(vector bool int __a, vector int __b)
13309 {
13310 return
13311 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
13312 }
13313
13314 static int __ATTRS_o_ai
vec_any_ne(vector bool int __a,vector unsigned int __b)13315 vec_any_ne(vector bool int __a, vector unsigned int __b)
13316 {
13317 return
13318 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
13319 }
13320
13321 static int __ATTRS_o_ai
vec_any_ne(vector bool int __a,vector bool int __b)13322 vec_any_ne(vector bool int __a, vector bool int __b)
13323 {
13324 return
13325 __builtin_altivec_vcmpequw_p(__CR6_LT_REV, (vector int)__a, (vector int)__b);
13326 }
13327
13328 #ifdef __POWER8_VECTOR__
13329 static int __ATTRS_o_ai
vec_any_ne(vector signed long long __a,vector signed long long __b)13330 vec_any_ne(vector signed long long __a, vector signed long long __b)
13331 {
13332 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a, __b);
13333 }
13334
13335 static int __ATTRS_o_ai
vec_any_ne(vector unsigned long long __a,vector unsigned long long __b)13336 vec_any_ne(vector unsigned long long __a, vector unsigned long long __b)
13337 {
13338 return
13339 __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector long long)__a,
13340 (vector long long)__b);
13341 }
13342
13343 static int __ATTRS_o_ai
vec_any_ne(vector signed long long __a,vector bool long long __b)13344 vec_any_ne(vector signed long long __a, vector bool long long __b)
13345 {
13346 return __builtin_altivec_vcmpequd_p(__CR6_LT_REV, __a,
13347 (vector signed long long)__b);
13348 }
13349
13350 static int __ATTRS_o_ai
vec_any_ne(vector unsigned long long __a,vector bool long long __b)13351 vec_any_ne(vector unsigned long long __a, vector bool long long __b)
13352 {
13353 return
13354 __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a,
13355 (vector signed long long)__b);
13356 }
13357
13358 static int __ATTRS_o_ai
vec_any_ne(vector bool long long __a,vector signed long long __b)13359 vec_any_ne(vector bool long long __a, vector signed long long __b)
13360 {
13361 return
13362 __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a,
13363 (vector signed long long)__b);
13364 }
13365
13366 static int __ATTRS_o_ai
vec_any_ne(vector bool long long __a,vector unsigned long long __b)13367 vec_any_ne(vector bool long long __a, vector unsigned long long __b)
13368 {
13369 return
13370 __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a,
13371 (vector signed long long)__b);
13372 }
13373
13374 static int __ATTRS_o_ai
vec_any_ne(vector bool long long __a,vector bool long long __b)13375 vec_any_ne(vector bool long long __a, vector bool long long __b)
13376 {
13377 return
13378 __builtin_altivec_vcmpequd_p(__CR6_LT_REV, (vector signed long long)__a,
13379 (vector signed long long)__b);
13380 }
13381 #endif
13382
13383 static int __ATTRS_o_ai
vec_any_ne(vector float __a,vector float __b)13384 vec_any_ne(vector float __a, vector float __b)
13385 {
13386 return __builtin_altivec_vcmpeqfp_p(__CR6_LT_REV, __a, __b);
13387 }
13388
13389 /* vec_any_nge */
13390
13391 static int __attribute__((__always_inline__))
vec_any_nge(vector float __a,vector float __b)13392 vec_any_nge(vector float __a, vector float __b)
13393 {
13394 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __a, __b);
13395 }
13396
13397 /* vec_any_ngt */
13398
13399 static int __attribute__((__always_inline__))
vec_any_ngt(vector float __a,vector float __b)13400 vec_any_ngt(vector float __a, vector float __b)
13401 {
13402 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __a, __b);
13403 }
13404
13405 /* vec_any_nle */
13406
13407 static int __attribute__((__always_inline__))
vec_any_nle(vector float __a,vector float __b)13408 vec_any_nle(vector float __a, vector float __b)
13409 {
13410 return __builtin_altivec_vcmpgefp_p(__CR6_LT_REV, __b, __a);
13411 }
13412
13413 /* vec_any_nlt */
13414
13415 static int __attribute__((__always_inline__))
vec_any_nlt(vector float __a,vector float __b)13416 vec_any_nlt(vector float __a, vector float __b)
13417 {
13418 return __builtin_altivec_vcmpgtfp_p(__CR6_LT_REV, __b, __a);
13419 }
13420
13421 /* vec_any_numeric */
13422
13423 static int __attribute__((__always_inline__))
vec_any_numeric(vector float __a)13424 vec_any_numeric(vector float __a)
13425 {
13426 return __builtin_altivec_vcmpeqfp_p(__CR6_EQ_REV, __a, __a);
13427 }
13428
13429 /* vec_any_out */
13430
13431 static int __attribute__((__always_inline__))
vec_any_out(vector float __a,vector float __b)13432 vec_any_out(vector float __a, vector float __b)
13433 {
13434 return __builtin_altivec_vcmpbfp_p(__CR6_EQ_REV, __a, __b);
13435 }
13436
13437 /* Power 8 Crypto functions
13438 Note: We diverge from the current GCC implementation with regard
13439 to cryptography and related functions as follows:
13440 - Only the SHA and AES instructions and builtins are disabled by -mno-crypto
13441 - The remaining ones are only available on Power8 and up so
13442 require -mpower8-vector
13443 The justification for this is that export requirements require that
13444 Category:Vector.Crypto is optional (i.e. compliant hardware may not provide
13445 support). As a result, we need to be able to turn off support for those.
13446 The remaining ones (currently controlled by -mcrypto for GCC) still
13447 need to be provided on compliant hardware even if Vector.Crypto is not
13448 provided.
13449 FIXME: the naming convention for the builtins will be adjusted due
13450 to the inconsistency (__builtin_crypto_ prefix on builtins that cannot be
13451 removed with -mno-crypto). This is under development.
13452 */
13453 #ifdef __CRYPTO__
13454 static vector unsigned long long __attribute__((__always_inline__))
__builtin_crypto_vsbox(vector unsigned long long __a)13455 __builtin_crypto_vsbox (vector unsigned long long __a)
13456 {
13457 return __builtin_altivec_crypto_vsbox(__a);
13458 }
13459
13460 static vector unsigned long long __attribute__((__always_inline__))
__builtin_crypto_vcipher(vector unsigned long long __a,vector unsigned long long __b)13461 __builtin_crypto_vcipher (vector unsigned long long __a,
13462 vector unsigned long long __b)
13463 {
13464 return __builtin_altivec_crypto_vcipher(__a, __b);
13465 }
13466
13467 static vector unsigned long long __attribute__((__always_inline__))
__builtin_crypto_vcipherlast(vector unsigned long long __a,vector unsigned long long __b)13468 __builtin_crypto_vcipherlast (vector unsigned long long __a,
13469 vector unsigned long long __b)
13470 {
13471 return __builtin_altivec_crypto_vcipherlast(__a, __b);
13472 }
13473
13474 static vector unsigned long long __attribute__((__always_inline__))
__builtin_crypto_vncipher(vector unsigned long long __a,vector unsigned long long __b)13475 __builtin_crypto_vncipher (vector unsigned long long __a,
13476 vector unsigned long long __b)
13477 {
13478 return __builtin_altivec_crypto_vncipher(__a, __b);
13479 }
13480
13481 static vector unsigned long long __attribute__((__always_inline__))
__builtin_crypto_vncipherlast(vector unsigned long long __a,vector unsigned long long __b)13482 __builtin_crypto_vncipherlast (vector unsigned long long __a,
13483 vector unsigned long long __b)
13484 {
13485 return __builtin_altivec_crypto_vncipherlast(__a, __b);
13486 }
13487
13488
13489 #define __builtin_crypto_vshasigmad __builtin_altivec_crypto_vshasigmad
13490 #define __builtin_crypto_vshasigmaw __builtin_altivec_crypto_vshasigmaw
13491 #endif
13492
13493 #ifdef __POWER8_VECTOR__
13494 static vector unsigned char __ATTRS_o_ai
__builtin_crypto_vpermxor(vector unsigned char __a,vector unsigned char __b,vector unsigned char __c)13495 __builtin_crypto_vpermxor (vector unsigned char __a,
13496 vector unsigned char __b,
13497 vector unsigned char __c)
13498 {
13499 return __builtin_altivec_crypto_vpermxor(__a, __b, __c);
13500 }
13501
13502 static vector unsigned short __ATTRS_o_ai
__builtin_crypto_vpermxor(vector unsigned short __a,vector unsigned short __b,vector unsigned short __c)13503 __builtin_crypto_vpermxor (vector unsigned short __a,
13504 vector unsigned short __b,
13505 vector unsigned short __c)
13506 {
13507 return (vector unsigned short)
13508 __builtin_altivec_crypto_vpermxor((vector unsigned char) __a,
13509 (vector unsigned char) __b,
13510 (vector unsigned char) __c);
13511 }
13512
13513 static vector unsigned int __ATTRS_o_ai
__builtin_crypto_vpermxor(vector unsigned int __a,vector unsigned int __b,vector unsigned int __c)13514 __builtin_crypto_vpermxor (vector unsigned int __a,
13515 vector unsigned int __b,
13516 vector unsigned int __c)
13517 {
13518 return (vector unsigned int)
13519 __builtin_altivec_crypto_vpermxor((vector unsigned char) __a,
13520 (vector unsigned char) __b,
13521 (vector unsigned char) __c);
13522 }
13523
13524 static vector unsigned long long __ATTRS_o_ai
__builtin_crypto_vpermxor(vector unsigned long long __a,vector unsigned long long __b,vector unsigned long long __c)13525 __builtin_crypto_vpermxor (vector unsigned long long __a,
13526 vector unsigned long long __b,
13527 vector unsigned long long __c)
13528 {
13529 return (vector unsigned long long)
13530 __builtin_altivec_crypto_vpermxor((vector unsigned char) __a,
13531 (vector unsigned char) __b,
13532 (vector unsigned char) __c);
13533 }
13534
13535 static vector unsigned char __ATTRS_o_ai
__builtin_crypto_vpmsumb(vector unsigned char __a,vector unsigned char __b)13536 __builtin_crypto_vpmsumb (vector unsigned char __a,
13537 vector unsigned char __b)
13538 {
13539 return __builtin_altivec_crypto_vpmsumb(__a, __b);
13540 }
13541
13542 static vector unsigned short __ATTRS_o_ai
__builtin_crypto_vpmsumb(vector unsigned short __a,vector unsigned short __b)13543 __builtin_crypto_vpmsumb (vector unsigned short __a,
13544 vector unsigned short __b)
13545 {
13546 return __builtin_altivec_crypto_vpmsumh(__a, __b);
13547 }
13548
13549 static vector unsigned int __ATTRS_o_ai
__builtin_crypto_vpmsumb(vector unsigned int __a,vector unsigned int __b)13550 __builtin_crypto_vpmsumb (vector unsigned int __a,
13551 vector unsigned int __b)
13552 {
13553 return __builtin_altivec_crypto_vpmsumw(__a, __b);
13554 }
13555
13556 static vector unsigned long long __ATTRS_o_ai
__builtin_crypto_vpmsumb(vector unsigned long long __a,vector unsigned long long __b)13557 __builtin_crypto_vpmsumb (vector unsigned long long __a,
13558 vector unsigned long long __b)
13559 {
13560 return __builtin_altivec_crypto_vpmsumd(__a, __b);
13561 }
13562 #endif
13563
13564 #undef __ATTRS_o_ai
13565
13566 #endif /* __ALTIVEC_H */
13567