[docs] Fix build-docs.sh
[llvm-project.git] / clang / lib / Headers / vecintrin.h
blobec1dbfd015f6ef4d20fe344afb870409bfa6fba6
1 /*===---- vecintrin.h - Vector intrinsics ----------------------------------===
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 *===-----------------------------------------------------------------------===
8 */
10 #if defined(__s390x__) && defined(__VEC__)
12 #define __ATTRS_ai __attribute__((__always_inline__))
13 #define __ATTRS_o __attribute__((__overloadable__))
14 #define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
16 #define __constant(PARM) \
17 __attribute__((__enable_if__ ((PARM) == (PARM), \
18 "argument must be a constant integer")))
19 #define __constant_range(PARM, LOW, HIGH) \
20 __attribute__((__enable_if__ ((PARM) >= (LOW) && (PARM) <= (HIGH), \
21 "argument must be a constant integer from " #LOW " to " #HIGH)))
22 #define __constant_pow2_range(PARM, LOW, HIGH) \
23 __attribute__((__enable_if__ ((PARM) >= (LOW) && (PARM) <= (HIGH) && \
24 ((PARM) & ((PARM) - 1)) == 0, \
25 "argument must be a constant power of 2 from " #LOW " to " #HIGH)))
27 /*-- __lcbb -----------------------------------------------------------------*/
29 extern __ATTRS_o unsigned int
30 __lcbb(const void *__ptr, unsigned short __len)
31 __constant_pow2_range(__len, 64, 4096);
33 #define __lcbb(X, Y) ((__typeof__((__lcbb)((X), (Y)))) \
34 __builtin_s390_lcbb((X), __builtin_constant_p((Y))? \
35 ((Y) == 64 ? 0 : \
36 (Y) == 128 ? 1 : \
37 (Y) == 256 ? 2 : \
38 (Y) == 512 ? 3 : \
39 (Y) == 1024 ? 4 : \
40 (Y) == 2048 ? 5 : \
41 (Y) == 4096 ? 6 : 0) : 0))
43 /*-- vec_extract ------------------------------------------------------------*/
45 static inline __ATTRS_o_ai signed char
46 vec_extract(__vector signed char __vec, int __index) {
47 return __vec[__index & 15];
50 static inline __ATTRS_o_ai unsigned char
51 vec_extract(__vector __bool char __vec, int __index) {
52 return __vec[__index & 15];
55 static inline __ATTRS_o_ai unsigned char
56 vec_extract(__vector unsigned char __vec, int __index) {
57 return __vec[__index & 15];
60 static inline __ATTRS_o_ai signed short
61 vec_extract(__vector signed short __vec, int __index) {
62 return __vec[__index & 7];
65 static inline __ATTRS_o_ai unsigned short
66 vec_extract(__vector __bool short __vec, int __index) {
67 return __vec[__index & 7];
70 static inline __ATTRS_o_ai unsigned short
71 vec_extract(__vector unsigned short __vec, int __index) {
72 return __vec[__index & 7];
75 static inline __ATTRS_o_ai signed int
76 vec_extract(__vector signed int __vec, int __index) {
77 return __vec[__index & 3];
80 static inline __ATTRS_o_ai unsigned int
81 vec_extract(__vector __bool int __vec, int __index) {
82 return __vec[__index & 3];
85 static inline __ATTRS_o_ai unsigned int
86 vec_extract(__vector unsigned int __vec, int __index) {
87 return __vec[__index & 3];
90 static inline __ATTRS_o_ai signed long long
91 vec_extract(__vector signed long long __vec, int __index) {
92 return __vec[__index & 1];
95 static inline __ATTRS_o_ai unsigned long long
96 vec_extract(__vector __bool long long __vec, int __index) {
97 return __vec[__index & 1];
100 static inline __ATTRS_o_ai unsigned long long
101 vec_extract(__vector unsigned long long __vec, int __index) {
102 return __vec[__index & 1];
105 #if __ARCH__ >= 12
106 static inline __ATTRS_o_ai float
107 vec_extract(__vector float __vec, int __index) {
108 return __vec[__index & 3];
110 #endif
112 static inline __ATTRS_o_ai double
113 vec_extract(__vector double __vec, int __index) {
114 return __vec[__index & 1];
117 /*-- vec_insert -------------------------------------------------------------*/
119 static inline __ATTRS_o_ai __vector signed char
120 vec_insert(signed char __scalar, __vector signed char __vec, int __index) {
121 __vec[__index & 15] = __scalar;
122 return __vec;
125 // This prototype is deprecated.
126 static inline __ATTRS_o_ai __vector unsigned char
127 vec_insert(unsigned char __scalar, __vector __bool char __vec, int __index) {
128 __vector unsigned char __newvec = (__vector unsigned char)__vec;
129 __newvec[__index & 15] = (unsigned char)__scalar;
130 return __newvec;
133 static inline __ATTRS_o_ai __vector unsigned char
134 vec_insert(unsigned char __scalar, __vector unsigned char __vec, int __index) {
135 __vec[__index & 15] = __scalar;
136 return __vec;
139 static inline __ATTRS_o_ai __vector signed short
140 vec_insert(signed short __scalar, __vector signed short __vec, int __index) {
141 __vec[__index & 7] = __scalar;
142 return __vec;
145 // This prototype is deprecated.
146 static inline __ATTRS_o_ai __vector unsigned short
147 vec_insert(unsigned short __scalar, __vector __bool short __vec,
148 int __index) {
149 __vector unsigned short __newvec = (__vector unsigned short)__vec;
150 __newvec[__index & 7] = (unsigned short)__scalar;
151 return __newvec;
154 static inline __ATTRS_o_ai __vector unsigned short
155 vec_insert(unsigned short __scalar, __vector unsigned short __vec,
156 int __index) {
157 __vec[__index & 7] = __scalar;
158 return __vec;
161 static inline __ATTRS_o_ai __vector signed int
162 vec_insert(signed int __scalar, __vector signed int __vec, int __index) {
163 __vec[__index & 3] = __scalar;
164 return __vec;
167 // This prototype is deprecated.
168 static inline __ATTRS_o_ai __vector unsigned int
169 vec_insert(unsigned int __scalar, __vector __bool int __vec, int __index) {
170 __vector unsigned int __newvec = (__vector unsigned int)__vec;
171 __newvec[__index & 3] = __scalar;
172 return __newvec;
175 static inline __ATTRS_o_ai __vector unsigned int
176 vec_insert(unsigned int __scalar, __vector unsigned int __vec, int __index) {
177 __vec[__index & 3] = __scalar;
178 return __vec;
181 static inline __ATTRS_o_ai __vector signed long long
182 vec_insert(signed long long __scalar, __vector signed long long __vec,
183 int __index) {
184 __vec[__index & 1] = __scalar;
185 return __vec;
188 // This prototype is deprecated.
189 static inline __ATTRS_o_ai __vector unsigned long long
190 vec_insert(unsigned long long __scalar, __vector __bool long long __vec,
191 int __index) {
192 __vector unsigned long long __newvec = (__vector unsigned long long)__vec;
193 __newvec[__index & 1] = __scalar;
194 return __newvec;
197 static inline __ATTRS_o_ai __vector unsigned long long
198 vec_insert(unsigned long long __scalar, __vector unsigned long long __vec,
199 int __index) {
200 __vec[__index & 1] = __scalar;
201 return __vec;
204 #if __ARCH__ >= 12
205 static inline __ATTRS_o_ai __vector float
206 vec_insert(float __scalar, __vector float __vec, int __index) {
207 __vec[__index & 1] = __scalar;
208 return __vec;
210 #endif
212 static inline __ATTRS_o_ai __vector double
213 vec_insert(double __scalar, __vector double __vec, int __index) {
214 __vec[__index & 1] = __scalar;
215 return __vec;
218 /*-- vec_promote ------------------------------------------------------------*/
220 static inline __ATTRS_o_ai __vector signed char
221 vec_promote(signed char __scalar, int __index) {
222 const __vector signed char __zero = (__vector signed char)0;
223 __vector signed char __vec = __builtin_shufflevector(__zero, __zero,
224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
225 __vec[__index & 15] = __scalar;
226 return __vec;
229 static inline __ATTRS_o_ai __vector unsigned char
230 vec_promote(unsigned char __scalar, int __index) {
231 const __vector unsigned char __zero = (__vector unsigned char)0;
232 __vector unsigned char __vec = __builtin_shufflevector(__zero, __zero,
233 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1);
234 __vec[__index & 15] = __scalar;
235 return __vec;
238 static inline __ATTRS_o_ai __vector signed short
239 vec_promote(signed short __scalar, int __index) {
240 const __vector signed short __zero = (__vector signed short)0;
241 __vector signed short __vec = __builtin_shufflevector(__zero, __zero,
242 -1, -1, -1, -1, -1, -1, -1, -1);
243 __vec[__index & 7] = __scalar;
244 return __vec;
247 static inline __ATTRS_o_ai __vector unsigned short
248 vec_promote(unsigned short __scalar, int __index) {
249 const __vector unsigned short __zero = (__vector unsigned short)0;
250 __vector unsigned short __vec = __builtin_shufflevector(__zero, __zero,
251 -1, -1, -1, -1, -1, -1, -1, -1);
252 __vec[__index & 7] = __scalar;
253 return __vec;
256 static inline __ATTRS_o_ai __vector signed int
257 vec_promote(signed int __scalar, int __index) {
258 const __vector signed int __zero = (__vector signed int)0;
259 __vector signed int __vec = __builtin_shufflevector(__zero, __zero,
260 -1, -1, -1, -1);
261 __vec[__index & 3] = __scalar;
262 return __vec;
265 static inline __ATTRS_o_ai __vector unsigned int
266 vec_promote(unsigned int __scalar, int __index) {
267 const __vector unsigned int __zero = (__vector unsigned int)0;
268 __vector unsigned int __vec = __builtin_shufflevector(__zero, __zero,
269 -1, -1, -1, -1);
270 __vec[__index & 3] = __scalar;
271 return __vec;
274 static inline __ATTRS_o_ai __vector signed long long
275 vec_promote(signed long long __scalar, int __index) {
276 const __vector signed long long __zero = (__vector signed long long)0;
277 __vector signed long long __vec = __builtin_shufflevector(__zero, __zero,
278 -1, -1);
279 __vec[__index & 1] = __scalar;
280 return __vec;
283 static inline __ATTRS_o_ai __vector unsigned long long
284 vec_promote(unsigned long long __scalar, int __index) {
285 const __vector unsigned long long __zero = (__vector unsigned long long)0;
286 __vector unsigned long long __vec = __builtin_shufflevector(__zero, __zero,
287 -1, -1);
288 __vec[__index & 1] = __scalar;
289 return __vec;
292 #if __ARCH__ >= 12
293 static inline __ATTRS_o_ai __vector float
294 vec_promote(float __scalar, int __index) {
295 const __vector float __zero = (__vector float)0.0f;
296 __vector float __vec = __builtin_shufflevector(__zero, __zero,
297 -1, -1, -1, -1);
298 __vec[__index & 3] = __scalar;
299 return __vec;
301 #endif
303 static inline __ATTRS_o_ai __vector double
304 vec_promote(double __scalar, int __index) {
305 const __vector double __zero = (__vector double)0.0;
306 __vector double __vec = __builtin_shufflevector(__zero, __zero, -1, -1);
307 __vec[__index & 1] = __scalar;
308 return __vec;
311 /*-- vec_insert_and_zero ----------------------------------------------------*/
313 static inline __ATTRS_o_ai __vector signed char
314 vec_insert_and_zero(const signed char *__ptr) {
315 __vector signed char __vec = (__vector signed char)0;
316 __vec[7] = *__ptr;
317 return __vec;
320 static inline __ATTRS_o_ai __vector unsigned char
321 vec_insert_and_zero(const unsigned char *__ptr) {
322 __vector unsigned char __vec = (__vector unsigned char)0;
323 __vec[7] = *__ptr;
324 return __vec;
327 static inline __ATTRS_o_ai __vector signed short
328 vec_insert_and_zero(const signed short *__ptr) {
329 __vector signed short __vec = (__vector signed short)0;
330 __vec[3] = *__ptr;
331 return __vec;
334 static inline __ATTRS_o_ai __vector unsigned short
335 vec_insert_and_zero(const unsigned short *__ptr) {
336 __vector unsigned short __vec = (__vector unsigned short)0;
337 __vec[3] = *__ptr;
338 return __vec;
341 static inline __ATTRS_o_ai __vector signed int
342 vec_insert_and_zero(const signed int *__ptr) {
343 __vector signed int __vec = (__vector signed int)0;
344 __vec[1] = *__ptr;
345 return __vec;
348 static inline __ATTRS_o_ai __vector unsigned int
349 vec_insert_and_zero(const unsigned int *__ptr) {
350 __vector unsigned int __vec = (__vector unsigned int)0;
351 __vec[1] = *__ptr;
352 return __vec;
355 static inline __ATTRS_o_ai __vector signed long long
356 vec_insert_and_zero(const signed long long *__ptr) {
357 __vector signed long long __vec = (__vector signed long long)0;
358 __vec[0] = *__ptr;
359 return __vec;
362 static inline __ATTRS_o_ai __vector unsigned long long
363 vec_insert_and_zero(const unsigned long long *__ptr) {
364 __vector unsigned long long __vec = (__vector unsigned long long)0;
365 __vec[0] = *__ptr;
366 return __vec;
369 #if __ARCH__ >= 12
370 static inline __ATTRS_o_ai __vector float
371 vec_insert_and_zero(const float *__ptr) {
372 __vector float __vec = (__vector float)0.0f;
373 __vec[1] = *__ptr;
374 return __vec;
376 #endif
378 static inline __ATTRS_o_ai __vector double
379 vec_insert_and_zero(const double *__ptr) {
380 __vector double __vec = (__vector double)0.0;
381 __vec[0] = *__ptr;
382 return __vec;
385 /*-- vec_perm ---------------------------------------------------------------*/
387 static inline __ATTRS_o_ai __vector signed char
388 vec_perm(__vector signed char __a, __vector signed char __b,
389 __vector unsigned char __c) {
390 return (__vector signed char)__builtin_s390_vperm(
391 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
394 static inline __ATTRS_o_ai __vector unsigned char
395 vec_perm(__vector unsigned char __a, __vector unsigned char __b,
396 __vector unsigned char __c) {
397 return (__vector unsigned char)__builtin_s390_vperm(
398 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
401 static inline __ATTRS_o_ai __vector __bool char
402 vec_perm(__vector __bool char __a, __vector __bool char __b,
403 __vector unsigned char __c) {
404 return (__vector __bool char)__builtin_s390_vperm(
405 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
408 static inline __ATTRS_o_ai __vector signed short
409 vec_perm(__vector signed short __a, __vector signed short __b,
410 __vector unsigned char __c) {
411 return (__vector signed short)__builtin_s390_vperm(
412 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
415 static inline __ATTRS_o_ai __vector unsigned short
416 vec_perm(__vector unsigned short __a, __vector unsigned short __b,
417 __vector unsigned char __c) {
418 return (__vector unsigned short)__builtin_s390_vperm(
419 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
422 static inline __ATTRS_o_ai __vector __bool short
423 vec_perm(__vector __bool short __a, __vector __bool short __b,
424 __vector unsigned char __c) {
425 return (__vector __bool short)__builtin_s390_vperm(
426 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
429 static inline __ATTRS_o_ai __vector signed int
430 vec_perm(__vector signed int __a, __vector signed int __b,
431 __vector unsigned char __c) {
432 return (__vector signed int)__builtin_s390_vperm(
433 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
436 static inline __ATTRS_o_ai __vector unsigned int
437 vec_perm(__vector unsigned int __a, __vector unsigned int __b,
438 __vector unsigned char __c) {
439 return (__vector unsigned int)__builtin_s390_vperm(
440 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
443 static inline __ATTRS_o_ai __vector __bool int
444 vec_perm(__vector __bool int __a, __vector __bool int __b,
445 __vector unsigned char __c) {
446 return (__vector __bool int)__builtin_s390_vperm(
447 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
450 static inline __ATTRS_o_ai __vector signed long long
451 vec_perm(__vector signed long long __a, __vector signed long long __b,
452 __vector unsigned char __c) {
453 return (__vector signed long long)__builtin_s390_vperm(
454 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
457 static inline __ATTRS_o_ai __vector unsigned long long
458 vec_perm(__vector unsigned long long __a, __vector unsigned long long __b,
459 __vector unsigned char __c) {
460 return (__vector unsigned long long)__builtin_s390_vperm(
461 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
464 static inline __ATTRS_o_ai __vector __bool long long
465 vec_perm(__vector __bool long long __a, __vector __bool long long __b,
466 __vector unsigned char __c) {
467 return (__vector __bool long long)__builtin_s390_vperm(
468 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
471 #if __ARCH__ >= 12
472 static inline __ATTRS_o_ai __vector float
473 vec_perm(__vector float __a, __vector float __b,
474 __vector unsigned char __c) {
475 return (__vector float)__builtin_s390_vperm(
476 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
478 #endif
480 static inline __ATTRS_o_ai __vector double
481 vec_perm(__vector double __a, __vector double __b,
482 __vector unsigned char __c) {
483 return (__vector double)__builtin_s390_vperm(
484 (__vector unsigned char)__a, (__vector unsigned char)__b, __c);
487 /*-- vec_permi --------------------------------------------------------------*/
489 // This prototype is deprecated.
490 extern __ATTRS_o __vector signed long long
491 vec_permi(__vector signed long long __a, __vector signed long long __b,
492 int __c)
493 __constant_range(__c, 0, 3);
495 // This prototype is deprecated.
496 extern __ATTRS_o __vector unsigned long long
497 vec_permi(__vector unsigned long long __a, __vector unsigned long long __b,
498 int __c)
499 __constant_range(__c, 0, 3);
501 // This prototype is deprecated.
502 extern __ATTRS_o __vector __bool long long
503 vec_permi(__vector __bool long long __a, __vector __bool long long __b,
504 int __c)
505 __constant_range(__c, 0, 3);
507 // This prototype is deprecated.
508 extern __ATTRS_o __vector double
509 vec_permi(__vector double __a, __vector double __b, int __c)
510 __constant_range(__c, 0, 3);
512 #define vec_permi(X, Y, Z) ((__typeof__((vec_permi)((X), (Y), (Z)))) \
513 __builtin_s390_vpdi((__vector unsigned long long)(X), \
514 (__vector unsigned long long)(Y), \
515 (((Z) & 2) << 1) | ((Z) & 1)))
517 /*-- vec_bperm_u128 ---------------------------------------------------------*/
519 #if __ARCH__ >= 12
520 static inline __ATTRS_ai __vector unsigned long long
521 vec_bperm_u128(__vector unsigned char __a, __vector unsigned char __b) {
522 return __builtin_s390_vbperm(__a, __b);
524 #endif
526 /*-- vec_revb ---------------------------------------------------------------*/
528 static inline __ATTRS_o_ai __vector signed short
529 vec_revb(__vector signed short __vec) {
530 return (__vector signed short)
531 __builtin_s390_vlbrh((__vector unsigned short)__vec);
534 static inline __ATTRS_o_ai __vector unsigned short
535 vec_revb(__vector unsigned short __vec) {
536 return __builtin_s390_vlbrh(__vec);
539 static inline __ATTRS_o_ai __vector signed int
540 vec_revb(__vector signed int __vec) {
541 return (__vector signed int)
542 __builtin_s390_vlbrf((__vector unsigned int)__vec);
545 static inline __ATTRS_o_ai __vector unsigned int
546 vec_revb(__vector unsigned int __vec) {
547 return __builtin_s390_vlbrf(__vec);
550 static inline __ATTRS_o_ai __vector signed long long
551 vec_revb(__vector signed long long __vec) {
552 return (__vector signed long long)
553 __builtin_s390_vlbrg((__vector unsigned long long)__vec);
556 static inline __ATTRS_o_ai __vector unsigned long long
557 vec_revb(__vector unsigned long long __vec) {
558 return __builtin_s390_vlbrg(__vec);
561 #if __ARCH__ >= 12
562 static inline __ATTRS_o_ai __vector float
563 vec_revb(__vector float __vec) {
564 return (__vector float)
565 __builtin_s390_vlbrf((__vector unsigned int)__vec);
567 #endif
569 static inline __ATTRS_o_ai __vector double
570 vec_revb(__vector double __vec) {
571 return (__vector double)
572 __builtin_s390_vlbrg((__vector unsigned long long)__vec);
575 /*-- vec_reve ---------------------------------------------------------------*/
577 static inline __ATTRS_o_ai __vector signed char
578 vec_reve(__vector signed char __vec) {
579 return (__vector signed char) { __vec[15], __vec[14], __vec[13], __vec[12],
580 __vec[11], __vec[10], __vec[9], __vec[8],
581 __vec[7], __vec[6], __vec[5], __vec[4],
582 __vec[3], __vec[2], __vec[1], __vec[0] };
585 static inline __ATTRS_o_ai __vector unsigned char
586 vec_reve(__vector unsigned char __vec) {
587 return (__vector unsigned char) { __vec[15], __vec[14], __vec[13], __vec[12],
588 __vec[11], __vec[10], __vec[9], __vec[8],
589 __vec[7], __vec[6], __vec[5], __vec[4],
590 __vec[3], __vec[2], __vec[1], __vec[0] };
593 static inline __ATTRS_o_ai __vector __bool char
594 vec_reve(__vector __bool char __vec) {
595 return (__vector __bool char) { __vec[15], __vec[14], __vec[13], __vec[12],
596 __vec[11], __vec[10], __vec[9], __vec[8],
597 __vec[7], __vec[6], __vec[5], __vec[4],
598 __vec[3], __vec[2], __vec[1], __vec[0] };
601 static inline __ATTRS_o_ai __vector signed short
602 vec_reve(__vector signed short __vec) {
603 return (__vector signed short) { __vec[7], __vec[6], __vec[5], __vec[4],
604 __vec[3], __vec[2], __vec[1], __vec[0] };
607 static inline __ATTRS_o_ai __vector unsigned short
608 vec_reve(__vector unsigned short __vec) {
609 return (__vector unsigned short) { __vec[7], __vec[6], __vec[5], __vec[4],
610 __vec[3], __vec[2], __vec[1], __vec[0] };
613 static inline __ATTRS_o_ai __vector __bool short
614 vec_reve(__vector __bool short __vec) {
615 return (__vector __bool short) { __vec[7], __vec[6], __vec[5], __vec[4],
616 __vec[3], __vec[2], __vec[1], __vec[0] };
619 static inline __ATTRS_o_ai __vector signed int
620 vec_reve(__vector signed int __vec) {
621 return (__vector signed int) { __vec[3], __vec[2], __vec[1], __vec[0] };
624 static inline __ATTRS_o_ai __vector unsigned int
625 vec_reve(__vector unsigned int __vec) {
626 return (__vector unsigned int) { __vec[3], __vec[2], __vec[1], __vec[0] };
629 static inline __ATTRS_o_ai __vector __bool int
630 vec_reve(__vector __bool int __vec) {
631 return (__vector __bool int) { __vec[3], __vec[2], __vec[1], __vec[0] };
634 static inline __ATTRS_o_ai __vector signed long long
635 vec_reve(__vector signed long long __vec) {
636 return (__vector signed long long) { __vec[1], __vec[0] };
639 static inline __ATTRS_o_ai __vector unsigned long long
640 vec_reve(__vector unsigned long long __vec) {
641 return (__vector unsigned long long) { __vec[1], __vec[0] };
644 static inline __ATTRS_o_ai __vector __bool long long
645 vec_reve(__vector __bool long long __vec) {
646 return (__vector __bool long long) { __vec[1], __vec[0] };
649 #if __ARCH__ >= 12
650 static inline __ATTRS_o_ai __vector float
651 vec_reve(__vector float __vec) {
652 return (__vector float) { __vec[3], __vec[2], __vec[1], __vec[0] };
654 #endif
656 static inline __ATTRS_o_ai __vector double
657 vec_reve(__vector double __vec) {
658 return (__vector double) { __vec[1], __vec[0] };
661 /*-- vec_sel ----------------------------------------------------------------*/
663 static inline __ATTRS_o_ai __vector signed char
664 vec_sel(__vector signed char __a, __vector signed char __b,
665 __vector unsigned char __c) {
666 return (((__vector signed char)__c & __b) |
667 (~(__vector signed char)__c & __a));
670 static inline __ATTRS_o_ai __vector signed char
671 vec_sel(__vector signed char __a, __vector signed char __b,
672 __vector __bool char __c) {
673 return (((__vector signed char)__c & __b) |
674 (~(__vector signed char)__c & __a));
677 static inline __ATTRS_o_ai __vector __bool char
678 vec_sel(__vector __bool char __a, __vector __bool char __b,
679 __vector unsigned char __c) {
680 return (((__vector __bool char)__c & __b) |
681 (~(__vector __bool char)__c & __a));
684 static inline __ATTRS_o_ai __vector __bool char
685 vec_sel(__vector __bool char __a, __vector __bool char __b,
686 __vector __bool char __c) {
687 return (__c & __b) | (~__c & __a);
690 static inline __ATTRS_o_ai __vector unsigned char
691 vec_sel(__vector unsigned char __a, __vector unsigned char __b,
692 __vector unsigned char __c) {
693 return (__c & __b) | (~__c & __a);
696 static inline __ATTRS_o_ai __vector unsigned char
697 vec_sel(__vector unsigned char __a, __vector unsigned char __b,
698 __vector __bool char __c) {
699 return (((__vector unsigned char)__c & __b) |
700 (~(__vector unsigned char)__c & __a));
703 static inline __ATTRS_o_ai __vector signed short
704 vec_sel(__vector signed short __a, __vector signed short __b,
705 __vector unsigned short __c) {
706 return (((__vector signed short)__c & __b) |
707 (~(__vector signed short)__c & __a));
710 static inline __ATTRS_o_ai __vector signed short
711 vec_sel(__vector signed short __a, __vector signed short __b,
712 __vector __bool short __c) {
713 return (((__vector signed short)__c & __b) |
714 (~(__vector signed short)__c & __a));
717 static inline __ATTRS_o_ai __vector __bool short
718 vec_sel(__vector __bool short __a, __vector __bool short __b,
719 __vector unsigned short __c) {
720 return (((__vector __bool short)__c & __b) |
721 (~(__vector __bool short)__c & __a));
724 static inline __ATTRS_o_ai __vector __bool short
725 vec_sel(__vector __bool short __a, __vector __bool short __b,
726 __vector __bool short __c) {
727 return (__c & __b) | (~__c & __a);
730 static inline __ATTRS_o_ai __vector unsigned short
731 vec_sel(__vector unsigned short __a, __vector unsigned short __b,
732 __vector unsigned short __c) {
733 return (__c & __b) | (~__c & __a);
736 static inline __ATTRS_o_ai __vector unsigned short
737 vec_sel(__vector unsigned short __a, __vector unsigned short __b,
738 __vector __bool short __c) {
739 return (((__vector unsigned short)__c & __b) |
740 (~(__vector unsigned short)__c & __a));
743 static inline __ATTRS_o_ai __vector signed int
744 vec_sel(__vector signed int __a, __vector signed int __b,
745 __vector unsigned int __c) {
746 return (((__vector signed int)__c & __b) |
747 (~(__vector signed int)__c & __a));
750 static inline __ATTRS_o_ai __vector signed int
751 vec_sel(__vector signed int __a, __vector signed int __b,
752 __vector __bool int __c) {
753 return (((__vector signed int)__c & __b) |
754 (~(__vector signed int)__c & __a));
757 static inline __ATTRS_o_ai __vector __bool int
758 vec_sel(__vector __bool int __a, __vector __bool int __b,
759 __vector unsigned int __c) {
760 return (((__vector __bool int)__c & __b) |
761 (~(__vector __bool int)__c & __a));
764 static inline __ATTRS_o_ai __vector __bool int
765 vec_sel(__vector __bool int __a, __vector __bool int __b,
766 __vector __bool int __c) {
767 return (__c & __b) | (~__c & __a);
770 static inline __ATTRS_o_ai __vector unsigned int
771 vec_sel(__vector unsigned int __a, __vector unsigned int __b,
772 __vector unsigned int __c) {
773 return (__c & __b) | (~__c & __a);
776 static inline __ATTRS_o_ai __vector unsigned int
777 vec_sel(__vector unsigned int __a, __vector unsigned int __b,
778 __vector __bool int __c) {
779 return (((__vector unsigned int)__c & __b) |
780 (~(__vector unsigned int)__c & __a));
783 static inline __ATTRS_o_ai __vector signed long long
784 vec_sel(__vector signed long long __a, __vector signed long long __b,
785 __vector unsigned long long __c) {
786 return (((__vector signed long long)__c & __b) |
787 (~(__vector signed long long)__c & __a));
790 static inline __ATTRS_o_ai __vector signed long long
791 vec_sel(__vector signed long long __a, __vector signed long long __b,
792 __vector __bool long long __c) {
793 return (((__vector signed long long)__c & __b) |
794 (~(__vector signed long long)__c & __a));
797 static inline __ATTRS_o_ai __vector __bool long long
798 vec_sel(__vector __bool long long __a, __vector __bool long long __b,
799 __vector unsigned long long __c) {
800 return (((__vector __bool long long)__c & __b) |
801 (~(__vector __bool long long)__c & __a));
804 static inline __ATTRS_o_ai __vector __bool long long
805 vec_sel(__vector __bool long long __a, __vector __bool long long __b,
806 __vector __bool long long __c) {
807 return (__c & __b) | (~__c & __a);
810 static inline __ATTRS_o_ai __vector unsigned long long
811 vec_sel(__vector unsigned long long __a, __vector unsigned long long __b,
812 __vector unsigned long long __c) {
813 return (__c & __b) | (~__c & __a);
816 static inline __ATTRS_o_ai __vector unsigned long long
817 vec_sel(__vector unsigned long long __a, __vector unsigned long long __b,
818 __vector __bool long long __c) {
819 return (((__vector unsigned long long)__c & __b) |
820 (~(__vector unsigned long long)__c & __a));
823 #if __ARCH__ >= 12
824 static inline __ATTRS_o_ai __vector float
825 vec_sel(__vector float __a, __vector float __b, __vector unsigned int __c) {
826 return (__vector float)((__c & (__vector unsigned int)__b) |
827 (~__c & (__vector unsigned int)__a));
830 static inline __ATTRS_o_ai __vector float
831 vec_sel(__vector float __a, __vector float __b, __vector __bool int __c) {
832 __vector unsigned int __ac = (__vector unsigned int)__a;
833 __vector unsigned int __bc = (__vector unsigned int)__b;
834 __vector unsigned int __cc = (__vector unsigned int)__c;
835 return (__vector float)((__cc & __bc) | (~__cc & __ac));
837 #endif
839 static inline __ATTRS_o_ai __vector double
840 vec_sel(__vector double __a, __vector double __b,
841 __vector unsigned long long __c) {
842 return (__vector double)((__c & (__vector unsigned long long)__b) |
843 (~__c & (__vector unsigned long long)__a));
846 static inline __ATTRS_o_ai __vector double
847 vec_sel(__vector double __a, __vector double __b,
848 __vector __bool long long __c) {
849 __vector unsigned long long __ac = (__vector unsigned long long)__a;
850 __vector unsigned long long __bc = (__vector unsigned long long)__b;
851 __vector unsigned long long __cc = (__vector unsigned long long)__c;
852 return (__vector double)((__cc & __bc) | (~__cc & __ac));
855 /*-- vec_gather_element -----------------------------------------------------*/
857 static inline __ATTRS_o_ai __vector signed int
858 vec_gather_element(__vector signed int __vec,
859 __vector unsigned int __offset,
860 const signed int *__ptr, int __index)
861 __constant_range(__index, 0, 3) {
862 __vec[__index] = *(const signed int *)(
863 (const char *)__ptr + __offset[__index]);
864 return __vec;
867 static inline __ATTRS_o_ai __vector __bool int
868 vec_gather_element(__vector __bool int __vec,
869 __vector unsigned int __offset,
870 const unsigned int *__ptr, int __index)
871 __constant_range(__index, 0, 3) {
872 __vec[__index] = *(const unsigned int *)(
873 (const char *)__ptr + __offset[__index]);
874 return __vec;
877 static inline __ATTRS_o_ai __vector unsigned int
878 vec_gather_element(__vector unsigned int __vec,
879 __vector unsigned int __offset,
880 const unsigned int *__ptr, int __index)
881 __constant_range(__index, 0, 3) {
882 __vec[__index] = *(const unsigned int *)(
883 (const char *)__ptr + __offset[__index]);
884 return __vec;
887 static inline __ATTRS_o_ai __vector signed long long
888 vec_gather_element(__vector signed long long __vec,
889 __vector unsigned long long __offset,
890 const signed long long *__ptr, int __index)
891 __constant_range(__index, 0, 1) {
892 __vec[__index] = *(const signed long long *)(
893 (const char *)__ptr + __offset[__index]);
894 return __vec;
897 static inline __ATTRS_o_ai __vector __bool long long
898 vec_gather_element(__vector __bool long long __vec,
899 __vector unsigned long long __offset,
900 const unsigned long long *__ptr, int __index)
901 __constant_range(__index, 0, 1) {
902 __vec[__index] = *(const unsigned long long *)(
903 (const char *)__ptr + __offset[__index]);
904 return __vec;
907 static inline __ATTRS_o_ai __vector unsigned long long
908 vec_gather_element(__vector unsigned long long __vec,
909 __vector unsigned long long __offset,
910 const unsigned long long *__ptr, int __index)
911 __constant_range(__index, 0, 1) {
912 __vec[__index] = *(const unsigned long long *)(
913 (const char *)__ptr + __offset[__index]);
914 return __vec;
917 #if __ARCH__ >= 12
918 static inline __ATTRS_o_ai __vector float
919 vec_gather_element(__vector float __vec,
920 __vector unsigned int __offset,
921 const float *__ptr, int __index)
922 __constant_range(__index, 0, 3) {
923 __vec[__index] = *(const float *)(
924 (const char *)__ptr + __offset[__index]);
925 return __vec;
927 #endif
929 static inline __ATTRS_o_ai __vector double
930 vec_gather_element(__vector double __vec,
931 __vector unsigned long long __offset,
932 const double *__ptr, int __index)
933 __constant_range(__index, 0, 1) {
934 __vec[__index] = *(const double *)(
935 (const char *)__ptr + __offset[__index]);
936 return __vec;
939 /*-- vec_scatter_element ----------------------------------------------------*/
941 static inline __ATTRS_o_ai void
942 vec_scatter_element(__vector signed int __vec,
943 __vector unsigned int __offset,
944 signed int *__ptr, int __index)
945 __constant_range(__index, 0, 3) {
946 *(signed int *)((char *)__ptr + __offset[__index]) =
947 __vec[__index];
950 static inline __ATTRS_o_ai void
951 vec_scatter_element(__vector __bool int __vec,
952 __vector unsigned int __offset,
953 unsigned int *__ptr, int __index)
954 __constant_range(__index, 0, 3) {
955 *(unsigned int *)((char *)__ptr + __offset[__index]) =
956 __vec[__index];
959 static inline __ATTRS_o_ai void
960 vec_scatter_element(__vector unsigned int __vec,
961 __vector unsigned int __offset,
962 unsigned int *__ptr, int __index)
963 __constant_range(__index, 0, 3) {
964 *(unsigned int *)((char *)__ptr + __offset[__index]) =
965 __vec[__index];
968 static inline __ATTRS_o_ai void
969 vec_scatter_element(__vector signed long long __vec,
970 __vector unsigned long long __offset,
971 signed long long *__ptr, int __index)
972 __constant_range(__index, 0, 1) {
973 *(signed long long *)((char *)__ptr + __offset[__index]) =
974 __vec[__index];
977 static inline __ATTRS_o_ai void
978 vec_scatter_element(__vector __bool long long __vec,
979 __vector unsigned long long __offset,
980 unsigned long long *__ptr, int __index)
981 __constant_range(__index, 0, 1) {
982 *(unsigned long long *)((char *)__ptr + __offset[__index]) =
983 __vec[__index];
986 static inline __ATTRS_o_ai void
987 vec_scatter_element(__vector unsigned long long __vec,
988 __vector unsigned long long __offset,
989 unsigned long long *__ptr, int __index)
990 __constant_range(__index, 0, 1) {
991 *(unsigned long long *)((char *)__ptr + __offset[__index]) =
992 __vec[__index];
995 #if __ARCH__ >= 12
996 static inline __ATTRS_o_ai void
997 vec_scatter_element(__vector float __vec,
998 __vector unsigned int __offset,
999 float *__ptr, int __index)
1000 __constant_range(__index, 0, 3) {
1001 *(float *)((char *)__ptr + __offset[__index]) =
1002 __vec[__index];
1004 #endif
1006 static inline __ATTRS_o_ai void
1007 vec_scatter_element(__vector double __vec,
1008 __vector unsigned long long __offset,
1009 double *__ptr, int __index)
1010 __constant_range(__index, 0, 1) {
1011 *(double *)((char *)__ptr + __offset[__index]) =
1012 __vec[__index];
1015 /*-- vec_xl -----------------------------------------------------------------*/
1017 static inline __ATTRS_o_ai __vector signed char
1018 vec_xl(long __offset, const signed char *__ptr) {
1019 __vector signed char V;
1020 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1021 sizeof(__vector signed char));
1022 return V;
1025 static inline __ATTRS_o_ai __vector unsigned char
1026 vec_xl(long __offset, const unsigned char *__ptr) {
1027 __vector unsigned char V;
1028 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1029 sizeof(__vector unsigned char));
1030 return V;
1033 static inline __ATTRS_o_ai __vector signed short
1034 vec_xl(long __offset, const signed short *__ptr) {
1035 __vector signed short V;
1036 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1037 sizeof(__vector signed short));
1038 return V;
1041 static inline __ATTRS_o_ai __vector unsigned short
1042 vec_xl(long __offset, const unsigned short *__ptr) {
1043 __vector unsigned short V;
1044 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1045 sizeof(__vector unsigned short));
1046 return V;
1049 static inline __ATTRS_o_ai __vector signed int
1050 vec_xl(long __offset, const signed int *__ptr) {
1051 __vector signed int V;
1052 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1053 sizeof(__vector signed int));
1054 return V;
1057 static inline __ATTRS_o_ai __vector unsigned int
1058 vec_xl(long __offset, const unsigned int *__ptr) {
1059 __vector unsigned int V;
1060 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1061 sizeof(__vector unsigned int));
1062 return V;
1065 static inline __ATTRS_o_ai __vector signed long long
1066 vec_xl(long __offset, const signed long long *__ptr) {
1067 __vector signed long long V;
1068 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1069 sizeof(__vector signed long long));
1070 return V;
1073 static inline __ATTRS_o_ai __vector unsigned long long
1074 vec_xl(long __offset, const unsigned long long *__ptr) {
1075 __vector unsigned long long V;
1076 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1077 sizeof(__vector unsigned long long));
1078 return V;
1081 #if __ARCH__ >= 12
1082 static inline __ATTRS_o_ai __vector float
1083 vec_xl(long __offset, const float *__ptr) {
1084 __vector float V;
1085 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1086 sizeof(__vector float));
1087 return V;
1089 #endif
1091 static inline __ATTRS_o_ai __vector double
1092 vec_xl(long __offset, const double *__ptr) {
1093 __vector double V;
1094 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1095 sizeof(__vector double));
1096 return V;
1099 /*-- vec_xld2 ---------------------------------------------------------------*/
1101 // This prototype is deprecated.
1102 static inline __ATTRS_o_ai __vector signed char
1103 vec_xld2(long __offset, const signed char *__ptr) {
1104 __vector signed char V;
1105 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1106 sizeof(__vector signed char));
1107 return V;
1110 // This prototype is deprecated.
1111 static inline __ATTRS_o_ai __vector unsigned char
1112 vec_xld2(long __offset, const unsigned char *__ptr) {
1113 __vector unsigned char V;
1114 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1115 sizeof(__vector unsigned char));
1116 return V;
1119 // This prototype is deprecated.
1120 static inline __ATTRS_o_ai __vector signed short
1121 vec_xld2(long __offset, const signed short *__ptr) {
1122 __vector signed short V;
1123 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1124 sizeof(__vector signed short));
1125 return V;
1128 // This prototype is deprecated.
1129 static inline __ATTRS_o_ai __vector unsigned short
1130 vec_xld2(long __offset, const unsigned short *__ptr) {
1131 __vector unsigned short V;
1132 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1133 sizeof(__vector unsigned short));
1134 return V;
1137 // This prototype is deprecated.
1138 static inline __ATTRS_o_ai __vector signed int
1139 vec_xld2(long __offset, const signed int *__ptr) {
1140 __vector signed int V;
1141 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1142 sizeof(__vector signed int));
1143 return V;
1146 // This prototype is deprecated.
1147 static inline __ATTRS_o_ai __vector unsigned int
1148 vec_xld2(long __offset, const unsigned int *__ptr) {
1149 __vector unsigned int V;
1150 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1151 sizeof(__vector unsigned int));
1152 return V;
1155 // This prototype is deprecated.
1156 static inline __ATTRS_o_ai __vector signed long long
1157 vec_xld2(long __offset, const signed long long *__ptr) {
1158 __vector signed long long V;
1159 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1160 sizeof(__vector signed long long));
1161 return V;
1164 // This prototype is deprecated.
1165 static inline __ATTRS_o_ai __vector unsigned long long
1166 vec_xld2(long __offset, const unsigned long long *__ptr) {
1167 __vector unsigned long long V;
1168 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1169 sizeof(__vector unsigned long long));
1170 return V;
1173 // This prototype is deprecated.
1174 static inline __ATTRS_o_ai __vector double
1175 vec_xld2(long __offset, const double *__ptr) {
1176 __vector double V;
1177 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1178 sizeof(__vector double));
1179 return V;
1182 /*-- vec_xlw4 ---------------------------------------------------------------*/
1184 // This prototype is deprecated.
1185 static inline __ATTRS_o_ai __vector signed char
1186 vec_xlw4(long __offset, const signed char *__ptr) {
1187 __vector signed char V;
1188 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1189 sizeof(__vector signed char));
1190 return V;
1193 // This prototype is deprecated.
1194 static inline __ATTRS_o_ai __vector unsigned char
1195 vec_xlw4(long __offset, const unsigned char *__ptr) {
1196 __vector unsigned char V;
1197 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1198 sizeof(__vector unsigned char));
1199 return V;
1202 // This prototype is deprecated.
1203 static inline __ATTRS_o_ai __vector signed short
1204 vec_xlw4(long __offset, const signed short *__ptr) {
1205 __vector signed short V;
1206 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1207 sizeof(__vector signed short));
1208 return V;
1211 // This prototype is deprecated.
1212 static inline __ATTRS_o_ai __vector unsigned short
1213 vec_xlw4(long __offset, const unsigned short *__ptr) {
1214 __vector unsigned short V;
1215 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1216 sizeof(__vector unsigned short));
1217 return V;
1220 // This prototype is deprecated.
1221 static inline __ATTRS_o_ai __vector signed int
1222 vec_xlw4(long __offset, const signed int *__ptr) {
1223 __vector signed int V;
1224 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1225 sizeof(__vector signed int));
1226 return V;
1229 // This prototype is deprecated.
1230 static inline __ATTRS_o_ai __vector unsigned int
1231 vec_xlw4(long __offset, const unsigned int *__ptr) {
1232 __vector unsigned int V;
1233 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1234 sizeof(__vector unsigned int));
1235 return V;
1238 /*-- vec_xst ----------------------------------------------------------------*/
1240 static inline __ATTRS_o_ai void
1241 vec_xst(__vector signed char __vec, long __offset, signed char *__ptr) {
1242 __vector signed char V = __vec;
1243 __builtin_memcpy(((char *)__ptr + __offset), &V,
1244 sizeof(__vector signed char));
1247 static inline __ATTRS_o_ai void
1248 vec_xst(__vector unsigned char __vec, long __offset, unsigned char *__ptr) {
1249 __vector unsigned char V = __vec;
1250 __builtin_memcpy(((char *)__ptr + __offset), &V,
1251 sizeof(__vector unsigned char));
1254 static inline __ATTRS_o_ai void
1255 vec_xst(__vector signed short __vec, long __offset, signed short *__ptr) {
1256 __vector signed short V = __vec;
1257 __builtin_memcpy(((char *)__ptr + __offset), &V,
1258 sizeof(__vector signed short));
1261 static inline __ATTRS_o_ai void
1262 vec_xst(__vector unsigned short __vec, long __offset, unsigned short *__ptr) {
1263 __vector unsigned short V = __vec;
1264 __builtin_memcpy(((char *)__ptr + __offset), &V,
1265 sizeof(__vector unsigned short));
1268 static inline __ATTRS_o_ai void
1269 vec_xst(__vector signed int __vec, long __offset, signed int *__ptr) {
1270 __vector signed int V = __vec;
1271 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector signed int));
1274 static inline __ATTRS_o_ai void
1275 vec_xst(__vector unsigned int __vec, long __offset, unsigned int *__ptr) {
1276 __vector unsigned int V = __vec;
1277 __builtin_memcpy(((char *)__ptr + __offset), &V,
1278 sizeof(__vector unsigned int));
1281 static inline __ATTRS_o_ai void
1282 vec_xst(__vector signed long long __vec, long __offset,
1283 signed long long *__ptr) {
1284 __vector signed long long V = __vec;
1285 __builtin_memcpy(((char *)__ptr + __offset), &V,
1286 sizeof(__vector signed long long));
1289 static inline __ATTRS_o_ai void
1290 vec_xst(__vector unsigned long long __vec, long __offset,
1291 unsigned long long *__ptr) {
1292 __vector unsigned long long V = __vec;
1293 __builtin_memcpy(((char *)__ptr + __offset), &V,
1294 sizeof(__vector unsigned long long));
1297 #if __ARCH__ >= 12
1298 static inline __ATTRS_o_ai void
1299 vec_xst(__vector float __vec, long __offset, float *__ptr) {
1300 __vector float V = __vec;
1301 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector float));
1303 #endif
1305 static inline __ATTRS_o_ai void
1306 vec_xst(__vector double __vec, long __offset, double *__ptr) {
1307 __vector double V = __vec;
1308 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector double));
1311 /*-- vec_xstd2 --------------------------------------------------------------*/
1313 // This prototype is deprecated.
1314 static inline __ATTRS_o_ai void
1315 vec_xstd2(__vector signed char __vec, long __offset, signed char *__ptr) {
1316 __vector signed char V = __vec;
1317 __builtin_memcpy(((char *)__ptr + __offset), &V,
1318 sizeof(__vector signed char));
1321 // This prototype is deprecated.
1322 static inline __ATTRS_o_ai void
1323 vec_xstd2(__vector unsigned char __vec, long __offset, unsigned char *__ptr) {
1324 __vector unsigned char V = __vec;
1325 __builtin_memcpy(((char *)__ptr + __offset), &V,
1326 sizeof(__vector unsigned char));
1329 // This prototype is deprecated.
1330 static inline __ATTRS_o_ai void
1331 vec_xstd2(__vector signed short __vec, long __offset, signed short *__ptr) {
1332 __vector signed short V = __vec;
1333 __builtin_memcpy(((char *)__ptr + __offset), &V,
1334 sizeof(__vector signed short));
1337 // This prototype is deprecated.
1338 static inline __ATTRS_o_ai void
1339 vec_xstd2(__vector unsigned short __vec, long __offset, unsigned short *__ptr) {
1340 __vector unsigned short V = __vec;
1341 __builtin_memcpy(((char *)__ptr + __offset), &V,
1342 sizeof(__vector unsigned short));
1345 // This prototype is deprecated.
1346 static inline __ATTRS_o_ai void
1347 vec_xstd2(__vector signed int __vec, long __offset, signed int *__ptr) {
1348 __vector signed int V = __vec;
1349 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector signed int));
1352 // This prototype is deprecated.
1353 static inline __ATTRS_o_ai void
1354 vec_xstd2(__vector unsigned int __vec, long __offset, unsigned int *__ptr) {
1355 __vector unsigned int V = __vec;
1356 __builtin_memcpy(((char *)__ptr + __offset), &V,
1357 sizeof(__vector unsigned int));
1360 // This prototype is deprecated.
1361 static inline __ATTRS_o_ai void
1362 vec_xstd2(__vector signed long long __vec, long __offset,
1363 signed long long *__ptr) {
1364 __vector signed long long V = __vec;
1365 __builtin_memcpy(((char *)__ptr + __offset), &V,
1366 sizeof(__vector signed long long));
1369 // This prototype is deprecated.
1370 static inline __ATTRS_o_ai void
1371 vec_xstd2(__vector unsigned long long __vec, long __offset,
1372 unsigned long long *__ptr) {
1373 __vector unsigned long long V = __vec;
1374 __builtin_memcpy(((char *)__ptr + __offset), &V,
1375 sizeof(__vector unsigned long long));
1378 // This prototype is deprecated.
1379 static inline __ATTRS_o_ai void
1380 vec_xstd2(__vector double __vec, long __offset, double *__ptr) {
1381 __vector double V = __vec;
1382 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector double));
1385 /*-- vec_xstw4 --------------------------------------------------------------*/
1387 // This prototype is deprecated.
1388 static inline __ATTRS_o_ai void
1389 vec_xstw4(__vector signed char __vec, long __offset, signed char *__ptr) {
1390 __vector signed char V = __vec;
1391 __builtin_memcpy(((char *)__ptr + __offset), &V,
1392 sizeof(__vector signed char));
1395 // This prototype is deprecated.
1396 static inline __ATTRS_o_ai void
1397 vec_xstw4(__vector unsigned char __vec, long __offset, unsigned char *__ptr) {
1398 __vector unsigned char V = __vec;
1399 __builtin_memcpy(((char *)__ptr + __offset), &V,
1400 sizeof(__vector unsigned char));
1403 // This prototype is deprecated.
1404 static inline __ATTRS_o_ai void
1405 vec_xstw4(__vector signed short __vec, long __offset, signed short *__ptr) {
1406 __vector signed short V = __vec;
1407 __builtin_memcpy(((char *)__ptr + __offset), &V,
1408 sizeof(__vector signed short));
1411 // This prototype is deprecated.
1412 static inline __ATTRS_o_ai void
1413 vec_xstw4(__vector unsigned short __vec, long __offset, unsigned short *__ptr) {
1414 __vector unsigned short V = __vec;
1415 __builtin_memcpy(((char *)__ptr + __offset), &V,
1416 sizeof(__vector unsigned short));
1419 // This prototype is deprecated.
1420 static inline __ATTRS_o_ai void
1421 vec_xstw4(__vector signed int __vec, long __offset, signed int *__ptr) {
1422 __vector signed int V = __vec;
1423 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector signed int));
1426 // This prototype is deprecated.
1427 static inline __ATTRS_o_ai void
1428 vec_xstw4(__vector unsigned int __vec, long __offset, unsigned int *__ptr) {
1429 __vector unsigned int V = __vec;
1430 __builtin_memcpy(((char *)__ptr + __offset), &V,
1431 sizeof(__vector unsigned int));
1434 /*-- vec_load_bndry ---------------------------------------------------------*/
1436 extern __ATTRS_o __vector signed char
1437 vec_load_bndry(const signed char *__ptr, unsigned short __len)
1438 __constant_pow2_range(__len, 64, 4096);
1440 extern __ATTRS_o __vector unsigned char
1441 vec_load_bndry(const unsigned char *__ptr, unsigned short __len)
1442 __constant_pow2_range(__len, 64, 4096);
1444 extern __ATTRS_o __vector signed short
1445 vec_load_bndry(const signed short *__ptr, unsigned short __len)
1446 __constant_pow2_range(__len, 64, 4096);
1448 extern __ATTRS_o __vector unsigned short
1449 vec_load_bndry(const unsigned short *__ptr, unsigned short __len)
1450 __constant_pow2_range(__len, 64, 4096);
1452 extern __ATTRS_o __vector signed int
1453 vec_load_bndry(const signed int *__ptr, unsigned short __len)
1454 __constant_pow2_range(__len, 64, 4096);
1456 extern __ATTRS_o __vector unsigned int
1457 vec_load_bndry(const unsigned int *__ptr, unsigned short __len)
1458 __constant_pow2_range(__len, 64, 4096);
1460 extern __ATTRS_o __vector signed long long
1461 vec_load_bndry(const signed long long *__ptr, unsigned short __len)
1462 __constant_pow2_range(__len, 64, 4096);
1464 extern __ATTRS_o __vector unsigned long long
1465 vec_load_bndry(const unsigned long long *__ptr, unsigned short __len)
1466 __constant_pow2_range(__len, 64, 4096);
1468 #if __ARCH__ >= 12
1469 extern __ATTRS_o __vector float
1470 vec_load_bndry(const float *__ptr, unsigned short __len)
1471 __constant_pow2_range(__len, 64, 4096);
1472 #endif
1474 extern __ATTRS_o __vector double
1475 vec_load_bndry(const double *__ptr, unsigned short __len)
1476 __constant_pow2_range(__len, 64, 4096);
1478 #define vec_load_bndry(X, Y) ((__typeof__((vec_load_bndry)((X), (Y)))) \
1479 __builtin_s390_vlbb((X), ((Y) == 64 ? 0 : \
1480 (Y) == 128 ? 1 : \
1481 (Y) == 256 ? 2 : \
1482 (Y) == 512 ? 3 : \
1483 (Y) == 1024 ? 4 : \
1484 (Y) == 2048 ? 5 : \
1485 (Y) == 4096 ? 6 : -1)))
1487 /*-- vec_load_len -----------------------------------------------------------*/
1489 static inline __ATTRS_o_ai __vector signed char
1490 vec_load_len(const signed char *__ptr, unsigned int __len) {
1491 return (__vector signed char)__builtin_s390_vll(__len, __ptr);
1494 static inline __ATTRS_o_ai __vector unsigned char
1495 vec_load_len(const unsigned char *__ptr, unsigned int __len) {
1496 return (__vector unsigned char)__builtin_s390_vll(__len, __ptr);
1499 static inline __ATTRS_o_ai __vector signed short
1500 vec_load_len(const signed short *__ptr, unsigned int __len) {
1501 return (__vector signed short)__builtin_s390_vll(__len, __ptr);
1504 static inline __ATTRS_o_ai __vector unsigned short
1505 vec_load_len(const unsigned short *__ptr, unsigned int __len) {
1506 return (__vector unsigned short)__builtin_s390_vll(__len, __ptr);
1509 static inline __ATTRS_o_ai __vector signed int
1510 vec_load_len(const signed int *__ptr, unsigned int __len) {
1511 return (__vector signed int)__builtin_s390_vll(__len, __ptr);
1514 static inline __ATTRS_o_ai __vector unsigned int
1515 vec_load_len(const unsigned int *__ptr, unsigned int __len) {
1516 return (__vector unsigned int)__builtin_s390_vll(__len, __ptr);
1519 static inline __ATTRS_o_ai __vector signed long long
1520 vec_load_len(const signed long long *__ptr, unsigned int __len) {
1521 return (__vector signed long long)__builtin_s390_vll(__len, __ptr);
1524 static inline __ATTRS_o_ai __vector unsigned long long
1525 vec_load_len(const unsigned long long *__ptr, unsigned int __len) {
1526 return (__vector unsigned long long)__builtin_s390_vll(__len, __ptr);
1529 #if __ARCH__ >= 12
1530 static inline __ATTRS_o_ai __vector float
1531 vec_load_len(const float *__ptr, unsigned int __len) {
1532 return (__vector float)__builtin_s390_vll(__len, __ptr);
1534 #endif
1536 static inline __ATTRS_o_ai __vector double
1537 vec_load_len(const double *__ptr, unsigned int __len) {
1538 return (__vector double)__builtin_s390_vll(__len, __ptr);
1541 /*-- vec_load_len_r ---------------------------------------------------------*/
1543 #if __ARCH__ >= 12
1544 static inline __ATTRS_ai __vector unsigned char
1545 vec_load_len_r(const unsigned char *__ptr, unsigned int __len) {
1546 return (__vector unsigned char)__builtin_s390_vlrl(__len, __ptr);
1548 #endif
1550 /*-- vec_store_len ----------------------------------------------------------*/
1552 static inline __ATTRS_o_ai void
1553 vec_store_len(__vector signed char __vec, signed char *__ptr,
1554 unsigned int __len) {
1555 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1558 static inline __ATTRS_o_ai void
1559 vec_store_len(__vector unsigned char __vec, unsigned char *__ptr,
1560 unsigned int __len) {
1561 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1564 static inline __ATTRS_o_ai void
1565 vec_store_len(__vector signed short __vec, signed short *__ptr,
1566 unsigned int __len) {
1567 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1570 static inline __ATTRS_o_ai void
1571 vec_store_len(__vector unsigned short __vec, unsigned short *__ptr,
1572 unsigned int __len) {
1573 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1576 static inline __ATTRS_o_ai void
1577 vec_store_len(__vector signed int __vec, signed int *__ptr,
1578 unsigned int __len) {
1579 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1582 static inline __ATTRS_o_ai void
1583 vec_store_len(__vector unsigned int __vec, unsigned int *__ptr,
1584 unsigned int __len) {
1585 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1588 static inline __ATTRS_o_ai void
1589 vec_store_len(__vector signed long long __vec, signed long long *__ptr,
1590 unsigned int __len) {
1591 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1594 static inline __ATTRS_o_ai void
1595 vec_store_len(__vector unsigned long long __vec, unsigned long long *__ptr,
1596 unsigned int __len) {
1597 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1600 #if __ARCH__ >= 12
1601 static inline __ATTRS_o_ai void
1602 vec_store_len(__vector float __vec, float *__ptr,
1603 unsigned int __len) {
1604 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1606 #endif
1608 static inline __ATTRS_o_ai void
1609 vec_store_len(__vector double __vec, double *__ptr,
1610 unsigned int __len) {
1611 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1614 /*-- vec_store_len_r --------------------------------------------------------*/
1616 #if __ARCH__ >= 12
1617 static inline __ATTRS_ai void
1618 vec_store_len_r(__vector unsigned char __vec, unsigned char *__ptr,
1619 unsigned int __len) {
1620 __builtin_s390_vstrl((__vector signed char)__vec, __len, __ptr);
1622 #endif
1624 /*-- vec_load_pair ----------------------------------------------------------*/
1626 static inline __ATTRS_o_ai __vector signed long long
1627 vec_load_pair(signed long long __a, signed long long __b) {
1628 return (__vector signed long long)(__a, __b);
1631 static inline __ATTRS_o_ai __vector unsigned long long
1632 vec_load_pair(unsigned long long __a, unsigned long long __b) {
1633 return (__vector unsigned long long)(__a, __b);
1636 /*-- vec_genmask ------------------------------------------------------------*/
1638 static inline __ATTRS_o_ai __vector unsigned char
1639 vec_genmask(unsigned short __mask)
1640 __constant(__mask) {
1641 return (__vector unsigned char)(
1642 __mask & 0x8000 ? 0xff : 0,
1643 __mask & 0x4000 ? 0xff : 0,
1644 __mask & 0x2000 ? 0xff : 0,
1645 __mask & 0x1000 ? 0xff : 0,
1646 __mask & 0x0800 ? 0xff : 0,
1647 __mask & 0x0400 ? 0xff : 0,
1648 __mask & 0x0200 ? 0xff : 0,
1649 __mask & 0x0100 ? 0xff : 0,
1650 __mask & 0x0080 ? 0xff : 0,
1651 __mask & 0x0040 ? 0xff : 0,
1652 __mask & 0x0020 ? 0xff : 0,
1653 __mask & 0x0010 ? 0xff : 0,
1654 __mask & 0x0008 ? 0xff : 0,
1655 __mask & 0x0004 ? 0xff : 0,
1656 __mask & 0x0002 ? 0xff : 0,
1657 __mask & 0x0001 ? 0xff : 0);
1660 /*-- vec_genmasks_* ---------------------------------------------------------*/
1662 static inline __ATTRS_o_ai __vector unsigned char
1663 vec_genmasks_8(unsigned char __first, unsigned char __last)
1664 __constant(__first) __constant(__last) {
1665 unsigned char __bit1 = __first & 7;
1666 unsigned char __bit2 = __last & 7;
1667 unsigned char __mask1 = (unsigned char)(1U << (7 - __bit1) << 1) - 1;
1668 unsigned char __mask2 = (unsigned char)(1U << (7 - __bit2)) - 1;
1669 unsigned char __value = (__bit1 <= __bit2 ?
1670 __mask1 & ~__mask2 :
1671 __mask1 | ~__mask2);
1672 return (__vector unsigned char)__value;
1675 static inline __ATTRS_o_ai __vector unsigned short
1676 vec_genmasks_16(unsigned char __first, unsigned char __last)
1677 __constant(__first) __constant(__last) {
1678 unsigned char __bit1 = __first & 15;
1679 unsigned char __bit2 = __last & 15;
1680 unsigned short __mask1 = (unsigned short)(1U << (15 - __bit1) << 1) - 1;
1681 unsigned short __mask2 = (unsigned short)(1U << (15 - __bit2)) - 1;
1682 unsigned short __value = (__bit1 <= __bit2 ?
1683 __mask1 & ~__mask2 :
1684 __mask1 | ~__mask2);
1685 return (__vector unsigned short)__value;
1688 static inline __ATTRS_o_ai __vector unsigned int
1689 vec_genmasks_32(unsigned char __first, unsigned char __last)
1690 __constant(__first) __constant(__last) {
1691 unsigned char __bit1 = __first & 31;
1692 unsigned char __bit2 = __last & 31;
1693 unsigned int __mask1 = (1U << (31 - __bit1) << 1) - 1;
1694 unsigned int __mask2 = (1U << (31 - __bit2)) - 1;
1695 unsigned int __value = (__bit1 <= __bit2 ?
1696 __mask1 & ~__mask2 :
1697 __mask1 | ~__mask2);
1698 return (__vector unsigned int)__value;
1701 static inline __ATTRS_o_ai __vector unsigned long long
1702 vec_genmasks_64(unsigned char __first, unsigned char __last)
1703 __constant(__first) __constant(__last) {
1704 unsigned char __bit1 = __first & 63;
1705 unsigned char __bit2 = __last & 63;
1706 unsigned long long __mask1 = (1ULL << (63 - __bit1) << 1) - 1;
1707 unsigned long long __mask2 = (1ULL << (63 - __bit2)) - 1;
1708 unsigned long long __value = (__bit1 <= __bit2 ?
1709 __mask1 & ~__mask2 :
1710 __mask1 | ~__mask2);
1711 return (__vector unsigned long long)__value;
1714 /*-- vec_splat --------------------------------------------------------------*/
1716 static inline __ATTRS_o_ai __vector signed char
1717 vec_splat(__vector signed char __vec, int __index)
1718 __constant_range(__index, 0, 15) {
1719 return (__vector signed char)__vec[__index];
1722 static inline __ATTRS_o_ai __vector __bool char
1723 vec_splat(__vector __bool char __vec, int __index)
1724 __constant_range(__index, 0, 15) {
1725 return (__vector __bool char)(__vector unsigned char)__vec[__index];
1728 static inline __ATTRS_o_ai __vector unsigned char
1729 vec_splat(__vector unsigned char __vec, int __index)
1730 __constant_range(__index, 0, 15) {
1731 return (__vector unsigned char)__vec[__index];
1734 static inline __ATTRS_o_ai __vector signed short
1735 vec_splat(__vector signed short __vec, int __index)
1736 __constant_range(__index, 0, 7) {
1737 return (__vector signed short)__vec[__index];
1740 static inline __ATTRS_o_ai __vector __bool short
1741 vec_splat(__vector __bool short __vec, int __index)
1742 __constant_range(__index, 0, 7) {
1743 return (__vector __bool short)(__vector unsigned short)__vec[__index];
1746 static inline __ATTRS_o_ai __vector unsigned short
1747 vec_splat(__vector unsigned short __vec, int __index)
1748 __constant_range(__index, 0, 7) {
1749 return (__vector unsigned short)__vec[__index];
1752 static inline __ATTRS_o_ai __vector signed int
1753 vec_splat(__vector signed int __vec, int __index)
1754 __constant_range(__index, 0, 3) {
1755 return (__vector signed int)__vec[__index];
1758 static inline __ATTRS_o_ai __vector __bool int
1759 vec_splat(__vector __bool int __vec, int __index)
1760 __constant_range(__index, 0, 3) {
1761 return (__vector __bool int)(__vector unsigned int)__vec[__index];
1764 static inline __ATTRS_o_ai __vector unsigned int
1765 vec_splat(__vector unsigned int __vec, int __index)
1766 __constant_range(__index, 0, 3) {
1767 return (__vector unsigned int)__vec[__index];
1770 static inline __ATTRS_o_ai __vector signed long long
1771 vec_splat(__vector signed long long __vec, int __index)
1772 __constant_range(__index, 0, 1) {
1773 return (__vector signed long long)__vec[__index];
1776 static inline __ATTRS_o_ai __vector __bool long long
1777 vec_splat(__vector __bool long long __vec, int __index)
1778 __constant_range(__index, 0, 1) {
1779 return ((__vector __bool long long)
1780 (__vector unsigned long long)__vec[__index]);
1783 static inline __ATTRS_o_ai __vector unsigned long long
1784 vec_splat(__vector unsigned long long __vec, int __index)
1785 __constant_range(__index, 0, 1) {
1786 return (__vector unsigned long long)__vec[__index];
1789 #if __ARCH__ >= 12
1790 static inline __ATTRS_o_ai __vector float
1791 vec_splat(__vector float __vec, int __index)
1792 __constant_range(__index, 0, 3) {
1793 return (__vector float)__vec[__index];
1795 #endif
1797 static inline __ATTRS_o_ai __vector double
1798 vec_splat(__vector double __vec, int __index)
1799 __constant_range(__index, 0, 1) {
1800 return (__vector double)__vec[__index];
1803 /*-- vec_splat_s* -----------------------------------------------------------*/
1805 static inline __ATTRS_ai __vector signed char
1806 vec_splat_s8(signed char __scalar)
1807 __constant(__scalar) {
1808 return (__vector signed char)__scalar;
1811 static inline __ATTRS_ai __vector signed short
1812 vec_splat_s16(signed short __scalar)
1813 __constant(__scalar) {
1814 return (__vector signed short)__scalar;
1817 static inline __ATTRS_ai __vector signed int
1818 vec_splat_s32(signed short __scalar)
1819 __constant(__scalar) {
1820 return (__vector signed int)(signed int)__scalar;
1823 static inline __ATTRS_ai __vector signed long long
1824 vec_splat_s64(signed short __scalar)
1825 __constant(__scalar) {
1826 return (__vector signed long long)(signed long)__scalar;
1829 /*-- vec_splat_u* -----------------------------------------------------------*/
1831 static inline __ATTRS_ai __vector unsigned char
1832 vec_splat_u8(unsigned char __scalar)
1833 __constant(__scalar) {
1834 return (__vector unsigned char)__scalar;
1837 static inline __ATTRS_ai __vector unsigned short
1838 vec_splat_u16(unsigned short __scalar)
1839 __constant(__scalar) {
1840 return (__vector unsigned short)__scalar;
1843 static inline __ATTRS_ai __vector unsigned int
1844 vec_splat_u32(signed short __scalar)
1845 __constant(__scalar) {
1846 return (__vector unsigned int)(signed int)__scalar;
1849 static inline __ATTRS_ai __vector unsigned long long
1850 vec_splat_u64(signed short __scalar)
1851 __constant(__scalar) {
1852 return (__vector unsigned long long)(signed long long)__scalar;
1855 /*-- vec_splats -------------------------------------------------------------*/
1857 static inline __ATTRS_o_ai __vector signed char
1858 vec_splats(signed char __scalar) {
1859 return (__vector signed char)__scalar;
1862 static inline __ATTRS_o_ai __vector unsigned char
1863 vec_splats(unsigned char __scalar) {
1864 return (__vector unsigned char)__scalar;
1867 static inline __ATTRS_o_ai __vector signed short
1868 vec_splats(signed short __scalar) {
1869 return (__vector signed short)__scalar;
1872 static inline __ATTRS_o_ai __vector unsigned short
1873 vec_splats(unsigned short __scalar) {
1874 return (__vector unsigned short)__scalar;
1877 static inline __ATTRS_o_ai __vector signed int
1878 vec_splats(signed int __scalar) {
1879 return (__vector signed int)__scalar;
1882 static inline __ATTRS_o_ai __vector unsigned int
1883 vec_splats(unsigned int __scalar) {
1884 return (__vector unsigned int)__scalar;
1887 static inline __ATTRS_o_ai __vector signed long long
1888 vec_splats(signed long long __scalar) {
1889 return (__vector signed long long)__scalar;
1892 static inline __ATTRS_o_ai __vector unsigned long long
1893 vec_splats(unsigned long long __scalar) {
1894 return (__vector unsigned long long)__scalar;
1897 #if __ARCH__ >= 12
1898 static inline __ATTRS_o_ai __vector float
1899 vec_splats(float __scalar) {
1900 return (__vector float)__scalar;
1902 #endif
1904 static inline __ATTRS_o_ai __vector double
1905 vec_splats(double __scalar) {
1906 return (__vector double)__scalar;
1909 /*-- vec_extend_s64 ---------------------------------------------------------*/
1911 static inline __ATTRS_o_ai __vector signed long long
1912 vec_extend_s64(__vector signed char __a) {
1913 return (__vector signed long long)(__a[7], __a[15]);
1916 static inline __ATTRS_o_ai __vector signed long long
1917 vec_extend_s64(__vector signed short __a) {
1918 return (__vector signed long long)(__a[3], __a[7]);
1921 static inline __ATTRS_o_ai __vector signed long long
1922 vec_extend_s64(__vector signed int __a) {
1923 return (__vector signed long long)(__a[1], __a[3]);
1926 /*-- vec_mergeh -------------------------------------------------------------*/
1928 static inline __ATTRS_o_ai __vector signed char
1929 vec_mergeh(__vector signed char __a, __vector signed char __b) {
1930 return (__vector signed char)(
1931 __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3],
1932 __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
1935 static inline __ATTRS_o_ai __vector __bool char
1936 vec_mergeh(__vector __bool char __a, __vector __bool char __b) {
1937 return (__vector __bool char)(
1938 __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3],
1939 __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
1942 static inline __ATTRS_o_ai __vector unsigned char
1943 vec_mergeh(__vector unsigned char __a, __vector unsigned char __b) {
1944 return (__vector unsigned char)(
1945 __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3],
1946 __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
1949 static inline __ATTRS_o_ai __vector signed short
1950 vec_mergeh(__vector signed short __a, __vector signed short __b) {
1951 return (__vector signed short)(
1952 __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]);
1955 static inline __ATTRS_o_ai __vector __bool short
1956 vec_mergeh(__vector __bool short __a, __vector __bool short __b) {
1957 return (__vector __bool short)(
1958 __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]);
1961 static inline __ATTRS_o_ai __vector unsigned short
1962 vec_mergeh(__vector unsigned short __a, __vector unsigned short __b) {
1963 return (__vector unsigned short)(
1964 __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]);
1967 static inline __ATTRS_o_ai __vector signed int
1968 vec_mergeh(__vector signed int __a, __vector signed int __b) {
1969 return (__vector signed int)(__a[0], __b[0], __a[1], __b[1]);
1972 static inline __ATTRS_o_ai __vector __bool int
1973 vec_mergeh(__vector __bool int __a, __vector __bool int __b) {
1974 return (__vector __bool int)(__a[0], __b[0], __a[1], __b[1]);
1977 static inline __ATTRS_o_ai __vector unsigned int
1978 vec_mergeh(__vector unsigned int __a, __vector unsigned int __b) {
1979 return (__vector unsigned int)(__a[0], __b[0], __a[1], __b[1]);
1982 static inline __ATTRS_o_ai __vector signed long long
1983 vec_mergeh(__vector signed long long __a, __vector signed long long __b) {
1984 return (__vector signed long long)(__a[0], __b[0]);
1987 static inline __ATTRS_o_ai __vector __bool long long
1988 vec_mergeh(__vector __bool long long __a, __vector __bool long long __b) {
1989 return (__vector __bool long long)(__a[0], __b[0]);
1992 static inline __ATTRS_o_ai __vector unsigned long long
1993 vec_mergeh(__vector unsigned long long __a, __vector unsigned long long __b) {
1994 return (__vector unsigned long long)(__a[0], __b[0]);
1997 #if __ARCH__ >= 12
1998 static inline __ATTRS_o_ai __vector float
1999 vec_mergeh(__vector float __a, __vector float __b) {
2000 return (__vector float)(__a[0], __b[0], __a[1], __b[1]);
2002 #endif
2004 static inline __ATTRS_o_ai __vector double
2005 vec_mergeh(__vector double __a, __vector double __b) {
2006 return (__vector double)(__a[0], __b[0]);
2009 /*-- vec_mergel -------------------------------------------------------------*/
2011 static inline __ATTRS_o_ai __vector signed char
2012 vec_mergel(__vector signed char __a, __vector signed char __b) {
2013 return (__vector signed char)(
2014 __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11],
2015 __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]);
2018 static inline __ATTRS_o_ai __vector __bool char
2019 vec_mergel(__vector __bool char __a, __vector __bool char __b) {
2020 return (__vector __bool char)(
2021 __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11],
2022 __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]);
2025 static inline __ATTRS_o_ai __vector unsigned char
2026 vec_mergel(__vector unsigned char __a, __vector unsigned char __b) {
2027 return (__vector unsigned char)(
2028 __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11],
2029 __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]);
2032 static inline __ATTRS_o_ai __vector signed short
2033 vec_mergel(__vector signed short __a, __vector signed short __b) {
2034 return (__vector signed short)(
2035 __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
2038 static inline __ATTRS_o_ai __vector __bool short
2039 vec_mergel(__vector __bool short __a, __vector __bool short __b) {
2040 return (__vector __bool short)(
2041 __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
2044 static inline __ATTRS_o_ai __vector unsigned short
2045 vec_mergel(__vector unsigned short __a, __vector unsigned short __b) {
2046 return (__vector unsigned short)(
2047 __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]);
2050 static inline __ATTRS_o_ai __vector signed int
2051 vec_mergel(__vector signed int __a, __vector signed int __b) {
2052 return (__vector signed int)(__a[2], __b[2], __a[3], __b[3]);
2055 static inline __ATTRS_o_ai __vector __bool int
2056 vec_mergel(__vector __bool int __a, __vector __bool int __b) {
2057 return (__vector __bool int)(__a[2], __b[2], __a[3], __b[3]);
2060 static inline __ATTRS_o_ai __vector unsigned int
2061 vec_mergel(__vector unsigned int __a, __vector unsigned int __b) {
2062 return (__vector unsigned int)(__a[2], __b[2], __a[3], __b[3]);
2065 static inline __ATTRS_o_ai __vector signed long long
2066 vec_mergel(__vector signed long long __a, __vector signed long long __b) {
2067 return (__vector signed long long)(__a[1], __b[1]);
2070 static inline __ATTRS_o_ai __vector __bool long long
2071 vec_mergel(__vector __bool long long __a, __vector __bool long long __b) {
2072 return (__vector __bool long long)(__a[1], __b[1]);
2075 static inline __ATTRS_o_ai __vector unsigned long long
2076 vec_mergel(__vector unsigned long long __a, __vector unsigned long long __b) {
2077 return (__vector unsigned long long)(__a[1], __b[1]);
2080 #if __ARCH__ >= 12
2081 static inline __ATTRS_o_ai __vector float
2082 vec_mergel(__vector float __a, __vector float __b) {
2083 return (__vector float)(__a[2], __b[2], __a[3], __b[3]);
2085 #endif
2087 static inline __ATTRS_o_ai __vector double
2088 vec_mergel(__vector double __a, __vector double __b) {
2089 return (__vector double)(__a[1], __b[1]);
2092 /*-- vec_pack ---------------------------------------------------------------*/
2094 static inline __ATTRS_o_ai __vector signed char
2095 vec_pack(__vector signed short __a, __vector signed short __b) {
2096 __vector signed char __ac = (__vector signed char)__a;
2097 __vector signed char __bc = (__vector signed char)__b;
2098 return (__vector signed char)(
2099 __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15],
2100 __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]);
2103 static inline __ATTRS_o_ai __vector __bool char
2104 vec_pack(__vector __bool short __a, __vector __bool short __b) {
2105 __vector __bool char __ac = (__vector __bool char)__a;
2106 __vector __bool char __bc = (__vector __bool char)__b;
2107 return (__vector __bool char)(
2108 __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15],
2109 __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]);
2112 static inline __ATTRS_o_ai __vector unsigned char
2113 vec_pack(__vector unsigned short __a, __vector unsigned short __b) {
2114 __vector unsigned char __ac = (__vector unsigned char)__a;
2115 __vector unsigned char __bc = (__vector unsigned char)__b;
2116 return (__vector unsigned char)(
2117 __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15],
2118 __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]);
2121 static inline __ATTRS_o_ai __vector signed short
2122 vec_pack(__vector signed int __a, __vector signed int __b) {
2123 __vector signed short __ac = (__vector signed short)__a;
2124 __vector signed short __bc = (__vector signed short)__b;
2125 return (__vector signed short)(
2126 __ac[1], __ac[3], __ac[5], __ac[7],
2127 __bc[1], __bc[3], __bc[5], __bc[7]);
2130 static inline __ATTRS_o_ai __vector __bool short
2131 vec_pack(__vector __bool int __a, __vector __bool int __b) {
2132 __vector __bool short __ac = (__vector __bool short)__a;
2133 __vector __bool short __bc = (__vector __bool short)__b;
2134 return (__vector __bool short)(
2135 __ac[1], __ac[3], __ac[5], __ac[7],
2136 __bc[1], __bc[3], __bc[5], __bc[7]);
2139 static inline __ATTRS_o_ai __vector unsigned short
2140 vec_pack(__vector unsigned int __a, __vector unsigned int __b) {
2141 __vector unsigned short __ac = (__vector unsigned short)__a;
2142 __vector unsigned short __bc = (__vector unsigned short)__b;
2143 return (__vector unsigned short)(
2144 __ac[1], __ac[3], __ac[5], __ac[7],
2145 __bc[1], __bc[3], __bc[5], __bc[7]);
2148 static inline __ATTRS_o_ai __vector signed int
2149 vec_pack(__vector signed long long __a, __vector signed long long __b) {
2150 __vector signed int __ac = (__vector signed int)__a;
2151 __vector signed int __bc = (__vector signed int)__b;
2152 return (__vector signed int)(__ac[1], __ac[3], __bc[1], __bc[3]);
2155 static inline __ATTRS_o_ai __vector __bool int
2156 vec_pack(__vector __bool long long __a, __vector __bool long long __b) {
2157 __vector __bool int __ac = (__vector __bool int)__a;
2158 __vector __bool int __bc = (__vector __bool int)__b;
2159 return (__vector __bool int)(__ac[1], __ac[3], __bc[1], __bc[3]);
2162 static inline __ATTRS_o_ai __vector unsigned int
2163 vec_pack(__vector unsigned long long __a, __vector unsigned long long __b) {
2164 __vector unsigned int __ac = (__vector unsigned int)__a;
2165 __vector unsigned int __bc = (__vector unsigned int)__b;
2166 return (__vector unsigned int)(__ac[1], __ac[3], __bc[1], __bc[3]);
2169 /*-- vec_packs --------------------------------------------------------------*/
2171 static inline __ATTRS_o_ai __vector signed char
2172 vec_packs(__vector signed short __a, __vector signed short __b) {
2173 return __builtin_s390_vpksh(__a, __b);
2176 static inline __ATTRS_o_ai __vector unsigned char
2177 vec_packs(__vector unsigned short __a, __vector unsigned short __b) {
2178 return __builtin_s390_vpklsh(__a, __b);
2181 static inline __ATTRS_o_ai __vector signed short
2182 vec_packs(__vector signed int __a, __vector signed int __b) {
2183 return __builtin_s390_vpksf(__a, __b);
2186 static inline __ATTRS_o_ai __vector unsigned short
2187 vec_packs(__vector unsigned int __a, __vector unsigned int __b) {
2188 return __builtin_s390_vpklsf(__a, __b);
2191 static inline __ATTRS_o_ai __vector signed int
2192 vec_packs(__vector signed long long __a, __vector signed long long __b) {
2193 return __builtin_s390_vpksg(__a, __b);
2196 static inline __ATTRS_o_ai __vector unsigned int
2197 vec_packs(__vector unsigned long long __a, __vector unsigned long long __b) {
2198 return __builtin_s390_vpklsg(__a, __b);
2201 /*-- vec_packs_cc -----------------------------------------------------------*/
2203 static inline __ATTRS_o_ai __vector signed char
2204 vec_packs_cc(__vector signed short __a, __vector signed short __b, int *__cc) {
2205 return __builtin_s390_vpkshs(__a, __b, __cc);
2208 static inline __ATTRS_o_ai __vector unsigned char
2209 vec_packs_cc(__vector unsigned short __a, __vector unsigned short __b,
2210 int *__cc) {
2211 return __builtin_s390_vpklshs(__a, __b, __cc);
2214 static inline __ATTRS_o_ai __vector signed short
2215 vec_packs_cc(__vector signed int __a, __vector signed int __b, int *__cc) {
2216 return __builtin_s390_vpksfs(__a, __b, __cc);
2219 static inline __ATTRS_o_ai __vector unsigned short
2220 vec_packs_cc(__vector unsigned int __a, __vector unsigned int __b, int *__cc) {
2221 return __builtin_s390_vpklsfs(__a, __b, __cc);
2224 static inline __ATTRS_o_ai __vector signed int
2225 vec_packs_cc(__vector signed long long __a, __vector signed long long __b,
2226 int *__cc) {
2227 return __builtin_s390_vpksgs(__a, __b, __cc);
2230 static inline __ATTRS_o_ai __vector unsigned int
2231 vec_packs_cc(__vector unsigned long long __a, __vector unsigned long long __b,
2232 int *__cc) {
2233 return __builtin_s390_vpklsgs(__a, __b, __cc);
2236 /*-- vec_packsu -------------------------------------------------------------*/
2238 static inline __ATTRS_o_ai __vector unsigned char
2239 vec_packsu(__vector signed short __a, __vector signed short __b) {
2240 const __vector signed short __zero = (__vector signed short)0;
2241 return __builtin_s390_vpklsh(
2242 (__vector unsigned short)(__a >= __zero) & (__vector unsigned short)__a,
2243 (__vector unsigned short)(__b >= __zero) & (__vector unsigned short)__b);
2246 static inline __ATTRS_o_ai __vector unsigned char
2247 vec_packsu(__vector unsigned short __a, __vector unsigned short __b) {
2248 return __builtin_s390_vpklsh(__a, __b);
2251 static inline __ATTRS_o_ai __vector unsigned short
2252 vec_packsu(__vector signed int __a, __vector signed int __b) {
2253 const __vector signed int __zero = (__vector signed int)0;
2254 return __builtin_s390_vpklsf(
2255 (__vector unsigned int)(__a >= __zero) & (__vector unsigned int)__a,
2256 (__vector unsigned int)(__b >= __zero) & (__vector unsigned int)__b);
2259 static inline __ATTRS_o_ai __vector unsigned short
2260 vec_packsu(__vector unsigned int __a, __vector unsigned int __b) {
2261 return __builtin_s390_vpklsf(__a, __b);
2264 static inline __ATTRS_o_ai __vector unsigned int
2265 vec_packsu(__vector signed long long __a, __vector signed long long __b) {
2266 const __vector signed long long __zero = (__vector signed long long)0;
2267 return __builtin_s390_vpklsg(
2268 (__vector unsigned long long)(__a >= __zero) &
2269 (__vector unsigned long long)__a,
2270 (__vector unsigned long long)(__b >= __zero) &
2271 (__vector unsigned long long)__b);
2274 static inline __ATTRS_o_ai __vector unsigned int
2275 vec_packsu(__vector unsigned long long __a, __vector unsigned long long __b) {
2276 return __builtin_s390_vpklsg(__a, __b);
2279 /*-- vec_packsu_cc ----------------------------------------------------------*/
2281 static inline __ATTRS_o_ai __vector unsigned char
2282 vec_packsu_cc(__vector unsigned short __a, __vector unsigned short __b,
2283 int *__cc) {
2284 return __builtin_s390_vpklshs(__a, __b, __cc);
2287 static inline __ATTRS_o_ai __vector unsigned short
2288 vec_packsu_cc(__vector unsigned int __a, __vector unsigned int __b, int *__cc) {
2289 return __builtin_s390_vpklsfs(__a, __b, __cc);
2292 static inline __ATTRS_o_ai __vector unsigned int
2293 vec_packsu_cc(__vector unsigned long long __a, __vector unsigned long long __b,
2294 int *__cc) {
2295 return __builtin_s390_vpklsgs(__a, __b, __cc);
2298 /*-- vec_unpackh ------------------------------------------------------------*/
2300 static inline __ATTRS_o_ai __vector signed short
2301 vec_unpackh(__vector signed char __a) {
2302 return __builtin_s390_vuphb(__a);
2305 static inline __ATTRS_o_ai __vector __bool short
2306 vec_unpackh(__vector __bool char __a) {
2307 return ((__vector __bool short)
2308 __builtin_s390_vuphb((__vector signed char)__a));
2311 static inline __ATTRS_o_ai __vector unsigned short
2312 vec_unpackh(__vector unsigned char __a) {
2313 return __builtin_s390_vuplhb(__a);
2316 static inline __ATTRS_o_ai __vector signed int
2317 vec_unpackh(__vector signed short __a) {
2318 return __builtin_s390_vuphh(__a);
2321 static inline __ATTRS_o_ai __vector __bool int
2322 vec_unpackh(__vector __bool short __a) {
2323 return (__vector __bool int)__builtin_s390_vuphh((__vector signed short)__a);
2326 static inline __ATTRS_o_ai __vector unsigned int
2327 vec_unpackh(__vector unsigned short __a) {
2328 return __builtin_s390_vuplhh(__a);
2331 static inline __ATTRS_o_ai __vector signed long long
2332 vec_unpackh(__vector signed int __a) {
2333 return __builtin_s390_vuphf(__a);
2336 static inline __ATTRS_o_ai __vector __bool long long
2337 vec_unpackh(__vector __bool int __a) {
2338 return ((__vector __bool long long)
2339 __builtin_s390_vuphf((__vector signed int)__a));
2342 static inline __ATTRS_o_ai __vector unsigned long long
2343 vec_unpackh(__vector unsigned int __a) {
2344 return __builtin_s390_vuplhf(__a);
2347 /*-- vec_unpackl ------------------------------------------------------------*/
2349 static inline __ATTRS_o_ai __vector signed short
2350 vec_unpackl(__vector signed char __a) {
2351 return __builtin_s390_vuplb(__a);
2354 static inline __ATTRS_o_ai __vector __bool short
2355 vec_unpackl(__vector __bool char __a) {
2356 return ((__vector __bool short)
2357 __builtin_s390_vuplb((__vector signed char)__a));
2360 static inline __ATTRS_o_ai __vector unsigned short
2361 vec_unpackl(__vector unsigned char __a) {
2362 return __builtin_s390_vupllb(__a);
2365 static inline __ATTRS_o_ai __vector signed int
2366 vec_unpackl(__vector signed short __a) {
2367 return __builtin_s390_vuplhw(__a);
2370 static inline __ATTRS_o_ai __vector __bool int
2371 vec_unpackl(__vector __bool short __a) {
2372 return ((__vector __bool int)
2373 __builtin_s390_vuplhw((__vector signed short)__a));
2376 static inline __ATTRS_o_ai __vector unsigned int
2377 vec_unpackl(__vector unsigned short __a) {
2378 return __builtin_s390_vupllh(__a);
2381 static inline __ATTRS_o_ai __vector signed long long
2382 vec_unpackl(__vector signed int __a) {
2383 return __builtin_s390_vuplf(__a);
2386 static inline __ATTRS_o_ai __vector __bool long long
2387 vec_unpackl(__vector __bool int __a) {
2388 return ((__vector __bool long long)
2389 __builtin_s390_vuplf((__vector signed int)__a));
2392 static inline __ATTRS_o_ai __vector unsigned long long
2393 vec_unpackl(__vector unsigned int __a) {
2394 return __builtin_s390_vupllf(__a);
2397 /*-- vec_cmpeq --------------------------------------------------------------*/
2399 static inline __ATTRS_o_ai __vector __bool char
2400 vec_cmpeq(__vector __bool char __a, __vector __bool char __b) {
2401 return (__vector __bool char)(__a == __b);
2404 static inline __ATTRS_o_ai __vector __bool char
2405 vec_cmpeq(__vector signed char __a, __vector signed char __b) {
2406 return (__vector __bool char)(__a == __b);
2409 static inline __ATTRS_o_ai __vector __bool char
2410 vec_cmpeq(__vector unsigned char __a, __vector unsigned char __b) {
2411 return (__vector __bool char)(__a == __b);
2414 static inline __ATTRS_o_ai __vector __bool short
2415 vec_cmpeq(__vector __bool short __a, __vector __bool short __b) {
2416 return (__vector __bool short)(__a == __b);
2419 static inline __ATTRS_o_ai __vector __bool short
2420 vec_cmpeq(__vector signed short __a, __vector signed short __b) {
2421 return (__vector __bool short)(__a == __b);
2424 static inline __ATTRS_o_ai __vector __bool short
2425 vec_cmpeq(__vector unsigned short __a, __vector unsigned short __b) {
2426 return (__vector __bool short)(__a == __b);
2429 static inline __ATTRS_o_ai __vector __bool int
2430 vec_cmpeq(__vector __bool int __a, __vector __bool int __b) {
2431 return (__vector __bool int)(__a == __b);
2434 static inline __ATTRS_o_ai __vector __bool int
2435 vec_cmpeq(__vector signed int __a, __vector signed int __b) {
2436 return (__vector __bool int)(__a == __b);
2439 static inline __ATTRS_o_ai __vector __bool int
2440 vec_cmpeq(__vector unsigned int __a, __vector unsigned int __b) {
2441 return (__vector __bool int)(__a == __b);
2444 static inline __ATTRS_o_ai __vector __bool long long
2445 vec_cmpeq(__vector __bool long long __a, __vector __bool long long __b) {
2446 return (__vector __bool long long)(__a == __b);
2449 static inline __ATTRS_o_ai __vector __bool long long
2450 vec_cmpeq(__vector signed long long __a, __vector signed long long __b) {
2451 return (__vector __bool long long)(__a == __b);
2454 static inline __ATTRS_o_ai __vector __bool long long
2455 vec_cmpeq(__vector unsigned long long __a, __vector unsigned long long __b) {
2456 return (__vector __bool long long)(__a == __b);
2459 #if __ARCH__ >= 12
2460 static inline __ATTRS_o_ai __vector __bool int
2461 vec_cmpeq(__vector float __a, __vector float __b) {
2462 return (__vector __bool int)(__a == __b);
2464 #endif
2466 static inline __ATTRS_o_ai __vector __bool long long
2467 vec_cmpeq(__vector double __a, __vector double __b) {
2468 return (__vector __bool long long)(__a == __b);
2471 /*-- vec_cmpge --------------------------------------------------------------*/
2473 static inline __ATTRS_o_ai __vector __bool char
2474 vec_cmpge(__vector signed char __a, __vector signed char __b) {
2475 return (__vector __bool char)(__a >= __b);
2478 static inline __ATTRS_o_ai __vector __bool char
2479 vec_cmpge(__vector unsigned char __a, __vector unsigned char __b) {
2480 return (__vector __bool char)(__a >= __b);
2483 static inline __ATTRS_o_ai __vector __bool short
2484 vec_cmpge(__vector signed short __a, __vector signed short __b) {
2485 return (__vector __bool short)(__a >= __b);
2488 static inline __ATTRS_o_ai __vector __bool short
2489 vec_cmpge(__vector unsigned short __a, __vector unsigned short __b) {
2490 return (__vector __bool short)(__a >= __b);
2493 static inline __ATTRS_o_ai __vector __bool int
2494 vec_cmpge(__vector signed int __a, __vector signed int __b) {
2495 return (__vector __bool int)(__a >= __b);
2498 static inline __ATTRS_o_ai __vector __bool int
2499 vec_cmpge(__vector unsigned int __a, __vector unsigned int __b) {
2500 return (__vector __bool int)(__a >= __b);
2503 static inline __ATTRS_o_ai __vector __bool long long
2504 vec_cmpge(__vector signed long long __a, __vector signed long long __b) {
2505 return (__vector __bool long long)(__a >= __b);
2508 static inline __ATTRS_o_ai __vector __bool long long
2509 vec_cmpge(__vector unsigned long long __a, __vector unsigned long long __b) {
2510 return (__vector __bool long long)(__a >= __b);
2513 #if __ARCH__ >= 12
2514 static inline __ATTRS_o_ai __vector __bool int
2515 vec_cmpge(__vector float __a, __vector float __b) {
2516 return (__vector __bool int)(__a >= __b);
2518 #endif
2520 static inline __ATTRS_o_ai __vector __bool long long
2521 vec_cmpge(__vector double __a, __vector double __b) {
2522 return (__vector __bool long long)(__a >= __b);
2525 /*-- vec_cmpgt --------------------------------------------------------------*/
2527 static inline __ATTRS_o_ai __vector __bool char
2528 vec_cmpgt(__vector signed char __a, __vector signed char __b) {
2529 return (__vector __bool char)(__a > __b);
2532 static inline __ATTRS_o_ai __vector __bool char
2533 vec_cmpgt(__vector unsigned char __a, __vector unsigned char __b) {
2534 return (__vector __bool char)(__a > __b);
2537 static inline __ATTRS_o_ai __vector __bool short
2538 vec_cmpgt(__vector signed short __a, __vector signed short __b) {
2539 return (__vector __bool short)(__a > __b);
2542 static inline __ATTRS_o_ai __vector __bool short
2543 vec_cmpgt(__vector unsigned short __a, __vector unsigned short __b) {
2544 return (__vector __bool short)(__a > __b);
2547 static inline __ATTRS_o_ai __vector __bool int
2548 vec_cmpgt(__vector signed int __a, __vector signed int __b) {
2549 return (__vector __bool int)(__a > __b);
2552 static inline __ATTRS_o_ai __vector __bool int
2553 vec_cmpgt(__vector unsigned int __a, __vector unsigned int __b) {
2554 return (__vector __bool int)(__a > __b);
2557 static inline __ATTRS_o_ai __vector __bool long long
2558 vec_cmpgt(__vector signed long long __a, __vector signed long long __b) {
2559 return (__vector __bool long long)(__a > __b);
2562 static inline __ATTRS_o_ai __vector __bool long long
2563 vec_cmpgt(__vector unsigned long long __a, __vector unsigned long long __b) {
2564 return (__vector __bool long long)(__a > __b);
2567 #if __ARCH__ >= 12
2568 static inline __ATTRS_o_ai __vector __bool int
2569 vec_cmpgt(__vector float __a, __vector float __b) {
2570 return (__vector __bool int)(__a > __b);
2572 #endif
2574 static inline __ATTRS_o_ai __vector __bool long long
2575 vec_cmpgt(__vector double __a, __vector double __b) {
2576 return (__vector __bool long long)(__a > __b);
2579 /*-- vec_cmple --------------------------------------------------------------*/
2581 static inline __ATTRS_o_ai __vector __bool char
2582 vec_cmple(__vector signed char __a, __vector signed char __b) {
2583 return (__vector __bool char)(__a <= __b);
2586 static inline __ATTRS_o_ai __vector __bool char
2587 vec_cmple(__vector unsigned char __a, __vector unsigned char __b) {
2588 return (__vector __bool char)(__a <= __b);
2591 static inline __ATTRS_o_ai __vector __bool short
2592 vec_cmple(__vector signed short __a, __vector signed short __b) {
2593 return (__vector __bool short)(__a <= __b);
2596 static inline __ATTRS_o_ai __vector __bool short
2597 vec_cmple(__vector unsigned short __a, __vector unsigned short __b) {
2598 return (__vector __bool short)(__a <= __b);
2601 static inline __ATTRS_o_ai __vector __bool int
2602 vec_cmple(__vector signed int __a, __vector signed int __b) {
2603 return (__vector __bool int)(__a <= __b);
2606 static inline __ATTRS_o_ai __vector __bool int
2607 vec_cmple(__vector unsigned int __a, __vector unsigned int __b) {
2608 return (__vector __bool int)(__a <= __b);
2611 static inline __ATTRS_o_ai __vector __bool long long
2612 vec_cmple(__vector signed long long __a, __vector signed long long __b) {
2613 return (__vector __bool long long)(__a <= __b);
2616 static inline __ATTRS_o_ai __vector __bool long long
2617 vec_cmple(__vector unsigned long long __a, __vector unsigned long long __b) {
2618 return (__vector __bool long long)(__a <= __b);
2621 #if __ARCH__ >= 12
2622 static inline __ATTRS_o_ai __vector __bool int
2623 vec_cmple(__vector float __a, __vector float __b) {
2624 return (__vector __bool int)(__a <= __b);
2626 #endif
2628 static inline __ATTRS_o_ai __vector __bool long long
2629 vec_cmple(__vector double __a, __vector double __b) {
2630 return (__vector __bool long long)(__a <= __b);
2633 /*-- vec_cmplt --------------------------------------------------------------*/
2635 static inline __ATTRS_o_ai __vector __bool char
2636 vec_cmplt(__vector signed char __a, __vector signed char __b) {
2637 return (__vector __bool char)(__a < __b);
2640 static inline __ATTRS_o_ai __vector __bool char
2641 vec_cmplt(__vector unsigned char __a, __vector unsigned char __b) {
2642 return (__vector __bool char)(__a < __b);
2645 static inline __ATTRS_o_ai __vector __bool short
2646 vec_cmplt(__vector signed short __a, __vector signed short __b) {
2647 return (__vector __bool short)(__a < __b);
2650 static inline __ATTRS_o_ai __vector __bool short
2651 vec_cmplt(__vector unsigned short __a, __vector unsigned short __b) {
2652 return (__vector __bool short)(__a < __b);
2655 static inline __ATTRS_o_ai __vector __bool int
2656 vec_cmplt(__vector signed int __a, __vector signed int __b) {
2657 return (__vector __bool int)(__a < __b);
2660 static inline __ATTRS_o_ai __vector __bool int
2661 vec_cmplt(__vector unsigned int __a, __vector unsigned int __b) {
2662 return (__vector __bool int)(__a < __b);
2665 static inline __ATTRS_o_ai __vector __bool long long
2666 vec_cmplt(__vector signed long long __a, __vector signed long long __b) {
2667 return (__vector __bool long long)(__a < __b);
2670 static inline __ATTRS_o_ai __vector __bool long long
2671 vec_cmplt(__vector unsigned long long __a, __vector unsigned long long __b) {
2672 return (__vector __bool long long)(__a < __b);
2675 #if __ARCH__ >= 12
2676 static inline __ATTRS_o_ai __vector __bool int
2677 vec_cmplt(__vector float __a, __vector float __b) {
2678 return (__vector __bool int)(__a < __b);
2680 #endif
2682 static inline __ATTRS_o_ai __vector __bool long long
2683 vec_cmplt(__vector double __a, __vector double __b) {
2684 return (__vector __bool long long)(__a < __b);
2687 /*-- vec_all_eq -------------------------------------------------------------*/
2689 static inline __ATTRS_o_ai int
2690 vec_all_eq(__vector signed char __a, __vector signed char __b) {
2691 int __cc;
2692 __builtin_s390_vceqbs(__a, __b, &__cc);
2693 return __cc == 0;
2696 // This prototype is deprecated.
2697 static inline __ATTRS_o_ai int
2698 vec_all_eq(__vector signed char __a, __vector __bool char __b) {
2699 int __cc;
2700 __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc);
2701 return __cc == 0;
2704 // This prototype is deprecated.
2705 static inline __ATTRS_o_ai int
2706 vec_all_eq(__vector __bool char __a, __vector signed char __b) {
2707 int __cc;
2708 __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc);
2709 return __cc == 0;
2712 static inline __ATTRS_o_ai int
2713 vec_all_eq(__vector unsigned char __a, __vector unsigned char __b) {
2714 int __cc;
2715 __builtin_s390_vceqbs((__vector signed char)__a,
2716 (__vector signed char)__b, &__cc);
2717 return __cc == 0;
2720 // This prototype is deprecated.
2721 static inline __ATTRS_o_ai int
2722 vec_all_eq(__vector unsigned char __a, __vector __bool char __b) {
2723 int __cc;
2724 __builtin_s390_vceqbs((__vector signed char)__a,
2725 (__vector signed char)__b, &__cc);
2726 return __cc == 0;
2729 // This prototype is deprecated.
2730 static inline __ATTRS_o_ai int
2731 vec_all_eq(__vector __bool char __a, __vector unsigned char __b) {
2732 int __cc;
2733 __builtin_s390_vceqbs((__vector signed char)__a,
2734 (__vector signed char)__b, &__cc);
2735 return __cc == 0;
2738 static inline __ATTRS_o_ai int
2739 vec_all_eq(__vector __bool char __a, __vector __bool char __b) {
2740 int __cc;
2741 __builtin_s390_vceqbs((__vector signed char)__a,
2742 (__vector signed char)__b, &__cc);
2743 return __cc == 0;
2746 static inline __ATTRS_o_ai int
2747 vec_all_eq(__vector signed short __a, __vector signed short __b) {
2748 int __cc;
2749 __builtin_s390_vceqhs(__a, __b, &__cc);
2750 return __cc == 0;
2753 // This prototype is deprecated.
2754 static inline __ATTRS_o_ai int
2755 vec_all_eq(__vector signed short __a, __vector __bool short __b) {
2756 int __cc;
2757 __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc);
2758 return __cc == 0;
2761 // This prototype is deprecated.
2762 static inline __ATTRS_o_ai int
2763 vec_all_eq(__vector __bool short __a, __vector signed short __b) {
2764 int __cc;
2765 __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc);
2766 return __cc == 0;
2769 static inline __ATTRS_o_ai int
2770 vec_all_eq(__vector unsigned short __a, __vector unsigned short __b) {
2771 int __cc;
2772 __builtin_s390_vceqhs((__vector signed short)__a,
2773 (__vector signed short)__b, &__cc);
2774 return __cc == 0;
2777 // This prototype is deprecated.
2778 static inline __ATTRS_o_ai int
2779 vec_all_eq(__vector unsigned short __a, __vector __bool short __b) {
2780 int __cc;
2781 __builtin_s390_vceqhs((__vector signed short)__a,
2782 (__vector signed short)__b, &__cc);
2783 return __cc == 0;
2786 // This prototype is deprecated.
2787 static inline __ATTRS_o_ai int
2788 vec_all_eq(__vector __bool short __a, __vector unsigned short __b) {
2789 int __cc;
2790 __builtin_s390_vceqhs((__vector signed short)__a,
2791 (__vector signed short)__b, &__cc);
2792 return __cc == 0;
2795 static inline __ATTRS_o_ai int
2796 vec_all_eq(__vector __bool short __a, __vector __bool short __b) {
2797 int __cc;
2798 __builtin_s390_vceqhs((__vector signed short)__a,
2799 (__vector signed short)__b, &__cc);
2800 return __cc == 0;
2803 static inline __ATTRS_o_ai int
2804 vec_all_eq(__vector signed int __a, __vector signed int __b) {
2805 int __cc;
2806 __builtin_s390_vceqfs(__a, __b, &__cc);
2807 return __cc == 0;
2810 // This prototype is deprecated.
2811 static inline __ATTRS_o_ai int
2812 vec_all_eq(__vector signed int __a, __vector __bool int __b) {
2813 int __cc;
2814 __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc);
2815 return __cc == 0;
2818 // This prototype is deprecated.
2819 static inline __ATTRS_o_ai int
2820 vec_all_eq(__vector __bool int __a, __vector signed int __b) {
2821 int __cc;
2822 __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc);
2823 return __cc == 0;
2826 static inline __ATTRS_o_ai int
2827 vec_all_eq(__vector unsigned int __a, __vector unsigned int __b) {
2828 int __cc;
2829 __builtin_s390_vceqfs((__vector signed int)__a,
2830 (__vector signed int)__b, &__cc);
2831 return __cc == 0;
2834 // This prototype is deprecated.
2835 static inline __ATTRS_o_ai int
2836 vec_all_eq(__vector unsigned int __a, __vector __bool int __b) {
2837 int __cc;
2838 __builtin_s390_vceqfs((__vector signed int)__a,
2839 (__vector signed int)__b, &__cc);
2840 return __cc == 0;
2843 // This prototype is deprecated.
2844 static inline __ATTRS_o_ai int
2845 vec_all_eq(__vector __bool int __a, __vector unsigned int __b) {
2846 int __cc;
2847 __builtin_s390_vceqfs((__vector signed int)__a,
2848 (__vector signed int)__b, &__cc);
2849 return __cc == 0;
2852 static inline __ATTRS_o_ai int
2853 vec_all_eq(__vector __bool int __a, __vector __bool int __b) {
2854 int __cc;
2855 __builtin_s390_vceqfs((__vector signed int)__a,
2856 (__vector signed int)__b, &__cc);
2857 return __cc == 0;
2860 static inline __ATTRS_o_ai int
2861 vec_all_eq(__vector signed long long __a, __vector signed long long __b) {
2862 int __cc;
2863 __builtin_s390_vceqgs(__a, __b, &__cc);
2864 return __cc == 0;
2867 // This prototype is deprecated.
2868 static inline __ATTRS_o_ai int
2869 vec_all_eq(__vector signed long long __a, __vector __bool long long __b) {
2870 int __cc;
2871 __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc);
2872 return __cc == 0;
2875 // This prototype is deprecated.
2876 static inline __ATTRS_o_ai int
2877 vec_all_eq(__vector __bool long long __a, __vector signed long long __b) {
2878 int __cc;
2879 __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc);
2880 return __cc == 0;
2883 static inline __ATTRS_o_ai int
2884 vec_all_eq(__vector unsigned long long __a, __vector unsigned long long __b) {
2885 int __cc;
2886 __builtin_s390_vceqgs((__vector signed long long)__a,
2887 (__vector signed long long)__b, &__cc);
2888 return __cc == 0;
2891 // This prototype is deprecated.
2892 static inline __ATTRS_o_ai int
2893 vec_all_eq(__vector unsigned long long __a, __vector __bool long long __b) {
2894 int __cc;
2895 __builtin_s390_vceqgs((__vector signed long long)__a,
2896 (__vector signed long long)__b, &__cc);
2897 return __cc == 0;
2900 // This prototype is deprecated.
2901 static inline __ATTRS_o_ai int
2902 vec_all_eq(__vector __bool long long __a, __vector unsigned long long __b) {
2903 int __cc;
2904 __builtin_s390_vceqgs((__vector signed long long)__a,
2905 (__vector signed long long)__b, &__cc);
2906 return __cc == 0;
2909 static inline __ATTRS_o_ai int
2910 vec_all_eq(__vector __bool long long __a, __vector __bool long long __b) {
2911 int __cc;
2912 __builtin_s390_vceqgs((__vector signed long long)__a,
2913 (__vector signed long long)__b, &__cc);
2914 return __cc == 0;
2917 #if __ARCH__ >= 12
2918 static inline __ATTRS_o_ai int
2919 vec_all_eq(__vector float __a, __vector float __b) {
2920 int __cc;
2921 __builtin_s390_vfcesbs(__a, __b, &__cc);
2922 return __cc == 0;
2924 #endif
2926 static inline __ATTRS_o_ai int
2927 vec_all_eq(__vector double __a, __vector double __b) {
2928 int __cc;
2929 __builtin_s390_vfcedbs(__a, __b, &__cc);
2930 return __cc == 0;
2933 /*-- vec_all_ne -------------------------------------------------------------*/
2935 static inline __ATTRS_o_ai int
2936 vec_all_ne(__vector signed char __a, __vector signed char __b) {
2937 int __cc;
2938 __builtin_s390_vceqbs(__a, __b, &__cc);
2939 return __cc == 3;
2942 // This prototype is deprecated.
2943 static inline __ATTRS_o_ai int
2944 vec_all_ne(__vector signed char __a, __vector __bool char __b) {
2945 int __cc;
2946 __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc);
2947 return __cc == 3;
2950 // This prototype is deprecated.
2951 static inline __ATTRS_o_ai int
2952 vec_all_ne(__vector __bool char __a, __vector signed char __b) {
2953 int __cc;
2954 __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc);
2955 return __cc == 3;
2958 static inline __ATTRS_o_ai int
2959 vec_all_ne(__vector unsigned char __a, __vector unsigned char __b) {
2960 int __cc;
2961 __builtin_s390_vceqbs((__vector signed char)__a,
2962 (__vector signed char)__b, &__cc);
2963 return __cc == 3;
2966 // This prototype is deprecated.
2967 static inline __ATTRS_o_ai int
2968 vec_all_ne(__vector unsigned char __a, __vector __bool char __b) {
2969 int __cc;
2970 __builtin_s390_vceqbs((__vector signed char)__a,
2971 (__vector signed char)__b, &__cc);
2972 return __cc == 3;
2975 // This prototype is deprecated.
2976 static inline __ATTRS_o_ai int
2977 vec_all_ne(__vector __bool char __a, __vector unsigned char __b) {
2978 int __cc;
2979 __builtin_s390_vceqbs((__vector signed char)__a,
2980 (__vector signed char)__b, &__cc);
2981 return __cc == 3;
2984 static inline __ATTRS_o_ai int
2985 vec_all_ne(__vector __bool char __a, __vector __bool char __b) {
2986 int __cc;
2987 __builtin_s390_vceqbs((__vector signed char)__a,
2988 (__vector signed char)__b, &__cc);
2989 return __cc == 3;
2992 static inline __ATTRS_o_ai int
2993 vec_all_ne(__vector signed short __a, __vector signed short __b) {
2994 int __cc;
2995 __builtin_s390_vceqhs(__a, __b, &__cc);
2996 return __cc == 3;
2999 // This prototype is deprecated.
3000 static inline __ATTRS_o_ai int
3001 vec_all_ne(__vector signed short __a, __vector __bool short __b) {
3002 int __cc;
3003 __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc);
3004 return __cc == 3;
3007 // This prototype is deprecated.
3008 static inline __ATTRS_o_ai int
3009 vec_all_ne(__vector __bool short __a, __vector signed short __b) {
3010 int __cc;
3011 __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc);
3012 return __cc == 3;
3015 static inline __ATTRS_o_ai int
3016 vec_all_ne(__vector unsigned short __a, __vector unsigned short __b) {
3017 int __cc;
3018 __builtin_s390_vceqhs((__vector signed short)__a,
3019 (__vector signed short)__b, &__cc);
3020 return __cc == 3;
3023 // This prototype is deprecated.
3024 static inline __ATTRS_o_ai int
3025 vec_all_ne(__vector unsigned short __a, __vector __bool short __b) {
3026 int __cc;
3027 __builtin_s390_vceqhs((__vector signed short)__a,
3028 (__vector signed short)__b, &__cc);
3029 return __cc == 3;
3032 // This prototype is deprecated.
3033 static inline __ATTRS_o_ai int
3034 vec_all_ne(__vector __bool short __a, __vector unsigned short __b) {
3035 int __cc;
3036 __builtin_s390_vceqhs((__vector signed short)__a,
3037 (__vector signed short)__b, &__cc);
3038 return __cc == 3;
3041 static inline __ATTRS_o_ai int
3042 vec_all_ne(__vector __bool short __a, __vector __bool short __b) {
3043 int __cc;
3044 __builtin_s390_vceqhs((__vector signed short)__a,
3045 (__vector signed short)__b, &__cc);
3046 return __cc == 3;
3049 static inline __ATTRS_o_ai int
3050 vec_all_ne(__vector signed int __a, __vector signed int __b) {
3051 int __cc;
3052 __builtin_s390_vceqfs(__a, __b, &__cc);
3053 return __cc == 3;
3056 // This prototype is deprecated.
3057 static inline __ATTRS_o_ai int
3058 vec_all_ne(__vector signed int __a, __vector __bool int __b) {
3059 int __cc;
3060 __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc);
3061 return __cc == 3;
3064 // This prototype is deprecated.
3065 static inline __ATTRS_o_ai int
3066 vec_all_ne(__vector __bool int __a, __vector signed int __b) {
3067 int __cc;
3068 __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc);
3069 return __cc == 3;
3072 static inline __ATTRS_o_ai int
3073 vec_all_ne(__vector unsigned int __a, __vector unsigned int __b) {
3074 int __cc;
3075 __builtin_s390_vceqfs((__vector signed int)__a,
3076 (__vector signed int)__b, &__cc);
3077 return __cc == 3;
3080 // This prototype is deprecated.
3081 static inline __ATTRS_o_ai int
3082 vec_all_ne(__vector unsigned int __a, __vector __bool int __b) {
3083 int __cc;
3084 __builtin_s390_vceqfs((__vector signed int)__a,
3085 (__vector signed int)__b, &__cc);
3086 return __cc == 3;
3089 // This prototype is deprecated.
3090 static inline __ATTRS_o_ai int
3091 vec_all_ne(__vector __bool int __a, __vector unsigned int __b) {
3092 int __cc;
3093 __builtin_s390_vceqfs((__vector signed int)__a,
3094 (__vector signed int)__b, &__cc);
3095 return __cc == 3;
3098 static inline __ATTRS_o_ai int
3099 vec_all_ne(__vector __bool int __a, __vector __bool int __b) {
3100 int __cc;
3101 __builtin_s390_vceqfs((__vector signed int)__a,
3102 (__vector signed int)__b, &__cc);
3103 return __cc == 3;
3106 static inline __ATTRS_o_ai int
3107 vec_all_ne(__vector signed long long __a, __vector signed long long __b) {
3108 int __cc;
3109 __builtin_s390_vceqgs(__a, __b, &__cc);
3110 return __cc == 3;
3113 // This prototype is deprecated.
3114 static inline __ATTRS_o_ai int
3115 vec_all_ne(__vector signed long long __a, __vector __bool long long __b) {
3116 int __cc;
3117 __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc);
3118 return __cc == 3;
3121 // This prototype is deprecated.
3122 static inline __ATTRS_o_ai int
3123 vec_all_ne(__vector __bool long long __a, __vector signed long long __b) {
3124 int __cc;
3125 __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc);
3126 return __cc == 3;
3129 static inline __ATTRS_o_ai int
3130 vec_all_ne(__vector unsigned long long __a, __vector unsigned long long __b) {
3131 int __cc;
3132 __builtin_s390_vceqgs((__vector signed long long)__a,
3133 (__vector signed long long)__b, &__cc);
3134 return __cc == 3;
3137 // This prototype is deprecated.
3138 static inline __ATTRS_o_ai int
3139 vec_all_ne(__vector unsigned long long __a, __vector __bool long long __b) {
3140 int __cc;
3141 __builtin_s390_vceqgs((__vector signed long long)__a,
3142 (__vector signed long long)__b, &__cc);
3143 return __cc == 3;
3146 // This prototype is deprecated.
3147 static inline __ATTRS_o_ai int
3148 vec_all_ne(__vector __bool long long __a, __vector unsigned long long __b) {
3149 int __cc;
3150 __builtin_s390_vceqgs((__vector signed long long)__a,
3151 (__vector signed long long)__b, &__cc);
3152 return __cc == 3;
3155 static inline __ATTRS_o_ai int
3156 vec_all_ne(__vector __bool long long __a, __vector __bool long long __b) {
3157 int __cc;
3158 __builtin_s390_vceqgs((__vector signed long long)__a,
3159 (__vector signed long long)__b, &__cc);
3160 return __cc == 3;
3163 #if __ARCH__ >= 12
3164 static inline __ATTRS_o_ai int
3165 vec_all_ne(__vector float __a, __vector float __b) {
3166 int __cc;
3167 __builtin_s390_vfcesbs(__a, __b, &__cc);
3168 return __cc == 3;
3170 #endif
3172 static inline __ATTRS_o_ai int
3173 vec_all_ne(__vector double __a, __vector double __b) {
3174 int __cc;
3175 __builtin_s390_vfcedbs(__a, __b, &__cc);
3176 return __cc == 3;
3179 /*-- vec_all_ge -------------------------------------------------------------*/
3181 static inline __ATTRS_o_ai int
3182 vec_all_ge(__vector signed char __a, __vector signed char __b) {
3183 int __cc;
3184 __builtin_s390_vchbs(__b, __a, &__cc);
3185 return __cc == 3;
3188 // This prototype is deprecated.
3189 static inline __ATTRS_o_ai int
3190 vec_all_ge(__vector signed char __a, __vector __bool char __b) {
3191 int __cc;
3192 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
3193 return __cc == 3;
3196 // This prototype is deprecated.
3197 static inline __ATTRS_o_ai int
3198 vec_all_ge(__vector __bool char __a, __vector signed char __b) {
3199 int __cc;
3200 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
3201 return __cc == 3;
3204 static inline __ATTRS_o_ai int
3205 vec_all_ge(__vector unsigned char __a, __vector unsigned char __b) {
3206 int __cc;
3207 __builtin_s390_vchlbs(__b, __a, &__cc);
3208 return __cc == 3;
3211 // This prototype is deprecated.
3212 static inline __ATTRS_o_ai int
3213 vec_all_ge(__vector unsigned char __a, __vector __bool char __b) {
3214 int __cc;
3215 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
3216 return __cc == 3;
3219 // This prototype is deprecated.
3220 static inline __ATTRS_o_ai int
3221 vec_all_ge(__vector __bool char __a, __vector unsigned char __b) {
3222 int __cc;
3223 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
3224 return __cc == 3;
3227 // This prototype is deprecated.
3228 static inline __ATTRS_o_ai int
3229 vec_all_ge(__vector __bool char __a, __vector __bool char __b) {
3230 int __cc;
3231 __builtin_s390_vchlbs((__vector unsigned char)__b,
3232 (__vector unsigned char)__a, &__cc);
3233 return __cc == 3;
3236 static inline __ATTRS_o_ai int
3237 vec_all_ge(__vector signed short __a, __vector signed short __b) {
3238 int __cc;
3239 __builtin_s390_vchhs(__b, __a, &__cc);
3240 return __cc == 3;
3243 // This prototype is deprecated.
3244 static inline __ATTRS_o_ai int
3245 vec_all_ge(__vector signed short __a, __vector __bool short __b) {
3246 int __cc;
3247 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
3248 return __cc == 3;
3251 // This prototype is deprecated.
3252 static inline __ATTRS_o_ai int
3253 vec_all_ge(__vector __bool short __a, __vector signed short __b) {
3254 int __cc;
3255 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
3256 return __cc == 3;
3259 static inline __ATTRS_o_ai int
3260 vec_all_ge(__vector unsigned short __a, __vector unsigned short __b) {
3261 int __cc;
3262 __builtin_s390_vchlhs(__b, __a, &__cc);
3263 return __cc == 3;
3266 // This prototype is deprecated.
3267 static inline __ATTRS_o_ai int
3268 vec_all_ge(__vector unsigned short __a, __vector __bool short __b) {
3269 int __cc;
3270 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
3271 return __cc == 3;
3274 // This prototype is deprecated.
3275 static inline __ATTRS_o_ai int
3276 vec_all_ge(__vector __bool short __a, __vector unsigned short __b) {
3277 int __cc;
3278 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
3279 return __cc == 3;
3282 // This prototype is deprecated.
3283 static inline __ATTRS_o_ai int
3284 vec_all_ge(__vector __bool short __a, __vector __bool short __b) {
3285 int __cc;
3286 __builtin_s390_vchlhs((__vector unsigned short)__b,
3287 (__vector unsigned short)__a, &__cc);
3288 return __cc == 3;
3291 static inline __ATTRS_o_ai int
3292 vec_all_ge(__vector signed int __a, __vector signed int __b) {
3293 int __cc;
3294 __builtin_s390_vchfs(__b, __a, &__cc);
3295 return __cc == 3;
3298 // This prototype is deprecated.
3299 static inline __ATTRS_o_ai int
3300 vec_all_ge(__vector signed int __a, __vector __bool int __b) {
3301 int __cc;
3302 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
3303 return __cc == 3;
3306 // This prototype is deprecated.
3307 static inline __ATTRS_o_ai int
3308 vec_all_ge(__vector __bool int __a, __vector signed int __b) {
3309 int __cc;
3310 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
3311 return __cc == 3;
3314 static inline __ATTRS_o_ai int
3315 vec_all_ge(__vector unsigned int __a, __vector unsigned int __b) {
3316 int __cc;
3317 __builtin_s390_vchlfs(__b, __a, &__cc);
3318 return __cc == 3;
3321 // This prototype is deprecated.
3322 static inline __ATTRS_o_ai int
3323 vec_all_ge(__vector unsigned int __a, __vector __bool int __b) {
3324 int __cc;
3325 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
3326 return __cc == 3;
3329 // This prototype is deprecated.
3330 static inline __ATTRS_o_ai int
3331 vec_all_ge(__vector __bool int __a, __vector unsigned int __b) {
3332 int __cc;
3333 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
3334 return __cc == 3;
3337 // This prototype is deprecated.
3338 static inline __ATTRS_o_ai int
3339 vec_all_ge(__vector __bool int __a, __vector __bool int __b) {
3340 int __cc;
3341 __builtin_s390_vchlfs((__vector unsigned int)__b,
3342 (__vector unsigned int)__a, &__cc);
3343 return __cc == 3;
3346 static inline __ATTRS_o_ai int
3347 vec_all_ge(__vector signed long long __a, __vector signed long long __b) {
3348 int __cc;
3349 __builtin_s390_vchgs(__b, __a, &__cc);
3350 return __cc == 3;
3353 // This prototype is deprecated.
3354 static inline __ATTRS_o_ai int
3355 vec_all_ge(__vector signed long long __a, __vector __bool long long __b) {
3356 int __cc;
3357 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
3358 return __cc == 3;
3361 // This prototype is deprecated.
3362 static inline __ATTRS_o_ai int
3363 vec_all_ge(__vector __bool long long __a, __vector signed long long __b) {
3364 int __cc;
3365 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
3366 return __cc == 3;
3369 static inline __ATTRS_o_ai int
3370 vec_all_ge(__vector unsigned long long __a, __vector unsigned long long __b) {
3371 int __cc;
3372 __builtin_s390_vchlgs(__b, __a, &__cc);
3373 return __cc == 3;
3376 // This prototype is deprecated.
3377 static inline __ATTRS_o_ai int
3378 vec_all_ge(__vector unsigned long long __a, __vector __bool long long __b) {
3379 int __cc;
3380 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
3381 return __cc == 3;
3384 // This prototype is deprecated.
3385 static inline __ATTRS_o_ai int
3386 vec_all_ge(__vector __bool long long __a, __vector unsigned long long __b) {
3387 int __cc;
3388 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
3389 return __cc == 3;
3392 // This prototype is deprecated.
3393 static inline __ATTRS_o_ai int
3394 vec_all_ge(__vector __bool long long __a, __vector __bool long long __b) {
3395 int __cc;
3396 __builtin_s390_vchlgs((__vector unsigned long long)__b,
3397 (__vector unsigned long long)__a, &__cc);
3398 return __cc == 3;
3401 #if __ARCH__ >= 12
3402 static inline __ATTRS_o_ai int
3403 vec_all_ge(__vector float __a, __vector float __b) {
3404 int __cc;
3405 __builtin_s390_vfchesbs(__a, __b, &__cc);
3406 return __cc == 0;
3408 #endif
3410 static inline __ATTRS_o_ai int
3411 vec_all_ge(__vector double __a, __vector double __b) {
3412 int __cc;
3413 __builtin_s390_vfchedbs(__a, __b, &__cc);
3414 return __cc == 0;
3417 /*-- vec_all_gt -------------------------------------------------------------*/
3419 static inline __ATTRS_o_ai int
3420 vec_all_gt(__vector signed char __a, __vector signed char __b) {
3421 int __cc;
3422 __builtin_s390_vchbs(__a, __b, &__cc);
3423 return __cc == 0;
3426 // This prototype is deprecated.
3427 static inline __ATTRS_o_ai int
3428 vec_all_gt(__vector signed char __a, __vector __bool char __b) {
3429 int __cc;
3430 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
3431 return __cc == 0;
3434 // This prototype is deprecated.
3435 static inline __ATTRS_o_ai int
3436 vec_all_gt(__vector __bool char __a, __vector signed char __b) {
3437 int __cc;
3438 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
3439 return __cc == 0;
3442 static inline __ATTRS_o_ai int
3443 vec_all_gt(__vector unsigned char __a, __vector unsigned char __b) {
3444 int __cc;
3445 __builtin_s390_vchlbs(__a, __b, &__cc);
3446 return __cc == 0;
3449 // This prototype is deprecated.
3450 static inline __ATTRS_o_ai int
3451 vec_all_gt(__vector unsigned char __a, __vector __bool char __b) {
3452 int __cc;
3453 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
3454 return __cc == 0;
3457 // This prototype is deprecated.
3458 static inline __ATTRS_o_ai int
3459 vec_all_gt(__vector __bool char __a, __vector unsigned char __b) {
3460 int __cc;
3461 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
3462 return __cc == 0;
3465 // This prototype is deprecated.
3466 static inline __ATTRS_o_ai int
3467 vec_all_gt(__vector __bool char __a, __vector __bool char __b) {
3468 int __cc;
3469 __builtin_s390_vchlbs((__vector unsigned char)__a,
3470 (__vector unsigned char)__b, &__cc);
3471 return __cc == 0;
3474 static inline __ATTRS_o_ai int
3475 vec_all_gt(__vector signed short __a, __vector signed short __b) {
3476 int __cc;
3477 __builtin_s390_vchhs(__a, __b, &__cc);
3478 return __cc == 0;
3481 // This prototype is deprecated.
3482 static inline __ATTRS_o_ai int
3483 vec_all_gt(__vector signed short __a, __vector __bool short __b) {
3484 int __cc;
3485 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
3486 return __cc == 0;
3489 // This prototype is deprecated.
3490 static inline __ATTRS_o_ai int
3491 vec_all_gt(__vector __bool short __a, __vector signed short __b) {
3492 int __cc;
3493 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
3494 return __cc == 0;
3497 static inline __ATTRS_o_ai int
3498 vec_all_gt(__vector unsigned short __a, __vector unsigned short __b) {
3499 int __cc;
3500 __builtin_s390_vchlhs(__a, __b, &__cc);
3501 return __cc == 0;
3504 // This prototype is deprecated.
3505 static inline __ATTRS_o_ai int
3506 vec_all_gt(__vector unsigned short __a, __vector __bool short __b) {
3507 int __cc;
3508 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
3509 return __cc == 0;
3512 // This prototype is deprecated.
3513 static inline __ATTRS_o_ai int
3514 vec_all_gt(__vector __bool short __a, __vector unsigned short __b) {
3515 int __cc;
3516 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
3517 return __cc == 0;
3520 // This prototype is deprecated.
3521 static inline __ATTRS_o_ai int
3522 vec_all_gt(__vector __bool short __a, __vector __bool short __b) {
3523 int __cc;
3524 __builtin_s390_vchlhs((__vector unsigned short)__a,
3525 (__vector unsigned short)__b, &__cc);
3526 return __cc == 0;
3529 static inline __ATTRS_o_ai int
3530 vec_all_gt(__vector signed int __a, __vector signed int __b) {
3531 int __cc;
3532 __builtin_s390_vchfs(__a, __b, &__cc);
3533 return __cc == 0;
3536 // This prototype is deprecated.
3537 static inline __ATTRS_o_ai int
3538 vec_all_gt(__vector signed int __a, __vector __bool int __b) {
3539 int __cc;
3540 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
3541 return __cc == 0;
3544 // This prototype is deprecated.
3545 static inline __ATTRS_o_ai int
3546 vec_all_gt(__vector __bool int __a, __vector signed int __b) {
3547 int __cc;
3548 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
3549 return __cc == 0;
3552 static inline __ATTRS_o_ai int
3553 vec_all_gt(__vector unsigned int __a, __vector unsigned int __b) {
3554 int __cc;
3555 __builtin_s390_vchlfs(__a, __b, &__cc);
3556 return __cc == 0;
3559 // This prototype is deprecated.
3560 static inline __ATTRS_o_ai int
3561 vec_all_gt(__vector unsigned int __a, __vector __bool int __b) {
3562 int __cc;
3563 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
3564 return __cc == 0;
3567 // This prototype is deprecated.
3568 static inline __ATTRS_o_ai int
3569 vec_all_gt(__vector __bool int __a, __vector unsigned int __b) {
3570 int __cc;
3571 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
3572 return __cc == 0;
3575 // This prototype is deprecated.
3576 static inline __ATTRS_o_ai int
3577 vec_all_gt(__vector __bool int __a, __vector __bool int __b) {
3578 int __cc;
3579 __builtin_s390_vchlfs((__vector unsigned int)__a,
3580 (__vector unsigned int)__b, &__cc);
3581 return __cc == 0;
3584 static inline __ATTRS_o_ai int
3585 vec_all_gt(__vector signed long long __a, __vector signed long long __b) {
3586 int __cc;
3587 __builtin_s390_vchgs(__a, __b, &__cc);
3588 return __cc == 0;
3591 // This prototype is deprecated.
3592 static inline __ATTRS_o_ai int
3593 vec_all_gt(__vector signed long long __a, __vector __bool long long __b) {
3594 int __cc;
3595 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
3596 return __cc == 0;
3599 // This prototype is deprecated.
3600 static inline __ATTRS_o_ai int
3601 vec_all_gt(__vector __bool long long __a, __vector signed long long __b) {
3602 int __cc;
3603 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
3604 return __cc == 0;
3607 static inline __ATTRS_o_ai int
3608 vec_all_gt(__vector unsigned long long __a, __vector unsigned long long __b) {
3609 int __cc;
3610 __builtin_s390_vchlgs(__a, __b, &__cc);
3611 return __cc == 0;
3614 // This prototype is deprecated.
3615 static inline __ATTRS_o_ai int
3616 vec_all_gt(__vector unsigned long long __a, __vector __bool long long __b) {
3617 int __cc;
3618 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
3619 return __cc == 0;
3622 // This prototype is deprecated.
3623 static inline __ATTRS_o_ai int
3624 vec_all_gt(__vector __bool long long __a, __vector unsigned long long __b) {
3625 int __cc;
3626 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
3627 return __cc == 0;
3630 // This prototype is deprecated.
3631 static inline __ATTRS_o_ai int
3632 vec_all_gt(__vector __bool long long __a, __vector __bool long long __b) {
3633 int __cc;
3634 __builtin_s390_vchlgs((__vector unsigned long long)__a,
3635 (__vector unsigned long long)__b, &__cc);
3636 return __cc == 0;
3639 #if __ARCH__ >= 12
3640 static inline __ATTRS_o_ai int
3641 vec_all_gt(__vector float __a, __vector float __b) {
3642 int __cc;
3643 __builtin_s390_vfchsbs(__a, __b, &__cc);
3644 return __cc == 0;
3646 #endif
3648 static inline __ATTRS_o_ai int
3649 vec_all_gt(__vector double __a, __vector double __b) {
3650 int __cc;
3651 __builtin_s390_vfchdbs(__a, __b, &__cc);
3652 return __cc == 0;
3655 /*-- vec_all_le -------------------------------------------------------------*/
3657 static inline __ATTRS_o_ai int
3658 vec_all_le(__vector signed char __a, __vector signed char __b) {
3659 int __cc;
3660 __builtin_s390_vchbs(__a, __b, &__cc);
3661 return __cc == 3;
3664 // This prototype is deprecated.
3665 static inline __ATTRS_o_ai int
3666 vec_all_le(__vector signed char __a, __vector __bool char __b) {
3667 int __cc;
3668 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
3669 return __cc == 3;
3672 // This prototype is deprecated.
3673 static inline __ATTRS_o_ai int
3674 vec_all_le(__vector __bool char __a, __vector signed char __b) {
3675 int __cc;
3676 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
3677 return __cc == 3;
3680 static inline __ATTRS_o_ai int
3681 vec_all_le(__vector unsigned char __a, __vector unsigned char __b) {
3682 int __cc;
3683 __builtin_s390_vchlbs(__a, __b, &__cc);
3684 return __cc == 3;
3687 // This prototype is deprecated.
3688 static inline __ATTRS_o_ai int
3689 vec_all_le(__vector unsigned char __a, __vector __bool char __b) {
3690 int __cc;
3691 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
3692 return __cc == 3;
3695 // This prototype is deprecated.
3696 static inline __ATTRS_o_ai int
3697 vec_all_le(__vector __bool char __a, __vector unsigned char __b) {
3698 int __cc;
3699 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
3700 return __cc == 3;
3703 // This prototype is deprecated.
3704 static inline __ATTRS_o_ai int
3705 vec_all_le(__vector __bool char __a, __vector __bool char __b) {
3706 int __cc;
3707 __builtin_s390_vchlbs((__vector unsigned char)__a,
3708 (__vector unsigned char)__b, &__cc);
3709 return __cc == 3;
3712 static inline __ATTRS_o_ai int
3713 vec_all_le(__vector signed short __a, __vector signed short __b) {
3714 int __cc;
3715 __builtin_s390_vchhs(__a, __b, &__cc);
3716 return __cc == 3;
3719 // This prototype is deprecated.
3720 static inline __ATTRS_o_ai int
3721 vec_all_le(__vector signed short __a, __vector __bool short __b) {
3722 int __cc;
3723 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
3724 return __cc == 3;
3727 // This prototype is deprecated.
3728 static inline __ATTRS_o_ai int
3729 vec_all_le(__vector __bool short __a, __vector signed short __b) {
3730 int __cc;
3731 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
3732 return __cc == 3;
3735 static inline __ATTRS_o_ai int
3736 vec_all_le(__vector unsigned short __a, __vector unsigned short __b) {
3737 int __cc;
3738 __builtin_s390_vchlhs(__a, __b, &__cc);
3739 return __cc == 3;
3742 // This prototype is deprecated.
3743 static inline __ATTRS_o_ai int
3744 vec_all_le(__vector unsigned short __a, __vector __bool short __b) {
3745 int __cc;
3746 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
3747 return __cc == 3;
3750 // This prototype is deprecated.
3751 static inline __ATTRS_o_ai int
3752 vec_all_le(__vector __bool short __a, __vector unsigned short __b) {
3753 int __cc;
3754 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
3755 return __cc == 3;
3758 // This prototype is deprecated.
3759 static inline __ATTRS_o_ai int
3760 vec_all_le(__vector __bool short __a, __vector __bool short __b) {
3761 int __cc;
3762 __builtin_s390_vchlhs((__vector unsigned short)__a,
3763 (__vector unsigned short)__b, &__cc);
3764 return __cc == 3;
3767 static inline __ATTRS_o_ai int
3768 vec_all_le(__vector signed int __a, __vector signed int __b) {
3769 int __cc;
3770 __builtin_s390_vchfs(__a, __b, &__cc);
3771 return __cc == 3;
3774 // This prototype is deprecated.
3775 static inline __ATTRS_o_ai int
3776 vec_all_le(__vector signed int __a, __vector __bool int __b) {
3777 int __cc;
3778 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
3779 return __cc == 3;
3782 // This prototype is deprecated.
3783 static inline __ATTRS_o_ai int
3784 vec_all_le(__vector __bool int __a, __vector signed int __b) {
3785 int __cc;
3786 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
3787 return __cc == 3;
3790 static inline __ATTRS_o_ai int
3791 vec_all_le(__vector unsigned int __a, __vector unsigned int __b) {
3792 int __cc;
3793 __builtin_s390_vchlfs(__a, __b, &__cc);
3794 return __cc == 3;
3797 // This prototype is deprecated.
3798 static inline __ATTRS_o_ai int
3799 vec_all_le(__vector unsigned int __a, __vector __bool int __b) {
3800 int __cc;
3801 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
3802 return __cc == 3;
3805 // This prototype is deprecated.
3806 static inline __ATTRS_o_ai int
3807 vec_all_le(__vector __bool int __a, __vector unsigned int __b) {
3808 int __cc;
3809 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
3810 return __cc == 3;
3813 // This prototype is deprecated.
3814 static inline __ATTRS_o_ai int
3815 vec_all_le(__vector __bool int __a, __vector __bool int __b) {
3816 int __cc;
3817 __builtin_s390_vchlfs((__vector unsigned int)__a,
3818 (__vector unsigned int)__b, &__cc);
3819 return __cc == 3;
3822 static inline __ATTRS_o_ai int
3823 vec_all_le(__vector signed long long __a, __vector signed long long __b) {
3824 int __cc;
3825 __builtin_s390_vchgs(__a, __b, &__cc);
3826 return __cc == 3;
3829 // This prototype is deprecated.
3830 static inline __ATTRS_o_ai int
3831 vec_all_le(__vector signed long long __a, __vector __bool long long __b) {
3832 int __cc;
3833 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
3834 return __cc == 3;
3837 // This prototype is deprecated.
3838 static inline __ATTRS_o_ai int
3839 vec_all_le(__vector __bool long long __a, __vector signed long long __b) {
3840 int __cc;
3841 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
3842 return __cc == 3;
3845 static inline __ATTRS_o_ai int
3846 vec_all_le(__vector unsigned long long __a, __vector unsigned long long __b) {
3847 int __cc;
3848 __builtin_s390_vchlgs(__a, __b, &__cc);
3849 return __cc == 3;
3852 // This prototype is deprecated.
3853 static inline __ATTRS_o_ai int
3854 vec_all_le(__vector unsigned long long __a, __vector __bool long long __b) {
3855 int __cc;
3856 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
3857 return __cc == 3;
3860 // This prototype is deprecated.
3861 static inline __ATTRS_o_ai int
3862 vec_all_le(__vector __bool long long __a, __vector unsigned long long __b) {
3863 int __cc;
3864 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
3865 return __cc == 3;
3868 // This prototype is deprecated.
3869 static inline __ATTRS_o_ai int
3870 vec_all_le(__vector __bool long long __a, __vector __bool long long __b) {
3871 int __cc;
3872 __builtin_s390_vchlgs((__vector unsigned long long)__a,
3873 (__vector unsigned long long)__b, &__cc);
3874 return __cc == 3;
3877 #if __ARCH__ >= 12
3878 static inline __ATTRS_o_ai int
3879 vec_all_le(__vector float __a, __vector float __b) {
3880 int __cc;
3881 __builtin_s390_vfchesbs(__b, __a, &__cc);
3882 return __cc == 0;
3884 #endif
3886 static inline __ATTRS_o_ai int
3887 vec_all_le(__vector double __a, __vector double __b) {
3888 int __cc;
3889 __builtin_s390_vfchedbs(__b, __a, &__cc);
3890 return __cc == 0;
3893 /*-- vec_all_lt -------------------------------------------------------------*/
3895 static inline __ATTRS_o_ai int
3896 vec_all_lt(__vector signed char __a, __vector signed char __b) {
3897 int __cc;
3898 __builtin_s390_vchbs(__b, __a, &__cc);
3899 return __cc == 0;
3902 // This prototype is deprecated.
3903 static inline __ATTRS_o_ai int
3904 vec_all_lt(__vector signed char __a, __vector __bool char __b) {
3905 int __cc;
3906 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
3907 return __cc == 0;
3910 // This prototype is deprecated.
3911 static inline __ATTRS_o_ai int
3912 vec_all_lt(__vector __bool char __a, __vector signed char __b) {
3913 int __cc;
3914 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
3915 return __cc == 0;
3918 static inline __ATTRS_o_ai int
3919 vec_all_lt(__vector unsigned char __a, __vector unsigned char __b) {
3920 int __cc;
3921 __builtin_s390_vchlbs(__b, __a, &__cc);
3922 return __cc == 0;
3925 // This prototype is deprecated.
3926 static inline __ATTRS_o_ai int
3927 vec_all_lt(__vector unsigned char __a, __vector __bool char __b) {
3928 int __cc;
3929 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
3930 return __cc == 0;
3933 // This prototype is deprecated.
3934 static inline __ATTRS_o_ai int
3935 vec_all_lt(__vector __bool char __a, __vector unsigned char __b) {
3936 int __cc;
3937 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
3938 return __cc == 0;
3941 // This prototype is deprecated.
3942 static inline __ATTRS_o_ai int
3943 vec_all_lt(__vector __bool char __a, __vector __bool char __b) {
3944 int __cc;
3945 __builtin_s390_vchlbs((__vector unsigned char)__b,
3946 (__vector unsigned char)__a, &__cc);
3947 return __cc == 0;
3950 static inline __ATTRS_o_ai int
3951 vec_all_lt(__vector signed short __a, __vector signed short __b) {
3952 int __cc;
3953 __builtin_s390_vchhs(__b, __a, &__cc);
3954 return __cc == 0;
3957 // This prototype is deprecated.
3958 static inline __ATTRS_o_ai int
3959 vec_all_lt(__vector signed short __a, __vector __bool short __b) {
3960 int __cc;
3961 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
3962 return __cc == 0;
3965 // This prototype is deprecated.
3966 static inline __ATTRS_o_ai int
3967 vec_all_lt(__vector __bool short __a, __vector signed short __b) {
3968 int __cc;
3969 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
3970 return __cc == 0;
3973 static inline __ATTRS_o_ai int
3974 vec_all_lt(__vector unsigned short __a, __vector unsigned short __b) {
3975 int __cc;
3976 __builtin_s390_vchlhs(__b, __a, &__cc);
3977 return __cc == 0;
3980 // This prototype is deprecated.
3981 static inline __ATTRS_o_ai int
3982 vec_all_lt(__vector unsigned short __a, __vector __bool short __b) {
3983 int __cc;
3984 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
3985 return __cc == 0;
3988 // This prototype is deprecated.
3989 static inline __ATTRS_o_ai int
3990 vec_all_lt(__vector __bool short __a, __vector unsigned short __b) {
3991 int __cc;
3992 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
3993 return __cc == 0;
3996 // This prototype is deprecated.
3997 static inline __ATTRS_o_ai int
3998 vec_all_lt(__vector __bool short __a, __vector __bool short __b) {
3999 int __cc;
4000 __builtin_s390_vchlhs((__vector unsigned short)__b,
4001 (__vector unsigned short)__a, &__cc);
4002 return __cc == 0;
4005 static inline __ATTRS_o_ai int
4006 vec_all_lt(__vector signed int __a, __vector signed int __b) {
4007 int __cc;
4008 __builtin_s390_vchfs(__b, __a, &__cc);
4009 return __cc == 0;
4012 // This prototype is deprecated.
4013 static inline __ATTRS_o_ai int
4014 vec_all_lt(__vector signed int __a, __vector __bool int __b) {
4015 int __cc;
4016 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
4017 return __cc == 0;
4020 // This prototype is deprecated.
4021 static inline __ATTRS_o_ai int
4022 vec_all_lt(__vector __bool int __a, __vector signed int __b) {
4023 int __cc;
4024 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
4025 return __cc == 0;
4028 static inline __ATTRS_o_ai int
4029 vec_all_lt(__vector unsigned int __a, __vector unsigned int __b) {
4030 int __cc;
4031 __builtin_s390_vchlfs(__b, __a, &__cc);
4032 return __cc == 0;
4035 // This prototype is deprecated.
4036 static inline __ATTRS_o_ai int
4037 vec_all_lt(__vector unsigned int __a, __vector __bool int __b) {
4038 int __cc;
4039 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
4040 return __cc == 0;
4043 // This prototype is deprecated.
4044 static inline __ATTRS_o_ai int
4045 vec_all_lt(__vector __bool int __a, __vector unsigned int __b) {
4046 int __cc;
4047 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
4048 return __cc == 0;
4051 // This prototype is deprecated.
4052 static inline __ATTRS_o_ai int
4053 vec_all_lt(__vector __bool int __a, __vector __bool int __b) {
4054 int __cc;
4055 __builtin_s390_vchlfs((__vector unsigned int)__b,
4056 (__vector unsigned int)__a, &__cc);
4057 return __cc == 0;
4060 static inline __ATTRS_o_ai int
4061 vec_all_lt(__vector signed long long __a, __vector signed long long __b) {
4062 int __cc;
4063 __builtin_s390_vchgs(__b, __a, &__cc);
4064 return __cc == 0;
4067 // This prototype is deprecated.
4068 static inline __ATTRS_o_ai int
4069 vec_all_lt(__vector signed long long __a, __vector __bool long long __b) {
4070 int __cc;
4071 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
4072 return __cc == 0;
4075 // This prototype is deprecated.
4076 static inline __ATTRS_o_ai int
4077 vec_all_lt(__vector __bool long long __a, __vector signed long long __b) {
4078 int __cc;
4079 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
4080 return __cc == 0;
4083 static inline __ATTRS_o_ai int
4084 vec_all_lt(__vector unsigned long long __a, __vector unsigned long long __b) {
4085 int __cc;
4086 __builtin_s390_vchlgs(__b, __a, &__cc);
4087 return __cc == 0;
4090 // This prototype is deprecated.
4091 static inline __ATTRS_o_ai int
4092 vec_all_lt(__vector unsigned long long __a, __vector __bool long long __b) {
4093 int __cc;
4094 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
4095 return __cc == 0;
4098 // This prototype is deprecated.
4099 static inline __ATTRS_o_ai int
4100 vec_all_lt(__vector __bool long long __a, __vector unsigned long long __b) {
4101 int __cc;
4102 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
4103 return __cc == 0;
4106 // This prototype is deprecated.
4107 static inline __ATTRS_o_ai int
4108 vec_all_lt(__vector __bool long long __a, __vector __bool long long __b) {
4109 int __cc;
4110 __builtin_s390_vchlgs((__vector unsigned long long)__b,
4111 (__vector unsigned long long)__a, &__cc);
4112 return __cc == 0;
4115 #if __ARCH__ >= 12
4116 static inline __ATTRS_o_ai int
4117 vec_all_lt(__vector float __a, __vector float __b) {
4118 int __cc;
4119 __builtin_s390_vfchsbs(__b, __a, &__cc);
4120 return __cc == 0;
4122 #endif
4124 static inline __ATTRS_o_ai int
4125 vec_all_lt(__vector double __a, __vector double __b) {
4126 int __cc;
4127 __builtin_s390_vfchdbs(__b, __a, &__cc);
4128 return __cc == 0;
4131 /*-- vec_all_nge ------------------------------------------------------------*/
4133 #if __ARCH__ >= 12
4134 static inline __ATTRS_o_ai int
4135 vec_all_nge(__vector float __a, __vector float __b) {
4136 int __cc;
4137 __builtin_s390_vfchesbs(__a, __b, &__cc);
4138 return __cc == 3;
4140 #endif
4142 static inline __ATTRS_o_ai int
4143 vec_all_nge(__vector double __a, __vector double __b) {
4144 int __cc;
4145 __builtin_s390_vfchedbs(__a, __b, &__cc);
4146 return __cc == 3;
4149 /*-- vec_all_ngt ------------------------------------------------------------*/
4151 #if __ARCH__ >= 12
4152 static inline __ATTRS_o_ai int
4153 vec_all_ngt(__vector float __a, __vector float __b) {
4154 int __cc;
4155 __builtin_s390_vfchsbs(__a, __b, &__cc);
4156 return __cc == 3;
4158 #endif
4160 static inline __ATTRS_o_ai int
4161 vec_all_ngt(__vector double __a, __vector double __b) {
4162 int __cc;
4163 __builtin_s390_vfchdbs(__a, __b, &__cc);
4164 return __cc == 3;
4167 /*-- vec_all_nle ------------------------------------------------------------*/
4169 #if __ARCH__ >= 12
4170 static inline __ATTRS_o_ai int
4171 vec_all_nle(__vector float __a, __vector float __b) {
4172 int __cc;
4173 __builtin_s390_vfchesbs(__b, __a, &__cc);
4174 return __cc == 3;
4176 #endif
4178 static inline __ATTRS_o_ai int
4179 vec_all_nle(__vector double __a, __vector double __b) {
4180 int __cc;
4181 __builtin_s390_vfchedbs(__b, __a, &__cc);
4182 return __cc == 3;
4185 /*-- vec_all_nlt ------------------------------------------------------------*/
4187 #if __ARCH__ >= 12
4188 static inline __ATTRS_o_ai int
4189 vec_all_nlt(__vector float __a, __vector float __b) {
4190 int __cc;
4191 __builtin_s390_vfchsbs(__b, __a, &__cc);
4192 return __cc == 3;
4194 #endif
4196 static inline __ATTRS_o_ai int
4197 vec_all_nlt(__vector double __a, __vector double __b) {
4198 int __cc;
4199 __builtin_s390_vfchdbs(__b, __a, &__cc);
4200 return __cc == 3;
4203 /*-- vec_all_nan ------------------------------------------------------------*/
4205 #if __ARCH__ >= 12
4206 static inline __ATTRS_o_ai int
4207 vec_all_nan(__vector float __a) {
4208 int __cc;
4209 __builtin_s390_vftcisb(__a, 15, &__cc);
4210 return __cc == 0;
4212 #endif
4214 static inline __ATTRS_o_ai int
4215 vec_all_nan(__vector double __a) {
4216 int __cc;
4217 __builtin_s390_vftcidb(__a, 15, &__cc);
4218 return __cc == 0;
4221 /*-- vec_all_numeric --------------------------------------------------------*/
4223 #if __ARCH__ >= 12
4224 static inline __ATTRS_o_ai int
4225 vec_all_numeric(__vector float __a) {
4226 int __cc;
4227 __builtin_s390_vftcisb(__a, 15, &__cc);
4228 return __cc == 3;
4230 #endif
4232 static inline __ATTRS_o_ai int
4233 vec_all_numeric(__vector double __a) {
4234 int __cc;
4235 __builtin_s390_vftcidb(__a, 15, &__cc);
4236 return __cc == 3;
4239 /*-- vec_any_eq -------------------------------------------------------------*/
4241 static inline __ATTRS_o_ai int
4242 vec_any_eq(__vector signed char __a, __vector signed char __b) {
4243 int __cc;
4244 __builtin_s390_vceqbs(__a, __b, &__cc);
4245 return __cc <= 1;
4248 // This prototype is deprecated.
4249 static inline __ATTRS_o_ai int
4250 vec_any_eq(__vector signed char __a, __vector __bool char __b) {
4251 int __cc;
4252 __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc);
4253 return __cc <= 1;
4256 // This prototype is deprecated.
4257 static inline __ATTRS_o_ai int
4258 vec_any_eq(__vector __bool char __a, __vector signed char __b) {
4259 int __cc;
4260 __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc);
4261 return __cc <= 1;
4264 static inline __ATTRS_o_ai int
4265 vec_any_eq(__vector unsigned char __a, __vector unsigned char __b) {
4266 int __cc;
4267 __builtin_s390_vceqbs((__vector signed char)__a,
4268 (__vector signed char)__b, &__cc);
4269 return __cc <= 1;
4272 // This prototype is deprecated.
4273 static inline __ATTRS_o_ai int
4274 vec_any_eq(__vector unsigned char __a, __vector __bool char __b) {
4275 int __cc;
4276 __builtin_s390_vceqbs((__vector signed char)__a,
4277 (__vector signed char)__b, &__cc);
4278 return __cc <= 1;
4281 // This prototype is deprecated.
4282 static inline __ATTRS_o_ai int
4283 vec_any_eq(__vector __bool char __a, __vector unsigned char __b) {
4284 int __cc;
4285 __builtin_s390_vceqbs((__vector signed char)__a,
4286 (__vector signed char)__b, &__cc);
4287 return __cc <= 1;
4290 static inline __ATTRS_o_ai int
4291 vec_any_eq(__vector __bool char __a, __vector __bool char __b) {
4292 int __cc;
4293 __builtin_s390_vceqbs((__vector signed char)__a,
4294 (__vector signed char)__b, &__cc);
4295 return __cc <= 1;
4298 static inline __ATTRS_o_ai int
4299 vec_any_eq(__vector signed short __a, __vector signed short __b) {
4300 int __cc;
4301 __builtin_s390_vceqhs(__a, __b, &__cc);
4302 return __cc <= 1;
4305 // This prototype is deprecated.
4306 static inline __ATTRS_o_ai int
4307 vec_any_eq(__vector signed short __a, __vector __bool short __b) {
4308 int __cc;
4309 __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc);
4310 return __cc <= 1;
4313 // This prototype is deprecated.
4314 static inline __ATTRS_o_ai int
4315 vec_any_eq(__vector __bool short __a, __vector signed short __b) {
4316 int __cc;
4317 __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc);
4318 return __cc <= 1;
4321 static inline __ATTRS_o_ai int
4322 vec_any_eq(__vector unsigned short __a, __vector unsigned short __b) {
4323 int __cc;
4324 __builtin_s390_vceqhs((__vector signed short)__a,
4325 (__vector signed short)__b, &__cc);
4326 return __cc <= 1;
4329 // This prototype is deprecated.
4330 static inline __ATTRS_o_ai int
4331 vec_any_eq(__vector unsigned short __a, __vector __bool short __b) {
4332 int __cc;
4333 __builtin_s390_vceqhs((__vector signed short)__a,
4334 (__vector signed short)__b, &__cc);
4335 return __cc <= 1;
4338 // This prototype is deprecated.
4339 static inline __ATTRS_o_ai int
4340 vec_any_eq(__vector __bool short __a, __vector unsigned short __b) {
4341 int __cc;
4342 __builtin_s390_vceqhs((__vector signed short)__a,
4343 (__vector signed short)__b, &__cc);
4344 return __cc <= 1;
4347 static inline __ATTRS_o_ai int
4348 vec_any_eq(__vector __bool short __a, __vector __bool short __b) {
4349 int __cc;
4350 __builtin_s390_vceqhs((__vector signed short)__a,
4351 (__vector signed short)__b, &__cc);
4352 return __cc <= 1;
4355 static inline __ATTRS_o_ai int
4356 vec_any_eq(__vector signed int __a, __vector signed int __b) {
4357 int __cc;
4358 __builtin_s390_vceqfs(__a, __b, &__cc);
4359 return __cc <= 1;
4362 // This prototype is deprecated.
4363 static inline __ATTRS_o_ai int
4364 vec_any_eq(__vector signed int __a, __vector __bool int __b) {
4365 int __cc;
4366 __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc);
4367 return __cc <= 1;
4370 // This prototype is deprecated.
4371 static inline __ATTRS_o_ai int
4372 vec_any_eq(__vector __bool int __a, __vector signed int __b) {
4373 int __cc;
4374 __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc);
4375 return __cc <= 1;
4378 static inline __ATTRS_o_ai int
4379 vec_any_eq(__vector unsigned int __a, __vector unsigned int __b) {
4380 int __cc;
4381 __builtin_s390_vceqfs((__vector signed int)__a,
4382 (__vector signed int)__b, &__cc);
4383 return __cc <= 1;
4386 // This prototype is deprecated.
4387 static inline __ATTRS_o_ai int
4388 vec_any_eq(__vector unsigned int __a, __vector __bool int __b) {
4389 int __cc;
4390 __builtin_s390_vceqfs((__vector signed int)__a,
4391 (__vector signed int)__b, &__cc);
4392 return __cc <= 1;
4395 // This prototype is deprecated.
4396 static inline __ATTRS_o_ai int
4397 vec_any_eq(__vector __bool int __a, __vector unsigned int __b) {
4398 int __cc;
4399 __builtin_s390_vceqfs((__vector signed int)__a,
4400 (__vector signed int)__b, &__cc);
4401 return __cc <= 1;
4404 static inline __ATTRS_o_ai int
4405 vec_any_eq(__vector __bool int __a, __vector __bool int __b) {
4406 int __cc;
4407 __builtin_s390_vceqfs((__vector signed int)__a,
4408 (__vector signed int)__b, &__cc);
4409 return __cc <= 1;
4412 static inline __ATTRS_o_ai int
4413 vec_any_eq(__vector signed long long __a, __vector signed long long __b) {
4414 int __cc;
4415 __builtin_s390_vceqgs(__a, __b, &__cc);
4416 return __cc <= 1;
4419 // This prototype is deprecated.
4420 static inline __ATTRS_o_ai int
4421 vec_any_eq(__vector signed long long __a, __vector __bool long long __b) {
4422 int __cc;
4423 __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc);
4424 return __cc <= 1;
4427 // This prototype is deprecated.
4428 static inline __ATTRS_o_ai int
4429 vec_any_eq(__vector __bool long long __a, __vector signed long long __b) {
4430 int __cc;
4431 __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc);
4432 return __cc <= 1;
4435 static inline __ATTRS_o_ai int
4436 vec_any_eq(__vector unsigned long long __a, __vector unsigned long long __b) {
4437 int __cc;
4438 __builtin_s390_vceqgs((__vector signed long long)__a,
4439 (__vector signed long long)__b, &__cc);
4440 return __cc <= 1;
4443 // This prototype is deprecated.
4444 static inline __ATTRS_o_ai int
4445 vec_any_eq(__vector unsigned long long __a, __vector __bool long long __b) {
4446 int __cc;
4447 __builtin_s390_vceqgs((__vector signed long long)__a,
4448 (__vector signed long long)__b, &__cc);
4449 return __cc <= 1;
4452 // This prototype is deprecated.
4453 static inline __ATTRS_o_ai int
4454 vec_any_eq(__vector __bool long long __a, __vector unsigned long long __b) {
4455 int __cc;
4456 __builtin_s390_vceqgs((__vector signed long long)__a,
4457 (__vector signed long long)__b, &__cc);
4458 return __cc <= 1;
4461 static inline __ATTRS_o_ai int
4462 vec_any_eq(__vector __bool long long __a, __vector __bool long long __b) {
4463 int __cc;
4464 __builtin_s390_vceqgs((__vector signed long long)__a,
4465 (__vector signed long long)__b, &__cc);
4466 return __cc <= 1;
4469 #if __ARCH__ >= 12
4470 static inline __ATTRS_o_ai int
4471 vec_any_eq(__vector float __a, __vector float __b) {
4472 int __cc;
4473 __builtin_s390_vfcesbs(__a, __b, &__cc);
4474 return __cc <= 1;
4476 #endif
4478 static inline __ATTRS_o_ai int
4479 vec_any_eq(__vector double __a, __vector double __b) {
4480 int __cc;
4481 __builtin_s390_vfcedbs(__a, __b, &__cc);
4482 return __cc <= 1;
4485 /*-- vec_any_ne -------------------------------------------------------------*/
4487 static inline __ATTRS_o_ai int
4488 vec_any_ne(__vector signed char __a, __vector signed char __b) {
4489 int __cc;
4490 __builtin_s390_vceqbs(__a, __b, &__cc);
4491 return __cc != 0;
4494 // This prototype is deprecated.
4495 static inline __ATTRS_o_ai int
4496 vec_any_ne(__vector signed char __a, __vector __bool char __b) {
4497 int __cc;
4498 __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc);
4499 return __cc != 0;
4502 // This prototype is deprecated.
4503 static inline __ATTRS_o_ai int
4504 vec_any_ne(__vector __bool char __a, __vector signed char __b) {
4505 int __cc;
4506 __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc);
4507 return __cc != 0;
4510 static inline __ATTRS_o_ai int
4511 vec_any_ne(__vector unsigned char __a, __vector unsigned char __b) {
4512 int __cc;
4513 __builtin_s390_vceqbs((__vector signed char)__a,
4514 (__vector signed char)__b, &__cc);
4515 return __cc != 0;
4518 // This prototype is deprecated.
4519 static inline __ATTRS_o_ai int
4520 vec_any_ne(__vector unsigned char __a, __vector __bool char __b) {
4521 int __cc;
4522 __builtin_s390_vceqbs((__vector signed char)__a,
4523 (__vector signed char)__b, &__cc);
4524 return __cc != 0;
4527 // This prototype is deprecated.
4528 static inline __ATTRS_o_ai int
4529 vec_any_ne(__vector __bool char __a, __vector unsigned char __b) {
4530 int __cc;
4531 __builtin_s390_vceqbs((__vector signed char)__a,
4532 (__vector signed char)__b, &__cc);
4533 return __cc != 0;
4536 static inline __ATTRS_o_ai int
4537 vec_any_ne(__vector __bool char __a, __vector __bool char __b) {
4538 int __cc;
4539 __builtin_s390_vceqbs((__vector signed char)__a,
4540 (__vector signed char)__b, &__cc);
4541 return __cc != 0;
4544 static inline __ATTRS_o_ai int
4545 vec_any_ne(__vector signed short __a, __vector signed short __b) {
4546 int __cc;
4547 __builtin_s390_vceqhs(__a, __b, &__cc);
4548 return __cc != 0;
4551 // This prototype is deprecated.
4552 static inline __ATTRS_o_ai int
4553 vec_any_ne(__vector signed short __a, __vector __bool short __b) {
4554 int __cc;
4555 __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc);
4556 return __cc != 0;
4559 // This prototype is deprecated.
4560 static inline __ATTRS_o_ai int
4561 vec_any_ne(__vector __bool short __a, __vector signed short __b) {
4562 int __cc;
4563 __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc);
4564 return __cc != 0;
4567 static inline __ATTRS_o_ai int
4568 vec_any_ne(__vector unsigned short __a, __vector unsigned short __b) {
4569 int __cc;
4570 __builtin_s390_vceqhs((__vector signed short)__a,
4571 (__vector signed short)__b, &__cc);
4572 return __cc != 0;
4575 // This prototype is deprecated.
4576 static inline __ATTRS_o_ai int
4577 vec_any_ne(__vector unsigned short __a, __vector __bool short __b) {
4578 int __cc;
4579 __builtin_s390_vceqhs((__vector signed short)__a,
4580 (__vector signed short)__b, &__cc);
4581 return __cc != 0;
4584 // This prototype is deprecated.
4585 static inline __ATTRS_o_ai int
4586 vec_any_ne(__vector __bool short __a, __vector unsigned short __b) {
4587 int __cc;
4588 __builtin_s390_vceqhs((__vector signed short)__a,
4589 (__vector signed short)__b, &__cc);
4590 return __cc != 0;
4593 static inline __ATTRS_o_ai int
4594 vec_any_ne(__vector __bool short __a, __vector __bool short __b) {
4595 int __cc;
4596 __builtin_s390_vceqhs((__vector signed short)__a,
4597 (__vector signed short)__b, &__cc);
4598 return __cc != 0;
4601 static inline __ATTRS_o_ai int
4602 vec_any_ne(__vector signed int __a, __vector signed int __b) {
4603 int __cc;
4604 __builtin_s390_vceqfs(__a, __b, &__cc);
4605 return __cc != 0;
4608 // This prototype is deprecated.
4609 static inline __ATTRS_o_ai int
4610 vec_any_ne(__vector signed int __a, __vector __bool int __b) {
4611 int __cc;
4612 __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc);
4613 return __cc != 0;
4616 // This prototype is deprecated.
4617 static inline __ATTRS_o_ai int
4618 vec_any_ne(__vector __bool int __a, __vector signed int __b) {
4619 int __cc;
4620 __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc);
4621 return __cc != 0;
4624 static inline __ATTRS_o_ai int
4625 vec_any_ne(__vector unsigned int __a, __vector unsigned int __b) {
4626 int __cc;
4627 __builtin_s390_vceqfs((__vector signed int)__a,
4628 (__vector signed int)__b, &__cc);
4629 return __cc != 0;
4632 // This prototype is deprecated.
4633 static inline __ATTRS_o_ai int
4634 vec_any_ne(__vector unsigned int __a, __vector __bool int __b) {
4635 int __cc;
4636 __builtin_s390_vceqfs((__vector signed int)__a,
4637 (__vector signed int)__b, &__cc);
4638 return __cc != 0;
4641 // This prototype is deprecated.
4642 static inline __ATTRS_o_ai int
4643 vec_any_ne(__vector __bool int __a, __vector unsigned int __b) {
4644 int __cc;
4645 __builtin_s390_vceqfs((__vector signed int)__a,
4646 (__vector signed int)__b, &__cc);
4647 return __cc != 0;
4650 static inline __ATTRS_o_ai int
4651 vec_any_ne(__vector __bool int __a, __vector __bool int __b) {
4652 int __cc;
4653 __builtin_s390_vceqfs((__vector signed int)__a,
4654 (__vector signed int)__b, &__cc);
4655 return __cc != 0;
4658 static inline __ATTRS_o_ai int
4659 vec_any_ne(__vector signed long long __a, __vector signed long long __b) {
4660 int __cc;
4661 __builtin_s390_vceqgs(__a, __b, &__cc);
4662 return __cc != 0;
4665 // This prototype is deprecated.
4666 static inline __ATTRS_o_ai int
4667 vec_any_ne(__vector signed long long __a, __vector __bool long long __b) {
4668 int __cc;
4669 __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc);
4670 return __cc != 0;
4673 // This prototype is deprecated.
4674 static inline __ATTRS_o_ai int
4675 vec_any_ne(__vector __bool long long __a, __vector signed long long __b) {
4676 int __cc;
4677 __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc);
4678 return __cc != 0;
4681 static inline __ATTRS_o_ai int
4682 vec_any_ne(__vector unsigned long long __a, __vector unsigned long long __b) {
4683 int __cc;
4684 __builtin_s390_vceqgs((__vector signed long long)__a,
4685 (__vector signed long long)__b, &__cc);
4686 return __cc != 0;
4689 // This prototype is deprecated.
4690 static inline __ATTRS_o_ai int
4691 vec_any_ne(__vector unsigned long long __a, __vector __bool long long __b) {
4692 int __cc;
4693 __builtin_s390_vceqgs((__vector signed long long)__a,
4694 (__vector signed long long)__b, &__cc);
4695 return __cc != 0;
4698 // This prototype is deprecated.
4699 static inline __ATTRS_o_ai int
4700 vec_any_ne(__vector __bool long long __a, __vector unsigned long long __b) {
4701 int __cc;
4702 __builtin_s390_vceqgs((__vector signed long long)__a,
4703 (__vector signed long long)__b, &__cc);
4704 return __cc != 0;
4707 static inline __ATTRS_o_ai int
4708 vec_any_ne(__vector __bool long long __a, __vector __bool long long __b) {
4709 int __cc;
4710 __builtin_s390_vceqgs((__vector signed long long)__a,
4711 (__vector signed long long)__b, &__cc);
4712 return __cc != 0;
4715 #if __ARCH__ >= 12
4716 static inline __ATTRS_o_ai int
4717 vec_any_ne(__vector float __a, __vector float __b) {
4718 int __cc;
4719 __builtin_s390_vfcesbs(__a, __b, &__cc);
4720 return __cc != 0;
4722 #endif
4724 static inline __ATTRS_o_ai int
4725 vec_any_ne(__vector double __a, __vector double __b) {
4726 int __cc;
4727 __builtin_s390_vfcedbs(__a, __b, &__cc);
4728 return __cc != 0;
4731 /*-- vec_any_ge -------------------------------------------------------------*/
4733 static inline __ATTRS_o_ai int
4734 vec_any_ge(__vector signed char __a, __vector signed char __b) {
4735 int __cc;
4736 __builtin_s390_vchbs(__b, __a, &__cc);
4737 return __cc != 0;
4740 // This prototype is deprecated.
4741 static inline __ATTRS_o_ai int
4742 vec_any_ge(__vector signed char __a, __vector __bool char __b) {
4743 int __cc;
4744 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
4745 return __cc != 0;
4748 // This prototype is deprecated.
4749 static inline __ATTRS_o_ai int
4750 vec_any_ge(__vector __bool char __a, __vector signed char __b) {
4751 int __cc;
4752 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
4753 return __cc != 0;
4756 static inline __ATTRS_o_ai int
4757 vec_any_ge(__vector unsigned char __a, __vector unsigned char __b) {
4758 int __cc;
4759 __builtin_s390_vchlbs(__b, __a, &__cc);
4760 return __cc != 0;
4763 // This prototype is deprecated.
4764 static inline __ATTRS_o_ai int
4765 vec_any_ge(__vector unsigned char __a, __vector __bool char __b) {
4766 int __cc;
4767 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
4768 return __cc != 0;
4771 // This prototype is deprecated.
4772 static inline __ATTRS_o_ai int
4773 vec_any_ge(__vector __bool char __a, __vector unsigned char __b) {
4774 int __cc;
4775 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
4776 return __cc != 0;
4779 // This prototype is deprecated.
4780 static inline __ATTRS_o_ai int
4781 vec_any_ge(__vector __bool char __a, __vector __bool char __b) {
4782 int __cc;
4783 __builtin_s390_vchlbs((__vector unsigned char)__b,
4784 (__vector unsigned char)__a, &__cc);
4785 return __cc != 0;
4788 static inline __ATTRS_o_ai int
4789 vec_any_ge(__vector signed short __a, __vector signed short __b) {
4790 int __cc;
4791 __builtin_s390_vchhs(__b, __a, &__cc);
4792 return __cc != 0;
4795 // This prototype is deprecated.
4796 static inline __ATTRS_o_ai int
4797 vec_any_ge(__vector signed short __a, __vector __bool short __b) {
4798 int __cc;
4799 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
4800 return __cc != 0;
4803 // This prototype is deprecated.
4804 static inline __ATTRS_o_ai int
4805 vec_any_ge(__vector __bool short __a, __vector signed short __b) {
4806 int __cc;
4807 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
4808 return __cc != 0;
4811 static inline __ATTRS_o_ai int
4812 vec_any_ge(__vector unsigned short __a, __vector unsigned short __b) {
4813 int __cc;
4814 __builtin_s390_vchlhs(__b, __a, &__cc);
4815 return __cc != 0;
4818 // This prototype is deprecated.
4819 static inline __ATTRS_o_ai int
4820 vec_any_ge(__vector unsigned short __a, __vector __bool short __b) {
4821 int __cc;
4822 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
4823 return __cc != 0;
4826 // This prototype is deprecated.
4827 static inline __ATTRS_o_ai int
4828 vec_any_ge(__vector __bool short __a, __vector unsigned short __b) {
4829 int __cc;
4830 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
4831 return __cc != 0;
4834 // This prototype is deprecated.
4835 static inline __ATTRS_o_ai int
4836 vec_any_ge(__vector __bool short __a, __vector __bool short __b) {
4837 int __cc;
4838 __builtin_s390_vchlhs((__vector unsigned short)__b,
4839 (__vector unsigned short)__a, &__cc);
4840 return __cc != 0;
4843 static inline __ATTRS_o_ai int
4844 vec_any_ge(__vector signed int __a, __vector signed int __b) {
4845 int __cc;
4846 __builtin_s390_vchfs(__b, __a, &__cc);
4847 return __cc != 0;
4850 // This prototype is deprecated.
4851 static inline __ATTRS_o_ai int
4852 vec_any_ge(__vector signed int __a, __vector __bool int __b) {
4853 int __cc;
4854 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
4855 return __cc != 0;
4858 // This prototype is deprecated.
4859 static inline __ATTRS_o_ai int
4860 vec_any_ge(__vector __bool int __a, __vector signed int __b) {
4861 int __cc;
4862 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
4863 return __cc != 0;
4866 static inline __ATTRS_o_ai int
4867 vec_any_ge(__vector unsigned int __a, __vector unsigned int __b) {
4868 int __cc;
4869 __builtin_s390_vchlfs(__b, __a, &__cc);
4870 return __cc != 0;
4873 // This prototype is deprecated.
4874 static inline __ATTRS_o_ai int
4875 vec_any_ge(__vector unsigned int __a, __vector __bool int __b) {
4876 int __cc;
4877 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
4878 return __cc != 0;
4881 // This prototype is deprecated.
4882 static inline __ATTRS_o_ai int
4883 vec_any_ge(__vector __bool int __a, __vector unsigned int __b) {
4884 int __cc;
4885 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
4886 return __cc != 0;
4889 // This prototype is deprecated.
4890 static inline __ATTRS_o_ai int
4891 vec_any_ge(__vector __bool int __a, __vector __bool int __b) {
4892 int __cc;
4893 __builtin_s390_vchlfs((__vector unsigned int)__b,
4894 (__vector unsigned int)__a, &__cc);
4895 return __cc != 0;
4898 static inline __ATTRS_o_ai int
4899 vec_any_ge(__vector signed long long __a, __vector signed long long __b) {
4900 int __cc;
4901 __builtin_s390_vchgs(__b, __a, &__cc);
4902 return __cc != 0;
4905 // This prototype is deprecated.
4906 static inline __ATTRS_o_ai int
4907 vec_any_ge(__vector signed long long __a, __vector __bool long long __b) {
4908 int __cc;
4909 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
4910 return __cc != 0;
4913 // This prototype is deprecated.
4914 static inline __ATTRS_o_ai int
4915 vec_any_ge(__vector __bool long long __a, __vector signed long long __b) {
4916 int __cc;
4917 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
4918 return __cc != 0;
4921 static inline __ATTRS_o_ai int
4922 vec_any_ge(__vector unsigned long long __a, __vector unsigned long long __b) {
4923 int __cc;
4924 __builtin_s390_vchlgs(__b, __a, &__cc);
4925 return __cc != 0;
4928 // This prototype is deprecated.
4929 static inline __ATTRS_o_ai int
4930 vec_any_ge(__vector unsigned long long __a, __vector __bool long long __b) {
4931 int __cc;
4932 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
4933 return __cc != 0;
4936 // This prototype is deprecated.
4937 static inline __ATTRS_o_ai int
4938 vec_any_ge(__vector __bool long long __a, __vector unsigned long long __b) {
4939 int __cc;
4940 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
4941 return __cc != 0;
4944 // This prototype is deprecated.
4945 static inline __ATTRS_o_ai int
4946 vec_any_ge(__vector __bool long long __a, __vector __bool long long __b) {
4947 int __cc;
4948 __builtin_s390_vchlgs((__vector unsigned long long)__b,
4949 (__vector unsigned long long)__a, &__cc);
4950 return __cc != 0;
4953 #if __ARCH__ >= 12
4954 static inline __ATTRS_o_ai int
4955 vec_any_ge(__vector float __a, __vector float __b) {
4956 int __cc;
4957 __builtin_s390_vfchesbs(__a, __b, &__cc);
4958 return __cc <= 1;
4960 #endif
4962 static inline __ATTRS_o_ai int
4963 vec_any_ge(__vector double __a, __vector double __b) {
4964 int __cc;
4965 __builtin_s390_vfchedbs(__a, __b, &__cc);
4966 return __cc <= 1;
4969 /*-- vec_any_gt -------------------------------------------------------------*/
4971 static inline __ATTRS_o_ai int
4972 vec_any_gt(__vector signed char __a, __vector signed char __b) {
4973 int __cc;
4974 __builtin_s390_vchbs(__a, __b, &__cc);
4975 return __cc <= 1;
4978 // This prototype is deprecated.
4979 static inline __ATTRS_o_ai int
4980 vec_any_gt(__vector signed char __a, __vector __bool char __b) {
4981 int __cc;
4982 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
4983 return __cc <= 1;
4986 // This prototype is deprecated.
4987 static inline __ATTRS_o_ai int
4988 vec_any_gt(__vector __bool char __a, __vector signed char __b) {
4989 int __cc;
4990 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
4991 return __cc <= 1;
4994 static inline __ATTRS_o_ai int
4995 vec_any_gt(__vector unsigned char __a, __vector unsigned char __b) {
4996 int __cc;
4997 __builtin_s390_vchlbs(__a, __b, &__cc);
4998 return __cc <= 1;
5001 // This prototype is deprecated.
5002 static inline __ATTRS_o_ai int
5003 vec_any_gt(__vector unsigned char __a, __vector __bool char __b) {
5004 int __cc;
5005 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
5006 return __cc <= 1;
5009 // This prototype is deprecated.
5010 static inline __ATTRS_o_ai int
5011 vec_any_gt(__vector __bool char __a, __vector unsigned char __b) {
5012 int __cc;
5013 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
5014 return __cc <= 1;
5017 // This prototype is deprecated.
5018 static inline __ATTRS_o_ai int
5019 vec_any_gt(__vector __bool char __a, __vector __bool char __b) {
5020 int __cc;
5021 __builtin_s390_vchlbs((__vector unsigned char)__a,
5022 (__vector unsigned char)__b, &__cc);
5023 return __cc <= 1;
5026 static inline __ATTRS_o_ai int
5027 vec_any_gt(__vector signed short __a, __vector signed short __b) {
5028 int __cc;
5029 __builtin_s390_vchhs(__a, __b, &__cc);
5030 return __cc <= 1;
5033 // This prototype is deprecated.
5034 static inline __ATTRS_o_ai int
5035 vec_any_gt(__vector signed short __a, __vector __bool short __b) {
5036 int __cc;
5037 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
5038 return __cc <= 1;
5041 // This prototype is deprecated.
5042 static inline __ATTRS_o_ai int
5043 vec_any_gt(__vector __bool short __a, __vector signed short __b) {
5044 int __cc;
5045 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
5046 return __cc <= 1;
5049 static inline __ATTRS_o_ai int
5050 vec_any_gt(__vector unsigned short __a, __vector unsigned short __b) {
5051 int __cc;
5052 __builtin_s390_vchlhs(__a, __b, &__cc);
5053 return __cc <= 1;
5056 // This prototype is deprecated.
5057 static inline __ATTRS_o_ai int
5058 vec_any_gt(__vector unsigned short __a, __vector __bool short __b) {
5059 int __cc;
5060 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
5061 return __cc <= 1;
5064 // This prototype is deprecated.
5065 static inline __ATTRS_o_ai int
5066 vec_any_gt(__vector __bool short __a, __vector unsigned short __b) {
5067 int __cc;
5068 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
5069 return __cc <= 1;
5072 // This prototype is deprecated.
5073 static inline __ATTRS_o_ai int
5074 vec_any_gt(__vector __bool short __a, __vector __bool short __b) {
5075 int __cc;
5076 __builtin_s390_vchlhs((__vector unsigned short)__a,
5077 (__vector unsigned short)__b, &__cc);
5078 return __cc <= 1;
5081 static inline __ATTRS_o_ai int
5082 vec_any_gt(__vector signed int __a, __vector signed int __b) {
5083 int __cc;
5084 __builtin_s390_vchfs(__a, __b, &__cc);
5085 return __cc <= 1;
5088 // This prototype is deprecated.
5089 static inline __ATTRS_o_ai int
5090 vec_any_gt(__vector signed int __a, __vector __bool int __b) {
5091 int __cc;
5092 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
5093 return __cc <= 1;
5096 // This prototype is deprecated.
5097 static inline __ATTRS_o_ai int
5098 vec_any_gt(__vector __bool int __a, __vector signed int __b) {
5099 int __cc;
5100 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
5101 return __cc <= 1;
5104 static inline __ATTRS_o_ai int
5105 vec_any_gt(__vector unsigned int __a, __vector unsigned int __b) {
5106 int __cc;
5107 __builtin_s390_vchlfs(__a, __b, &__cc);
5108 return __cc <= 1;
5111 // This prototype is deprecated.
5112 static inline __ATTRS_o_ai int
5113 vec_any_gt(__vector unsigned int __a, __vector __bool int __b) {
5114 int __cc;
5115 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
5116 return __cc <= 1;
5119 // This prototype is deprecated.
5120 static inline __ATTRS_o_ai int
5121 vec_any_gt(__vector __bool int __a, __vector unsigned int __b) {
5122 int __cc;
5123 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
5124 return __cc <= 1;
5127 // This prototype is deprecated.
5128 static inline __ATTRS_o_ai int
5129 vec_any_gt(__vector __bool int __a, __vector __bool int __b) {
5130 int __cc;
5131 __builtin_s390_vchlfs((__vector unsigned int)__a,
5132 (__vector unsigned int)__b, &__cc);
5133 return __cc <= 1;
5136 static inline __ATTRS_o_ai int
5137 vec_any_gt(__vector signed long long __a, __vector signed long long __b) {
5138 int __cc;
5139 __builtin_s390_vchgs(__a, __b, &__cc);
5140 return __cc <= 1;
5143 // This prototype is deprecated.
5144 static inline __ATTRS_o_ai int
5145 vec_any_gt(__vector signed long long __a, __vector __bool long long __b) {
5146 int __cc;
5147 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
5148 return __cc <= 1;
5151 // This prototype is deprecated.
5152 static inline __ATTRS_o_ai int
5153 vec_any_gt(__vector __bool long long __a, __vector signed long long __b) {
5154 int __cc;
5155 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
5156 return __cc <= 1;
5159 static inline __ATTRS_o_ai int
5160 vec_any_gt(__vector unsigned long long __a, __vector unsigned long long __b) {
5161 int __cc;
5162 __builtin_s390_vchlgs(__a, __b, &__cc);
5163 return __cc <= 1;
5166 // This prototype is deprecated.
5167 static inline __ATTRS_o_ai int
5168 vec_any_gt(__vector unsigned long long __a, __vector __bool long long __b) {
5169 int __cc;
5170 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
5171 return __cc <= 1;
5174 // This prototype is deprecated.
5175 static inline __ATTRS_o_ai int
5176 vec_any_gt(__vector __bool long long __a, __vector unsigned long long __b) {
5177 int __cc;
5178 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
5179 return __cc <= 1;
5182 // This prototype is deprecated.
5183 static inline __ATTRS_o_ai int
5184 vec_any_gt(__vector __bool long long __a, __vector __bool long long __b) {
5185 int __cc;
5186 __builtin_s390_vchlgs((__vector unsigned long long)__a,
5187 (__vector unsigned long long)__b, &__cc);
5188 return __cc <= 1;
5191 #if __ARCH__ >= 12
5192 static inline __ATTRS_o_ai int
5193 vec_any_gt(__vector float __a, __vector float __b) {
5194 int __cc;
5195 __builtin_s390_vfchsbs(__a, __b, &__cc);
5196 return __cc <= 1;
5198 #endif
5200 static inline __ATTRS_o_ai int
5201 vec_any_gt(__vector double __a, __vector double __b) {
5202 int __cc;
5203 __builtin_s390_vfchdbs(__a, __b, &__cc);
5204 return __cc <= 1;
5207 /*-- vec_any_le -------------------------------------------------------------*/
5209 static inline __ATTRS_o_ai int
5210 vec_any_le(__vector signed char __a, __vector signed char __b) {
5211 int __cc;
5212 __builtin_s390_vchbs(__a, __b, &__cc);
5213 return __cc != 0;
5216 // This prototype is deprecated.
5217 static inline __ATTRS_o_ai int
5218 vec_any_le(__vector signed char __a, __vector __bool char __b) {
5219 int __cc;
5220 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
5221 return __cc != 0;
5224 // This prototype is deprecated.
5225 static inline __ATTRS_o_ai int
5226 vec_any_le(__vector __bool char __a, __vector signed char __b) {
5227 int __cc;
5228 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
5229 return __cc != 0;
5232 static inline __ATTRS_o_ai int
5233 vec_any_le(__vector unsigned char __a, __vector unsigned char __b) {
5234 int __cc;
5235 __builtin_s390_vchlbs(__a, __b, &__cc);
5236 return __cc != 0;
5239 // This prototype is deprecated.
5240 static inline __ATTRS_o_ai int
5241 vec_any_le(__vector unsigned char __a, __vector __bool char __b) {
5242 int __cc;
5243 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
5244 return __cc != 0;
5247 // This prototype is deprecated.
5248 static inline __ATTRS_o_ai int
5249 vec_any_le(__vector __bool char __a, __vector unsigned char __b) {
5250 int __cc;
5251 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
5252 return __cc != 0;
5255 // This prototype is deprecated.
5256 static inline __ATTRS_o_ai int
5257 vec_any_le(__vector __bool char __a, __vector __bool char __b) {
5258 int __cc;
5259 __builtin_s390_vchlbs((__vector unsigned char)__a,
5260 (__vector unsigned char)__b, &__cc);
5261 return __cc != 0;
5264 static inline __ATTRS_o_ai int
5265 vec_any_le(__vector signed short __a, __vector signed short __b) {
5266 int __cc;
5267 __builtin_s390_vchhs(__a, __b, &__cc);
5268 return __cc != 0;
5271 // This prototype is deprecated.
5272 static inline __ATTRS_o_ai int
5273 vec_any_le(__vector signed short __a, __vector __bool short __b) {
5274 int __cc;
5275 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
5276 return __cc != 0;
5279 // This prototype is deprecated.
5280 static inline __ATTRS_o_ai int
5281 vec_any_le(__vector __bool short __a, __vector signed short __b) {
5282 int __cc;
5283 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
5284 return __cc != 0;
5287 static inline __ATTRS_o_ai int
5288 vec_any_le(__vector unsigned short __a, __vector unsigned short __b) {
5289 int __cc;
5290 __builtin_s390_vchlhs(__a, __b, &__cc);
5291 return __cc != 0;
5294 // This prototype is deprecated.
5295 static inline __ATTRS_o_ai int
5296 vec_any_le(__vector unsigned short __a, __vector __bool short __b) {
5297 int __cc;
5298 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
5299 return __cc != 0;
5302 // This prototype is deprecated.
5303 static inline __ATTRS_o_ai int
5304 vec_any_le(__vector __bool short __a, __vector unsigned short __b) {
5305 int __cc;
5306 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
5307 return __cc != 0;
5310 // This prototype is deprecated.
5311 static inline __ATTRS_o_ai int
5312 vec_any_le(__vector __bool short __a, __vector __bool short __b) {
5313 int __cc;
5314 __builtin_s390_vchlhs((__vector unsigned short)__a,
5315 (__vector unsigned short)__b, &__cc);
5316 return __cc != 0;
5319 static inline __ATTRS_o_ai int
5320 vec_any_le(__vector signed int __a, __vector signed int __b) {
5321 int __cc;
5322 __builtin_s390_vchfs(__a, __b, &__cc);
5323 return __cc != 0;
5326 // This prototype is deprecated.
5327 static inline __ATTRS_o_ai int
5328 vec_any_le(__vector signed int __a, __vector __bool int __b) {
5329 int __cc;
5330 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
5331 return __cc != 0;
5334 // This prototype is deprecated.
5335 static inline __ATTRS_o_ai int
5336 vec_any_le(__vector __bool int __a, __vector signed int __b) {
5337 int __cc;
5338 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
5339 return __cc != 0;
5342 static inline __ATTRS_o_ai int
5343 vec_any_le(__vector unsigned int __a, __vector unsigned int __b) {
5344 int __cc;
5345 __builtin_s390_vchlfs(__a, __b, &__cc);
5346 return __cc != 0;
5349 // This prototype is deprecated.
5350 static inline __ATTRS_o_ai int
5351 vec_any_le(__vector unsigned int __a, __vector __bool int __b) {
5352 int __cc;
5353 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
5354 return __cc != 0;
5357 // This prototype is deprecated.
5358 static inline __ATTRS_o_ai int
5359 vec_any_le(__vector __bool int __a, __vector unsigned int __b) {
5360 int __cc;
5361 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
5362 return __cc != 0;
5365 // This prototype is deprecated.
5366 static inline __ATTRS_o_ai int
5367 vec_any_le(__vector __bool int __a, __vector __bool int __b) {
5368 int __cc;
5369 __builtin_s390_vchlfs((__vector unsigned int)__a,
5370 (__vector unsigned int)__b, &__cc);
5371 return __cc != 0;
5374 static inline __ATTRS_o_ai int
5375 vec_any_le(__vector signed long long __a, __vector signed long long __b) {
5376 int __cc;
5377 __builtin_s390_vchgs(__a, __b, &__cc);
5378 return __cc != 0;
5381 // This prototype is deprecated.
5382 static inline __ATTRS_o_ai int
5383 vec_any_le(__vector signed long long __a, __vector __bool long long __b) {
5384 int __cc;
5385 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
5386 return __cc != 0;
5389 // This prototype is deprecated.
5390 static inline __ATTRS_o_ai int
5391 vec_any_le(__vector __bool long long __a, __vector signed long long __b) {
5392 int __cc;
5393 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
5394 return __cc != 0;
5397 static inline __ATTRS_o_ai int
5398 vec_any_le(__vector unsigned long long __a, __vector unsigned long long __b) {
5399 int __cc;
5400 __builtin_s390_vchlgs(__a, __b, &__cc);
5401 return __cc != 0;
5404 // This prototype is deprecated.
5405 static inline __ATTRS_o_ai int
5406 vec_any_le(__vector unsigned long long __a, __vector __bool long long __b) {
5407 int __cc;
5408 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
5409 return __cc != 0;
5412 // This prototype is deprecated.
5413 static inline __ATTRS_o_ai int
5414 vec_any_le(__vector __bool long long __a, __vector unsigned long long __b) {
5415 int __cc;
5416 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
5417 return __cc != 0;
5420 // This prototype is deprecated.
5421 static inline __ATTRS_o_ai int
5422 vec_any_le(__vector __bool long long __a, __vector __bool long long __b) {
5423 int __cc;
5424 __builtin_s390_vchlgs((__vector unsigned long long)__a,
5425 (__vector unsigned long long)__b, &__cc);
5426 return __cc != 0;
5429 #if __ARCH__ >= 12
5430 static inline __ATTRS_o_ai int
5431 vec_any_le(__vector float __a, __vector float __b) {
5432 int __cc;
5433 __builtin_s390_vfchesbs(__b, __a, &__cc);
5434 return __cc <= 1;
5436 #endif
5438 static inline __ATTRS_o_ai int
5439 vec_any_le(__vector double __a, __vector double __b) {
5440 int __cc;
5441 __builtin_s390_vfchedbs(__b, __a, &__cc);
5442 return __cc <= 1;
5445 /*-- vec_any_lt -------------------------------------------------------------*/
5447 static inline __ATTRS_o_ai int
5448 vec_any_lt(__vector signed char __a, __vector signed char __b) {
5449 int __cc;
5450 __builtin_s390_vchbs(__b, __a, &__cc);
5451 return __cc <= 1;
5454 // This prototype is deprecated.
5455 static inline __ATTRS_o_ai int
5456 vec_any_lt(__vector signed char __a, __vector __bool char __b) {
5457 int __cc;
5458 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
5459 return __cc <= 1;
5462 // This prototype is deprecated.
5463 static inline __ATTRS_o_ai int
5464 vec_any_lt(__vector __bool char __a, __vector signed char __b) {
5465 int __cc;
5466 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
5467 return __cc <= 1;
5470 static inline __ATTRS_o_ai int
5471 vec_any_lt(__vector unsigned char __a, __vector unsigned char __b) {
5472 int __cc;
5473 __builtin_s390_vchlbs(__b, __a, &__cc);
5474 return __cc <= 1;
5477 // This prototype is deprecated.
5478 static inline __ATTRS_o_ai int
5479 vec_any_lt(__vector unsigned char __a, __vector __bool char __b) {
5480 int __cc;
5481 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
5482 return __cc <= 1;
5485 // This prototype is deprecated.
5486 static inline __ATTRS_o_ai int
5487 vec_any_lt(__vector __bool char __a, __vector unsigned char __b) {
5488 int __cc;
5489 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
5490 return __cc <= 1;
5493 // This prototype is deprecated.
5494 static inline __ATTRS_o_ai int
5495 vec_any_lt(__vector __bool char __a, __vector __bool char __b) {
5496 int __cc;
5497 __builtin_s390_vchlbs((__vector unsigned char)__b,
5498 (__vector unsigned char)__a, &__cc);
5499 return __cc <= 1;
5502 static inline __ATTRS_o_ai int
5503 vec_any_lt(__vector signed short __a, __vector signed short __b) {
5504 int __cc;
5505 __builtin_s390_vchhs(__b, __a, &__cc);
5506 return __cc <= 1;
5509 // This prototype is deprecated.
5510 static inline __ATTRS_o_ai int
5511 vec_any_lt(__vector signed short __a, __vector __bool short __b) {
5512 int __cc;
5513 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
5514 return __cc <= 1;
5517 // This prototype is deprecated.
5518 static inline __ATTRS_o_ai int
5519 vec_any_lt(__vector __bool short __a, __vector signed short __b) {
5520 int __cc;
5521 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
5522 return __cc <= 1;
5525 static inline __ATTRS_o_ai int
5526 vec_any_lt(__vector unsigned short __a, __vector unsigned short __b) {
5527 int __cc;
5528 __builtin_s390_vchlhs(__b, __a, &__cc);
5529 return __cc <= 1;
5532 // This prototype is deprecated.
5533 static inline __ATTRS_o_ai int
5534 vec_any_lt(__vector unsigned short __a, __vector __bool short __b) {
5535 int __cc;
5536 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
5537 return __cc <= 1;
5540 // This prototype is deprecated.
5541 static inline __ATTRS_o_ai int
5542 vec_any_lt(__vector __bool short __a, __vector unsigned short __b) {
5543 int __cc;
5544 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
5545 return __cc <= 1;
5548 // This prototype is deprecated.
5549 static inline __ATTRS_o_ai int
5550 vec_any_lt(__vector __bool short __a, __vector __bool short __b) {
5551 int __cc;
5552 __builtin_s390_vchlhs((__vector unsigned short)__b,
5553 (__vector unsigned short)__a, &__cc);
5554 return __cc <= 1;
5557 static inline __ATTRS_o_ai int
5558 vec_any_lt(__vector signed int __a, __vector signed int __b) {
5559 int __cc;
5560 __builtin_s390_vchfs(__b, __a, &__cc);
5561 return __cc <= 1;
5564 // This prototype is deprecated.
5565 static inline __ATTRS_o_ai int
5566 vec_any_lt(__vector signed int __a, __vector __bool int __b) {
5567 int __cc;
5568 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
5569 return __cc <= 1;
5572 // This prototype is deprecated.
5573 static inline __ATTRS_o_ai int
5574 vec_any_lt(__vector __bool int __a, __vector signed int __b) {
5575 int __cc;
5576 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
5577 return __cc <= 1;
5580 static inline __ATTRS_o_ai int
5581 vec_any_lt(__vector unsigned int __a, __vector unsigned int __b) {
5582 int __cc;
5583 __builtin_s390_vchlfs(__b, __a, &__cc);
5584 return __cc <= 1;
5587 // This prototype is deprecated.
5588 static inline __ATTRS_o_ai int
5589 vec_any_lt(__vector unsigned int __a, __vector __bool int __b) {
5590 int __cc;
5591 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
5592 return __cc <= 1;
5595 // This prototype is deprecated.
5596 static inline __ATTRS_o_ai int
5597 vec_any_lt(__vector __bool int __a, __vector unsigned int __b) {
5598 int __cc;
5599 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
5600 return __cc <= 1;
5603 // This prototype is deprecated.
5604 static inline __ATTRS_o_ai int
5605 vec_any_lt(__vector __bool int __a, __vector __bool int __b) {
5606 int __cc;
5607 __builtin_s390_vchlfs((__vector unsigned int)__b,
5608 (__vector unsigned int)__a, &__cc);
5609 return __cc <= 1;
5612 static inline __ATTRS_o_ai int
5613 vec_any_lt(__vector signed long long __a, __vector signed long long __b) {
5614 int __cc;
5615 __builtin_s390_vchgs(__b, __a, &__cc);
5616 return __cc <= 1;
5619 // This prototype is deprecated.
5620 static inline __ATTRS_o_ai int
5621 vec_any_lt(__vector signed long long __a, __vector __bool long long __b) {
5622 int __cc;
5623 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
5624 return __cc <= 1;
5627 // This prototype is deprecated.
5628 static inline __ATTRS_o_ai int
5629 vec_any_lt(__vector __bool long long __a, __vector signed long long __b) {
5630 int __cc;
5631 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
5632 return __cc <= 1;
5635 static inline __ATTRS_o_ai int
5636 vec_any_lt(__vector unsigned long long __a, __vector unsigned long long __b) {
5637 int __cc;
5638 __builtin_s390_vchlgs(__b, __a, &__cc);
5639 return __cc <= 1;
5642 // This prototype is deprecated.
5643 static inline __ATTRS_o_ai int
5644 vec_any_lt(__vector unsigned long long __a, __vector __bool long long __b) {
5645 int __cc;
5646 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
5647 return __cc <= 1;
5650 // This prototype is deprecated.
5651 static inline __ATTRS_o_ai int
5652 vec_any_lt(__vector __bool long long __a, __vector unsigned long long __b) {
5653 int __cc;
5654 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
5655 return __cc <= 1;
5658 // This prototype is deprecated.
5659 static inline __ATTRS_o_ai int
5660 vec_any_lt(__vector __bool long long __a, __vector __bool long long __b) {
5661 int __cc;
5662 __builtin_s390_vchlgs((__vector unsigned long long)__b,
5663 (__vector unsigned long long)__a, &__cc);
5664 return __cc <= 1;
5667 #if __ARCH__ >= 12
5668 static inline __ATTRS_o_ai int
5669 vec_any_lt(__vector float __a, __vector float __b) {
5670 int __cc;
5671 __builtin_s390_vfchsbs(__b, __a, &__cc);
5672 return __cc <= 1;
5674 #endif
5676 static inline __ATTRS_o_ai int
5677 vec_any_lt(__vector double __a, __vector double __b) {
5678 int __cc;
5679 __builtin_s390_vfchdbs(__b, __a, &__cc);
5680 return __cc <= 1;
5683 /*-- vec_any_nge ------------------------------------------------------------*/
5685 #if __ARCH__ >= 12
5686 static inline __ATTRS_o_ai int
5687 vec_any_nge(__vector float __a, __vector float __b) {
5688 int __cc;
5689 __builtin_s390_vfchesbs(__a, __b, &__cc);
5690 return __cc != 0;
5692 #endif
5694 static inline __ATTRS_o_ai int
5695 vec_any_nge(__vector double __a, __vector double __b) {
5696 int __cc;
5697 __builtin_s390_vfchedbs(__a, __b, &__cc);
5698 return __cc != 0;
5701 /*-- vec_any_ngt ------------------------------------------------------------*/
5703 #if __ARCH__ >= 12
5704 static inline __ATTRS_o_ai int
5705 vec_any_ngt(__vector float __a, __vector float __b) {
5706 int __cc;
5707 __builtin_s390_vfchsbs(__a, __b, &__cc);
5708 return __cc != 0;
5710 #endif
5712 static inline __ATTRS_o_ai int
5713 vec_any_ngt(__vector double __a, __vector double __b) {
5714 int __cc;
5715 __builtin_s390_vfchdbs(__a, __b, &__cc);
5716 return __cc != 0;
5719 /*-- vec_any_nle ------------------------------------------------------------*/
5721 #if __ARCH__ >= 12
5722 static inline __ATTRS_o_ai int
5723 vec_any_nle(__vector float __a, __vector float __b) {
5724 int __cc;
5725 __builtin_s390_vfchesbs(__b, __a, &__cc);
5726 return __cc != 0;
5728 #endif
5730 static inline __ATTRS_o_ai int
5731 vec_any_nle(__vector double __a, __vector double __b) {
5732 int __cc;
5733 __builtin_s390_vfchedbs(__b, __a, &__cc);
5734 return __cc != 0;
5737 /*-- vec_any_nlt ------------------------------------------------------------*/
5739 #if __ARCH__ >= 12
5740 static inline __ATTRS_o_ai int
5741 vec_any_nlt(__vector float __a, __vector float __b) {
5742 int __cc;
5743 __builtin_s390_vfchsbs(__b, __a, &__cc);
5744 return __cc != 0;
5746 #endif
5748 static inline __ATTRS_o_ai int
5749 vec_any_nlt(__vector double __a, __vector double __b) {
5750 int __cc;
5751 __builtin_s390_vfchdbs(__b, __a, &__cc);
5752 return __cc != 0;
5755 /*-- vec_any_nan ------------------------------------------------------------*/
5757 #if __ARCH__ >= 12
5758 static inline __ATTRS_o_ai int
5759 vec_any_nan(__vector float __a) {
5760 int __cc;
5761 __builtin_s390_vftcisb(__a, 15, &__cc);
5762 return __cc != 3;
5764 #endif
5766 static inline __ATTRS_o_ai int
5767 vec_any_nan(__vector double __a) {
5768 int __cc;
5769 __builtin_s390_vftcidb(__a, 15, &__cc);
5770 return __cc != 3;
5773 /*-- vec_any_numeric --------------------------------------------------------*/
5775 #if __ARCH__ >= 12
5776 static inline __ATTRS_o_ai int
5777 vec_any_numeric(__vector float __a) {
5778 int __cc;
5779 __builtin_s390_vftcisb(__a, 15, &__cc);
5780 return __cc != 0;
5782 #endif
5784 static inline __ATTRS_o_ai int
5785 vec_any_numeric(__vector double __a) {
5786 int __cc;
5787 __builtin_s390_vftcidb(__a, 15, &__cc);
5788 return __cc != 0;
5791 /*-- vec_andc ---------------------------------------------------------------*/
5793 static inline __ATTRS_o_ai __vector __bool char
5794 vec_andc(__vector __bool char __a, __vector __bool char __b) {
5795 return __a & ~__b;
5798 static inline __ATTRS_o_ai __vector signed char
5799 vec_andc(__vector signed char __a, __vector signed char __b) {
5800 return __a & ~__b;
5803 // This prototype is deprecated.
5804 static inline __ATTRS_o_ai __vector signed char
5805 vec_andc(__vector __bool char __a, __vector signed char __b) {
5806 return __a & ~__b;
5809 // This prototype is deprecated.
5810 static inline __ATTRS_o_ai __vector signed char
5811 vec_andc(__vector signed char __a, __vector __bool char __b) {
5812 return __a & ~__b;
5815 static inline __ATTRS_o_ai __vector unsigned char
5816 vec_andc(__vector unsigned char __a, __vector unsigned char __b) {
5817 return __a & ~__b;
5820 // This prototype is deprecated.
5821 static inline __ATTRS_o_ai __vector unsigned char
5822 vec_andc(__vector __bool char __a, __vector unsigned char __b) {
5823 return __a & ~__b;
5826 // This prototype is deprecated.
5827 static inline __ATTRS_o_ai __vector unsigned char
5828 vec_andc(__vector unsigned char __a, __vector __bool char __b) {
5829 return __a & ~__b;
5832 static inline __ATTRS_o_ai __vector __bool short
5833 vec_andc(__vector __bool short __a, __vector __bool short __b) {
5834 return __a & ~__b;
5837 static inline __ATTRS_o_ai __vector signed short
5838 vec_andc(__vector signed short __a, __vector signed short __b) {
5839 return __a & ~__b;
5842 // This prototype is deprecated.
5843 static inline __ATTRS_o_ai __vector signed short
5844 vec_andc(__vector __bool short __a, __vector signed short __b) {
5845 return __a & ~__b;
5848 // This prototype is deprecated.
5849 static inline __ATTRS_o_ai __vector signed short
5850 vec_andc(__vector signed short __a, __vector __bool short __b) {
5851 return __a & ~__b;
5854 static inline __ATTRS_o_ai __vector unsigned short
5855 vec_andc(__vector unsigned short __a, __vector unsigned short __b) {
5856 return __a & ~__b;
5859 // This prototype is deprecated.
5860 static inline __ATTRS_o_ai __vector unsigned short
5861 vec_andc(__vector __bool short __a, __vector unsigned short __b) {
5862 return __a & ~__b;
5865 // This prototype is deprecated.
5866 static inline __ATTRS_o_ai __vector unsigned short
5867 vec_andc(__vector unsigned short __a, __vector __bool short __b) {
5868 return __a & ~__b;
5871 static inline __ATTRS_o_ai __vector __bool int
5872 vec_andc(__vector __bool int __a, __vector __bool int __b) {
5873 return __a & ~__b;
5876 static inline __ATTRS_o_ai __vector signed int
5877 vec_andc(__vector signed int __a, __vector signed int __b) {
5878 return __a & ~__b;
5881 // This prototype is deprecated.
5882 static inline __ATTRS_o_ai __vector signed int
5883 vec_andc(__vector __bool int __a, __vector signed int __b) {
5884 return __a & ~__b;
5887 // This prototype is deprecated.
5888 static inline __ATTRS_o_ai __vector signed int
5889 vec_andc(__vector signed int __a, __vector __bool int __b) {
5890 return __a & ~__b;
5893 static inline __ATTRS_o_ai __vector unsigned int
5894 vec_andc(__vector unsigned int __a, __vector unsigned int __b) {
5895 return __a & ~__b;
5898 // This prototype is deprecated.
5899 static inline __ATTRS_o_ai __vector unsigned int
5900 vec_andc(__vector __bool int __a, __vector unsigned int __b) {
5901 return __a & ~__b;
5904 // This prototype is deprecated.
5905 static inline __ATTRS_o_ai __vector unsigned int
5906 vec_andc(__vector unsigned int __a, __vector __bool int __b) {
5907 return __a & ~__b;
5910 static inline __ATTRS_o_ai __vector __bool long long
5911 vec_andc(__vector __bool long long __a, __vector __bool long long __b) {
5912 return __a & ~__b;
5915 static inline __ATTRS_o_ai __vector signed long long
5916 vec_andc(__vector signed long long __a, __vector signed long long __b) {
5917 return __a & ~__b;
5920 // This prototype is deprecated.
5921 static inline __ATTRS_o_ai __vector signed long long
5922 vec_andc(__vector __bool long long __a, __vector signed long long __b) {
5923 return __a & ~__b;
5926 // This prototype is deprecated.
5927 static inline __ATTRS_o_ai __vector signed long long
5928 vec_andc(__vector signed long long __a, __vector __bool long long __b) {
5929 return __a & ~__b;
5932 static inline __ATTRS_o_ai __vector unsigned long long
5933 vec_andc(__vector unsigned long long __a, __vector unsigned long long __b) {
5934 return __a & ~__b;
5937 // This prototype is deprecated.
5938 static inline __ATTRS_o_ai __vector unsigned long long
5939 vec_andc(__vector __bool long long __a, __vector unsigned long long __b) {
5940 return __a & ~__b;
5943 // This prototype is deprecated.
5944 static inline __ATTRS_o_ai __vector unsigned long long
5945 vec_andc(__vector unsigned long long __a, __vector __bool long long __b) {
5946 return __a & ~__b;
5949 #if __ARCH__ >= 12
5950 static inline __ATTRS_o_ai __vector float
5951 vec_andc(__vector float __a, __vector float __b) {
5952 return (__vector float)((__vector unsigned int)__a &
5953 ~(__vector unsigned int)__b);
5955 #endif
5957 static inline __ATTRS_o_ai __vector double
5958 vec_andc(__vector double __a, __vector double __b) {
5959 return (__vector double)((__vector unsigned long long)__a &
5960 ~(__vector unsigned long long)__b);
5963 // This prototype is deprecated.
5964 static inline __ATTRS_o_ai __vector double
5965 vec_andc(__vector __bool long long __a, __vector double __b) {
5966 return (__vector double)((__vector unsigned long long)__a &
5967 ~(__vector unsigned long long)__b);
5970 // This prototype is deprecated.
5971 static inline __ATTRS_o_ai __vector double
5972 vec_andc(__vector double __a, __vector __bool long long __b) {
5973 return (__vector double)((__vector unsigned long long)__a &
5974 ~(__vector unsigned long long)__b);
5977 /*-- vec_nor ----------------------------------------------------------------*/
5979 static inline __ATTRS_o_ai __vector __bool char
5980 vec_nor(__vector __bool char __a, __vector __bool char __b) {
5981 return ~(__a | __b);
5984 static inline __ATTRS_o_ai __vector signed char
5985 vec_nor(__vector signed char __a, __vector signed char __b) {
5986 return ~(__a | __b);
5989 // This prototype is deprecated.
5990 static inline __ATTRS_o_ai __vector signed char
5991 vec_nor(__vector __bool char __a, __vector signed char __b) {
5992 return ~(__a | __b);
5995 // This prototype is deprecated.
5996 static inline __ATTRS_o_ai __vector signed char
5997 vec_nor(__vector signed char __a, __vector __bool char __b) {
5998 return ~(__a | __b);
6001 static inline __ATTRS_o_ai __vector unsigned char
6002 vec_nor(__vector unsigned char __a, __vector unsigned char __b) {
6003 return ~(__a | __b);
6006 // This prototype is deprecated.
6007 static inline __ATTRS_o_ai __vector unsigned char
6008 vec_nor(__vector __bool char __a, __vector unsigned char __b) {
6009 return ~(__a | __b);
6012 // This prototype is deprecated.
6013 static inline __ATTRS_o_ai __vector unsigned char
6014 vec_nor(__vector unsigned char __a, __vector __bool char __b) {
6015 return ~(__a | __b);
6018 static inline __ATTRS_o_ai __vector __bool short
6019 vec_nor(__vector __bool short __a, __vector __bool short __b) {
6020 return ~(__a | __b);
6023 static inline __ATTRS_o_ai __vector signed short
6024 vec_nor(__vector signed short __a, __vector signed short __b) {
6025 return ~(__a | __b);
6028 // This prototype is deprecated.
6029 static inline __ATTRS_o_ai __vector signed short
6030 vec_nor(__vector __bool short __a, __vector signed short __b) {
6031 return ~(__a | __b);
6034 // This prototype is deprecated.
6035 static inline __ATTRS_o_ai __vector signed short
6036 vec_nor(__vector signed short __a, __vector __bool short __b) {
6037 return ~(__a | __b);
6040 static inline __ATTRS_o_ai __vector unsigned short
6041 vec_nor(__vector unsigned short __a, __vector unsigned short __b) {
6042 return ~(__a | __b);
6045 // This prototype is deprecated.
6046 static inline __ATTRS_o_ai __vector unsigned short
6047 vec_nor(__vector __bool short __a, __vector unsigned short __b) {
6048 return ~(__a | __b);
6051 // This prototype is deprecated.
6052 static inline __ATTRS_o_ai __vector unsigned short
6053 vec_nor(__vector unsigned short __a, __vector __bool short __b) {
6054 return ~(__a | __b);
6057 static inline __ATTRS_o_ai __vector __bool int
6058 vec_nor(__vector __bool int __a, __vector __bool int __b) {
6059 return ~(__a | __b);
6062 static inline __ATTRS_o_ai __vector signed int
6063 vec_nor(__vector signed int __a, __vector signed int __b) {
6064 return ~(__a | __b);
6067 // This prototype is deprecated.
6068 static inline __ATTRS_o_ai __vector signed int
6069 vec_nor(__vector __bool int __a, __vector signed int __b) {
6070 return ~(__a | __b);
6073 // This prototype is deprecated.
6074 static inline __ATTRS_o_ai __vector signed int
6075 vec_nor(__vector signed int __a, __vector __bool int __b) {
6076 return ~(__a | __b);
6079 static inline __ATTRS_o_ai __vector unsigned int
6080 vec_nor(__vector unsigned int __a, __vector unsigned int __b) {
6081 return ~(__a | __b);
6084 // This prototype is deprecated.
6085 static inline __ATTRS_o_ai __vector unsigned int
6086 vec_nor(__vector __bool int __a, __vector unsigned int __b) {
6087 return ~(__a | __b);
6090 // This prototype is deprecated.
6091 static inline __ATTRS_o_ai __vector unsigned int
6092 vec_nor(__vector unsigned int __a, __vector __bool int __b) {
6093 return ~(__a | __b);
6096 static inline __ATTRS_o_ai __vector __bool long long
6097 vec_nor(__vector __bool long long __a, __vector __bool long long __b) {
6098 return ~(__a | __b);
6101 static inline __ATTRS_o_ai __vector signed long long
6102 vec_nor(__vector signed long long __a, __vector signed long long __b) {
6103 return ~(__a | __b);
6106 // This prototype is deprecated.
6107 static inline __ATTRS_o_ai __vector signed long long
6108 vec_nor(__vector __bool long long __a, __vector signed long long __b) {
6109 return ~(__a | __b);
6112 // This prototype is deprecated.
6113 static inline __ATTRS_o_ai __vector signed long long
6114 vec_nor(__vector signed long long __a, __vector __bool long long __b) {
6115 return ~(__a | __b);
6118 static inline __ATTRS_o_ai __vector unsigned long long
6119 vec_nor(__vector unsigned long long __a, __vector unsigned long long __b) {
6120 return ~(__a | __b);
6123 // This prototype is deprecated.
6124 static inline __ATTRS_o_ai __vector unsigned long long
6125 vec_nor(__vector __bool long long __a, __vector unsigned long long __b) {
6126 return ~(__a | __b);
6129 // This prototype is deprecated.
6130 static inline __ATTRS_o_ai __vector unsigned long long
6131 vec_nor(__vector unsigned long long __a, __vector __bool long long __b) {
6132 return ~(__a | __b);
6135 #if __ARCH__ >= 12
6136 static inline __ATTRS_o_ai __vector float
6137 vec_nor(__vector float __a, __vector float __b) {
6138 return (__vector float)~((__vector unsigned int)__a |
6139 (__vector unsigned int)__b);
6141 #endif
6143 static inline __ATTRS_o_ai __vector double
6144 vec_nor(__vector double __a, __vector double __b) {
6145 return (__vector double)~((__vector unsigned long long)__a |
6146 (__vector unsigned long long)__b);
6149 // This prototype is deprecated.
6150 static inline __ATTRS_o_ai __vector double
6151 vec_nor(__vector __bool long long __a, __vector double __b) {
6152 return (__vector double)~((__vector unsigned long long)__a |
6153 (__vector unsigned long long)__b);
6156 // This prototype is deprecated.
6157 static inline __ATTRS_o_ai __vector double
6158 vec_nor(__vector double __a, __vector __bool long long __b) {
6159 return (__vector double)~((__vector unsigned long long)__a |
6160 (__vector unsigned long long)__b);
6163 /*-- vec_orc ----------------------------------------------------------------*/
6165 #if __ARCH__ >= 12
6166 static inline __ATTRS_o_ai __vector __bool char
6167 vec_orc(__vector __bool char __a, __vector __bool char __b) {
6168 return __a | ~__b;
6171 static inline __ATTRS_o_ai __vector signed char
6172 vec_orc(__vector signed char __a, __vector signed char __b) {
6173 return __a | ~__b;
6176 static inline __ATTRS_o_ai __vector unsigned char
6177 vec_orc(__vector unsigned char __a, __vector unsigned char __b) {
6178 return __a | ~__b;
6181 static inline __ATTRS_o_ai __vector __bool short
6182 vec_orc(__vector __bool short __a, __vector __bool short __b) {
6183 return __a | ~__b;
6186 static inline __ATTRS_o_ai __vector signed short
6187 vec_orc(__vector signed short __a, __vector signed short __b) {
6188 return __a | ~__b;
6191 static inline __ATTRS_o_ai __vector unsigned short
6192 vec_orc(__vector unsigned short __a, __vector unsigned short __b) {
6193 return __a | ~__b;
6196 static inline __ATTRS_o_ai __vector __bool int
6197 vec_orc(__vector __bool int __a, __vector __bool int __b) {
6198 return __a | ~__b;
6201 static inline __ATTRS_o_ai __vector signed int
6202 vec_orc(__vector signed int __a, __vector signed int __b) {
6203 return __a | ~__b;
6206 static inline __ATTRS_o_ai __vector unsigned int
6207 vec_orc(__vector unsigned int __a, __vector unsigned int __b) {
6208 return __a | ~__b;
6211 static inline __ATTRS_o_ai __vector __bool long long
6212 vec_orc(__vector __bool long long __a, __vector __bool long long __b) {
6213 return __a | ~__b;
6216 static inline __ATTRS_o_ai __vector signed long long
6217 vec_orc(__vector signed long long __a, __vector signed long long __b) {
6218 return __a | ~__b;
6221 static inline __ATTRS_o_ai __vector unsigned long long
6222 vec_orc(__vector unsigned long long __a, __vector unsigned long long __b) {
6223 return __a | ~__b;
6226 static inline __ATTRS_o_ai __vector float
6227 vec_orc(__vector float __a, __vector float __b) {
6228 return (__vector float)((__vector unsigned int)__a |
6229 ~(__vector unsigned int)__b);
6232 static inline __ATTRS_o_ai __vector double
6233 vec_orc(__vector double __a, __vector double __b) {
6234 return (__vector double)((__vector unsigned long long)__a |
6235 ~(__vector unsigned long long)__b);
6237 #endif
6239 /*-- vec_nand ---------------------------------------------------------------*/
6241 #if __ARCH__ >= 12
6242 static inline __ATTRS_o_ai __vector __bool char
6243 vec_nand(__vector __bool char __a, __vector __bool char __b) {
6244 return ~(__a & __b);
6247 static inline __ATTRS_o_ai __vector signed char
6248 vec_nand(__vector signed char __a, __vector signed char __b) {
6249 return ~(__a & __b);
6252 static inline __ATTRS_o_ai __vector unsigned char
6253 vec_nand(__vector unsigned char __a, __vector unsigned char __b) {
6254 return ~(__a & __b);
6257 static inline __ATTRS_o_ai __vector __bool short
6258 vec_nand(__vector __bool short __a, __vector __bool short __b) {
6259 return ~(__a & __b);
6262 static inline __ATTRS_o_ai __vector signed short
6263 vec_nand(__vector signed short __a, __vector signed short __b) {
6264 return ~(__a & __b);
6267 static inline __ATTRS_o_ai __vector unsigned short
6268 vec_nand(__vector unsigned short __a, __vector unsigned short __b) {
6269 return ~(__a & __b);
6272 static inline __ATTRS_o_ai __vector __bool int
6273 vec_nand(__vector __bool int __a, __vector __bool int __b) {
6274 return ~(__a & __b);
6277 static inline __ATTRS_o_ai __vector signed int
6278 vec_nand(__vector signed int __a, __vector signed int __b) {
6279 return ~(__a & __b);
6282 static inline __ATTRS_o_ai __vector unsigned int
6283 vec_nand(__vector unsigned int __a, __vector unsigned int __b) {
6284 return ~(__a & __b);
6287 static inline __ATTRS_o_ai __vector __bool long long
6288 vec_nand(__vector __bool long long __a, __vector __bool long long __b) {
6289 return ~(__a & __b);
6292 static inline __ATTRS_o_ai __vector signed long long
6293 vec_nand(__vector signed long long __a, __vector signed long long __b) {
6294 return ~(__a & __b);
6297 static inline __ATTRS_o_ai __vector unsigned long long
6298 vec_nand(__vector unsigned long long __a, __vector unsigned long long __b) {
6299 return ~(__a & __b);
6302 static inline __ATTRS_o_ai __vector float
6303 vec_nand(__vector float __a, __vector float __b) {
6304 return (__vector float)~((__vector unsigned int)__a &
6305 (__vector unsigned int)__b);
6308 static inline __ATTRS_o_ai __vector double
6309 vec_nand(__vector double __a, __vector double __b) {
6310 return (__vector double)~((__vector unsigned long long)__a &
6311 (__vector unsigned long long)__b);
6313 #endif
6315 /*-- vec_eqv ----------------------------------------------------------------*/
6317 #if __ARCH__ >= 12
6318 static inline __ATTRS_o_ai __vector __bool char
6319 vec_eqv(__vector __bool char __a, __vector __bool char __b) {
6320 return ~(__a ^ __b);
6323 static inline __ATTRS_o_ai __vector signed char
6324 vec_eqv(__vector signed char __a, __vector signed char __b) {
6325 return ~(__a ^ __b);
6328 static inline __ATTRS_o_ai __vector unsigned char
6329 vec_eqv(__vector unsigned char __a, __vector unsigned char __b) {
6330 return ~(__a ^ __b);
6333 static inline __ATTRS_o_ai __vector __bool short
6334 vec_eqv(__vector __bool short __a, __vector __bool short __b) {
6335 return ~(__a ^ __b);
6338 static inline __ATTRS_o_ai __vector signed short
6339 vec_eqv(__vector signed short __a, __vector signed short __b) {
6340 return ~(__a ^ __b);
6343 static inline __ATTRS_o_ai __vector unsigned short
6344 vec_eqv(__vector unsigned short __a, __vector unsigned short __b) {
6345 return ~(__a ^ __b);
6348 static inline __ATTRS_o_ai __vector __bool int
6349 vec_eqv(__vector __bool int __a, __vector __bool int __b) {
6350 return ~(__a ^ __b);
6353 static inline __ATTRS_o_ai __vector signed int
6354 vec_eqv(__vector signed int __a, __vector signed int __b) {
6355 return ~(__a ^ __b);
6358 static inline __ATTRS_o_ai __vector unsigned int
6359 vec_eqv(__vector unsigned int __a, __vector unsigned int __b) {
6360 return ~(__a ^ __b);
6363 static inline __ATTRS_o_ai __vector __bool long long
6364 vec_eqv(__vector __bool long long __a, __vector __bool long long __b) {
6365 return ~(__a ^ __b);
6368 static inline __ATTRS_o_ai __vector signed long long
6369 vec_eqv(__vector signed long long __a, __vector signed long long __b) {
6370 return ~(__a ^ __b);
6373 static inline __ATTRS_o_ai __vector unsigned long long
6374 vec_eqv(__vector unsigned long long __a, __vector unsigned long long __b) {
6375 return ~(__a ^ __b);
6378 static inline __ATTRS_o_ai __vector float
6379 vec_eqv(__vector float __a, __vector float __b) {
6380 return (__vector float)~((__vector unsigned int)__a ^
6381 (__vector unsigned int)__b);
6384 static inline __ATTRS_o_ai __vector double
6385 vec_eqv(__vector double __a, __vector double __b) {
6386 return (__vector double)~((__vector unsigned long long)__a ^
6387 (__vector unsigned long long)__b);
6389 #endif
6391 /*-- vec_cntlz --------------------------------------------------------------*/
6393 static inline __ATTRS_o_ai __vector unsigned char
6394 vec_cntlz(__vector signed char __a) {
6395 return __builtin_s390_vclzb((__vector unsigned char)__a);
6398 static inline __ATTRS_o_ai __vector unsigned char
6399 vec_cntlz(__vector unsigned char __a) {
6400 return __builtin_s390_vclzb(__a);
6403 static inline __ATTRS_o_ai __vector unsigned short
6404 vec_cntlz(__vector signed short __a) {
6405 return __builtin_s390_vclzh((__vector unsigned short)__a);
6408 static inline __ATTRS_o_ai __vector unsigned short
6409 vec_cntlz(__vector unsigned short __a) {
6410 return __builtin_s390_vclzh(__a);
6413 static inline __ATTRS_o_ai __vector unsigned int
6414 vec_cntlz(__vector signed int __a) {
6415 return __builtin_s390_vclzf((__vector unsigned int)__a);
6418 static inline __ATTRS_o_ai __vector unsigned int
6419 vec_cntlz(__vector unsigned int __a) {
6420 return __builtin_s390_vclzf(__a);
6423 static inline __ATTRS_o_ai __vector unsigned long long
6424 vec_cntlz(__vector signed long long __a) {
6425 return __builtin_s390_vclzg((__vector unsigned long long)__a);
6428 static inline __ATTRS_o_ai __vector unsigned long long
6429 vec_cntlz(__vector unsigned long long __a) {
6430 return __builtin_s390_vclzg(__a);
6433 /*-- vec_cnttz --------------------------------------------------------------*/
6435 static inline __ATTRS_o_ai __vector unsigned char
6436 vec_cnttz(__vector signed char __a) {
6437 return __builtin_s390_vctzb((__vector unsigned char)__a);
6440 static inline __ATTRS_o_ai __vector unsigned char
6441 vec_cnttz(__vector unsigned char __a) {
6442 return __builtin_s390_vctzb(__a);
6445 static inline __ATTRS_o_ai __vector unsigned short
6446 vec_cnttz(__vector signed short __a) {
6447 return __builtin_s390_vctzh((__vector unsigned short)__a);
6450 static inline __ATTRS_o_ai __vector unsigned short
6451 vec_cnttz(__vector unsigned short __a) {
6452 return __builtin_s390_vctzh(__a);
6455 static inline __ATTRS_o_ai __vector unsigned int
6456 vec_cnttz(__vector signed int __a) {
6457 return __builtin_s390_vctzf((__vector unsigned int)__a);
6460 static inline __ATTRS_o_ai __vector unsigned int
6461 vec_cnttz(__vector unsigned int __a) {
6462 return __builtin_s390_vctzf(__a);
6465 static inline __ATTRS_o_ai __vector unsigned long long
6466 vec_cnttz(__vector signed long long __a) {
6467 return __builtin_s390_vctzg((__vector unsigned long long)__a);
6470 static inline __ATTRS_o_ai __vector unsigned long long
6471 vec_cnttz(__vector unsigned long long __a) {
6472 return __builtin_s390_vctzg(__a);
6475 /*-- vec_popcnt -------------------------------------------------------------*/
6477 static inline __ATTRS_o_ai __vector unsigned char
6478 vec_popcnt(__vector signed char __a) {
6479 return __builtin_s390_vpopctb((__vector unsigned char)__a);
6482 static inline __ATTRS_o_ai __vector unsigned char
6483 vec_popcnt(__vector unsigned char __a) {
6484 return __builtin_s390_vpopctb(__a);
6487 static inline __ATTRS_o_ai __vector unsigned short
6488 vec_popcnt(__vector signed short __a) {
6489 return __builtin_s390_vpopcth((__vector unsigned short)__a);
6492 static inline __ATTRS_o_ai __vector unsigned short
6493 vec_popcnt(__vector unsigned short __a) {
6494 return __builtin_s390_vpopcth(__a);
6497 static inline __ATTRS_o_ai __vector unsigned int
6498 vec_popcnt(__vector signed int __a) {
6499 return __builtin_s390_vpopctf((__vector unsigned int)__a);
6502 static inline __ATTRS_o_ai __vector unsigned int
6503 vec_popcnt(__vector unsigned int __a) {
6504 return __builtin_s390_vpopctf(__a);
6507 static inline __ATTRS_o_ai __vector unsigned long long
6508 vec_popcnt(__vector signed long long __a) {
6509 return __builtin_s390_vpopctg((__vector unsigned long long)__a);
6512 static inline __ATTRS_o_ai __vector unsigned long long
6513 vec_popcnt(__vector unsigned long long __a) {
6514 return __builtin_s390_vpopctg(__a);
6517 /*-- vec_rl -----------------------------------------------------------------*/
6519 static inline __ATTRS_o_ai __vector signed char
6520 vec_rl(__vector signed char __a, __vector unsigned char __b) {
6521 return (__vector signed char)__builtin_s390_verllvb(
6522 (__vector unsigned char)__a, __b);
6525 static inline __ATTRS_o_ai __vector unsigned char
6526 vec_rl(__vector unsigned char __a, __vector unsigned char __b) {
6527 return __builtin_s390_verllvb(__a, __b);
6530 static inline __ATTRS_o_ai __vector signed short
6531 vec_rl(__vector signed short __a, __vector unsigned short __b) {
6532 return (__vector signed short)__builtin_s390_verllvh(
6533 (__vector unsigned short)__a, __b);
6536 static inline __ATTRS_o_ai __vector unsigned short
6537 vec_rl(__vector unsigned short __a, __vector unsigned short __b) {
6538 return __builtin_s390_verllvh(__a, __b);
6541 static inline __ATTRS_o_ai __vector signed int
6542 vec_rl(__vector signed int __a, __vector unsigned int __b) {
6543 return (__vector signed int)__builtin_s390_verllvf(
6544 (__vector unsigned int)__a, __b);
6547 static inline __ATTRS_o_ai __vector unsigned int
6548 vec_rl(__vector unsigned int __a, __vector unsigned int __b) {
6549 return __builtin_s390_verllvf(__a, __b);
6552 static inline __ATTRS_o_ai __vector signed long long
6553 vec_rl(__vector signed long long __a, __vector unsigned long long __b) {
6554 return (__vector signed long long)__builtin_s390_verllvg(
6555 (__vector unsigned long long)__a, __b);
6558 static inline __ATTRS_o_ai __vector unsigned long long
6559 vec_rl(__vector unsigned long long __a, __vector unsigned long long __b) {
6560 return __builtin_s390_verllvg(__a, __b);
6563 /*-- vec_rli ----------------------------------------------------------------*/
6565 static inline __ATTRS_o_ai __vector signed char
6566 vec_rli(__vector signed char __a, unsigned long __b) {
6567 return (__vector signed char)__builtin_s390_verllb(
6568 (__vector unsigned char)__a, (int)__b);
6571 static inline __ATTRS_o_ai __vector unsigned char
6572 vec_rli(__vector unsigned char __a, unsigned long __b) {
6573 return __builtin_s390_verllb(__a, (int)__b);
6576 static inline __ATTRS_o_ai __vector signed short
6577 vec_rli(__vector signed short __a, unsigned long __b) {
6578 return (__vector signed short)__builtin_s390_verllh(
6579 (__vector unsigned short)__a, (int)__b);
6582 static inline __ATTRS_o_ai __vector unsigned short
6583 vec_rli(__vector unsigned short __a, unsigned long __b) {
6584 return __builtin_s390_verllh(__a, (int)__b);
6587 static inline __ATTRS_o_ai __vector signed int
6588 vec_rli(__vector signed int __a, unsigned long __b) {
6589 return (__vector signed int)__builtin_s390_verllf(
6590 (__vector unsigned int)__a, (int)__b);
6593 static inline __ATTRS_o_ai __vector unsigned int
6594 vec_rli(__vector unsigned int __a, unsigned long __b) {
6595 return __builtin_s390_verllf(__a, (int)__b);
6598 static inline __ATTRS_o_ai __vector signed long long
6599 vec_rli(__vector signed long long __a, unsigned long __b) {
6600 return (__vector signed long long)__builtin_s390_verllg(
6601 (__vector unsigned long long)__a, (int)__b);
6604 static inline __ATTRS_o_ai __vector unsigned long long
6605 vec_rli(__vector unsigned long long __a, unsigned long __b) {
6606 return __builtin_s390_verllg(__a, (int)__b);
6609 /*-- vec_rl_mask ------------------------------------------------------------*/
6611 extern __ATTRS_o __vector signed char
6612 vec_rl_mask(__vector signed char __a, __vector unsigned char __b,
6613 unsigned char __c) __constant(__c);
6615 extern __ATTRS_o __vector unsigned char
6616 vec_rl_mask(__vector unsigned char __a, __vector unsigned char __b,
6617 unsigned char __c) __constant(__c);
6619 extern __ATTRS_o __vector signed short
6620 vec_rl_mask(__vector signed short __a, __vector unsigned short __b,
6621 unsigned char __c) __constant(__c);
6623 extern __ATTRS_o __vector unsigned short
6624 vec_rl_mask(__vector unsigned short __a, __vector unsigned short __b,
6625 unsigned char __c) __constant(__c);
6627 extern __ATTRS_o __vector signed int
6628 vec_rl_mask(__vector signed int __a, __vector unsigned int __b,
6629 unsigned char __c) __constant(__c);
6631 extern __ATTRS_o __vector unsigned int
6632 vec_rl_mask(__vector unsigned int __a, __vector unsigned int __b,
6633 unsigned char __c) __constant(__c);
6635 extern __ATTRS_o __vector signed long long
6636 vec_rl_mask(__vector signed long long __a, __vector unsigned long long __b,
6637 unsigned char __c) __constant(__c);
6639 extern __ATTRS_o __vector unsigned long long
6640 vec_rl_mask(__vector unsigned long long __a, __vector unsigned long long __b,
6641 unsigned char __c) __constant(__c);
6643 #define vec_rl_mask(X, Y, Z) ((__typeof__((vec_rl_mask)((X), (Y), (Z)))) \
6644 __extension__ ({ \
6645 __vector unsigned char __res; \
6646 __vector unsigned char __x = (__vector unsigned char)(X); \
6647 __vector unsigned char __y = (__vector unsigned char)(Y); \
6648 switch (sizeof ((X)[0])) { \
6649 case 1: __res = (__vector unsigned char) __builtin_s390_verimb( \
6650 (__vector unsigned char)__x, (__vector unsigned char)__x, \
6651 (__vector unsigned char)__y, (Z)); break; \
6652 case 2: __res = (__vector unsigned char) __builtin_s390_verimh( \
6653 (__vector unsigned short)__x, (__vector unsigned short)__x, \
6654 (__vector unsigned short)__y, (Z)); break; \
6655 case 4: __res = (__vector unsigned char) __builtin_s390_verimf( \
6656 (__vector unsigned int)__x, (__vector unsigned int)__x, \
6657 (__vector unsigned int)__y, (Z)); break; \
6658 default: __res = (__vector unsigned char) __builtin_s390_verimg( \
6659 (__vector unsigned long long)__x, (__vector unsigned long long)__x, \
6660 (__vector unsigned long long)__y, (Z)); break; \
6661 } __res; }))
6663 /*-- vec_sll ----------------------------------------------------------------*/
6665 static inline __ATTRS_o_ai __vector signed char
6666 vec_sll(__vector signed char __a, __vector unsigned char __b) {
6667 return (__vector signed char)__builtin_s390_vsl(
6668 (__vector unsigned char)__a, __b);
6671 // This prototype is deprecated.
6672 static inline __ATTRS_o_ai __vector signed char
6673 vec_sll(__vector signed char __a, __vector unsigned short __b) {
6674 return (__vector signed char)__builtin_s390_vsl(
6675 (__vector unsigned char)__a, (__vector unsigned char)__b);
6678 // This prototype is deprecated.
6679 static inline __ATTRS_o_ai __vector signed char
6680 vec_sll(__vector signed char __a, __vector unsigned int __b) {
6681 return (__vector signed char)__builtin_s390_vsl(
6682 (__vector unsigned char)__a, (__vector unsigned char)__b);
6685 // This prototype is deprecated.
6686 static inline __ATTRS_o_ai __vector __bool char
6687 vec_sll(__vector __bool char __a, __vector unsigned char __b) {
6688 return (__vector __bool char)__builtin_s390_vsl(
6689 (__vector unsigned char)__a, __b);
6692 // This prototype is deprecated.
6693 static inline __ATTRS_o_ai __vector __bool char
6694 vec_sll(__vector __bool char __a, __vector unsigned short __b) {
6695 return (__vector __bool char)__builtin_s390_vsl(
6696 (__vector unsigned char)__a, (__vector unsigned char)__b);
6699 // This prototype is deprecated.
6700 static inline __ATTRS_o_ai __vector __bool char
6701 vec_sll(__vector __bool char __a, __vector unsigned int __b) {
6702 return (__vector __bool char)__builtin_s390_vsl(
6703 (__vector unsigned char)__a, (__vector unsigned char)__b);
6706 static inline __ATTRS_o_ai __vector unsigned char
6707 vec_sll(__vector unsigned char __a, __vector unsigned char __b) {
6708 return __builtin_s390_vsl(__a, __b);
6711 // This prototype is deprecated.
6712 static inline __ATTRS_o_ai __vector unsigned char
6713 vec_sll(__vector unsigned char __a, __vector unsigned short __b) {
6714 return __builtin_s390_vsl(__a, (__vector unsigned char)__b);
6717 // This prototype is deprecated.
6718 static inline __ATTRS_o_ai __vector unsigned char
6719 vec_sll(__vector unsigned char __a, __vector unsigned int __b) {
6720 return __builtin_s390_vsl(__a, (__vector unsigned char)__b);
6723 static inline __ATTRS_o_ai __vector signed short
6724 vec_sll(__vector signed short __a, __vector unsigned char __b) {
6725 return (__vector signed short)__builtin_s390_vsl(
6726 (__vector unsigned char)__a, __b);
6729 // This prototype is deprecated.
6730 static inline __ATTRS_o_ai __vector signed short
6731 vec_sll(__vector signed short __a, __vector unsigned short __b) {
6732 return (__vector signed short)__builtin_s390_vsl(
6733 (__vector unsigned char)__a, (__vector unsigned char)__b);
6736 // This prototype is deprecated.
6737 static inline __ATTRS_o_ai __vector signed short
6738 vec_sll(__vector signed short __a, __vector unsigned int __b) {
6739 return (__vector signed short)__builtin_s390_vsl(
6740 (__vector unsigned char)__a, (__vector unsigned char)__b);
6743 // This prototype is deprecated.
6744 static inline __ATTRS_o_ai __vector __bool short
6745 vec_sll(__vector __bool short __a, __vector unsigned char __b) {
6746 return (__vector __bool short)__builtin_s390_vsl(
6747 (__vector unsigned char)__a, __b);
6750 // This prototype is deprecated.
6751 static inline __ATTRS_o_ai __vector __bool short
6752 vec_sll(__vector __bool short __a, __vector unsigned short __b) {
6753 return (__vector __bool short)__builtin_s390_vsl(
6754 (__vector unsigned char)__a, (__vector unsigned char)__b);
6757 // This prototype is deprecated.
6758 static inline __ATTRS_o_ai __vector __bool short
6759 vec_sll(__vector __bool short __a, __vector unsigned int __b) {
6760 return (__vector __bool short)__builtin_s390_vsl(
6761 (__vector unsigned char)__a, (__vector unsigned char)__b);
6764 static inline __ATTRS_o_ai __vector unsigned short
6765 vec_sll(__vector unsigned short __a, __vector unsigned char __b) {
6766 return (__vector unsigned short)__builtin_s390_vsl(
6767 (__vector unsigned char)__a, __b);
6770 // This prototype is deprecated.
6771 static inline __ATTRS_o_ai __vector unsigned short
6772 vec_sll(__vector unsigned short __a, __vector unsigned short __b) {
6773 return (__vector unsigned short)__builtin_s390_vsl(
6774 (__vector unsigned char)__a, (__vector unsigned char)__b);
6777 // This prototype is deprecated.
6778 static inline __ATTRS_o_ai __vector unsigned short
6779 vec_sll(__vector unsigned short __a, __vector unsigned int __b) {
6780 return (__vector unsigned short)__builtin_s390_vsl(
6781 (__vector unsigned char)__a, (__vector unsigned char)__b);
6784 static inline __ATTRS_o_ai __vector signed int
6785 vec_sll(__vector signed int __a, __vector unsigned char __b) {
6786 return (__vector signed int)__builtin_s390_vsl(
6787 (__vector unsigned char)__a, __b);
6790 // This prototype is deprecated.
6791 static inline __ATTRS_o_ai __vector signed int
6792 vec_sll(__vector signed int __a, __vector unsigned short __b) {
6793 return (__vector signed int)__builtin_s390_vsl(
6794 (__vector unsigned char)__a, (__vector unsigned char)__b);
6797 // This prototype is deprecated.
6798 static inline __ATTRS_o_ai __vector signed int
6799 vec_sll(__vector signed int __a, __vector unsigned int __b) {
6800 return (__vector signed int)__builtin_s390_vsl(
6801 (__vector unsigned char)__a, (__vector unsigned char)__b);
6804 // This prototype is deprecated.
6805 static inline __ATTRS_o_ai __vector __bool int
6806 vec_sll(__vector __bool int __a, __vector unsigned char __b) {
6807 return (__vector __bool int)__builtin_s390_vsl(
6808 (__vector unsigned char)__a, __b);
6811 // This prototype is deprecated.
6812 static inline __ATTRS_o_ai __vector __bool int
6813 vec_sll(__vector __bool int __a, __vector unsigned short __b) {
6814 return (__vector __bool int)__builtin_s390_vsl(
6815 (__vector unsigned char)__a, (__vector unsigned char)__b);
6818 // This prototype is deprecated.
6819 static inline __ATTRS_o_ai __vector __bool int
6820 vec_sll(__vector __bool int __a, __vector unsigned int __b) {
6821 return (__vector __bool int)__builtin_s390_vsl(
6822 (__vector unsigned char)__a, (__vector unsigned char)__b);
6825 static inline __ATTRS_o_ai __vector unsigned int
6826 vec_sll(__vector unsigned int __a, __vector unsigned char __b) {
6827 return (__vector unsigned int)__builtin_s390_vsl(
6828 (__vector unsigned char)__a, __b);
6831 // This prototype is deprecated.
6832 static inline __ATTRS_o_ai __vector unsigned int
6833 vec_sll(__vector unsigned int __a, __vector unsigned short __b) {
6834 return (__vector unsigned int)__builtin_s390_vsl(
6835 (__vector unsigned char)__a, (__vector unsigned char)__b);
6838 // This prototype is deprecated.
6839 static inline __ATTRS_o_ai __vector unsigned int
6840 vec_sll(__vector unsigned int __a, __vector unsigned int __b) {
6841 return (__vector unsigned int)__builtin_s390_vsl(
6842 (__vector unsigned char)__a, (__vector unsigned char)__b);
6845 static inline __ATTRS_o_ai __vector signed long long
6846 vec_sll(__vector signed long long __a, __vector unsigned char __b) {
6847 return (__vector signed long long)__builtin_s390_vsl(
6848 (__vector unsigned char)__a, __b);
6851 // This prototype is deprecated.
6852 static inline __ATTRS_o_ai __vector signed long long
6853 vec_sll(__vector signed long long __a, __vector unsigned short __b) {
6854 return (__vector signed long long)__builtin_s390_vsl(
6855 (__vector unsigned char)__a, (__vector unsigned char)__b);
6858 // This prototype is deprecated.
6859 static inline __ATTRS_o_ai __vector signed long long
6860 vec_sll(__vector signed long long __a, __vector unsigned int __b) {
6861 return (__vector signed long long)__builtin_s390_vsl(
6862 (__vector unsigned char)__a, (__vector unsigned char)__b);
6865 // This prototype is deprecated.
6866 static inline __ATTRS_o_ai __vector __bool long long
6867 vec_sll(__vector __bool long long __a, __vector unsigned char __b) {
6868 return (__vector __bool long long)__builtin_s390_vsl(
6869 (__vector unsigned char)__a, __b);
6872 // This prototype is deprecated.
6873 static inline __ATTRS_o_ai __vector __bool long long
6874 vec_sll(__vector __bool long long __a, __vector unsigned short __b) {
6875 return (__vector __bool long long)__builtin_s390_vsl(
6876 (__vector unsigned char)__a, (__vector unsigned char)__b);
6879 // This prototype is deprecated.
6880 static inline __ATTRS_o_ai __vector __bool long long
6881 vec_sll(__vector __bool long long __a, __vector unsigned int __b) {
6882 return (__vector __bool long long)__builtin_s390_vsl(
6883 (__vector unsigned char)__a, (__vector unsigned char)__b);
6886 static inline __ATTRS_o_ai __vector unsigned long long
6887 vec_sll(__vector unsigned long long __a, __vector unsigned char __b) {
6888 return (__vector unsigned long long)__builtin_s390_vsl(
6889 (__vector unsigned char)__a, __b);
6892 // This prototype is deprecated.
6893 static inline __ATTRS_o_ai __vector unsigned long long
6894 vec_sll(__vector unsigned long long __a, __vector unsigned short __b) {
6895 return (__vector unsigned long long)__builtin_s390_vsl(
6896 (__vector unsigned char)__a, (__vector unsigned char)__b);
6899 // This prototype is deprecated.
6900 static inline __ATTRS_o_ai __vector unsigned long long
6901 vec_sll(__vector unsigned long long __a, __vector unsigned int __b) {
6902 return (__vector unsigned long long)__builtin_s390_vsl(
6903 (__vector unsigned char)__a, (__vector unsigned char)__b);
6906 /*-- vec_slb ----------------------------------------------------------------*/
6908 static inline __ATTRS_o_ai __vector signed char
6909 vec_slb(__vector signed char __a, __vector signed char __b) {
6910 return (__vector signed char)__builtin_s390_vslb(
6911 (__vector unsigned char)__a, (__vector unsigned char)__b);
6914 static inline __ATTRS_o_ai __vector signed char
6915 vec_slb(__vector signed char __a, __vector unsigned char __b) {
6916 return (__vector signed char)__builtin_s390_vslb(
6917 (__vector unsigned char)__a, __b);
6920 static inline __ATTRS_o_ai __vector unsigned char
6921 vec_slb(__vector unsigned char __a, __vector signed char __b) {
6922 return __builtin_s390_vslb(__a, (__vector unsigned char)__b);
6925 static inline __ATTRS_o_ai __vector unsigned char
6926 vec_slb(__vector unsigned char __a, __vector unsigned char __b) {
6927 return __builtin_s390_vslb(__a, __b);
6930 static inline __ATTRS_o_ai __vector signed short
6931 vec_slb(__vector signed short __a, __vector signed short __b) {
6932 return (__vector signed short)__builtin_s390_vslb(
6933 (__vector unsigned char)__a, (__vector unsigned char)__b);
6936 static inline __ATTRS_o_ai __vector signed short
6937 vec_slb(__vector signed short __a, __vector unsigned short __b) {
6938 return (__vector signed short)__builtin_s390_vslb(
6939 (__vector unsigned char)__a, (__vector unsigned char)__b);
6942 static inline __ATTRS_o_ai __vector unsigned short
6943 vec_slb(__vector unsigned short __a, __vector signed short __b) {
6944 return (__vector unsigned short)__builtin_s390_vslb(
6945 (__vector unsigned char)__a, (__vector unsigned char)__b);
6948 static inline __ATTRS_o_ai __vector unsigned short
6949 vec_slb(__vector unsigned short __a, __vector unsigned short __b) {
6950 return (__vector unsigned short)__builtin_s390_vslb(
6951 (__vector unsigned char)__a, (__vector unsigned char)__b);
6954 static inline __ATTRS_o_ai __vector signed int
6955 vec_slb(__vector signed int __a, __vector signed int __b) {
6956 return (__vector signed int)__builtin_s390_vslb(
6957 (__vector unsigned char)__a, (__vector unsigned char)__b);
6960 static inline __ATTRS_o_ai __vector signed int
6961 vec_slb(__vector signed int __a, __vector unsigned int __b) {
6962 return (__vector signed int)__builtin_s390_vslb(
6963 (__vector unsigned char)__a, (__vector unsigned char)__b);
6966 static inline __ATTRS_o_ai __vector unsigned int
6967 vec_slb(__vector unsigned int __a, __vector signed int __b) {
6968 return (__vector unsigned int)__builtin_s390_vslb(
6969 (__vector unsigned char)__a, (__vector unsigned char)__b);
6972 static inline __ATTRS_o_ai __vector unsigned int
6973 vec_slb(__vector unsigned int __a, __vector unsigned int __b) {
6974 return (__vector unsigned int)__builtin_s390_vslb(
6975 (__vector unsigned char)__a, (__vector unsigned char)__b);
6978 static inline __ATTRS_o_ai __vector signed long long
6979 vec_slb(__vector signed long long __a, __vector signed long long __b) {
6980 return (__vector signed long long)__builtin_s390_vslb(
6981 (__vector unsigned char)__a, (__vector unsigned char)__b);
6984 static inline __ATTRS_o_ai __vector signed long long
6985 vec_slb(__vector signed long long __a, __vector unsigned long long __b) {
6986 return (__vector signed long long)__builtin_s390_vslb(
6987 (__vector unsigned char)__a, (__vector unsigned char)__b);
6990 static inline __ATTRS_o_ai __vector unsigned long long
6991 vec_slb(__vector unsigned long long __a, __vector signed long long __b) {
6992 return (__vector unsigned long long)__builtin_s390_vslb(
6993 (__vector unsigned char)__a, (__vector unsigned char)__b);
6996 static inline __ATTRS_o_ai __vector unsigned long long
6997 vec_slb(__vector unsigned long long __a, __vector unsigned long long __b) {
6998 return (__vector unsigned long long)__builtin_s390_vslb(
6999 (__vector unsigned char)__a, (__vector unsigned char)__b);
7002 #if __ARCH__ >= 12
7003 static inline __ATTRS_o_ai __vector float
7004 vec_slb(__vector float __a, __vector signed int __b) {
7005 return (__vector float)__builtin_s390_vslb(
7006 (__vector unsigned char)__a, (__vector unsigned char)__b);
7009 static inline __ATTRS_o_ai __vector float
7010 vec_slb(__vector float __a, __vector unsigned int __b) {
7011 return (__vector float)__builtin_s390_vslb(
7012 (__vector unsigned char)__a, (__vector unsigned char)__b);
7014 #endif
7016 static inline __ATTRS_o_ai __vector double
7017 vec_slb(__vector double __a, __vector signed long long __b) {
7018 return (__vector double)__builtin_s390_vslb(
7019 (__vector unsigned char)__a, (__vector unsigned char)__b);
7022 static inline __ATTRS_o_ai __vector double
7023 vec_slb(__vector double __a, __vector unsigned long long __b) {
7024 return (__vector double)__builtin_s390_vslb(
7025 (__vector unsigned char)__a, (__vector unsigned char)__b);
7028 /*-- vec_sld ----------------------------------------------------------------*/
7030 extern __ATTRS_o __vector signed char
7031 vec_sld(__vector signed char __a, __vector signed char __b, int __c)
7032 __constant_range(__c, 0, 15);
7034 extern __ATTRS_o __vector __bool char
7035 vec_sld(__vector __bool char __a, __vector __bool char __b, int __c)
7036 __constant_range(__c, 0, 15);
7038 extern __ATTRS_o __vector unsigned char
7039 vec_sld(__vector unsigned char __a, __vector unsigned char __b, int __c)
7040 __constant_range(__c, 0, 15);
7042 extern __ATTRS_o __vector signed short
7043 vec_sld(__vector signed short __a, __vector signed short __b, int __c)
7044 __constant_range(__c, 0, 15);
7046 extern __ATTRS_o __vector __bool short
7047 vec_sld(__vector __bool short __a, __vector __bool short __b, int __c)
7048 __constant_range(__c, 0, 15);
7050 extern __ATTRS_o __vector unsigned short
7051 vec_sld(__vector unsigned short __a, __vector unsigned short __b, int __c)
7052 __constant_range(__c, 0, 15);
7054 extern __ATTRS_o __vector signed int
7055 vec_sld(__vector signed int __a, __vector signed int __b, int __c)
7056 __constant_range(__c, 0, 15);
7058 extern __ATTRS_o __vector __bool int
7059 vec_sld(__vector __bool int __a, __vector __bool int __b, int __c)
7060 __constant_range(__c, 0, 15);
7062 extern __ATTRS_o __vector unsigned int
7063 vec_sld(__vector unsigned int __a, __vector unsigned int __b, int __c)
7064 __constant_range(__c, 0, 15);
7066 extern __ATTRS_o __vector signed long long
7067 vec_sld(__vector signed long long __a, __vector signed long long __b, int __c)
7068 __constant_range(__c, 0, 15);
7070 extern __ATTRS_o __vector __bool long long
7071 vec_sld(__vector __bool long long __a, __vector __bool long long __b, int __c)
7072 __constant_range(__c, 0, 15);
7074 extern __ATTRS_o __vector unsigned long long
7075 vec_sld(__vector unsigned long long __a, __vector unsigned long long __b,
7076 int __c)
7077 __constant_range(__c, 0, 15);
7079 #if __ARCH__ >= 12
7080 extern __ATTRS_o __vector float
7081 vec_sld(__vector float __a, __vector float __b, int __c)
7082 __constant_range(__c, 0, 15);
7083 #endif
7085 extern __ATTRS_o __vector double
7086 vec_sld(__vector double __a, __vector double __b, int __c)
7087 __constant_range(__c, 0, 15);
7089 #define vec_sld(X, Y, Z) ((__typeof__((vec_sld)((X), (Y), (Z)))) \
7090 __builtin_s390_vsldb((__vector unsigned char)(X), \
7091 (__vector unsigned char)(Y), (Z)))
7093 /*-- vec_sldw ---------------------------------------------------------------*/
7095 extern __ATTRS_o __vector signed char
7096 vec_sldw(__vector signed char __a, __vector signed char __b, int __c)
7097 __constant_range(__c, 0, 3);
7099 extern __ATTRS_o __vector unsigned char
7100 vec_sldw(__vector unsigned char __a, __vector unsigned char __b, int __c)
7101 __constant_range(__c, 0, 3);
7103 extern __ATTRS_o __vector signed short
7104 vec_sldw(__vector signed short __a, __vector signed short __b, int __c)
7105 __constant_range(__c, 0, 3);
7107 extern __ATTRS_o __vector unsigned short
7108 vec_sldw(__vector unsigned short __a, __vector unsigned short __b, int __c)
7109 __constant_range(__c, 0, 3);
7111 extern __ATTRS_o __vector signed int
7112 vec_sldw(__vector signed int __a, __vector signed int __b, int __c)
7113 __constant_range(__c, 0, 3);
7115 extern __ATTRS_o __vector unsigned int
7116 vec_sldw(__vector unsigned int __a, __vector unsigned int __b, int __c)
7117 __constant_range(__c, 0, 3);
7119 extern __ATTRS_o __vector signed long long
7120 vec_sldw(__vector signed long long __a, __vector signed long long __b, int __c)
7121 __constant_range(__c, 0, 3);
7123 extern __ATTRS_o __vector unsigned long long
7124 vec_sldw(__vector unsigned long long __a, __vector unsigned long long __b,
7125 int __c)
7126 __constant_range(__c, 0, 3);
7128 // This prototype is deprecated.
7129 extern __ATTRS_o __vector double
7130 vec_sldw(__vector double __a, __vector double __b, int __c)
7131 __constant_range(__c, 0, 3);
7133 #define vec_sldw(X, Y, Z) ((__typeof__((vec_sldw)((X), (Y), (Z)))) \
7134 __builtin_s390_vsldb((__vector unsigned char)(X), \
7135 (__vector unsigned char)(Y), (Z) * 4))
7137 /*-- vec_sldb ---------------------------------------------------------------*/
7139 #if __ARCH__ >= 13
7141 extern __ATTRS_o __vector signed char
7142 vec_sldb(__vector signed char __a, __vector signed char __b, int __c)
7143 __constant_range(__c, 0, 7);
7145 extern __ATTRS_o __vector unsigned char
7146 vec_sldb(__vector unsigned char __a, __vector unsigned char __b, int __c)
7147 __constant_range(__c, 0, 7);
7149 extern __ATTRS_o __vector signed short
7150 vec_sldb(__vector signed short __a, __vector signed short __b, int __c)
7151 __constant_range(__c, 0, 7);
7153 extern __ATTRS_o __vector unsigned short
7154 vec_sldb(__vector unsigned short __a, __vector unsigned short __b, int __c)
7155 __constant_range(__c, 0, 7);
7157 extern __ATTRS_o __vector signed int
7158 vec_sldb(__vector signed int __a, __vector signed int __b, int __c)
7159 __constant_range(__c, 0, 7);
7161 extern __ATTRS_o __vector unsigned int
7162 vec_sldb(__vector unsigned int __a, __vector unsigned int __b, int __c)
7163 __constant_range(__c, 0, 7);
7165 extern __ATTRS_o __vector signed long long
7166 vec_sldb(__vector signed long long __a, __vector signed long long __b, int __c)
7167 __constant_range(__c, 0, 7);
7169 extern __ATTRS_o __vector unsigned long long
7170 vec_sldb(__vector unsigned long long __a, __vector unsigned long long __b,
7171 int __c)
7172 __constant_range(__c, 0, 7);
7174 extern __ATTRS_o __vector float
7175 vec_sldb(__vector float __a, __vector float __b, int __c)
7176 __constant_range(__c, 0, 7);
7178 extern __ATTRS_o __vector double
7179 vec_sldb(__vector double __a, __vector double __b, int __c)
7180 __constant_range(__c, 0, 7);
7182 #define vec_sldb(X, Y, Z) ((__typeof__((vec_sldb)((X), (Y), (Z)))) \
7183 __builtin_s390_vsld((__vector unsigned char)(X), \
7184 (__vector unsigned char)(Y), (Z)))
7186 #endif
7188 /*-- vec_sral ---------------------------------------------------------------*/
7190 static inline __ATTRS_o_ai __vector signed char
7191 vec_sral(__vector signed char __a, __vector unsigned char __b) {
7192 return (__vector signed char)__builtin_s390_vsra(
7193 (__vector unsigned char)__a, __b);
7196 // This prototype is deprecated.
7197 static inline __ATTRS_o_ai __vector signed char
7198 vec_sral(__vector signed char __a, __vector unsigned short __b) {
7199 return (__vector signed char)__builtin_s390_vsra(
7200 (__vector unsigned char)__a, (__vector unsigned char)__b);
7203 // This prototype is deprecated.
7204 static inline __ATTRS_o_ai __vector signed char
7205 vec_sral(__vector signed char __a, __vector unsigned int __b) {
7206 return (__vector signed char)__builtin_s390_vsra(
7207 (__vector unsigned char)__a, (__vector unsigned char)__b);
7210 // This prototype is deprecated.
7211 static inline __ATTRS_o_ai __vector __bool char
7212 vec_sral(__vector __bool char __a, __vector unsigned char __b) {
7213 return (__vector __bool char)__builtin_s390_vsra(
7214 (__vector unsigned char)__a, __b);
7217 // This prototype is deprecated.
7218 static inline __ATTRS_o_ai __vector __bool char
7219 vec_sral(__vector __bool char __a, __vector unsigned short __b) {
7220 return (__vector __bool char)__builtin_s390_vsra(
7221 (__vector unsigned char)__a, (__vector unsigned char)__b);
7224 // This prototype is deprecated.
7225 static inline __ATTRS_o_ai __vector __bool char
7226 vec_sral(__vector __bool char __a, __vector unsigned int __b) {
7227 return (__vector __bool char)__builtin_s390_vsra(
7228 (__vector unsigned char)__a, (__vector unsigned char)__b);
7231 static inline __ATTRS_o_ai __vector unsigned char
7232 vec_sral(__vector unsigned char __a, __vector unsigned char __b) {
7233 return __builtin_s390_vsra(__a, __b);
7236 // This prototype is deprecated.
7237 static inline __ATTRS_o_ai __vector unsigned char
7238 vec_sral(__vector unsigned char __a, __vector unsigned short __b) {
7239 return __builtin_s390_vsra(__a, (__vector unsigned char)__b);
7242 // This prototype is deprecated.
7243 static inline __ATTRS_o_ai __vector unsigned char
7244 vec_sral(__vector unsigned char __a, __vector unsigned int __b) {
7245 return __builtin_s390_vsra(__a, (__vector unsigned char)__b);
7248 static inline __ATTRS_o_ai __vector signed short
7249 vec_sral(__vector signed short __a, __vector unsigned char __b) {
7250 return (__vector signed short)__builtin_s390_vsra(
7251 (__vector unsigned char)__a, __b);
7254 // This prototype is deprecated.
7255 static inline __ATTRS_o_ai __vector signed short
7256 vec_sral(__vector signed short __a, __vector unsigned short __b) {
7257 return (__vector signed short)__builtin_s390_vsra(
7258 (__vector unsigned char)__a, (__vector unsigned char)__b);
7261 // This prototype is deprecated.
7262 static inline __ATTRS_o_ai __vector signed short
7263 vec_sral(__vector signed short __a, __vector unsigned int __b) {
7264 return (__vector signed short)__builtin_s390_vsra(
7265 (__vector unsigned char)__a, (__vector unsigned char)__b);
7268 // This prototype is deprecated.
7269 static inline __ATTRS_o_ai __vector __bool short
7270 vec_sral(__vector __bool short __a, __vector unsigned char __b) {
7271 return (__vector __bool short)__builtin_s390_vsra(
7272 (__vector unsigned char)__a, __b);
7275 // This prototype is deprecated.
7276 static inline __ATTRS_o_ai __vector __bool short
7277 vec_sral(__vector __bool short __a, __vector unsigned short __b) {
7278 return (__vector __bool short)__builtin_s390_vsra(
7279 (__vector unsigned char)__a, (__vector unsigned char)__b);
7282 // This prototype is deprecated.
7283 static inline __ATTRS_o_ai __vector __bool short
7284 vec_sral(__vector __bool short __a, __vector unsigned int __b) {
7285 return (__vector __bool short)__builtin_s390_vsra(
7286 (__vector unsigned char)__a, (__vector unsigned char)__b);
7289 static inline __ATTRS_o_ai __vector unsigned short
7290 vec_sral(__vector unsigned short __a, __vector unsigned char __b) {
7291 return (__vector unsigned short)__builtin_s390_vsra(
7292 (__vector unsigned char)__a, __b);
7295 // This prototype is deprecated.
7296 static inline __ATTRS_o_ai __vector unsigned short
7297 vec_sral(__vector unsigned short __a, __vector unsigned short __b) {
7298 return (__vector unsigned short)__builtin_s390_vsra(
7299 (__vector unsigned char)__a, (__vector unsigned char)__b);
7302 // This prototype is deprecated.
7303 static inline __ATTRS_o_ai __vector unsigned short
7304 vec_sral(__vector unsigned short __a, __vector unsigned int __b) {
7305 return (__vector unsigned short)__builtin_s390_vsra(
7306 (__vector unsigned char)__a, (__vector unsigned char)__b);
7309 static inline __ATTRS_o_ai __vector signed int
7310 vec_sral(__vector signed int __a, __vector unsigned char __b) {
7311 return (__vector signed int)__builtin_s390_vsra(
7312 (__vector unsigned char)__a, __b);
7315 // This prototype is deprecated.
7316 static inline __ATTRS_o_ai __vector signed int
7317 vec_sral(__vector signed int __a, __vector unsigned short __b) {
7318 return (__vector signed int)__builtin_s390_vsra(
7319 (__vector unsigned char)__a, (__vector unsigned char)__b);
7322 // This prototype is deprecated.
7323 static inline __ATTRS_o_ai __vector signed int
7324 vec_sral(__vector signed int __a, __vector unsigned int __b) {
7325 return (__vector signed int)__builtin_s390_vsra(
7326 (__vector unsigned char)__a, (__vector unsigned char)__b);
7329 // This prototype is deprecated.
7330 static inline __ATTRS_o_ai __vector __bool int
7331 vec_sral(__vector __bool int __a, __vector unsigned char __b) {
7332 return (__vector __bool int)__builtin_s390_vsra(
7333 (__vector unsigned char)__a, __b);
7336 // This prototype is deprecated.
7337 static inline __ATTRS_o_ai __vector __bool int
7338 vec_sral(__vector __bool int __a, __vector unsigned short __b) {
7339 return (__vector __bool int)__builtin_s390_vsra(
7340 (__vector unsigned char)__a, (__vector unsigned char)__b);
7343 // This prototype is deprecated.
7344 static inline __ATTRS_o_ai __vector __bool int
7345 vec_sral(__vector __bool int __a, __vector unsigned int __b) {
7346 return (__vector __bool int)__builtin_s390_vsra(
7347 (__vector unsigned char)__a, (__vector unsigned char)__b);
7350 static inline __ATTRS_o_ai __vector unsigned int
7351 vec_sral(__vector unsigned int __a, __vector unsigned char __b) {
7352 return (__vector unsigned int)__builtin_s390_vsra(
7353 (__vector unsigned char)__a, __b);
7356 // This prototype is deprecated.
7357 static inline __ATTRS_o_ai __vector unsigned int
7358 vec_sral(__vector unsigned int __a, __vector unsigned short __b) {
7359 return (__vector unsigned int)__builtin_s390_vsra(
7360 (__vector unsigned char)__a, (__vector unsigned char)__b);
7363 // This prototype is deprecated.
7364 static inline __ATTRS_o_ai __vector unsigned int
7365 vec_sral(__vector unsigned int __a, __vector unsigned int __b) {
7366 return (__vector unsigned int)__builtin_s390_vsra(
7367 (__vector unsigned char)__a, (__vector unsigned char)__b);
7370 static inline __ATTRS_o_ai __vector signed long long
7371 vec_sral(__vector signed long long __a, __vector unsigned char __b) {
7372 return (__vector signed long long)__builtin_s390_vsra(
7373 (__vector unsigned char)__a, __b);
7376 // This prototype is deprecated.
7377 static inline __ATTRS_o_ai __vector signed long long
7378 vec_sral(__vector signed long long __a, __vector unsigned short __b) {
7379 return (__vector signed long long)__builtin_s390_vsra(
7380 (__vector unsigned char)__a, (__vector unsigned char)__b);
7383 // This prototype is deprecated.
7384 static inline __ATTRS_o_ai __vector signed long long
7385 vec_sral(__vector signed long long __a, __vector unsigned int __b) {
7386 return (__vector signed long long)__builtin_s390_vsra(
7387 (__vector unsigned char)__a, (__vector unsigned char)__b);
7390 // This prototype is deprecated.
7391 static inline __ATTRS_o_ai __vector __bool long long
7392 vec_sral(__vector __bool long long __a, __vector unsigned char __b) {
7393 return (__vector __bool long long)__builtin_s390_vsra(
7394 (__vector unsigned char)__a, __b);
7397 // This prototype is deprecated.
7398 static inline __ATTRS_o_ai __vector __bool long long
7399 vec_sral(__vector __bool long long __a, __vector unsigned short __b) {
7400 return (__vector __bool long long)__builtin_s390_vsra(
7401 (__vector unsigned char)__a, (__vector unsigned char)__b);
7404 // This prototype is deprecated.
7405 static inline __ATTRS_o_ai __vector __bool long long
7406 vec_sral(__vector __bool long long __a, __vector unsigned int __b) {
7407 return (__vector __bool long long)__builtin_s390_vsra(
7408 (__vector unsigned char)__a, (__vector unsigned char)__b);
7411 static inline __ATTRS_o_ai __vector unsigned long long
7412 vec_sral(__vector unsigned long long __a, __vector unsigned char __b) {
7413 return (__vector unsigned long long)__builtin_s390_vsra(
7414 (__vector unsigned char)__a, __b);
7417 // This prototype is deprecated.
7418 static inline __ATTRS_o_ai __vector unsigned long long
7419 vec_sral(__vector unsigned long long __a, __vector unsigned short __b) {
7420 return (__vector unsigned long long)__builtin_s390_vsra(
7421 (__vector unsigned char)__a, (__vector unsigned char)__b);
7424 // This prototype is deprecated.
7425 static inline __ATTRS_o_ai __vector unsigned long long
7426 vec_sral(__vector unsigned long long __a, __vector unsigned int __b) {
7427 return (__vector unsigned long long)__builtin_s390_vsra(
7428 (__vector unsigned char)__a, (__vector unsigned char)__b);
7431 /*-- vec_srab ---------------------------------------------------------------*/
7433 static inline __ATTRS_o_ai __vector signed char
7434 vec_srab(__vector signed char __a, __vector signed char __b) {
7435 return (__vector signed char)__builtin_s390_vsrab(
7436 (__vector unsigned char)__a, (__vector unsigned char)__b);
7439 static inline __ATTRS_o_ai __vector signed char
7440 vec_srab(__vector signed char __a, __vector unsigned char __b) {
7441 return (__vector signed char)__builtin_s390_vsrab(
7442 (__vector unsigned char)__a, __b);
7445 static inline __ATTRS_o_ai __vector unsigned char
7446 vec_srab(__vector unsigned char __a, __vector signed char __b) {
7447 return __builtin_s390_vsrab(__a, (__vector unsigned char)__b);
7450 static inline __ATTRS_o_ai __vector unsigned char
7451 vec_srab(__vector unsigned char __a, __vector unsigned char __b) {
7452 return __builtin_s390_vsrab(__a, __b);
7455 static inline __ATTRS_o_ai __vector signed short
7456 vec_srab(__vector signed short __a, __vector signed short __b) {
7457 return (__vector signed short)__builtin_s390_vsrab(
7458 (__vector unsigned char)__a, (__vector unsigned char)__b);
7461 static inline __ATTRS_o_ai __vector signed short
7462 vec_srab(__vector signed short __a, __vector unsigned short __b) {
7463 return (__vector signed short)__builtin_s390_vsrab(
7464 (__vector unsigned char)__a, (__vector unsigned char)__b);
7467 static inline __ATTRS_o_ai __vector unsigned short
7468 vec_srab(__vector unsigned short __a, __vector signed short __b) {
7469 return (__vector unsigned short)__builtin_s390_vsrab(
7470 (__vector unsigned char)__a, (__vector unsigned char)__b);
7473 static inline __ATTRS_o_ai __vector unsigned short
7474 vec_srab(__vector unsigned short __a, __vector unsigned short __b) {
7475 return (__vector unsigned short)__builtin_s390_vsrab(
7476 (__vector unsigned char)__a, (__vector unsigned char)__b);
7479 static inline __ATTRS_o_ai __vector signed int
7480 vec_srab(__vector signed int __a, __vector signed int __b) {
7481 return (__vector signed int)__builtin_s390_vsrab(
7482 (__vector unsigned char)__a, (__vector unsigned char)__b);
7485 static inline __ATTRS_o_ai __vector signed int
7486 vec_srab(__vector signed int __a, __vector unsigned int __b) {
7487 return (__vector signed int)__builtin_s390_vsrab(
7488 (__vector unsigned char)__a, (__vector unsigned char)__b);
7491 static inline __ATTRS_o_ai __vector unsigned int
7492 vec_srab(__vector unsigned int __a, __vector signed int __b) {
7493 return (__vector unsigned int)__builtin_s390_vsrab(
7494 (__vector unsigned char)__a, (__vector unsigned char)__b);
7497 static inline __ATTRS_o_ai __vector unsigned int
7498 vec_srab(__vector unsigned int __a, __vector unsigned int __b) {
7499 return (__vector unsigned int)__builtin_s390_vsrab(
7500 (__vector unsigned char)__a, (__vector unsigned char)__b);
7503 static inline __ATTRS_o_ai __vector signed long long
7504 vec_srab(__vector signed long long __a, __vector signed long long __b) {
7505 return (__vector signed long long)__builtin_s390_vsrab(
7506 (__vector unsigned char)__a, (__vector unsigned char)__b);
7509 static inline __ATTRS_o_ai __vector signed long long
7510 vec_srab(__vector signed long long __a, __vector unsigned long long __b) {
7511 return (__vector signed long long)__builtin_s390_vsrab(
7512 (__vector unsigned char)__a, (__vector unsigned char)__b);
7515 static inline __ATTRS_o_ai __vector unsigned long long
7516 vec_srab(__vector unsigned long long __a, __vector signed long long __b) {
7517 return (__vector unsigned long long)__builtin_s390_vsrab(
7518 (__vector unsigned char)__a, (__vector unsigned char)__b);
7521 static inline __ATTRS_o_ai __vector unsigned long long
7522 vec_srab(__vector unsigned long long __a, __vector unsigned long long __b) {
7523 return (__vector unsigned long long)__builtin_s390_vsrab(
7524 (__vector unsigned char)__a, (__vector unsigned char)__b);
7527 #if __ARCH__ >= 12
7528 static inline __ATTRS_o_ai __vector float
7529 vec_srab(__vector float __a, __vector signed int __b) {
7530 return (__vector float)__builtin_s390_vsrab(
7531 (__vector unsigned char)__a, (__vector unsigned char)__b);
7534 static inline __ATTRS_o_ai __vector float
7535 vec_srab(__vector float __a, __vector unsigned int __b) {
7536 return (__vector float)__builtin_s390_vsrab(
7537 (__vector unsigned char)__a, (__vector unsigned char)__b);
7539 #endif
7541 static inline __ATTRS_o_ai __vector double
7542 vec_srab(__vector double __a, __vector signed long long __b) {
7543 return (__vector double)__builtin_s390_vsrab(
7544 (__vector unsigned char)__a, (__vector unsigned char)__b);
7547 static inline __ATTRS_o_ai __vector double
7548 vec_srab(__vector double __a, __vector unsigned long long __b) {
7549 return (__vector double)__builtin_s390_vsrab(
7550 (__vector unsigned char)__a, (__vector unsigned char)__b);
7553 /*-- vec_srl ----------------------------------------------------------------*/
7555 static inline __ATTRS_o_ai __vector signed char
7556 vec_srl(__vector signed char __a, __vector unsigned char __b) {
7557 return (__vector signed char)__builtin_s390_vsrl(
7558 (__vector unsigned char)__a, __b);
7561 // This prototype is deprecated.
7562 static inline __ATTRS_o_ai __vector signed char
7563 vec_srl(__vector signed char __a, __vector unsigned short __b) {
7564 return (__vector signed char)__builtin_s390_vsrl(
7565 (__vector unsigned char)__a, (__vector unsigned char)__b);
7568 // This prototype is deprecated.
7569 static inline __ATTRS_o_ai __vector signed char
7570 vec_srl(__vector signed char __a, __vector unsigned int __b) {
7571 return (__vector signed char)__builtin_s390_vsrl(
7572 (__vector unsigned char)__a, (__vector unsigned char)__b);
7575 // This prototype is deprecated.
7576 static inline __ATTRS_o_ai __vector __bool char
7577 vec_srl(__vector __bool char __a, __vector unsigned char __b) {
7578 return (__vector __bool char)__builtin_s390_vsrl(
7579 (__vector unsigned char)__a, __b);
7582 // This prototype is deprecated.
7583 static inline __ATTRS_o_ai __vector __bool char
7584 vec_srl(__vector __bool char __a, __vector unsigned short __b) {
7585 return (__vector __bool char)__builtin_s390_vsrl(
7586 (__vector unsigned char)__a, (__vector unsigned char)__b);
7589 // This prototype is deprecated.
7590 static inline __ATTRS_o_ai __vector __bool char
7591 vec_srl(__vector __bool char __a, __vector unsigned int __b) {
7592 return (__vector __bool char)__builtin_s390_vsrl(
7593 (__vector unsigned char)__a, (__vector unsigned char)__b);
7596 static inline __ATTRS_o_ai __vector unsigned char
7597 vec_srl(__vector unsigned char __a, __vector unsigned char __b) {
7598 return __builtin_s390_vsrl(__a, __b);
7601 // This prototype is deprecated.
7602 static inline __ATTRS_o_ai __vector unsigned char
7603 vec_srl(__vector unsigned char __a, __vector unsigned short __b) {
7604 return __builtin_s390_vsrl(__a, (__vector unsigned char)__b);
7607 // This prototype is deprecated.
7608 static inline __ATTRS_o_ai __vector unsigned char
7609 vec_srl(__vector unsigned char __a, __vector unsigned int __b) {
7610 return __builtin_s390_vsrl(__a, (__vector unsigned char)__b);
7613 static inline __ATTRS_o_ai __vector signed short
7614 vec_srl(__vector signed short __a, __vector unsigned char __b) {
7615 return (__vector signed short)__builtin_s390_vsrl(
7616 (__vector unsigned char)__a, __b);
7619 // This prototype is deprecated.
7620 static inline __ATTRS_o_ai __vector signed short
7621 vec_srl(__vector signed short __a, __vector unsigned short __b) {
7622 return (__vector signed short)__builtin_s390_vsrl(
7623 (__vector unsigned char)__a, (__vector unsigned char)__b);
7626 // This prototype is deprecated.
7627 static inline __ATTRS_o_ai __vector signed short
7628 vec_srl(__vector signed short __a, __vector unsigned int __b) {
7629 return (__vector signed short)__builtin_s390_vsrl(
7630 (__vector unsigned char)__a, (__vector unsigned char)__b);
7633 // This prototype is deprecated.
7634 static inline __ATTRS_o_ai __vector __bool short
7635 vec_srl(__vector __bool short __a, __vector unsigned char __b) {
7636 return (__vector __bool short)__builtin_s390_vsrl(
7637 (__vector unsigned char)__a, __b);
7640 // This prototype is deprecated.
7641 static inline __ATTRS_o_ai __vector __bool short
7642 vec_srl(__vector __bool short __a, __vector unsigned short __b) {
7643 return (__vector __bool short)__builtin_s390_vsrl(
7644 (__vector unsigned char)__a, (__vector unsigned char)__b);
7647 // This prototype is deprecated.
7648 static inline __ATTRS_o_ai __vector __bool short
7649 vec_srl(__vector __bool short __a, __vector unsigned int __b) {
7650 return (__vector __bool short)__builtin_s390_vsrl(
7651 (__vector unsigned char)__a, (__vector unsigned char)__b);
7654 static inline __ATTRS_o_ai __vector unsigned short
7655 vec_srl(__vector unsigned short __a, __vector unsigned char __b) {
7656 return (__vector unsigned short)__builtin_s390_vsrl(
7657 (__vector unsigned char)__a, __b);
7660 // This prototype is deprecated.
7661 static inline __ATTRS_o_ai __vector unsigned short
7662 vec_srl(__vector unsigned short __a, __vector unsigned short __b) {
7663 return (__vector unsigned short)__builtin_s390_vsrl(
7664 (__vector unsigned char)__a, (__vector unsigned char)__b);
7667 // This prototype is deprecated.
7668 static inline __ATTRS_o_ai __vector unsigned short
7669 vec_srl(__vector unsigned short __a, __vector unsigned int __b) {
7670 return (__vector unsigned short)__builtin_s390_vsrl(
7671 (__vector unsigned char)__a, (__vector unsigned char)__b);
7674 static inline __ATTRS_o_ai __vector signed int
7675 vec_srl(__vector signed int __a, __vector unsigned char __b) {
7676 return (__vector signed int)__builtin_s390_vsrl(
7677 (__vector unsigned char)__a, __b);
7680 // This prototype is deprecated.
7681 static inline __ATTRS_o_ai __vector signed int
7682 vec_srl(__vector signed int __a, __vector unsigned short __b) {
7683 return (__vector signed int)__builtin_s390_vsrl(
7684 (__vector unsigned char)__a, (__vector unsigned char)__b);
7687 // This prototype is deprecated.
7688 static inline __ATTRS_o_ai __vector signed int
7689 vec_srl(__vector signed int __a, __vector unsigned int __b) {
7690 return (__vector signed int)__builtin_s390_vsrl(
7691 (__vector unsigned char)__a, (__vector unsigned char)__b);
7694 // This prototype is deprecated.
7695 static inline __ATTRS_o_ai __vector __bool int
7696 vec_srl(__vector __bool int __a, __vector unsigned char __b) {
7697 return (__vector __bool int)__builtin_s390_vsrl(
7698 (__vector unsigned char)__a, __b);
7701 // This prototype is deprecated.
7702 static inline __ATTRS_o_ai __vector __bool int
7703 vec_srl(__vector __bool int __a, __vector unsigned short __b) {
7704 return (__vector __bool int)__builtin_s390_vsrl(
7705 (__vector unsigned char)__a, (__vector unsigned char)__b);
7708 // This prototype is deprecated.
7709 static inline __ATTRS_o_ai __vector __bool int
7710 vec_srl(__vector __bool int __a, __vector unsigned int __b) {
7711 return (__vector __bool int)__builtin_s390_vsrl(
7712 (__vector unsigned char)__a, (__vector unsigned char)__b);
7715 static inline __ATTRS_o_ai __vector unsigned int
7716 vec_srl(__vector unsigned int __a, __vector unsigned char __b) {
7717 return (__vector unsigned int)__builtin_s390_vsrl(
7718 (__vector unsigned char)__a, __b);
7721 // This prototype is deprecated.
7722 static inline __ATTRS_o_ai __vector unsigned int
7723 vec_srl(__vector unsigned int __a, __vector unsigned short __b) {
7724 return (__vector unsigned int)__builtin_s390_vsrl(
7725 (__vector unsigned char)__a, (__vector unsigned char)__b);
7728 // This prototype is deprecated.
7729 static inline __ATTRS_o_ai __vector unsigned int
7730 vec_srl(__vector unsigned int __a, __vector unsigned int __b) {
7731 return (__vector unsigned int)__builtin_s390_vsrl(
7732 (__vector unsigned char)__a, (__vector unsigned char)__b);
7735 static inline __ATTRS_o_ai __vector signed long long
7736 vec_srl(__vector signed long long __a, __vector unsigned char __b) {
7737 return (__vector signed long long)__builtin_s390_vsrl(
7738 (__vector unsigned char)__a, __b);
7741 // This prototype is deprecated.
7742 static inline __ATTRS_o_ai __vector signed long long
7743 vec_srl(__vector signed long long __a, __vector unsigned short __b) {
7744 return (__vector signed long long)__builtin_s390_vsrl(
7745 (__vector unsigned char)__a, (__vector unsigned char)__b);
7748 // This prototype is deprecated.
7749 static inline __ATTRS_o_ai __vector signed long long
7750 vec_srl(__vector signed long long __a, __vector unsigned int __b) {
7751 return (__vector signed long long)__builtin_s390_vsrl(
7752 (__vector unsigned char)__a, (__vector unsigned char)__b);
7755 // This prototype is deprecated.
7756 static inline __ATTRS_o_ai __vector __bool long long
7757 vec_srl(__vector __bool long long __a, __vector unsigned char __b) {
7758 return (__vector __bool long long)__builtin_s390_vsrl(
7759 (__vector unsigned char)__a, __b);
7762 // This prototype is deprecated.
7763 static inline __ATTRS_o_ai __vector __bool long long
7764 vec_srl(__vector __bool long long __a, __vector unsigned short __b) {
7765 return (__vector __bool long long)__builtin_s390_vsrl(
7766 (__vector unsigned char)__a, (__vector unsigned char)__b);
7769 // This prototype is deprecated.
7770 static inline __ATTRS_o_ai __vector __bool long long
7771 vec_srl(__vector __bool long long __a, __vector unsigned int __b) {
7772 return (__vector __bool long long)__builtin_s390_vsrl(
7773 (__vector unsigned char)__a, (__vector unsigned char)__b);
7776 static inline __ATTRS_o_ai __vector unsigned long long
7777 vec_srl(__vector unsigned long long __a, __vector unsigned char __b) {
7778 return (__vector unsigned long long)__builtin_s390_vsrl(
7779 (__vector unsigned char)__a, __b);
7782 // This prototype is deprecated.
7783 static inline __ATTRS_o_ai __vector unsigned long long
7784 vec_srl(__vector unsigned long long __a, __vector unsigned short __b) {
7785 return (__vector unsigned long long)__builtin_s390_vsrl(
7786 (__vector unsigned char)__a, (__vector unsigned char)__b);
7789 // This prototype is deprecated.
7790 static inline __ATTRS_o_ai __vector unsigned long long
7791 vec_srl(__vector unsigned long long __a, __vector unsigned int __b) {
7792 return (__vector unsigned long long)__builtin_s390_vsrl(
7793 (__vector unsigned char)__a, (__vector unsigned char)__b);
7796 /*-- vec_srb ----------------------------------------------------------------*/
7798 static inline __ATTRS_o_ai __vector signed char
7799 vec_srb(__vector signed char __a, __vector signed char __b) {
7800 return (__vector signed char)__builtin_s390_vsrlb(
7801 (__vector unsigned char)__a, (__vector unsigned char)__b);
7804 static inline __ATTRS_o_ai __vector signed char
7805 vec_srb(__vector signed char __a, __vector unsigned char __b) {
7806 return (__vector signed char)__builtin_s390_vsrlb(
7807 (__vector unsigned char)__a, __b);
7810 static inline __ATTRS_o_ai __vector unsigned char
7811 vec_srb(__vector unsigned char __a, __vector signed char __b) {
7812 return __builtin_s390_vsrlb(__a, (__vector unsigned char)__b);
7815 static inline __ATTRS_o_ai __vector unsigned char
7816 vec_srb(__vector unsigned char __a, __vector unsigned char __b) {
7817 return __builtin_s390_vsrlb(__a, __b);
7820 static inline __ATTRS_o_ai __vector signed short
7821 vec_srb(__vector signed short __a, __vector signed short __b) {
7822 return (__vector signed short)__builtin_s390_vsrlb(
7823 (__vector unsigned char)__a, (__vector unsigned char)__b);
7826 static inline __ATTRS_o_ai __vector signed short
7827 vec_srb(__vector signed short __a, __vector unsigned short __b) {
7828 return (__vector signed short)__builtin_s390_vsrlb(
7829 (__vector unsigned char)__a, (__vector unsigned char)__b);
7832 static inline __ATTRS_o_ai __vector unsigned short
7833 vec_srb(__vector unsigned short __a, __vector signed short __b) {
7834 return (__vector unsigned short)__builtin_s390_vsrlb(
7835 (__vector unsigned char)__a, (__vector unsigned char)__b);
7838 static inline __ATTRS_o_ai __vector unsigned short
7839 vec_srb(__vector unsigned short __a, __vector unsigned short __b) {
7840 return (__vector unsigned short)__builtin_s390_vsrlb(
7841 (__vector unsigned char)__a, (__vector unsigned char)__b);
7844 static inline __ATTRS_o_ai __vector signed int
7845 vec_srb(__vector signed int __a, __vector signed int __b) {
7846 return (__vector signed int)__builtin_s390_vsrlb(
7847 (__vector unsigned char)__a, (__vector unsigned char)__b);
7850 static inline __ATTRS_o_ai __vector signed int
7851 vec_srb(__vector signed int __a, __vector unsigned int __b) {
7852 return (__vector signed int)__builtin_s390_vsrlb(
7853 (__vector unsigned char)__a, (__vector unsigned char)__b);
7856 static inline __ATTRS_o_ai __vector unsigned int
7857 vec_srb(__vector unsigned int __a, __vector signed int __b) {
7858 return (__vector unsigned int)__builtin_s390_vsrlb(
7859 (__vector unsigned char)__a, (__vector unsigned char)__b);
7862 static inline __ATTRS_o_ai __vector unsigned int
7863 vec_srb(__vector unsigned int __a, __vector unsigned int __b) {
7864 return (__vector unsigned int)__builtin_s390_vsrlb(
7865 (__vector unsigned char)__a, (__vector unsigned char)__b);
7868 static inline __ATTRS_o_ai __vector signed long long
7869 vec_srb(__vector signed long long __a, __vector signed long long __b) {
7870 return (__vector signed long long)__builtin_s390_vsrlb(
7871 (__vector unsigned char)__a, (__vector unsigned char)__b);
7874 static inline __ATTRS_o_ai __vector signed long long
7875 vec_srb(__vector signed long long __a, __vector unsigned long long __b) {
7876 return (__vector signed long long)__builtin_s390_vsrlb(
7877 (__vector unsigned char)__a, (__vector unsigned char)__b);
7880 static inline __ATTRS_o_ai __vector unsigned long long
7881 vec_srb(__vector unsigned long long __a, __vector signed long long __b) {
7882 return (__vector unsigned long long)__builtin_s390_vsrlb(
7883 (__vector unsigned char)__a, (__vector unsigned char)__b);
7886 static inline __ATTRS_o_ai __vector unsigned long long
7887 vec_srb(__vector unsigned long long __a, __vector unsigned long long __b) {
7888 return (__vector unsigned long long)__builtin_s390_vsrlb(
7889 (__vector unsigned char)__a, (__vector unsigned char)__b);
7892 #if __ARCH__ >= 12
7893 static inline __ATTRS_o_ai __vector float
7894 vec_srb(__vector float __a, __vector signed int __b) {
7895 return (__vector float)__builtin_s390_vsrlb(
7896 (__vector unsigned char)__a, (__vector unsigned char)__b);
7899 static inline __ATTRS_o_ai __vector float
7900 vec_srb(__vector float __a, __vector unsigned int __b) {
7901 return (__vector float)__builtin_s390_vsrlb(
7902 (__vector unsigned char)__a, (__vector unsigned char)__b);
7904 #endif
7906 static inline __ATTRS_o_ai __vector double
7907 vec_srb(__vector double __a, __vector signed long long __b) {
7908 return (__vector double)__builtin_s390_vsrlb(
7909 (__vector unsigned char)__a, (__vector unsigned char)__b);
7912 static inline __ATTRS_o_ai __vector double
7913 vec_srb(__vector double __a, __vector unsigned long long __b) {
7914 return (__vector double)__builtin_s390_vsrlb(
7915 (__vector unsigned char)__a, (__vector unsigned char)__b);
7918 /*-- vec_srdb ---------------------------------------------------------------*/
7920 #if __ARCH__ >= 13
7922 extern __ATTRS_o __vector signed char
7923 vec_srdb(__vector signed char __a, __vector signed char __b, int __c)
7924 __constant_range(__c, 0, 7);
7926 extern __ATTRS_o __vector unsigned char
7927 vec_srdb(__vector unsigned char __a, __vector unsigned char __b, int __c)
7928 __constant_range(__c, 0, 7);
7930 extern __ATTRS_o __vector signed short
7931 vec_srdb(__vector signed short __a, __vector signed short __b, int __c)
7932 __constant_range(__c, 0, 7);
7934 extern __ATTRS_o __vector unsigned short
7935 vec_srdb(__vector unsigned short __a, __vector unsigned short __b, int __c)
7936 __constant_range(__c, 0, 7);
7938 extern __ATTRS_o __vector signed int
7939 vec_srdb(__vector signed int __a, __vector signed int __b, int __c)
7940 __constant_range(__c, 0, 7);
7942 extern __ATTRS_o __vector unsigned int
7943 vec_srdb(__vector unsigned int __a, __vector unsigned int __b, int __c)
7944 __constant_range(__c, 0, 7);
7946 extern __ATTRS_o __vector signed long long
7947 vec_srdb(__vector signed long long __a, __vector signed long long __b, int __c)
7948 __constant_range(__c, 0, 7);
7950 extern __ATTRS_o __vector unsigned long long
7951 vec_srdb(__vector unsigned long long __a, __vector unsigned long long __b,
7952 int __c)
7953 __constant_range(__c, 0, 7);
7955 extern __ATTRS_o __vector float
7956 vec_srdb(__vector float __a, __vector float __b, int __c)
7957 __constant_range(__c, 0, 7);
7959 extern __ATTRS_o __vector double
7960 vec_srdb(__vector double __a, __vector double __b, int __c)
7961 __constant_range(__c, 0, 7);
7963 #define vec_srdb(X, Y, Z) ((__typeof__((vec_srdb)((X), (Y), (Z)))) \
7964 __builtin_s390_vsrd((__vector unsigned char)(X), \
7965 (__vector unsigned char)(Y), (Z)))
7967 #endif
7969 /*-- vec_abs ----------------------------------------------------------------*/
7971 static inline __ATTRS_o_ai __vector signed char
7972 vec_abs(__vector signed char __a) {
7973 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed char)0));
7976 static inline __ATTRS_o_ai __vector signed short
7977 vec_abs(__vector signed short __a) {
7978 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed short)0));
7981 static inline __ATTRS_o_ai __vector signed int
7982 vec_abs(__vector signed int __a) {
7983 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed int)0));
7986 static inline __ATTRS_o_ai __vector signed long long
7987 vec_abs(__vector signed long long __a) {
7988 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed long long)0));
7991 #if __ARCH__ >= 12
7992 static inline __ATTRS_o_ai __vector float
7993 vec_abs(__vector float __a) {
7994 return __builtin_s390_vflpsb(__a);
7996 #endif
7998 static inline __ATTRS_o_ai __vector double
7999 vec_abs(__vector double __a) {
8000 return __builtin_s390_vflpdb(__a);
8003 /*-- vec_nabs ---------------------------------------------------------------*/
8005 #if __ARCH__ >= 12
8006 static inline __ATTRS_o_ai __vector float
8007 vec_nabs(__vector float __a) {
8008 return __builtin_s390_vflnsb(__a);
8010 #endif
8012 static inline __ATTRS_o_ai __vector double
8013 vec_nabs(__vector double __a) {
8014 return __builtin_s390_vflndb(__a);
8017 /*-- vec_max ----------------------------------------------------------------*/
8019 static inline __ATTRS_o_ai __vector signed char
8020 vec_max(__vector signed char __a, __vector signed char __b) {
8021 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8024 // This prototype is deprecated.
8025 static inline __ATTRS_o_ai __vector signed char
8026 vec_max(__vector signed char __a, __vector __bool char __b) {
8027 __vector signed char __bc = (__vector signed char)__b;
8028 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8031 // This prototype is deprecated.
8032 static inline __ATTRS_o_ai __vector signed char
8033 vec_max(__vector __bool char __a, __vector signed char __b) {
8034 __vector signed char __ac = (__vector signed char)__a;
8035 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8038 static inline __ATTRS_o_ai __vector unsigned char
8039 vec_max(__vector unsigned char __a, __vector unsigned char __b) {
8040 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8043 // This prototype is deprecated.
8044 static inline __ATTRS_o_ai __vector unsigned char
8045 vec_max(__vector unsigned char __a, __vector __bool char __b) {
8046 __vector unsigned char __bc = (__vector unsigned char)__b;
8047 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8050 // This prototype is deprecated.
8051 static inline __ATTRS_o_ai __vector unsigned char
8052 vec_max(__vector __bool char __a, __vector unsigned char __b) {
8053 __vector unsigned char __ac = (__vector unsigned char)__a;
8054 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8057 static inline __ATTRS_o_ai __vector signed short
8058 vec_max(__vector signed short __a, __vector signed short __b) {
8059 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8062 // This prototype is deprecated.
8063 static inline __ATTRS_o_ai __vector signed short
8064 vec_max(__vector signed short __a, __vector __bool short __b) {
8065 __vector signed short __bc = (__vector signed short)__b;
8066 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8069 // This prototype is deprecated.
8070 static inline __ATTRS_o_ai __vector signed short
8071 vec_max(__vector __bool short __a, __vector signed short __b) {
8072 __vector signed short __ac = (__vector signed short)__a;
8073 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8076 static inline __ATTRS_o_ai __vector unsigned short
8077 vec_max(__vector unsigned short __a, __vector unsigned short __b) {
8078 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8081 // This prototype is deprecated.
8082 static inline __ATTRS_o_ai __vector unsigned short
8083 vec_max(__vector unsigned short __a, __vector __bool short __b) {
8084 __vector unsigned short __bc = (__vector unsigned short)__b;
8085 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8088 // This prototype is deprecated.
8089 static inline __ATTRS_o_ai __vector unsigned short
8090 vec_max(__vector __bool short __a, __vector unsigned short __b) {
8091 __vector unsigned short __ac = (__vector unsigned short)__a;
8092 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8095 static inline __ATTRS_o_ai __vector signed int
8096 vec_max(__vector signed int __a, __vector signed int __b) {
8097 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8100 // This prototype is deprecated.
8101 static inline __ATTRS_o_ai __vector signed int
8102 vec_max(__vector signed int __a, __vector __bool int __b) {
8103 __vector signed int __bc = (__vector signed int)__b;
8104 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8107 // This prototype is deprecated.
8108 static inline __ATTRS_o_ai __vector signed int
8109 vec_max(__vector __bool int __a, __vector signed int __b) {
8110 __vector signed int __ac = (__vector signed int)__a;
8111 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8114 static inline __ATTRS_o_ai __vector unsigned int
8115 vec_max(__vector unsigned int __a, __vector unsigned int __b) {
8116 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8119 // This prototype is deprecated.
8120 static inline __ATTRS_o_ai __vector unsigned int
8121 vec_max(__vector unsigned int __a, __vector __bool int __b) {
8122 __vector unsigned int __bc = (__vector unsigned int)__b;
8123 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8126 // This prototype is deprecated.
8127 static inline __ATTRS_o_ai __vector unsigned int
8128 vec_max(__vector __bool int __a, __vector unsigned int __b) {
8129 __vector unsigned int __ac = (__vector unsigned int)__a;
8130 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8133 static inline __ATTRS_o_ai __vector signed long long
8134 vec_max(__vector signed long long __a, __vector signed long long __b) {
8135 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8138 // This prototype is deprecated.
8139 static inline __ATTRS_o_ai __vector signed long long
8140 vec_max(__vector signed long long __a, __vector __bool long long __b) {
8141 __vector signed long long __bc = (__vector signed long long)__b;
8142 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8145 // This prototype is deprecated.
8146 static inline __ATTRS_o_ai __vector signed long long
8147 vec_max(__vector __bool long long __a, __vector signed long long __b) {
8148 __vector signed long long __ac = (__vector signed long long)__a;
8149 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8152 static inline __ATTRS_o_ai __vector unsigned long long
8153 vec_max(__vector unsigned long long __a, __vector unsigned long long __b) {
8154 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8157 // This prototype is deprecated.
8158 static inline __ATTRS_o_ai __vector unsigned long long
8159 vec_max(__vector unsigned long long __a, __vector __bool long long __b) {
8160 __vector unsigned long long __bc = (__vector unsigned long long)__b;
8161 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8164 // This prototype is deprecated.
8165 static inline __ATTRS_o_ai __vector unsigned long long
8166 vec_max(__vector __bool long long __a, __vector unsigned long long __b) {
8167 __vector unsigned long long __ac = (__vector unsigned long long)__a;
8168 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8171 #if __ARCH__ >= 12
8172 static inline __ATTRS_o_ai __vector float
8173 vec_max(__vector float __a, __vector float __b) {
8174 return __builtin_s390_vfmaxsb(__a, __b, 0);
8176 #endif
8178 static inline __ATTRS_o_ai __vector double
8179 vec_max(__vector double __a, __vector double __b) {
8180 #if __ARCH__ >= 12
8181 return __builtin_s390_vfmaxdb(__a, __b, 0);
8182 #else
8183 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8184 #endif
8187 /*-- vec_min ----------------------------------------------------------------*/
8189 static inline __ATTRS_o_ai __vector signed char
8190 vec_min(__vector signed char __a, __vector signed char __b) {
8191 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8194 // This prototype is deprecated.
8195 static inline __ATTRS_o_ai __vector signed char
8196 vec_min(__vector signed char __a, __vector __bool char __b) {
8197 __vector signed char __bc = (__vector signed char)__b;
8198 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8201 // This prototype is deprecated.
8202 static inline __ATTRS_o_ai __vector signed char
8203 vec_min(__vector __bool char __a, __vector signed char __b) {
8204 __vector signed char __ac = (__vector signed char)__a;
8205 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8208 static inline __ATTRS_o_ai __vector unsigned char
8209 vec_min(__vector unsigned char __a, __vector unsigned char __b) {
8210 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8213 // This prototype is deprecated.
8214 static inline __ATTRS_o_ai __vector unsigned char
8215 vec_min(__vector unsigned char __a, __vector __bool char __b) {
8216 __vector unsigned char __bc = (__vector unsigned char)__b;
8217 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8220 // This prototype is deprecated.
8221 static inline __ATTRS_o_ai __vector unsigned char
8222 vec_min(__vector __bool char __a, __vector unsigned char __b) {
8223 __vector unsigned char __ac = (__vector unsigned char)__a;
8224 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8227 static inline __ATTRS_o_ai __vector signed short
8228 vec_min(__vector signed short __a, __vector signed short __b) {
8229 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8232 // This prototype is deprecated.
8233 static inline __ATTRS_o_ai __vector signed short
8234 vec_min(__vector signed short __a, __vector __bool short __b) {
8235 __vector signed short __bc = (__vector signed short)__b;
8236 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8239 // This prototype is deprecated.
8240 static inline __ATTRS_o_ai __vector signed short
8241 vec_min(__vector __bool short __a, __vector signed short __b) {
8242 __vector signed short __ac = (__vector signed short)__a;
8243 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8246 static inline __ATTRS_o_ai __vector unsigned short
8247 vec_min(__vector unsigned short __a, __vector unsigned short __b) {
8248 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8251 // This prototype is deprecated.
8252 static inline __ATTRS_o_ai __vector unsigned short
8253 vec_min(__vector unsigned short __a, __vector __bool short __b) {
8254 __vector unsigned short __bc = (__vector unsigned short)__b;
8255 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8258 // This prototype is deprecated.
8259 static inline __ATTRS_o_ai __vector unsigned short
8260 vec_min(__vector __bool short __a, __vector unsigned short __b) {
8261 __vector unsigned short __ac = (__vector unsigned short)__a;
8262 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8265 static inline __ATTRS_o_ai __vector signed int
8266 vec_min(__vector signed int __a, __vector signed int __b) {
8267 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8270 // This prototype is deprecated.
8271 static inline __ATTRS_o_ai __vector signed int
8272 vec_min(__vector signed int __a, __vector __bool int __b) {
8273 __vector signed int __bc = (__vector signed int)__b;
8274 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8277 // This prototype is deprecated.
8278 static inline __ATTRS_o_ai __vector signed int
8279 vec_min(__vector __bool int __a, __vector signed int __b) {
8280 __vector signed int __ac = (__vector signed int)__a;
8281 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8284 static inline __ATTRS_o_ai __vector unsigned int
8285 vec_min(__vector unsigned int __a, __vector unsigned int __b) {
8286 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8289 // This prototype is deprecated.
8290 static inline __ATTRS_o_ai __vector unsigned int
8291 vec_min(__vector unsigned int __a, __vector __bool int __b) {
8292 __vector unsigned int __bc = (__vector unsigned int)__b;
8293 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8296 // This prototype is deprecated.
8297 static inline __ATTRS_o_ai __vector unsigned int
8298 vec_min(__vector __bool int __a, __vector unsigned int __b) {
8299 __vector unsigned int __ac = (__vector unsigned int)__a;
8300 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8303 static inline __ATTRS_o_ai __vector signed long long
8304 vec_min(__vector signed long long __a, __vector signed long long __b) {
8305 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8308 // This prototype is deprecated.
8309 static inline __ATTRS_o_ai __vector signed long long
8310 vec_min(__vector signed long long __a, __vector __bool long long __b) {
8311 __vector signed long long __bc = (__vector signed long long)__b;
8312 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8315 // This prototype is deprecated.
8316 static inline __ATTRS_o_ai __vector signed long long
8317 vec_min(__vector __bool long long __a, __vector signed long long __b) {
8318 __vector signed long long __ac = (__vector signed long long)__a;
8319 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8322 static inline __ATTRS_o_ai __vector unsigned long long
8323 vec_min(__vector unsigned long long __a, __vector unsigned long long __b) {
8324 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8327 // This prototype is deprecated.
8328 static inline __ATTRS_o_ai __vector unsigned long long
8329 vec_min(__vector unsigned long long __a, __vector __bool long long __b) {
8330 __vector unsigned long long __bc = (__vector unsigned long long)__b;
8331 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8334 // This prototype is deprecated.
8335 static inline __ATTRS_o_ai __vector unsigned long long
8336 vec_min(__vector __bool long long __a, __vector unsigned long long __b) {
8337 __vector unsigned long long __ac = (__vector unsigned long long)__a;
8338 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8341 #if __ARCH__ >= 12
8342 static inline __ATTRS_o_ai __vector float
8343 vec_min(__vector float __a, __vector float __b) {
8344 return __builtin_s390_vfminsb(__a, __b, 0);
8346 #endif
8348 static inline __ATTRS_o_ai __vector double
8349 vec_min(__vector double __a, __vector double __b) {
8350 #if __ARCH__ >= 12
8351 return __builtin_s390_vfmindb(__a, __b, 0);
8352 #else
8353 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8354 #endif
8357 /*-- vec_add_u128 -----------------------------------------------------------*/
8359 static inline __ATTRS_ai __vector unsigned char
8360 vec_add_u128(__vector unsigned char __a, __vector unsigned char __b) {
8361 return __builtin_s390_vaq(__a, __b);
8364 /*-- vec_addc ---------------------------------------------------------------*/
8366 static inline __ATTRS_o_ai __vector unsigned char
8367 vec_addc(__vector unsigned char __a, __vector unsigned char __b) {
8368 return __builtin_s390_vaccb(__a, __b);
8371 static inline __ATTRS_o_ai __vector unsigned short
8372 vec_addc(__vector unsigned short __a, __vector unsigned short __b) {
8373 return __builtin_s390_vacch(__a, __b);
8376 static inline __ATTRS_o_ai __vector unsigned int
8377 vec_addc(__vector unsigned int __a, __vector unsigned int __b) {
8378 return __builtin_s390_vaccf(__a, __b);
8381 static inline __ATTRS_o_ai __vector unsigned long long
8382 vec_addc(__vector unsigned long long __a, __vector unsigned long long __b) {
8383 return __builtin_s390_vaccg(__a, __b);
8386 /*-- vec_addc_u128 ----------------------------------------------------------*/
8388 static inline __ATTRS_ai __vector unsigned char
8389 vec_addc_u128(__vector unsigned char __a, __vector unsigned char __b) {
8390 return __builtin_s390_vaccq(__a, __b);
8393 /*-- vec_adde_u128 ----------------------------------------------------------*/
8395 static inline __ATTRS_ai __vector unsigned char
8396 vec_adde_u128(__vector unsigned char __a, __vector unsigned char __b,
8397 __vector unsigned char __c) {
8398 return __builtin_s390_vacq(__a, __b, __c);
8401 /*-- vec_addec_u128 ---------------------------------------------------------*/
8403 static inline __ATTRS_ai __vector unsigned char
8404 vec_addec_u128(__vector unsigned char __a, __vector unsigned char __b,
8405 __vector unsigned char __c) {
8406 return __builtin_s390_vacccq(__a, __b, __c);
8409 /*-- vec_avg ----------------------------------------------------------------*/
8411 static inline __ATTRS_o_ai __vector signed char
8412 vec_avg(__vector signed char __a, __vector signed char __b) {
8413 return __builtin_s390_vavgb(__a, __b);
8416 static inline __ATTRS_o_ai __vector signed short
8417 vec_avg(__vector signed short __a, __vector signed short __b) {
8418 return __builtin_s390_vavgh(__a, __b);
8421 static inline __ATTRS_o_ai __vector signed int
8422 vec_avg(__vector signed int __a, __vector signed int __b) {
8423 return __builtin_s390_vavgf(__a, __b);
8426 static inline __ATTRS_o_ai __vector signed long long
8427 vec_avg(__vector signed long long __a, __vector signed long long __b) {
8428 return __builtin_s390_vavgg(__a, __b);
8431 static inline __ATTRS_o_ai __vector unsigned char
8432 vec_avg(__vector unsigned char __a, __vector unsigned char __b) {
8433 return __builtin_s390_vavglb(__a, __b);
8436 static inline __ATTRS_o_ai __vector unsigned short
8437 vec_avg(__vector unsigned short __a, __vector unsigned short __b) {
8438 return __builtin_s390_vavglh(__a, __b);
8441 static inline __ATTRS_o_ai __vector unsigned int
8442 vec_avg(__vector unsigned int __a, __vector unsigned int __b) {
8443 return __builtin_s390_vavglf(__a, __b);
8446 static inline __ATTRS_o_ai __vector unsigned long long
8447 vec_avg(__vector unsigned long long __a, __vector unsigned long long __b) {
8448 return __builtin_s390_vavglg(__a, __b);
8451 /*-- vec_checksum -----------------------------------------------------------*/
8453 static inline __ATTRS_ai __vector unsigned int
8454 vec_checksum(__vector unsigned int __a, __vector unsigned int __b) {
8455 return __builtin_s390_vcksm(__a, __b);
8458 /*-- vec_gfmsum -------------------------------------------------------------*/
8460 static inline __ATTRS_o_ai __vector unsigned short
8461 vec_gfmsum(__vector unsigned char __a, __vector unsigned char __b) {
8462 return __builtin_s390_vgfmb(__a, __b);
8465 static inline __ATTRS_o_ai __vector unsigned int
8466 vec_gfmsum(__vector unsigned short __a, __vector unsigned short __b) {
8467 return __builtin_s390_vgfmh(__a, __b);
8470 static inline __ATTRS_o_ai __vector unsigned long long
8471 vec_gfmsum(__vector unsigned int __a, __vector unsigned int __b) {
8472 return __builtin_s390_vgfmf(__a, __b);
8475 /*-- vec_gfmsum_128 ---------------------------------------------------------*/
8477 static inline __ATTRS_o_ai __vector unsigned char
8478 vec_gfmsum_128(__vector unsigned long long __a,
8479 __vector unsigned long long __b) {
8480 return __builtin_s390_vgfmg(__a, __b);
8483 /*-- vec_gfmsum_accum -------------------------------------------------------*/
8485 static inline __ATTRS_o_ai __vector unsigned short
8486 vec_gfmsum_accum(__vector unsigned char __a, __vector unsigned char __b,
8487 __vector unsigned short __c) {
8488 return __builtin_s390_vgfmab(__a, __b, __c);
8491 static inline __ATTRS_o_ai __vector unsigned int
8492 vec_gfmsum_accum(__vector unsigned short __a, __vector unsigned short __b,
8493 __vector unsigned int __c) {
8494 return __builtin_s390_vgfmah(__a, __b, __c);
8497 static inline __ATTRS_o_ai __vector unsigned long long
8498 vec_gfmsum_accum(__vector unsigned int __a, __vector unsigned int __b,
8499 __vector unsigned long long __c) {
8500 return __builtin_s390_vgfmaf(__a, __b, __c);
8503 /*-- vec_gfmsum_accum_128 ---------------------------------------------------*/
8505 static inline __ATTRS_o_ai __vector unsigned char
8506 vec_gfmsum_accum_128(__vector unsigned long long __a,
8507 __vector unsigned long long __b,
8508 __vector unsigned char __c) {
8509 return __builtin_s390_vgfmag(__a, __b, __c);
8512 /*-- vec_mladd --------------------------------------------------------------*/
8514 static inline __ATTRS_o_ai __vector signed char
8515 vec_mladd(__vector signed char __a, __vector signed char __b,
8516 __vector signed char __c) {
8517 return __a * __b + __c;
8520 static inline __ATTRS_o_ai __vector signed char
8521 vec_mladd(__vector unsigned char __a, __vector signed char __b,
8522 __vector signed char __c) {
8523 return (__vector signed char)__a * __b + __c;
8526 static inline __ATTRS_o_ai __vector signed char
8527 vec_mladd(__vector signed char __a, __vector unsigned char __b,
8528 __vector unsigned char __c) {
8529 return __a * (__vector signed char)__b + (__vector signed char)__c;
8532 static inline __ATTRS_o_ai __vector unsigned char
8533 vec_mladd(__vector unsigned char __a, __vector unsigned char __b,
8534 __vector unsigned char __c) {
8535 return __a * __b + __c;
8538 static inline __ATTRS_o_ai __vector signed short
8539 vec_mladd(__vector signed short __a, __vector signed short __b,
8540 __vector signed short __c) {
8541 return __a * __b + __c;
8544 static inline __ATTRS_o_ai __vector signed short
8545 vec_mladd(__vector unsigned short __a, __vector signed short __b,
8546 __vector signed short __c) {
8547 return (__vector signed short)__a * __b + __c;
8550 static inline __ATTRS_o_ai __vector signed short
8551 vec_mladd(__vector signed short __a, __vector unsigned short __b,
8552 __vector unsigned short __c) {
8553 return __a * (__vector signed short)__b + (__vector signed short)__c;
8556 static inline __ATTRS_o_ai __vector unsigned short
8557 vec_mladd(__vector unsigned short __a, __vector unsigned short __b,
8558 __vector unsigned short __c) {
8559 return __a * __b + __c;
8562 static inline __ATTRS_o_ai __vector signed int
8563 vec_mladd(__vector signed int __a, __vector signed int __b,
8564 __vector signed int __c) {
8565 return __a * __b + __c;
8568 static inline __ATTRS_o_ai __vector signed int
8569 vec_mladd(__vector unsigned int __a, __vector signed int __b,
8570 __vector signed int __c) {
8571 return (__vector signed int)__a * __b + __c;
8574 static inline __ATTRS_o_ai __vector signed int
8575 vec_mladd(__vector signed int __a, __vector unsigned int __b,
8576 __vector unsigned int __c) {
8577 return __a * (__vector signed int)__b + (__vector signed int)__c;
8580 static inline __ATTRS_o_ai __vector unsigned int
8581 vec_mladd(__vector unsigned int __a, __vector unsigned int __b,
8582 __vector unsigned int __c) {
8583 return __a * __b + __c;
8586 /*-- vec_mhadd --------------------------------------------------------------*/
8588 static inline __ATTRS_o_ai __vector signed char
8589 vec_mhadd(__vector signed char __a, __vector signed char __b,
8590 __vector signed char __c) {
8591 return __builtin_s390_vmahb(__a, __b, __c);
8594 static inline __ATTRS_o_ai __vector unsigned char
8595 vec_mhadd(__vector unsigned char __a, __vector unsigned char __b,
8596 __vector unsigned char __c) {
8597 return __builtin_s390_vmalhb(__a, __b, __c);
8600 static inline __ATTRS_o_ai __vector signed short
8601 vec_mhadd(__vector signed short __a, __vector signed short __b,
8602 __vector signed short __c) {
8603 return __builtin_s390_vmahh(__a, __b, __c);
8606 static inline __ATTRS_o_ai __vector unsigned short
8607 vec_mhadd(__vector unsigned short __a, __vector unsigned short __b,
8608 __vector unsigned short __c) {
8609 return __builtin_s390_vmalhh(__a, __b, __c);
8612 static inline __ATTRS_o_ai __vector signed int
8613 vec_mhadd(__vector signed int __a, __vector signed int __b,
8614 __vector signed int __c) {
8615 return __builtin_s390_vmahf(__a, __b, __c);
8618 static inline __ATTRS_o_ai __vector unsigned int
8619 vec_mhadd(__vector unsigned int __a, __vector unsigned int __b,
8620 __vector unsigned int __c) {
8621 return __builtin_s390_vmalhf(__a, __b, __c);
8624 /*-- vec_meadd --------------------------------------------------------------*/
8626 static inline __ATTRS_o_ai __vector signed short
8627 vec_meadd(__vector signed char __a, __vector signed char __b,
8628 __vector signed short __c) {
8629 return __builtin_s390_vmaeb(__a, __b, __c);
8632 static inline __ATTRS_o_ai __vector unsigned short
8633 vec_meadd(__vector unsigned char __a, __vector unsigned char __b,
8634 __vector unsigned short __c) {
8635 return __builtin_s390_vmaleb(__a, __b, __c);
8638 static inline __ATTRS_o_ai __vector signed int
8639 vec_meadd(__vector signed short __a, __vector signed short __b,
8640 __vector signed int __c) {
8641 return __builtin_s390_vmaeh(__a, __b, __c);
8644 static inline __ATTRS_o_ai __vector unsigned int
8645 vec_meadd(__vector unsigned short __a, __vector unsigned short __b,
8646 __vector unsigned int __c) {
8647 return __builtin_s390_vmaleh(__a, __b, __c);
8650 static inline __ATTRS_o_ai __vector signed long long
8651 vec_meadd(__vector signed int __a, __vector signed int __b,
8652 __vector signed long long __c) {
8653 return __builtin_s390_vmaef(__a, __b, __c);
8656 static inline __ATTRS_o_ai __vector unsigned long long
8657 vec_meadd(__vector unsigned int __a, __vector unsigned int __b,
8658 __vector unsigned long long __c) {
8659 return __builtin_s390_vmalef(__a, __b, __c);
8662 /*-- vec_moadd --------------------------------------------------------------*/
8664 static inline __ATTRS_o_ai __vector signed short
8665 vec_moadd(__vector signed char __a, __vector signed char __b,
8666 __vector signed short __c) {
8667 return __builtin_s390_vmaob(__a, __b, __c);
8670 static inline __ATTRS_o_ai __vector unsigned short
8671 vec_moadd(__vector unsigned char __a, __vector unsigned char __b,
8672 __vector unsigned short __c) {
8673 return __builtin_s390_vmalob(__a, __b, __c);
8676 static inline __ATTRS_o_ai __vector signed int
8677 vec_moadd(__vector signed short __a, __vector signed short __b,
8678 __vector signed int __c) {
8679 return __builtin_s390_vmaoh(__a, __b, __c);
8682 static inline __ATTRS_o_ai __vector unsigned int
8683 vec_moadd(__vector unsigned short __a, __vector unsigned short __b,
8684 __vector unsigned int __c) {
8685 return __builtin_s390_vmaloh(__a, __b, __c);
8688 static inline __ATTRS_o_ai __vector signed long long
8689 vec_moadd(__vector signed int __a, __vector signed int __b,
8690 __vector signed long long __c) {
8691 return __builtin_s390_vmaof(__a, __b, __c);
8694 static inline __ATTRS_o_ai __vector unsigned long long
8695 vec_moadd(__vector unsigned int __a, __vector unsigned int __b,
8696 __vector unsigned long long __c) {
8697 return __builtin_s390_vmalof(__a, __b, __c);
8700 /*-- vec_mulh ---------------------------------------------------------------*/
8702 static inline __ATTRS_o_ai __vector signed char
8703 vec_mulh(__vector signed char __a, __vector signed char __b) {
8704 return __builtin_s390_vmhb(__a, __b);
8707 static inline __ATTRS_o_ai __vector unsigned char
8708 vec_mulh(__vector unsigned char __a, __vector unsigned char __b) {
8709 return __builtin_s390_vmlhb(__a, __b);
8712 static inline __ATTRS_o_ai __vector signed short
8713 vec_mulh(__vector signed short __a, __vector signed short __b) {
8714 return __builtin_s390_vmhh(__a, __b);
8717 static inline __ATTRS_o_ai __vector unsigned short
8718 vec_mulh(__vector unsigned short __a, __vector unsigned short __b) {
8719 return __builtin_s390_vmlhh(__a, __b);
8722 static inline __ATTRS_o_ai __vector signed int
8723 vec_mulh(__vector signed int __a, __vector signed int __b) {
8724 return __builtin_s390_vmhf(__a, __b);
8727 static inline __ATTRS_o_ai __vector unsigned int
8728 vec_mulh(__vector unsigned int __a, __vector unsigned int __b) {
8729 return __builtin_s390_vmlhf(__a, __b);
8732 /*-- vec_mule ---------------------------------------------------------------*/
8734 static inline __ATTRS_o_ai __vector signed short
8735 vec_mule(__vector signed char __a, __vector signed char __b) {
8736 return __builtin_s390_vmeb(__a, __b);
8739 static inline __ATTRS_o_ai __vector unsigned short
8740 vec_mule(__vector unsigned char __a, __vector unsigned char __b) {
8741 return __builtin_s390_vmleb(__a, __b);
8744 static inline __ATTRS_o_ai __vector signed int
8745 vec_mule(__vector signed short __a, __vector signed short __b) {
8746 return __builtin_s390_vmeh(__a, __b);
8749 static inline __ATTRS_o_ai __vector unsigned int
8750 vec_mule(__vector unsigned short __a, __vector unsigned short __b) {
8751 return __builtin_s390_vmleh(__a, __b);
8754 static inline __ATTRS_o_ai __vector signed long long
8755 vec_mule(__vector signed int __a, __vector signed int __b) {
8756 return __builtin_s390_vmef(__a, __b);
8759 static inline __ATTRS_o_ai __vector unsigned long long
8760 vec_mule(__vector unsigned int __a, __vector unsigned int __b) {
8761 return __builtin_s390_vmlef(__a, __b);
8764 /*-- vec_mulo ---------------------------------------------------------------*/
8766 static inline __ATTRS_o_ai __vector signed short
8767 vec_mulo(__vector signed char __a, __vector signed char __b) {
8768 return __builtin_s390_vmob(__a, __b);
8771 static inline __ATTRS_o_ai __vector unsigned short
8772 vec_mulo(__vector unsigned char __a, __vector unsigned char __b) {
8773 return __builtin_s390_vmlob(__a, __b);
8776 static inline __ATTRS_o_ai __vector signed int
8777 vec_mulo(__vector signed short __a, __vector signed short __b) {
8778 return __builtin_s390_vmoh(__a, __b);
8781 static inline __ATTRS_o_ai __vector unsigned int
8782 vec_mulo(__vector unsigned short __a, __vector unsigned short __b) {
8783 return __builtin_s390_vmloh(__a, __b);
8786 static inline __ATTRS_o_ai __vector signed long long
8787 vec_mulo(__vector signed int __a, __vector signed int __b) {
8788 return __builtin_s390_vmof(__a, __b);
8791 static inline __ATTRS_o_ai __vector unsigned long long
8792 vec_mulo(__vector unsigned int __a, __vector unsigned int __b) {
8793 return __builtin_s390_vmlof(__a, __b);
8796 /*-- vec_msum_u128 ----------------------------------------------------------*/
8798 #if __ARCH__ >= 12
8799 #define vec_msum_u128(X, Y, Z, W) \
8800 ((__vector unsigned char)__builtin_s390_vmslg((X), (Y), (Z), (W)));
8801 #endif
8803 /*-- vec_sub_u128 -----------------------------------------------------------*/
8805 static inline __ATTRS_ai __vector unsigned char
8806 vec_sub_u128(__vector unsigned char __a, __vector unsigned char __b) {
8807 return __builtin_s390_vsq(__a, __b);
8810 /*-- vec_subc ---------------------------------------------------------------*/
8812 static inline __ATTRS_o_ai __vector unsigned char
8813 vec_subc(__vector unsigned char __a, __vector unsigned char __b) {
8814 return __builtin_s390_vscbib(__a, __b);
8817 static inline __ATTRS_o_ai __vector unsigned short
8818 vec_subc(__vector unsigned short __a, __vector unsigned short __b) {
8819 return __builtin_s390_vscbih(__a, __b);
8822 static inline __ATTRS_o_ai __vector unsigned int
8823 vec_subc(__vector unsigned int __a, __vector unsigned int __b) {
8824 return __builtin_s390_vscbif(__a, __b);
8827 static inline __ATTRS_o_ai __vector unsigned long long
8828 vec_subc(__vector unsigned long long __a, __vector unsigned long long __b) {
8829 return __builtin_s390_vscbig(__a, __b);
8832 /*-- vec_subc_u128 ----------------------------------------------------------*/
8834 static inline __ATTRS_ai __vector unsigned char
8835 vec_subc_u128(__vector unsigned char __a, __vector unsigned char __b) {
8836 return __builtin_s390_vscbiq(__a, __b);
8839 /*-- vec_sube_u128 ----------------------------------------------------------*/
8841 static inline __ATTRS_ai __vector unsigned char
8842 vec_sube_u128(__vector unsigned char __a, __vector unsigned char __b,
8843 __vector unsigned char __c) {
8844 return __builtin_s390_vsbiq(__a, __b, __c);
8847 /*-- vec_subec_u128 ---------------------------------------------------------*/
8849 static inline __ATTRS_ai __vector unsigned char
8850 vec_subec_u128(__vector unsigned char __a, __vector unsigned char __b,
8851 __vector unsigned char __c) {
8852 return __builtin_s390_vsbcbiq(__a, __b, __c);
8855 /*-- vec_sum2 ---------------------------------------------------------------*/
8857 static inline __ATTRS_o_ai __vector unsigned long long
8858 vec_sum2(__vector unsigned short __a, __vector unsigned short __b) {
8859 return __builtin_s390_vsumgh(__a, __b);
8862 static inline __ATTRS_o_ai __vector unsigned long long
8863 vec_sum2(__vector unsigned int __a, __vector unsigned int __b) {
8864 return __builtin_s390_vsumgf(__a, __b);
8867 /*-- vec_sum_u128 -----------------------------------------------------------*/
8869 static inline __ATTRS_o_ai __vector unsigned char
8870 vec_sum_u128(__vector unsigned int __a, __vector unsigned int __b) {
8871 return __builtin_s390_vsumqf(__a, __b);
8874 static inline __ATTRS_o_ai __vector unsigned char
8875 vec_sum_u128(__vector unsigned long long __a, __vector unsigned long long __b) {
8876 return __builtin_s390_vsumqg(__a, __b);
8879 /*-- vec_sum4 ---------------------------------------------------------------*/
8881 static inline __ATTRS_o_ai __vector unsigned int
8882 vec_sum4(__vector unsigned char __a, __vector unsigned char __b) {
8883 return __builtin_s390_vsumb(__a, __b);
8886 static inline __ATTRS_o_ai __vector unsigned int
8887 vec_sum4(__vector unsigned short __a, __vector unsigned short __b) {
8888 return __builtin_s390_vsumh(__a, __b);
8891 /*-- vec_test_mask ----------------------------------------------------------*/
8893 static inline __ATTRS_o_ai int
8894 vec_test_mask(__vector signed char __a, __vector unsigned char __b) {
8895 return __builtin_s390_vtm((__vector unsigned char)__a,
8896 (__vector unsigned char)__b);
8899 static inline __ATTRS_o_ai int
8900 vec_test_mask(__vector unsigned char __a, __vector unsigned char __b) {
8901 return __builtin_s390_vtm(__a, __b);
8904 static inline __ATTRS_o_ai int
8905 vec_test_mask(__vector signed short __a, __vector unsigned short __b) {
8906 return __builtin_s390_vtm((__vector unsigned char)__a,
8907 (__vector unsigned char)__b);
8910 static inline __ATTRS_o_ai int
8911 vec_test_mask(__vector unsigned short __a, __vector unsigned short __b) {
8912 return __builtin_s390_vtm((__vector unsigned char)__a,
8913 (__vector unsigned char)__b);
8916 static inline __ATTRS_o_ai int
8917 vec_test_mask(__vector signed int __a, __vector unsigned int __b) {
8918 return __builtin_s390_vtm((__vector unsigned char)__a,
8919 (__vector unsigned char)__b);
8922 static inline __ATTRS_o_ai int
8923 vec_test_mask(__vector unsigned int __a, __vector unsigned int __b) {
8924 return __builtin_s390_vtm((__vector unsigned char)__a,
8925 (__vector unsigned char)__b);
8928 static inline __ATTRS_o_ai int
8929 vec_test_mask(__vector signed long long __a, __vector unsigned long long __b) {
8930 return __builtin_s390_vtm((__vector unsigned char)__a,
8931 (__vector unsigned char)__b);
8934 static inline __ATTRS_o_ai int
8935 vec_test_mask(__vector unsigned long long __a,
8936 __vector unsigned long long __b) {
8937 return __builtin_s390_vtm((__vector unsigned char)__a,
8938 (__vector unsigned char)__b);
8941 #if __ARCH__ >= 12
8942 static inline __ATTRS_o_ai int
8943 vec_test_mask(__vector float __a, __vector unsigned int __b) {
8944 return __builtin_s390_vtm((__vector unsigned char)__a,
8945 (__vector unsigned char)__b);
8947 #endif
8949 static inline __ATTRS_o_ai int
8950 vec_test_mask(__vector double __a, __vector unsigned long long __b) {
8951 return __builtin_s390_vtm((__vector unsigned char)__a,
8952 (__vector unsigned char)__b);
8955 /*-- vec_madd ---------------------------------------------------------------*/
8957 #if __ARCH__ >= 12
8958 static inline __ATTRS_o_ai __vector float
8959 vec_madd(__vector float __a, __vector float __b, __vector float __c) {
8960 return __builtin_s390_vfmasb(__a, __b, __c);
8962 #endif
8964 static inline __ATTRS_o_ai __vector double
8965 vec_madd(__vector double __a, __vector double __b, __vector double __c) {
8966 return __builtin_s390_vfmadb(__a, __b, __c);
8969 /*-- vec_msub ---------------------------------------------------------------*/
8971 #if __ARCH__ >= 12
8972 static inline __ATTRS_o_ai __vector float
8973 vec_msub(__vector float __a, __vector float __b, __vector float __c) {
8974 return __builtin_s390_vfmssb(__a, __b, __c);
8976 #endif
8978 static inline __ATTRS_o_ai __vector double
8979 vec_msub(__vector double __a, __vector double __b, __vector double __c) {
8980 return __builtin_s390_vfmsdb(__a, __b, __c);
8983 /*-- vec_nmadd ---------------------------------------------------------------*/
8985 #if __ARCH__ >= 12
8986 static inline __ATTRS_o_ai __vector float
8987 vec_nmadd(__vector float __a, __vector float __b, __vector float __c) {
8988 return __builtin_s390_vfnmasb(__a, __b, __c);
8991 static inline __ATTRS_o_ai __vector double
8992 vec_nmadd(__vector double __a, __vector double __b, __vector double __c) {
8993 return __builtin_s390_vfnmadb(__a, __b, __c);
8995 #endif
8997 /*-- vec_nmsub ---------------------------------------------------------------*/
8999 #if __ARCH__ >= 12
9000 static inline __ATTRS_o_ai __vector float
9001 vec_nmsub(__vector float __a, __vector float __b, __vector float __c) {
9002 return __builtin_s390_vfnmssb(__a, __b, __c);
9005 static inline __ATTRS_o_ai __vector double
9006 vec_nmsub(__vector double __a, __vector double __b, __vector double __c) {
9007 return __builtin_s390_vfnmsdb(__a, __b, __c);
9009 #endif
9011 /*-- vec_sqrt ---------------------------------------------------------------*/
9013 #if __ARCH__ >= 12
9014 static inline __ATTRS_o_ai __vector float
9015 vec_sqrt(__vector float __a) {
9016 return __builtin_s390_vfsqsb(__a);
9018 #endif
9020 static inline __ATTRS_o_ai __vector double
9021 vec_sqrt(__vector double __a) {
9022 return __builtin_s390_vfsqdb(__a);
9025 /*-- vec_ld2f ---------------------------------------------------------------*/
9027 // This prototype is deprecated.
9028 static inline __ATTRS_ai __vector double
9029 vec_ld2f(const float *__ptr) {
9030 typedef float __v2f32 __attribute__((__vector_size__(8)));
9031 return __builtin_convertvector(*(const __v2f32 *)__ptr, __vector double);
9034 /*-- vec_st2f ---------------------------------------------------------------*/
9036 // This prototype is deprecated.
9037 static inline __ATTRS_ai void
9038 vec_st2f(__vector double __a, float *__ptr) {
9039 typedef float __v2f32 __attribute__((__vector_size__(8)));
9040 *(__v2f32 *)__ptr = __builtin_convertvector(__a, __v2f32);
9043 /*-- vec_ctd ----------------------------------------------------------------*/
9045 // This prototype is deprecated.
9046 static inline __ATTRS_o_ai __vector double
9047 vec_ctd(__vector signed long long __a, int __b)
9048 __constant_range(__b, 0, 31) {
9049 __vector double __conv = __builtin_convertvector(__a, __vector double);
9050 __conv *= ((__vector double)(__vector unsigned long long)
9051 ((0x3ffULL - __b) << 52));
9052 return __conv;
9055 // This prototype is deprecated.
9056 static inline __ATTRS_o_ai __vector double
9057 vec_ctd(__vector unsigned long long __a, int __b)
9058 __constant_range(__b, 0, 31) {
9059 __vector double __conv = __builtin_convertvector(__a, __vector double);
9060 __conv *= ((__vector double)(__vector unsigned long long)
9061 ((0x3ffULL - __b) << 52));
9062 return __conv;
9065 /*-- vec_ctsl ---------------------------------------------------------------*/
9067 // This prototype is deprecated.
9068 static inline __ATTRS_o_ai __vector signed long long
9069 vec_ctsl(__vector double __a, int __b)
9070 __constant_range(__b, 0, 31) {
9071 __a *= ((__vector double)(__vector unsigned long long)
9072 ((0x3ffULL + __b) << 52));
9073 return __builtin_convertvector(__a, __vector signed long long);
9076 /*-- vec_ctul ---------------------------------------------------------------*/
9078 // This prototype is deprecated.
9079 static inline __ATTRS_o_ai __vector unsigned long long
9080 vec_ctul(__vector double __a, int __b)
9081 __constant_range(__b, 0, 31) {
9082 __a *= ((__vector double)(__vector unsigned long long)
9083 ((0x3ffULL + __b) << 52));
9084 return __builtin_convertvector(__a, __vector unsigned long long);
9087 /*-- vec_doublee ------------------------------------------------------------*/
9089 #if __ARCH__ >= 12
9090 static inline __ATTRS_ai __vector double
9091 vec_doublee(__vector float __a) {
9092 typedef float __v2f32 __attribute__((__vector_size__(8)));
9093 __v2f32 __pack = __builtin_shufflevector(__a, __a, 0, 2);
9094 return __builtin_convertvector(__pack, __vector double);
9096 #endif
9098 /*-- vec_floate -------------------------------------------------------------*/
9100 #if __ARCH__ >= 12
9101 static inline __ATTRS_ai __vector float
9102 vec_floate(__vector double __a) {
9103 typedef float __v2f32 __attribute__((__vector_size__(8)));
9104 __v2f32 __pack = __builtin_convertvector(__a, __v2f32);
9105 return __builtin_shufflevector(__pack, __pack, 0, -1, 1, -1);
9107 #endif
9109 /*-- vec_double -------------------------------------------------------------*/
9111 static inline __ATTRS_o_ai __vector double
9112 vec_double(__vector signed long long __a) {
9113 return __builtin_convertvector(__a, __vector double);
9116 static inline __ATTRS_o_ai __vector double
9117 vec_double(__vector unsigned long long __a) {
9118 return __builtin_convertvector(__a, __vector double);
9121 /*-- vec_float --------------------------------------------------------------*/
9123 #if __ARCH__ >= 13
9125 static inline __ATTRS_o_ai __vector float
9126 vec_float(__vector signed int __a) {
9127 return __builtin_convertvector(__a, __vector float);
9130 static inline __ATTRS_o_ai __vector float
9131 vec_float(__vector unsigned int __a) {
9132 return __builtin_convertvector(__a, __vector float);
9135 #endif
9137 /*-- vec_signed -------------------------------------------------------------*/
9139 static inline __ATTRS_o_ai __vector signed long long
9140 vec_signed(__vector double __a) {
9141 return __builtin_convertvector(__a, __vector signed long long);
9144 #if __ARCH__ >= 13
9145 static inline __ATTRS_o_ai __vector signed int
9146 vec_signed(__vector float __a) {
9147 return __builtin_convertvector(__a, __vector signed int);
9149 #endif
9151 /*-- vec_unsigned -----------------------------------------------------------*/
9153 static inline __ATTRS_o_ai __vector unsigned long long
9154 vec_unsigned(__vector double __a) {
9155 return __builtin_convertvector(__a, __vector unsigned long long);
9158 #if __ARCH__ >= 13
9159 static inline __ATTRS_o_ai __vector unsigned int
9160 vec_unsigned(__vector float __a) {
9161 return __builtin_convertvector(__a, __vector unsigned int);
9163 #endif
9165 /*-- vec_roundp -------------------------------------------------------------*/
9167 #if __ARCH__ >= 12
9168 static inline __ATTRS_o_ai __vector float
9169 vec_roundp(__vector float __a) {
9170 return __builtin_s390_vfisb(__a, 4, 6);
9172 #endif
9174 static inline __ATTRS_o_ai __vector double
9175 vec_roundp(__vector double __a) {
9176 return __builtin_s390_vfidb(__a, 4, 6);
9179 /*-- vec_ceil ---------------------------------------------------------------*/
9181 #if __ARCH__ >= 12
9182 static inline __ATTRS_o_ai __vector float
9183 vec_ceil(__vector float __a) {
9184 // On this platform, vec_ceil never triggers the IEEE-inexact exception.
9185 return __builtin_s390_vfisb(__a, 4, 6);
9187 #endif
9189 static inline __ATTRS_o_ai __vector double
9190 vec_ceil(__vector double __a) {
9191 // On this platform, vec_ceil never triggers the IEEE-inexact exception.
9192 return __builtin_s390_vfidb(__a, 4, 6);
9195 /*-- vec_roundm -------------------------------------------------------------*/
9197 #if __ARCH__ >= 12
9198 static inline __ATTRS_o_ai __vector float
9199 vec_roundm(__vector float __a) {
9200 return __builtin_s390_vfisb(__a, 4, 7);
9202 #endif
9204 static inline __ATTRS_o_ai __vector double
9205 vec_roundm(__vector double __a) {
9206 return __builtin_s390_vfidb(__a, 4, 7);
9209 /*-- vec_floor --------------------------------------------------------------*/
9211 #if __ARCH__ >= 12
9212 static inline __ATTRS_o_ai __vector float
9213 vec_floor(__vector float __a) {
9214 // On this platform, vec_floor never triggers the IEEE-inexact exception.
9215 return __builtin_s390_vfisb(__a, 4, 7);
9217 #endif
9219 static inline __ATTRS_o_ai __vector double
9220 vec_floor(__vector double __a) {
9221 // On this platform, vec_floor never triggers the IEEE-inexact exception.
9222 return __builtin_s390_vfidb(__a, 4, 7);
9225 /*-- vec_roundz -------------------------------------------------------------*/
9227 #if __ARCH__ >= 12
9228 static inline __ATTRS_o_ai __vector float
9229 vec_roundz(__vector float __a) {
9230 return __builtin_s390_vfisb(__a, 4, 5);
9232 #endif
9234 static inline __ATTRS_o_ai __vector double
9235 vec_roundz(__vector double __a) {
9236 return __builtin_s390_vfidb(__a, 4, 5);
9239 /*-- vec_trunc --------------------------------------------------------------*/
9241 #if __ARCH__ >= 12
9242 static inline __ATTRS_o_ai __vector float
9243 vec_trunc(__vector float __a) {
9244 // On this platform, vec_trunc never triggers the IEEE-inexact exception.
9245 return __builtin_s390_vfisb(__a, 4, 5);
9247 #endif
9249 static inline __ATTRS_o_ai __vector double
9250 vec_trunc(__vector double __a) {
9251 // On this platform, vec_trunc never triggers the IEEE-inexact exception.
9252 return __builtin_s390_vfidb(__a, 4, 5);
9255 /*-- vec_roundc -------------------------------------------------------------*/
9257 #if __ARCH__ >= 12
9258 static inline __ATTRS_o_ai __vector float
9259 vec_roundc(__vector float __a) {
9260 return __builtin_s390_vfisb(__a, 4, 0);
9262 #endif
9264 static inline __ATTRS_o_ai __vector double
9265 vec_roundc(__vector double __a) {
9266 return __builtin_s390_vfidb(__a, 4, 0);
9269 /*-- vec_rint ---------------------------------------------------------------*/
9271 #if __ARCH__ >= 12
9272 static inline __ATTRS_o_ai __vector float
9273 vec_rint(__vector float __a) {
9274 // vec_rint may trigger the IEEE-inexact exception.
9275 return __builtin_s390_vfisb(__a, 0, 0);
9277 #endif
9279 static inline __ATTRS_o_ai __vector double
9280 vec_rint(__vector double __a) {
9281 // vec_rint may trigger the IEEE-inexact exception.
9282 return __builtin_s390_vfidb(__a, 0, 0);
9285 /*-- vec_round --------------------------------------------------------------*/
9287 #if __ARCH__ >= 12
9288 static inline __ATTRS_o_ai __vector float
9289 vec_round(__vector float __a) {
9290 return __builtin_s390_vfisb(__a, 4, 4);
9292 #endif
9294 static inline __ATTRS_o_ai __vector double
9295 vec_round(__vector double __a) {
9296 return __builtin_s390_vfidb(__a, 4, 4);
9299 /*-- vec_fp_test_data_class -------------------------------------------------*/
9301 #if __ARCH__ >= 12
9302 extern __ATTRS_o __vector __bool int
9303 vec_fp_test_data_class(__vector float __a, int __b, int *__c)
9304 __constant_range(__b, 0, 4095);
9306 extern __ATTRS_o __vector __bool long long
9307 vec_fp_test_data_class(__vector double __a, int __b, int *__c)
9308 __constant_range(__b, 0, 4095);
9310 #define vec_fp_test_data_class(X, Y, Z) \
9311 ((__typeof__((vec_fp_test_data_class)((X), (Y), (Z)))) \
9312 __extension__ ({ \
9313 __vector unsigned char __res; \
9314 __vector unsigned char __x = (__vector unsigned char)(X); \
9315 int *__z = (Z); \
9316 switch (sizeof ((X)[0])) { \
9317 case 4: __res = (__vector unsigned char) \
9318 __builtin_s390_vftcisb((__vector float)__x, (Y), __z); \
9319 break; \
9320 default: __res = (__vector unsigned char) \
9321 __builtin_s390_vftcidb((__vector double)__x, (Y), __z); \
9322 break; \
9323 } __res; }))
9324 #else
9325 #define vec_fp_test_data_class(X, Y, Z) \
9326 ((__vector __bool long long)__builtin_s390_vftcidb((X), (Y), (Z)))
9327 #endif
9329 #define __VEC_CLASS_FP_ZERO_P (1 << 11)
9330 #define __VEC_CLASS_FP_ZERO_N (1 << 10)
9331 #define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | __VEC_CLASS_FP_ZERO_N)
9332 #define __VEC_CLASS_FP_NORMAL_P (1 << 9)
9333 #define __VEC_CLASS_FP_NORMAL_N (1 << 8)
9334 #define __VEC_CLASS_FP_NORMAL (__VEC_CLASS_FP_NORMAL_P | \
9335 __VEC_CLASS_FP_NORMAL_N)
9336 #define __VEC_CLASS_FP_SUBNORMAL_P (1 << 7)
9337 #define __VEC_CLASS_FP_SUBNORMAL_N (1 << 6)
9338 #define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \
9339 __VEC_CLASS_FP_SUBNORMAL_N)
9340 #define __VEC_CLASS_FP_INFINITY_P (1 << 5)
9341 #define __VEC_CLASS_FP_INFINITY_N (1 << 4)
9342 #define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \
9343 __VEC_CLASS_FP_INFINITY_N)
9344 #define __VEC_CLASS_FP_QNAN_P (1 << 3)
9345 #define __VEC_CLASS_FP_QNAN_N (1 << 2)
9346 #define __VEC_CLASS_FP_QNAN (__VEC_CLASS_FP_QNAN_P | __VEC_CLASS_FP_QNAN_N)
9347 #define __VEC_CLASS_FP_SNAN_P (1 << 1)
9348 #define __VEC_CLASS_FP_SNAN_N (1 << 0)
9349 #define __VEC_CLASS_FP_SNAN (__VEC_CLASS_FP_SNAN_P | __VEC_CLASS_FP_SNAN_N)
9350 #define __VEC_CLASS_FP_NAN (__VEC_CLASS_FP_QNAN | __VEC_CLASS_FP_SNAN)
9351 #define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \
9352 __VEC_CLASS_FP_SUBNORMAL | \
9353 __VEC_CLASS_FP_ZERO | \
9354 __VEC_CLASS_FP_INFINITY)
9356 /*-- vec_extend_to_fp32_hi --------------------------------------------------*/
9358 #if __ARCH__ >= 14
9359 #define vec_extend_to_fp32_hi(X, W) \
9360 ((__vector float)__builtin_s390_vclfnhs((X), (W)));
9361 #endif
9363 /*-- vec_extend_to_fp32_hi --------------------------------------------------*/
9365 #if __ARCH__ >= 14
9366 #define vec_extend_to_fp32_lo(X, W) \
9367 ((__vector float)__builtin_s390_vclfnls((X), (W)));
9368 #endif
9370 /*-- vec_round_from_fp32 ----------------------------------------------------*/
9372 #if __ARCH__ >= 14
9373 #define vec_round_from_fp32(X, Y, W) \
9374 ((__vector unsigned short)__builtin_s390_vcrnfs((X), (Y), (W)));
9375 #endif
9377 /*-- vec_convert_to_fp16 ----------------------------------------------------*/
9379 #if __ARCH__ >= 14
9380 #define vec_convert_to_fp16(X, W) \
9381 ((__vector unsigned short)__builtin_s390_vcfn((X), (W)));
9382 #endif
9384 /*-- vec_convert_from_fp16 --------------------------------------------------*/
9386 #if __ARCH__ >= 14
9387 #define vec_convert_from_fp16(X, W) \
9388 ((__vector unsigned short)__builtin_s390_vcnf((X), (W)));
9389 #endif
9391 /*-- vec_cp_until_zero ------------------------------------------------------*/
9393 static inline __ATTRS_o_ai __vector signed char
9394 vec_cp_until_zero(__vector signed char __a) {
9395 return ((__vector signed char)
9396 __builtin_s390_vistrb((__vector unsigned char)__a));
9399 static inline __ATTRS_o_ai __vector __bool char
9400 vec_cp_until_zero(__vector __bool char __a) {
9401 return ((__vector __bool char)
9402 __builtin_s390_vistrb((__vector unsigned char)__a));
9405 static inline __ATTRS_o_ai __vector unsigned char
9406 vec_cp_until_zero(__vector unsigned char __a) {
9407 return __builtin_s390_vistrb(__a);
9410 static inline __ATTRS_o_ai __vector signed short
9411 vec_cp_until_zero(__vector signed short __a) {
9412 return ((__vector signed short)
9413 __builtin_s390_vistrh((__vector unsigned short)__a));
9416 static inline __ATTRS_o_ai __vector __bool short
9417 vec_cp_until_zero(__vector __bool short __a) {
9418 return ((__vector __bool short)
9419 __builtin_s390_vistrh((__vector unsigned short)__a));
9422 static inline __ATTRS_o_ai __vector unsigned short
9423 vec_cp_until_zero(__vector unsigned short __a) {
9424 return __builtin_s390_vistrh(__a);
9427 static inline __ATTRS_o_ai __vector signed int
9428 vec_cp_until_zero(__vector signed int __a) {
9429 return ((__vector signed int)
9430 __builtin_s390_vistrf((__vector unsigned int)__a));
9433 static inline __ATTRS_o_ai __vector __bool int
9434 vec_cp_until_zero(__vector __bool int __a) {
9435 return ((__vector __bool int)
9436 __builtin_s390_vistrf((__vector unsigned int)__a));
9439 static inline __ATTRS_o_ai __vector unsigned int
9440 vec_cp_until_zero(__vector unsigned int __a) {
9441 return __builtin_s390_vistrf(__a);
9444 /*-- vec_cp_until_zero_cc ---------------------------------------------------*/
9446 static inline __ATTRS_o_ai __vector signed char
9447 vec_cp_until_zero_cc(__vector signed char __a, int *__cc) {
9448 return (__vector signed char)
9449 __builtin_s390_vistrbs((__vector unsigned char)__a, __cc);
9452 static inline __ATTRS_o_ai __vector __bool char
9453 vec_cp_until_zero_cc(__vector __bool char __a, int *__cc) {
9454 return (__vector __bool char)
9455 __builtin_s390_vistrbs((__vector unsigned char)__a, __cc);
9458 static inline __ATTRS_o_ai __vector unsigned char
9459 vec_cp_until_zero_cc(__vector unsigned char __a, int *__cc) {
9460 return __builtin_s390_vistrbs(__a, __cc);
9463 static inline __ATTRS_o_ai __vector signed short
9464 vec_cp_until_zero_cc(__vector signed short __a, int *__cc) {
9465 return (__vector signed short)
9466 __builtin_s390_vistrhs((__vector unsigned short)__a, __cc);
9469 static inline __ATTRS_o_ai __vector __bool short
9470 vec_cp_until_zero_cc(__vector __bool short __a, int *__cc) {
9471 return (__vector __bool short)
9472 __builtin_s390_vistrhs((__vector unsigned short)__a, __cc);
9475 static inline __ATTRS_o_ai __vector unsigned short
9476 vec_cp_until_zero_cc(__vector unsigned short __a, int *__cc) {
9477 return __builtin_s390_vistrhs(__a, __cc);
9480 static inline __ATTRS_o_ai __vector signed int
9481 vec_cp_until_zero_cc(__vector signed int __a, int *__cc) {
9482 return (__vector signed int)
9483 __builtin_s390_vistrfs((__vector unsigned int)__a, __cc);
9486 static inline __ATTRS_o_ai __vector __bool int
9487 vec_cp_until_zero_cc(__vector __bool int __a, int *__cc) {
9488 return (__vector __bool int)
9489 __builtin_s390_vistrfs((__vector unsigned int)__a, __cc);
9492 static inline __ATTRS_o_ai __vector unsigned int
9493 vec_cp_until_zero_cc(__vector unsigned int __a, int *__cc) {
9494 return __builtin_s390_vistrfs(__a, __cc);
9497 /*-- vec_cmpeq_idx ----------------------------------------------------------*/
9499 static inline __ATTRS_o_ai __vector signed char
9500 vec_cmpeq_idx(__vector signed char __a, __vector signed char __b) {
9501 return (__vector signed char)
9502 __builtin_s390_vfeeb((__vector unsigned char)__a,
9503 (__vector unsigned char)__b);
9506 static inline __ATTRS_o_ai __vector unsigned char
9507 vec_cmpeq_idx(__vector __bool char __a, __vector __bool char __b) {
9508 return __builtin_s390_vfeeb((__vector unsigned char)__a,
9509 (__vector unsigned char)__b);
9512 static inline __ATTRS_o_ai __vector unsigned char
9513 vec_cmpeq_idx(__vector unsigned char __a, __vector unsigned char __b) {
9514 return __builtin_s390_vfeeb(__a, __b);
9517 static inline __ATTRS_o_ai __vector signed short
9518 vec_cmpeq_idx(__vector signed short __a, __vector signed short __b) {
9519 return (__vector signed short)
9520 __builtin_s390_vfeeh((__vector unsigned short)__a,
9521 (__vector unsigned short)__b);
9524 static inline __ATTRS_o_ai __vector unsigned short
9525 vec_cmpeq_idx(__vector __bool short __a, __vector __bool short __b) {
9526 return __builtin_s390_vfeeh((__vector unsigned short)__a,
9527 (__vector unsigned short)__b);
9530 static inline __ATTRS_o_ai __vector unsigned short
9531 vec_cmpeq_idx(__vector unsigned short __a, __vector unsigned short __b) {
9532 return __builtin_s390_vfeeh(__a, __b);
9535 static inline __ATTRS_o_ai __vector signed int
9536 vec_cmpeq_idx(__vector signed int __a, __vector signed int __b) {
9537 return (__vector signed int)
9538 __builtin_s390_vfeef((__vector unsigned int)__a,
9539 (__vector unsigned int)__b);
9542 static inline __ATTRS_o_ai __vector unsigned int
9543 vec_cmpeq_idx(__vector __bool int __a, __vector __bool int __b) {
9544 return __builtin_s390_vfeef((__vector unsigned int)__a,
9545 (__vector unsigned int)__b);
9548 static inline __ATTRS_o_ai __vector unsigned int
9549 vec_cmpeq_idx(__vector unsigned int __a, __vector unsigned int __b) {
9550 return __builtin_s390_vfeef(__a, __b);
9553 /*-- vec_cmpeq_idx_cc -------------------------------------------------------*/
9555 static inline __ATTRS_o_ai __vector signed char
9556 vec_cmpeq_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) {
9557 return (__vector signed char)
9558 __builtin_s390_vfeebs((__vector unsigned char)__a,
9559 (__vector unsigned char)__b, __cc);
9562 static inline __ATTRS_o_ai __vector unsigned char
9563 vec_cmpeq_idx_cc(__vector __bool char __a, __vector __bool char __b, int *__cc) {
9564 return __builtin_s390_vfeebs((__vector unsigned char)__a,
9565 (__vector unsigned char)__b, __cc);
9568 static inline __ATTRS_o_ai __vector unsigned char
9569 vec_cmpeq_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9570 int *__cc) {
9571 return __builtin_s390_vfeebs(__a, __b, __cc);
9574 static inline __ATTRS_o_ai __vector signed short
9575 vec_cmpeq_idx_cc(__vector signed short __a, __vector signed short __b,
9576 int *__cc) {
9577 return (__vector signed short)
9578 __builtin_s390_vfeehs((__vector unsigned short)__a,
9579 (__vector unsigned short)__b, __cc);
9582 static inline __ATTRS_o_ai __vector unsigned short
9583 vec_cmpeq_idx_cc(__vector __bool short __a, __vector __bool short __b, int *__cc) {
9584 return __builtin_s390_vfeehs((__vector unsigned short)__a,
9585 (__vector unsigned short)__b, __cc);
9588 static inline __ATTRS_o_ai __vector unsigned short
9589 vec_cmpeq_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9590 int *__cc) {
9591 return __builtin_s390_vfeehs(__a, __b, __cc);
9594 static inline __ATTRS_o_ai __vector signed int
9595 vec_cmpeq_idx_cc(__vector signed int __a, __vector signed int __b, int *__cc) {
9596 return (__vector signed int)
9597 __builtin_s390_vfeefs((__vector unsigned int)__a,
9598 (__vector unsigned int)__b, __cc);
9601 static inline __ATTRS_o_ai __vector unsigned int
9602 vec_cmpeq_idx_cc(__vector __bool int __a, __vector __bool int __b, int *__cc) {
9603 return __builtin_s390_vfeefs((__vector unsigned int)__a,
9604 (__vector unsigned int)__b, __cc);
9607 static inline __ATTRS_o_ai __vector unsigned int
9608 vec_cmpeq_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9609 int *__cc) {
9610 return __builtin_s390_vfeefs(__a, __b, __cc);
9613 /*-- vec_cmpeq_or_0_idx -----------------------------------------------------*/
9615 static inline __ATTRS_o_ai __vector signed char
9616 vec_cmpeq_or_0_idx(__vector signed char __a, __vector signed char __b) {
9617 return (__vector signed char)
9618 __builtin_s390_vfeezb((__vector unsigned char)__a,
9619 (__vector unsigned char)__b);
9622 static inline __ATTRS_o_ai __vector unsigned char
9623 vec_cmpeq_or_0_idx(__vector __bool char __a, __vector __bool char __b) {
9624 return __builtin_s390_vfeezb((__vector unsigned char)__a,
9625 (__vector unsigned char)__b);
9628 static inline __ATTRS_o_ai __vector unsigned char
9629 vec_cmpeq_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) {
9630 return __builtin_s390_vfeezb(__a, __b);
9633 static inline __ATTRS_o_ai __vector signed short
9634 vec_cmpeq_or_0_idx(__vector signed short __a, __vector signed short __b) {
9635 return (__vector signed short)
9636 __builtin_s390_vfeezh((__vector unsigned short)__a,
9637 (__vector unsigned short)__b);
9640 static inline __ATTRS_o_ai __vector unsigned short
9641 vec_cmpeq_or_0_idx(__vector __bool short __a, __vector __bool short __b) {
9642 return __builtin_s390_vfeezh((__vector unsigned short)__a,
9643 (__vector unsigned short)__b);
9646 static inline __ATTRS_o_ai __vector unsigned short
9647 vec_cmpeq_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) {
9648 return __builtin_s390_vfeezh(__a, __b);
9651 static inline __ATTRS_o_ai __vector signed int
9652 vec_cmpeq_or_0_idx(__vector signed int __a, __vector signed int __b) {
9653 return (__vector signed int)
9654 __builtin_s390_vfeezf((__vector unsigned int)__a,
9655 (__vector unsigned int)__b);
9658 static inline __ATTRS_o_ai __vector unsigned int
9659 vec_cmpeq_or_0_idx(__vector __bool int __a, __vector __bool int __b) {
9660 return __builtin_s390_vfeezf((__vector unsigned int)__a,
9661 (__vector unsigned int)__b);
9664 static inline __ATTRS_o_ai __vector unsigned int
9665 vec_cmpeq_or_0_idx(__vector unsigned int __a, __vector unsigned int __b) {
9666 return __builtin_s390_vfeezf(__a, __b);
9669 /*-- vec_cmpeq_or_0_idx_cc --------------------------------------------------*/
9671 static inline __ATTRS_o_ai __vector signed char
9672 vec_cmpeq_or_0_idx_cc(__vector signed char __a, __vector signed char __b,
9673 int *__cc) {
9674 return (__vector signed char)
9675 __builtin_s390_vfeezbs((__vector unsigned char)__a,
9676 (__vector unsigned char)__b, __cc);
9679 static inline __ATTRS_o_ai __vector unsigned char
9680 vec_cmpeq_or_0_idx_cc(__vector __bool char __a, __vector __bool char __b,
9681 int *__cc) {
9682 return __builtin_s390_vfeezbs((__vector unsigned char)__a,
9683 (__vector unsigned char)__b, __cc);
9686 static inline __ATTRS_o_ai __vector unsigned char
9687 vec_cmpeq_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9688 int *__cc) {
9689 return __builtin_s390_vfeezbs(__a, __b, __cc);
9692 static inline __ATTRS_o_ai __vector signed short
9693 vec_cmpeq_or_0_idx_cc(__vector signed short __a, __vector signed short __b,
9694 int *__cc) {
9695 return (__vector signed short)
9696 __builtin_s390_vfeezhs((__vector unsigned short)__a,
9697 (__vector unsigned short)__b, __cc);
9700 static inline __ATTRS_o_ai __vector unsigned short
9701 vec_cmpeq_or_0_idx_cc(__vector __bool short __a, __vector __bool short __b,
9702 int *__cc) {
9703 return __builtin_s390_vfeezhs((__vector unsigned short)__a,
9704 (__vector unsigned short)__b, __cc);
9707 static inline __ATTRS_o_ai __vector unsigned short
9708 vec_cmpeq_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9709 int *__cc) {
9710 return __builtin_s390_vfeezhs(__a, __b, __cc);
9713 static inline __ATTRS_o_ai __vector signed int
9714 vec_cmpeq_or_0_idx_cc(__vector signed int __a, __vector signed int __b,
9715 int *__cc) {
9716 return (__vector signed int)
9717 __builtin_s390_vfeezfs((__vector unsigned int)__a,
9718 (__vector unsigned int)__b, __cc);
9721 static inline __ATTRS_o_ai __vector unsigned int
9722 vec_cmpeq_or_0_idx_cc(__vector __bool int __a, __vector __bool int __b,
9723 int *__cc) {
9724 return __builtin_s390_vfeezfs((__vector unsigned int)__a,
9725 (__vector unsigned int)__b, __cc);
9728 static inline __ATTRS_o_ai __vector unsigned int
9729 vec_cmpeq_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9730 int *__cc) {
9731 return __builtin_s390_vfeezfs(__a, __b, __cc);
9734 /*-- vec_cmpne_idx ----------------------------------------------------------*/
9736 static inline __ATTRS_o_ai __vector signed char
9737 vec_cmpne_idx(__vector signed char __a, __vector signed char __b) {
9738 return (__vector signed char)
9739 __builtin_s390_vfeneb((__vector unsigned char)__a,
9740 (__vector unsigned char)__b);
9743 static inline __ATTRS_o_ai __vector unsigned char
9744 vec_cmpne_idx(__vector __bool char __a, __vector __bool char __b) {
9745 return __builtin_s390_vfeneb((__vector unsigned char)__a,
9746 (__vector unsigned char)__b);
9749 static inline __ATTRS_o_ai __vector unsigned char
9750 vec_cmpne_idx(__vector unsigned char __a, __vector unsigned char __b) {
9751 return __builtin_s390_vfeneb(__a, __b);
9754 static inline __ATTRS_o_ai __vector signed short
9755 vec_cmpne_idx(__vector signed short __a, __vector signed short __b) {
9756 return (__vector signed short)
9757 __builtin_s390_vfeneh((__vector unsigned short)__a,
9758 (__vector unsigned short)__b);
9761 static inline __ATTRS_o_ai __vector unsigned short
9762 vec_cmpne_idx(__vector __bool short __a, __vector __bool short __b) {
9763 return __builtin_s390_vfeneh((__vector unsigned short)__a,
9764 (__vector unsigned short)__b);
9767 static inline __ATTRS_o_ai __vector unsigned short
9768 vec_cmpne_idx(__vector unsigned short __a, __vector unsigned short __b) {
9769 return __builtin_s390_vfeneh(__a, __b);
9772 static inline __ATTRS_o_ai __vector signed int
9773 vec_cmpne_idx(__vector signed int __a, __vector signed int __b) {
9774 return (__vector signed int)
9775 __builtin_s390_vfenef((__vector unsigned int)__a,
9776 (__vector unsigned int)__b);
9779 static inline __ATTRS_o_ai __vector unsigned int
9780 vec_cmpne_idx(__vector __bool int __a, __vector __bool int __b) {
9781 return __builtin_s390_vfenef((__vector unsigned int)__a,
9782 (__vector unsigned int)__b);
9785 static inline __ATTRS_o_ai __vector unsigned int
9786 vec_cmpne_idx(__vector unsigned int __a, __vector unsigned int __b) {
9787 return __builtin_s390_vfenef(__a, __b);
9790 /*-- vec_cmpne_idx_cc -------------------------------------------------------*/
9792 static inline __ATTRS_o_ai __vector signed char
9793 vec_cmpne_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) {
9794 return (__vector signed char)
9795 __builtin_s390_vfenebs((__vector unsigned char)__a,
9796 (__vector unsigned char)__b, __cc);
9799 static inline __ATTRS_o_ai __vector unsigned char
9800 vec_cmpne_idx_cc(__vector __bool char __a, __vector __bool char __b, int *__cc) {
9801 return __builtin_s390_vfenebs((__vector unsigned char)__a,
9802 (__vector unsigned char)__b, __cc);
9805 static inline __ATTRS_o_ai __vector unsigned char
9806 vec_cmpne_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9807 int *__cc) {
9808 return __builtin_s390_vfenebs(__a, __b, __cc);
9811 static inline __ATTRS_o_ai __vector signed short
9812 vec_cmpne_idx_cc(__vector signed short __a, __vector signed short __b,
9813 int *__cc) {
9814 return (__vector signed short)
9815 __builtin_s390_vfenehs((__vector unsigned short)__a,
9816 (__vector unsigned short)__b, __cc);
9819 static inline __ATTRS_o_ai __vector unsigned short
9820 vec_cmpne_idx_cc(__vector __bool short __a, __vector __bool short __b,
9821 int *__cc) {
9822 return __builtin_s390_vfenehs((__vector unsigned short)__a,
9823 (__vector unsigned short)__b, __cc);
9826 static inline __ATTRS_o_ai __vector unsigned short
9827 vec_cmpne_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9828 int *__cc) {
9829 return __builtin_s390_vfenehs(__a, __b, __cc);
9832 static inline __ATTRS_o_ai __vector signed int
9833 vec_cmpne_idx_cc(__vector signed int __a, __vector signed int __b, int *__cc) {
9834 return (__vector signed int)
9835 __builtin_s390_vfenefs((__vector unsigned int)__a,
9836 (__vector unsigned int)__b, __cc);
9839 static inline __ATTRS_o_ai __vector unsigned int
9840 vec_cmpne_idx_cc(__vector __bool int __a, __vector __bool int __b, int *__cc) {
9841 return __builtin_s390_vfenefs((__vector unsigned int)__a,
9842 (__vector unsigned int)__b, __cc);
9845 static inline __ATTRS_o_ai __vector unsigned int
9846 vec_cmpne_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9847 int *__cc) {
9848 return __builtin_s390_vfenefs(__a, __b, __cc);
9851 /*-- vec_cmpne_or_0_idx -----------------------------------------------------*/
9853 static inline __ATTRS_o_ai __vector signed char
9854 vec_cmpne_or_0_idx(__vector signed char __a, __vector signed char __b) {
9855 return (__vector signed char)
9856 __builtin_s390_vfenezb((__vector unsigned char)__a,
9857 (__vector unsigned char)__b);
9860 static inline __ATTRS_o_ai __vector unsigned char
9861 vec_cmpne_or_0_idx(__vector __bool char __a, __vector __bool char __b) {
9862 return __builtin_s390_vfenezb((__vector unsigned char)__a,
9863 (__vector unsigned char)__b);
9866 static inline __ATTRS_o_ai __vector unsigned char
9867 vec_cmpne_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) {
9868 return __builtin_s390_vfenezb(__a, __b);
9871 static inline __ATTRS_o_ai __vector signed short
9872 vec_cmpne_or_0_idx(__vector signed short __a, __vector signed short __b) {
9873 return (__vector signed short)
9874 __builtin_s390_vfenezh((__vector unsigned short)__a,
9875 (__vector unsigned short)__b);
9878 static inline __ATTRS_o_ai __vector unsigned short
9879 vec_cmpne_or_0_idx(__vector __bool short __a, __vector __bool short __b) {
9880 return __builtin_s390_vfenezh((__vector unsigned short)__a,
9881 (__vector unsigned short)__b);
9884 static inline __ATTRS_o_ai __vector unsigned short
9885 vec_cmpne_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) {
9886 return __builtin_s390_vfenezh(__a, __b);
9889 static inline __ATTRS_o_ai __vector signed int
9890 vec_cmpne_or_0_idx(__vector signed int __a, __vector signed int __b) {
9891 return (__vector signed int)
9892 __builtin_s390_vfenezf((__vector unsigned int)__a,
9893 (__vector unsigned int)__b);
9896 static inline __ATTRS_o_ai __vector unsigned int
9897 vec_cmpne_or_0_idx(__vector __bool int __a, __vector __bool int __b) {
9898 return __builtin_s390_vfenezf((__vector unsigned int)__a,
9899 (__vector unsigned int)__b);
9902 static inline __ATTRS_o_ai __vector unsigned int
9903 vec_cmpne_or_0_idx(__vector unsigned int __a, __vector unsigned int __b) {
9904 return __builtin_s390_vfenezf(__a, __b);
9907 /*-- vec_cmpne_or_0_idx_cc --------------------------------------------------*/
9909 static inline __ATTRS_o_ai __vector signed char
9910 vec_cmpne_or_0_idx_cc(__vector signed char __a, __vector signed char __b,
9911 int *__cc) {
9912 return (__vector signed char)
9913 __builtin_s390_vfenezbs((__vector unsigned char)__a,
9914 (__vector unsigned char)__b, __cc);
9917 static inline __ATTRS_o_ai __vector unsigned char
9918 vec_cmpne_or_0_idx_cc(__vector __bool char __a, __vector __bool char __b,
9919 int *__cc) {
9920 return __builtin_s390_vfenezbs((__vector unsigned char)__a,
9921 (__vector unsigned char)__b, __cc);
9924 static inline __ATTRS_o_ai __vector unsigned char
9925 vec_cmpne_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9926 int *__cc) {
9927 return __builtin_s390_vfenezbs(__a, __b, __cc);
9930 static inline __ATTRS_o_ai __vector signed short
9931 vec_cmpne_or_0_idx_cc(__vector signed short __a, __vector signed short __b,
9932 int *__cc) {
9933 return (__vector signed short)
9934 __builtin_s390_vfenezhs((__vector unsigned short)__a,
9935 (__vector unsigned short)__b, __cc);
9938 static inline __ATTRS_o_ai __vector unsigned short
9939 vec_cmpne_or_0_idx_cc(__vector __bool short __a, __vector __bool short __b,
9940 int *__cc) {
9941 return __builtin_s390_vfenezhs((__vector unsigned short)__a,
9942 (__vector unsigned short)__b, __cc);
9945 static inline __ATTRS_o_ai __vector unsigned short
9946 vec_cmpne_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9947 int *__cc) {
9948 return __builtin_s390_vfenezhs(__a, __b, __cc);
9951 static inline __ATTRS_o_ai __vector signed int
9952 vec_cmpne_or_0_idx_cc(__vector signed int __a, __vector signed int __b,
9953 int *__cc) {
9954 return (__vector signed int)
9955 __builtin_s390_vfenezfs((__vector unsigned int)__a,
9956 (__vector unsigned int)__b, __cc);
9959 static inline __ATTRS_o_ai __vector unsigned int
9960 vec_cmpne_or_0_idx_cc(__vector __bool int __a, __vector __bool int __b,
9961 int *__cc) {
9962 return __builtin_s390_vfenezfs((__vector unsigned int)__a,
9963 (__vector unsigned int)__b, __cc);
9966 static inline __ATTRS_o_ai __vector unsigned int
9967 vec_cmpne_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9968 int *__cc) {
9969 return __builtin_s390_vfenezfs(__a, __b, __cc);
9972 /*-- vec_cmprg --------------------------------------------------------------*/
9974 static inline __ATTRS_o_ai __vector __bool char
9975 vec_cmprg(__vector unsigned char __a, __vector unsigned char __b,
9976 __vector unsigned char __c) {
9977 return (__vector __bool char)__builtin_s390_vstrcb(__a, __b, __c, 4);
9980 static inline __ATTRS_o_ai __vector __bool short
9981 vec_cmprg(__vector unsigned short __a, __vector unsigned short __b,
9982 __vector unsigned short __c) {
9983 return (__vector __bool short)__builtin_s390_vstrch(__a, __b, __c, 4);
9986 static inline __ATTRS_o_ai __vector __bool int
9987 vec_cmprg(__vector unsigned int __a, __vector unsigned int __b,
9988 __vector unsigned int __c) {
9989 return (__vector __bool int)__builtin_s390_vstrcf(__a, __b, __c, 4);
9992 /*-- vec_cmprg_cc -----------------------------------------------------------*/
9994 static inline __ATTRS_o_ai __vector __bool char
9995 vec_cmprg_cc(__vector unsigned char __a, __vector unsigned char __b,
9996 __vector unsigned char __c, int *__cc) {
9997 return (__vector __bool char)__builtin_s390_vstrcbs(__a, __b, __c, 4, __cc);
10000 static inline __ATTRS_o_ai __vector __bool short
10001 vec_cmprg_cc(__vector unsigned short __a, __vector unsigned short __b,
10002 __vector unsigned short __c, int *__cc) {
10003 return (__vector __bool short)__builtin_s390_vstrchs(__a, __b, __c, 4, __cc);
10006 static inline __ATTRS_o_ai __vector __bool int
10007 vec_cmprg_cc(__vector unsigned int __a, __vector unsigned int __b,
10008 __vector unsigned int __c, int *__cc) {
10009 return (__vector __bool int)__builtin_s390_vstrcfs(__a, __b, __c, 4, __cc);
10012 /*-- vec_cmprg_idx ----------------------------------------------------------*/
10014 static inline __ATTRS_o_ai __vector unsigned char
10015 vec_cmprg_idx(__vector unsigned char __a, __vector unsigned char __b,
10016 __vector unsigned char __c) {
10017 return __builtin_s390_vstrcb(__a, __b, __c, 0);
10020 static inline __ATTRS_o_ai __vector unsigned short
10021 vec_cmprg_idx(__vector unsigned short __a, __vector unsigned short __b,
10022 __vector unsigned short __c) {
10023 return __builtin_s390_vstrch(__a, __b, __c, 0);
10026 static inline __ATTRS_o_ai __vector unsigned int
10027 vec_cmprg_idx(__vector unsigned int __a, __vector unsigned int __b,
10028 __vector unsigned int __c) {
10029 return __builtin_s390_vstrcf(__a, __b, __c, 0);
10032 /*-- vec_cmprg_idx_cc -------------------------------------------------------*/
10034 static inline __ATTRS_o_ai __vector unsigned char
10035 vec_cmprg_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10036 __vector unsigned char __c, int *__cc) {
10037 return __builtin_s390_vstrcbs(__a, __b, __c, 0, __cc);
10040 static inline __ATTRS_o_ai __vector unsigned short
10041 vec_cmprg_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10042 __vector unsigned short __c, int *__cc) {
10043 return __builtin_s390_vstrchs(__a, __b, __c, 0, __cc);
10046 static inline __ATTRS_o_ai __vector unsigned int
10047 vec_cmprg_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10048 __vector unsigned int __c, int *__cc) {
10049 return __builtin_s390_vstrcfs(__a, __b, __c, 0, __cc);
10052 /*-- vec_cmprg_or_0_idx -----------------------------------------------------*/
10054 static inline __ATTRS_o_ai __vector unsigned char
10055 vec_cmprg_or_0_idx(__vector unsigned char __a, __vector unsigned char __b,
10056 __vector unsigned char __c) {
10057 return __builtin_s390_vstrczb(__a, __b, __c, 0);
10060 static inline __ATTRS_o_ai __vector unsigned short
10061 vec_cmprg_or_0_idx(__vector unsigned short __a, __vector unsigned short __b,
10062 __vector unsigned short __c) {
10063 return __builtin_s390_vstrczh(__a, __b, __c, 0);
10066 static inline __ATTRS_o_ai __vector unsigned int
10067 vec_cmprg_or_0_idx(__vector unsigned int __a, __vector unsigned int __b,
10068 __vector unsigned int __c) {
10069 return __builtin_s390_vstrczf(__a, __b, __c, 0);
10072 /*-- vec_cmprg_or_0_idx_cc --------------------------------------------------*/
10074 static inline __ATTRS_o_ai __vector unsigned char
10075 vec_cmprg_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10076 __vector unsigned char __c, int *__cc) {
10077 return __builtin_s390_vstrczbs(__a, __b, __c, 0, __cc);
10080 static inline __ATTRS_o_ai __vector unsigned short
10081 vec_cmprg_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10082 __vector unsigned short __c, int *__cc) {
10083 return __builtin_s390_vstrczhs(__a, __b, __c, 0, __cc);
10086 static inline __ATTRS_o_ai __vector unsigned int
10087 vec_cmprg_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10088 __vector unsigned int __c, int *__cc) {
10089 return __builtin_s390_vstrczfs(__a, __b, __c, 0, __cc);
10092 /*-- vec_cmpnrg -------------------------------------------------------------*/
10094 static inline __ATTRS_o_ai __vector __bool char
10095 vec_cmpnrg(__vector unsigned char __a, __vector unsigned char __b,
10096 __vector unsigned char __c) {
10097 return (__vector __bool char)__builtin_s390_vstrcb(__a, __b, __c, 12);
10100 static inline __ATTRS_o_ai __vector __bool short
10101 vec_cmpnrg(__vector unsigned short __a, __vector unsigned short __b,
10102 __vector unsigned short __c) {
10103 return (__vector __bool short)__builtin_s390_vstrch(__a, __b, __c, 12);
10106 static inline __ATTRS_o_ai __vector __bool int
10107 vec_cmpnrg(__vector unsigned int __a, __vector unsigned int __b,
10108 __vector unsigned int __c) {
10109 return (__vector __bool int)__builtin_s390_vstrcf(__a, __b, __c, 12);
10112 /*-- vec_cmpnrg_cc ----------------------------------------------------------*/
10114 static inline __ATTRS_o_ai __vector __bool char
10115 vec_cmpnrg_cc(__vector unsigned char __a, __vector unsigned char __b,
10116 __vector unsigned char __c, int *__cc) {
10117 return (__vector __bool char)
10118 __builtin_s390_vstrcbs(__a, __b, __c, 12, __cc);
10121 static inline __ATTRS_o_ai __vector __bool short
10122 vec_cmpnrg_cc(__vector unsigned short __a, __vector unsigned short __b,
10123 __vector unsigned short __c, int *__cc) {
10124 return (__vector __bool short)
10125 __builtin_s390_vstrchs(__a, __b, __c, 12, __cc);
10128 static inline __ATTRS_o_ai __vector __bool int
10129 vec_cmpnrg_cc(__vector unsigned int __a, __vector unsigned int __b,
10130 __vector unsigned int __c, int *__cc) {
10131 return (__vector __bool int)
10132 __builtin_s390_vstrcfs(__a, __b, __c, 12, __cc);
10135 /*-- vec_cmpnrg_idx ---------------------------------------------------------*/
10137 static inline __ATTRS_o_ai __vector unsigned char
10138 vec_cmpnrg_idx(__vector unsigned char __a, __vector unsigned char __b,
10139 __vector unsigned char __c) {
10140 return __builtin_s390_vstrcb(__a, __b, __c, 8);
10143 static inline __ATTRS_o_ai __vector unsigned short
10144 vec_cmpnrg_idx(__vector unsigned short __a, __vector unsigned short __b,
10145 __vector unsigned short __c) {
10146 return __builtin_s390_vstrch(__a, __b, __c, 8);
10149 static inline __ATTRS_o_ai __vector unsigned int
10150 vec_cmpnrg_idx(__vector unsigned int __a, __vector unsigned int __b,
10151 __vector unsigned int __c) {
10152 return __builtin_s390_vstrcf(__a, __b, __c, 8);
10155 /*-- vec_cmpnrg_idx_cc ------------------------------------------------------*/
10157 static inline __ATTRS_o_ai __vector unsigned char
10158 vec_cmpnrg_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10159 __vector unsigned char __c, int *__cc) {
10160 return __builtin_s390_vstrcbs(__a, __b, __c, 8, __cc);
10163 static inline __ATTRS_o_ai __vector unsigned short
10164 vec_cmpnrg_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10165 __vector unsigned short __c, int *__cc) {
10166 return __builtin_s390_vstrchs(__a, __b, __c, 8, __cc);
10169 static inline __ATTRS_o_ai __vector unsigned int
10170 vec_cmpnrg_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10171 __vector unsigned int __c, int *__cc) {
10172 return __builtin_s390_vstrcfs(__a, __b, __c, 8, __cc);
10175 /*-- vec_cmpnrg_or_0_idx ----------------------------------------------------*/
10177 static inline __ATTRS_o_ai __vector unsigned char
10178 vec_cmpnrg_or_0_idx(__vector unsigned char __a, __vector unsigned char __b,
10179 __vector unsigned char __c) {
10180 return __builtin_s390_vstrczb(__a, __b, __c, 8);
10183 static inline __ATTRS_o_ai __vector unsigned short
10184 vec_cmpnrg_or_0_idx(__vector unsigned short __a, __vector unsigned short __b,
10185 __vector unsigned short __c) {
10186 return __builtin_s390_vstrczh(__a, __b, __c, 8);
10189 static inline __ATTRS_o_ai __vector unsigned int
10190 vec_cmpnrg_or_0_idx(__vector unsigned int __a, __vector unsigned int __b,
10191 __vector unsigned int __c) {
10192 return __builtin_s390_vstrczf(__a, __b, __c, 8);
10195 /*-- vec_cmpnrg_or_0_idx_cc -------------------------------------------------*/
10197 static inline __ATTRS_o_ai __vector unsigned char
10198 vec_cmpnrg_or_0_idx_cc(__vector unsigned char __a,
10199 __vector unsigned char __b,
10200 __vector unsigned char __c, int *__cc) {
10201 return __builtin_s390_vstrczbs(__a, __b, __c, 8, __cc);
10204 static inline __ATTRS_o_ai __vector unsigned short
10205 vec_cmpnrg_or_0_idx_cc(__vector unsigned short __a,
10206 __vector unsigned short __b,
10207 __vector unsigned short __c, int *__cc) {
10208 return __builtin_s390_vstrczhs(__a, __b, __c, 8, __cc);
10211 static inline __ATTRS_o_ai __vector unsigned int
10212 vec_cmpnrg_or_0_idx_cc(__vector unsigned int __a,
10213 __vector unsigned int __b,
10214 __vector unsigned int __c, int *__cc) {
10215 return __builtin_s390_vstrczfs(__a, __b, __c, 8, __cc);
10218 /*-- vec_find_any_eq --------------------------------------------------------*/
10220 static inline __ATTRS_o_ai __vector __bool char
10221 vec_find_any_eq(__vector signed char __a, __vector signed char __b) {
10222 return (__vector __bool char)
10223 __builtin_s390_vfaeb((__vector unsigned char)__a,
10224 (__vector unsigned char)__b, 4);
10227 static inline __ATTRS_o_ai __vector __bool char
10228 vec_find_any_eq(__vector __bool char __a, __vector __bool char __b) {
10229 return (__vector __bool char)
10230 __builtin_s390_vfaeb((__vector unsigned char)__a,
10231 (__vector unsigned char)__b, 4);
10234 static inline __ATTRS_o_ai __vector __bool char
10235 vec_find_any_eq(__vector unsigned char __a, __vector unsigned char __b) {
10236 return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 4);
10239 static inline __ATTRS_o_ai __vector __bool short
10240 vec_find_any_eq(__vector signed short __a, __vector signed short __b) {
10241 return (__vector __bool short)
10242 __builtin_s390_vfaeh((__vector unsigned short)__a,
10243 (__vector unsigned short)__b, 4);
10246 static inline __ATTRS_o_ai __vector __bool short
10247 vec_find_any_eq(__vector __bool short __a, __vector __bool short __b) {
10248 return (__vector __bool short)
10249 __builtin_s390_vfaeh((__vector unsigned short)__a,
10250 (__vector unsigned short)__b, 4);
10253 static inline __ATTRS_o_ai __vector __bool short
10254 vec_find_any_eq(__vector unsigned short __a, __vector unsigned short __b) {
10255 return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 4);
10258 static inline __ATTRS_o_ai __vector __bool int
10259 vec_find_any_eq(__vector signed int __a, __vector signed int __b) {
10260 return (__vector __bool int)
10261 __builtin_s390_vfaef((__vector unsigned int)__a,
10262 (__vector unsigned int)__b, 4);
10265 static inline __ATTRS_o_ai __vector __bool int
10266 vec_find_any_eq(__vector __bool int __a, __vector __bool int __b) {
10267 return (__vector __bool int)
10268 __builtin_s390_vfaef((__vector unsigned int)__a,
10269 (__vector unsigned int)__b, 4);
10272 static inline __ATTRS_o_ai __vector __bool int
10273 vec_find_any_eq(__vector unsigned int __a, __vector unsigned int __b) {
10274 return (__vector __bool int)__builtin_s390_vfaef(__a, __b, 4);
10277 /*-- vec_find_any_eq_cc -----------------------------------------------------*/
10279 static inline __ATTRS_o_ai __vector __bool char
10280 vec_find_any_eq_cc(__vector signed char __a, __vector signed char __b,
10281 int *__cc) {
10282 return (__vector __bool char)
10283 __builtin_s390_vfaebs((__vector unsigned char)__a,
10284 (__vector unsigned char)__b, 4, __cc);
10287 static inline __ATTRS_o_ai __vector __bool char
10288 vec_find_any_eq_cc(__vector __bool char __a, __vector __bool char __b,
10289 int *__cc) {
10290 return (__vector __bool char)
10291 __builtin_s390_vfaebs((__vector unsigned char)__a,
10292 (__vector unsigned char)__b, 4, __cc);
10295 static inline __ATTRS_o_ai __vector __bool char
10296 vec_find_any_eq_cc(__vector unsigned char __a, __vector unsigned char __b,
10297 int *__cc) {
10298 return (__vector __bool char)__builtin_s390_vfaebs(__a, __b, 4, __cc);
10301 static inline __ATTRS_o_ai __vector __bool short
10302 vec_find_any_eq_cc(__vector signed short __a, __vector signed short __b,
10303 int *__cc) {
10304 return (__vector __bool short)
10305 __builtin_s390_vfaehs((__vector unsigned short)__a,
10306 (__vector unsigned short)__b, 4, __cc);
10309 static inline __ATTRS_o_ai __vector __bool short
10310 vec_find_any_eq_cc(__vector __bool short __a, __vector __bool short __b,
10311 int *__cc) {
10312 return (__vector __bool short)
10313 __builtin_s390_vfaehs((__vector unsigned short)__a,
10314 (__vector unsigned short)__b, 4, __cc);
10317 static inline __ATTRS_o_ai __vector __bool short
10318 vec_find_any_eq_cc(__vector unsigned short __a, __vector unsigned short __b,
10319 int *__cc) {
10320 return (__vector __bool short)__builtin_s390_vfaehs(__a, __b, 4, __cc);
10323 static inline __ATTRS_o_ai __vector __bool int
10324 vec_find_any_eq_cc(__vector signed int __a, __vector signed int __b,
10325 int *__cc) {
10326 return (__vector __bool int)
10327 __builtin_s390_vfaefs((__vector unsigned int)__a,
10328 (__vector unsigned int)__b, 4, __cc);
10331 static inline __ATTRS_o_ai __vector __bool int
10332 vec_find_any_eq_cc(__vector __bool int __a, __vector __bool int __b,
10333 int *__cc) {
10334 return (__vector __bool int)
10335 __builtin_s390_vfaefs((__vector unsigned int)__a,
10336 (__vector unsigned int)__b, 4, __cc);
10339 static inline __ATTRS_o_ai __vector __bool int
10340 vec_find_any_eq_cc(__vector unsigned int __a, __vector unsigned int __b,
10341 int *__cc) {
10342 return (__vector __bool int)__builtin_s390_vfaefs(__a, __b, 4, __cc);
10345 /*-- vec_find_any_eq_idx ----------------------------------------------------*/
10347 static inline __ATTRS_o_ai __vector signed char
10348 vec_find_any_eq_idx(__vector signed char __a, __vector signed char __b) {
10349 return (__vector signed char)
10350 __builtin_s390_vfaeb((__vector unsigned char)__a,
10351 (__vector unsigned char)__b, 0);
10354 static inline __ATTRS_o_ai __vector unsigned char
10355 vec_find_any_eq_idx(__vector __bool char __a, __vector __bool char __b) {
10356 return __builtin_s390_vfaeb((__vector unsigned char)__a,
10357 (__vector unsigned char)__b, 0);
10360 static inline __ATTRS_o_ai __vector unsigned char
10361 vec_find_any_eq_idx(__vector unsigned char __a, __vector unsigned char __b) {
10362 return __builtin_s390_vfaeb(__a, __b, 0);
10365 static inline __ATTRS_o_ai __vector signed short
10366 vec_find_any_eq_idx(__vector signed short __a, __vector signed short __b) {
10367 return (__vector signed short)
10368 __builtin_s390_vfaeh((__vector unsigned short)__a,
10369 (__vector unsigned short)__b, 0);
10372 static inline __ATTRS_o_ai __vector unsigned short
10373 vec_find_any_eq_idx(__vector __bool short __a, __vector __bool short __b) {
10374 return __builtin_s390_vfaeh((__vector unsigned short)__a,
10375 (__vector unsigned short)__b, 0);
10378 static inline __ATTRS_o_ai __vector unsigned short
10379 vec_find_any_eq_idx(__vector unsigned short __a, __vector unsigned short __b) {
10380 return __builtin_s390_vfaeh(__a, __b, 0);
10383 static inline __ATTRS_o_ai __vector signed int
10384 vec_find_any_eq_idx(__vector signed int __a, __vector signed int __b) {
10385 return (__vector signed int)
10386 __builtin_s390_vfaef((__vector unsigned int)__a,
10387 (__vector unsigned int)__b, 0);
10390 static inline __ATTRS_o_ai __vector unsigned int
10391 vec_find_any_eq_idx(__vector __bool int __a, __vector __bool int __b) {
10392 return __builtin_s390_vfaef((__vector unsigned int)__a,
10393 (__vector unsigned int)__b, 0);
10396 static inline __ATTRS_o_ai __vector unsigned int
10397 vec_find_any_eq_idx(__vector unsigned int __a, __vector unsigned int __b) {
10398 return __builtin_s390_vfaef(__a, __b, 0);
10401 /*-- vec_find_any_eq_idx_cc -------------------------------------------------*/
10403 static inline __ATTRS_o_ai __vector signed char
10404 vec_find_any_eq_idx_cc(__vector signed char __a,
10405 __vector signed char __b, int *__cc) {
10406 return (__vector signed char)
10407 __builtin_s390_vfaebs((__vector unsigned char)__a,
10408 (__vector unsigned char)__b, 0, __cc);
10411 static inline __ATTRS_o_ai __vector unsigned char
10412 vec_find_any_eq_idx_cc(__vector __bool char __a,
10413 __vector __bool char __b, int *__cc) {
10414 return __builtin_s390_vfaebs((__vector unsigned char)__a,
10415 (__vector unsigned char)__b, 0, __cc);
10418 static inline __ATTRS_o_ai __vector unsigned char
10419 vec_find_any_eq_idx_cc(__vector unsigned char __a,
10420 __vector unsigned char __b, int *__cc) {
10421 return __builtin_s390_vfaebs(__a, __b, 0, __cc);
10424 static inline __ATTRS_o_ai __vector signed short
10425 vec_find_any_eq_idx_cc(__vector signed short __a,
10426 __vector signed short __b, int *__cc) {
10427 return (__vector signed short)
10428 __builtin_s390_vfaehs((__vector unsigned short)__a,
10429 (__vector unsigned short)__b, 0, __cc);
10432 static inline __ATTRS_o_ai __vector unsigned short
10433 vec_find_any_eq_idx_cc(__vector __bool short __a,
10434 __vector __bool short __b, int *__cc) {
10435 return __builtin_s390_vfaehs((__vector unsigned short)__a,
10436 (__vector unsigned short)__b, 0, __cc);
10439 static inline __ATTRS_o_ai __vector unsigned short
10440 vec_find_any_eq_idx_cc(__vector unsigned short __a,
10441 __vector unsigned short __b, int *__cc) {
10442 return __builtin_s390_vfaehs(__a, __b, 0, __cc);
10445 static inline __ATTRS_o_ai __vector signed int
10446 vec_find_any_eq_idx_cc(__vector signed int __a,
10447 __vector signed int __b, int *__cc) {
10448 return (__vector signed int)
10449 __builtin_s390_vfaefs((__vector unsigned int)__a,
10450 (__vector unsigned int)__b, 0, __cc);
10453 static inline __ATTRS_o_ai __vector unsigned int
10454 vec_find_any_eq_idx_cc(__vector __bool int __a,
10455 __vector __bool int __b, int *__cc) {
10456 return __builtin_s390_vfaefs((__vector unsigned int)__a,
10457 (__vector unsigned int)__b, 0, __cc);
10460 static inline __ATTRS_o_ai __vector unsigned int
10461 vec_find_any_eq_idx_cc(__vector unsigned int __a,
10462 __vector unsigned int __b, int *__cc) {
10463 return __builtin_s390_vfaefs(__a, __b, 0, __cc);
10466 /*-- vec_find_any_eq_or_0_idx -----------------------------------------------*/
10468 static inline __ATTRS_o_ai __vector signed char
10469 vec_find_any_eq_or_0_idx(__vector signed char __a,
10470 __vector signed char __b) {
10471 return (__vector signed char)
10472 __builtin_s390_vfaezb((__vector unsigned char)__a,
10473 (__vector unsigned char)__b, 0);
10476 static inline __ATTRS_o_ai __vector unsigned char
10477 vec_find_any_eq_or_0_idx(__vector __bool char __a,
10478 __vector __bool char __b) {
10479 return __builtin_s390_vfaezb((__vector unsigned char)__a,
10480 (__vector unsigned char)__b, 0);
10483 static inline __ATTRS_o_ai __vector unsigned char
10484 vec_find_any_eq_or_0_idx(__vector unsigned char __a,
10485 __vector unsigned char __b) {
10486 return __builtin_s390_vfaezb(__a, __b, 0);
10489 static inline __ATTRS_o_ai __vector signed short
10490 vec_find_any_eq_or_0_idx(__vector signed short __a,
10491 __vector signed short __b) {
10492 return (__vector signed short)
10493 __builtin_s390_vfaezh((__vector unsigned short)__a,
10494 (__vector unsigned short)__b, 0);
10497 static inline __ATTRS_o_ai __vector unsigned short
10498 vec_find_any_eq_or_0_idx(__vector __bool short __a,
10499 __vector __bool short __b) {
10500 return __builtin_s390_vfaezh((__vector unsigned short)__a,
10501 (__vector unsigned short)__b, 0);
10504 static inline __ATTRS_o_ai __vector unsigned short
10505 vec_find_any_eq_or_0_idx(__vector unsigned short __a,
10506 __vector unsigned short __b) {
10507 return __builtin_s390_vfaezh(__a, __b, 0);
10510 static inline __ATTRS_o_ai __vector signed int
10511 vec_find_any_eq_or_0_idx(__vector signed int __a,
10512 __vector signed int __b) {
10513 return (__vector signed int)
10514 __builtin_s390_vfaezf((__vector unsigned int)__a,
10515 (__vector unsigned int)__b, 0);
10518 static inline __ATTRS_o_ai __vector unsigned int
10519 vec_find_any_eq_or_0_idx(__vector __bool int __a,
10520 __vector __bool int __b) {
10521 return __builtin_s390_vfaezf((__vector unsigned int)__a,
10522 (__vector unsigned int)__b, 0);
10525 static inline __ATTRS_o_ai __vector unsigned int
10526 vec_find_any_eq_or_0_idx(__vector unsigned int __a,
10527 __vector unsigned int __b) {
10528 return __builtin_s390_vfaezf(__a, __b, 0);
10531 /*-- vec_find_any_eq_or_0_idx_cc --------------------------------------------*/
10533 static inline __ATTRS_o_ai __vector signed char
10534 vec_find_any_eq_or_0_idx_cc(__vector signed char __a,
10535 __vector signed char __b, int *__cc) {
10536 return (__vector signed char)
10537 __builtin_s390_vfaezbs((__vector unsigned char)__a,
10538 (__vector unsigned char)__b, 0, __cc);
10541 static inline __ATTRS_o_ai __vector unsigned char
10542 vec_find_any_eq_or_0_idx_cc(__vector __bool char __a,
10543 __vector __bool char __b, int *__cc) {
10544 return __builtin_s390_vfaezbs((__vector unsigned char)__a,
10545 (__vector unsigned char)__b, 0, __cc);
10548 static inline __ATTRS_o_ai __vector unsigned char
10549 vec_find_any_eq_or_0_idx_cc(__vector unsigned char __a,
10550 __vector unsigned char __b, int *__cc) {
10551 return __builtin_s390_vfaezbs(__a, __b, 0, __cc);
10554 static inline __ATTRS_o_ai __vector signed short
10555 vec_find_any_eq_or_0_idx_cc(__vector signed short __a,
10556 __vector signed short __b, int *__cc) {
10557 return (__vector signed short)
10558 __builtin_s390_vfaezhs((__vector unsigned short)__a,
10559 (__vector unsigned short)__b, 0, __cc);
10562 static inline __ATTRS_o_ai __vector unsigned short
10563 vec_find_any_eq_or_0_idx_cc(__vector __bool short __a,
10564 __vector __bool short __b, int *__cc) {
10565 return __builtin_s390_vfaezhs((__vector unsigned short)__a,
10566 (__vector unsigned short)__b, 0, __cc);
10569 static inline __ATTRS_o_ai __vector unsigned short
10570 vec_find_any_eq_or_0_idx_cc(__vector unsigned short __a,
10571 __vector unsigned short __b, int *__cc) {
10572 return __builtin_s390_vfaezhs(__a, __b, 0, __cc);
10575 static inline __ATTRS_o_ai __vector signed int
10576 vec_find_any_eq_or_0_idx_cc(__vector signed int __a,
10577 __vector signed int __b, int *__cc) {
10578 return (__vector signed int)
10579 __builtin_s390_vfaezfs((__vector unsigned int)__a,
10580 (__vector unsigned int)__b, 0, __cc);
10583 static inline __ATTRS_o_ai __vector unsigned int
10584 vec_find_any_eq_or_0_idx_cc(__vector __bool int __a,
10585 __vector __bool int __b, int *__cc) {
10586 return __builtin_s390_vfaezfs((__vector unsigned int)__a,
10587 (__vector unsigned int)__b, 0, __cc);
10590 static inline __ATTRS_o_ai __vector unsigned int
10591 vec_find_any_eq_or_0_idx_cc(__vector unsigned int __a,
10592 __vector unsigned int __b, int *__cc) {
10593 return __builtin_s390_vfaezfs(__a, __b, 0, __cc);
10596 /*-- vec_find_any_ne --------------------------------------------------------*/
10598 static inline __ATTRS_o_ai __vector __bool char
10599 vec_find_any_ne(__vector signed char __a, __vector signed char __b) {
10600 return (__vector __bool char)
10601 __builtin_s390_vfaeb((__vector unsigned char)__a,
10602 (__vector unsigned char)__b, 12);
10605 static inline __ATTRS_o_ai __vector __bool char
10606 vec_find_any_ne(__vector __bool char __a, __vector __bool char __b) {
10607 return (__vector __bool char)
10608 __builtin_s390_vfaeb((__vector unsigned char)__a,
10609 (__vector unsigned char)__b, 12);
10612 static inline __ATTRS_o_ai __vector __bool char
10613 vec_find_any_ne(__vector unsigned char __a, __vector unsigned char __b) {
10614 return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 12);
10617 static inline __ATTRS_o_ai __vector __bool short
10618 vec_find_any_ne(__vector signed short __a, __vector signed short __b) {
10619 return (__vector __bool short)
10620 __builtin_s390_vfaeh((__vector unsigned short)__a,
10621 (__vector unsigned short)__b, 12);
10624 static inline __ATTRS_o_ai __vector __bool short
10625 vec_find_any_ne(__vector __bool short __a, __vector __bool short __b) {
10626 return (__vector __bool short)
10627 __builtin_s390_vfaeh((__vector unsigned short)__a,
10628 (__vector unsigned short)__b, 12);
10631 static inline __ATTRS_o_ai __vector __bool short
10632 vec_find_any_ne(__vector unsigned short __a, __vector unsigned short __b) {
10633 return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 12);
10636 static inline __ATTRS_o_ai __vector __bool int
10637 vec_find_any_ne(__vector signed int __a, __vector signed int __b) {
10638 return (__vector __bool int)
10639 __builtin_s390_vfaef((__vector unsigned int)__a,
10640 (__vector unsigned int)__b, 12);
10643 static inline __ATTRS_o_ai __vector __bool int
10644 vec_find_any_ne(__vector __bool int __a, __vector __bool int __b) {
10645 return (__vector __bool int)
10646 __builtin_s390_vfaef((__vector unsigned int)__a,
10647 (__vector unsigned int)__b, 12);
10650 static inline __ATTRS_o_ai __vector __bool int
10651 vec_find_any_ne(__vector unsigned int __a, __vector unsigned int __b) {
10652 return (__vector __bool int)__builtin_s390_vfaef(__a, __b, 12);
10655 /*-- vec_find_any_ne_cc -----------------------------------------------------*/
10657 static inline __ATTRS_o_ai __vector __bool char
10658 vec_find_any_ne_cc(__vector signed char __a,
10659 __vector signed char __b, int *__cc) {
10660 return (__vector __bool char)
10661 __builtin_s390_vfaebs((__vector unsigned char)__a,
10662 (__vector unsigned char)__b, 12, __cc);
10665 static inline __ATTRS_o_ai __vector __bool char
10666 vec_find_any_ne_cc(__vector __bool char __a,
10667 __vector __bool char __b, int *__cc) {
10668 return (__vector __bool char)
10669 __builtin_s390_vfaebs((__vector unsigned char)__a,
10670 (__vector unsigned char)__b, 12, __cc);
10673 static inline __ATTRS_o_ai __vector __bool char
10674 vec_find_any_ne_cc(__vector unsigned char __a,
10675 __vector unsigned char __b, int *__cc) {
10676 return (__vector __bool char)__builtin_s390_vfaebs(__a, __b, 12, __cc);
10679 static inline __ATTRS_o_ai __vector __bool short
10680 vec_find_any_ne_cc(__vector signed short __a,
10681 __vector signed short __b, int *__cc) {
10682 return (__vector __bool short)
10683 __builtin_s390_vfaehs((__vector unsigned short)__a,
10684 (__vector unsigned short)__b, 12, __cc);
10687 static inline __ATTRS_o_ai __vector __bool short
10688 vec_find_any_ne_cc(__vector __bool short __a,
10689 __vector __bool short __b, int *__cc) {
10690 return (__vector __bool short)
10691 __builtin_s390_vfaehs((__vector unsigned short)__a,
10692 (__vector unsigned short)__b, 12, __cc);
10695 static inline __ATTRS_o_ai __vector __bool short
10696 vec_find_any_ne_cc(__vector unsigned short __a,
10697 __vector unsigned short __b, int *__cc) {
10698 return (__vector __bool short)__builtin_s390_vfaehs(__a, __b, 12, __cc);
10701 static inline __ATTRS_o_ai __vector __bool int
10702 vec_find_any_ne_cc(__vector signed int __a,
10703 __vector signed int __b, int *__cc) {
10704 return (__vector __bool int)
10705 __builtin_s390_vfaefs((__vector unsigned int)__a,
10706 (__vector unsigned int)__b, 12, __cc);
10709 static inline __ATTRS_o_ai __vector __bool int
10710 vec_find_any_ne_cc(__vector __bool int __a,
10711 __vector __bool int __b, int *__cc) {
10712 return (__vector __bool int)
10713 __builtin_s390_vfaefs((__vector unsigned int)__a,
10714 (__vector unsigned int)__b, 12, __cc);
10717 static inline __ATTRS_o_ai __vector __bool int
10718 vec_find_any_ne_cc(__vector unsigned int __a,
10719 __vector unsigned int __b, int *__cc) {
10720 return (__vector __bool int)__builtin_s390_vfaefs(__a, __b, 12, __cc);
10723 /*-- vec_find_any_ne_idx ----------------------------------------------------*/
10725 static inline __ATTRS_o_ai __vector signed char
10726 vec_find_any_ne_idx(__vector signed char __a, __vector signed char __b) {
10727 return (__vector signed char)
10728 __builtin_s390_vfaeb((__vector unsigned char)__a,
10729 (__vector unsigned char)__b, 8);
10732 static inline __ATTRS_o_ai __vector unsigned char
10733 vec_find_any_ne_idx(__vector __bool char __a, __vector __bool char __b) {
10734 return __builtin_s390_vfaeb((__vector unsigned char)__a,
10735 (__vector unsigned char)__b, 8);
10738 static inline __ATTRS_o_ai __vector unsigned char
10739 vec_find_any_ne_idx(__vector unsigned char __a, __vector unsigned char __b) {
10740 return __builtin_s390_vfaeb(__a, __b, 8);
10743 static inline __ATTRS_o_ai __vector signed short
10744 vec_find_any_ne_idx(__vector signed short __a, __vector signed short __b) {
10745 return (__vector signed short)
10746 __builtin_s390_vfaeh((__vector unsigned short)__a,
10747 (__vector unsigned short)__b, 8);
10750 static inline __ATTRS_o_ai __vector unsigned short
10751 vec_find_any_ne_idx(__vector __bool short __a, __vector __bool short __b) {
10752 return __builtin_s390_vfaeh((__vector unsigned short)__a,
10753 (__vector unsigned short)__b, 8);
10756 static inline __ATTRS_o_ai __vector unsigned short
10757 vec_find_any_ne_idx(__vector unsigned short __a, __vector unsigned short __b) {
10758 return __builtin_s390_vfaeh(__a, __b, 8);
10761 static inline __ATTRS_o_ai __vector signed int
10762 vec_find_any_ne_idx(__vector signed int __a, __vector signed int __b) {
10763 return (__vector signed int)
10764 __builtin_s390_vfaef((__vector unsigned int)__a,
10765 (__vector unsigned int)__b, 8);
10768 static inline __ATTRS_o_ai __vector unsigned int
10769 vec_find_any_ne_idx(__vector __bool int __a, __vector __bool int __b) {
10770 return __builtin_s390_vfaef((__vector unsigned int)__a,
10771 (__vector unsigned int)__b, 8);
10774 static inline __ATTRS_o_ai __vector unsigned int
10775 vec_find_any_ne_idx(__vector unsigned int __a, __vector unsigned int __b) {
10776 return __builtin_s390_vfaef(__a, __b, 8);
10779 /*-- vec_find_any_ne_idx_cc -------------------------------------------------*/
10781 static inline __ATTRS_o_ai __vector signed char
10782 vec_find_any_ne_idx_cc(__vector signed char __a,
10783 __vector signed char __b, int *__cc) {
10784 return (__vector signed char)
10785 __builtin_s390_vfaebs((__vector unsigned char)__a,
10786 (__vector unsigned char)__b, 8, __cc);
10789 static inline __ATTRS_o_ai __vector unsigned char
10790 vec_find_any_ne_idx_cc(__vector __bool char __a,
10791 __vector __bool char __b, int *__cc) {
10792 return __builtin_s390_vfaebs((__vector unsigned char)__a,
10793 (__vector unsigned char)__b, 8, __cc);
10796 static inline __ATTRS_o_ai __vector unsigned char
10797 vec_find_any_ne_idx_cc(__vector unsigned char __a,
10798 __vector unsigned char __b,
10799 int *__cc) {
10800 return __builtin_s390_vfaebs(__a, __b, 8, __cc);
10803 static inline __ATTRS_o_ai __vector signed short
10804 vec_find_any_ne_idx_cc(__vector signed short __a,
10805 __vector signed short __b, int *__cc) {
10806 return (__vector signed short)
10807 __builtin_s390_vfaehs((__vector unsigned short)__a,
10808 (__vector unsigned short)__b, 8, __cc);
10811 static inline __ATTRS_o_ai __vector unsigned short
10812 vec_find_any_ne_idx_cc(__vector __bool short __a,
10813 __vector __bool short __b, int *__cc) {
10814 return __builtin_s390_vfaehs((__vector unsigned short)__a,
10815 (__vector unsigned short)__b, 8, __cc);
10818 static inline __ATTRS_o_ai __vector unsigned short
10819 vec_find_any_ne_idx_cc(__vector unsigned short __a,
10820 __vector unsigned short __b, int *__cc) {
10821 return __builtin_s390_vfaehs(__a, __b, 8, __cc);
10824 static inline __ATTRS_o_ai __vector signed int
10825 vec_find_any_ne_idx_cc(__vector signed int __a,
10826 __vector signed int __b, int *__cc) {
10827 return (__vector signed int)
10828 __builtin_s390_vfaefs((__vector unsigned int)__a,
10829 (__vector unsigned int)__b, 8, __cc);
10832 static inline __ATTRS_o_ai __vector unsigned int
10833 vec_find_any_ne_idx_cc(__vector __bool int __a,
10834 __vector __bool int __b, int *__cc) {
10835 return __builtin_s390_vfaefs((__vector unsigned int)__a,
10836 (__vector unsigned int)__b, 8, __cc);
10839 static inline __ATTRS_o_ai __vector unsigned int
10840 vec_find_any_ne_idx_cc(__vector unsigned int __a,
10841 __vector unsigned int __b, int *__cc) {
10842 return __builtin_s390_vfaefs(__a, __b, 8, __cc);
10845 /*-- vec_find_any_ne_or_0_idx -----------------------------------------------*/
10847 static inline __ATTRS_o_ai __vector signed char
10848 vec_find_any_ne_or_0_idx(__vector signed char __a,
10849 __vector signed char __b) {
10850 return (__vector signed char)
10851 __builtin_s390_vfaezb((__vector unsigned char)__a,
10852 (__vector unsigned char)__b, 8);
10855 static inline __ATTRS_o_ai __vector unsigned char
10856 vec_find_any_ne_or_0_idx(__vector __bool char __a,
10857 __vector __bool char __b) {
10858 return __builtin_s390_vfaezb((__vector unsigned char)__a,
10859 (__vector unsigned char)__b, 8);
10862 static inline __ATTRS_o_ai __vector unsigned char
10863 vec_find_any_ne_or_0_idx(__vector unsigned char __a,
10864 __vector unsigned char __b) {
10865 return __builtin_s390_vfaezb(__a, __b, 8);
10868 static inline __ATTRS_o_ai __vector signed short
10869 vec_find_any_ne_or_0_idx(__vector signed short __a,
10870 __vector signed short __b) {
10871 return (__vector signed short)
10872 __builtin_s390_vfaezh((__vector unsigned short)__a,
10873 (__vector unsigned short)__b, 8);
10876 static inline __ATTRS_o_ai __vector unsigned short
10877 vec_find_any_ne_or_0_idx(__vector __bool short __a,
10878 __vector __bool short __b) {
10879 return __builtin_s390_vfaezh((__vector unsigned short)__a,
10880 (__vector unsigned short)__b, 8);
10883 static inline __ATTRS_o_ai __vector unsigned short
10884 vec_find_any_ne_or_0_idx(__vector unsigned short __a,
10885 __vector unsigned short __b) {
10886 return __builtin_s390_vfaezh(__a, __b, 8);
10889 static inline __ATTRS_o_ai __vector signed int
10890 vec_find_any_ne_or_0_idx(__vector signed int __a,
10891 __vector signed int __b) {
10892 return (__vector signed int)
10893 __builtin_s390_vfaezf((__vector unsigned int)__a,
10894 (__vector unsigned int)__b, 8);
10897 static inline __ATTRS_o_ai __vector unsigned int
10898 vec_find_any_ne_or_0_idx(__vector __bool int __a,
10899 __vector __bool int __b) {
10900 return __builtin_s390_vfaezf((__vector unsigned int)__a,
10901 (__vector unsigned int)__b, 8);
10904 static inline __ATTRS_o_ai __vector unsigned int
10905 vec_find_any_ne_or_0_idx(__vector unsigned int __a,
10906 __vector unsigned int __b) {
10907 return __builtin_s390_vfaezf(__a, __b, 8);
10910 /*-- vec_find_any_ne_or_0_idx_cc --------------------------------------------*/
10912 static inline __ATTRS_o_ai __vector signed char
10913 vec_find_any_ne_or_0_idx_cc(__vector signed char __a,
10914 __vector signed char __b, int *__cc) {
10915 return (__vector signed char)
10916 __builtin_s390_vfaezbs((__vector unsigned char)__a,
10917 (__vector unsigned char)__b, 8, __cc);
10920 static inline __ATTRS_o_ai __vector unsigned char
10921 vec_find_any_ne_or_0_idx_cc(__vector __bool char __a,
10922 __vector __bool char __b, int *__cc) {
10923 return __builtin_s390_vfaezbs((__vector unsigned char)__a,
10924 (__vector unsigned char)__b, 8, __cc);
10927 static inline __ATTRS_o_ai __vector unsigned char
10928 vec_find_any_ne_or_0_idx_cc(__vector unsigned char __a,
10929 __vector unsigned char __b, int *__cc) {
10930 return __builtin_s390_vfaezbs(__a, __b, 8, __cc);
10933 static inline __ATTRS_o_ai __vector signed short
10934 vec_find_any_ne_or_0_idx_cc(__vector signed short __a,
10935 __vector signed short __b, int *__cc) {
10936 return (__vector signed short)
10937 __builtin_s390_vfaezhs((__vector unsigned short)__a,
10938 (__vector unsigned short)__b, 8, __cc);
10941 static inline __ATTRS_o_ai __vector unsigned short
10942 vec_find_any_ne_or_0_idx_cc(__vector __bool short __a,
10943 __vector __bool short __b, int *__cc) {
10944 return __builtin_s390_vfaezhs((__vector unsigned short)__a,
10945 (__vector unsigned short)__b, 8, __cc);
10948 static inline __ATTRS_o_ai __vector unsigned short
10949 vec_find_any_ne_or_0_idx_cc(__vector unsigned short __a,
10950 __vector unsigned short __b, int *__cc) {
10951 return __builtin_s390_vfaezhs(__a, __b, 8, __cc);
10954 static inline __ATTRS_o_ai __vector signed int
10955 vec_find_any_ne_or_0_idx_cc(__vector signed int __a,
10956 __vector signed int __b, int *__cc) {
10957 return (__vector signed int)
10958 __builtin_s390_vfaezfs((__vector unsigned int)__a,
10959 (__vector unsigned int)__b, 8, __cc);
10962 static inline __ATTRS_o_ai __vector unsigned int
10963 vec_find_any_ne_or_0_idx_cc(__vector __bool int __a,
10964 __vector __bool int __b, int *__cc) {
10965 return __builtin_s390_vfaezfs((__vector unsigned int)__a,
10966 (__vector unsigned int)__b, 8, __cc);
10969 static inline __ATTRS_o_ai __vector unsigned int
10970 vec_find_any_ne_or_0_idx_cc(__vector unsigned int __a,
10971 __vector unsigned int __b, int *__cc) {
10972 return __builtin_s390_vfaezfs(__a, __b, 8, __cc);
10975 /*-- vec_search_string_cc ---------------------------------------------------*/
10977 #if __ARCH__ >= 13
10979 static inline __ATTRS_o_ai __vector unsigned char
10980 vec_search_string_cc(__vector signed char __a, __vector signed char __b,
10981 __vector unsigned char __c, int *__cc) {
10982 return __builtin_s390_vstrsb((__vector unsigned char)__a,
10983 (__vector unsigned char)__b, __c, __cc);
10986 static inline __ATTRS_o_ai __vector unsigned char
10987 vec_search_string_cc(__vector __bool char __a, __vector __bool char __b,
10988 __vector unsigned char __c, int *__cc) {
10989 return __builtin_s390_vstrsb((__vector unsigned char)__a,
10990 (__vector unsigned char)__b, __c, __cc);
10993 static inline __ATTRS_o_ai __vector unsigned char
10994 vec_search_string_cc(__vector unsigned char __a, __vector unsigned char __b,
10995 __vector unsigned char __c, int *__cc) {
10996 return __builtin_s390_vstrsb(__a, __b, __c, __cc);
10999 static inline __ATTRS_o_ai __vector unsigned char
11000 vec_search_string_cc(__vector signed short __a, __vector signed short __b,
11001 __vector unsigned char __c, int *__cc) {
11002 return __builtin_s390_vstrsh((__vector unsigned short)__a,
11003 (__vector unsigned short)__b, __c, __cc);
11006 static inline __ATTRS_o_ai __vector unsigned char
11007 vec_search_string_cc(__vector __bool short __a, __vector __bool short __b,
11008 __vector unsigned char __c, int *__cc) {
11009 return __builtin_s390_vstrsh((__vector unsigned short)__a,
11010 (__vector unsigned short)__b, __c, __cc);
11013 static inline __ATTRS_o_ai __vector unsigned char
11014 vec_search_string_cc(__vector unsigned short __a, __vector unsigned short __b,
11015 __vector unsigned char __c, int *__cc) {
11016 return __builtin_s390_vstrsh(__a, __b, __c, __cc);
11019 static inline __ATTRS_o_ai __vector unsigned char
11020 vec_search_string_cc(__vector signed int __a, __vector signed int __b,
11021 __vector unsigned char __c, int *__cc) {
11022 return __builtin_s390_vstrsf((__vector unsigned int)__a,
11023 (__vector unsigned int)__b, __c, __cc);
11026 static inline __ATTRS_o_ai __vector unsigned char
11027 vec_search_string_cc(__vector __bool int __a, __vector __bool int __b,
11028 __vector unsigned char __c, int *__cc) {
11029 return __builtin_s390_vstrsf((__vector unsigned int)__a,
11030 (__vector unsigned int)__b, __c, __cc);
11033 static inline __ATTRS_o_ai __vector unsigned char
11034 vec_search_string_cc(__vector unsigned int __a, __vector unsigned int __b,
11035 __vector unsigned char __c, int *__cc) {
11036 return __builtin_s390_vstrsf(__a, __b, __c, __cc);
11039 #endif
11041 /*-- vec_search_string_until_zero_cc ----------------------------------------*/
11043 #if __ARCH__ >= 13
11045 static inline __ATTRS_o_ai __vector unsigned char
11046 vec_search_string_until_zero_cc(__vector signed char __a,
11047 __vector signed char __b,
11048 __vector unsigned char __c, int *__cc) {
11049 return __builtin_s390_vstrszb((__vector unsigned char)__a,
11050 (__vector unsigned char)__b, __c, __cc);
11053 static inline __ATTRS_o_ai __vector unsigned char
11054 vec_search_string_until_zero_cc(__vector __bool char __a,
11055 __vector __bool char __b,
11056 __vector unsigned char __c, int *__cc) {
11057 return __builtin_s390_vstrszb((__vector unsigned char)__a,
11058 (__vector unsigned char)__b, __c, __cc);
11061 static inline __ATTRS_o_ai __vector unsigned char
11062 vec_search_string_until_zero_cc(__vector unsigned char __a,
11063 __vector unsigned char __b,
11064 __vector unsigned char __c, int *__cc) {
11065 return __builtin_s390_vstrszb(__a, __b, __c, __cc);
11068 static inline __ATTRS_o_ai __vector unsigned char
11069 vec_search_string_until_zero_cc(__vector signed short __a,
11070 __vector signed short __b,
11071 __vector unsigned char __c, int *__cc) {
11072 return __builtin_s390_vstrszh((__vector unsigned short)__a,
11073 (__vector unsigned short)__b, __c, __cc);
11076 static inline __ATTRS_o_ai __vector unsigned char
11077 vec_search_string_until_zero_cc(__vector __bool short __a,
11078 __vector __bool short __b,
11079 __vector unsigned char __c, int *__cc) {
11080 return __builtin_s390_vstrszh((__vector unsigned short)__a,
11081 (__vector unsigned short)__b, __c, __cc);
11084 static inline __ATTRS_o_ai __vector unsigned char
11085 vec_search_string_until_zero_cc(__vector unsigned short __a,
11086 __vector unsigned short __b,
11087 __vector unsigned char __c, int *__cc) {
11088 return __builtin_s390_vstrszh(__a, __b, __c, __cc);
11091 static inline __ATTRS_o_ai __vector unsigned char
11092 vec_search_string_until_zero_cc(__vector signed int __a,
11093 __vector signed int __b,
11094 __vector unsigned char __c, int *__cc) {
11095 return __builtin_s390_vstrszf((__vector unsigned int)__a,
11096 (__vector unsigned int)__b, __c, __cc);
11099 static inline __ATTRS_o_ai __vector unsigned char
11100 vec_search_string_until_zero_cc(__vector __bool int __a,
11101 __vector __bool int __b,
11102 __vector unsigned char __c, int *__cc) {
11103 return __builtin_s390_vstrszf((__vector unsigned int)__a,
11104 (__vector unsigned int)__b, __c, __cc);
11107 static inline __ATTRS_o_ai __vector unsigned char
11108 vec_search_string_until_zero_cc(__vector unsigned int __a,
11109 __vector unsigned int __b,
11110 __vector unsigned char __c, int *__cc) {
11111 return __builtin_s390_vstrszf(__a, __b, __c, __cc);
11114 #endif
11116 #undef __constant_pow2_range
11117 #undef __constant_range
11118 #undef __constant
11119 #undef __ATTRS_o
11120 #undef __ATTRS_o_ai
11121 #undef __ATTRS_ai
11123 #else
11125 #error "Use -fzvector to enable vector extensions"
11127 #endif