[Flang] remove whole-archive option for AIX linker (#76039)
[llvm-project.git] / clang / lib / Headers / vecintrin.h
blob1f51e32c0d136d6b354b2af42fb8cb487a23d236
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_vlrlr(__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_vstrlr((__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((__vector unsigned char)__a,
2693 (__vector unsigned char)__b, &__cc);
2694 return __cc == 0;
2697 // This prototype is deprecated.
2698 static inline __ATTRS_o_ai int
2699 vec_all_eq(__vector signed char __a, __vector __bool char __b) {
2700 int __cc;
2701 __builtin_s390_vceqbs((__vector unsigned char)__a,
2702 (__vector unsigned char)__b, &__cc);
2703 return __cc == 0;
2706 // This prototype is deprecated.
2707 static inline __ATTRS_o_ai int
2708 vec_all_eq(__vector __bool char __a, __vector signed char __b) {
2709 int __cc;
2710 __builtin_s390_vceqbs((__vector unsigned char)__a,
2711 (__vector unsigned char)__b, &__cc);
2712 return __cc == 0;
2715 static inline __ATTRS_o_ai int
2716 vec_all_eq(__vector unsigned char __a, __vector unsigned char __b) {
2717 int __cc;
2718 __builtin_s390_vceqbs(__a, __b, &__cc);
2719 return __cc == 0;
2722 // This prototype is deprecated.
2723 static inline __ATTRS_o_ai int
2724 vec_all_eq(__vector unsigned char __a, __vector __bool char __b) {
2725 int __cc;
2726 __builtin_s390_vceqbs(__a, (__vector unsigned char)__b, &__cc);
2727 return __cc == 0;
2730 // This prototype is deprecated.
2731 static inline __ATTRS_o_ai int
2732 vec_all_eq(__vector __bool char __a, __vector unsigned char __b) {
2733 int __cc;
2734 __builtin_s390_vceqbs((__vector unsigned char)__a, __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 unsigned char)__a,
2742 (__vector unsigned 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((__vector unsigned short)__a,
2750 (__vector unsigned short)__b, &__cc);
2751 return __cc == 0;
2754 // This prototype is deprecated.
2755 static inline __ATTRS_o_ai int
2756 vec_all_eq(__vector signed short __a, __vector __bool short __b) {
2757 int __cc;
2758 __builtin_s390_vceqhs((__vector unsigned short)__a,
2759 (__vector unsigned short)__b, &__cc);
2760 return __cc == 0;
2763 // This prototype is deprecated.
2764 static inline __ATTRS_o_ai int
2765 vec_all_eq(__vector __bool short __a, __vector signed short __b) {
2766 int __cc;
2767 __builtin_s390_vceqhs((__vector unsigned short)__a,
2768 (__vector unsigned short)__b, &__cc);
2769 return __cc == 0;
2772 static inline __ATTRS_o_ai int
2773 vec_all_eq(__vector unsigned short __a, __vector unsigned short __b) {
2774 int __cc;
2775 __builtin_s390_vceqhs(__a, __b, &__cc);
2776 return __cc == 0;
2779 // This prototype is deprecated.
2780 static inline __ATTRS_o_ai int
2781 vec_all_eq(__vector unsigned short __a, __vector __bool short __b) {
2782 int __cc;
2783 __builtin_s390_vceqhs(__a, (__vector unsigned short)__b, &__cc);
2784 return __cc == 0;
2787 // This prototype is deprecated.
2788 static inline __ATTRS_o_ai int
2789 vec_all_eq(__vector __bool short __a, __vector unsigned short __b) {
2790 int __cc;
2791 __builtin_s390_vceqhs((__vector unsigned short)__a, __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 unsigned short)__a,
2799 (__vector unsigned 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((__vector unsigned int)__a,
2807 (__vector unsigned int)__b, &__cc);
2808 return __cc == 0;
2811 // This prototype is deprecated.
2812 static inline __ATTRS_o_ai int
2813 vec_all_eq(__vector signed int __a, __vector __bool int __b) {
2814 int __cc;
2815 __builtin_s390_vceqfs((__vector unsigned int)__a,
2816 (__vector unsigned int)__b, &__cc);
2817 return __cc == 0;
2820 // This prototype is deprecated.
2821 static inline __ATTRS_o_ai int
2822 vec_all_eq(__vector __bool int __a, __vector signed int __b) {
2823 int __cc;
2824 __builtin_s390_vceqfs((__vector unsigned int)__a,
2825 (__vector unsigned int)__b, &__cc);
2826 return __cc == 0;
2829 static inline __ATTRS_o_ai int
2830 vec_all_eq(__vector unsigned int __a, __vector unsigned int __b) {
2831 int __cc;
2832 __builtin_s390_vceqfs(__a, __b, &__cc);
2833 return __cc == 0;
2836 // This prototype is deprecated.
2837 static inline __ATTRS_o_ai int
2838 vec_all_eq(__vector unsigned int __a, __vector __bool int __b) {
2839 int __cc;
2840 __builtin_s390_vceqfs(__a, (__vector unsigned int)__b, &__cc);
2841 return __cc == 0;
2844 // This prototype is deprecated.
2845 static inline __ATTRS_o_ai int
2846 vec_all_eq(__vector __bool int __a, __vector unsigned int __b) {
2847 int __cc;
2848 __builtin_s390_vceqfs((__vector unsigned int)__a, __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 unsigned int)__a,
2856 (__vector unsigned 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((__vector unsigned long long)__a,
2864 (__vector unsigned long long)__b, &__cc);
2865 return __cc == 0;
2868 // This prototype is deprecated.
2869 static inline __ATTRS_o_ai int
2870 vec_all_eq(__vector signed long long __a, __vector __bool long long __b) {
2871 int __cc;
2872 __builtin_s390_vceqgs((__vector unsigned long long)__a,
2873 (__vector unsigned long long)__b, &__cc);
2874 return __cc == 0;
2877 // This prototype is deprecated.
2878 static inline __ATTRS_o_ai int
2879 vec_all_eq(__vector __bool long long __a, __vector signed long long __b) {
2880 int __cc;
2881 __builtin_s390_vceqgs((__vector unsigned long long)__a,
2882 (__vector unsigned long long)__b, &__cc);
2883 return __cc == 0;
2886 static inline __ATTRS_o_ai int
2887 vec_all_eq(__vector unsigned long long __a, __vector unsigned long long __b) {
2888 int __cc;
2889 __builtin_s390_vceqgs(__a, __b, &__cc);
2890 return __cc == 0;
2893 // This prototype is deprecated.
2894 static inline __ATTRS_o_ai int
2895 vec_all_eq(__vector unsigned long long __a, __vector __bool long long __b) {
2896 int __cc;
2897 __builtin_s390_vceqgs(__a, (__vector unsigned long long)__b, &__cc);
2898 return __cc == 0;
2901 // This prototype is deprecated.
2902 static inline __ATTRS_o_ai int
2903 vec_all_eq(__vector __bool long long __a, __vector unsigned long long __b) {
2904 int __cc;
2905 __builtin_s390_vceqgs((__vector unsigned long long)__a, __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 unsigned long long)__a,
2913 (__vector unsigned 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((__vector unsigned char)__a,
2939 (__vector unsigned char)__b, &__cc);
2940 return __cc == 3;
2943 // This prototype is deprecated.
2944 static inline __ATTRS_o_ai int
2945 vec_all_ne(__vector signed char __a, __vector __bool char __b) {
2946 int __cc;
2947 __builtin_s390_vceqbs((__vector unsigned char)__a,
2948 (__vector unsigned char)__b, &__cc);
2949 return __cc == 3;
2952 // This prototype is deprecated.
2953 static inline __ATTRS_o_ai int
2954 vec_all_ne(__vector __bool char __a, __vector signed char __b) {
2955 int __cc;
2956 __builtin_s390_vceqbs((__vector unsigned char)__a,
2957 (__vector unsigned char)__b, &__cc);
2958 return __cc == 3;
2961 static inline __ATTRS_o_ai int
2962 vec_all_ne(__vector unsigned char __a, __vector unsigned char __b) {
2963 int __cc;
2964 __builtin_s390_vceqbs((__vector unsigned char)__a,
2965 (__vector unsigned char)__b, &__cc);
2966 return __cc == 3;
2969 // This prototype is deprecated.
2970 static inline __ATTRS_o_ai int
2971 vec_all_ne(__vector unsigned char __a, __vector __bool char __b) {
2972 int __cc;
2973 __builtin_s390_vceqbs(__a, (__vector unsigned char)__b, &__cc);
2974 return __cc == 3;
2977 // This prototype is deprecated.
2978 static inline __ATTRS_o_ai int
2979 vec_all_ne(__vector __bool char __a, __vector unsigned char __b) {
2980 int __cc;
2981 __builtin_s390_vceqbs((__vector unsigned char)__a, __b, &__cc);
2982 return __cc == 3;
2985 static inline __ATTRS_o_ai int
2986 vec_all_ne(__vector __bool char __a, __vector __bool char __b) {
2987 int __cc;
2988 __builtin_s390_vceqbs((__vector unsigned char)__a,
2989 (__vector unsigned char)__b, &__cc);
2990 return __cc == 3;
2993 static inline __ATTRS_o_ai int
2994 vec_all_ne(__vector signed short __a, __vector signed short __b) {
2995 int __cc;
2996 __builtin_s390_vceqhs((__vector unsigned short)__a,
2997 (__vector unsigned short)__b, &__cc);
2998 return __cc == 3;
3001 // This prototype is deprecated.
3002 static inline __ATTRS_o_ai int
3003 vec_all_ne(__vector signed short __a, __vector __bool short __b) {
3004 int __cc;
3005 __builtin_s390_vceqhs((__vector unsigned short)__a,
3006 (__vector unsigned short)__b, &__cc);
3007 return __cc == 3;
3010 // This prototype is deprecated.
3011 static inline __ATTRS_o_ai int
3012 vec_all_ne(__vector __bool short __a, __vector signed short __b) {
3013 int __cc;
3014 __builtin_s390_vceqhs((__vector unsigned short)__a,
3015 (__vector unsigned short)__b, &__cc);
3016 return __cc == 3;
3019 static inline __ATTRS_o_ai int
3020 vec_all_ne(__vector unsigned short __a, __vector unsigned short __b) {
3021 int __cc;
3022 __builtin_s390_vceqhs(__a, __b, &__cc);
3023 return __cc == 3;
3026 // This prototype is deprecated.
3027 static inline __ATTRS_o_ai int
3028 vec_all_ne(__vector unsigned short __a, __vector __bool short __b) {
3029 int __cc;
3030 __builtin_s390_vceqhs(__a, (__vector unsigned short)__b, &__cc);
3031 return __cc == 3;
3034 // This prototype is deprecated.
3035 static inline __ATTRS_o_ai int
3036 vec_all_ne(__vector __bool short __a, __vector unsigned short __b) {
3037 int __cc;
3038 __builtin_s390_vceqhs((__vector unsigned short)__a, __b, &__cc);
3039 return __cc == 3;
3042 static inline __ATTRS_o_ai int
3043 vec_all_ne(__vector __bool short __a, __vector __bool short __b) {
3044 int __cc;
3045 __builtin_s390_vceqhs((__vector unsigned short)__a,
3046 (__vector unsigned short)__b, &__cc);
3047 return __cc == 3;
3050 static inline __ATTRS_o_ai int
3051 vec_all_ne(__vector signed int __a, __vector signed int __b) {
3052 int __cc;
3053 __builtin_s390_vceqfs((__vector unsigned int)__a,
3054 (__vector unsigned int)__b, &__cc);
3055 return __cc == 3;
3058 // This prototype is deprecated.
3059 static inline __ATTRS_o_ai int
3060 vec_all_ne(__vector signed int __a, __vector __bool int __b) {
3061 int __cc;
3062 __builtin_s390_vceqfs((__vector unsigned int)__a,
3063 (__vector unsigned int)__b, &__cc);
3064 return __cc == 3;
3067 // This prototype is deprecated.
3068 static inline __ATTRS_o_ai int
3069 vec_all_ne(__vector __bool int __a, __vector signed int __b) {
3070 int __cc;
3071 __builtin_s390_vceqfs((__vector unsigned int)__a,
3072 (__vector unsigned int)__b, &__cc);
3073 return __cc == 3;
3076 static inline __ATTRS_o_ai int
3077 vec_all_ne(__vector unsigned int __a, __vector unsigned int __b) {
3078 int __cc;
3079 __builtin_s390_vceqfs(__a, __b, &__cc);
3080 return __cc == 3;
3083 // This prototype is deprecated.
3084 static inline __ATTRS_o_ai int
3085 vec_all_ne(__vector unsigned int __a, __vector __bool int __b) {
3086 int __cc;
3087 __builtin_s390_vceqfs(__a, (__vector unsigned int)__b, &__cc);
3088 return __cc == 3;
3091 // This prototype is deprecated.
3092 static inline __ATTRS_o_ai int
3093 vec_all_ne(__vector __bool int __a, __vector unsigned int __b) {
3094 int __cc;
3095 __builtin_s390_vceqfs((__vector unsigned int)__a, __b, &__cc);
3096 return __cc == 3;
3099 static inline __ATTRS_o_ai int
3100 vec_all_ne(__vector __bool int __a, __vector __bool int __b) {
3101 int __cc;
3102 __builtin_s390_vceqfs((__vector unsigned int)__a,
3103 (__vector unsigned int)__b, &__cc);
3104 return __cc == 3;
3107 static inline __ATTRS_o_ai int
3108 vec_all_ne(__vector signed long long __a, __vector signed long long __b) {
3109 int __cc;
3110 __builtin_s390_vceqgs((__vector unsigned long long)__a,
3111 (__vector unsigned long long)__b, &__cc);
3112 return __cc == 3;
3115 // This prototype is deprecated.
3116 static inline __ATTRS_o_ai int
3117 vec_all_ne(__vector signed long long __a, __vector __bool long long __b) {
3118 int __cc;
3119 __builtin_s390_vceqgs((__vector unsigned long long)__a,
3120 (__vector unsigned long long)__b, &__cc);
3121 return __cc == 3;
3124 // This prototype is deprecated.
3125 static inline __ATTRS_o_ai int
3126 vec_all_ne(__vector __bool long long __a, __vector signed long long __b) {
3127 int __cc;
3128 __builtin_s390_vceqgs((__vector unsigned long long)__a,
3129 (__vector unsigned long long)__b, &__cc);
3130 return __cc == 3;
3133 static inline __ATTRS_o_ai int
3134 vec_all_ne(__vector unsigned long long __a, __vector unsigned long long __b) {
3135 int __cc;
3136 __builtin_s390_vceqgs(__a, __b, &__cc);
3137 return __cc == 3;
3140 // This prototype is deprecated.
3141 static inline __ATTRS_o_ai int
3142 vec_all_ne(__vector unsigned long long __a, __vector __bool long long __b) {
3143 int __cc;
3144 __builtin_s390_vceqgs(__a, (__vector unsigned long long)__b, &__cc);
3145 return __cc == 3;
3148 // This prototype is deprecated.
3149 static inline __ATTRS_o_ai int
3150 vec_all_ne(__vector __bool long long __a, __vector unsigned long long __b) {
3151 int __cc;
3152 __builtin_s390_vceqgs((__vector unsigned long long)__a, __b, &__cc);
3153 return __cc == 3;
3156 static inline __ATTRS_o_ai int
3157 vec_all_ne(__vector __bool long long __a, __vector __bool long long __b) {
3158 int __cc;
3159 __builtin_s390_vceqgs((__vector unsigned long long)__a,
3160 (__vector unsigned long long)__b, &__cc);
3161 return __cc == 3;
3164 #if __ARCH__ >= 12
3165 static inline __ATTRS_o_ai int
3166 vec_all_ne(__vector float __a, __vector float __b) {
3167 int __cc;
3168 __builtin_s390_vfcesbs(__a, __b, &__cc);
3169 return __cc == 3;
3171 #endif
3173 static inline __ATTRS_o_ai int
3174 vec_all_ne(__vector double __a, __vector double __b) {
3175 int __cc;
3176 __builtin_s390_vfcedbs(__a, __b, &__cc);
3177 return __cc == 3;
3180 /*-- vec_all_ge -------------------------------------------------------------*/
3182 static inline __ATTRS_o_ai int
3183 vec_all_ge(__vector signed char __a, __vector signed char __b) {
3184 int __cc;
3185 __builtin_s390_vchbs(__b, __a, &__cc);
3186 return __cc == 3;
3189 // This prototype is deprecated.
3190 static inline __ATTRS_o_ai int
3191 vec_all_ge(__vector signed char __a, __vector __bool char __b) {
3192 int __cc;
3193 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
3194 return __cc == 3;
3197 // This prototype is deprecated.
3198 static inline __ATTRS_o_ai int
3199 vec_all_ge(__vector __bool char __a, __vector signed char __b) {
3200 int __cc;
3201 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
3202 return __cc == 3;
3205 static inline __ATTRS_o_ai int
3206 vec_all_ge(__vector unsigned char __a, __vector unsigned char __b) {
3207 int __cc;
3208 __builtin_s390_vchlbs(__b, __a, &__cc);
3209 return __cc == 3;
3212 // This prototype is deprecated.
3213 static inline __ATTRS_o_ai int
3214 vec_all_ge(__vector unsigned char __a, __vector __bool char __b) {
3215 int __cc;
3216 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
3217 return __cc == 3;
3220 // This prototype is deprecated.
3221 static inline __ATTRS_o_ai int
3222 vec_all_ge(__vector __bool char __a, __vector unsigned char __b) {
3223 int __cc;
3224 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
3225 return __cc == 3;
3228 // This prototype is deprecated.
3229 static inline __ATTRS_o_ai int
3230 vec_all_ge(__vector __bool char __a, __vector __bool char __b) {
3231 int __cc;
3232 __builtin_s390_vchlbs((__vector unsigned char)__b,
3233 (__vector unsigned char)__a, &__cc);
3234 return __cc == 3;
3237 static inline __ATTRS_o_ai int
3238 vec_all_ge(__vector signed short __a, __vector signed short __b) {
3239 int __cc;
3240 __builtin_s390_vchhs(__b, __a, &__cc);
3241 return __cc == 3;
3244 // This prototype is deprecated.
3245 static inline __ATTRS_o_ai int
3246 vec_all_ge(__vector signed short __a, __vector __bool short __b) {
3247 int __cc;
3248 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
3249 return __cc == 3;
3252 // This prototype is deprecated.
3253 static inline __ATTRS_o_ai int
3254 vec_all_ge(__vector __bool short __a, __vector signed short __b) {
3255 int __cc;
3256 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
3257 return __cc == 3;
3260 static inline __ATTRS_o_ai int
3261 vec_all_ge(__vector unsigned short __a, __vector unsigned short __b) {
3262 int __cc;
3263 __builtin_s390_vchlhs(__b, __a, &__cc);
3264 return __cc == 3;
3267 // This prototype is deprecated.
3268 static inline __ATTRS_o_ai int
3269 vec_all_ge(__vector unsigned short __a, __vector __bool short __b) {
3270 int __cc;
3271 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
3272 return __cc == 3;
3275 // This prototype is deprecated.
3276 static inline __ATTRS_o_ai int
3277 vec_all_ge(__vector __bool short __a, __vector unsigned short __b) {
3278 int __cc;
3279 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
3280 return __cc == 3;
3283 // This prototype is deprecated.
3284 static inline __ATTRS_o_ai int
3285 vec_all_ge(__vector __bool short __a, __vector __bool short __b) {
3286 int __cc;
3287 __builtin_s390_vchlhs((__vector unsigned short)__b,
3288 (__vector unsigned short)__a, &__cc);
3289 return __cc == 3;
3292 static inline __ATTRS_o_ai int
3293 vec_all_ge(__vector signed int __a, __vector signed int __b) {
3294 int __cc;
3295 __builtin_s390_vchfs(__b, __a, &__cc);
3296 return __cc == 3;
3299 // This prototype is deprecated.
3300 static inline __ATTRS_o_ai int
3301 vec_all_ge(__vector signed int __a, __vector __bool int __b) {
3302 int __cc;
3303 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
3304 return __cc == 3;
3307 // This prototype is deprecated.
3308 static inline __ATTRS_o_ai int
3309 vec_all_ge(__vector __bool int __a, __vector signed int __b) {
3310 int __cc;
3311 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
3312 return __cc == 3;
3315 static inline __ATTRS_o_ai int
3316 vec_all_ge(__vector unsigned int __a, __vector unsigned int __b) {
3317 int __cc;
3318 __builtin_s390_vchlfs(__b, __a, &__cc);
3319 return __cc == 3;
3322 // This prototype is deprecated.
3323 static inline __ATTRS_o_ai int
3324 vec_all_ge(__vector unsigned int __a, __vector __bool int __b) {
3325 int __cc;
3326 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
3327 return __cc == 3;
3330 // This prototype is deprecated.
3331 static inline __ATTRS_o_ai int
3332 vec_all_ge(__vector __bool int __a, __vector unsigned int __b) {
3333 int __cc;
3334 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
3335 return __cc == 3;
3338 // This prototype is deprecated.
3339 static inline __ATTRS_o_ai int
3340 vec_all_ge(__vector __bool int __a, __vector __bool int __b) {
3341 int __cc;
3342 __builtin_s390_vchlfs((__vector unsigned int)__b,
3343 (__vector unsigned int)__a, &__cc);
3344 return __cc == 3;
3347 static inline __ATTRS_o_ai int
3348 vec_all_ge(__vector signed long long __a, __vector signed long long __b) {
3349 int __cc;
3350 __builtin_s390_vchgs(__b, __a, &__cc);
3351 return __cc == 3;
3354 // This prototype is deprecated.
3355 static inline __ATTRS_o_ai int
3356 vec_all_ge(__vector signed long long __a, __vector __bool long long __b) {
3357 int __cc;
3358 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
3359 return __cc == 3;
3362 // This prototype is deprecated.
3363 static inline __ATTRS_o_ai int
3364 vec_all_ge(__vector __bool long long __a, __vector signed long long __b) {
3365 int __cc;
3366 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
3367 return __cc == 3;
3370 static inline __ATTRS_o_ai int
3371 vec_all_ge(__vector unsigned long long __a, __vector unsigned long long __b) {
3372 int __cc;
3373 __builtin_s390_vchlgs(__b, __a, &__cc);
3374 return __cc == 3;
3377 // This prototype is deprecated.
3378 static inline __ATTRS_o_ai int
3379 vec_all_ge(__vector unsigned long long __a, __vector __bool long long __b) {
3380 int __cc;
3381 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
3382 return __cc == 3;
3385 // This prototype is deprecated.
3386 static inline __ATTRS_o_ai int
3387 vec_all_ge(__vector __bool long long __a, __vector unsigned long long __b) {
3388 int __cc;
3389 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
3390 return __cc == 3;
3393 // This prototype is deprecated.
3394 static inline __ATTRS_o_ai int
3395 vec_all_ge(__vector __bool long long __a, __vector __bool long long __b) {
3396 int __cc;
3397 __builtin_s390_vchlgs((__vector unsigned long long)__b,
3398 (__vector unsigned long long)__a, &__cc);
3399 return __cc == 3;
3402 #if __ARCH__ >= 12
3403 static inline __ATTRS_o_ai int
3404 vec_all_ge(__vector float __a, __vector float __b) {
3405 int __cc;
3406 __builtin_s390_vfchesbs(__a, __b, &__cc);
3407 return __cc == 0;
3409 #endif
3411 static inline __ATTRS_o_ai int
3412 vec_all_ge(__vector double __a, __vector double __b) {
3413 int __cc;
3414 __builtin_s390_vfchedbs(__a, __b, &__cc);
3415 return __cc == 0;
3418 /*-- vec_all_gt -------------------------------------------------------------*/
3420 static inline __ATTRS_o_ai int
3421 vec_all_gt(__vector signed char __a, __vector signed char __b) {
3422 int __cc;
3423 __builtin_s390_vchbs(__a, __b, &__cc);
3424 return __cc == 0;
3427 // This prototype is deprecated.
3428 static inline __ATTRS_o_ai int
3429 vec_all_gt(__vector signed char __a, __vector __bool char __b) {
3430 int __cc;
3431 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
3432 return __cc == 0;
3435 // This prototype is deprecated.
3436 static inline __ATTRS_o_ai int
3437 vec_all_gt(__vector __bool char __a, __vector signed char __b) {
3438 int __cc;
3439 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
3440 return __cc == 0;
3443 static inline __ATTRS_o_ai int
3444 vec_all_gt(__vector unsigned char __a, __vector unsigned char __b) {
3445 int __cc;
3446 __builtin_s390_vchlbs(__a, __b, &__cc);
3447 return __cc == 0;
3450 // This prototype is deprecated.
3451 static inline __ATTRS_o_ai int
3452 vec_all_gt(__vector unsigned char __a, __vector __bool char __b) {
3453 int __cc;
3454 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
3455 return __cc == 0;
3458 // This prototype is deprecated.
3459 static inline __ATTRS_o_ai int
3460 vec_all_gt(__vector __bool char __a, __vector unsigned char __b) {
3461 int __cc;
3462 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
3463 return __cc == 0;
3466 // This prototype is deprecated.
3467 static inline __ATTRS_o_ai int
3468 vec_all_gt(__vector __bool char __a, __vector __bool char __b) {
3469 int __cc;
3470 __builtin_s390_vchlbs((__vector unsigned char)__a,
3471 (__vector unsigned char)__b, &__cc);
3472 return __cc == 0;
3475 static inline __ATTRS_o_ai int
3476 vec_all_gt(__vector signed short __a, __vector signed short __b) {
3477 int __cc;
3478 __builtin_s390_vchhs(__a, __b, &__cc);
3479 return __cc == 0;
3482 // This prototype is deprecated.
3483 static inline __ATTRS_o_ai int
3484 vec_all_gt(__vector signed short __a, __vector __bool short __b) {
3485 int __cc;
3486 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
3487 return __cc == 0;
3490 // This prototype is deprecated.
3491 static inline __ATTRS_o_ai int
3492 vec_all_gt(__vector __bool short __a, __vector signed short __b) {
3493 int __cc;
3494 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
3495 return __cc == 0;
3498 static inline __ATTRS_o_ai int
3499 vec_all_gt(__vector unsigned short __a, __vector unsigned short __b) {
3500 int __cc;
3501 __builtin_s390_vchlhs(__a, __b, &__cc);
3502 return __cc == 0;
3505 // This prototype is deprecated.
3506 static inline __ATTRS_o_ai int
3507 vec_all_gt(__vector unsigned short __a, __vector __bool short __b) {
3508 int __cc;
3509 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
3510 return __cc == 0;
3513 // This prototype is deprecated.
3514 static inline __ATTRS_o_ai int
3515 vec_all_gt(__vector __bool short __a, __vector unsigned short __b) {
3516 int __cc;
3517 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
3518 return __cc == 0;
3521 // This prototype is deprecated.
3522 static inline __ATTRS_o_ai int
3523 vec_all_gt(__vector __bool short __a, __vector __bool short __b) {
3524 int __cc;
3525 __builtin_s390_vchlhs((__vector unsigned short)__a,
3526 (__vector unsigned short)__b, &__cc);
3527 return __cc == 0;
3530 static inline __ATTRS_o_ai int
3531 vec_all_gt(__vector signed int __a, __vector signed int __b) {
3532 int __cc;
3533 __builtin_s390_vchfs(__a, __b, &__cc);
3534 return __cc == 0;
3537 // This prototype is deprecated.
3538 static inline __ATTRS_o_ai int
3539 vec_all_gt(__vector signed int __a, __vector __bool int __b) {
3540 int __cc;
3541 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
3542 return __cc == 0;
3545 // This prototype is deprecated.
3546 static inline __ATTRS_o_ai int
3547 vec_all_gt(__vector __bool int __a, __vector signed int __b) {
3548 int __cc;
3549 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
3550 return __cc == 0;
3553 static inline __ATTRS_o_ai int
3554 vec_all_gt(__vector unsigned int __a, __vector unsigned int __b) {
3555 int __cc;
3556 __builtin_s390_vchlfs(__a, __b, &__cc);
3557 return __cc == 0;
3560 // This prototype is deprecated.
3561 static inline __ATTRS_o_ai int
3562 vec_all_gt(__vector unsigned int __a, __vector __bool int __b) {
3563 int __cc;
3564 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
3565 return __cc == 0;
3568 // This prototype is deprecated.
3569 static inline __ATTRS_o_ai int
3570 vec_all_gt(__vector __bool int __a, __vector unsigned int __b) {
3571 int __cc;
3572 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
3573 return __cc == 0;
3576 // This prototype is deprecated.
3577 static inline __ATTRS_o_ai int
3578 vec_all_gt(__vector __bool int __a, __vector __bool int __b) {
3579 int __cc;
3580 __builtin_s390_vchlfs((__vector unsigned int)__a,
3581 (__vector unsigned int)__b, &__cc);
3582 return __cc == 0;
3585 static inline __ATTRS_o_ai int
3586 vec_all_gt(__vector signed long long __a, __vector signed long long __b) {
3587 int __cc;
3588 __builtin_s390_vchgs(__a, __b, &__cc);
3589 return __cc == 0;
3592 // This prototype is deprecated.
3593 static inline __ATTRS_o_ai int
3594 vec_all_gt(__vector signed long long __a, __vector __bool long long __b) {
3595 int __cc;
3596 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
3597 return __cc == 0;
3600 // This prototype is deprecated.
3601 static inline __ATTRS_o_ai int
3602 vec_all_gt(__vector __bool long long __a, __vector signed long long __b) {
3603 int __cc;
3604 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
3605 return __cc == 0;
3608 static inline __ATTRS_o_ai int
3609 vec_all_gt(__vector unsigned long long __a, __vector unsigned long long __b) {
3610 int __cc;
3611 __builtin_s390_vchlgs(__a, __b, &__cc);
3612 return __cc == 0;
3615 // This prototype is deprecated.
3616 static inline __ATTRS_o_ai int
3617 vec_all_gt(__vector unsigned long long __a, __vector __bool long long __b) {
3618 int __cc;
3619 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
3620 return __cc == 0;
3623 // This prototype is deprecated.
3624 static inline __ATTRS_o_ai int
3625 vec_all_gt(__vector __bool long long __a, __vector unsigned long long __b) {
3626 int __cc;
3627 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
3628 return __cc == 0;
3631 // This prototype is deprecated.
3632 static inline __ATTRS_o_ai int
3633 vec_all_gt(__vector __bool long long __a, __vector __bool long long __b) {
3634 int __cc;
3635 __builtin_s390_vchlgs((__vector unsigned long long)__a,
3636 (__vector unsigned long long)__b, &__cc);
3637 return __cc == 0;
3640 #if __ARCH__ >= 12
3641 static inline __ATTRS_o_ai int
3642 vec_all_gt(__vector float __a, __vector float __b) {
3643 int __cc;
3644 __builtin_s390_vfchsbs(__a, __b, &__cc);
3645 return __cc == 0;
3647 #endif
3649 static inline __ATTRS_o_ai int
3650 vec_all_gt(__vector double __a, __vector double __b) {
3651 int __cc;
3652 __builtin_s390_vfchdbs(__a, __b, &__cc);
3653 return __cc == 0;
3656 /*-- vec_all_le -------------------------------------------------------------*/
3658 static inline __ATTRS_o_ai int
3659 vec_all_le(__vector signed char __a, __vector signed char __b) {
3660 int __cc;
3661 __builtin_s390_vchbs(__a, __b, &__cc);
3662 return __cc == 3;
3665 // This prototype is deprecated.
3666 static inline __ATTRS_o_ai int
3667 vec_all_le(__vector signed char __a, __vector __bool char __b) {
3668 int __cc;
3669 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
3670 return __cc == 3;
3673 // This prototype is deprecated.
3674 static inline __ATTRS_o_ai int
3675 vec_all_le(__vector __bool char __a, __vector signed char __b) {
3676 int __cc;
3677 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
3678 return __cc == 3;
3681 static inline __ATTRS_o_ai int
3682 vec_all_le(__vector unsigned char __a, __vector unsigned char __b) {
3683 int __cc;
3684 __builtin_s390_vchlbs(__a, __b, &__cc);
3685 return __cc == 3;
3688 // This prototype is deprecated.
3689 static inline __ATTRS_o_ai int
3690 vec_all_le(__vector unsigned char __a, __vector __bool char __b) {
3691 int __cc;
3692 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
3693 return __cc == 3;
3696 // This prototype is deprecated.
3697 static inline __ATTRS_o_ai int
3698 vec_all_le(__vector __bool char __a, __vector unsigned char __b) {
3699 int __cc;
3700 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
3701 return __cc == 3;
3704 // This prototype is deprecated.
3705 static inline __ATTRS_o_ai int
3706 vec_all_le(__vector __bool char __a, __vector __bool char __b) {
3707 int __cc;
3708 __builtin_s390_vchlbs((__vector unsigned char)__a,
3709 (__vector unsigned char)__b, &__cc);
3710 return __cc == 3;
3713 static inline __ATTRS_o_ai int
3714 vec_all_le(__vector signed short __a, __vector signed short __b) {
3715 int __cc;
3716 __builtin_s390_vchhs(__a, __b, &__cc);
3717 return __cc == 3;
3720 // This prototype is deprecated.
3721 static inline __ATTRS_o_ai int
3722 vec_all_le(__vector signed short __a, __vector __bool short __b) {
3723 int __cc;
3724 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
3725 return __cc == 3;
3728 // This prototype is deprecated.
3729 static inline __ATTRS_o_ai int
3730 vec_all_le(__vector __bool short __a, __vector signed short __b) {
3731 int __cc;
3732 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
3733 return __cc == 3;
3736 static inline __ATTRS_o_ai int
3737 vec_all_le(__vector unsigned short __a, __vector unsigned short __b) {
3738 int __cc;
3739 __builtin_s390_vchlhs(__a, __b, &__cc);
3740 return __cc == 3;
3743 // This prototype is deprecated.
3744 static inline __ATTRS_o_ai int
3745 vec_all_le(__vector unsigned short __a, __vector __bool short __b) {
3746 int __cc;
3747 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
3748 return __cc == 3;
3751 // This prototype is deprecated.
3752 static inline __ATTRS_o_ai int
3753 vec_all_le(__vector __bool short __a, __vector unsigned short __b) {
3754 int __cc;
3755 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
3756 return __cc == 3;
3759 // This prototype is deprecated.
3760 static inline __ATTRS_o_ai int
3761 vec_all_le(__vector __bool short __a, __vector __bool short __b) {
3762 int __cc;
3763 __builtin_s390_vchlhs((__vector unsigned short)__a,
3764 (__vector unsigned short)__b, &__cc);
3765 return __cc == 3;
3768 static inline __ATTRS_o_ai int
3769 vec_all_le(__vector signed int __a, __vector signed int __b) {
3770 int __cc;
3771 __builtin_s390_vchfs(__a, __b, &__cc);
3772 return __cc == 3;
3775 // This prototype is deprecated.
3776 static inline __ATTRS_o_ai int
3777 vec_all_le(__vector signed int __a, __vector __bool int __b) {
3778 int __cc;
3779 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
3780 return __cc == 3;
3783 // This prototype is deprecated.
3784 static inline __ATTRS_o_ai int
3785 vec_all_le(__vector __bool int __a, __vector signed int __b) {
3786 int __cc;
3787 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
3788 return __cc == 3;
3791 static inline __ATTRS_o_ai int
3792 vec_all_le(__vector unsigned int __a, __vector unsigned int __b) {
3793 int __cc;
3794 __builtin_s390_vchlfs(__a, __b, &__cc);
3795 return __cc == 3;
3798 // This prototype is deprecated.
3799 static inline __ATTRS_o_ai int
3800 vec_all_le(__vector unsigned int __a, __vector __bool int __b) {
3801 int __cc;
3802 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
3803 return __cc == 3;
3806 // This prototype is deprecated.
3807 static inline __ATTRS_o_ai int
3808 vec_all_le(__vector __bool int __a, __vector unsigned int __b) {
3809 int __cc;
3810 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
3811 return __cc == 3;
3814 // This prototype is deprecated.
3815 static inline __ATTRS_o_ai int
3816 vec_all_le(__vector __bool int __a, __vector __bool int __b) {
3817 int __cc;
3818 __builtin_s390_vchlfs((__vector unsigned int)__a,
3819 (__vector unsigned int)__b, &__cc);
3820 return __cc == 3;
3823 static inline __ATTRS_o_ai int
3824 vec_all_le(__vector signed long long __a, __vector signed long long __b) {
3825 int __cc;
3826 __builtin_s390_vchgs(__a, __b, &__cc);
3827 return __cc == 3;
3830 // This prototype is deprecated.
3831 static inline __ATTRS_o_ai int
3832 vec_all_le(__vector signed long long __a, __vector __bool long long __b) {
3833 int __cc;
3834 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
3835 return __cc == 3;
3838 // This prototype is deprecated.
3839 static inline __ATTRS_o_ai int
3840 vec_all_le(__vector __bool long long __a, __vector signed long long __b) {
3841 int __cc;
3842 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
3843 return __cc == 3;
3846 static inline __ATTRS_o_ai int
3847 vec_all_le(__vector unsigned long long __a, __vector unsigned long long __b) {
3848 int __cc;
3849 __builtin_s390_vchlgs(__a, __b, &__cc);
3850 return __cc == 3;
3853 // This prototype is deprecated.
3854 static inline __ATTRS_o_ai int
3855 vec_all_le(__vector unsigned long long __a, __vector __bool long long __b) {
3856 int __cc;
3857 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
3858 return __cc == 3;
3861 // This prototype is deprecated.
3862 static inline __ATTRS_o_ai int
3863 vec_all_le(__vector __bool long long __a, __vector unsigned long long __b) {
3864 int __cc;
3865 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
3866 return __cc == 3;
3869 // This prototype is deprecated.
3870 static inline __ATTRS_o_ai int
3871 vec_all_le(__vector __bool long long __a, __vector __bool long long __b) {
3872 int __cc;
3873 __builtin_s390_vchlgs((__vector unsigned long long)__a,
3874 (__vector unsigned long long)__b, &__cc);
3875 return __cc == 3;
3878 #if __ARCH__ >= 12
3879 static inline __ATTRS_o_ai int
3880 vec_all_le(__vector float __a, __vector float __b) {
3881 int __cc;
3882 __builtin_s390_vfchesbs(__b, __a, &__cc);
3883 return __cc == 0;
3885 #endif
3887 static inline __ATTRS_o_ai int
3888 vec_all_le(__vector double __a, __vector double __b) {
3889 int __cc;
3890 __builtin_s390_vfchedbs(__b, __a, &__cc);
3891 return __cc == 0;
3894 /*-- vec_all_lt -------------------------------------------------------------*/
3896 static inline __ATTRS_o_ai int
3897 vec_all_lt(__vector signed char __a, __vector signed char __b) {
3898 int __cc;
3899 __builtin_s390_vchbs(__b, __a, &__cc);
3900 return __cc == 0;
3903 // This prototype is deprecated.
3904 static inline __ATTRS_o_ai int
3905 vec_all_lt(__vector signed char __a, __vector __bool char __b) {
3906 int __cc;
3907 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
3908 return __cc == 0;
3911 // This prototype is deprecated.
3912 static inline __ATTRS_o_ai int
3913 vec_all_lt(__vector __bool char __a, __vector signed char __b) {
3914 int __cc;
3915 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
3916 return __cc == 0;
3919 static inline __ATTRS_o_ai int
3920 vec_all_lt(__vector unsigned char __a, __vector unsigned char __b) {
3921 int __cc;
3922 __builtin_s390_vchlbs(__b, __a, &__cc);
3923 return __cc == 0;
3926 // This prototype is deprecated.
3927 static inline __ATTRS_o_ai int
3928 vec_all_lt(__vector unsigned char __a, __vector __bool char __b) {
3929 int __cc;
3930 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
3931 return __cc == 0;
3934 // This prototype is deprecated.
3935 static inline __ATTRS_o_ai int
3936 vec_all_lt(__vector __bool char __a, __vector unsigned char __b) {
3937 int __cc;
3938 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
3939 return __cc == 0;
3942 // This prototype is deprecated.
3943 static inline __ATTRS_o_ai int
3944 vec_all_lt(__vector __bool char __a, __vector __bool char __b) {
3945 int __cc;
3946 __builtin_s390_vchlbs((__vector unsigned char)__b,
3947 (__vector unsigned char)__a, &__cc);
3948 return __cc == 0;
3951 static inline __ATTRS_o_ai int
3952 vec_all_lt(__vector signed short __a, __vector signed short __b) {
3953 int __cc;
3954 __builtin_s390_vchhs(__b, __a, &__cc);
3955 return __cc == 0;
3958 // This prototype is deprecated.
3959 static inline __ATTRS_o_ai int
3960 vec_all_lt(__vector signed short __a, __vector __bool short __b) {
3961 int __cc;
3962 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
3963 return __cc == 0;
3966 // This prototype is deprecated.
3967 static inline __ATTRS_o_ai int
3968 vec_all_lt(__vector __bool short __a, __vector signed short __b) {
3969 int __cc;
3970 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
3971 return __cc == 0;
3974 static inline __ATTRS_o_ai int
3975 vec_all_lt(__vector unsigned short __a, __vector unsigned short __b) {
3976 int __cc;
3977 __builtin_s390_vchlhs(__b, __a, &__cc);
3978 return __cc == 0;
3981 // This prototype is deprecated.
3982 static inline __ATTRS_o_ai int
3983 vec_all_lt(__vector unsigned short __a, __vector __bool short __b) {
3984 int __cc;
3985 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
3986 return __cc == 0;
3989 // This prototype is deprecated.
3990 static inline __ATTRS_o_ai int
3991 vec_all_lt(__vector __bool short __a, __vector unsigned short __b) {
3992 int __cc;
3993 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
3994 return __cc == 0;
3997 // This prototype is deprecated.
3998 static inline __ATTRS_o_ai int
3999 vec_all_lt(__vector __bool short __a, __vector __bool short __b) {
4000 int __cc;
4001 __builtin_s390_vchlhs((__vector unsigned short)__b,
4002 (__vector unsigned short)__a, &__cc);
4003 return __cc == 0;
4006 static inline __ATTRS_o_ai int
4007 vec_all_lt(__vector signed int __a, __vector signed int __b) {
4008 int __cc;
4009 __builtin_s390_vchfs(__b, __a, &__cc);
4010 return __cc == 0;
4013 // This prototype is deprecated.
4014 static inline __ATTRS_o_ai int
4015 vec_all_lt(__vector signed int __a, __vector __bool int __b) {
4016 int __cc;
4017 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
4018 return __cc == 0;
4021 // This prototype is deprecated.
4022 static inline __ATTRS_o_ai int
4023 vec_all_lt(__vector __bool int __a, __vector signed int __b) {
4024 int __cc;
4025 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
4026 return __cc == 0;
4029 static inline __ATTRS_o_ai int
4030 vec_all_lt(__vector unsigned int __a, __vector unsigned int __b) {
4031 int __cc;
4032 __builtin_s390_vchlfs(__b, __a, &__cc);
4033 return __cc == 0;
4036 // This prototype is deprecated.
4037 static inline __ATTRS_o_ai int
4038 vec_all_lt(__vector unsigned int __a, __vector __bool int __b) {
4039 int __cc;
4040 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
4041 return __cc == 0;
4044 // This prototype is deprecated.
4045 static inline __ATTRS_o_ai int
4046 vec_all_lt(__vector __bool int __a, __vector unsigned int __b) {
4047 int __cc;
4048 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
4049 return __cc == 0;
4052 // This prototype is deprecated.
4053 static inline __ATTRS_o_ai int
4054 vec_all_lt(__vector __bool int __a, __vector __bool int __b) {
4055 int __cc;
4056 __builtin_s390_vchlfs((__vector unsigned int)__b,
4057 (__vector unsigned int)__a, &__cc);
4058 return __cc == 0;
4061 static inline __ATTRS_o_ai int
4062 vec_all_lt(__vector signed long long __a, __vector signed long long __b) {
4063 int __cc;
4064 __builtin_s390_vchgs(__b, __a, &__cc);
4065 return __cc == 0;
4068 // This prototype is deprecated.
4069 static inline __ATTRS_o_ai int
4070 vec_all_lt(__vector signed long long __a, __vector __bool long long __b) {
4071 int __cc;
4072 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
4073 return __cc == 0;
4076 // This prototype is deprecated.
4077 static inline __ATTRS_o_ai int
4078 vec_all_lt(__vector __bool long long __a, __vector signed long long __b) {
4079 int __cc;
4080 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
4081 return __cc == 0;
4084 static inline __ATTRS_o_ai int
4085 vec_all_lt(__vector unsigned long long __a, __vector unsigned long long __b) {
4086 int __cc;
4087 __builtin_s390_vchlgs(__b, __a, &__cc);
4088 return __cc == 0;
4091 // This prototype is deprecated.
4092 static inline __ATTRS_o_ai int
4093 vec_all_lt(__vector unsigned long long __a, __vector __bool long long __b) {
4094 int __cc;
4095 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
4096 return __cc == 0;
4099 // This prototype is deprecated.
4100 static inline __ATTRS_o_ai int
4101 vec_all_lt(__vector __bool long long __a, __vector unsigned long long __b) {
4102 int __cc;
4103 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
4104 return __cc == 0;
4107 // This prototype is deprecated.
4108 static inline __ATTRS_o_ai int
4109 vec_all_lt(__vector __bool long long __a, __vector __bool long long __b) {
4110 int __cc;
4111 __builtin_s390_vchlgs((__vector unsigned long long)__b,
4112 (__vector unsigned long long)__a, &__cc);
4113 return __cc == 0;
4116 #if __ARCH__ >= 12
4117 static inline __ATTRS_o_ai int
4118 vec_all_lt(__vector float __a, __vector float __b) {
4119 int __cc;
4120 __builtin_s390_vfchsbs(__b, __a, &__cc);
4121 return __cc == 0;
4123 #endif
4125 static inline __ATTRS_o_ai int
4126 vec_all_lt(__vector double __a, __vector double __b) {
4127 int __cc;
4128 __builtin_s390_vfchdbs(__b, __a, &__cc);
4129 return __cc == 0;
4132 /*-- vec_all_nge ------------------------------------------------------------*/
4134 #if __ARCH__ >= 12
4135 static inline __ATTRS_o_ai int
4136 vec_all_nge(__vector float __a, __vector float __b) {
4137 int __cc;
4138 __builtin_s390_vfchesbs(__a, __b, &__cc);
4139 return __cc == 3;
4141 #endif
4143 static inline __ATTRS_o_ai int
4144 vec_all_nge(__vector double __a, __vector double __b) {
4145 int __cc;
4146 __builtin_s390_vfchedbs(__a, __b, &__cc);
4147 return __cc == 3;
4150 /*-- vec_all_ngt ------------------------------------------------------------*/
4152 #if __ARCH__ >= 12
4153 static inline __ATTRS_o_ai int
4154 vec_all_ngt(__vector float __a, __vector float __b) {
4155 int __cc;
4156 __builtin_s390_vfchsbs(__a, __b, &__cc);
4157 return __cc == 3;
4159 #endif
4161 static inline __ATTRS_o_ai int
4162 vec_all_ngt(__vector double __a, __vector double __b) {
4163 int __cc;
4164 __builtin_s390_vfchdbs(__a, __b, &__cc);
4165 return __cc == 3;
4168 /*-- vec_all_nle ------------------------------------------------------------*/
4170 #if __ARCH__ >= 12
4171 static inline __ATTRS_o_ai int
4172 vec_all_nle(__vector float __a, __vector float __b) {
4173 int __cc;
4174 __builtin_s390_vfchesbs(__b, __a, &__cc);
4175 return __cc == 3;
4177 #endif
4179 static inline __ATTRS_o_ai int
4180 vec_all_nle(__vector double __a, __vector double __b) {
4181 int __cc;
4182 __builtin_s390_vfchedbs(__b, __a, &__cc);
4183 return __cc == 3;
4186 /*-- vec_all_nlt ------------------------------------------------------------*/
4188 #if __ARCH__ >= 12
4189 static inline __ATTRS_o_ai int
4190 vec_all_nlt(__vector float __a, __vector float __b) {
4191 int __cc;
4192 __builtin_s390_vfchsbs(__b, __a, &__cc);
4193 return __cc == 3;
4195 #endif
4197 static inline __ATTRS_o_ai int
4198 vec_all_nlt(__vector double __a, __vector double __b) {
4199 int __cc;
4200 __builtin_s390_vfchdbs(__b, __a, &__cc);
4201 return __cc == 3;
4204 /*-- vec_all_nan ------------------------------------------------------------*/
4206 #if __ARCH__ >= 12
4207 static inline __ATTRS_o_ai int
4208 vec_all_nan(__vector float __a) {
4209 int __cc;
4210 __builtin_s390_vftcisb(__a, 15, &__cc);
4211 return __cc == 0;
4213 #endif
4215 static inline __ATTRS_o_ai int
4216 vec_all_nan(__vector double __a) {
4217 int __cc;
4218 __builtin_s390_vftcidb(__a, 15, &__cc);
4219 return __cc == 0;
4222 /*-- vec_all_numeric --------------------------------------------------------*/
4224 #if __ARCH__ >= 12
4225 static inline __ATTRS_o_ai int
4226 vec_all_numeric(__vector float __a) {
4227 int __cc;
4228 __builtin_s390_vftcisb(__a, 15, &__cc);
4229 return __cc == 3;
4231 #endif
4233 static inline __ATTRS_o_ai int
4234 vec_all_numeric(__vector double __a) {
4235 int __cc;
4236 __builtin_s390_vftcidb(__a, 15, &__cc);
4237 return __cc == 3;
4240 /*-- vec_any_eq -------------------------------------------------------------*/
4242 static inline __ATTRS_o_ai int
4243 vec_any_eq(__vector signed char __a, __vector signed char __b) {
4244 int __cc;
4245 __builtin_s390_vceqbs((__vector unsigned char)__a,
4246 (__vector unsigned char)__b, &__cc);
4247 return __cc <= 1;
4250 // This prototype is deprecated.
4251 static inline __ATTRS_o_ai int
4252 vec_any_eq(__vector signed char __a, __vector __bool char __b) {
4253 int __cc;
4254 __builtin_s390_vceqbs((__vector unsigned char)__a,
4255 (__vector unsigned char)__b, &__cc);
4256 return __cc <= 1;
4259 // This prototype is deprecated.
4260 static inline __ATTRS_o_ai int
4261 vec_any_eq(__vector __bool char __a, __vector signed char __b) {
4262 int __cc;
4263 __builtin_s390_vceqbs((__vector unsigned char)__a,
4264 (__vector unsigned char)__b, &__cc);
4265 return __cc <= 1;
4268 static inline __ATTRS_o_ai int
4269 vec_any_eq(__vector unsigned char __a, __vector unsigned char __b) {
4270 int __cc;
4271 __builtin_s390_vceqbs(__a, __b, &__cc);
4272 return __cc <= 1;
4275 // This prototype is deprecated.
4276 static inline __ATTRS_o_ai int
4277 vec_any_eq(__vector unsigned char __a, __vector __bool char __b) {
4278 int __cc;
4279 __builtin_s390_vceqbs(__a, (__vector unsigned char)__b, &__cc);
4280 return __cc <= 1;
4283 // This prototype is deprecated.
4284 static inline __ATTRS_o_ai int
4285 vec_any_eq(__vector __bool char __a, __vector unsigned char __b) {
4286 int __cc;
4287 __builtin_s390_vceqbs((__vector unsigned char)__a, __b, &__cc);
4288 return __cc <= 1;
4291 static inline __ATTRS_o_ai int
4292 vec_any_eq(__vector __bool char __a, __vector __bool char __b) {
4293 int __cc;
4294 __builtin_s390_vceqbs((__vector unsigned char)__a,
4295 (__vector unsigned char)__b, &__cc);
4296 return __cc <= 1;
4299 static inline __ATTRS_o_ai int
4300 vec_any_eq(__vector signed short __a, __vector signed short __b) {
4301 int __cc;
4302 __builtin_s390_vceqhs((__vector unsigned short)__a,
4303 (__vector unsigned short)__b, &__cc);
4304 return __cc <= 1;
4307 // This prototype is deprecated.
4308 static inline __ATTRS_o_ai int
4309 vec_any_eq(__vector signed short __a, __vector __bool short __b) {
4310 int __cc;
4311 __builtin_s390_vceqhs((__vector unsigned short)__a,
4312 (__vector unsigned short)__b, &__cc);
4313 return __cc <= 1;
4316 // This prototype is deprecated.
4317 static inline __ATTRS_o_ai int
4318 vec_any_eq(__vector __bool short __a, __vector signed short __b) {
4319 int __cc;
4320 __builtin_s390_vceqhs((__vector unsigned short)__a,
4321 (__vector unsigned short)__b, &__cc);
4322 return __cc <= 1;
4325 static inline __ATTRS_o_ai int
4326 vec_any_eq(__vector unsigned short __a, __vector unsigned short __b) {
4327 int __cc;
4328 __builtin_s390_vceqhs(__a, __b, &__cc);
4329 return __cc <= 1;
4332 // This prototype is deprecated.
4333 static inline __ATTRS_o_ai int
4334 vec_any_eq(__vector unsigned short __a, __vector __bool short __b) {
4335 int __cc;
4336 __builtin_s390_vceqhs(__a, (__vector unsigned short)__b, &__cc);
4337 return __cc <= 1;
4340 // This prototype is deprecated.
4341 static inline __ATTRS_o_ai int
4342 vec_any_eq(__vector __bool short __a, __vector unsigned short __b) {
4343 int __cc;
4344 __builtin_s390_vceqhs((__vector unsigned short)__a, __b, &__cc);
4345 return __cc <= 1;
4348 static inline __ATTRS_o_ai int
4349 vec_any_eq(__vector __bool short __a, __vector __bool short __b) {
4350 int __cc;
4351 __builtin_s390_vceqhs((__vector unsigned short)__a,
4352 (__vector unsigned short)__b, &__cc);
4353 return __cc <= 1;
4356 static inline __ATTRS_o_ai int
4357 vec_any_eq(__vector signed int __a, __vector signed int __b) {
4358 int __cc;
4359 __builtin_s390_vceqfs((__vector unsigned int)__a,
4360 (__vector unsigned int)__b, &__cc);
4361 return __cc <= 1;
4364 // This prototype is deprecated.
4365 static inline __ATTRS_o_ai int
4366 vec_any_eq(__vector signed int __a, __vector __bool int __b) {
4367 int __cc;
4368 __builtin_s390_vceqfs((__vector unsigned int)__a,
4369 (__vector unsigned int)__b, &__cc);
4370 return __cc <= 1;
4373 // This prototype is deprecated.
4374 static inline __ATTRS_o_ai int
4375 vec_any_eq(__vector __bool int __a, __vector signed int __b) {
4376 int __cc;
4377 __builtin_s390_vceqfs((__vector unsigned int)__a,
4378 (__vector unsigned int)__b, &__cc);
4379 return __cc <= 1;
4382 static inline __ATTRS_o_ai int
4383 vec_any_eq(__vector unsigned int __a, __vector unsigned int __b) {
4384 int __cc;
4385 __builtin_s390_vceqfs(__a, __b, &__cc);
4386 return __cc <= 1;
4389 // This prototype is deprecated.
4390 static inline __ATTRS_o_ai int
4391 vec_any_eq(__vector unsigned int __a, __vector __bool int __b) {
4392 int __cc;
4393 __builtin_s390_vceqfs(__a, (__vector unsigned int)__b, &__cc);
4394 return __cc <= 1;
4397 // This prototype is deprecated.
4398 static inline __ATTRS_o_ai int
4399 vec_any_eq(__vector __bool int __a, __vector unsigned int __b) {
4400 int __cc;
4401 __builtin_s390_vceqfs((__vector unsigned int)__a, __b, &__cc);
4402 return __cc <= 1;
4405 static inline __ATTRS_o_ai int
4406 vec_any_eq(__vector __bool int __a, __vector __bool int __b) {
4407 int __cc;
4408 __builtin_s390_vceqfs((__vector unsigned int)__a,
4409 (__vector unsigned int)__b, &__cc);
4410 return __cc <= 1;
4413 static inline __ATTRS_o_ai int
4414 vec_any_eq(__vector signed long long __a, __vector signed long long __b) {
4415 int __cc;
4416 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4417 (__vector unsigned long long)__b, &__cc);
4418 return __cc <= 1;
4421 // This prototype is deprecated.
4422 static inline __ATTRS_o_ai int
4423 vec_any_eq(__vector signed long long __a, __vector __bool long long __b) {
4424 int __cc;
4425 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4426 (__vector unsigned long long)__b, &__cc);
4427 return __cc <= 1;
4430 // This prototype is deprecated.
4431 static inline __ATTRS_o_ai int
4432 vec_any_eq(__vector __bool long long __a, __vector signed long long __b) {
4433 int __cc;
4434 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4435 (__vector unsigned long long)__b, &__cc);
4436 return __cc <= 1;
4439 static inline __ATTRS_o_ai int
4440 vec_any_eq(__vector unsigned long long __a, __vector unsigned long long __b) {
4441 int __cc;
4442 __builtin_s390_vceqgs(__a, __b, &__cc);
4443 return __cc <= 1;
4446 // This prototype is deprecated.
4447 static inline __ATTRS_o_ai int
4448 vec_any_eq(__vector unsigned long long __a, __vector __bool long long __b) {
4449 int __cc;
4450 __builtin_s390_vceqgs(__a, (__vector unsigned long long)__b, &__cc);
4451 return __cc <= 1;
4454 // This prototype is deprecated.
4455 static inline __ATTRS_o_ai int
4456 vec_any_eq(__vector __bool long long __a, __vector unsigned long long __b) {
4457 int __cc;
4458 __builtin_s390_vceqgs((__vector unsigned long long)__a, __b, &__cc);
4459 return __cc <= 1;
4462 static inline __ATTRS_o_ai int
4463 vec_any_eq(__vector __bool long long __a, __vector __bool long long __b) {
4464 int __cc;
4465 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4466 (__vector unsigned long long)__b, &__cc);
4467 return __cc <= 1;
4470 #if __ARCH__ >= 12
4471 static inline __ATTRS_o_ai int
4472 vec_any_eq(__vector float __a, __vector float __b) {
4473 int __cc;
4474 __builtin_s390_vfcesbs(__a, __b, &__cc);
4475 return __cc <= 1;
4477 #endif
4479 static inline __ATTRS_o_ai int
4480 vec_any_eq(__vector double __a, __vector double __b) {
4481 int __cc;
4482 __builtin_s390_vfcedbs(__a, __b, &__cc);
4483 return __cc <= 1;
4486 /*-- vec_any_ne -------------------------------------------------------------*/
4488 static inline __ATTRS_o_ai int
4489 vec_any_ne(__vector signed char __a, __vector signed char __b) {
4490 int __cc;
4491 __builtin_s390_vceqbs((__vector unsigned char)__a,
4492 (__vector unsigned char)__b, &__cc);
4493 return __cc != 0;
4496 // This prototype is deprecated.
4497 static inline __ATTRS_o_ai int
4498 vec_any_ne(__vector signed char __a, __vector __bool char __b) {
4499 int __cc;
4500 __builtin_s390_vceqbs((__vector unsigned char)__a,
4501 (__vector unsigned char)__b, &__cc);
4502 return __cc != 0;
4505 // This prototype is deprecated.
4506 static inline __ATTRS_o_ai int
4507 vec_any_ne(__vector __bool char __a, __vector signed char __b) {
4508 int __cc;
4509 __builtin_s390_vceqbs((__vector unsigned char)__a,
4510 (__vector unsigned char)__b, &__cc);
4511 return __cc != 0;
4514 static inline __ATTRS_o_ai int
4515 vec_any_ne(__vector unsigned char __a, __vector unsigned char __b) {
4516 int __cc;
4517 __builtin_s390_vceqbs(__a, __b, &__cc);
4518 return __cc != 0;
4521 // This prototype is deprecated.
4522 static inline __ATTRS_o_ai int
4523 vec_any_ne(__vector unsigned char __a, __vector __bool char __b) {
4524 int __cc;
4525 __builtin_s390_vceqbs(__a, (__vector unsigned char)__b, &__cc);
4526 return __cc != 0;
4529 // This prototype is deprecated.
4530 static inline __ATTRS_o_ai int
4531 vec_any_ne(__vector __bool char __a, __vector unsigned char __b) {
4532 int __cc;
4533 __builtin_s390_vceqbs((__vector unsigned char)__a, __b, &__cc);
4534 return __cc != 0;
4537 static inline __ATTRS_o_ai int
4538 vec_any_ne(__vector __bool char __a, __vector __bool char __b) {
4539 int __cc;
4540 __builtin_s390_vceqbs((__vector unsigned char)__a,
4541 (__vector unsigned char)__b, &__cc);
4542 return __cc != 0;
4545 static inline __ATTRS_o_ai int
4546 vec_any_ne(__vector signed short __a, __vector signed short __b) {
4547 int __cc;
4548 __builtin_s390_vceqhs((__vector unsigned short)__a,
4549 (__vector unsigned short)__b, &__cc);
4550 return __cc != 0;
4553 // This prototype is deprecated.
4554 static inline __ATTRS_o_ai int
4555 vec_any_ne(__vector signed short __a, __vector __bool short __b) {
4556 int __cc;
4557 __builtin_s390_vceqhs((__vector unsigned short)__a,
4558 (__vector unsigned short)__b, &__cc);
4559 return __cc != 0;
4562 // This prototype is deprecated.
4563 static inline __ATTRS_o_ai int
4564 vec_any_ne(__vector __bool short __a, __vector signed short __b) {
4565 int __cc;
4566 __builtin_s390_vceqhs((__vector unsigned short)__a,
4567 (__vector unsigned short)__b, &__cc);
4568 return __cc != 0;
4571 static inline __ATTRS_o_ai int
4572 vec_any_ne(__vector unsigned short __a, __vector unsigned short __b) {
4573 int __cc;
4574 __builtin_s390_vceqhs(__a, __b, &__cc);
4575 return __cc != 0;
4578 // This prototype is deprecated.
4579 static inline __ATTRS_o_ai int
4580 vec_any_ne(__vector unsigned short __a, __vector __bool short __b) {
4581 int __cc;
4582 __builtin_s390_vceqhs(__a, (__vector unsigned short)__b, &__cc);
4583 return __cc != 0;
4586 // This prototype is deprecated.
4587 static inline __ATTRS_o_ai int
4588 vec_any_ne(__vector __bool short __a, __vector unsigned short __b) {
4589 int __cc;
4590 __builtin_s390_vceqhs((__vector unsigned short)__a, __b, &__cc);
4591 return __cc != 0;
4594 static inline __ATTRS_o_ai int
4595 vec_any_ne(__vector __bool short __a, __vector __bool short __b) {
4596 int __cc;
4597 __builtin_s390_vceqhs((__vector unsigned short)__a,
4598 (__vector unsigned short)__b, &__cc);
4599 return __cc != 0;
4602 static inline __ATTRS_o_ai int
4603 vec_any_ne(__vector signed int __a, __vector signed int __b) {
4604 int __cc;
4605 __builtin_s390_vceqfs((__vector unsigned int)__a,
4606 (__vector unsigned int)__b, &__cc);
4607 return __cc != 0;
4610 // This prototype is deprecated.
4611 static inline __ATTRS_o_ai int
4612 vec_any_ne(__vector signed int __a, __vector __bool int __b) {
4613 int __cc;
4614 __builtin_s390_vceqfs((__vector unsigned int)__a,
4615 (__vector unsigned int)__b, &__cc);
4616 return __cc != 0;
4619 // This prototype is deprecated.
4620 static inline __ATTRS_o_ai int
4621 vec_any_ne(__vector __bool int __a, __vector signed int __b) {
4622 int __cc;
4623 __builtin_s390_vceqfs((__vector unsigned int)__a,
4624 (__vector unsigned int)__b, &__cc);
4625 return __cc != 0;
4628 static inline __ATTRS_o_ai int
4629 vec_any_ne(__vector unsigned int __a, __vector unsigned int __b) {
4630 int __cc;
4631 __builtin_s390_vceqfs(__a, __b, &__cc);
4632 return __cc != 0;
4635 // This prototype is deprecated.
4636 static inline __ATTRS_o_ai int
4637 vec_any_ne(__vector unsigned int __a, __vector __bool int __b) {
4638 int __cc;
4639 __builtin_s390_vceqfs(__a, (__vector unsigned int)__b, &__cc);
4640 return __cc != 0;
4643 // This prototype is deprecated.
4644 static inline __ATTRS_o_ai int
4645 vec_any_ne(__vector __bool int __a, __vector unsigned int __b) {
4646 int __cc;
4647 __builtin_s390_vceqfs((__vector unsigned int)__a, __b, &__cc);
4648 return __cc != 0;
4651 static inline __ATTRS_o_ai int
4652 vec_any_ne(__vector __bool int __a, __vector __bool int __b) {
4653 int __cc;
4654 __builtin_s390_vceqfs((__vector unsigned int)__a,
4655 (__vector unsigned int)__b, &__cc);
4656 return __cc != 0;
4659 static inline __ATTRS_o_ai int
4660 vec_any_ne(__vector signed long long __a, __vector signed long long __b) {
4661 int __cc;
4662 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4663 (__vector unsigned long long)__b, &__cc);
4664 return __cc != 0;
4667 // This prototype is deprecated.
4668 static inline __ATTRS_o_ai int
4669 vec_any_ne(__vector signed long long __a, __vector __bool long long __b) {
4670 int __cc;
4671 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4672 (__vector unsigned long long)__b, &__cc);
4673 return __cc != 0;
4676 // This prototype is deprecated.
4677 static inline __ATTRS_o_ai int
4678 vec_any_ne(__vector __bool long long __a, __vector signed long long __b) {
4679 int __cc;
4680 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4681 (__vector unsigned long long)__b, &__cc);
4682 return __cc != 0;
4685 static inline __ATTRS_o_ai int
4686 vec_any_ne(__vector unsigned long long __a, __vector unsigned long long __b) {
4687 int __cc;
4688 __builtin_s390_vceqgs(__a, __b, &__cc);
4689 return __cc != 0;
4692 // This prototype is deprecated.
4693 static inline __ATTRS_o_ai int
4694 vec_any_ne(__vector unsigned long long __a, __vector __bool long long __b) {
4695 int __cc;
4696 __builtin_s390_vceqgs(__a, (__vector unsigned long long)__b, &__cc);
4697 return __cc != 0;
4700 // This prototype is deprecated.
4701 static inline __ATTRS_o_ai int
4702 vec_any_ne(__vector __bool long long __a, __vector unsigned long long __b) {
4703 int __cc;
4704 __builtin_s390_vceqgs((__vector unsigned long long)__a, __b, &__cc);
4705 return __cc != 0;
4708 static inline __ATTRS_o_ai int
4709 vec_any_ne(__vector __bool long long __a, __vector __bool long long __b) {
4710 int __cc;
4711 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4712 (__vector unsigned long long)__b, &__cc);
4713 return __cc != 0;
4716 #if __ARCH__ >= 12
4717 static inline __ATTRS_o_ai int
4718 vec_any_ne(__vector float __a, __vector float __b) {
4719 int __cc;
4720 __builtin_s390_vfcesbs(__a, __b, &__cc);
4721 return __cc != 0;
4723 #endif
4725 static inline __ATTRS_o_ai int
4726 vec_any_ne(__vector double __a, __vector double __b) {
4727 int __cc;
4728 __builtin_s390_vfcedbs(__a, __b, &__cc);
4729 return __cc != 0;
4732 /*-- vec_any_ge -------------------------------------------------------------*/
4734 static inline __ATTRS_o_ai int
4735 vec_any_ge(__vector signed char __a, __vector signed char __b) {
4736 int __cc;
4737 __builtin_s390_vchbs(__b, __a, &__cc);
4738 return __cc != 0;
4741 // This prototype is deprecated.
4742 static inline __ATTRS_o_ai int
4743 vec_any_ge(__vector signed char __a, __vector __bool char __b) {
4744 int __cc;
4745 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
4746 return __cc != 0;
4749 // This prototype is deprecated.
4750 static inline __ATTRS_o_ai int
4751 vec_any_ge(__vector __bool char __a, __vector signed char __b) {
4752 int __cc;
4753 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
4754 return __cc != 0;
4757 static inline __ATTRS_o_ai int
4758 vec_any_ge(__vector unsigned char __a, __vector unsigned char __b) {
4759 int __cc;
4760 __builtin_s390_vchlbs(__b, __a, &__cc);
4761 return __cc != 0;
4764 // This prototype is deprecated.
4765 static inline __ATTRS_o_ai int
4766 vec_any_ge(__vector unsigned char __a, __vector __bool char __b) {
4767 int __cc;
4768 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
4769 return __cc != 0;
4772 // This prototype is deprecated.
4773 static inline __ATTRS_o_ai int
4774 vec_any_ge(__vector __bool char __a, __vector unsigned char __b) {
4775 int __cc;
4776 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
4777 return __cc != 0;
4780 // This prototype is deprecated.
4781 static inline __ATTRS_o_ai int
4782 vec_any_ge(__vector __bool char __a, __vector __bool char __b) {
4783 int __cc;
4784 __builtin_s390_vchlbs((__vector unsigned char)__b,
4785 (__vector unsigned char)__a, &__cc);
4786 return __cc != 0;
4789 static inline __ATTRS_o_ai int
4790 vec_any_ge(__vector signed short __a, __vector signed short __b) {
4791 int __cc;
4792 __builtin_s390_vchhs(__b, __a, &__cc);
4793 return __cc != 0;
4796 // This prototype is deprecated.
4797 static inline __ATTRS_o_ai int
4798 vec_any_ge(__vector signed short __a, __vector __bool short __b) {
4799 int __cc;
4800 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
4801 return __cc != 0;
4804 // This prototype is deprecated.
4805 static inline __ATTRS_o_ai int
4806 vec_any_ge(__vector __bool short __a, __vector signed short __b) {
4807 int __cc;
4808 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
4809 return __cc != 0;
4812 static inline __ATTRS_o_ai int
4813 vec_any_ge(__vector unsigned short __a, __vector unsigned short __b) {
4814 int __cc;
4815 __builtin_s390_vchlhs(__b, __a, &__cc);
4816 return __cc != 0;
4819 // This prototype is deprecated.
4820 static inline __ATTRS_o_ai int
4821 vec_any_ge(__vector unsigned short __a, __vector __bool short __b) {
4822 int __cc;
4823 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
4824 return __cc != 0;
4827 // This prototype is deprecated.
4828 static inline __ATTRS_o_ai int
4829 vec_any_ge(__vector __bool short __a, __vector unsigned short __b) {
4830 int __cc;
4831 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
4832 return __cc != 0;
4835 // This prototype is deprecated.
4836 static inline __ATTRS_o_ai int
4837 vec_any_ge(__vector __bool short __a, __vector __bool short __b) {
4838 int __cc;
4839 __builtin_s390_vchlhs((__vector unsigned short)__b,
4840 (__vector unsigned short)__a, &__cc);
4841 return __cc != 0;
4844 static inline __ATTRS_o_ai int
4845 vec_any_ge(__vector signed int __a, __vector signed int __b) {
4846 int __cc;
4847 __builtin_s390_vchfs(__b, __a, &__cc);
4848 return __cc != 0;
4851 // This prototype is deprecated.
4852 static inline __ATTRS_o_ai int
4853 vec_any_ge(__vector signed int __a, __vector __bool int __b) {
4854 int __cc;
4855 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
4856 return __cc != 0;
4859 // This prototype is deprecated.
4860 static inline __ATTRS_o_ai int
4861 vec_any_ge(__vector __bool int __a, __vector signed int __b) {
4862 int __cc;
4863 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
4864 return __cc != 0;
4867 static inline __ATTRS_o_ai int
4868 vec_any_ge(__vector unsigned int __a, __vector unsigned int __b) {
4869 int __cc;
4870 __builtin_s390_vchlfs(__b, __a, &__cc);
4871 return __cc != 0;
4874 // This prototype is deprecated.
4875 static inline __ATTRS_o_ai int
4876 vec_any_ge(__vector unsigned int __a, __vector __bool int __b) {
4877 int __cc;
4878 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
4879 return __cc != 0;
4882 // This prototype is deprecated.
4883 static inline __ATTRS_o_ai int
4884 vec_any_ge(__vector __bool int __a, __vector unsigned int __b) {
4885 int __cc;
4886 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
4887 return __cc != 0;
4890 // This prototype is deprecated.
4891 static inline __ATTRS_o_ai int
4892 vec_any_ge(__vector __bool int __a, __vector __bool int __b) {
4893 int __cc;
4894 __builtin_s390_vchlfs((__vector unsigned int)__b,
4895 (__vector unsigned int)__a, &__cc);
4896 return __cc != 0;
4899 static inline __ATTRS_o_ai int
4900 vec_any_ge(__vector signed long long __a, __vector signed long long __b) {
4901 int __cc;
4902 __builtin_s390_vchgs(__b, __a, &__cc);
4903 return __cc != 0;
4906 // This prototype is deprecated.
4907 static inline __ATTRS_o_ai int
4908 vec_any_ge(__vector signed long long __a, __vector __bool long long __b) {
4909 int __cc;
4910 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
4911 return __cc != 0;
4914 // This prototype is deprecated.
4915 static inline __ATTRS_o_ai int
4916 vec_any_ge(__vector __bool long long __a, __vector signed long long __b) {
4917 int __cc;
4918 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
4919 return __cc != 0;
4922 static inline __ATTRS_o_ai int
4923 vec_any_ge(__vector unsigned long long __a, __vector unsigned long long __b) {
4924 int __cc;
4925 __builtin_s390_vchlgs(__b, __a, &__cc);
4926 return __cc != 0;
4929 // This prototype is deprecated.
4930 static inline __ATTRS_o_ai int
4931 vec_any_ge(__vector unsigned long long __a, __vector __bool long long __b) {
4932 int __cc;
4933 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
4934 return __cc != 0;
4937 // This prototype is deprecated.
4938 static inline __ATTRS_o_ai int
4939 vec_any_ge(__vector __bool long long __a, __vector unsigned long long __b) {
4940 int __cc;
4941 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
4942 return __cc != 0;
4945 // This prototype is deprecated.
4946 static inline __ATTRS_o_ai int
4947 vec_any_ge(__vector __bool long long __a, __vector __bool long long __b) {
4948 int __cc;
4949 __builtin_s390_vchlgs((__vector unsigned long long)__b,
4950 (__vector unsigned long long)__a, &__cc);
4951 return __cc != 0;
4954 #if __ARCH__ >= 12
4955 static inline __ATTRS_o_ai int
4956 vec_any_ge(__vector float __a, __vector float __b) {
4957 int __cc;
4958 __builtin_s390_vfchesbs(__a, __b, &__cc);
4959 return __cc <= 1;
4961 #endif
4963 static inline __ATTRS_o_ai int
4964 vec_any_ge(__vector double __a, __vector double __b) {
4965 int __cc;
4966 __builtin_s390_vfchedbs(__a, __b, &__cc);
4967 return __cc <= 1;
4970 /*-- vec_any_gt -------------------------------------------------------------*/
4972 static inline __ATTRS_o_ai int
4973 vec_any_gt(__vector signed char __a, __vector signed char __b) {
4974 int __cc;
4975 __builtin_s390_vchbs(__a, __b, &__cc);
4976 return __cc <= 1;
4979 // This prototype is deprecated.
4980 static inline __ATTRS_o_ai int
4981 vec_any_gt(__vector signed char __a, __vector __bool char __b) {
4982 int __cc;
4983 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
4984 return __cc <= 1;
4987 // This prototype is deprecated.
4988 static inline __ATTRS_o_ai int
4989 vec_any_gt(__vector __bool char __a, __vector signed char __b) {
4990 int __cc;
4991 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
4992 return __cc <= 1;
4995 static inline __ATTRS_o_ai int
4996 vec_any_gt(__vector unsigned char __a, __vector unsigned char __b) {
4997 int __cc;
4998 __builtin_s390_vchlbs(__a, __b, &__cc);
4999 return __cc <= 1;
5002 // This prototype is deprecated.
5003 static inline __ATTRS_o_ai int
5004 vec_any_gt(__vector unsigned char __a, __vector __bool char __b) {
5005 int __cc;
5006 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
5007 return __cc <= 1;
5010 // This prototype is deprecated.
5011 static inline __ATTRS_o_ai int
5012 vec_any_gt(__vector __bool char __a, __vector unsigned char __b) {
5013 int __cc;
5014 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
5015 return __cc <= 1;
5018 // This prototype is deprecated.
5019 static inline __ATTRS_o_ai int
5020 vec_any_gt(__vector __bool char __a, __vector __bool char __b) {
5021 int __cc;
5022 __builtin_s390_vchlbs((__vector unsigned char)__a,
5023 (__vector unsigned char)__b, &__cc);
5024 return __cc <= 1;
5027 static inline __ATTRS_o_ai int
5028 vec_any_gt(__vector signed short __a, __vector signed short __b) {
5029 int __cc;
5030 __builtin_s390_vchhs(__a, __b, &__cc);
5031 return __cc <= 1;
5034 // This prototype is deprecated.
5035 static inline __ATTRS_o_ai int
5036 vec_any_gt(__vector signed short __a, __vector __bool short __b) {
5037 int __cc;
5038 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
5039 return __cc <= 1;
5042 // This prototype is deprecated.
5043 static inline __ATTRS_o_ai int
5044 vec_any_gt(__vector __bool short __a, __vector signed short __b) {
5045 int __cc;
5046 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
5047 return __cc <= 1;
5050 static inline __ATTRS_o_ai int
5051 vec_any_gt(__vector unsigned short __a, __vector unsigned short __b) {
5052 int __cc;
5053 __builtin_s390_vchlhs(__a, __b, &__cc);
5054 return __cc <= 1;
5057 // This prototype is deprecated.
5058 static inline __ATTRS_o_ai int
5059 vec_any_gt(__vector unsigned short __a, __vector __bool short __b) {
5060 int __cc;
5061 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
5062 return __cc <= 1;
5065 // This prototype is deprecated.
5066 static inline __ATTRS_o_ai int
5067 vec_any_gt(__vector __bool short __a, __vector unsigned short __b) {
5068 int __cc;
5069 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
5070 return __cc <= 1;
5073 // This prototype is deprecated.
5074 static inline __ATTRS_o_ai int
5075 vec_any_gt(__vector __bool short __a, __vector __bool short __b) {
5076 int __cc;
5077 __builtin_s390_vchlhs((__vector unsigned short)__a,
5078 (__vector unsigned short)__b, &__cc);
5079 return __cc <= 1;
5082 static inline __ATTRS_o_ai int
5083 vec_any_gt(__vector signed int __a, __vector signed int __b) {
5084 int __cc;
5085 __builtin_s390_vchfs(__a, __b, &__cc);
5086 return __cc <= 1;
5089 // This prototype is deprecated.
5090 static inline __ATTRS_o_ai int
5091 vec_any_gt(__vector signed int __a, __vector __bool int __b) {
5092 int __cc;
5093 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
5094 return __cc <= 1;
5097 // This prototype is deprecated.
5098 static inline __ATTRS_o_ai int
5099 vec_any_gt(__vector __bool int __a, __vector signed int __b) {
5100 int __cc;
5101 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
5102 return __cc <= 1;
5105 static inline __ATTRS_o_ai int
5106 vec_any_gt(__vector unsigned int __a, __vector unsigned int __b) {
5107 int __cc;
5108 __builtin_s390_vchlfs(__a, __b, &__cc);
5109 return __cc <= 1;
5112 // This prototype is deprecated.
5113 static inline __ATTRS_o_ai int
5114 vec_any_gt(__vector unsigned int __a, __vector __bool int __b) {
5115 int __cc;
5116 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
5117 return __cc <= 1;
5120 // This prototype is deprecated.
5121 static inline __ATTRS_o_ai int
5122 vec_any_gt(__vector __bool int __a, __vector unsigned int __b) {
5123 int __cc;
5124 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
5125 return __cc <= 1;
5128 // This prototype is deprecated.
5129 static inline __ATTRS_o_ai int
5130 vec_any_gt(__vector __bool int __a, __vector __bool int __b) {
5131 int __cc;
5132 __builtin_s390_vchlfs((__vector unsigned int)__a,
5133 (__vector unsigned int)__b, &__cc);
5134 return __cc <= 1;
5137 static inline __ATTRS_o_ai int
5138 vec_any_gt(__vector signed long long __a, __vector signed long long __b) {
5139 int __cc;
5140 __builtin_s390_vchgs(__a, __b, &__cc);
5141 return __cc <= 1;
5144 // This prototype is deprecated.
5145 static inline __ATTRS_o_ai int
5146 vec_any_gt(__vector signed long long __a, __vector __bool long long __b) {
5147 int __cc;
5148 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
5149 return __cc <= 1;
5152 // This prototype is deprecated.
5153 static inline __ATTRS_o_ai int
5154 vec_any_gt(__vector __bool long long __a, __vector signed long long __b) {
5155 int __cc;
5156 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
5157 return __cc <= 1;
5160 static inline __ATTRS_o_ai int
5161 vec_any_gt(__vector unsigned long long __a, __vector unsigned long long __b) {
5162 int __cc;
5163 __builtin_s390_vchlgs(__a, __b, &__cc);
5164 return __cc <= 1;
5167 // This prototype is deprecated.
5168 static inline __ATTRS_o_ai int
5169 vec_any_gt(__vector unsigned long long __a, __vector __bool long long __b) {
5170 int __cc;
5171 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
5172 return __cc <= 1;
5175 // This prototype is deprecated.
5176 static inline __ATTRS_o_ai int
5177 vec_any_gt(__vector __bool long long __a, __vector unsigned long long __b) {
5178 int __cc;
5179 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
5180 return __cc <= 1;
5183 // This prototype is deprecated.
5184 static inline __ATTRS_o_ai int
5185 vec_any_gt(__vector __bool long long __a, __vector __bool long long __b) {
5186 int __cc;
5187 __builtin_s390_vchlgs((__vector unsigned long long)__a,
5188 (__vector unsigned long long)__b, &__cc);
5189 return __cc <= 1;
5192 #if __ARCH__ >= 12
5193 static inline __ATTRS_o_ai int
5194 vec_any_gt(__vector float __a, __vector float __b) {
5195 int __cc;
5196 __builtin_s390_vfchsbs(__a, __b, &__cc);
5197 return __cc <= 1;
5199 #endif
5201 static inline __ATTRS_o_ai int
5202 vec_any_gt(__vector double __a, __vector double __b) {
5203 int __cc;
5204 __builtin_s390_vfchdbs(__a, __b, &__cc);
5205 return __cc <= 1;
5208 /*-- vec_any_le -------------------------------------------------------------*/
5210 static inline __ATTRS_o_ai int
5211 vec_any_le(__vector signed char __a, __vector signed char __b) {
5212 int __cc;
5213 __builtin_s390_vchbs(__a, __b, &__cc);
5214 return __cc != 0;
5217 // This prototype is deprecated.
5218 static inline __ATTRS_o_ai int
5219 vec_any_le(__vector signed char __a, __vector __bool char __b) {
5220 int __cc;
5221 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
5222 return __cc != 0;
5225 // This prototype is deprecated.
5226 static inline __ATTRS_o_ai int
5227 vec_any_le(__vector __bool char __a, __vector signed char __b) {
5228 int __cc;
5229 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
5230 return __cc != 0;
5233 static inline __ATTRS_o_ai int
5234 vec_any_le(__vector unsigned char __a, __vector unsigned char __b) {
5235 int __cc;
5236 __builtin_s390_vchlbs(__a, __b, &__cc);
5237 return __cc != 0;
5240 // This prototype is deprecated.
5241 static inline __ATTRS_o_ai int
5242 vec_any_le(__vector unsigned char __a, __vector __bool char __b) {
5243 int __cc;
5244 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
5245 return __cc != 0;
5248 // This prototype is deprecated.
5249 static inline __ATTRS_o_ai int
5250 vec_any_le(__vector __bool char __a, __vector unsigned char __b) {
5251 int __cc;
5252 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
5253 return __cc != 0;
5256 // This prototype is deprecated.
5257 static inline __ATTRS_o_ai int
5258 vec_any_le(__vector __bool char __a, __vector __bool char __b) {
5259 int __cc;
5260 __builtin_s390_vchlbs((__vector unsigned char)__a,
5261 (__vector unsigned char)__b, &__cc);
5262 return __cc != 0;
5265 static inline __ATTRS_o_ai int
5266 vec_any_le(__vector signed short __a, __vector signed short __b) {
5267 int __cc;
5268 __builtin_s390_vchhs(__a, __b, &__cc);
5269 return __cc != 0;
5272 // This prototype is deprecated.
5273 static inline __ATTRS_o_ai int
5274 vec_any_le(__vector signed short __a, __vector __bool short __b) {
5275 int __cc;
5276 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
5277 return __cc != 0;
5280 // This prototype is deprecated.
5281 static inline __ATTRS_o_ai int
5282 vec_any_le(__vector __bool short __a, __vector signed short __b) {
5283 int __cc;
5284 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
5285 return __cc != 0;
5288 static inline __ATTRS_o_ai int
5289 vec_any_le(__vector unsigned short __a, __vector unsigned short __b) {
5290 int __cc;
5291 __builtin_s390_vchlhs(__a, __b, &__cc);
5292 return __cc != 0;
5295 // This prototype is deprecated.
5296 static inline __ATTRS_o_ai int
5297 vec_any_le(__vector unsigned short __a, __vector __bool short __b) {
5298 int __cc;
5299 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
5300 return __cc != 0;
5303 // This prototype is deprecated.
5304 static inline __ATTRS_o_ai int
5305 vec_any_le(__vector __bool short __a, __vector unsigned short __b) {
5306 int __cc;
5307 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
5308 return __cc != 0;
5311 // This prototype is deprecated.
5312 static inline __ATTRS_o_ai int
5313 vec_any_le(__vector __bool short __a, __vector __bool short __b) {
5314 int __cc;
5315 __builtin_s390_vchlhs((__vector unsigned short)__a,
5316 (__vector unsigned short)__b, &__cc);
5317 return __cc != 0;
5320 static inline __ATTRS_o_ai int
5321 vec_any_le(__vector signed int __a, __vector signed int __b) {
5322 int __cc;
5323 __builtin_s390_vchfs(__a, __b, &__cc);
5324 return __cc != 0;
5327 // This prototype is deprecated.
5328 static inline __ATTRS_o_ai int
5329 vec_any_le(__vector signed int __a, __vector __bool int __b) {
5330 int __cc;
5331 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
5332 return __cc != 0;
5335 // This prototype is deprecated.
5336 static inline __ATTRS_o_ai int
5337 vec_any_le(__vector __bool int __a, __vector signed int __b) {
5338 int __cc;
5339 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
5340 return __cc != 0;
5343 static inline __ATTRS_o_ai int
5344 vec_any_le(__vector unsigned int __a, __vector unsigned int __b) {
5345 int __cc;
5346 __builtin_s390_vchlfs(__a, __b, &__cc);
5347 return __cc != 0;
5350 // This prototype is deprecated.
5351 static inline __ATTRS_o_ai int
5352 vec_any_le(__vector unsigned int __a, __vector __bool int __b) {
5353 int __cc;
5354 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
5355 return __cc != 0;
5358 // This prototype is deprecated.
5359 static inline __ATTRS_o_ai int
5360 vec_any_le(__vector __bool int __a, __vector unsigned int __b) {
5361 int __cc;
5362 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
5363 return __cc != 0;
5366 // This prototype is deprecated.
5367 static inline __ATTRS_o_ai int
5368 vec_any_le(__vector __bool int __a, __vector __bool int __b) {
5369 int __cc;
5370 __builtin_s390_vchlfs((__vector unsigned int)__a,
5371 (__vector unsigned int)__b, &__cc);
5372 return __cc != 0;
5375 static inline __ATTRS_o_ai int
5376 vec_any_le(__vector signed long long __a, __vector signed long long __b) {
5377 int __cc;
5378 __builtin_s390_vchgs(__a, __b, &__cc);
5379 return __cc != 0;
5382 // This prototype is deprecated.
5383 static inline __ATTRS_o_ai int
5384 vec_any_le(__vector signed long long __a, __vector __bool long long __b) {
5385 int __cc;
5386 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
5387 return __cc != 0;
5390 // This prototype is deprecated.
5391 static inline __ATTRS_o_ai int
5392 vec_any_le(__vector __bool long long __a, __vector signed long long __b) {
5393 int __cc;
5394 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
5395 return __cc != 0;
5398 static inline __ATTRS_o_ai int
5399 vec_any_le(__vector unsigned long long __a, __vector unsigned long long __b) {
5400 int __cc;
5401 __builtin_s390_vchlgs(__a, __b, &__cc);
5402 return __cc != 0;
5405 // This prototype is deprecated.
5406 static inline __ATTRS_o_ai int
5407 vec_any_le(__vector unsigned long long __a, __vector __bool long long __b) {
5408 int __cc;
5409 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
5410 return __cc != 0;
5413 // This prototype is deprecated.
5414 static inline __ATTRS_o_ai int
5415 vec_any_le(__vector __bool long long __a, __vector unsigned long long __b) {
5416 int __cc;
5417 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
5418 return __cc != 0;
5421 // This prototype is deprecated.
5422 static inline __ATTRS_o_ai int
5423 vec_any_le(__vector __bool long long __a, __vector __bool long long __b) {
5424 int __cc;
5425 __builtin_s390_vchlgs((__vector unsigned long long)__a,
5426 (__vector unsigned long long)__b, &__cc);
5427 return __cc != 0;
5430 #if __ARCH__ >= 12
5431 static inline __ATTRS_o_ai int
5432 vec_any_le(__vector float __a, __vector float __b) {
5433 int __cc;
5434 __builtin_s390_vfchesbs(__b, __a, &__cc);
5435 return __cc <= 1;
5437 #endif
5439 static inline __ATTRS_o_ai int
5440 vec_any_le(__vector double __a, __vector double __b) {
5441 int __cc;
5442 __builtin_s390_vfchedbs(__b, __a, &__cc);
5443 return __cc <= 1;
5446 /*-- vec_any_lt -------------------------------------------------------------*/
5448 static inline __ATTRS_o_ai int
5449 vec_any_lt(__vector signed char __a, __vector signed char __b) {
5450 int __cc;
5451 __builtin_s390_vchbs(__b, __a, &__cc);
5452 return __cc <= 1;
5455 // This prototype is deprecated.
5456 static inline __ATTRS_o_ai int
5457 vec_any_lt(__vector signed char __a, __vector __bool char __b) {
5458 int __cc;
5459 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
5460 return __cc <= 1;
5463 // This prototype is deprecated.
5464 static inline __ATTRS_o_ai int
5465 vec_any_lt(__vector __bool char __a, __vector signed char __b) {
5466 int __cc;
5467 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
5468 return __cc <= 1;
5471 static inline __ATTRS_o_ai int
5472 vec_any_lt(__vector unsigned char __a, __vector unsigned char __b) {
5473 int __cc;
5474 __builtin_s390_vchlbs(__b, __a, &__cc);
5475 return __cc <= 1;
5478 // This prototype is deprecated.
5479 static inline __ATTRS_o_ai int
5480 vec_any_lt(__vector unsigned char __a, __vector __bool char __b) {
5481 int __cc;
5482 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
5483 return __cc <= 1;
5486 // This prototype is deprecated.
5487 static inline __ATTRS_o_ai int
5488 vec_any_lt(__vector __bool char __a, __vector unsigned char __b) {
5489 int __cc;
5490 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
5491 return __cc <= 1;
5494 // This prototype is deprecated.
5495 static inline __ATTRS_o_ai int
5496 vec_any_lt(__vector __bool char __a, __vector __bool char __b) {
5497 int __cc;
5498 __builtin_s390_vchlbs((__vector unsigned char)__b,
5499 (__vector unsigned char)__a, &__cc);
5500 return __cc <= 1;
5503 static inline __ATTRS_o_ai int
5504 vec_any_lt(__vector signed short __a, __vector signed short __b) {
5505 int __cc;
5506 __builtin_s390_vchhs(__b, __a, &__cc);
5507 return __cc <= 1;
5510 // This prototype is deprecated.
5511 static inline __ATTRS_o_ai int
5512 vec_any_lt(__vector signed short __a, __vector __bool short __b) {
5513 int __cc;
5514 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
5515 return __cc <= 1;
5518 // This prototype is deprecated.
5519 static inline __ATTRS_o_ai int
5520 vec_any_lt(__vector __bool short __a, __vector signed short __b) {
5521 int __cc;
5522 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
5523 return __cc <= 1;
5526 static inline __ATTRS_o_ai int
5527 vec_any_lt(__vector unsigned short __a, __vector unsigned short __b) {
5528 int __cc;
5529 __builtin_s390_vchlhs(__b, __a, &__cc);
5530 return __cc <= 1;
5533 // This prototype is deprecated.
5534 static inline __ATTRS_o_ai int
5535 vec_any_lt(__vector unsigned short __a, __vector __bool short __b) {
5536 int __cc;
5537 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
5538 return __cc <= 1;
5541 // This prototype is deprecated.
5542 static inline __ATTRS_o_ai int
5543 vec_any_lt(__vector __bool short __a, __vector unsigned short __b) {
5544 int __cc;
5545 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
5546 return __cc <= 1;
5549 // This prototype is deprecated.
5550 static inline __ATTRS_o_ai int
5551 vec_any_lt(__vector __bool short __a, __vector __bool short __b) {
5552 int __cc;
5553 __builtin_s390_vchlhs((__vector unsigned short)__b,
5554 (__vector unsigned short)__a, &__cc);
5555 return __cc <= 1;
5558 static inline __ATTRS_o_ai int
5559 vec_any_lt(__vector signed int __a, __vector signed int __b) {
5560 int __cc;
5561 __builtin_s390_vchfs(__b, __a, &__cc);
5562 return __cc <= 1;
5565 // This prototype is deprecated.
5566 static inline __ATTRS_o_ai int
5567 vec_any_lt(__vector signed int __a, __vector __bool int __b) {
5568 int __cc;
5569 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
5570 return __cc <= 1;
5573 // This prototype is deprecated.
5574 static inline __ATTRS_o_ai int
5575 vec_any_lt(__vector __bool int __a, __vector signed int __b) {
5576 int __cc;
5577 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
5578 return __cc <= 1;
5581 static inline __ATTRS_o_ai int
5582 vec_any_lt(__vector unsigned int __a, __vector unsigned int __b) {
5583 int __cc;
5584 __builtin_s390_vchlfs(__b, __a, &__cc);
5585 return __cc <= 1;
5588 // This prototype is deprecated.
5589 static inline __ATTRS_o_ai int
5590 vec_any_lt(__vector unsigned int __a, __vector __bool int __b) {
5591 int __cc;
5592 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
5593 return __cc <= 1;
5596 // This prototype is deprecated.
5597 static inline __ATTRS_o_ai int
5598 vec_any_lt(__vector __bool int __a, __vector unsigned int __b) {
5599 int __cc;
5600 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
5601 return __cc <= 1;
5604 // This prototype is deprecated.
5605 static inline __ATTRS_o_ai int
5606 vec_any_lt(__vector __bool int __a, __vector __bool int __b) {
5607 int __cc;
5608 __builtin_s390_vchlfs((__vector unsigned int)__b,
5609 (__vector unsigned int)__a, &__cc);
5610 return __cc <= 1;
5613 static inline __ATTRS_o_ai int
5614 vec_any_lt(__vector signed long long __a, __vector signed long long __b) {
5615 int __cc;
5616 __builtin_s390_vchgs(__b, __a, &__cc);
5617 return __cc <= 1;
5620 // This prototype is deprecated.
5621 static inline __ATTRS_o_ai int
5622 vec_any_lt(__vector signed long long __a, __vector __bool long long __b) {
5623 int __cc;
5624 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
5625 return __cc <= 1;
5628 // This prototype is deprecated.
5629 static inline __ATTRS_o_ai int
5630 vec_any_lt(__vector __bool long long __a, __vector signed long long __b) {
5631 int __cc;
5632 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
5633 return __cc <= 1;
5636 static inline __ATTRS_o_ai int
5637 vec_any_lt(__vector unsigned long long __a, __vector unsigned long long __b) {
5638 int __cc;
5639 __builtin_s390_vchlgs(__b, __a, &__cc);
5640 return __cc <= 1;
5643 // This prototype is deprecated.
5644 static inline __ATTRS_o_ai int
5645 vec_any_lt(__vector unsigned long long __a, __vector __bool long long __b) {
5646 int __cc;
5647 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
5648 return __cc <= 1;
5651 // This prototype is deprecated.
5652 static inline __ATTRS_o_ai int
5653 vec_any_lt(__vector __bool long long __a, __vector unsigned long long __b) {
5654 int __cc;
5655 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
5656 return __cc <= 1;
5659 // This prototype is deprecated.
5660 static inline __ATTRS_o_ai int
5661 vec_any_lt(__vector __bool long long __a, __vector __bool long long __b) {
5662 int __cc;
5663 __builtin_s390_vchlgs((__vector unsigned long long)__b,
5664 (__vector unsigned long long)__a, &__cc);
5665 return __cc <= 1;
5668 #if __ARCH__ >= 12
5669 static inline __ATTRS_o_ai int
5670 vec_any_lt(__vector float __a, __vector float __b) {
5671 int __cc;
5672 __builtin_s390_vfchsbs(__b, __a, &__cc);
5673 return __cc <= 1;
5675 #endif
5677 static inline __ATTRS_o_ai int
5678 vec_any_lt(__vector double __a, __vector double __b) {
5679 int __cc;
5680 __builtin_s390_vfchdbs(__b, __a, &__cc);
5681 return __cc <= 1;
5684 /*-- vec_any_nge ------------------------------------------------------------*/
5686 #if __ARCH__ >= 12
5687 static inline __ATTRS_o_ai int
5688 vec_any_nge(__vector float __a, __vector float __b) {
5689 int __cc;
5690 __builtin_s390_vfchesbs(__a, __b, &__cc);
5691 return __cc != 0;
5693 #endif
5695 static inline __ATTRS_o_ai int
5696 vec_any_nge(__vector double __a, __vector double __b) {
5697 int __cc;
5698 __builtin_s390_vfchedbs(__a, __b, &__cc);
5699 return __cc != 0;
5702 /*-- vec_any_ngt ------------------------------------------------------------*/
5704 #if __ARCH__ >= 12
5705 static inline __ATTRS_o_ai int
5706 vec_any_ngt(__vector float __a, __vector float __b) {
5707 int __cc;
5708 __builtin_s390_vfchsbs(__a, __b, &__cc);
5709 return __cc != 0;
5711 #endif
5713 static inline __ATTRS_o_ai int
5714 vec_any_ngt(__vector double __a, __vector double __b) {
5715 int __cc;
5716 __builtin_s390_vfchdbs(__a, __b, &__cc);
5717 return __cc != 0;
5720 /*-- vec_any_nle ------------------------------------------------------------*/
5722 #if __ARCH__ >= 12
5723 static inline __ATTRS_o_ai int
5724 vec_any_nle(__vector float __a, __vector float __b) {
5725 int __cc;
5726 __builtin_s390_vfchesbs(__b, __a, &__cc);
5727 return __cc != 0;
5729 #endif
5731 static inline __ATTRS_o_ai int
5732 vec_any_nle(__vector double __a, __vector double __b) {
5733 int __cc;
5734 __builtin_s390_vfchedbs(__b, __a, &__cc);
5735 return __cc != 0;
5738 /*-- vec_any_nlt ------------------------------------------------------------*/
5740 #if __ARCH__ >= 12
5741 static inline __ATTRS_o_ai int
5742 vec_any_nlt(__vector float __a, __vector float __b) {
5743 int __cc;
5744 __builtin_s390_vfchsbs(__b, __a, &__cc);
5745 return __cc != 0;
5747 #endif
5749 static inline __ATTRS_o_ai int
5750 vec_any_nlt(__vector double __a, __vector double __b) {
5751 int __cc;
5752 __builtin_s390_vfchdbs(__b, __a, &__cc);
5753 return __cc != 0;
5756 /*-- vec_any_nan ------------------------------------------------------------*/
5758 #if __ARCH__ >= 12
5759 static inline __ATTRS_o_ai int
5760 vec_any_nan(__vector float __a) {
5761 int __cc;
5762 __builtin_s390_vftcisb(__a, 15, &__cc);
5763 return __cc != 3;
5765 #endif
5767 static inline __ATTRS_o_ai int
5768 vec_any_nan(__vector double __a) {
5769 int __cc;
5770 __builtin_s390_vftcidb(__a, 15, &__cc);
5771 return __cc != 3;
5774 /*-- vec_any_numeric --------------------------------------------------------*/
5776 #if __ARCH__ >= 12
5777 static inline __ATTRS_o_ai int
5778 vec_any_numeric(__vector float __a) {
5779 int __cc;
5780 __builtin_s390_vftcisb(__a, 15, &__cc);
5781 return __cc != 0;
5783 #endif
5785 static inline __ATTRS_o_ai int
5786 vec_any_numeric(__vector double __a) {
5787 int __cc;
5788 __builtin_s390_vftcidb(__a, 15, &__cc);
5789 return __cc != 0;
5792 /*-- vec_andc ---------------------------------------------------------------*/
5794 static inline __ATTRS_o_ai __vector __bool char
5795 vec_andc(__vector __bool char __a, __vector __bool char __b) {
5796 return __a & ~__b;
5799 static inline __ATTRS_o_ai __vector signed char
5800 vec_andc(__vector signed char __a, __vector signed char __b) {
5801 return __a & ~__b;
5804 // This prototype is deprecated.
5805 static inline __ATTRS_o_ai __vector signed char
5806 vec_andc(__vector __bool char __a, __vector signed char __b) {
5807 return __a & ~__b;
5810 // This prototype is deprecated.
5811 static inline __ATTRS_o_ai __vector signed char
5812 vec_andc(__vector signed char __a, __vector __bool char __b) {
5813 return __a & ~__b;
5816 static inline __ATTRS_o_ai __vector unsigned char
5817 vec_andc(__vector unsigned char __a, __vector unsigned char __b) {
5818 return __a & ~__b;
5821 // This prototype is deprecated.
5822 static inline __ATTRS_o_ai __vector unsigned char
5823 vec_andc(__vector __bool char __a, __vector unsigned char __b) {
5824 return __a & ~__b;
5827 // This prototype is deprecated.
5828 static inline __ATTRS_o_ai __vector unsigned char
5829 vec_andc(__vector unsigned char __a, __vector __bool char __b) {
5830 return __a & ~__b;
5833 static inline __ATTRS_o_ai __vector __bool short
5834 vec_andc(__vector __bool short __a, __vector __bool short __b) {
5835 return __a & ~__b;
5838 static inline __ATTRS_o_ai __vector signed short
5839 vec_andc(__vector signed short __a, __vector signed short __b) {
5840 return __a & ~__b;
5843 // This prototype is deprecated.
5844 static inline __ATTRS_o_ai __vector signed short
5845 vec_andc(__vector __bool short __a, __vector signed short __b) {
5846 return __a & ~__b;
5849 // This prototype is deprecated.
5850 static inline __ATTRS_o_ai __vector signed short
5851 vec_andc(__vector signed short __a, __vector __bool short __b) {
5852 return __a & ~__b;
5855 static inline __ATTRS_o_ai __vector unsigned short
5856 vec_andc(__vector unsigned short __a, __vector unsigned short __b) {
5857 return __a & ~__b;
5860 // This prototype is deprecated.
5861 static inline __ATTRS_o_ai __vector unsigned short
5862 vec_andc(__vector __bool short __a, __vector unsigned short __b) {
5863 return __a & ~__b;
5866 // This prototype is deprecated.
5867 static inline __ATTRS_o_ai __vector unsigned short
5868 vec_andc(__vector unsigned short __a, __vector __bool short __b) {
5869 return __a & ~__b;
5872 static inline __ATTRS_o_ai __vector __bool int
5873 vec_andc(__vector __bool int __a, __vector __bool int __b) {
5874 return __a & ~__b;
5877 static inline __ATTRS_o_ai __vector signed int
5878 vec_andc(__vector signed int __a, __vector signed int __b) {
5879 return __a & ~__b;
5882 // This prototype is deprecated.
5883 static inline __ATTRS_o_ai __vector signed int
5884 vec_andc(__vector __bool int __a, __vector signed int __b) {
5885 return __a & ~__b;
5888 // This prototype is deprecated.
5889 static inline __ATTRS_o_ai __vector signed int
5890 vec_andc(__vector signed int __a, __vector __bool int __b) {
5891 return __a & ~__b;
5894 static inline __ATTRS_o_ai __vector unsigned int
5895 vec_andc(__vector unsigned int __a, __vector unsigned int __b) {
5896 return __a & ~__b;
5899 // This prototype is deprecated.
5900 static inline __ATTRS_o_ai __vector unsigned int
5901 vec_andc(__vector __bool int __a, __vector unsigned int __b) {
5902 return __a & ~__b;
5905 // This prototype is deprecated.
5906 static inline __ATTRS_o_ai __vector unsigned int
5907 vec_andc(__vector unsigned int __a, __vector __bool int __b) {
5908 return __a & ~__b;
5911 static inline __ATTRS_o_ai __vector __bool long long
5912 vec_andc(__vector __bool long long __a, __vector __bool long long __b) {
5913 return __a & ~__b;
5916 static inline __ATTRS_o_ai __vector signed long long
5917 vec_andc(__vector signed long long __a, __vector signed long long __b) {
5918 return __a & ~__b;
5921 // This prototype is deprecated.
5922 static inline __ATTRS_o_ai __vector signed long long
5923 vec_andc(__vector __bool long long __a, __vector signed long long __b) {
5924 return __a & ~__b;
5927 // This prototype is deprecated.
5928 static inline __ATTRS_o_ai __vector signed long long
5929 vec_andc(__vector signed long long __a, __vector __bool long long __b) {
5930 return __a & ~__b;
5933 static inline __ATTRS_o_ai __vector unsigned long long
5934 vec_andc(__vector unsigned long long __a, __vector unsigned long long __b) {
5935 return __a & ~__b;
5938 // This prototype is deprecated.
5939 static inline __ATTRS_o_ai __vector unsigned long long
5940 vec_andc(__vector __bool long long __a, __vector unsigned long long __b) {
5941 return __a & ~__b;
5944 // This prototype is deprecated.
5945 static inline __ATTRS_o_ai __vector unsigned long long
5946 vec_andc(__vector unsigned long long __a, __vector __bool long long __b) {
5947 return __a & ~__b;
5950 #if __ARCH__ >= 12
5951 static inline __ATTRS_o_ai __vector float
5952 vec_andc(__vector float __a, __vector float __b) {
5953 return (__vector float)((__vector unsigned int)__a &
5954 ~(__vector unsigned int)__b);
5956 #endif
5958 static inline __ATTRS_o_ai __vector double
5959 vec_andc(__vector double __a, __vector double __b) {
5960 return (__vector double)((__vector unsigned long long)__a &
5961 ~(__vector unsigned long long)__b);
5964 // This prototype is deprecated.
5965 static inline __ATTRS_o_ai __vector double
5966 vec_andc(__vector __bool long long __a, __vector double __b) {
5967 return (__vector double)((__vector unsigned long long)__a &
5968 ~(__vector unsigned long long)__b);
5971 // This prototype is deprecated.
5972 static inline __ATTRS_o_ai __vector double
5973 vec_andc(__vector double __a, __vector __bool long long __b) {
5974 return (__vector double)((__vector unsigned long long)__a &
5975 ~(__vector unsigned long long)__b);
5978 /*-- vec_nor ----------------------------------------------------------------*/
5980 static inline __ATTRS_o_ai __vector __bool char
5981 vec_nor(__vector __bool char __a, __vector __bool char __b) {
5982 return ~(__a | __b);
5985 static inline __ATTRS_o_ai __vector signed char
5986 vec_nor(__vector signed char __a, __vector signed char __b) {
5987 return ~(__a | __b);
5990 // This prototype is deprecated.
5991 static inline __ATTRS_o_ai __vector signed char
5992 vec_nor(__vector __bool char __a, __vector signed char __b) {
5993 return ~(__a | __b);
5996 // This prototype is deprecated.
5997 static inline __ATTRS_o_ai __vector signed char
5998 vec_nor(__vector signed char __a, __vector __bool char __b) {
5999 return ~(__a | __b);
6002 static inline __ATTRS_o_ai __vector unsigned char
6003 vec_nor(__vector unsigned char __a, __vector unsigned char __b) {
6004 return ~(__a | __b);
6007 // This prototype is deprecated.
6008 static inline __ATTRS_o_ai __vector unsigned char
6009 vec_nor(__vector __bool char __a, __vector unsigned char __b) {
6010 return ~(__a | __b);
6013 // This prototype is deprecated.
6014 static inline __ATTRS_o_ai __vector unsigned char
6015 vec_nor(__vector unsigned char __a, __vector __bool char __b) {
6016 return ~(__a | __b);
6019 static inline __ATTRS_o_ai __vector __bool short
6020 vec_nor(__vector __bool short __a, __vector __bool short __b) {
6021 return ~(__a | __b);
6024 static inline __ATTRS_o_ai __vector signed short
6025 vec_nor(__vector signed short __a, __vector signed short __b) {
6026 return ~(__a | __b);
6029 // This prototype is deprecated.
6030 static inline __ATTRS_o_ai __vector signed short
6031 vec_nor(__vector __bool short __a, __vector signed short __b) {
6032 return ~(__a | __b);
6035 // This prototype is deprecated.
6036 static inline __ATTRS_o_ai __vector signed short
6037 vec_nor(__vector signed short __a, __vector __bool short __b) {
6038 return ~(__a | __b);
6041 static inline __ATTRS_o_ai __vector unsigned short
6042 vec_nor(__vector unsigned short __a, __vector unsigned short __b) {
6043 return ~(__a | __b);
6046 // This prototype is deprecated.
6047 static inline __ATTRS_o_ai __vector unsigned short
6048 vec_nor(__vector __bool short __a, __vector unsigned short __b) {
6049 return ~(__a | __b);
6052 // This prototype is deprecated.
6053 static inline __ATTRS_o_ai __vector unsigned short
6054 vec_nor(__vector unsigned short __a, __vector __bool short __b) {
6055 return ~(__a | __b);
6058 static inline __ATTRS_o_ai __vector __bool int
6059 vec_nor(__vector __bool int __a, __vector __bool int __b) {
6060 return ~(__a | __b);
6063 static inline __ATTRS_o_ai __vector signed int
6064 vec_nor(__vector signed int __a, __vector signed int __b) {
6065 return ~(__a | __b);
6068 // This prototype is deprecated.
6069 static inline __ATTRS_o_ai __vector signed int
6070 vec_nor(__vector __bool int __a, __vector signed int __b) {
6071 return ~(__a | __b);
6074 // This prototype is deprecated.
6075 static inline __ATTRS_o_ai __vector signed int
6076 vec_nor(__vector signed int __a, __vector __bool int __b) {
6077 return ~(__a | __b);
6080 static inline __ATTRS_o_ai __vector unsigned int
6081 vec_nor(__vector unsigned int __a, __vector unsigned int __b) {
6082 return ~(__a | __b);
6085 // This prototype is deprecated.
6086 static inline __ATTRS_o_ai __vector unsigned int
6087 vec_nor(__vector __bool int __a, __vector unsigned int __b) {
6088 return ~(__a | __b);
6091 // This prototype is deprecated.
6092 static inline __ATTRS_o_ai __vector unsigned int
6093 vec_nor(__vector unsigned int __a, __vector __bool int __b) {
6094 return ~(__a | __b);
6097 static inline __ATTRS_o_ai __vector __bool long long
6098 vec_nor(__vector __bool long long __a, __vector __bool long long __b) {
6099 return ~(__a | __b);
6102 static inline __ATTRS_o_ai __vector signed long long
6103 vec_nor(__vector signed long long __a, __vector signed long long __b) {
6104 return ~(__a | __b);
6107 // This prototype is deprecated.
6108 static inline __ATTRS_o_ai __vector signed long long
6109 vec_nor(__vector __bool long long __a, __vector signed long long __b) {
6110 return ~(__a | __b);
6113 // This prototype is deprecated.
6114 static inline __ATTRS_o_ai __vector signed long long
6115 vec_nor(__vector signed long long __a, __vector __bool long long __b) {
6116 return ~(__a | __b);
6119 static inline __ATTRS_o_ai __vector unsigned long long
6120 vec_nor(__vector unsigned long long __a, __vector unsigned long long __b) {
6121 return ~(__a | __b);
6124 // This prototype is deprecated.
6125 static inline __ATTRS_o_ai __vector unsigned long long
6126 vec_nor(__vector __bool long long __a, __vector unsigned long long __b) {
6127 return ~(__a | __b);
6130 // This prototype is deprecated.
6131 static inline __ATTRS_o_ai __vector unsigned long long
6132 vec_nor(__vector unsigned long long __a, __vector __bool long long __b) {
6133 return ~(__a | __b);
6136 #if __ARCH__ >= 12
6137 static inline __ATTRS_o_ai __vector float
6138 vec_nor(__vector float __a, __vector float __b) {
6139 return (__vector float)~((__vector unsigned int)__a |
6140 (__vector unsigned int)__b);
6142 #endif
6144 static inline __ATTRS_o_ai __vector double
6145 vec_nor(__vector double __a, __vector double __b) {
6146 return (__vector double)~((__vector unsigned long long)__a |
6147 (__vector unsigned long long)__b);
6150 // This prototype is deprecated.
6151 static inline __ATTRS_o_ai __vector double
6152 vec_nor(__vector __bool long long __a, __vector double __b) {
6153 return (__vector double)~((__vector unsigned long long)__a |
6154 (__vector unsigned long long)__b);
6157 // This prototype is deprecated.
6158 static inline __ATTRS_o_ai __vector double
6159 vec_nor(__vector double __a, __vector __bool long long __b) {
6160 return (__vector double)~((__vector unsigned long long)__a |
6161 (__vector unsigned long long)__b);
6164 /*-- vec_orc ----------------------------------------------------------------*/
6166 #if __ARCH__ >= 12
6167 static inline __ATTRS_o_ai __vector __bool char
6168 vec_orc(__vector __bool char __a, __vector __bool char __b) {
6169 return __a | ~__b;
6172 static inline __ATTRS_o_ai __vector signed char
6173 vec_orc(__vector signed char __a, __vector signed char __b) {
6174 return __a | ~__b;
6177 static inline __ATTRS_o_ai __vector unsigned char
6178 vec_orc(__vector unsigned char __a, __vector unsigned char __b) {
6179 return __a | ~__b;
6182 static inline __ATTRS_o_ai __vector __bool short
6183 vec_orc(__vector __bool short __a, __vector __bool short __b) {
6184 return __a | ~__b;
6187 static inline __ATTRS_o_ai __vector signed short
6188 vec_orc(__vector signed short __a, __vector signed short __b) {
6189 return __a | ~__b;
6192 static inline __ATTRS_o_ai __vector unsigned short
6193 vec_orc(__vector unsigned short __a, __vector unsigned short __b) {
6194 return __a | ~__b;
6197 static inline __ATTRS_o_ai __vector __bool int
6198 vec_orc(__vector __bool int __a, __vector __bool int __b) {
6199 return __a | ~__b;
6202 static inline __ATTRS_o_ai __vector signed int
6203 vec_orc(__vector signed int __a, __vector signed int __b) {
6204 return __a | ~__b;
6207 static inline __ATTRS_o_ai __vector unsigned int
6208 vec_orc(__vector unsigned int __a, __vector unsigned int __b) {
6209 return __a | ~__b;
6212 static inline __ATTRS_o_ai __vector __bool long long
6213 vec_orc(__vector __bool long long __a, __vector __bool long long __b) {
6214 return __a | ~__b;
6217 static inline __ATTRS_o_ai __vector signed long long
6218 vec_orc(__vector signed long long __a, __vector signed long long __b) {
6219 return __a | ~__b;
6222 static inline __ATTRS_o_ai __vector unsigned long long
6223 vec_orc(__vector unsigned long long __a, __vector unsigned long long __b) {
6224 return __a | ~__b;
6227 static inline __ATTRS_o_ai __vector float
6228 vec_orc(__vector float __a, __vector float __b) {
6229 return (__vector float)((__vector unsigned int)__a |
6230 ~(__vector unsigned int)__b);
6233 static inline __ATTRS_o_ai __vector double
6234 vec_orc(__vector double __a, __vector double __b) {
6235 return (__vector double)((__vector unsigned long long)__a |
6236 ~(__vector unsigned long long)__b);
6238 #endif
6240 /*-- vec_nand ---------------------------------------------------------------*/
6242 #if __ARCH__ >= 12
6243 static inline __ATTRS_o_ai __vector __bool char
6244 vec_nand(__vector __bool char __a, __vector __bool char __b) {
6245 return ~(__a & __b);
6248 static inline __ATTRS_o_ai __vector signed char
6249 vec_nand(__vector signed char __a, __vector signed char __b) {
6250 return ~(__a & __b);
6253 static inline __ATTRS_o_ai __vector unsigned char
6254 vec_nand(__vector unsigned char __a, __vector unsigned char __b) {
6255 return ~(__a & __b);
6258 static inline __ATTRS_o_ai __vector __bool short
6259 vec_nand(__vector __bool short __a, __vector __bool short __b) {
6260 return ~(__a & __b);
6263 static inline __ATTRS_o_ai __vector signed short
6264 vec_nand(__vector signed short __a, __vector signed short __b) {
6265 return ~(__a & __b);
6268 static inline __ATTRS_o_ai __vector unsigned short
6269 vec_nand(__vector unsigned short __a, __vector unsigned short __b) {
6270 return ~(__a & __b);
6273 static inline __ATTRS_o_ai __vector __bool int
6274 vec_nand(__vector __bool int __a, __vector __bool int __b) {
6275 return ~(__a & __b);
6278 static inline __ATTRS_o_ai __vector signed int
6279 vec_nand(__vector signed int __a, __vector signed int __b) {
6280 return ~(__a & __b);
6283 static inline __ATTRS_o_ai __vector unsigned int
6284 vec_nand(__vector unsigned int __a, __vector unsigned int __b) {
6285 return ~(__a & __b);
6288 static inline __ATTRS_o_ai __vector __bool long long
6289 vec_nand(__vector __bool long long __a, __vector __bool long long __b) {
6290 return ~(__a & __b);
6293 static inline __ATTRS_o_ai __vector signed long long
6294 vec_nand(__vector signed long long __a, __vector signed long long __b) {
6295 return ~(__a & __b);
6298 static inline __ATTRS_o_ai __vector unsigned long long
6299 vec_nand(__vector unsigned long long __a, __vector unsigned long long __b) {
6300 return ~(__a & __b);
6303 static inline __ATTRS_o_ai __vector float
6304 vec_nand(__vector float __a, __vector float __b) {
6305 return (__vector float)~((__vector unsigned int)__a &
6306 (__vector unsigned int)__b);
6309 static inline __ATTRS_o_ai __vector double
6310 vec_nand(__vector double __a, __vector double __b) {
6311 return (__vector double)~((__vector unsigned long long)__a &
6312 (__vector unsigned long long)__b);
6314 #endif
6316 /*-- vec_eqv ----------------------------------------------------------------*/
6318 #if __ARCH__ >= 12
6319 static inline __ATTRS_o_ai __vector __bool char
6320 vec_eqv(__vector __bool char __a, __vector __bool char __b) {
6321 return ~(__a ^ __b);
6324 static inline __ATTRS_o_ai __vector signed char
6325 vec_eqv(__vector signed char __a, __vector signed char __b) {
6326 return ~(__a ^ __b);
6329 static inline __ATTRS_o_ai __vector unsigned char
6330 vec_eqv(__vector unsigned char __a, __vector unsigned char __b) {
6331 return ~(__a ^ __b);
6334 static inline __ATTRS_o_ai __vector __bool short
6335 vec_eqv(__vector __bool short __a, __vector __bool short __b) {
6336 return ~(__a ^ __b);
6339 static inline __ATTRS_o_ai __vector signed short
6340 vec_eqv(__vector signed short __a, __vector signed short __b) {
6341 return ~(__a ^ __b);
6344 static inline __ATTRS_o_ai __vector unsigned short
6345 vec_eqv(__vector unsigned short __a, __vector unsigned short __b) {
6346 return ~(__a ^ __b);
6349 static inline __ATTRS_o_ai __vector __bool int
6350 vec_eqv(__vector __bool int __a, __vector __bool int __b) {
6351 return ~(__a ^ __b);
6354 static inline __ATTRS_o_ai __vector signed int
6355 vec_eqv(__vector signed int __a, __vector signed int __b) {
6356 return ~(__a ^ __b);
6359 static inline __ATTRS_o_ai __vector unsigned int
6360 vec_eqv(__vector unsigned int __a, __vector unsigned int __b) {
6361 return ~(__a ^ __b);
6364 static inline __ATTRS_o_ai __vector __bool long long
6365 vec_eqv(__vector __bool long long __a, __vector __bool long long __b) {
6366 return ~(__a ^ __b);
6369 static inline __ATTRS_o_ai __vector signed long long
6370 vec_eqv(__vector signed long long __a, __vector signed long long __b) {
6371 return ~(__a ^ __b);
6374 static inline __ATTRS_o_ai __vector unsigned long long
6375 vec_eqv(__vector unsigned long long __a, __vector unsigned long long __b) {
6376 return ~(__a ^ __b);
6379 static inline __ATTRS_o_ai __vector float
6380 vec_eqv(__vector float __a, __vector float __b) {
6381 return (__vector float)~((__vector unsigned int)__a ^
6382 (__vector unsigned int)__b);
6385 static inline __ATTRS_o_ai __vector double
6386 vec_eqv(__vector double __a, __vector double __b) {
6387 return (__vector double)~((__vector unsigned long long)__a ^
6388 (__vector unsigned long long)__b);
6390 #endif
6392 /*-- vec_cntlz --------------------------------------------------------------*/
6394 static inline __ATTRS_o_ai __vector unsigned char
6395 vec_cntlz(__vector signed char __a) {
6396 return __builtin_s390_vclzb((__vector unsigned char)__a);
6399 static inline __ATTRS_o_ai __vector unsigned char
6400 vec_cntlz(__vector unsigned char __a) {
6401 return __builtin_s390_vclzb(__a);
6404 static inline __ATTRS_o_ai __vector unsigned short
6405 vec_cntlz(__vector signed short __a) {
6406 return __builtin_s390_vclzh((__vector unsigned short)__a);
6409 static inline __ATTRS_o_ai __vector unsigned short
6410 vec_cntlz(__vector unsigned short __a) {
6411 return __builtin_s390_vclzh(__a);
6414 static inline __ATTRS_o_ai __vector unsigned int
6415 vec_cntlz(__vector signed int __a) {
6416 return __builtin_s390_vclzf((__vector unsigned int)__a);
6419 static inline __ATTRS_o_ai __vector unsigned int
6420 vec_cntlz(__vector unsigned int __a) {
6421 return __builtin_s390_vclzf(__a);
6424 static inline __ATTRS_o_ai __vector unsigned long long
6425 vec_cntlz(__vector signed long long __a) {
6426 return __builtin_s390_vclzg((__vector unsigned long long)__a);
6429 static inline __ATTRS_o_ai __vector unsigned long long
6430 vec_cntlz(__vector unsigned long long __a) {
6431 return __builtin_s390_vclzg(__a);
6434 /*-- vec_cnttz --------------------------------------------------------------*/
6436 static inline __ATTRS_o_ai __vector unsigned char
6437 vec_cnttz(__vector signed char __a) {
6438 return __builtin_s390_vctzb((__vector unsigned char)__a);
6441 static inline __ATTRS_o_ai __vector unsigned char
6442 vec_cnttz(__vector unsigned char __a) {
6443 return __builtin_s390_vctzb(__a);
6446 static inline __ATTRS_o_ai __vector unsigned short
6447 vec_cnttz(__vector signed short __a) {
6448 return __builtin_s390_vctzh((__vector unsigned short)__a);
6451 static inline __ATTRS_o_ai __vector unsigned short
6452 vec_cnttz(__vector unsigned short __a) {
6453 return __builtin_s390_vctzh(__a);
6456 static inline __ATTRS_o_ai __vector unsigned int
6457 vec_cnttz(__vector signed int __a) {
6458 return __builtin_s390_vctzf((__vector unsigned int)__a);
6461 static inline __ATTRS_o_ai __vector unsigned int
6462 vec_cnttz(__vector unsigned int __a) {
6463 return __builtin_s390_vctzf(__a);
6466 static inline __ATTRS_o_ai __vector unsigned long long
6467 vec_cnttz(__vector signed long long __a) {
6468 return __builtin_s390_vctzg((__vector unsigned long long)__a);
6471 static inline __ATTRS_o_ai __vector unsigned long long
6472 vec_cnttz(__vector unsigned long long __a) {
6473 return __builtin_s390_vctzg(__a);
6476 /*-- vec_popcnt -------------------------------------------------------------*/
6478 static inline __ATTRS_o_ai __vector unsigned char
6479 vec_popcnt(__vector signed char __a) {
6480 return __builtin_s390_vpopctb((__vector unsigned char)__a);
6483 static inline __ATTRS_o_ai __vector unsigned char
6484 vec_popcnt(__vector unsigned char __a) {
6485 return __builtin_s390_vpopctb(__a);
6488 static inline __ATTRS_o_ai __vector unsigned short
6489 vec_popcnt(__vector signed short __a) {
6490 return __builtin_s390_vpopcth((__vector unsigned short)__a);
6493 static inline __ATTRS_o_ai __vector unsigned short
6494 vec_popcnt(__vector unsigned short __a) {
6495 return __builtin_s390_vpopcth(__a);
6498 static inline __ATTRS_o_ai __vector unsigned int
6499 vec_popcnt(__vector signed int __a) {
6500 return __builtin_s390_vpopctf((__vector unsigned int)__a);
6503 static inline __ATTRS_o_ai __vector unsigned int
6504 vec_popcnt(__vector unsigned int __a) {
6505 return __builtin_s390_vpopctf(__a);
6508 static inline __ATTRS_o_ai __vector unsigned long long
6509 vec_popcnt(__vector signed long long __a) {
6510 return __builtin_s390_vpopctg((__vector unsigned long long)__a);
6513 static inline __ATTRS_o_ai __vector unsigned long long
6514 vec_popcnt(__vector unsigned long long __a) {
6515 return __builtin_s390_vpopctg(__a);
6518 /*-- vec_rl -----------------------------------------------------------------*/
6520 static inline __ATTRS_o_ai __vector signed char
6521 vec_rl(__vector signed char __a, __vector unsigned char __b) {
6522 return (__vector signed char)__builtin_s390_verllvb(
6523 (__vector unsigned char)__a, __b);
6526 static inline __ATTRS_o_ai __vector unsigned char
6527 vec_rl(__vector unsigned char __a, __vector unsigned char __b) {
6528 return __builtin_s390_verllvb(__a, __b);
6531 static inline __ATTRS_o_ai __vector signed short
6532 vec_rl(__vector signed short __a, __vector unsigned short __b) {
6533 return (__vector signed short)__builtin_s390_verllvh(
6534 (__vector unsigned short)__a, __b);
6537 static inline __ATTRS_o_ai __vector unsigned short
6538 vec_rl(__vector unsigned short __a, __vector unsigned short __b) {
6539 return __builtin_s390_verllvh(__a, __b);
6542 static inline __ATTRS_o_ai __vector signed int
6543 vec_rl(__vector signed int __a, __vector unsigned int __b) {
6544 return (__vector signed int)__builtin_s390_verllvf(
6545 (__vector unsigned int)__a, __b);
6548 static inline __ATTRS_o_ai __vector unsigned int
6549 vec_rl(__vector unsigned int __a, __vector unsigned int __b) {
6550 return __builtin_s390_verllvf(__a, __b);
6553 static inline __ATTRS_o_ai __vector signed long long
6554 vec_rl(__vector signed long long __a, __vector unsigned long long __b) {
6555 return (__vector signed long long)__builtin_s390_verllvg(
6556 (__vector unsigned long long)__a, __b);
6559 static inline __ATTRS_o_ai __vector unsigned long long
6560 vec_rl(__vector unsigned long long __a, __vector unsigned long long __b) {
6561 return __builtin_s390_verllvg(__a, __b);
6564 /*-- vec_rli ----------------------------------------------------------------*/
6566 static inline __ATTRS_o_ai __vector signed char
6567 vec_rli(__vector signed char __a, unsigned long __b) {
6568 return (__vector signed char)__builtin_s390_verllb(
6569 (__vector unsigned char)__a, (unsigned char)__b);
6572 static inline __ATTRS_o_ai __vector unsigned char
6573 vec_rli(__vector unsigned char __a, unsigned long __b) {
6574 return __builtin_s390_verllb(__a, (unsigned char)__b);
6577 static inline __ATTRS_o_ai __vector signed short
6578 vec_rli(__vector signed short __a, unsigned long __b) {
6579 return (__vector signed short)__builtin_s390_verllh(
6580 (__vector unsigned short)__a, (unsigned char)__b);
6583 static inline __ATTRS_o_ai __vector unsigned short
6584 vec_rli(__vector unsigned short __a, unsigned long __b) {
6585 return __builtin_s390_verllh(__a, (unsigned char)__b);
6588 static inline __ATTRS_o_ai __vector signed int
6589 vec_rli(__vector signed int __a, unsigned long __b) {
6590 return (__vector signed int)__builtin_s390_verllf(
6591 (__vector unsigned int)__a, (unsigned char)__b);
6594 static inline __ATTRS_o_ai __vector unsigned int
6595 vec_rli(__vector unsigned int __a, unsigned long __b) {
6596 return __builtin_s390_verllf(__a, (unsigned char)__b);
6599 static inline __ATTRS_o_ai __vector signed long long
6600 vec_rli(__vector signed long long __a, unsigned long __b) {
6601 return (__vector signed long long)__builtin_s390_verllg(
6602 (__vector unsigned long long)__a, (unsigned char)__b);
6605 static inline __ATTRS_o_ai __vector unsigned long long
6606 vec_rli(__vector unsigned long long __a, unsigned long __b) {
6607 return __builtin_s390_verllg(__a, (unsigned char)__b);
6610 /*-- vec_rl_mask ------------------------------------------------------------*/
6612 extern __ATTRS_o __vector signed char
6613 vec_rl_mask(__vector signed char __a, __vector unsigned char __b,
6614 unsigned char __c) __constant(__c);
6616 extern __ATTRS_o __vector unsigned char
6617 vec_rl_mask(__vector unsigned char __a, __vector unsigned char __b,
6618 unsigned char __c) __constant(__c);
6620 extern __ATTRS_o __vector signed short
6621 vec_rl_mask(__vector signed short __a, __vector unsigned short __b,
6622 unsigned char __c) __constant(__c);
6624 extern __ATTRS_o __vector unsigned short
6625 vec_rl_mask(__vector unsigned short __a, __vector unsigned short __b,
6626 unsigned char __c) __constant(__c);
6628 extern __ATTRS_o __vector signed int
6629 vec_rl_mask(__vector signed int __a, __vector unsigned int __b,
6630 unsigned char __c) __constant(__c);
6632 extern __ATTRS_o __vector unsigned int
6633 vec_rl_mask(__vector unsigned int __a, __vector unsigned int __b,
6634 unsigned char __c) __constant(__c);
6636 extern __ATTRS_o __vector signed long long
6637 vec_rl_mask(__vector signed long long __a, __vector unsigned long long __b,
6638 unsigned char __c) __constant(__c);
6640 extern __ATTRS_o __vector unsigned long long
6641 vec_rl_mask(__vector unsigned long long __a, __vector unsigned long long __b,
6642 unsigned char __c) __constant(__c);
6644 #define vec_rl_mask(X, Y, Z) ((__typeof__((vec_rl_mask)((X), (Y), (Z)))) \
6645 __extension__ ({ \
6646 __vector unsigned char __res; \
6647 __vector unsigned char __x = (__vector unsigned char)(X); \
6648 __vector unsigned char __y = (__vector unsigned char)(Y); \
6649 switch (sizeof ((X)[0])) { \
6650 case 1: __res = (__vector unsigned char) __builtin_s390_verimb( \
6651 (__vector unsigned char)__x, (__vector unsigned char)__x, \
6652 (__vector unsigned char)__y, (Z)); break; \
6653 case 2: __res = (__vector unsigned char) __builtin_s390_verimh( \
6654 (__vector unsigned short)__x, (__vector unsigned short)__x, \
6655 (__vector unsigned short)__y, (Z)); break; \
6656 case 4: __res = (__vector unsigned char) __builtin_s390_verimf( \
6657 (__vector unsigned int)__x, (__vector unsigned int)__x, \
6658 (__vector unsigned int)__y, (Z)); break; \
6659 default: __res = (__vector unsigned char) __builtin_s390_verimg( \
6660 (__vector unsigned long long)__x, (__vector unsigned long long)__x, \
6661 (__vector unsigned long long)__y, (Z)); break; \
6662 } __res; }))
6664 /*-- vec_sll ----------------------------------------------------------------*/
6666 static inline __ATTRS_o_ai __vector signed char
6667 vec_sll(__vector signed char __a, __vector unsigned char __b) {
6668 return (__vector signed char)__builtin_s390_vsl(
6669 (__vector unsigned char)__a, __b);
6672 // This prototype is deprecated.
6673 static inline __ATTRS_o_ai __vector signed char
6674 vec_sll(__vector signed char __a, __vector unsigned short __b) {
6675 return (__vector signed char)__builtin_s390_vsl(
6676 (__vector unsigned char)__a, (__vector unsigned char)__b);
6679 // This prototype is deprecated.
6680 static inline __ATTRS_o_ai __vector signed char
6681 vec_sll(__vector signed char __a, __vector unsigned int __b) {
6682 return (__vector signed char)__builtin_s390_vsl(
6683 (__vector unsigned char)__a, (__vector unsigned char)__b);
6686 // This prototype is deprecated.
6687 static inline __ATTRS_o_ai __vector __bool char
6688 vec_sll(__vector __bool char __a, __vector unsigned char __b) {
6689 return (__vector __bool char)__builtin_s390_vsl(
6690 (__vector unsigned char)__a, __b);
6693 // This prototype is deprecated.
6694 static inline __ATTRS_o_ai __vector __bool char
6695 vec_sll(__vector __bool char __a, __vector unsigned short __b) {
6696 return (__vector __bool char)__builtin_s390_vsl(
6697 (__vector unsigned char)__a, (__vector unsigned char)__b);
6700 // This prototype is deprecated.
6701 static inline __ATTRS_o_ai __vector __bool char
6702 vec_sll(__vector __bool char __a, __vector unsigned int __b) {
6703 return (__vector __bool char)__builtin_s390_vsl(
6704 (__vector unsigned char)__a, (__vector unsigned char)__b);
6707 static inline __ATTRS_o_ai __vector unsigned char
6708 vec_sll(__vector unsigned char __a, __vector unsigned char __b) {
6709 return __builtin_s390_vsl(__a, __b);
6712 // This prototype is deprecated.
6713 static inline __ATTRS_o_ai __vector unsigned char
6714 vec_sll(__vector unsigned char __a, __vector unsigned short __b) {
6715 return __builtin_s390_vsl(__a, (__vector unsigned char)__b);
6718 // This prototype is deprecated.
6719 static inline __ATTRS_o_ai __vector unsigned char
6720 vec_sll(__vector unsigned char __a, __vector unsigned int __b) {
6721 return __builtin_s390_vsl(__a, (__vector unsigned char)__b);
6724 static inline __ATTRS_o_ai __vector signed short
6725 vec_sll(__vector signed short __a, __vector unsigned char __b) {
6726 return (__vector signed short)__builtin_s390_vsl(
6727 (__vector unsigned char)__a, __b);
6730 // This prototype is deprecated.
6731 static inline __ATTRS_o_ai __vector signed short
6732 vec_sll(__vector signed short __a, __vector unsigned short __b) {
6733 return (__vector signed short)__builtin_s390_vsl(
6734 (__vector unsigned char)__a, (__vector unsigned char)__b);
6737 // This prototype is deprecated.
6738 static inline __ATTRS_o_ai __vector signed short
6739 vec_sll(__vector signed short __a, __vector unsigned int __b) {
6740 return (__vector signed short)__builtin_s390_vsl(
6741 (__vector unsigned char)__a, (__vector unsigned char)__b);
6744 // This prototype is deprecated.
6745 static inline __ATTRS_o_ai __vector __bool short
6746 vec_sll(__vector __bool short __a, __vector unsigned char __b) {
6747 return (__vector __bool short)__builtin_s390_vsl(
6748 (__vector unsigned char)__a, __b);
6751 // This prototype is deprecated.
6752 static inline __ATTRS_o_ai __vector __bool short
6753 vec_sll(__vector __bool short __a, __vector unsigned short __b) {
6754 return (__vector __bool short)__builtin_s390_vsl(
6755 (__vector unsigned char)__a, (__vector unsigned char)__b);
6758 // This prototype is deprecated.
6759 static inline __ATTRS_o_ai __vector __bool short
6760 vec_sll(__vector __bool short __a, __vector unsigned int __b) {
6761 return (__vector __bool short)__builtin_s390_vsl(
6762 (__vector unsigned char)__a, (__vector unsigned char)__b);
6765 static inline __ATTRS_o_ai __vector unsigned short
6766 vec_sll(__vector unsigned short __a, __vector unsigned char __b) {
6767 return (__vector unsigned short)__builtin_s390_vsl(
6768 (__vector unsigned char)__a, __b);
6771 // This prototype is deprecated.
6772 static inline __ATTRS_o_ai __vector unsigned short
6773 vec_sll(__vector unsigned short __a, __vector unsigned short __b) {
6774 return (__vector unsigned short)__builtin_s390_vsl(
6775 (__vector unsigned char)__a, (__vector unsigned char)__b);
6778 // This prototype is deprecated.
6779 static inline __ATTRS_o_ai __vector unsigned short
6780 vec_sll(__vector unsigned short __a, __vector unsigned int __b) {
6781 return (__vector unsigned short)__builtin_s390_vsl(
6782 (__vector unsigned char)__a, (__vector unsigned char)__b);
6785 static inline __ATTRS_o_ai __vector signed int
6786 vec_sll(__vector signed int __a, __vector unsigned char __b) {
6787 return (__vector signed int)__builtin_s390_vsl(
6788 (__vector unsigned char)__a, __b);
6791 // This prototype is deprecated.
6792 static inline __ATTRS_o_ai __vector signed int
6793 vec_sll(__vector signed int __a, __vector unsigned short __b) {
6794 return (__vector signed int)__builtin_s390_vsl(
6795 (__vector unsigned char)__a, (__vector unsigned char)__b);
6798 // This prototype is deprecated.
6799 static inline __ATTRS_o_ai __vector signed int
6800 vec_sll(__vector signed int __a, __vector unsigned int __b) {
6801 return (__vector signed int)__builtin_s390_vsl(
6802 (__vector unsigned char)__a, (__vector unsigned char)__b);
6805 // This prototype is deprecated.
6806 static inline __ATTRS_o_ai __vector __bool int
6807 vec_sll(__vector __bool int __a, __vector unsigned char __b) {
6808 return (__vector __bool int)__builtin_s390_vsl(
6809 (__vector unsigned char)__a, __b);
6812 // This prototype is deprecated.
6813 static inline __ATTRS_o_ai __vector __bool int
6814 vec_sll(__vector __bool int __a, __vector unsigned short __b) {
6815 return (__vector __bool int)__builtin_s390_vsl(
6816 (__vector unsigned char)__a, (__vector unsigned char)__b);
6819 // This prototype is deprecated.
6820 static inline __ATTRS_o_ai __vector __bool int
6821 vec_sll(__vector __bool int __a, __vector unsigned int __b) {
6822 return (__vector __bool int)__builtin_s390_vsl(
6823 (__vector unsigned char)__a, (__vector unsigned char)__b);
6826 static inline __ATTRS_o_ai __vector unsigned int
6827 vec_sll(__vector unsigned int __a, __vector unsigned char __b) {
6828 return (__vector unsigned int)__builtin_s390_vsl(
6829 (__vector unsigned char)__a, __b);
6832 // This prototype is deprecated.
6833 static inline __ATTRS_o_ai __vector unsigned int
6834 vec_sll(__vector unsigned int __a, __vector unsigned short __b) {
6835 return (__vector unsigned int)__builtin_s390_vsl(
6836 (__vector unsigned char)__a, (__vector unsigned char)__b);
6839 // This prototype is deprecated.
6840 static inline __ATTRS_o_ai __vector unsigned int
6841 vec_sll(__vector unsigned int __a, __vector unsigned int __b) {
6842 return (__vector unsigned int)__builtin_s390_vsl(
6843 (__vector unsigned char)__a, (__vector unsigned char)__b);
6846 static inline __ATTRS_o_ai __vector signed long long
6847 vec_sll(__vector signed long long __a, __vector unsigned char __b) {
6848 return (__vector signed long long)__builtin_s390_vsl(
6849 (__vector unsigned char)__a, __b);
6852 // This prototype is deprecated.
6853 static inline __ATTRS_o_ai __vector signed long long
6854 vec_sll(__vector signed long long __a, __vector unsigned short __b) {
6855 return (__vector signed long long)__builtin_s390_vsl(
6856 (__vector unsigned char)__a, (__vector unsigned char)__b);
6859 // This prototype is deprecated.
6860 static inline __ATTRS_o_ai __vector signed long long
6861 vec_sll(__vector signed long long __a, __vector unsigned int __b) {
6862 return (__vector signed long long)__builtin_s390_vsl(
6863 (__vector unsigned char)__a, (__vector unsigned char)__b);
6866 // This prototype is deprecated.
6867 static inline __ATTRS_o_ai __vector __bool long long
6868 vec_sll(__vector __bool long long __a, __vector unsigned char __b) {
6869 return (__vector __bool long long)__builtin_s390_vsl(
6870 (__vector unsigned char)__a, __b);
6873 // This prototype is deprecated.
6874 static inline __ATTRS_o_ai __vector __bool long long
6875 vec_sll(__vector __bool long long __a, __vector unsigned short __b) {
6876 return (__vector __bool long long)__builtin_s390_vsl(
6877 (__vector unsigned char)__a, (__vector unsigned char)__b);
6880 // This prototype is deprecated.
6881 static inline __ATTRS_o_ai __vector __bool long long
6882 vec_sll(__vector __bool long long __a, __vector unsigned int __b) {
6883 return (__vector __bool long long)__builtin_s390_vsl(
6884 (__vector unsigned char)__a, (__vector unsigned char)__b);
6887 static inline __ATTRS_o_ai __vector unsigned long long
6888 vec_sll(__vector unsigned long long __a, __vector unsigned char __b) {
6889 return (__vector unsigned long long)__builtin_s390_vsl(
6890 (__vector unsigned char)__a, __b);
6893 // This prototype is deprecated.
6894 static inline __ATTRS_o_ai __vector unsigned long long
6895 vec_sll(__vector unsigned long long __a, __vector unsigned short __b) {
6896 return (__vector unsigned long long)__builtin_s390_vsl(
6897 (__vector unsigned char)__a, (__vector unsigned char)__b);
6900 // This prototype is deprecated.
6901 static inline __ATTRS_o_ai __vector unsigned long long
6902 vec_sll(__vector unsigned long long __a, __vector unsigned int __b) {
6903 return (__vector unsigned long long)__builtin_s390_vsl(
6904 (__vector unsigned char)__a, (__vector unsigned char)__b);
6907 /*-- vec_slb ----------------------------------------------------------------*/
6909 static inline __ATTRS_o_ai __vector signed char
6910 vec_slb(__vector signed char __a, __vector signed char __b) {
6911 return (__vector signed char)__builtin_s390_vslb(
6912 (__vector unsigned char)__a, (__vector unsigned char)__b);
6915 static inline __ATTRS_o_ai __vector signed char
6916 vec_slb(__vector signed char __a, __vector unsigned char __b) {
6917 return (__vector signed char)__builtin_s390_vslb(
6918 (__vector unsigned char)__a, __b);
6921 static inline __ATTRS_o_ai __vector unsigned char
6922 vec_slb(__vector unsigned char __a, __vector signed char __b) {
6923 return __builtin_s390_vslb(__a, (__vector unsigned char)__b);
6926 static inline __ATTRS_o_ai __vector unsigned char
6927 vec_slb(__vector unsigned char __a, __vector unsigned char __b) {
6928 return __builtin_s390_vslb(__a, __b);
6931 static inline __ATTRS_o_ai __vector signed short
6932 vec_slb(__vector signed short __a, __vector signed short __b) {
6933 return (__vector signed short)__builtin_s390_vslb(
6934 (__vector unsigned char)__a, (__vector unsigned char)__b);
6937 static inline __ATTRS_o_ai __vector signed short
6938 vec_slb(__vector signed short __a, __vector unsigned short __b) {
6939 return (__vector signed short)__builtin_s390_vslb(
6940 (__vector unsigned char)__a, (__vector unsigned char)__b);
6943 static inline __ATTRS_o_ai __vector unsigned short
6944 vec_slb(__vector unsigned short __a, __vector signed short __b) {
6945 return (__vector unsigned short)__builtin_s390_vslb(
6946 (__vector unsigned char)__a, (__vector unsigned char)__b);
6949 static inline __ATTRS_o_ai __vector unsigned short
6950 vec_slb(__vector unsigned short __a, __vector unsigned short __b) {
6951 return (__vector unsigned short)__builtin_s390_vslb(
6952 (__vector unsigned char)__a, (__vector unsigned char)__b);
6955 static inline __ATTRS_o_ai __vector signed int
6956 vec_slb(__vector signed int __a, __vector signed int __b) {
6957 return (__vector signed int)__builtin_s390_vslb(
6958 (__vector unsigned char)__a, (__vector unsigned char)__b);
6961 static inline __ATTRS_o_ai __vector signed int
6962 vec_slb(__vector signed int __a, __vector unsigned int __b) {
6963 return (__vector signed int)__builtin_s390_vslb(
6964 (__vector unsigned char)__a, (__vector unsigned char)__b);
6967 static inline __ATTRS_o_ai __vector unsigned int
6968 vec_slb(__vector unsigned int __a, __vector signed int __b) {
6969 return (__vector unsigned int)__builtin_s390_vslb(
6970 (__vector unsigned char)__a, (__vector unsigned char)__b);
6973 static inline __ATTRS_o_ai __vector unsigned int
6974 vec_slb(__vector unsigned int __a, __vector unsigned int __b) {
6975 return (__vector unsigned int)__builtin_s390_vslb(
6976 (__vector unsigned char)__a, (__vector unsigned char)__b);
6979 static inline __ATTRS_o_ai __vector signed long long
6980 vec_slb(__vector signed long long __a, __vector signed long long __b) {
6981 return (__vector signed long long)__builtin_s390_vslb(
6982 (__vector unsigned char)__a, (__vector unsigned char)__b);
6985 static inline __ATTRS_o_ai __vector signed long long
6986 vec_slb(__vector signed long long __a, __vector unsigned long long __b) {
6987 return (__vector signed long long)__builtin_s390_vslb(
6988 (__vector unsigned char)__a, (__vector unsigned char)__b);
6991 static inline __ATTRS_o_ai __vector unsigned long long
6992 vec_slb(__vector unsigned long long __a, __vector signed long long __b) {
6993 return (__vector unsigned long long)__builtin_s390_vslb(
6994 (__vector unsigned char)__a, (__vector unsigned char)__b);
6997 static inline __ATTRS_o_ai __vector unsigned long long
6998 vec_slb(__vector unsigned long long __a, __vector unsigned long long __b) {
6999 return (__vector unsigned long long)__builtin_s390_vslb(
7000 (__vector unsigned char)__a, (__vector unsigned char)__b);
7003 #if __ARCH__ >= 12
7004 static inline __ATTRS_o_ai __vector float
7005 vec_slb(__vector float __a, __vector signed int __b) {
7006 return (__vector float)__builtin_s390_vslb(
7007 (__vector unsigned char)__a, (__vector unsigned char)__b);
7010 static inline __ATTRS_o_ai __vector float
7011 vec_slb(__vector float __a, __vector unsigned int __b) {
7012 return (__vector float)__builtin_s390_vslb(
7013 (__vector unsigned char)__a, (__vector unsigned char)__b);
7015 #endif
7017 static inline __ATTRS_o_ai __vector double
7018 vec_slb(__vector double __a, __vector signed long long __b) {
7019 return (__vector double)__builtin_s390_vslb(
7020 (__vector unsigned char)__a, (__vector unsigned char)__b);
7023 static inline __ATTRS_o_ai __vector double
7024 vec_slb(__vector double __a, __vector unsigned long long __b) {
7025 return (__vector double)__builtin_s390_vslb(
7026 (__vector unsigned char)__a, (__vector unsigned char)__b);
7029 /*-- vec_sld ----------------------------------------------------------------*/
7031 extern __ATTRS_o __vector signed char
7032 vec_sld(__vector signed char __a, __vector signed char __b, int __c)
7033 __constant_range(__c, 0, 15);
7035 extern __ATTRS_o __vector __bool char
7036 vec_sld(__vector __bool char __a, __vector __bool char __b, int __c)
7037 __constant_range(__c, 0, 15);
7039 extern __ATTRS_o __vector unsigned char
7040 vec_sld(__vector unsigned char __a, __vector unsigned char __b, int __c)
7041 __constant_range(__c, 0, 15);
7043 extern __ATTRS_o __vector signed short
7044 vec_sld(__vector signed short __a, __vector signed short __b, int __c)
7045 __constant_range(__c, 0, 15);
7047 extern __ATTRS_o __vector __bool short
7048 vec_sld(__vector __bool short __a, __vector __bool short __b, int __c)
7049 __constant_range(__c, 0, 15);
7051 extern __ATTRS_o __vector unsigned short
7052 vec_sld(__vector unsigned short __a, __vector unsigned short __b, int __c)
7053 __constant_range(__c, 0, 15);
7055 extern __ATTRS_o __vector signed int
7056 vec_sld(__vector signed int __a, __vector signed int __b, int __c)
7057 __constant_range(__c, 0, 15);
7059 extern __ATTRS_o __vector __bool int
7060 vec_sld(__vector __bool int __a, __vector __bool int __b, int __c)
7061 __constant_range(__c, 0, 15);
7063 extern __ATTRS_o __vector unsigned int
7064 vec_sld(__vector unsigned int __a, __vector unsigned int __b, int __c)
7065 __constant_range(__c, 0, 15);
7067 extern __ATTRS_o __vector signed long long
7068 vec_sld(__vector signed long long __a, __vector signed long long __b, int __c)
7069 __constant_range(__c, 0, 15);
7071 extern __ATTRS_o __vector __bool long long
7072 vec_sld(__vector __bool long long __a, __vector __bool long long __b, int __c)
7073 __constant_range(__c, 0, 15);
7075 extern __ATTRS_o __vector unsigned long long
7076 vec_sld(__vector unsigned long long __a, __vector unsigned long long __b,
7077 int __c)
7078 __constant_range(__c, 0, 15);
7080 #if __ARCH__ >= 12
7081 extern __ATTRS_o __vector float
7082 vec_sld(__vector float __a, __vector float __b, int __c)
7083 __constant_range(__c, 0, 15);
7084 #endif
7086 extern __ATTRS_o __vector double
7087 vec_sld(__vector double __a, __vector double __b, int __c)
7088 __constant_range(__c, 0, 15);
7090 #define vec_sld(X, Y, Z) ((__typeof__((vec_sld)((X), (Y), (Z)))) \
7091 __builtin_s390_vsldb((__vector unsigned char)(X), \
7092 (__vector unsigned char)(Y), (Z)))
7094 /*-- vec_sldw ---------------------------------------------------------------*/
7096 extern __ATTRS_o __vector signed char
7097 vec_sldw(__vector signed char __a, __vector signed char __b, int __c)
7098 __constant_range(__c, 0, 3);
7100 extern __ATTRS_o __vector unsigned char
7101 vec_sldw(__vector unsigned char __a, __vector unsigned char __b, int __c)
7102 __constant_range(__c, 0, 3);
7104 extern __ATTRS_o __vector signed short
7105 vec_sldw(__vector signed short __a, __vector signed short __b, int __c)
7106 __constant_range(__c, 0, 3);
7108 extern __ATTRS_o __vector unsigned short
7109 vec_sldw(__vector unsigned short __a, __vector unsigned short __b, int __c)
7110 __constant_range(__c, 0, 3);
7112 extern __ATTRS_o __vector signed int
7113 vec_sldw(__vector signed int __a, __vector signed int __b, int __c)
7114 __constant_range(__c, 0, 3);
7116 extern __ATTRS_o __vector unsigned int
7117 vec_sldw(__vector unsigned int __a, __vector unsigned int __b, int __c)
7118 __constant_range(__c, 0, 3);
7120 extern __ATTRS_o __vector signed long long
7121 vec_sldw(__vector signed long long __a, __vector signed long long __b, int __c)
7122 __constant_range(__c, 0, 3);
7124 extern __ATTRS_o __vector unsigned long long
7125 vec_sldw(__vector unsigned long long __a, __vector unsigned long long __b,
7126 int __c)
7127 __constant_range(__c, 0, 3);
7129 // This prototype is deprecated.
7130 extern __ATTRS_o __vector double
7131 vec_sldw(__vector double __a, __vector double __b, int __c)
7132 __constant_range(__c, 0, 3);
7134 #define vec_sldw(X, Y, Z) ((__typeof__((vec_sldw)((X), (Y), (Z)))) \
7135 __builtin_s390_vsldb((__vector unsigned char)(X), \
7136 (__vector unsigned char)(Y), (Z) * 4))
7138 /*-- vec_sldb ---------------------------------------------------------------*/
7140 #if __ARCH__ >= 13
7142 extern __ATTRS_o __vector signed char
7143 vec_sldb(__vector signed char __a, __vector signed char __b, int __c)
7144 __constant_range(__c, 0, 7);
7146 extern __ATTRS_o __vector unsigned char
7147 vec_sldb(__vector unsigned char __a, __vector unsigned char __b, int __c)
7148 __constant_range(__c, 0, 7);
7150 extern __ATTRS_o __vector signed short
7151 vec_sldb(__vector signed short __a, __vector signed short __b, int __c)
7152 __constant_range(__c, 0, 7);
7154 extern __ATTRS_o __vector unsigned short
7155 vec_sldb(__vector unsigned short __a, __vector unsigned short __b, int __c)
7156 __constant_range(__c, 0, 7);
7158 extern __ATTRS_o __vector signed int
7159 vec_sldb(__vector signed int __a, __vector signed int __b, int __c)
7160 __constant_range(__c, 0, 7);
7162 extern __ATTRS_o __vector unsigned int
7163 vec_sldb(__vector unsigned int __a, __vector unsigned int __b, int __c)
7164 __constant_range(__c, 0, 7);
7166 extern __ATTRS_o __vector signed long long
7167 vec_sldb(__vector signed long long __a, __vector signed long long __b, int __c)
7168 __constant_range(__c, 0, 7);
7170 extern __ATTRS_o __vector unsigned long long
7171 vec_sldb(__vector unsigned long long __a, __vector unsigned long long __b,
7172 int __c)
7173 __constant_range(__c, 0, 7);
7175 extern __ATTRS_o __vector float
7176 vec_sldb(__vector float __a, __vector float __b, int __c)
7177 __constant_range(__c, 0, 7);
7179 extern __ATTRS_o __vector double
7180 vec_sldb(__vector double __a, __vector double __b, int __c)
7181 __constant_range(__c, 0, 7);
7183 #define vec_sldb(X, Y, Z) ((__typeof__((vec_sldb)((X), (Y), (Z)))) \
7184 __builtin_s390_vsld((__vector unsigned char)(X), \
7185 (__vector unsigned char)(Y), (Z)))
7187 #endif
7189 /*-- vec_sral ---------------------------------------------------------------*/
7191 static inline __ATTRS_o_ai __vector signed char
7192 vec_sral(__vector signed char __a, __vector unsigned char __b) {
7193 return (__vector signed char)__builtin_s390_vsra(
7194 (__vector unsigned char)__a, __b);
7197 // This prototype is deprecated.
7198 static inline __ATTRS_o_ai __vector signed char
7199 vec_sral(__vector signed char __a, __vector unsigned short __b) {
7200 return (__vector signed char)__builtin_s390_vsra(
7201 (__vector unsigned char)__a, (__vector unsigned char)__b);
7204 // This prototype is deprecated.
7205 static inline __ATTRS_o_ai __vector signed char
7206 vec_sral(__vector signed char __a, __vector unsigned int __b) {
7207 return (__vector signed char)__builtin_s390_vsra(
7208 (__vector unsigned char)__a, (__vector unsigned char)__b);
7211 // This prototype is deprecated.
7212 static inline __ATTRS_o_ai __vector __bool char
7213 vec_sral(__vector __bool char __a, __vector unsigned char __b) {
7214 return (__vector __bool char)__builtin_s390_vsra(
7215 (__vector unsigned char)__a, __b);
7218 // This prototype is deprecated.
7219 static inline __ATTRS_o_ai __vector __bool char
7220 vec_sral(__vector __bool char __a, __vector unsigned short __b) {
7221 return (__vector __bool char)__builtin_s390_vsra(
7222 (__vector unsigned char)__a, (__vector unsigned char)__b);
7225 // This prototype is deprecated.
7226 static inline __ATTRS_o_ai __vector __bool char
7227 vec_sral(__vector __bool char __a, __vector unsigned int __b) {
7228 return (__vector __bool char)__builtin_s390_vsra(
7229 (__vector unsigned char)__a, (__vector unsigned char)__b);
7232 static inline __ATTRS_o_ai __vector unsigned char
7233 vec_sral(__vector unsigned char __a, __vector unsigned char __b) {
7234 return __builtin_s390_vsra(__a, __b);
7237 // This prototype is deprecated.
7238 static inline __ATTRS_o_ai __vector unsigned char
7239 vec_sral(__vector unsigned char __a, __vector unsigned short __b) {
7240 return __builtin_s390_vsra(__a, (__vector unsigned char)__b);
7243 // This prototype is deprecated.
7244 static inline __ATTRS_o_ai __vector unsigned char
7245 vec_sral(__vector unsigned char __a, __vector unsigned int __b) {
7246 return __builtin_s390_vsra(__a, (__vector unsigned char)__b);
7249 static inline __ATTRS_o_ai __vector signed short
7250 vec_sral(__vector signed short __a, __vector unsigned char __b) {
7251 return (__vector signed short)__builtin_s390_vsra(
7252 (__vector unsigned char)__a, __b);
7255 // This prototype is deprecated.
7256 static inline __ATTRS_o_ai __vector signed short
7257 vec_sral(__vector signed short __a, __vector unsigned short __b) {
7258 return (__vector signed short)__builtin_s390_vsra(
7259 (__vector unsigned char)__a, (__vector unsigned char)__b);
7262 // This prototype is deprecated.
7263 static inline __ATTRS_o_ai __vector signed short
7264 vec_sral(__vector signed short __a, __vector unsigned int __b) {
7265 return (__vector signed short)__builtin_s390_vsra(
7266 (__vector unsigned char)__a, (__vector unsigned char)__b);
7269 // This prototype is deprecated.
7270 static inline __ATTRS_o_ai __vector __bool short
7271 vec_sral(__vector __bool short __a, __vector unsigned char __b) {
7272 return (__vector __bool short)__builtin_s390_vsra(
7273 (__vector unsigned char)__a, __b);
7276 // This prototype is deprecated.
7277 static inline __ATTRS_o_ai __vector __bool short
7278 vec_sral(__vector __bool short __a, __vector unsigned short __b) {
7279 return (__vector __bool short)__builtin_s390_vsra(
7280 (__vector unsigned char)__a, (__vector unsigned char)__b);
7283 // This prototype is deprecated.
7284 static inline __ATTRS_o_ai __vector __bool short
7285 vec_sral(__vector __bool short __a, __vector unsigned int __b) {
7286 return (__vector __bool short)__builtin_s390_vsra(
7287 (__vector unsigned char)__a, (__vector unsigned char)__b);
7290 static inline __ATTRS_o_ai __vector unsigned short
7291 vec_sral(__vector unsigned short __a, __vector unsigned char __b) {
7292 return (__vector unsigned short)__builtin_s390_vsra(
7293 (__vector unsigned char)__a, __b);
7296 // This prototype is deprecated.
7297 static inline __ATTRS_o_ai __vector unsigned short
7298 vec_sral(__vector unsigned short __a, __vector unsigned short __b) {
7299 return (__vector unsigned short)__builtin_s390_vsra(
7300 (__vector unsigned char)__a, (__vector unsigned char)__b);
7303 // This prototype is deprecated.
7304 static inline __ATTRS_o_ai __vector unsigned short
7305 vec_sral(__vector unsigned short __a, __vector unsigned int __b) {
7306 return (__vector unsigned short)__builtin_s390_vsra(
7307 (__vector unsigned char)__a, (__vector unsigned char)__b);
7310 static inline __ATTRS_o_ai __vector signed int
7311 vec_sral(__vector signed int __a, __vector unsigned char __b) {
7312 return (__vector signed int)__builtin_s390_vsra(
7313 (__vector unsigned char)__a, __b);
7316 // This prototype is deprecated.
7317 static inline __ATTRS_o_ai __vector signed int
7318 vec_sral(__vector signed int __a, __vector unsigned short __b) {
7319 return (__vector signed int)__builtin_s390_vsra(
7320 (__vector unsigned char)__a, (__vector unsigned char)__b);
7323 // This prototype is deprecated.
7324 static inline __ATTRS_o_ai __vector signed int
7325 vec_sral(__vector signed int __a, __vector unsigned int __b) {
7326 return (__vector signed int)__builtin_s390_vsra(
7327 (__vector unsigned char)__a, (__vector unsigned char)__b);
7330 // This prototype is deprecated.
7331 static inline __ATTRS_o_ai __vector __bool int
7332 vec_sral(__vector __bool int __a, __vector unsigned char __b) {
7333 return (__vector __bool int)__builtin_s390_vsra(
7334 (__vector unsigned char)__a, __b);
7337 // This prototype is deprecated.
7338 static inline __ATTRS_o_ai __vector __bool int
7339 vec_sral(__vector __bool int __a, __vector unsigned short __b) {
7340 return (__vector __bool int)__builtin_s390_vsra(
7341 (__vector unsigned char)__a, (__vector unsigned char)__b);
7344 // This prototype is deprecated.
7345 static inline __ATTRS_o_ai __vector __bool int
7346 vec_sral(__vector __bool int __a, __vector unsigned int __b) {
7347 return (__vector __bool int)__builtin_s390_vsra(
7348 (__vector unsigned char)__a, (__vector unsigned char)__b);
7351 static inline __ATTRS_o_ai __vector unsigned int
7352 vec_sral(__vector unsigned int __a, __vector unsigned char __b) {
7353 return (__vector unsigned int)__builtin_s390_vsra(
7354 (__vector unsigned char)__a, __b);
7357 // This prototype is deprecated.
7358 static inline __ATTRS_o_ai __vector unsigned int
7359 vec_sral(__vector unsigned int __a, __vector unsigned short __b) {
7360 return (__vector unsigned int)__builtin_s390_vsra(
7361 (__vector unsigned char)__a, (__vector unsigned char)__b);
7364 // This prototype is deprecated.
7365 static inline __ATTRS_o_ai __vector unsigned int
7366 vec_sral(__vector unsigned int __a, __vector unsigned int __b) {
7367 return (__vector unsigned int)__builtin_s390_vsra(
7368 (__vector unsigned char)__a, (__vector unsigned char)__b);
7371 static inline __ATTRS_o_ai __vector signed long long
7372 vec_sral(__vector signed long long __a, __vector unsigned char __b) {
7373 return (__vector signed long long)__builtin_s390_vsra(
7374 (__vector unsigned char)__a, __b);
7377 // This prototype is deprecated.
7378 static inline __ATTRS_o_ai __vector signed long long
7379 vec_sral(__vector signed long long __a, __vector unsigned short __b) {
7380 return (__vector signed long long)__builtin_s390_vsra(
7381 (__vector unsigned char)__a, (__vector unsigned char)__b);
7384 // This prototype is deprecated.
7385 static inline __ATTRS_o_ai __vector signed long long
7386 vec_sral(__vector signed long long __a, __vector unsigned int __b) {
7387 return (__vector signed long long)__builtin_s390_vsra(
7388 (__vector unsigned char)__a, (__vector unsigned char)__b);
7391 // This prototype is deprecated.
7392 static inline __ATTRS_o_ai __vector __bool long long
7393 vec_sral(__vector __bool long long __a, __vector unsigned char __b) {
7394 return (__vector __bool long long)__builtin_s390_vsra(
7395 (__vector unsigned char)__a, __b);
7398 // This prototype is deprecated.
7399 static inline __ATTRS_o_ai __vector __bool long long
7400 vec_sral(__vector __bool long long __a, __vector unsigned short __b) {
7401 return (__vector __bool long long)__builtin_s390_vsra(
7402 (__vector unsigned char)__a, (__vector unsigned char)__b);
7405 // This prototype is deprecated.
7406 static inline __ATTRS_o_ai __vector __bool long long
7407 vec_sral(__vector __bool long long __a, __vector unsigned int __b) {
7408 return (__vector __bool long long)__builtin_s390_vsra(
7409 (__vector unsigned char)__a, (__vector unsigned char)__b);
7412 static inline __ATTRS_o_ai __vector unsigned long long
7413 vec_sral(__vector unsigned long long __a, __vector unsigned char __b) {
7414 return (__vector unsigned long long)__builtin_s390_vsra(
7415 (__vector unsigned char)__a, __b);
7418 // This prototype is deprecated.
7419 static inline __ATTRS_o_ai __vector unsigned long long
7420 vec_sral(__vector unsigned long long __a, __vector unsigned short __b) {
7421 return (__vector unsigned long long)__builtin_s390_vsra(
7422 (__vector unsigned char)__a, (__vector unsigned char)__b);
7425 // This prototype is deprecated.
7426 static inline __ATTRS_o_ai __vector unsigned long long
7427 vec_sral(__vector unsigned long long __a, __vector unsigned int __b) {
7428 return (__vector unsigned long long)__builtin_s390_vsra(
7429 (__vector unsigned char)__a, (__vector unsigned char)__b);
7432 /*-- vec_srab ---------------------------------------------------------------*/
7434 static inline __ATTRS_o_ai __vector signed char
7435 vec_srab(__vector signed char __a, __vector signed char __b) {
7436 return (__vector signed char)__builtin_s390_vsrab(
7437 (__vector unsigned char)__a, (__vector unsigned char)__b);
7440 static inline __ATTRS_o_ai __vector signed char
7441 vec_srab(__vector signed char __a, __vector unsigned char __b) {
7442 return (__vector signed char)__builtin_s390_vsrab(
7443 (__vector unsigned char)__a, __b);
7446 static inline __ATTRS_o_ai __vector unsigned char
7447 vec_srab(__vector unsigned char __a, __vector signed char __b) {
7448 return __builtin_s390_vsrab(__a, (__vector unsigned char)__b);
7451 static inline __ATTRS_o_ai __vector unsigned char
7452 vec_srab(__vector unsigned char __a, __vector unsigned char __b) {
7453 return __builtin_s390_vsrab(__a, __b);
7456 static inline __ATTRS_o_ai __vector signed short
7457 vec_srab(__vector signed short __a, __vector signed short __b) {
7458 return (__vector signed short)__builtin_s390_vsrab(
7459 (__vector unsigned char)__a, (__vector unsigned char)__b);
7462 static inline __ATTRS_o_ai __vector signed short
7463 vec_srab(__vector signed short __a, __vector unsigned short __b) {
7464 return (__vector signed short)__builtin_s390_vsrab(
7465 (__vector unsigned char)__a, (__vector unsigned char)__b);
7468 static inline __ATTRS_o_ai __vector unsigned short
7469 vec_srab(__vector unsigned short __a, __vector signed short __b) {
7470 return (__vector unsigned short)__builtin_s390_vsrab(
7471 (__vector unsigned char)__a, (__vector unsigned char)__b);
7474 static inline __ATTRS_o_ai __vector unsigned short
7475 vec_srab(__vector unsigned short __a, __vector unsigned short __b) {
7476 return (__vector unsigned short)__builtin_s390_vsrab(
7477 (__vector unsigned char)__a, (__vector unsigned char)__b);
7480 static inline __ATTRS_o_ai __vector signed int
7481 vec_srab(__vector signed int __a, __vector signed int __b) {
7482 return (__vector signed int)__builtin_s390_vsrab(
7483 (__vector unsigned char)__a, (__vector unsigned char)__b);
7486 static inline __ATTRS_o_ai __vector signed int
7487 vec_srab(__vector signed int __a, __vector unsigned int __b) {
7488 return (__vector signed int)__builtin_s390_vsrab(
7489 (__vector unsigned char)__a, (__vector unsigned char)__b);
7492 static inline __ATTRS_o_ai __vector unsigned int
7493 vec_srab(__vector unsigned int __a, __vector signed int __b) {
7494 return (__vector unsigned int)__builtin_s390_vsrab(
7495 (__vector unsigned char)__a, (__vector unsigned char)__b);
7498 static inline __ATTRS_o_ai __vector unsigned int
7499 vec_srab(__vector unsigned int __a, __vector unsigned int __b) {
7500 return (__vector unsigned int)__builtin_s390_vsrab(
7501 (__vector unsigned char)__a, (__vector unsigned char)__b);
7504 static inline __ATTRS_o_ai __vector signed long long
7505 vec_srab(__vector signed long long __a, __vector signed long long __b) {
7506 return (__vector signed long long)__builtin_s390_vsrab(
7507 (__vector unsigned char)__a, (__vector unsigned char)__b);
7510 static inline __ATTRS_o_ai __vector signed long long
7511 vec_srab(__vector signed long long __a, __vector unsigned long long __b) {
7512 return (__vector signed long long)__builtin_s390_vsrab(
7513 (__vector unsigned char)__a, (__vector unsigned char)__b);
7516 static inline __ATTRS_o_ai __vector unsigned long long
7517 vec_srab(__vector unsigned long long __a, __vector signed long long __b) {
7518 return (__vector unsigned long long)__builtin_s390_vsrab(
7519 (__vector unsigned char)__a, (__vector unsigned char)__b);
7522 static inline __ATTRS_o_ai __vector unsigned long long
7523 vec_srab(__vector unsigned long long __a, __vector unsigned long long __b) {
7524 return (__vector unsigned long long)__builtin_s390_vsrab(
7525 (__vector unsigned char)__a, (__vector unsigned char)__b);
7528 #if __ARCH__ >= 12
7529 static inline __ATTRS_o_ai __vector float
7530 vec_srab(__vector float __a, __vector signed int __b) {
7531 return (__vector float)__builtin_s390_vsrab(
7532 (__vector unsigned char)__a, (__vector unsigned char)__b);
7535 static inline __ATTRS_o_ai __vector float
7536 vec_srab(__vector float __a, __vector unsigned int __b) {
7537 return (__vector float)__builtin_s390_vsrab(
7538 (__vector unsigned char)__a, (__vector unsigned char)__b);
7540 #endif
7542 static inline __ATTRS_o_ai __vector double
7543 vec_srab(__vector double __a, __vector signed long long __b) {
7544 return (__vector double)__builtin_s390_vsrab(
7545 (__vector unsigned char)__a, (__vector unsigned char)__b);
7548 static inline __ATTRS_o_ai __vector double
7549 vec_srab(__vector double __a, __vector unsigned long long __b) {
7550 return (__vector double)__builtin_s390_vsrab(
7551 (__vector unsigned char)__a, (__vector unsigned char)__b);
7554 /*-- vec_srl ----------------------------------------------------------------*/
7556 static inline __ATTRS_o_ai __vector signed char
7557 vec_srl(__vector signed char __a, __vector unsigned char __b) {
7558 return (__vector signed char)__builtin_s390_vsrl(
7559 (__vector unsigned char)__a, __b);
7562 // This prototype is deprecated.
7563 static inline __ATTRS_o_ai __vector signed char
7564 vec_srl(__vector signed char __a, __vector unsigned short __b) {
7565 return (__vector signed char)__builtin_s390_vsrl(
7566 (__vector unsigned char)__a, (__vector unsigned char)__b);
7569 // This prototype is deprecated.
7570 static inline __ATTRS_o_ai __vector signed char
7571 vec_srl(__vector signed char __a, __vector unsigned int __b) {
7572 return (__vector signed char)__builtin_s390_vsrl(
7573 (__vector unsigned char)__a, (__vector unsigned char)__b);
7576 // This prototype is deprecated.
7577 static inline __ATTRS_o_ai __vector __bool char
7578 vec_srl(__vector __bool char __a, __vector unsigned char __b) {
7579 return (__vector __bool char)__builtin_s390_vsrl(
7580 (__vector unsigned char)__a, __b);
7583 // This prototype is deprecated.
7584 static inline __ATTRS_o_ai __vector __bool char
7585 vec_srl(__vector __bool char __a, __vector unsigned short __b) {
7586 return (__vector __bool char)__builtin_s390_vsrl(
7587 (__vector unsigned char)__a, (__vector unsigned char)__b);
7590 // This prototype is deprecated.
7591 static inline __ATTRS_o_ai __vector __bool char
7592 vec_srl(__vector __bool char __a, __vector unsigned int __b) {
7593 return (__vector __bool char)__builtin_s390_vsrl(
7594 (__vector unsigned char)__a, (__vector unsigned char)__b);
7597 static inline __ATTRS_o_ai __vector unsigned char
7598 vec_srl(__vector unsigned char __a, __vector unsigned char __b) {
7599 return __builtin_s390_vsrl(__a, __b);
7602 // This prototype is deprecated.
7603 static inline __ATTRS_o_ai __vector unsigned char
7604 vec_srl(__vector unsigned char __a, __vector unsigned short __b) {
7605 return __builtin_s390_vsrl(__a, (__vector unsigned char)__b);
7608 // This prototype is deprecated.
7609 static inline __ATTRS_o_ai __vector unsigned char
7610 vec_srl(__vector unsigned char __a, __vector unsigned int __b) {
7611 return __builtin_s390_vsrl(__a, (__vector unsigned char)__b);
7614 static inline __ATTRS_o_ai __vector signed short
7615 vec_srl(__vector signed short __a, __vector unsigned char __b) {
7616 return (__vector signed short)__builtin_s390_vsrl(
7617 (__vector unsigned char)__a, __b);
7620 // This prototype is deprecated.
7621 static inline __ATTRS_o_ai __vector signed short
7622 vec_srl(__vector signed short __a, __vector unsigned short __b) {
7623 return (__vector signed short)__builtin_s390_vsrl(
7624 (__vector unsigned char)__a, (__vector unsigned char)__b);
7627 // This prototype is deprecated.
7628 static inline __ATTRS_o_ai __vector signed short
7629 vec_srl(__vector signed short __a, __vector unsigned int __b) {
7630 return (__vector signed short)__builtin_s390_vsrl(
7631 (__vector unsigned char)__a, (__vector unsigned char)__b);
7634 // This prototype is deprecated.
7635 static inline __ATTRS_o_ai __vector __bool short
7636 vec_srl(__vector __bool short __a, __vector unsigned char __b) {
7637 return (__vector __bool short)__builtin_s390_vsrl(
7638 (__vector unsigned char)__a, __b);
7641 // This prototype is deprecated.
7642 static inline __ATTRS_o_ai __vector __bool short
7643 vec_srl(__vector __bool short __a, __vector unsigned short __b) {
7644 return (__vector __bool short)__builtin_s390_vsrl(
7645 (__vector unsigned char)__a, (__vector unsigned char)__b);
7648 // This prototype is deprecated.
7649 static inline __ATTRS_o_ai __vector __bool short
7650 vec_srl(__vector __bool short __a, __vector unsigned int __b) {
7651 return (__vector __bool short)__builtin_s390_vsrl(
7652 (__vector unsigned char)__a, (__vector unsigned char)__b);
7655 static inline __ATTRS_o_ai __vector unsigned short
7656 vec_srl(__vector unsigned short __a, __vector unsigned char __b) {
7657 return (__vector unsigned short)__builtin_s390_vsrl(
7658 (__vector unsigned char)__a, __b);
7661 // This prototype is deprecated.
7662 static inline __ATTRS_o_ai __vector unsigned short
7663 vec_srl(__vector unsigned short __a, __vector unsigned short __b) {
7664 return (__vector unsigned short)__builtin_s390_vsrl(
7665 (__vector unsigned char)__a, (__vector unsigned char)__b);
7668 // This prototype is deprecated.
7669 static inline __ATTRS_o_ai __vector unsigned short
7670 vec_srl(__vector unsigned short __a, __vector unsigned int __b) {
7671 return (__vector unsigned short)__builtin_s390_vsrl(
7672 (__vector unsigned char)__a, (__vector unsigned char)__b);
7675 static inline __ATTRS_o_ai __vector signed int
7676 vec_srl(__vector signed int __a, __vector unsigned char __b) {
7677 return (__vector signed int)__builtin_s390_vsrl(
7678 (__vector unsigned char)__a, __b);
7681 // This prototype is deprecated.
7682 static inline __ATTRS_o_ai __vector signed int
7683 vec_srl(__vector signed int __a, __vector unsigned short __b) {
7684 return (__vector signed int)__builtin_s390_vsrl(
7685 (__vector unsigned char)__a, (__vector unsigned char)__b);
7688 // This prototype is deprecated.
7689 static inline __ATTRS_o_ai __vector signed int
7690 vec_srl(__vector signed int __a, __vector unsigned int __b) {
7691 return (__vector signed int)__builtin_s390_vsrl(
7692 (__vector unsigned char)__a, (__vector unsigned char)__b);
7695 // This prototype is deprecated.
7696 static inline __ATTRS_o_ai __vector __bool int
7697 vec_srl(__vector __bool int __a, __vector unsigned char __b) {
7698 return (__vector __bool int)__builtin_s390_vsrl(
7699 (__vector unsigned char)__a, __b);
7702 // This prototype is deprecated.
7703 static inline __ATTRS_o_ai __vector __bool int
7704 vec_srl(__vector __bool int __a, __vector unsigned short __b) {
7705 return (__vector __bool int)__builtin_s390_vsrl(
7706 (__vector unsigned char)__a, (__vector unsigned char)__b);
7709 // This prototype is deprecated.
7710 static inline __ATTRS_o_ai __vector __bool int
7711 vec_srl(__vector __bool int __a, __vector unsigned int __b) {
7712 return (__vector __bool int)__builtin_s390_vsrl(
7713 (__vector unsigned char)__a, (__vector unsigned char)__b);
7716 static inline __ATTRS_o_ai __vector unsigned int
7717 vec_srl(__vector unsigned int __a, __vector unsigned char __b) {
7718 return (__vector unsigned int)__builtin_s390_vsrl(
7719 (__vector unsigned char)__a, __b);
7722 // This prototype is deprecated.
7723 static inline __ATTRS_o_ai __vector unsigned int
7724 vec_srl(__vector unsigned int __a, __vector unsigned short __b) {
7725 return (__vector unsigned int)__builtin_s390_vsrl(
7726 (__vector unsigned char)__a, (__vector unsigned char)__b);
7729 // This prototype is deprecated.
7730 static inline __ATTRS_o_ai __vector unsigned int
7731 vec_srl(__vector unsigned int __a, __vector unsigned int __b) {
7732 return (__vector unsigned int)__builtin_s390_vsrl(
7733 (__vector unsigned char)__a, (__vector unsigned char)__b);
7736 static inline __ATTRS_o_ai __vector signed long long
7737 vec_srl(__vector signed long long __a, __vector unsigned char __b) {
7738 return (__vector signed long long)__builtin_s390_vsrl(
7739 (__vector unsigned char)__a, __b);
7742 // This prototype is deprecated.
7743 static inline __ATTRS_o_ai __vector signed long long
7744 vec_srl(__vector signed long long __a, __vector unsigned short __b) {
7745 return (__vector signed long long)__builtin_s390_vsrl(
7746 (__vector unsigned char)__a, (__vector unsigned char)__b);
7749 // This prototype is deprecated.
7750 static inline __ATTRS_o_ai __vector signed long long
7751 vec_srl(__vector signed long long __a, __vector unsigned int __b) {
7752 return (__vector signed long long)__builtin_s390_vsrl(
7753 (__vector unsigned char)__a, (__vector unsigned char)__b);
7756 // This prototype is deprecated.
7757 static inline __ATTRS_o_ai __vector __bool long long
7758 vec_srl(__vector __bool long long __a, __vector unsigned char __b) {
7759 return (__vector __bool long long)__builtin_s390_vsrl(
7760 (__vector unsigned char)__a, __b);
7763 // This prototype is deprecated.
7764 static inline __ATTRS_o_ai __vector __bool long long
7765 vec_srl(__vector __bool long long __a, __vector unsigned short __b) {
7766 return (__vector __bool long long)__builtin_s390_vsrl(
7767 (__vector unsigned char)__a, (__vector unsigned char)__b);
7770 // This prototype is deprecated.
7771 static inline __ATTRS_o_ai __vector __bool long long
7772 vec_srl(__vector __bool long long __a, __vector unsigned int __b) {
7773 return (__vector __bool long long)__builtin_s390_vsrl(
7774 (__vector unsigned char)__a, (__vector unsigned char)__b);
7777 static inline __ATTRS_o_ai __vector unsigned long long
7778 vec_srl(__vector unsigned long long __a, __vector unsigned char __b) {
7779 return (__vector unsigned long long)__builtin_s390_vsrl(
7780 (__vector unsigned char)__a, __b);
7783 // This prototype is deprecated.
7784 static inline __ATTRS_o_ai __vector unsigned long long
7785 vec_srl(__vector unsigned long long __a, __vector unsigned short __b) {
7786 return (__vector unsigned long long)__builtin_s390_vsrl(
7787 (__vector unsigned char)__a, (__vector unsigned char)__b);
7790 // This prototype is deprecated.
7791 static inline __ATTRS_o_ai __vector unsigned long long
7792 vec_srl(__vector unsigned long long __a, __vector unsigned int __b) {
7793 return (__vector unsigned long long)__builtin_s390_vsrl(
7794 (__vector unsigned char)__a, (__vector unsigned char)__b);
7797 /*-- vec_srb ----------------------------------------------------------------*/
7799 static inline __ATTRS_o_ai __vector signed char
7800 vec_srb(__vector signed char __a, __vector signed char __b) {
7801 return (__vector signed char)__builtin_s390_vsrlb(
7802 (__vector unsigned char)__a, (__vector unsigned char)__b);
7805 static inline __ATTRS_o_ai __vector signed char
7806 vec_srb(__vector signed char __a, __vector unsigned char __b) {
7807 return (__vector signed char)__builtin_s390_vsrlb(
7808 (__vector unsigned char)__a, __b);
7811 static inline __ATTRS_o_ai __vector unsigned char
7812 vec_srb(__vector unsigned char __a, __vector signed char __b) {
7813 return __builtin_s390_vsrlb(__a, (__vector unsigned char)__b);
7816 static inline __ATTRS_o_ai __vector unsigned char
7817 vec_srb(__vector unsigned char __a, __vector unsigned char __b) {
7818 return __builtin_s390_vsrlb(__a, __b);
7821 static inline __ATTRS_o_ai __vector signed short
7822 vec_srb(__vector signed short __a, __vector signed short __b) {
7823 return (__vector signed short)__builtin_s390_vsrlb(
7824 (__vector unsigned char)__a, (__vector unsigned char)__b);
7827 static inline __ATTRS_o_ai __vector signed short
7828 vec_srb(__vector signed short __a, __vector unsigned short __b) {
7829 return (__vector signed short)__builtin_s390_vsrlb(
7830 (__vector unsigned char)__a, (__vector unsigned char)__b);
7833 static inline __ATTRS_o_ai __vector unsigned short
7834 vec_srb(__vector unsigned short __a, __vector signed short __b) {
7835 return (__vector unsigned short)__builtin_s390_vsrlb(
7836 (__vector unsigned char)__a, (__vector unsigned char)__b);
7839 static inline __ATTRS_o_ai __vector unsigned short
7840 vec_srb(__vector unsigned short __a, __vector unsigned short __b) {
7841 return (__vector unsigned short)__builtin_s390_vsrlb(
7842 (__vector unsigned char)__a, (__vector unsigned char)__b);
7845 static inline __ATTRS_o_ai __vector signed int
7846 vec_srb(__vector signed int __a, __vector signed int __b) {
7847 return (__vector signed int)__builtin_s390_vsrlb(
7848 (__vector unsigned char)__a, (__vector unsigned char)__b);
7851 static inline __ATTRS_o_ai __vector signed int
7852 vec_srb(__vector signed int __a, __vector unsigned int __b) {
7853 return (__vector signed int)__builtin_s390_vsrlb(
7854 (__vector unsigned char)__a, (__vector unsigned char)__b);
7857 static inline __ATTRS_o_ai __vector unsigned int
7858 vec_srb(__vector unsigned int __a, __vector signed int __b) {
7859 return (__vector unsigned int)__builtin_s390_vsrlb(
7860 (__vector unsigned char)__a, (__vector unsigned char)__b);
7863 static inline __ATTRS_o_ai __vector unsigned int
7864 vec_srb(__vector unsigned int __a, __vector unsigned int __b) {
7865 return (__vector unsigned int)__builtin_s390_vsrlb(
7866 (__vector unsigned char)__a, (__vector unsigned char)__b);
7869 static inline __ATTRS_o_ai __vector signed long long
7870 vec_srb(__vector signed long long __a, __vector signed long long __b) {
7871 return (__vector signed long long)__builtin_s390_vsrlb(
7872 (__vector unsigned char)__a, (__vector unsigned char)__b);
7875 static inline __ATTRS_o_ai __vector signed long long
7876 vec_srb(__vector signed long long __a, __vector unsigned long long __b) {
7877 return (__vector signed long long)__builtin_s390_vsrlb(
7878 (__vector unsigned char)__a, (__vector unsigned char)__b);
7881 static inline __ATTRS_o_ai __vector unsigned long long
7882 vec_srb(__vector unsigned long long __a, __vector signed long long __b) {
7883 return (__vector unsigned long long)__builtin_s390_vsrlb(
7884 (__vector unsigned char)__a, (__vector unsigned char)__b);
7887 static inline __ATTRS_o_ai __vector unsigned long long
7888 vec_srb(__vector unsigned long long __a, __vector unsigned long long __b) {
7889 return (__vector unsigned long long)__builtin_s390_vsrlb(
7890 (__vector unsigned char)__a, (__vector unsigned char)__b);
7893 #if __ARCH__ >= 12
7894 static inline __ATTRS_o_ai __vector float
7895 vec_srb(__vector float __a, __vector signed int __b) {
7896 return (__vector float)__builtin_s390_vsrlb(
7897 (__vector unsigned char)__a, (__vector unsigned char)__b);
7900 static inline __ATTRS_o_ai __vector float
7901 vec_srb(__vector float __a, __vector unsigned int __b) {
7902 return (__vector float)__builtin_s390_vsrlb(
7903 (__vector unsigned char)__a, (__vector unsigned char)__b);
7905 #endif
7907 static inline __ATTRS_o_ai __vector double
7908 vec_srb(__vector double __a, __vector signed long long __b) {
7909 return (__vector double)__builtin_s390_vsrlb(
7910 (__vector unsigned char)__a, (__vector unsigned char)__b);
7913 static inline __ATTRS_o_ai __vector double
7914 vec_srb(__vector double __a, __vector unsigned long long __b) {
7915 return (__vector double)__builtin_s390_vsrlb(
7916 (__vector unsigned char)__a, (__vector unsigned char)__b);
7919 /*-- vec_srdb ---------------------------------------------------------------*/
7921 #if __ARCH__ >= 13
7923 extern __ATTRS_o __vector signed char
7924 vec_srdb(__vector signed char __a, __vector signed char __b, int __c)
7925 __constant_range(__c, 0, 7);
7927 extern __ATTRS_o __vector unsigned char
7928 vec_srdb(__vector unsigned char __a, __vector unsigned char __b, int __c)
7929 __constant_range(__c, 0, 7);
7931 extern __ATTRS_o __vector signed short
7932 vec_srdb(__vector signed short __a, __vector signed short __b, int __c)
7933 __constant_range(__c, 0, 7);
7935 extern __ATTRS_o __vector unsigned short
7936 vec_srdb(__vector unsigned short __a, __vector unsigned short __b, int __c)
7937 __constant_range(__c, 0, 7);
7939 extern __ATTRS_o __vector signed int
7940 vec_srdb(__vector signed int __a, __vector signed int __b, int __c)
7941 __constant_range(__c, 0, 7);
7943 extern __ATTRS_o __vector unsigned int
7944 vec_srdb(__vector unsigned int __a, __vector unsigned int __b, int __c)
7945 __constant_range(__c, 0, 7);
7947 extern __ATTRS_o __vector signed long long
7948 vec_srdb(__vector signed long long __a, __vector signed long long __b, int __c)
7949 __constant_range(__c, 0, 7);
7951 extern __ATTRS_o __vector unsigned long long
7952 vec_srdb(__vector unsigned long long __a, __vector unsigned long long __b,
7953 int __c)
7954 __constant_range(__c, 0, 7);
7956 extern __ATTRS_o __vector float
7957 vec_srdb(__vector float __a, __vector float __b, int __c)
7958 __constant_range(__c, 0, 7);
7960 extern __ATTRS_o __vector double
7961 vec_srdb(__vector double __a, __vector double __b, int __c)
7962 __constant_range(__c, 0, 7);
7964 #define vec_srdb(X, Y, Z) ((__typeof__((vec_srdb)((X), (Y), (Z)))) \
7965 __builtin_s390_vsrd((__vector unsigned char)(X), \
7966 (__vector unsigned char)(Y), (Z)))
7968 #endif
7970 /*-- vec_abs ----------------------------------------------------------------*/
7972 static inline __ATTRS_o_ai __vector signed char
7973 vec_abs(__vector signed char __a) {
7974 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed char)0));
7977 static inline __ATTRS_o_ai __vector signed short
7978 vec_abs(__vector signed short __a) {
7979 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed short)0));
7982 static inline __ATTRS_o_ai __vector signed int
7983 vec_abs(__vector signed int __a) {
7984 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed int)0));
7987 static inline __ATTRS_o_ai __vector signed long long
7988 vec_abs(__vector signed long long __a) {
7989 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed long long)0));
7992 #if __ARCH__ >= 12
7993 static inline __ATTRS_o_ai __vector float
7994 vec_abs(__vector float __a) {
7995 return __builtin_s390_vflpsb(__a);
7997 #endif
7999 static inline __ATTRS_o_ai __vector double
8000 vec_abs(__vector double __a) {
8001 return __builtin_s390_vflpdb(__a);
8004 /*-- vec_nabs ---------------------------------------------------------------*/
8006 #if __ARCH__ >= 12
8007 static inline __ATTRS_o_ai __vector float
8008 vec_nabs(__vector float __a) {
8009 return __builtin_s390_vflnsb(__a);
8011 #endif
8013 static inline __ATTRS_o_ai __vector double
8014 vec_nabs(__vector double __a) {
8015 return __builtin_s390_vflndb(__a);
8018 /*-- vec_max ----------------------------------------------------------------*/
8020 static inline __ATTRS_o_ai __vector signed char
8021 vec_max(__vector signed char __a, __vector signed char __b) {
8022 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8025 // This prototype is deprecated.
8026 static inline __ATTRS_o_ai __vector signed char
8027 vec_max(__vector signed char __a, __vector __bool char __b) {
8028 __vector signed char __bc = (__vector signed char)__b;
8029 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8032 // This prototype is deprecated.
8033 static inline __ATTRS_o_ai __vector signed char
8034 vec_max(__vector __bool char __a, __vector signed char __b) {
8035 __vector signed char __ac = (__vector signed char)__a;
8036 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8039 static inline __ATTRS_o_ai __vector unsigned char
8040 vec_max(__vector unsigned char __a, __vector unsigned char __b) {
8041 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8044 // This prototype is deprecated.
8045 static inline __ATTRS_o_ai __vector unsigned char
8046 vec_max(__vector unsigned char __a, __vector __bool char __b) {
8047 __vector unsigned char __bc = (__vector unsigned char)__b;
8048 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8051 // This prototype is deprecated.
8052 static inline __ATTRS_o_ai __vector unsigned char
8053 vec_max(__vector __bool char __a, __vector unsigned char __b) {
8054 __vector unsigned char __ac = (__vector unsigned char)__a;
8055 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8058 static inline __ATTRS_o_ai __vector signed short
8059 vec_max(__vector signed short __a, __vector signed short __b) {
8060 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8063 // This prototype is deprecated.
8064 static inline __ATTRS_o_ai __vector signed short
8065 vec_max(__vector signed short __a, __vector __bool short __b) {
8066 __vector signed short __bc = (__vector signed short)__b;
8067 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8070 // This prototype is deprecated.
8071 static inline __ATTRS_o_ai __vector signed short
8072 vec_max(__vector __bool short __a, __vector signed short __b) {
8073 __vector signed short __ac = (__vector signed short)__a;
8074 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8077 static inline __ATTRS_o_ai __vector unsigned short
8078 vec_max(__vector unsigned short __a, __vector unsigned short __b) {
8079 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8082 // This prototype is deprecated.
8083 static inline __ATTRS_o_ai __vector unsigned short
8084 vec_max(__vector unsigned short __a, __vector __bool short __b) {
8085 __vector unsigned short __bc = (__vector unsigned short)__b;
8086 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8089 // This prototype is deprecated.
8090 static inline __ATTRS_o_ai __vector unsigned short
8091 vec_max(__vector __bool short __a, __vector unsigned short __b) {
8092 __vector unsigned short __ac = (__vector unsigned short)__a;
8093 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8096 static inline __ATTRS_o_ai __vector signed int
8097 vec_max(__vector signed int __a, __vector signed int __b) {
8098 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8101 // This prototype is deprecated.
8102 static inline __ATTRS_o_ai __vector signed int
8103 vec_max(__vector signed int __a, __vector __bool int __b) {
8104 __vector signed int __bc = (__vector signed int)__b;
8105 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8108 // This prototype is deprecated.
8109 static inline __ATTRS_o_ai __vector signed int
8110 vec_max(__vector __bool int __a, __vector signed int __b) {
8111 __vector signed int __ac = (__vector signed int)__a;
8112 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8115 static inline __ATTRS_o_ai __vector unsigned int
8116 vec_max(__vector unsigned int __a, __vector unsigned int __b) {
8117 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8120 // This prototype is deprecated.
8121 static inline __ATTRS_o_ai __vector unsigned int
8122 vec_max(__vector unsigned int __a, __vector __bool int __b) {
8123 __vector unsigned int __bc = (__vector unsigned int)__b;
8124 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8127 // This prototype is deprecated.
8128 static inline __ATTRS_o_ai __vector unsigned int
8129 vec_max(__vector __bool int __a, __vector unsigned int __b) {
8130 __vector unsigned int __ac = (__vector unsigned int)__a;
8131 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8134 static inline __ATTRS_o_ai __vector signed long long
8135 vec_max(__vector signed long long __a, __vector signed long long __b) {
8136 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8139 // This prototype is deprecated.
8140 static inline __ATTRS_o_ai __vector signed long long
8141 vec_max(__vector signed long long __a, __vector __bool long long __b) {
8142 __vector signed long long __bc = (__vector signed long long)__b;
8143 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8146 // This prototype is deprecated.
8147 static inline __ATTRS_o_ai __vector signed long long
8148 vec_max(__vector __bool long long __a, __vector signed long long __b) {
8149 __vector signed long long __ac = (__vector signed long long)__a;
8150 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8153 static inline __ATTRS_o_ai __vector unsigned long long
8154 vec_max(__vector unsigned long long __a, __vector unsigned long long __b) {
8155 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8158 // This prototype is deprecated.
8159 static inline __ATTRS_o_ai __vector unsigned long long
8160 vec_max(__vector unsigned long long __a, __vector __bool long long __b) {
8161 __vector unsigned long long __bc = (__vector unsigned long long)__b;
8162 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8165 // This prototype is deprecated.
8166 static inline __ATTRS_o_ai __vector unsigned long long
8167 vec_max(__vector __bool long long __a, __vector unsigned long long __b) {
8168 __vector unsigned long long __ac = (__vector unsigned long long)__a;
8169 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8172 #if __ARCH__ >= 12
8173 static inline __ATTRS_o_ai __vector float
8174 vec_max(__vector float __a, __vector float __b) {
8175 return __builtin_s390_vfmaxsb(__a, __b, 0);
8177 #endif
8179 static inline __ATTRS_o_ai __vector double
8180 vec_max(__vector double __a, __vector double __b) {
8181 #if __ARCH__ >= 12
8182 return __builtin_s390_vfmaxdb(__a, __b, 0);
8183 #else
8184 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8185 #endif
8188 /*-- vec_min ----------------------------------------------------------------*/
8190 static inline __ATTRS_o_ai __vector signed char
8191 vec_min(__vector signed char __a, __vector signed char __b) {
8192 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8195 // This prototype is deprecated.
8196 static inline __ATTRS_o_ai __vector signed char
8197 vec_min(__vector signed char __a, __vector __bool char __b) {
8198 __vector signed char __bc = (__vector signed char)__b;
8199 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8202 // This prototype is deprecated.
8203 static inline __ATTRS_o_ai __vector signed char
8204 vec_min(__vector __bool char __a, __vector signed char __b) {
8205 __vector signed char __ac = (__vector signed char)__a;
8206 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8209 static inline __ATTRS_o_ai __vector unsigned char
8210 vec_min(__vector unsigned char __a, __vector unsigned char __b) {
8211 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8214 // This prototype is deprecated.
8215 static inline __ATTRS_o_ai __vector unsigned char
8216 vec_min(__vector unsigned char __a, __vector __bool char __b) {
8217 __vector unsigned char __bc = (__vector unsigned char)__b;
8218 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8221 // This prototype is deprecated.
8222 static inline __ATTRS_o_ai __vector unsigned char
8223 vec_min(__vector __bool char __a, __vector unsigned char __b) {
8224 __vector unsigned char __ac = (__vector unsigned char)__a;
8225 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8228 static inline __ATTRS_o_ai __vector signed short
8229 vec_min(__vector signed short __a, __vector signed short __b) {
8230 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8233 // This prototype is deprecated.
8234 static inline __ATTRS_o_ai __vector signed short
8235 vec_min(__vector signed short __a, __vector __bool short __b) {
8236 __vector signed short __bc = (__vector signed short)__b;
8237 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8240 // This prototype is deprecated.
8241 static inline __ATTRS_o_ai __vector signed short
8242 vec_min(__vector __bool short __a, __vector signed short __b) {
8243 __vector signed short __ac = (__vector signed short)__a;
8244 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8247 static inline __ATTRS_o_ai __vector unsigned short
8248 vec_min(__vector unsigned short __a, __vector unsigned short __b) {
8249 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8252 // This prototype is deprecated.
8253 static inline __ATTRS_o_ai __vector unsigned short
8254 vec_min(__vector unsigned short __a, __vector __bool short __b) {
8255 __vector unsigned short __bc = (__vector unsigned short)__b;
8256 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8259 // This prototype is deprecated.
8260 static inline __ATTRS_o_ai __vector unsigned short
8261 vec_min(__vector __bool short __a, __vector unsigned short __b) {
8262 __vector unsigned short __ac = (__vector unsigned short)__a;
8263 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8266 static inline __ATTRS_o_ai __vector signed int
8267 vec_min(__vector signed int __a, __vector signed int __b) {
8268 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8271 // This prototype is deprecated.
8272 static inline __ATTRS_o_ai __vector signed int
8273 vec_min(__vector signed int __a, __vector __bool int __b) {
8274 __vector signed int __bc = (__vector signed int)__b;
8275 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8278 // This prototype is deprecated.
8279 static inline __ATTRS_o_ai __vector signed int
8280 vec_min(__vector __bool int __a, __vector signed int __b) {
8281 __vector signed int __ac = (__vector signed int)__a;
8282 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8285 static inline __ATTRS_o_ai __vector unsigned int
8286 vec_min(__vector unsigned int __a, __vector unsigned int __b) {
8287 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8290 // This prototype is deprecated.
8291 static inline __ATTRS_o_ai __vector unsigned int
8292 vec_min(__vector unsigned int __a, __vector __bool int __b) {
8293 __vector unsigned int __bc = (__vector unsigned int)__b;
8294 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8297 // This prototype is deprecated.
8298 static inline __ATTRS_o_ai __vector unsigned int
8299 vec_min(__vector __bool int __a, __vector unsigned int __b) {
8300 __vector unsigned int __ac = (__vector unsigned int)__a;
8301 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8304 static inline __ATTRS_o_ai __vector signed long long
8305 vec_min(__vector signed long long __a, __vector signed long long __b) {
8306 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8309 // This prototype is deprecated.
8310 static inline __ATTRS_o_ai __vector signed long long
8311 vec_min(__vector signed long long __a, __vector __bool long long __b) {
8312 __vector signed long long __bc = (__vector signed long long)__b;
8313 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8316 // This prototype is deprecated.
8317 static inline __ATTRS_o_ai __vector signed long long
8318 vec_min(__vector __bool long long __a, __vector signed long long __b) {
8319 __vector signed long long __ac = (__vector signed long long)__a;
8320 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8323 static inline __ATTRS_o_ai __vector unsigned long long
8324 vec_min(__vector unsigned long long __a, __vector unsigned long long __b) {
8325 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8328 // This prototype is deprecated.
8329 static inline __ATTRS_o_ai __vector unsigned long long
8330 vec_min(__vector unsigned long long __a, __vector __bool long long __b) {
8331 __vector unsigned long long __bc = (__vector unsigned long long)__b;
8332 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8335 // This prototype is deprecated.
8336 static inline __ATTRS_o_ai __vector unsigned long long
8337 vec_min(__vector __bool long long __a, __vector unsigned long long __b) {
8338 __vector unsigned long long __ac = (__vector unsigned long long)__a;
8339 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8342 #if __ARCH__ >= 12
8343 static inline __ATTRS_o_ai __vector float
8344 vec_min(__vector float __a, __vector float __b) {
8345 return __builtin_s390_vfminsb(__a, __b, 0);
8347 #endif
8349 static inline __ATTRS_o_ai __vector double
8350 vec_min(__vector double __a, __vector double __b) {
8351 #if __ARCH__ >= 12
8352 return __builtin_s390_vfmindb(__a, __b, 0);
8353 #else
8354 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8355 #endif
8358 /*-- vec_add_u128 -----------------------------------------------------------*/
8360 static inline __ATTRS_ai __vector unsigned char
8361 vec_add_u128(__vector unsigned char __a, __vector unsigned char __b) {
8362 return (__vector unsigned char)((__int128)__a + (__int128)__b);
8365 /*-- vec_addc ---------------------------------------------------------------*/
8367 static inline __ATTRS_o_ai __vector unsigned char
8368 vec_addc(__vector unsigned char __a, __vector unsigned char __b) {
8369 return __builtin_s390_vaccb(__a, __b);
8372 static inline __ATTRS_o_ai __vector unsigned short
8373 vec_addc(__vector unsigned short __a, __vector unsigned short __b) {
8374 return __builtin_s390_vacch(__a, __b);
8377 static inline __ATTRS_o_ai __vector unsigned int
8378 vec_addc(__vector unsigned int __a, __vector unsigned int __b) {
8379 return __builtin_s390_vaccf(__a, __b);
8382 static inline __ATTRS_o_ai __vector unsigned long long
8383 vec_addc(__vector unsigned long long __a, __vector unsigned long long __b) {
8384 return __builtin_s390_vaccg(__a, __b);
8387 /*-- vec_addc_u128 ----------------------------------------------------------*/
8389 static inline __ATTRS_ai __vector unsigned char
8390 vec_addc_u128(__vector unsigned char __a, __vector unsigned char __b) {
8391 return (__vector unsigned char)
8392 __builtin_s390_vaccq((unsigned __int128)__a, (unsigned __int128)__b);
8395 /*-- vec_adde_u128 ----------------------------------------------------------*/
8397 static inline __ATTRS_ai __vector unsigned char
8398 vec_adde_u128(__vector unsigned char __a, __vector unsigned char __b,
8399 __vector unsigned char __c) {
8400 return (__vector unsigned char)
8401 __builtin_s390_vacq((unsigned __int128)__a, (unsigned __int128)__b,
8402 (unsigned __int128)__c);
8405 /*-- vec_addec_u128 ---------------------------------------------------------*/
8407 static inline __ATTRS_ai __vector unsigned char
8408 vec_addec_u128(__vector unsigned char __a, __vector unsigned char __b,
8409 __vector unsigned char __c) {
8410 return (__vector unsigned char)
8411 __builtin_s390_vacccq((unsigned __int128)__a, (unsigned __int128)__b,
8412 (unsigned __int128)__c);
8415 /*-- vec_avg ----------------------------------------------------------------*/
8417 static inline __ATTRS_o_ai __vector signed char
8418 vec_avg(__vector signed char __a, __vector signed char __b) {
8419 return __builtin_s390_vavgb(__a, __b);
8422 static inline __ATTRS_o_ai __vector signed short
8423 vec_avg(__vector signed short __a, __vector signed short __b) {
8424 return __builtin_s390_vavgh(__a, __b);
8427 static inline __ATTRS_o_ai __vector signed int
8428 vec_avg(__vector signed int __a, __vector signed int __b) {
8429 return __builtin_s390_vavgf(__a, __b);
8432 static inline __ATTRS_o_ai __vector signed long long
8433 vec_avg(__vector signed long long __a, __vector signed long long __b) {
8434 return __builtin_s390_vavgg(__a, __b);
8437 static inline __ATTRS_o_ai __vector unsigned char
8438 vec_avg(__vector unsigned char __a, __vector unsigned char __b) {
8439 return __builtin_s390_vavglb(__a, __b);
8442 static inline __ATTRS_o_ai __vector unsigned short
8443 vec_avg(__vector unsigned short __a, __vector unsigned short __b) {
8444 return __builtin_s390_vavglh(__a, __b);
8447 static inline __ATTRS_o_ai __vector unsigned int
8448 vec_avg(__vector unsigned int __a, __vector unsigned int __b) {
8449 return __builtin_s390_vavglf(__a, __b);
8452 static inline __ATTRS_o_ai __vector unsigned long long
8453 vec_avg(__vector unsigned long long __a, __vector unsigned long long __b) {
8454 return __builtin_s390_vavglg(__a, __b);
8457 /*-- vec_checksum -----------------------------------------------------------*/
8459 static inline __ATTRS_ai __vector unsigned int
8460 vec_checksum(__vector unsigned int __a, __vector unsigned int __b) {
8461 return __builtin_s390_vcksm(__a, __b);
8464 /*-- vec_gfmsum -------------------------------------------------------------*/
8466 static inline __ATTRS_o_ai __vector unsigned short
8467 vec_gfmsum(__vector unsigned char __a, __vector unsigned char __b) {
8468 return __builtin_s390_vgfmb(__a, __b);
8471 static inline __ATTRS_o_ai __vector unsigned int
8472 vec_gfmsum(__vector unsigned short __a, __vector unsigned short __b) {
8473 return __builtin_s390_vgfmh(__a, __b);
8476 static inline __ATTRS_o_ai __vector unsigned long long
8477 vec_gfmsum(__vector unsigned int __a, __vector unsigned int __b) {
8478 return __builtin_s390_vgfmf(__a, __b);
8481 /*-- vec_gfmsum_128 ---------------------------------------------------------*/
8483 static inline __ATTRS_o_ai __vector unsigned char
8484 vec_gfmsum_128(__vector unsigned long long __a,
8485 __vector unsigned long long __b) {
8486 return (__vector unsigned char)__builtin_s390_vgfmg(__a, __b);
8489 /*-- vec_gfmsum_accum -------------------------------------------------------*/
8491 static inline __ATTRS_o_ai __vector unsigned short
8492 vec_gfmsum_accum(__vector unsigned char __a, __vector unsigned char __b,
8493 __vector unsigned short __c) {
8494 return __builtin_s390_vgfmab(__a, __b, __c);
8497 static inline __ATTRS_o_ai __vector unsigned int
8498 vec_gfmsum_accum(__vector unsigned short __a, __vector unsigned short __b,
8499 __vector unsigned int __c) {
8500 return __builtin_s390_vgfmah(__a, __b, __c);
8503 static inline __ATTRS_o_ai __vector unsigned long long
8504 vec_gfmsum_accum(__vector unsigned int __a, __vector unsigned int __b,
8505 __vector unsigned long long __c) {
8506 return __builtin_s390_vgfmaf(__a, __b, __c);
8509 /*-- vec_gfmsum_accum_128 ---------------------------------------------------*/
8511 static inline __ATTRS_o_ai __vector unsigned char
8512 vec_gfmsum_accum_128(__vector unsigned long long __a,
8513 __vector unsigned long long __b,
8514 __vector unsigned char __c) {
8515 return (__vector unsigned char)
8516 __builtin_s390_vgfmag(__a, __b, (unsigned __int128)__c);
8519 /*-- vec_mladd --------------------------------------------------------------*/
8521 static inline __ATTRS_o_ai __vector signed char
8522 vec_mladd(__vector signed char __a, __vector signed char __b,
8523 __vector signed char __c) {
8524 return __a * __b + __c;
8527 static inline __ATTRS_o_ai __vector signed char
8528 vec_mladd(__vector unsigned char __a, __vector signed char __b,
8529 __vector signed char __c) {
8530 return (__vector signed char)__a * __b + __c;
8533 static inline __ATTRS_o_ai __vector signed char
8534 vec_mladd(__vector signed char __a, __vector unsigned char __b,
8535 __vector unsigned char __c) {
8536 return __a * (__vector signed char)__b + (__vector signed char)__c;
8539 static inline __ATTRS_o_ai __vector unsigned char
8540 vec_mladd(__vector unsigned char __a, __vector unsigned char __b,
8541 __vector unsigned char __c) {
8542 return __a * __b + __c;
8545 static inline __ATTRS_o_ai __vector signed short
8546 vec_mladd(__vector signed short __a, __vector signed short __b,
8547 __vector signed short __c) {
8548 return __a * __b + __c;
8551 static inline __ATTRS_o_ai __vector signed short
8552 vec_mladd(__vector unsigned short __a, __vector signed short __b,
8553 __vector signed short __c) {
8554 return (__vector signed short)__a * __b + __c;
8557 static inline __ATTRS_o_ai __vector signed short
8558 vec_mladd(__vector signed short __a, __vector unsigned short __b,
8559 __vector unsigned short __c) {
8560 return __a * (__vector signed short)__b + (__vector signed short)__c;
8563 static inline __ATTRS_o_ai __vector unsigned short
8564 vec_mladd(__vector unsigned short __a, __vector unsigned short __b,
8565 __vector unsigned short __c) {
8566 return __a * __b + __c;
8569 static inline __ATTRS_o_ai __vector signed int
8570 vec_mladd(__vector signed int __a, __vector signed int __b,
8571 __vector signed int __c) {
8572 return __a * __b + __c;
8575 static inline __ATTRS_o_ai __vector signed int
8576 vec_mladd(__vector unsigned int __a, __vector signed int __b,
8577 __vector signed int __c) {
8578 return (__vector signed int)__a * __b + __c;
8581 static inline __ATTRS_o_ai __vector signed int
8582 vec_mladd(__vector signed int __a, __vector unsigned int __b,
8583 __vector unsigned int __c) {
8584 return __a * (__vector signed int)__b + (__vector signed int)__c;
8587 static inline __ATTRS_o_ai __vector unsigned int
8588 vec_mladd(__vector unsigned int __a, __vector unsigned int __b,
8589 __vector unsigned int __c) {
8590 return __a * __b + __c;
8593 /*-- vec_mhadd --------------------------------------------------------------*/
8595 static inline __ATTRS_o_ai __vector signed char
8596 vec_mhadd(__vector signed char __a, __vector signed char __b,
8597 __vector signed char __c) {
8598 return __builtin_s390_vmahb(__a, __b, __c);
8601 static inline __ATTRS_o_ai __vector unsigned char
8602 vec_mhadd(__vector unsigned char __a, __vector unsigned char __b,
8603 __vector unsigned char __c) {
8604 return __builtin_s390_vmalhb(__a, __b, __c);
8607 static inline __ATTRS_o_ai __vector signed short
8608 vec_mhadd(__vector signed short __a, __vector signed short __b,
8609 __vector signed short __c) {
8610 return __builtin_s390_vmahh(__a, __b, __c);
8613 static inline __ATTRS_o_ai __vector unsigned short
8614 vec_mhadd(__vector unsigned short __a, __vector unsigned short __b,
8615 __vector unsigned short __c) {
8616 return __builtin_s390_vmalhh(__a, __b, __c);
8619 static inline __ATTRS_o_ai __vector signed int
8620 vec_mhadd(__vector signed int __a, __vector signed int __b,
8621 __vector signed int __c) {
8622 return __builtin_s390_vmahf(__a, __b, __c);
8625 static inline __ATTRS_o_ai __vector unsigned int
8626 vec_mhadd(__vector unsigned int __a, __vector unsigned int __b,
8627 __vector unsigned int __c) {
8628 return __builtin_s390_vmalhf(__a, __b, __c);
8631 /*-- vec_meadd --------------------------------------------------------------*/
8633 static inline __ATTRS_o_ai __vector signed short
8634 vec_meadd(__vector signed char __a, __vector signed char __b,
8635 __vector signed short __c) {
8636 return __builtin_s390_vmaeb(__a, __b, __c);
8639 static inline __ATTRS_o_ai __vector unsigned short
8640 vec_meadd(__vector unsigned char __a, __vector unsigned char __b,
8641 __vector unsigned short __c) {
8642 return __builtin_s390_vmaleb(__a, __b, __c);
8645 static inline __ATTRS_o_ai __vector signed int
8646 vec_meadd(__vector signed short __a, __vector signed short __b,
8647 __vector signed int __c) {
8648 return __builtin_s390_vmaeh(__a, __b, __c);
8651 static inline __ATTRS_o_ai __vector unsigned int
8652 vec_meadd(__vector unsigned short __a, __vector unsigned short __b,
8653 __vector unsigned int __c) {
8654 return __builtin_s390_vmaleh(__a, __b, __c);
8657 static inline __ATTRS_o_ai __vector signed long long
8658 vec_meadd(__vector signed int __a, __vector signed int __b,
8659 __vector signed long long __c) {
8660 return __builtin_s390_vmaef(__a, __b, __c);
8663 static inline __ATTRS_o_ai __vector unsigned long long
8664 vec_meadd(__vector unsigned int __a, __vector unsigned int __b,
8665 __vector unsigned long long __c) {
8666 return __builtin_s390_vmalef(__a, __b, __c);
8669 /*-- vec_moadd --------------------------------------------------------------*/
8671 static inline __ATTRS_o_ai __vector signed short
8672 vec_moadd(__vector signed char __a, __vector signed char __b,
8673 __vector signed short __c) {
8674 return __builtin_s390_vmaob(__a, __b, __c);
8677 static inline __ATTRS_o_ai __vector unsigned short
8678 vec_moadd(__vector unsigned char __a, __vector unsigned char __b,
8679 __vector unsigned short __c) {
8680 return __builtin_s390_vmalob(__a, __b, __c);
8683 static inline __ATTRS_o_ai __vector signed int
8684 vec_moadd(__vector signed short __a, __vector signed short __b,
8685 __vector signed int __c) {
8686 return __builtin_s390_vmaoh(__a, __b, __c);
8689 static inline __ATTRS_o_ai __vector unsigned int
8690 vec_moadd(__vector unsigned short __a, __vector unsigned short __b,
8691 __vector unsigned int __c) {
8692 return __builtin_s390_vmaloh(__a, __b, __c);
8695 static inline __ATTRS_o_ai __vector signed long long
8696 vec_moadd(__vector signed int __a, __vector signed int __b,
8697 __vector signed long long __c) {
8698 return __builtin_s390_vmaof(__a, __b, __c);
8701 static inline __ATTRS_o_ai __vector unsigned long long
8702 vec_moadd(__vector unsigned int __a, __vector unsigned int __b,
8703 __vector unsigned long long __c) {
8704 return __builtin_s390_vmalof(__a, __b, __c);
8707 /*-- vec_mulh ---------------------------------------------------------------*/
8709 static inline __ATTRS_o_ai __vector signed char
8710 vec_mulh(__vector signed char __a, __vector signed char __b) {
8711 return __builtin_s390_vmhb(__a, __b);
8714 static inline __ATTRS_o_ai __vector unsigned char
8715 vec_mulh(__vector unsigned char __a, __vector unsigned char __b) {
8716 return __builtin_s390_vmlhb(__a, __b);
8719 static inline __ATTRS_o_ai __vector signed short
8720 vec_mulh(__vector signed short __a, __vector signed short __b) {
8721 return __builtin_s390_vmhh(__a, __b);
8724 static inline __ATTRS_o_ai __vector unsigned short
8725 vec_mulh(__vector unsigned short __a, __vector unsigned short __b) {
8726 return __builtin_s390_vmlhh(__a, __b);
8729 static inline __ATTRS_o_ai __vector signed int
8730 vec_mulh(__vector signed int __a, __vector signed int __b) {
8731 return __builtin_s390_vmhf(__a, __b);
8734 static inline __ATTRS_o_ai __vector unsigned int
8735 vec_mulh(__vector unsigned int __a, __vector unsigned int __b) {
8736 return __builtin_s390_vmlhf(__a, __b);
8739 /*-- vec_mule ---------------------------------------------------------------*/
8741 static inline __ATTRS_o_ai __vector signed short
8742 vec_mule(__vector signed char __a, __vector signed char __b) {
8743 return __builtin_s390_vmeb(__a, __b);
8746 static inline __ATTRS_o_ai __vector unsigned short
8747 vec_mule(__vector unsigned char __a, __vector unsigned char __b) {
8748 return __builtin_s390_vmleb(__a, __b);
8751 static inline __ATTRS_o_ai __vector signed int
8752 vec_mule(__vector signed short __a, __vector signed short __b) {
8753 return __builtin_s390_vmeh(__a, __b);
8756 static inline __ATTRS_o_ai __vector unsigned int
8757 vec_mule(__vector unsigned short __a, __vector unsigned short __b) {
8758 return __builtin_s390_vmleh(__a, __b);
8761 static inline __ATTRS_o_ai __vector signed long long
8762 vec_mule(__vector signed int __a, __vector signed int __b) {
8763 return __builtin_s390_vmef(__a, __b);
8766 static inline __ATTRS_o_ai __vector unsigned long long
8767 vec_mule(__vector unsigned int __a, __vector unsigned int __b) {
8768 return __builtin_s390_vmlef(__a, __b);
8771 /*-- vec_mulo ---------------------------------------------------------------*/
8773 static inline __ATTRS_o_ai __vector signed short
8774 vec_mulo(__vector signed char __a, __vector signed char __b) {
8775 return __builtin_s390_vmob(__a, __b);
8778 static inline __ATTRS_o_ai __vector unsigned short
8779 vec_mulo(__vector unsigned char __a, __vector unsigned char __b) {
8780 return __builtin_s390_vmlob(__a, __b);
8783 static inline __ATTRS_o_ai __vector signed int
8784 vec_mulo(__vector signed short __a, __vector signed short __b) {
8785 return __builtin_s390_vmoh(__a, __b);
8788 static inline __ATTRS_o_ai __vector unsigned int
8789 vec_mulo(__vector unsigned short __a, __vector unsigned short __b) {
8790 return __builtin_s390_vmloh(__a, __b);
8793 static inline __ATTRS_o_ai __vector signed long long
8794 vec_mulo(__vector signed int __a, __vector signed int __b) {
8795 return __builtin_s390_vmof(__a, __b);
8798 static inline __ATTRS_o_ai __vector unsigned long long
8799 vec_mulo(__vector unsigned int __a, __vector unsigned int __b) {
8800 return __builtin_s390_vmlof(__a, __b);
8803 /*-- vec_msum_u128 ----------------------------------------------------------*/
8805 #if __ARCH__ >= 12
8806 extern __ATTRS_o __vector unsigned char
8807 vec_msum_u128(__vector unsigned long long __a, __vector unsigned long long __b,
8808 __vector unsigned char __c, int __d)
8809 __constant_range(__d, 0, 15);
8811 #define vec_msum_u128(X, Y, Z, W) \
8812 ((__typeof__((vec_msum_u128)((X), (Y), (Z), (W)))) \
8813 __builtin_s390_vmslg((X), (Y), (unsigned __int128)(Z), (W)))
8814 #endif
8816 /*-- vec_sub_u128 -----------------------------------------------------------*/
8818 static inline __ATTRS_ai __vector unsigned char
8819 vec_sub_u128(__vector unsigned char __a, __vector unsigned char __b) {
8820 return (__vector unsigned char)((__int128)__a - (__int128)__b);
8823 /*-- vec_subc ---------------------------------------------------------------*/
8825 static inline __ATTRS_o_ai __vector unsigned char
8826 vec_subc(__vector unsigned char __a, __vector unsigned char __b) {
8827 return __builtin_s390_vscbib(__a, __b);
8830 static inline __ATTRS_o_ai __vector unsigned short
8831 vec_subc(__vector unsigned short __a, __vector unsigned short __b) {
8832 return __builtin_s390_vscbih(__a, __b);
8835 static inline __ATTRS_o_ai __vector unsigned int
8836 vec_subc(__vector unsigned int __a, __vector unsigned int __b) {
8837 return __builtin_s390_vscbif(__a, __b);
8840 static inline __ATTRS_o_ai __vector unsigned long long
8841 vec_subc(__vector unsigned long long __a, __vector unsigned long long __b) {
8842 return __builtin_s390_vscbig(__a, __b);
8845 /*-- vec_subc_u128 ----------------------------------------------------------*/
8847 static inline __ATTRS_ai __vector unsigned char
8848 vec_subc_u128(__vector unsigned char __a, __vector unsigned char __b) {
8849 return (__vector unsigned char)
8850 __builtin_s390_vscbiq((unsigned __int128)__a, (unsigned __int128)__b);
8853 /*-- vec_sube_u128 ----------------------------------------------------------*/
8855 static inline __ATTRS_ai __vector unsigned char
8856 vec_sube_u128(__vector unsigned char __a, __vector unsigned char __b,
8857 __vector unsigned char __c) {
8858 return (__vector unsigned char)
8859 __builtin_s390_vsbiq((unsigned __int128)__a, (unsigned __int128)__b,
8860 (unsigned __int128)__c);
8863 /*-- vec_subec_u128 ---------------------------------------------------------*/
8865 static inline __ATTRS_ai __vector unsigned char
8866 vec_subec_u128(__vector unsigned char __a, __vector unsigned char __b,
8867 __vector unsigned char __c) {
8868 return (__vector unsigned char)
8869 __builtin_s390_vsbcbiq((unsigned __int128)__a, (unsigned __int128)__b,
8870 (unsigned __int128)__c);
8873 /*-- vec_sum2 ---------------------------------------------------------------*/
8875 static inline __ATTRS_o_ai __vector unsigned long long
8876 vec_sum2(__vector unsigned short __a, __vector unsigned short __b) {
8877 return __builtin_s390_vsumgh(__a, __b);
8880 static inline __ATTRS_o_ai __vector unsigned long long
8881 vec_sum2(__vector unsigned int __a, __vector unsigned int __b) {
8882 return __builtin_s390_vsumgf(__a, __b);
8885 /*-- vec_sum_u128 -----------------------------------------------------------*/
8887 static inline __ATTRS_o_ai __vector unsigned char
8888 vec_sum_u128(__vector unsigned int __a, __vector unsigned int __b) {
8889 return (__vector unsigned char)__builtin_s390_vsumqf(__a, __b);
8892 static inline __ATTRS_o_ai __vector unsigned char
8893 vec_sum_u128(__vector unsigned long long __a, __vector unsigned long long __b) {
8894 return (__vector unsigned char)__builtin_s390_vsumqg(__a, __b);
8897 /*-- vec_sum4 ---------------------------------------------------------------*/
8899 static inline __ATTRS_o_ai __vector unsigned int
8900 vec_sum4(__vector unsigned char __a, __vector unsigned char __b) {
8901 return __builtin_s390_vsumb(__a, __b);
8904 static inline __ATTRS_o_ai __vector unsigned int
8905 vec_sum4(__vector unsigned short __a, __vector unsigned short __b) {
8906 return __builtin_s390_vsumh(__a, __b);
8909 /*-- vec_test_mask ----------------------------------------------------------*/
8911 static inline __ATTRS_o_ai int
8912 vec_test_mask(__vector signed char __a, __vector unsigned char __b) {
8913 return __builtin_s390_vtm((__vector unsigned char)__a,
8914 (__vector unsigned char)__b);
8917 static inline __ATTRS_o_ai int
8918 vec_test_mask(__vector unsigned char __a, __vector unsigned char __b) {
8919 return __builtin_s390_vtm(__a, __b);
8922 static inline __ATTRS_o_ai int
8923 vec_test_mask(__vector signed short __a, __vector unsigned short __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 unsigned short __a, __vector unsigned short __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 signed int __a, __vector unsigned int __b) {
8936 return __builtin_s390_vtm((__vector unsigned char)__a,
8937 (__vector unsigned char)__b);
8940 static inline __ATTRS_o_ai int
8941 vec_test_mask(__vector unsigned int __a, __vector unsigned int __b) {
8942 return __builtin_s390_vtm((__vector unsigned char)__a,
8943 (__vector unsigned char)__b);
8946 static inline __ATTRS_o_ai int
8947 vec_test_mask(__vector signed long long __a, __vector unsigned long long __b) {
8948 return __builtin_s390_vtm((__vector unsigned char)__a,
8949 (__vector unsigned char)__b);
8952 static inline __ATTRS_o_ai int
8953 vec_test_mask(__vector unsigned long long __a,
8954 __vector unsigned long long __b) {
8955 return __builtin_s390_vtm((__vector unsigned char)__a,
8956 (__vector unsigned char)__b);
8959 #if __ARCH__ >= 12
8960 static inline __ATTRS_o_ai int
8961 vec_test_mask(__vector float __a, __vector unsigned int __b) {
8962 return __builtin_s390_vtm((__vector unsigned char)__a,
8963 (__vector unsigned char)__b);
8965 #endif
8967 static inline __ATTRS_o_ai int
8968 vec_test_mask(__vector double __a, __vector unsigned long long __b) {
8969 return __builtin_s390_vtm((__vector unsigned char)__a,
8970 (__vector unsigned char)__b);
8973 /*-- vec_madd ---------------------------------------------------------------*/
8975 #if __ARCH__ >= 12
8976 static inline __ATTRS_o_ai __vector float
8977 vec_madd(__vector float __a, __vector float __b, __vector float __c) {
8978 return __builtin_s390_vfmasb(__a, __b, __c);
8980 #endif
8982 static inline __ATTRS_o_ai __vector double
8983 vec_madd(__vector double __a, __vector double __b, __vector double __c) {
8984 return __builtin_s390_vfmadb(__a, __b, __c);
8987 /*-- vec_msub ---------------------------------------------------------------*/
8989 #if __ARCH__ >= 12
8990 static inline __ATTRS_o_ai __vector float
8991 vec_msub(__vector float __a, __vector float __b, __vector float __c) {
8992 return __builtin_s390_vfmssb(__a, __b, __c);
8994 #endif
8996 static inline __ATTRS_o_ai __vector double
8997 vec_msub(__vector double __a, __vector double __b, __vector double __c) {
8998 return __builtin_s390_vfmsdb(__a, __b, __c);
9001 /*-- vec_nmadd ---------------------------------------------------------------*/
9003 #if __ARCH__ >= 12
9004 static inline __ATTRS_o_ai __vector float
9005 vec_nmadd(__vector float __a, __vector float __b, __vector float __c) {
9006 return __builtin_s390_vfnmasb(__a, __b, __c);
9009 static inline __ATTRS_o_ai __vector double
9010 vec_nmadd(__vector double __a, __vector double __b, __vector double __c) {
9011 return __builtin_s390_vfnmadb(__a, __b, __c);
9013 #endif
9015 /*-- vec_nmsub ---------------------------------------------------------------*/
9017 #if __ARCH__ >= 12
9018 static inline __ATTRS_o_ai __vector float
9019 vec_nmsub(__vector float __a, __vector float __b, __vector float __c) {
9020 return __builtin_s390_vfnmssb(__a, __b, __c);
9023 static inline __ATTRS_o_ai __vector double
9024 vec_nmsub(__vector double __a, __vector double __b, __vector double __c) {
9025 return __builtin_s390_vfnmsdb(__a, __b, __c);
9027 #endif
9029 /*-- vec_sqrt ---------------------------------------------------------------*/
9031 #if __ARCH__ >= 12
9032 static inline __ATTRS_o_ai __vector float
9033 vec_sqrt(__vector float __a) {
9034 return __builtin_s390_vfsqsb(__a);
9036 #endif
9038 static inline __ATTRS_o_ai __vector double
9039 vec_sqrt(__vector double __a) {
9040 return __builtin_s390_vfsqdb(__a);
9043 /*-- vec_ld2f ---------------------------------------------------------------*/
9045 // This prototype is deprecated.
9046 static inline __ATTRS_ai __vector double
9047 vec_ld2f(const float *__ptr) {
9048 typedef float __v2f32 __attribute__((__vector_size__(8)));
9049 return __builtin_convertvector(*(const __v2f32 *)__ptr, __vector double);
9052 /*-- vec_st2f ---------------------------------------------------------------*/
9054 // This prototype is deprecated.
9055 static inline __ATTRS_ai void
9056 vec_st2f(__vector double __a, float *__ptr) {
9057 typedef float __v2f32 __attribute__((__vector_size__(8)));
9058 *(__v2f32 *)__ptr = __builtin_convertvector(__a, __v2f32);
9061 /*-- vec_ctd ----------------------------------------------------------------*/
9063 // This prototype is deprecated.
9064 static inline __ATTRS_o_ai __vector double
9065 vec_ctd(__vector signed long long __a, int __b)
9066 __constant_range(__b, 0, 31) {
9067 __vector double __conv = __builtin_convertvector(__a, __vector double);
9068 __conv *= ((__vector double)(__vector unsigned long long)
9069 ((0x3ffULL - __b) << 52));
9070 return __conv;
9073 // This prototype is deprecated.
9074 static inline __ATTRS_o_ai __vector double
9075 vec_ctd(__vector unsigned long long __a, int __b)
9076 __constant_range(__b, 0, 31) {
9077 __vector double __conv = __builtin_convertvector(__a, __vector double);
9078 __conv *= ((__vector double)(__vector unsigned long long)
9079 ((0x3ffULL - __b) << 52));
9080 return __conv;
9083 /*-- vec_ctsl ---------------------------------------------------------------*/
9085 // This prototype is deprecated.
9086 static inline __ATTRS_o_ai __vector signed long long
9087 vec_ctsl(__vector double __a, int __b)
9088 __constant_range(__b, 0, 31) {
9089 __a *= ((__vector double)(__vector unsigned long long)
9090 ((0x3ffULL + __b) << 52));
9091 return __builtin_convertvector(__a, __vector signed long long);
9094 /*-- vec_ctul ---------------------------------------------------------------*/
9096 // This prototype is deprecated.
9097 static inline __ATTRS_o_ai __vector unsigned long long
9098 vec_ctul(__vector double __a, int __b)
9099 __constant_range(__b, 0, 31) {
9100 __a *= ((__vector double)(__vector unsigned long long)
9101 ((0x3ffULL + __b) << 52));
9102 return __builtin_convertvector(__a, __vector unsigned long long);
9105 /*-- vec_doublee ------------------------------------------------------------*/
9107 #if __ARCH__ >= 12
9108 static inline __ATTRS_ai __vector double
9109 vec_doublee(__vector float __a) {
9110 typedef float __v2f32 __attribute__((__vector_size__(8)));
9111 __v2f32 __pack = __builtin_shufflevector(__a, __a, 0, 2);
9112 return __builtin_convertvector(__pack, __vector double);
9114 #endif
9116 /*-- vec_floate -------------------------------------------------------------*/
9118 #if __ARCH__ >= 12
9119 static inline __ATTRS_ai __vector float
9120 vec_floate(__vector double __a) {
9121 typedef float __v2f32 __attribute__((__vector_size__(8)));
9122 __v2f32 __pack = __builtin_convertvector(__a, __v2f32);
9123 return __builtin_shufflevector(__pack, __pack, 0, -1, 1, -1);
9125 #endif
9127 /*-- vec_double -------------------------------------------------------------*/
9129 static inline __ATTRS_o_ai __vector double
9130 vec_double(__vector signed long long __a) {
9131 return __builtin_convertvector(__a, __vector double);
9134 static inline __ATTRS_o_ai __vector double
9135 vec_double(__vector unsigned long long __a) {
9136 return __builtin_convertvector(__a, __vector double);
9139 /*-- vec_float --------------------------------------------------------------*/
9141 #if __ARCH__ >= 13
9143 static inline __ATTRS_o_ai __vector float
9144 vec_float(__vector signed int __a) {
9145 return __builtin_convertvector(__a, __vector float);
9148 static inline __ATTRS_o_ai __vector float
9149 vec_float(__vector unsigned int __a) {
9150 return __builtin_convertvector(__a, __vector float);
9153 #endif
9155 /*-- vec_signed -------------------------------------------------------------*/
9157 static inline __ATTRS_o_ai __vector signed long long
9158 vec_signed(__vector double __a) {
9159 return __builtin_convertvector(__a, __vector signed long long);
9162 #if __ARCH__ >= 13
9163 static inline __ATTRS_o_ai __vector signed int
9164 vec_signed(__vector float __a) {
9165 return __builtin_convertvector(__a, __vector signed int);
9167 #endif
9169 /*-- vec_unsigned -----------------------------------------------------------*/
9171 static inline __ATTRS_o_ai __vector unsigned long long
9172 vec_unsigned(__vector double __a) {
9173 return __builtin_convertvector(__a, __vector unsigned long long);
9176 #if __ARCH__ >= 13
9177 static inline __ATTRS_o_ai __vector unsigned int
9178 vec_unsigned(__vector float __a) {
9179 return __builtin_convertvector(__a, __vector unsigned int);
9181 #endif
9183 /*-- vec_roundp -------------------------------------------------------------*/
9185 #if __ARCH__ >= 12
9186 static inline __ATTRS_o_ai __vector float
9187 vec_roundp(__vector float __a) {
9188 return __builtin_s390_vfisb(__a, 4, 6);
9190 #endif
9192 static inline __ATTRS_o_ai __vector double
9193 vec_roundp(__vector double __a) {
9194 return __builtin_s390_vfidb(__a, 4, 6);
9197 /*-- vec_ceil ---------------------------------------------------------------*/
9199 #if __ARCH__ >= 12
9200 static inline __ATTRS_o_ai __vector float
9201 vec_ceil(__vector float __a) {
9202 // On this platform, vec_ceil never triggers the IEEE-inexact exception.
9203 return __builtin_s390_vfisb(__a, 4, 6);
9205 #endif
9207 static inline __ATTRS_o_ai __vector double
9208 vec_ceil(__vector double __a) {
9209 // On this platform, vec_ceil never triggers the IEEE-inexact exception.
9210 return __builtin_s390_vfidb(__a, 4, 6);
9213 /*-- vec_roundm -------------------------------------------------------------*/
9215 #if __ARCH__ >= 12
9216 static inline __ATTRS_o_ai __vector float
9217 vec_roundm(__vector float __a) {
9218 return __builtin_s390_vfisb(__a, 4, 7);
9220 #endif
9222 static inline __ATTRS_o_ai __vector double
9223 vec_roundm(__vector double __a) {
9224 return __builtin_s390_vfidb(__a, 4, 7);
9227 /*-- vec_floor --------------------------------------------------------------*/
9229 #if __ARCH__ >= 12
9230 static inline __ATTRS_o_ai __vector float
9231 vec_floor(__vector float __a) {
9232 // On this platform, vec_floor never triggers the IEEE-inexact exception.
9233 return __builtin_s390_vfisb(__a, 4, 7);
9235 #endif
9237 static inline __ATTRS_o_ai __vector double
9238 vec_floor(__vector double __a) {
9239 // On this platform, vec_floor never triggers the IEEE-inexact exception.
9240 return __builtin_s390_vfidb(__a, 4, 7);
9243 /*-- vec_roundz -------------------------------------------------------------*/
9245 #if __ARCH__ >= 12
9246 static inline __ATTRS_o_ai __vector float
9247 vec_roundz(__vector float __a) {
9248 return __builtin_s390_vfisb(__a, 4, 5);
9250 #endif
9252 static inline __ATTRS_o_ai __vector double
9253 vec_roundz(__vector double __a) {
9254 return __builtin_s390_vfidb(__a, 4, 5);
9257 /*-- vec_trunc --------------------------------------------------------------*/
9259 #if __ARCH__ >= 12
9260 static inline __ATTRS_o_ai __vector float
9261 vec_trunc(__vector float __a) {
9262 // On this platform, vec_trunc never triggers the IEEE-inexact exception.
9263 return __builtin_s390_vfisb(__a, 4, 5);
9265 #endif
9267 static inline __ATTRS_o_ai __vector double
9268 vec_trunc(__vector double __a) {
9269 // On this platform, vec_trunc never triggers the IEEE-inexact exception.
9270 return __builtin_s390_vfidb(__a, 4, 5);
9273 /*-- vec_roundc -------------------------------------------------------------*/
9275 #if __ARCH__ >= 12
9276 static inline __ATTRS_o_ai __vector float
9277 vec_roundc(__vector float __a) {
9278 return __builtin_s390_vfisb(__a, 4, 0);
9280 #endif
9282 static inline __ATTRS_o_ai __vector double
9283 vec_roundc(__vector double __a) {
9284 return __builtin_s390_vfidb(__a, 4, 0);
9287 /*-- vec_rint ---------------------------------------------------------------*/
9289 #if __ARCH__ >= 12
9290 static inline __ATTRS_o_ai __vector float
9291 vec_rint(__vector float __a) {
9292 // vec_rint may trigger the IEEE-inexact exception.
9293 return __builtin_s390_vfisb(__a, 0, 0);
9295 #endif
9297 static inline __ATTRS_o_ai __vector double
9298 vec_rint(__vector double __a) {
9299 // vec_rint may trigger the IEEE-inexact exception.
9300 return __builtin_s390_vfidb(__a, 0, 0);
9303 /*-- vec_round --------------------------------------------------------------*/
9305 #if __ARCH__ >= 12
9306 static inline __ATTRS_o_ai __vector float
9307 vec_round(__vector float __a) {
9308 return __builtin_s390_vfisb(__a, 4, 4);
9310 #endif
9312 static inline __ATTRS_o_ai __vector double
9313 vec_round(__vector double __a) {
9314 return __builtin_s390_vfidb(__a, 4, 4);
9317 /*-- vec_fp_test_data_class -------------------------------------------------*/
9319 #if __ARCH__ >= 12
9320 extern __ATTRS_o __vector __bool int
9321 vec_fp_test_data_class(__vector float __a, int __b, int *__c)
9322 __constant_range(__b, 0, 4095);
9324 extern __ATTRS_o __vector __bool long long
9325 vec_fp_test_data_class(__vector double __a, int __b, int *__c)
9326 __constant_range(__b, 0, 4095);
9328 #define vec_fp_test_data_class(X, Y, Z) \
9329 ((__typeof__((vec_fp_test_data_class)((X), (Y), (Z)))) \
9330 __extension__ ({ \
9331 __vector unsigned char __res; \
9332 __vector unsigned char __x = (__vector unsigned char)(X); \
9333 int *__z = (Z); \
9334 switch (sizeof ((X)[0])) { \
9335 case 4: __res = (__vector unsigned char) \
9336 __builtin_s390_vftcisb((__vector float)__x, (Y), __z); \
9337 break; \
9338 default: __res = (__vector unsigned char) \
9339 __builtin_s390_vftcidb((__vector double)__x, (Y), __z); \
9340 break; \
9341 } __res; }))
9342 #else
9343 #define vec_fp_test_data_class(X, Y, Z) \
9344 ((__vector __bool long long)__builtin_s390_vftcidb((X), (Y), (Z)))
9345 #endif
9347 #define __VEC_CLASS_FP_ZERO_P (1 << 11)
9348 #define __VEC_CLASS_FP_ZERO_N (1 << 10)
9349 #define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | __VEC_CLASS_FP_ZERO_N)
9350 #define __VEC_CLASS_FP_NORMAL_P (1 << 9)
9351 #define __VEC_CLASS_FP_NORMAL_N (1 << 8)
9352 #define __VEC_CLASS_FP_NORMAL (__VEC_CLASS_FP_NORMAL_P | \
9353 __VEC_CLASS_FP_NORMAL_N)
9354 #define __VEC_CLASS_FP_SUBNORMAL_P (1 << 7)
9355 #define __VEC_CLASS_FP_SUBNORMAL_N (1 << 6)
9356 #define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \
9357 __VEC_CLASS_FP_SUBNORMAL_N)
9358 #define __VEC_CLASS_FP_INFINITY_P (1 << 5)
9359 #define __VEC_CLASS_FP_INFINITY_N (1 << 4)
9360 #define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \
9361 __VEC_CLASS_FP_INFINITY_N)
9362 #define __VEC_CLASS_FP_QNAN_P (1 << 3)
9363 #define __VEC_CLASS_FP_QNAN_N (1 << 2)
9364 #define __VEC_CLASS_FP_QNAN (__VEC_CLASS_FP_QNAN_P | __VEC_CLASS_FP_QNAN_N)
9365 #define __VEC_CLASS_FP_SNAN_P (1 << 1)
9366 #define __VEC_CLASS_FP_SNAN_N (1 << 0)
9367 #define __VEC_CLASS_FP_SNAN (__VEC_CLASS_FP_SNAN_P | __VEC_CLASS_FP_SNAN_N)
9368 #define __VEC_CLASS_FP_NAN (__VEC_CLASS_FP_QNAN | __VEC_CLASS_FP_SNAN)
9369 #define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \
9370 __VEC_CLASS_FP_SUBNORMAL | \
9371 __VEC_CLASS_FP_ZERO | \
9372 __VEC_CLASS_FP_INFINITY)
9374 /*-- vec_extend_to_fp32_hi --------------------------------------------------*/
9376 #if __ARCH__ >= 14
9377 #define vec_extend_to_fp32_hi(X, W) \
9378 ((__vector float)__builtin_s390_vclfnhs((X), (W)));
9379 #endif
9381 /*-- vec_extend_to_fp32_hi --------------------------------------------------*/
9383 #if __ARCH__ >= 14
9384 #define vec_extend_to_fp32_lo(X, W) \
9385 ((__vector float)__builtin_s390_vclfnls((X), (W)));
9386 #endif
9388 /*-- vec_round_from_fp32 ----------------------------------------------------*/
9390 #if __ARCH__ >= 14
9391 #define vec_round_from_fp32(X, Y, W) \
9392 ((__vector unsigned short)__builtin_s390_vcrnfs((X), (Y), (W)));
9393 #endif
9395 /*-- vec_convert_to_fp16 ----------------------------------------------------*/
9397 #if __ARCH__ >= 14
9398 #define vec_convert_to_fp16(X, W) \
9399 ((__vector unsigned short)__builtin_s390_vcfn((X), (W)));
9400 #endif
9402 /*-- vec_convert_from_fp16 --------------------------------------------------*/
9404 #if __ARCH__ >= 14
9405 #define vec_convert_from_fp16(X, W) \
9406 ((__vector unsigned short)__builtin_s390_vcnf((X), (W)));
9407 #endif
9409 /*-- vec_cp_until_zero ------------------------------------------------------*/
9411 static inline __ATTRS_o_ai __vector signed char
9412 vec_cp_until_zero(__vector signed char __a) {
9413 return ((__vector signed char)
9414 __builtin_s390_vistrb((__vector unsigned char)__a));
9417 static inline __ATTRS_o_ai __vector __bool char
9418 vec_cp_until_zero(__vector __bool char __a) {
9419 return ((__vector __bool char)
9420 __builtin_s390_vistrb((__vector unsigned char)__a));
9423 static inline __ATTRS_o_ai __vector unsigned char
9424 vec_cp_until_zero(__vector unsigned char __a) {
9425 return __builtin_s390_vistrb(__a);
9428 static inline __ATTRS_o_ai __vector signed short
9429 vec_cp_until_zero(__vector signed short __a) {
9430 return ((__vector signed short)
9431 __builtin_s390_vistrh((__vector unsigned short)__a));
9434 static inline __ATTRS_o_ai __vector __bool short
9435 vec_cp_until_zero(__vector __bool short __a) {
9436 return ((__vector __bool short)
9437 __builtin_s390_vistrh((__vector unsigned short)__a));
9440 static inline __ATTRS_o_ai __vector unsigned short
9441 vec_cp_until_zero(__vector unsigned short __a) {
9442 return __builtin_s390_vistrh(__a);
9445 static inline __ATTRS_o_ai __vector signed int
9446 vec_cp_until_zero(__vector signed int __a) {
9447 return ((__vector signed int)
9448 __builtin_s390_vistrf((__vector unsigned int)__a));
9451 static inline __ATTRS_o_ai __vector __bool int
9452 vec_cp_until_zero(__vector __bool int __a) {
9453 return ((__vector __bool int)
9454 __builtin_s390_vistrf((__vector unsigned int)__a));
9457 static inline __ATTRS_o_ai __vector unsigned int
9458 vec_cp_until_zero(__vector unsigned int __a) {
9459 return __builtin_s390_vistrf(__a);
9462 /*-- vec_cp_until_zero_cc ---------------------------------------------------*/
9464 static inline __ATTRS_o_ai __vector signed char
9465 vec_cp_until_zero_cc(__vector signed char __a, int *__cc) {
9466 return (__vector signed char)
9467 __builtin_s390_vistrbs((__vector unsigned char)__a, __cc);
9470 static inline __ATTRS_o_ai __vector __bool char
9471 vec_cp_until_zero_cc(__vector __bool char __a, int *__cc) {
9472 return (__vector __bool char)
9473 __builtin_s390_vistrbs((__vector unsigned char)__a, __cc);
9476 static inline __ATTRS_o_ai __vector unsigned char
9477 vec_cp_until_zero_cc(__vector unsigned char __a, int *__cc) {
9478 return __builtin_s390_vistrbs(__a, __cc);
9481 static inline __ATTRS_o_ai __vector signed short
9482 vec_cp_until_zero_cc(__vector signed short __a, int *__cc) {
9483 return (__vector signed short)
9484 __builtin_s390_vistrhs((__vector unsigned short)__a, __cc);
9487 static inline __ATTRS_o_ai __vector __bool short
9488 vec_cp_until_zero_cc(__vector __bool short __a, int *__cc) {
9489 return (__vector __bool short)
9490 __builtin_s390_vistrhs((__vector unsigned short)__a, __cc);
9493 static inline __ATTRS_o_ai __vector unsigned short
9494 vec_cp_until_zero_cc(__vector unsigned short __a, int *__cc) {
9495 return __builtin_s390_vistrhs(__a, __cc);
9498 static inline __ATTRS_o_ai __vector signed int
9499 vec_cp_until_zero_cc(__vector signed int __a, int *__cc) {
9500 return (__vector signed int)
9501 __builtin_s390_vistrfs((__vector unsigned int)__a, __cc);
9504 static inline __ATTRS_o_ai __vector __bool int
9505 vec_cp_until_zero_cc(__vector __bool int __a, int *__cc) {
9506 return (__vector __bool int)
9507 __builtin_s390_vistrfs((__vector unsigned int)__a, __cc);
9510 static inline __ATTRS_o_ai __vector unsigned int
9511 vec_cp_until_zero_cc(__vector unsigned int __a, int *__cc) {
9512 return __builtin_s390_vistrfs(__a, __cc);
9515 /*-- vec_cmpeq_idx ----------------------------------------------------------*/
9517 static inline __ATTRS_o_ai __vector signed char
9518 vec_cmpeq_idx(__vector signed char __a, __vector signed char __b) {
9519 return (__vector signed char)
9520 __builtin_s390_vfeeb((__vector unsigned char)__a,
9521 (__vector unsigned char)__b);
9524 static inline __ATTRS_o_ai __vector unsigned char
9525 vec_cmpeq_idx(__vector __bool char __a, __vector __bool char __b) {
9526 return __builtin_s390_vfeeb((__vector unsigned char)__a,
9527 (__vector unsigned char)__b);
9530 static inline __ATTRS_o_ai __vector unsigned char
9531 vec_cmpeq_idx(__vector unsigned char __a, __vector unsigned char __b) {
9532 return __builtin_s390_vfeeb(__a, __b);
9535 static inline __ATTRS_o_ai __vector signed short
9536 vec_cmpeq_idx(__vector signed short __a, __vector signed short __b) {
9537 return (__vector signed short)
9538 __builtin_s390_vfeeh((__vector unsigned short)__a,
9539 (__vector unsigned short)__b);
9542 static inline __ATTRS_o_ai __vector unsigned short
9543 vec_cmpeq_idx(__vector __bool short __a, __vector __bool short __b) {
9544 return __builtin_s390_vfeeh((__vector unsigned short)__a,
9545 (__vector unsigned short)__b);
9548 static inline __ATTRS_o_ai __vector unsigned short
9549 vec_cmpeq_idx(__vector unsigned short __a, __vector unsigned short __b) {
9550 return __builtin_s390_vfeeh(__a, __b);
9553 static inline __ATTRS_o_ai __vector signed int
9554 vec_cmpeq_idx(__vector signed int __a, __vector signed int __b) {
9555 return (__vector signed int)
9556 __builtin_s390_vfeef((__vector unsigned int)__a,
9557 (__vector unsigned int)__b);
9560 static inline __ATTRS_o_ai __vector unsigned int
9561 vec_cmpeq_idx(__vector __bool int __a, __vector __bool int __b) {
9562 return __builtin_s390_vfeef((__vector unsigned int)__a,
9563 (__vector unsigned int)__b);
9566 static inline __ATTRS_o_ai __vector unsigned int
9567 vec_cmpeq_idx(__vector unsigned int __a, __vector unsigned int __b) {
9568 return __builtin_s390_vfeef(__a, __b);
9571 /*-- vec_cmpeq_idx_cc -------------------------------------------------------*/
9573 static inline __ATTRS_o_ai __vector signed char
9574 vec_cmpeq_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) {
9575 return (__vector signed char)
9576 __builtin_s390_vfeebs((__vector unsigned char)__a,
9577 (__vector unsigned char)__b, __cc);
9580 static inline __ATTRS_o_ai __vector unsigned char
9581 vec_cmpeq_idx_cc(__vector __bool char __a, __vector __bool char __b, int *__cc) {
9582 return __builtin_s390_vfeebs((__vector unsigned char)__a,
9583 (__vector unsigned char)__b, __cc);
9586 static inline __ATTRS_o_ai __vector unsigned char
9587 vec_cmpeq_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9588 int *__cc) {
9589 return __builtin_s390_vfeebs(__a, __b, __cc);
9592 static inline __ATTRS_o_ai __vector signed short
9593 vec_cmpeq_idx_cc(__vector signed short __a, __vector signed short __b,
9594 int *__cc) {
9595 return (__vector signed short)
9596 __builtin_s390_vfeehs((__vector unsigned short)__a,
9597 (__vector unsigned short)__b, __cc);
9600 static inline __ATTRS_o_ai __vector unsigned short
9601 vec_cmpeq_idx_cc(__vector __bool short __a, __vector __bool short __b, int *__cc) {
9602 return __builtin_s390_vfeehs((__vector unsigned short)__a,
9603 (__vector unsigned short)__b, __cc);
9606 static inline __ATTRS_o_ai __vector unsigned short
9607 vec_cmpeq_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9608 int *__cc) {
9609 return __builtin_s390_vfeehs(__a, __b, __cc);
9612 static inline __ATTRS_o_ai __vector signed int
9613 vec_cmpeq_idx_cc(__vector signed int __a, __vector signed int __b, int *__cc) {
9614 return (__vector signed int)
9615 __builtin_s390_vfeefs((__vector unsigned int)__a,
9616 (__vector unsigned int)__b, __cc);
9619 static inline __ATTRS_o_ai __vector unsigned int
9620 vec_cmpeq_idx_cc(__vector __bool int __a, __vector __bool int __b, int *__cc) {
9621 return __builtin_s390_vfeefs((__vector unsigned int)__a,
9622 (__vector unsigned int)__b, __cc);
9625 static inline __ATTRS_o_ai __vector unsigned int
9626 vec_cmpeq_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9627 int *__cc) {
9628 return __builtin_s390_vfeefs(__a, __b, __cc);
9631 /*-- vec_cmpeq_or_0_idx -----------------------------------------------------*/
9633 static inline __ATTRS_o_ai __vector signed char
9634 vec_cmpeq_or_0_idx(__vector signed char __a, __vector signed char __b) {
9635 return (__vector signed char)
9636 __builtin_s390_vfeezb((__vector unsigned char)__a,
9637 (__vector unsigned char)__b);
9640 static inline __ATTRS_o_ai __vector unsigned char
9641 vec_cmpeq_or_0_idx(__vector __bool char __a, __vector __bool char __b) {
9642 return __builtin_s390_vfeezb((__vector unsigned char)__a,
9643 (__vector unsigned char)__b);
9646 static inline __ATTRS_o_ai __vector unsigned char
9647 vec_cmpeq_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) {
9648 return __builtin_s390_vfeezb(__a, __b);
9651 static inline __ATTRS_o_ai __vector signed short
9652 vec_cmpeq_or_0_idx(__vector signed short __a, __vector signed short __b) {
9653 return (__vector signed short)
9654 __builtin_s390_vfeezh((__vector unsigned short)__a,
9655 (__vector unsigned short)__b);
9658 static inline __ATTRS_o_ai __vector unsigned short
9659 vec_cmpeq_or_0_idx(__vector __bool short __a, __vector __bool short __b) {
9660 return __builtin_s390_vfeezh((__vector unsigned short)__a,
9661 (__vector unsigned short)__b);
9664 static inline __ATTRS_o_ai __vector unsigned short
9665 vec_cmpeq_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) {
9666 return __builtin_s390_vfeezh(__a, __b);
9669 static inline __ATTRS_o_ai __vector signed int
9670 vec_cmpeq_or_0_idx(__vector signed int __a, __vector signed int __b) {
9671 return (__vector signed int)
9672 __builtin_s390_vfeezf((__vector unsigned int)__a,
9673 (__vector unsigned int)__b);
9676 static inline __ATTRS_o_ai __vector unsigned int
9677 vec_cmpeq_or_0_idx(__vector __bool int __a, __vector __bool int __b) {
9678 return __builtin_s390_vfeezf((__vector unsigned int)__a,
9679 (__vector unsigned int)__b);
9682 static inline __ATTRS_o_ai __vector unsigned int
9683 vec_cmpeq_or_0_idx(__vector unsigned int __a, __vector unsigned int __b) {
9684 return __builtin_s390_vfeezf(__a, __b);
9687 /*-- vec_cmpeq_or_0_idx_cc --------------------------------------------------*/
9689 static inline __ATTRS_o_ai __vector signed char
9690 vec_cmpeq_or_0_idx_cc(__vector signed char __a, __vector signed char __b,
9691 int *__cc) {
9692 return (__vector signed char)
9693 __builtin_s390_vfeezbs((__vector unsigned char)__a,
9694 (__vector unsigned char)__b, __cc);
9697 static inline __ATTRS_o_ai __vector unsigned char
9698 vec_cmpeq_or_0_idx_cc(__vector __bool char __a, __vector __bool char __b,
9699 int *__cc) {
9700 return __builtin_s390_vfeezbs((__vector unsigned char)__a,
9701 (__vector unsigned char)__b, __cc);
9704 static inline __ATTRS_o_ai __vector unsigned char
9705 vec_cmpeq_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9706 int *__cc) {
9707 return __builtin_s390_vfeezbs(__a, __b, __cc);
9710 static inline __ATTRS_o_ai __vector signed short
9711 vec_cmpeq_or_0_idx_cc(__vector signed short __a, __vector signed short __b,
9712 int *__cc) {
9713 return (__vector signed short)
9714 __builtin_s390_vfeezhs((__vector unsigned short)__a,
9715 (__vector unsigned short)__b, __cc);
9718 static inline __ATTRS_o_ai __vector unsigned short
9719 vec_cmpeq_or_0_idx_cc(__vector __bool short __a, __vector __bool short __b,
9720 int *__cc) {
9721 return __builtin_s390_vfeezhs((__vector unsigned short)__a,
9722 (__vector unsigned short)__b, __cc);
9725 static inline __ATTRS_o_ai __vector unsigned short
9726 vec_cmpeq_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9727 int *__cc) {
9728 return __builtin_s390_vfeezhs(__a, __b, __cc);
9731 static inline __ATTRS_o_ai __vector signed int
9732 vec_cmpeq_or_0_idx_cc(__vector signed int __a, __vector signed int __b,
9733 int *__cc) {
9734 return (__vector signed int)
9735 __builtin_s390_vfeezfs((__vector unsigned int)__a,
9736 (__vector unsigned int)__b, __cc);
9739 static inline __ATTRS_o_ai __vector unsigned int
9740 vec_cmpeq_or_0_idx_cc(__vector __bool int __a, __vector __bool int __b,
9741 int *__cc) {
9742 return __builtin_s390_vfeezfs((__vector unsigned int)__a,
9743 (__vector unsigned int)__b, __cc);
9746 static inline __ATTRS_o_ai __vector unsigned int
9747 vec_cmpeq_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9748 int *__cc) {
9749 return __builtin_s390_vfeezfs(__a, __b, __cc);
9752 /*-- vec_cmpne_idx ----------------------------------------------------------*/
9754 static inline __ATTRS_o_ai __vector signed char
9755 vec_cmpne_idx(__vector signed char __a, __vector signed char __b) {
9756 return (__vector signed char)
9757 __builtin_s390_vfeneb((__vector unsigned char)__a,
9758 (__vector unsigned char)__b);
9761 static inline __ATTRS_o_ai __vector unsigned char
9762 vec_cmpne_idx(__vector __bool char __a, __vector __bool char __b) {
9763 return __builtin_s390_vfeneb((__vector unsigned char)__a,
9764 (__vector unsigned char)__b);
9767 static inline __ATTRS_o_ai __vector unsigned char
9768 vec_cmpne_idx(__vector unsigned char __a, __vector unsigned char __b) {
9769 return __builtin_s390_vfeneb(__a, __b);
9772 static inline __ATTRS_o_ai __vector signed short
9773 vec_cmpne_idx(__vector signed short __a, __vector signed short __b) {
9774 return (__vector signed short)
9775 __builtin_s390_vfeneh((__vector unsigned short)__a,
9776 (__vector unsigned short)__b);
9779 static inline __ATTRS_o_ai __vector unsigned short
9780 vec_cmpne_idx(__vector __bool short __a, __vector __bool short __b) {
9781 return __builtin_s390_vfeneh((__vector unsigned short)__a,
9782 (__vector unsigned short)__b);
9785 static inline __ATTRS_o_ai __vector unsigned short
9786 vec_cmpne_idx(__vector unsigned short __a, __vector unsigned short __b) {
9787 return __builtin_s390_vfeneh(__a, __b);
9790 static inline __ATTRS_o_ai __vector signed int
9791 vec_cmpne_idx(__vector signed int __a, __vector signed int __b) {
9792 return (__vector signed int)
9793 __builtin_s390_vfenef((__vector unsigned int)__a,
9794 (__vector unsigned int)__b);
9797 static inline __ATTRS_o_ai __vector unsigned int
9798 vec_cmpne_idx(__vector __bool int __a, __vector __bool int __b) {
9799 return __builtin_s390_vfenef((__vector unsigned int)__a,
9800 (__vector unsigned int)__b);
9803 static inline __ATTRS_o_ai __vector unsigned int
9804 vec_cmpne_idx(__vector unsigned int __a, __vector unsigned int __b) {
9805 return __builtin_s390_vfenef(__a, __b);
9808 /*-- vec_cmpne_idx_cc -------------------------------------------------------*/
9810 static inline __ATTRS_o_ai __vector signed char
9811 vec_cmpne_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) {
9812 return (__vector signed char)
9813 __builtin_s390_vfenebs((__vector unsigned char)__a,
9814 (__vector unsigned char)__b, __cc);
9817 static inline __ATTRS_o_ai __vector unsigned char
9818 vec_cmpne_idx_cc(__vector __bool char __a, __vector __bool char __b, int *__cc) {
9819 return __builtin_s390_vfenebs((__vector unsigned char)__a,
9820 (__vector unsigned char)__b, __cc);
9823 static inline __ATTRS_o_ai __vector unsigned char
9824 vec_cmpne_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9825 int *__cc) {
9826 return __builtin_s390_vfenebs(__a, __b, __cc);
9829 static inline __ATTRS_o_ai __vector signed short
9830 vec_cmpne_idx_cc(__vector signed short __a, __vector signed short __b,
9831 int *__cc) {
9832 return (__vector signed short)
9833 __builtin_s390_vfenehs((__vector unsigned short)__a,
9834 (__vector unsigned short)__b, __cc);
9837 static inline __ATTRS_o_ai __vector unsigned short
9838 vec_cmpne_idx_cc(__vector __bool short __a, __vector __bool short __b,
9839 int *__cc) {
9840 return __builtin_s390_vfenehs((__vector unsigned short)__a,
9841 (__vector unsigned short)__b, __cc);
9844 static inline __ATTRS_o_ai __vector unsigned short
9845 vec_cmpne_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9846 int *__cc) {
9847 return __builtin_s390_vfenehs(__a, __b, __cc);
9850 static inline __ATTRS_o_ai __vector signed int
9851 vec_cmpne_idx_cc(__vector signed int __a, __vector signed int __b, int *__cc) {
9852 return (__vector signed int)
9853 __builtin_s390_vfenefs((__vector unsigned int)__a,
9854 (__vector unsigned int)__b, __cc);
9857 static inline __ATTRS_o_ai __vector unsigned int
9858 vec_cmpne_idx_cc(__vector __bool int __a, __vector __bool int __b, int *__cc) {
9859 return __builtin_s390_vfenefs((__vector unsigned int)__a,
9860 (__vector unsigned int)__b, __cc);
9863 static inline __ATTRS_o_ai __vector unsigned int
9864 vec_cmpne_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9865 int *__cc) {
9866 return __builtin_s390_vfenefs(__a, __b, __cc);
9869 /*-- vec_cmpne_or_0_idx -----------------------------------------------------*/
9871 static inline __ATTRS_o_ai __vector signed char
9872 vec_cmpne_or_0_idx(__vector signed char __a, __vector signed char __b) {
9873 return (__vector signed char)
9874 __builtin_s390_vfenezb((__vector unsigned char)__a,
9875 (__vector unsigned char)__b);
9878 static inline __ATTRS_o_ai __vector unsigned char
9879 vec_cmpne_or_0_idx(__vector __bool char __a, __vector __bool char __b) {
9880 return __builtin_s390_vfenezb((__vector unsigned char)__a,
9881 (__vector unsigned char)__b);
9884 static inline __ATTRS_o_ai __vector unsigned char
9885 vec_cmpne_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) {
9886 return __builtin_s390_vfenezb(__a, __b);
9889 static inline __ATTRS_o_ai __vector signed short
9890 vec_cmpne_or_0_idx(__vector signed short __a, __vector signed short __b) {
9891 return (__vector signed short)
9892 __builtin_s390_vfenezh((__vector unsigned short)__a,
9893 (__vector unsigned short)__b);
9896 static inline __ATTRS_o_ai __vector unsigned short
9897 vec_cmpne_or_0_idx(__vector __bool short __a, __vector __bool short __b) {
9898 return __builtin_s390_vfenezh((__vector unsigned short)__a,
9899 (__vector unsigned short)__b);
9902 static inline __ATTRS_o_ai __vector unsigned short
9903 vec_cmpne_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) {
9904 return __builtin_s390_vfenezh(__a, __b);
9907 static inline __ATTRS_o_ai __vector signed int
9908 vec_cmpne_or_0_idx(__vector signed int __a, __vector signed int __b) {
9909 return (__vector signed int)
9910 __builtin_s390_vfenezf((__vector unsigned int)__a,
9911 (__vector unsigned int)__b);
9914 static inline __ATTRS_o_ai __vector unsigned int
9915 vec_cmpne_or_0_idx(__vector __bool int __a, __vector __bool int __b) {
9916 return __builtin_s390_vfenezf((__vector unsigned int)__a,
9917 (__vector unsigned int)__b);
9920 static inline __ATTRS_o_ai __vector unsigned int
9921 vec_cmpne_or_0_idx(__vector unsigned int __a, __vector unsigned int __b) {
9922 return __builtin_s390_vfenezf(__a, __b);
9925 /*-- vec_cmpne_or_0_idx_cc --------------------------------------------------*/
9927 static inline __ATTRS_o_ai __vector signed char
9928 vec_cmpne_or_0_idx_cc(__vector signed char __a, __vector signed char __b,
9929 int *__cc) {
9930 return (__vector signed char)
9931 __builtin_s390_vfenezbs((__vector unsigned char)__a,
9932 (__vector unsigned char)__b, __cc);
9935 static inline __ATTRS_o_ai __vector unsigned char
9936 vec_cmpne_or_0_idx_cc(__vector __bool char __a, __vector __bool char __b,
9937 int *__cc) {
9938 return __builtin_s390_vfenezbs((__vector unsigned char)__a,
9939 (__vector unsigned char)__b, __cc);
9942 static inline __ATTRS_o_ai __vector unsigned char
9943 vec_cmpne_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9944 int *__cc) {
9945 return __builtin_s390_vfenezbs(__a, __b, __cc);
9948 static inline __ATTRS_o_ai __vector signed short
9949 vec_cmpne_or_0_idx_cc(__vector signed short __a, __vector signed short __b,
9950 int *__cc) {
9951 return (__vector signed short)
9952 __builtin_s390_vfenezhs((__vector unsigned short)__a,
9953 (__vector unsigned short)__b, __cc);
9956 static inline __ATTRS_o_ai __vector unsigned short
9957 vec_cmpne_or_0_idx_cc(__vector __bool short __a, __vector __bool short __b,
9958 int *__cc) {
9959 return __builtin_s390_vfenezhs((__vector unsigned short)__a,
9960 (__vector unsigned short)__b, __cc);
9963 static inline __ATTRS_o_ai __vector unsigned short
9964 vec_cmpne_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9965 int *__cc) {
9966 return __builtin_s390_vfenezhs(__a, __b, __cc);
9969 static inline __ATTRS_o_ai __vector signed int
9970 vec_cmpne_or_0_idx_cc(__vector signed int __a, __vector signed int __b,
9971 int *__cc) {
9972 return (__vector signed int)
9973 __builtin_s390_vfenezfs((__vector unsigned int)__a,
9974 (__vector unsigned int)__b, __cc);
9977 static inline __ATTRS_o_ai __vector unsigned int
9978 vec_cmpne_or_0_idx_cc(__vector __bool int __a, __vector __bool int __b,
9979 int *__cc) {
9980 return __builtin_s390_vfenezfs((__vector unsigned int)__a,
9981 (__vector unsigned int)__b, __cc);
9984 static inline __ATTRS_o_ai __vector unsigned int
9985 vec_cmpne_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9986 int *__cc) {
9987 return __builtin_s390_vfenezfs(__a, __b, __cc);
9990 /*-- vec_cmprg --------------------------------------------------------------*/
9992 static inline __ATTRS_o_ai __vector __bool char
9993 vec_cmprg(__vector unsigned char __a, __vector unsigned char __b,
9994 __vector unsigned char __c) {
9995 return (__vector __bool char)__builtin_s390_vstrcb(__a, __b, __c, 4);
9998 static inline __ATTRS_o_ai __vector __bool short
9999 vec_cmprg(__vector unsigned short __a, __vector unsigned short __b,
10000 __vector unsigned short __c) {
10001 return (__vector __bool short)__builtin_s390_vstrch(__a, __b, __c, 4);
10004 static inline __ATTRS_o_ai __vector __bool int
10005 vec_cmprg(__vector unsigned int __a, __vector unsigned int __b,
10006 __vector unsigned int __c) {
10007 return (__vector __bool int)__builtin_s390_vstrcf(__a, __b, __c, 4);
10010 /*-- vec_cmprg_cc -----------------------------------------------------------*/
10012 static inline __ATTRS_o_ai __vector __bool char
10013 vec_cmprg_cc(__vector unsigned char __a, __vector unsigned char __b,
10014 __vector unsigned char __c, int *__cc) {
10015 return (__vector __bool char)__builtin_s390_vstrcbs(__a, __b, __c, 4, __cc);
10018 static inline __ATTRS_o_ai __vector __bool short
10019 vec_cmprg_cc(__vector unsigned short __a, __vector unsigned short __b,
10020 __vector unsigned short __c, int *__cc) {
10021 return (__vector __bool short)__builtin_s390_vstrchs(__a, __b, __c, 4, __cc);
10024 static inline __ATTRS_o_ai __vector __bool int
10025 vec_cmprg_cc(__vector unsigned int __a, __vector unsigned int __b,
10026 __vector unsigned int __c, int *__cc) {
10027 return (__vector __bool int)__builtin_s390_vstrcfs(__a, __b, __c, 4, __cc);
10030 /*-- vec_cmprg_idx ----------------------------------------------------------*/
10032 static inline __ATTRS_o_ai __vector unsigned char
10033 vec_cmprg_idx(__vector unsigned char __a, __vector unsigned char __b,
10034 __vector unsigned char __c) {
10035 return __builtin_s390_vstrcb(__a, __b, __c, 0);
10038 static inline __ATTRS_o_ai __vector unsigned short
10039 vec_cmprg_idx(__vector unsigned short __a, __vector unsigned short __b,
10040 __vector unsigned short __c) {
10041 return __builtin_s390_vstrch(__a, __b, __c, 0);
10044 static inline __ATTRS_o_ai __vector unsigned int
10045 vec_cmprg_idx(__vector unsigned int __a, __vector unsigned int __b,
10046 __vector unsigned int __c) {
10047 return __builtin_s390_vstrcf(__a, __b, __c, 0);
10050 /*-- vec_cmprg_idx_cc -------------------------------------------------------*/
10052 static inline __ATTRS_o_ai __vector unsigned char
10053 vec_cmprg_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10054 __vector unsigned char __c, int *__cc) {
10055 return __builtin_s390_vstrcbs(__a, __b, __c, 0, __cc);
10058 static inline __ATTRS_o_ai __vector unsigned short
10059 vec_cmprg_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10060 __vector unsigned short __c, int *__cc) {
10061 return __builtin_s390_vstrchs(__a, __b, __c, 0, __cc);
10064 static inline __ATTRS_o_ai __vector unsigned int
10065 vec_cmprg_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10066 __vector unsigned int __c, int *__cc) {
10067 return __builtin_s390_vstrcfs(__a, __b, __c, 0, __cc);
10070 /*-- vec_cmprg_or_0_idx -----------------------------------------------------*/
10072 static inline __ATTRS_o_ai __vector unsigned char
10073 vec_cmprg_or_0_idx(__vector unsigned char __a, __vector unsigned char __b,
10074 __vector unsigned char __c) {
10075 return __builtin_s390_vstrczb(__a, __b, __c, 0);
10078 static inline __ATTRS_o_ai __vector unsigned short
10079 vec_cmprg_or_0_idx(__vector unsigned short __a, __vector unsigned short __b,
10080 __vector unsigned short __c) {
10081 return __builtin_s390_vstrczh(__a, __b, __c, 0);
10084 static inline __ATTRS_o_ai __vector unsigned int
10085 vec_cmprg_or_0_idx(__vector unsigned int __a, __vector unsigned int __b,
10086 __vector unsigned int __c) {
10087 return __builtin_s390_vstrczf(__a, __b, __c, 0);
10090 /*-- vec_cmprg_or_0_idx_cc --------------------------------------------------*/
10092 static inline __ATTRS_o_ai __vector unsigned char
10093 vec_cmprg_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10094 __vector unsigned char __c, int *__cc) {
10095 return __builtin_s390_vstrczbs(__a, __b, __c, 0, __cc);
10098 static inline __ATTRS_o_ai __vector unsigned short
10099 vec_cmprg_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10100 __vector unsigned short __c, int *__cc) {
10101 return __builtin_s390_vstrczhs(__a, __b, __c, 0, __cc);
10104 static inline __ATTRS_o_ai __vector unsigned int
10105 vec_cmprg_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10106 __vector unsigned int __c, int *__cc) {
10107 return __builtin_s390_vstrczfs(__a, __b, __c, 0, __cc);
10110 /*-- vec_cmpnrg -------------------------------------------------------------*/
10112 static inline __ATTRS_o_ai __vector __bool char
10113 vec_cmpnrg(__vector unsigned char __a, __vector unsigned char __b,
10114 __vector unsigned char __c) {
10115 return (__vector __bool char)__builtin_s390_vstrcb(__a, __b, __c, 12);
10118 static inline __ATTRS_o_ai __vector __bool short
10119 vec_cmpnrg(__vector unsigned short __a, __vector unsigned short __b,
10120 __vector unsigned short __c) {
10121 return (__vector __bool short)__builtin_s390_vstrch(__a, __b, __c, 12);
10124 static inline __ATTRS_o_ai __vector __bool int
10125 vec_cmpnrg(__vector unsigned int __a, __vector unsigned int __b,
10126 __vector unsigned int __c) {
10127 return (__vector __bool int)__builtin_s390_vstrcf(__a, __b, __c, 12);
10130 /*-- vec_cmpnrg_cc ----------------------------------------------------------*/
10132 static inline __ATTRS_o_ai __vector __bool char
10133 vec_cmpnrg_cc(__vector unsigned char __a, __vector unsigned char __b,
10134 __vector unsigned char __c, int *__cc) {
10135 return (__vector __bool char)
10136 __builtin_s390_vstrcbs(__a, __b, __c, 12, __cc);
10139 static inline __ATTRS_o_ai __vector __bool short
10140 vec_cmpnrg_cc(__vector unsigned short __a, __vector unsigned short __b,
10141 __vector unsigned short __c, int *__cc) {
10142 return (__vector __bool short)
10143 __builtin_s390_vstrchs(__a, __b, __c, 12, __cc);
10146 static inline __ATTRS_o_ai __vector __bool int
10147 vec_cmpnrg_cc(__vector unsigned int __a, __vector unsigned int __b,
10148 __vector unsigned int __c, int *__cc) {
10149 return (__vector __bool int)
10150 __builtin_s390_vstrcfs(__a, __b, __c, 12, __cc);
10153 /*-- vec_cmpnrg_idx ---------------------------------------------------------*/
10155 static inline __ATTRS_o_ai __vector unsigned char
10156 vec_cmpnrg_idx(__vector unsigned char __a, __vector unsigned char __b,
10157 __vector unsigned char __c) {
10158 return __builtin_s390_vstrcb(__a, __b, __c, 8);
10161 static inline __ATTRS_o_ai __vector unsigned short
10162 vec_cmpnrg_idx(__vector unsigned short __a, __vector unsigned short __b,
10163 __vector unsigned short __c) {
10164 return __builtin_s390_vstrch(__a, __b, __c, 8);
10167 static inline __ATTRS_o_ai __vector unsigned int
10168 vec_cmpnrg_idx(__vector unsigned int __a, __vector unsigned int __b,
10169 __vector unsigned int __c) {
10170 return __builtin_s390_vstrcf(__a, __b, __c, 8);
10173 /*-- vec_cmpnrg_idx_cc ------------------------------------------------------*/
10175 static inline __ATTRS_o_ai __vector unsigned char
10176 vec_cmpnrg_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10177 __vector unsigned char __c, int *__cc) {
10178 return __builtin_s390_vstrcbs(__a, __b, __c, 8, __cc);
10181 static inline __ATTRS_o_ai __vector unsigned short
10182 vec_cmpnrg_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10183 __vector unsigned short __c, int *__cc) {
10184 return __builtin_s390_vstrchs(__a, __b, __c, 8, __cc);
10187 static inline __ATTRS_o_ai __vector unsigned int
10188 vec_cmpnrg_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10189 __vector unsigned int __c, int *__cc) {
10190 return __builtin_s390_vstrcfs(__a, __b, __c, 8, __cc);
10193 /*-- vec_cmpnrg_or_0_idx ----------------------------------------------------*/
10195 static inline __ATTRS_o_ai __vector unsigned char
10196 vec_cmpnrg_or_0_idx(__vector unsigned char __a, __vector unsigned char __b,
10197 __vector unsigned char __c) {
10198 return __builtin_s390_vstrczb(__a, __b, __c, 8);
10201 static inline __ATTRS_o_ai __vector unsigned short
10202 vec_cmpnrg_or_0_idx(__vector unsigned short __a, __vector unsigned short __b,
10203 __vector unsigned short __c) {
10204 return __builtin_s390_vstrczh(__a, __b, __c, 8);
10207 static inline __ATTRS_o_ai __vector unsigned int
10208 vec_cmpnrg_or_0_idx(__vector unsigned int __a, __vector unsigned int __b,
10209 __vector unsigned int __c) {
10210 return __builtin_s390_vstrczf(__a, __b, __c, 8);
10213 /*-- vec_cmpnrg_or_0_idx_cc -------------------------------------------------*/
10215 static inline __ATTRS_o_ai __vector unsigned char
10216 vec_cmpnrg_or_0_idx_cc(__vector unsigned char __a,
10217 __vector unsigned char __b,
10218 __vector unsigned char __c, int *__cc) {
10219 return __builtin_s390_vstrczbs(__a, __b, __c, 8, __cc);
10222 static inline __ATTRS_o_ai __vector unsigned short
10223 vec_cmpnrg_or_0_idx_cc(__vector unsigned short __a,
10224 __vector unsigned short __b,
10225 __vector unsigned short __c, int *__cc) {
10226 return __builtin_s390_vstrczhs(__a, __b, __c, 8, __cc);
10229 static inline __ATTRS_o_ai __vector unsigned int
10230 vec_cmpnrg_or_0_idx_cc(__vector unsigned int __a,
10231 __vector unsigned int __b,
10232 __vector unsigned int __c, int *__cc) {
10233 return __builtin_s390_vstrczfs(__a, __b, __c, 8, __cc);
10236 /*-- vec_find_any_eq --------------------------------------------------------*/
10238 static inline __ATTRS_o_ai __vector __bool char
10239 vec_find_any_eq(__vector signed char __a, __vector signed char __b) {
10240 return (__vector __bool char)
10241 __builtin_s390_vfaeb((__vector unsigned char)__a,
10242 (__vector unsigned char)__b, 4);
10245 static inline __ATTRS_o_ai __vector __bool char
10246 vec_find_any_eq(__vector __bool char __a, __vector __bool char __b) {
10247 return (__vector __bool char)
10248 __builtin_s390_vfaeb((__vector unsigned char)__a,
10249 (__vector unsigned char)__b, 4);
10252 static inline __ATTRS_o_ai __vector __bool char
10253 vec_find_any_eq(__vector unsigned char __a, __vector unsigned char __b) {
10254 return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 4);
10257 static inline __ATTRS_o_ai __vector __bool short
10258 vec_find_any_eq(__vector signed short __a, __vector signed short __b) {
10259 return (__vector __bool short)
10260 __builtin_s390_vfaeh((__vector unsigned short)__a,
10261 (__vector unsigned short)__b, 4);
10264 static inline __ATTRS_o_ai __vector __bool short
10265 vec_find_any_eq(__vector __bool short __a, __vector __bool short __b) {
10266 return (__vector __bool short)
10267 __builtin_s390_vfaeh((__vector unsigned short)__a,
10268 (__vector unsigned short)__b, 4);
10271 static inline __ATTRS_o_ai __vector __bool short
10272 vec_find_any_eq(__vector unsigned short __a, __vector unsigned short __b) {
10273 return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 4);
10276 static inline __ATTRS_o_ai __vector __bool int
10277 vec_find_any_eq(__vector signed int __a, __vector signed int __b) {
10278 return (__vector __bool int)
10279 __builtin_s390_vfaef((__vector unsigned int)__a,
10280 (__vector unsigned int)__b, 4);
10283 static inline __ATTRS_o_ai __vector __bool int
10284 vec_find_any_eq(__vector __bool int __a, __vector __bool int __b) {
10285 return (__vector __bool int)
10286 __builtin_s390_vfaef((__vector unsigned int)__a,
10287 (__vector unsigned int)__b, 4);
10290 static inline __ATTRS_o_ai __vector __bool int
10291 vec_find_any_eq(__vector unsigned int __a, __vector unsigned int __b) {
10292 return (__vector __bool int)__builtin_s390_vfaef(__a, __b, 4);
10295 /*-- vec_find_any_eq_cc -----------------------------------------------------*/
10297 static inline __ATTRS_o_ai __vector __bool char
10298 vec_find_any_eq_cc(__vector signed char __a, __vector signed char __b,
10299 int *__cc) {
10300 return (__vector __bool char)
10301 __builtin_s390_vfaebs((__vector unsigned char)__a,
10302 (__vector unsigned char)__b, 4, __cc);
10305 static inline __ATTRS_o_ai __vector __bool char
10306 vec_find_any_eq_cc(__vector __bool char __a, __vector __bool char __b,
10307 int *__cc) {
10308 return (__vector __bool char)
10309 __builtin_s390_vfaebs((__vector unsigned char)__a,
10310 (__vector unsigned char)__b, 4, __cc);
10313 static inline __ATTRS_o_ai __vector __bool char
10314 vec_find_any_eq_cc(__vector unsigned char __a, __vector unsigned char __b,
10315 int *__cc) {
10316 return (__vector __bool char)__builtin_s390_vfaebs(__a, __b, 4, __cc);
10319 static inline __ATTRS_o_ai __vector __bool short
10320 vec_find_any_eq_cc(__vector signed short __a, __vector signed short __b,
10321 int *__cc) {
10322 return (__vector __bool short)
10323 __builtin_s390_vfaehs((__vector unsigned short)__a,
10324 (__vector unsigned short)__b, 4, __cc);
10327 static inline __ATTRS_o_ai __vector __bool short
10328 vec_find_any_eq_cc(__vector __bool short __a, __vector __bool short __b,
10329 int *__cc) {
10330 return (__vector __bool short)
10331 __builtin_s390_vfaehs((__vector unsigned short)__a,
10332 (__vector unsigned short)__b, 4, __cc);
10335 static inline __ATTRS_o_ai __vector __bool short
10336 vec_find_any_eq_cc(__vector unsigned short __a, __vector unsigned short __b,
10337 int *__cc) {
10338 return (__vector __bool short)__builtin_s390_vfaehs(__a, __b, 4, __cc);
10341 static inline __ATTRS_o_ai __vector __bool int
10342 vec_find_any_eq_cc(__vector signed int __a, __vector signed int __b,
10343 int *__cc) {
10344 return (__vector __bool int)
10345 __builtin_s390_vfaefs((__vector unsigned int)__a,
10346 (__vector unsigned int)__b, 4, __cc);
10349 static inline __ATTRS_o_ai __vector __bool int
10350 vec_find_any_eq_cc(__vector __bool int __a, __vector __bool int __b,
10351 int *__cc) {
10352 return (__vector __bool int)
10353 __builtin_s390_vfaefs((__vector unsigned int)__a,
10354 (__vector unsigned int)__b, 4, __cc);
10357 static inline __ATTRS_o_ai __vector __bool int
10358 vec_find_any_eq_cc(__vector unsigned int __a, __vector unsigned int __b,
10359 int *__cc) {
10360 return (__vector __bool int)__builtin_s390_vfaefs(__a, __b, 4, __cc);
10363 /*-- vec_find_any_eq_idx ----------------------------------------------------*/
10365 static inline __ATTRS_o_ai __vector signed char
10366 vec_find_any_eq_idx(__vector signed char __a, __vector signed char __b) {
10367 return (__vector signed char)
10368 __builtin_s390_vfaeb((__vector unsigned char)__a,
10369 (__vector unsigned char)__b, 0);
10372 static inline __ATTRS_o_ai __vector unsigned char
10373 vec_find_any_eq_idx(__vector __bool char __a, __vector __bool char __b) {
10374 return __builtin_s390_vfaeb((__vector unsigned char)__a,
10375 (__vector unsigned char)__b, 0);
10378 static inline __ATTRS_o_ai __vector unsigned char
10379 vec_find_any_eq_idx(__vector unsigned char __a, __vector unsigned char __b) {
10380 return __builtin_s390_vfaeb(__a, __b, 0);
10383 static inline __ATTRS_o_ai __vector signed short
10384 vec_find_any_eq_idx(__vector signed short __a, __vector signed short __b) {
10385 return (__vector signed short)
10386 __builtin_s390_vfaeh((__vector unsigned short)__a,
10387 (__vector unsigned short)__b, 0);
10390 static inline __ATTRS_o_ai __vector unsigned short
10391 vec_find_any_eq_idx(__vector __bool short __a, __vector __bool short __b) {
10392 return __builtin_s390_vfaeh((__vector unsigned short)__a,
10393 (__vector unsigned short)__b, 0);
10396 static inline __ATTRS_o_ai __vector unsigned short
10397 vec_find_any_eq_idx(__vector unsigned short __a, __vector unsigned short __b) {
10398 return __builtin_s390_vfaeh(__a, __b, 0);
10401 static inline __ATTRS_o_ai __vector signed int
10402 vec_find_any_eq_idx(__vector signed int __a, __vector signed int __b) {
10403 return (__vector signed int)
10404 __builtin_s390_vfaef((__vector unsigned int)__a,
10405 (__vector unsigned int)__b, 0);
10408 static inline __ATTRS_o_ai __vector unsigned int
10409 vec_find_any_eq_idx(__vector __bool int __a, __vector __bool int __b) {
10410 return __builtin_s390_vfaef((__vector unsigned int)__a,
10411 (__vector unsigned int)__b, 0);
10414 static inline __ATTRS_o_ai __vector unsigned int
10415 vec_find_any_eq_idx(__vector unsigned int __a, __vector unsigned int __b) {
10416 return __builtin_s390_vfaef(__a, __b, 0);
10419 /*-- vec_find_any_eq_idx_cc -------------------------------------------------*/
10421 static inline __ATTRS_o_ai __vector signed char
10422 vec_find_any_eq_idx_cc(__vector signed char __a,
10423 __vector signed char __b, int *__cc) {
10424 return (__vector signed char)
10425 __builtin_s390_vfaebs((__vector unsigned char)__a,
10426 (__vector unsigned char)__b, 0, __cc);
10429 static inline __ATTRS_o_ai __vector unsigned char
10430 vec_find_any_eq_idx_cc(__vector __bool char __a,
10431 __vector __bool char __b, int *__cc) {
10432 return __builtin_s390_vfaebs((__vector unsigned char)__a,
10433 (__vector unsigned char)__b, 0, __cc);
10436 static inline __ATTRS_o_ai __vector unsigned char
10437 vec_find_any_eq_idx_cc(__vector unsigned char __a,
10438 __vector unsigned char __b, int *__cc) {
10439 return __builtin_s390_vfaebs(__a, __b, 0, __cc);
10442 static inline __ATTRS_o_ai __vector signed short
10443 vec_find_any_eq_idx_cc(__vector signed short __a,
10444 __vector signed short __b, int *__cc) {
10445 return (__vector signed short)
10446 __builtin_s390_vfaehs((__vector unsigned short)__a,
10447 (__vector unsigned short)__b, 0, __cc);
10450 static inline __ATTRS_o_ai __vector unsigned short
10451 vec_find_any_eq_idx_cc(__vector __bool short __a,
10452 __vector __bool short __b, int *__cc) {
10453 return __builtin_s390_vfaehs((__vector unsigned short)__a,
10454 (__vector unsigned short)__b, 0, __cc);
10457 static inline __ATTRS_o_ai __vector unsigned short
10458 vec_find_any_eq_idx_cc(__vector unsigned short __a,
10459 __vector unsigned short __b, int *__cc) {
10460 return __builtin_s390_vfaehs(__a, __b, 0, __cc);
10463 static inline __ATTRS_o_ai __vector signed int
10464 vec_find_any_eq_idx_cc(__vector signed int __a,
10465 __vector signed int __b, int *__cc) {
10466 return (__vector signed int)
10467 __builtin_s390_vfaefs((__vector unsigned int)__a,
10468 (__vector unsigned int)__b, 0, __cc);
10471 static inline __ATTRS_o_ai __vector unsigned int
10472 vec_find_any_eq_idx_cc(__vector __bool int __a,
10473 __vector __bool int __b, int *__cc) {
10474 return __builtin_s390_vfaefs((__vector unsigned int)__a,
10475 (__vector unsigned int)__b, 0, __cc);
10478 static inline __ATTRS_o_ai __vector unsigned int
10479 vec_find_any_eq_idx_cc(__vector unsigned int __a,
10480 __vector unsigned int __b, int *__cc) {
10481 return __builtin_s390_vfaefs(__a, __b, 0, __cc);
10484 /*-- vec_find_any_eq_or_0_idx -----------------------------------------------*/
10486 static inline __ATTRS_o_ai __vector signed char
10487 vec_find_any_eq_or_0_idx(__vector signed char __a,
10488 __vector signed char __b) {
10489 return (__vector signed char)
10490 __builtin_s390_vfaezb((__vector unsigned char)__a,
10491 (__vector unsigned char)__b, 0);
10494 static inline __ATTRS_o_ai __vector unsigned char
10495 vec_find_any_eq_or_0_idx(__vector __bool char __a,
10496 __vector __bool char __b) {
10497 return __builtin_s390_vfaezb((__vector unsigned char)__a,
10498 (__vector unsigned char)__b, 0);
10501 static inline __ATTRS_o_ai __vector unsigned char
10502 vec_find_any_eq_or_0_idx(__vector unsigned char __a,
10503 __vector unsigned char __b) {
10504 return __builtin_s390_vfaezb(__a, __b, 0);
10507 static inline __ATTRS_o_ai __vector signed short
10508 vec_find_any_eq_or_0_idx(__vector signed short __a,
10509 __vector signed short __b) {
10510 return (__vector signed short)
10511 __builtin_s390_vfaezh((__vector unsigned short)__a,
10512 (__vector unsigned short)__b, 0);
10515 static inline __ATTRS_o_ai __vector unsigned short
10516 vec_find_any_eq_or_0_idx(__vector __bool short __a,
10517 __vector __bool short __b) {
10518 return __builtin_s390_vfaezh((__vector unsigned short)__a,
10519 (__vector unsigned short)__b, 0);
10522 static inline __ATTRS_o_ai __vector unsigned short
10523 vec_find_any_eq_or_0_idx(__vector unsigned short __a,
10524 __vector unsigned short __b) {
10525 return __builtin_s390_vfaezh(__a, __b, 0);
10528 static inline __ATTRS_o_ai __vector signed int
10529 vec_find_any_eq_or_0_idx(__vector signed int __a,
10530 __vector signed int __b) {
10531 return (__vector signed int)
10532 __builtin_s390_vfaezf((__vector unsigned int)__a,
10533 (__vector unsigned int)__b, 0);
10536 static inline __ATTRS_o_ai __vector unsigned int
10537 vec_find_any_eq_or_0_idx(__vector __bool int __a,
10538 __vector __bool int __b) {
10539 return __builtin_s390_vfaezf((__vector unsigned int)__a,
10540 (__vector unsigned int)__b, 0);
10543 static inline __ATTRS_o_ai __vector unsigned int
10544 vec_find_any_eq_or_0_idx(__vector unsigned int __a,
10545 __vector unsigned int __b) {
10546 return __builtin_s390_vfaezf(__a, __b, 0);
10549 /*-- vec_find_any_eq_or_0_idx_cc --------------------------------------------*/
10551 static inline __ATTRS_o_ai __vector signed char
10552 vec_find_any_eq_or_0_idx_cc(__vector signed char __a,
10553 __vector signed char __b, int *__cc) {
10554 return (__vector signed char)
10555 __builtin_s390_vfaezbs((__vector unsigned char)__a,
10556 (__vector unsigned char)__b, 0, __cc);
10559 static inline __ATTRS_o_ai __vector unsigned char
10560 vec_find_any_eq_or_0_idx_cc(__vector __bool char __a,
10561 __vector __bool char __b, int *__cc) {
10562 return __builtin_s390_vfaezbs((__vector unsigned char)__a,
10563 (__vector unsigned char)__b, 0, __cc);
10566 static inline __ATTRS_o_ai __vector unsigned char
10567 vec_find_any_eq_or_0_idx_cc(__vector unsigned char __a,
10568 __vector unsigned char __b, int *__cc) {
10569 return __builtin_s390_vfaezbs(__a, __b, 0, __cc);
10572 static inline __ATTRS_o_ai __vector signed short
10573 vec_find_any_eq_or_0_idx_cc(__vector signed short __a,
10574 __vector signed short __b, int *__cc) {
10575 return (__vector signed short)
10576 __builtin_s390_vfaezhs((__vector unsigned short)__a,
10577 (__vector unsigned short)__b, 0, __cc);
10580 static inline __ATTRS_o_ai __vector unsigned short
10581 vec_find_any_eq_or_0_idx_cc(__vector __bool short __a,
10582 __vector __bool short __b, int *__cc) {
10583 return __builtin_s390_vfaezhs((__vector unsigned short)__a,
10584 (__vector unsigned short)__b, 0, __cc);
10587 static inline __ATTRS_o_ai __vector unsigned short
10588 vec_find_any_eq_or_0_idx_cc(__vector unsigned short __a,
10589 __vector unsigned short __b, int *__cc) {
10590 return __builtin_s390_vfaezhs(__a, __b, 0, __cc);
10593 static inline __ATTRS_o_ai __vector signed int
10594 vec_find_any_eq_or_0_idx_cc(__vector signed int __a,
10595 __vector signed int __b, int *__cc) {
10596 return (__vector signed int)
10597 __builtin_s390_vfaezfs((__vector unsigned int)__a,
10598 (__vector unsigned int)__b, 0, __cc);
10601 static inline __ATTRS_o_ai __vector unsigned int
10602 vec_find_any_eq_or_0_idx_cc(__vector __bool int __a,
10603 __vector __bool int __b, int *__cc) {
10604 return __builtin_s390_vfaezfs((__vector unsigned int)__a,
10605 (__vector unsigned int)__b, 0, __cc);
10608 static inline __ATTRS_o_ai __vector unsigned int
10609 vec_find_any_eq_or_0_idx_cc(__vector unsigned int __a,
10610 __vector unsigned int __b, int *__cc) {
10611 return __builtin_s390_vfaezfs(__a, __b, 0, __cc);
10614 /*-- vec_find_any_ne --------------------------------------------------------*/
10616 static inline __ATTRS_o_ai __vector __bool char
10617 vec_find_any_ne(__vector signed char __a, __vector signed char __b) {
10618 return (__vector __bool char)
10619 __builtin_s390_vfaeb((__vector unsigned char)__a,
10620 (__vector unsigned char)__b, 12);
10623 static inline __ATTRS_o_ai __vector __bool char
10624 vec_find_any_ne(__vector __bool char __a, __vector __bool char __b) {
10625 return (__vector __bool char)
10626 __builtin_s390_vfaeb((__vector unsigned char)__a,
10627 (__vector unsigned char)__b, 12);
10630 static inline __ATTRS_o_ai __vector __bool char
10631 vec_find_any_ne(__vector unsigned char __a, __vector unsigned char __b) {
10632 return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 12);
10635 static inline __ATTRS_o_ai __vector __bool short
10636 vec_find_any_ne(__vector signed short __a, __vector signed short __b) {
10637 return (__vector __bool short)
10638 __builtin_s390_vfaeh((__vector unsigned short)__a,
10639 (__vector unsigned short)__b, 12);
10642 static inline __ATTRS_o_ai __vector __bool short
10643 vec_find_any_ne(__vector __bool short __a, __vector __bool short __b) {
10644 return (__vector __bool short)
10645 __builtin_s390_vfaeh((__vector unsigned short)__a,
10646 (__vector unsigned short)__b, 12);
10649 static inline __ATTRS_o_ai __vector __bool short
10650 vec_find_any_ne(__vector unsigned short __a, __vector unsigned short __b) {
10651 return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 12);
10654 static inline __ATTRS_o_ai __vector __bool int
10655 vec_find_any_ne(__vector signed int __a, __vector signed int __b) {
10656 return (__vector __bool int)
10657 __builtin_s390_vfaef((__vector unsigned int)__a,
10658 (__vector unsigned int)__b, 12);
10661 static inline __ATTRS_o_ai __vector __bool int
10662 vec_find_any_ne(__vector __bool int __a, __vector __bool int __b) {
10663 return (__vector __bool int)
10664 __builtin_s390_vfaef((__vector unsigned int)__a,
10665 (__vector unsigned int)__b, 12);
10668 static inline __ATTRS_o_ai __vector __bool int
10669 vec_find_any_ne(__vector unsigned int __a, __vector unsigned int __b) {
10670 return (__vector __bool int)__builtin_s390_vfaef(__a, __b, 12);
10673 /*-- vec_find_any_ne_cc -----------------------------------------------------*/
10675 static inline __ATTRS_o_ai __vector __bool char
10676 vec_find_any_ne_cc(__vector signed char __a,
10677 __vector signed char __b, int *__cc) {
10678 return (__vector __bool char)
10679 __builtin_s390_vfaebs((__vector unsigned char)__a,
10680 (__vector unsigned char)__b, 12, __cc);
10683 static inline __ATTRS_o_ai __vector __bool char
10684 vec_find_any_ne_cc(__vector __bool char __a,
10685 __vector __bool char __b, int *__cc) {
10686 return (__vector __bool char)
10687 __builtin_s390_vfaebs((__vector unsigned char)__a,
10688 (__vector unsigned char)__b, 12, __cc);
10691 static inline __ATTRS_o_ai __vector __bool char
10692 vec_find_any_ne_cc(__vector unsigned char __a,
10693 __vector unsigned char __b, int *__cc) {
10694 return (__vector __bool char)__builtin_s390_vfaebs(__a, __b, 12, __cc);
10697 static inline __ATTRS_o_ai __vector __bool short
10698 vec_find_any_ne_cc(__vector signed short __a,
10699 __vector signed short __b, int *__cc) {
10700 return (__vector __bool short)
10701 __builtin_s390_vfaehs((__vector unsigned short)__a,
10702 (__vector unsigned short)__b, 12, __cc);
10705 static inline __ATTRS_o_ai __vector __bool short
10706 vec_find_any_ne_cc(__vector __bool short __a,
10707 __vector __bool short __b, int *__cc) {
10708 return (__vector __bool short)
10709 __builtin_s390_vfaehs((__vector unsigned short)__a,
10710 (__vector unsigned short)__b, 12, __cc);
10713 static inline __ATTRS_o_ai __vector __bool short
10714 vec_find_any_ne_cc(__vector unsigned short __a,
10715 __vector unsigned short __b, int *__cc) {
10716 return (__vector __bool short)__builtin_s390_vfaehs(__a, __b, 12, __cc);
10719 static inline __ATTRS_o_ai __vector __bool int
10720 vec_find_any_ne_cc(__vector signed int __a,
10721 __vector signed int __b, int *__cc) {
10722 return (__vector __bool int)
10723 __builtin_s390_vfaefs((__vector unsigned int)__a,
10724 (__vector unsigned int)__b, 12, __cc);
10727 static inline __ATTRS_o_ai __vector __bool int
10728 vec_find_any_ne_cc(__vector __bool int __a,
10729 __vector __bool int __b, int *__cc) {
10730 return (__vector __bool int)
10731 __builtin_s390_vfaefs((__vector unsigned int)__a,
10732 (__vector unsigned int)__b, 12, __cc);
10735 static inline __ATTRS_o_ai __vector __bool int
10736 vec_find_any_ne_cc(__vector unsigned int __a,
10737 __vector unsigned int __b, int *__cc) {
10738 return (__vector __bool int)__builtin_s390_vfaefs(__a, __b, 12, __cc);
10741 /*-- vec_find_any_ne_idx ----------------------------------------------------*/
10743 static inline __ATTRS_o_ai __vector signed char
10744 vec_find_any_ne_idx(__vector signed char __a, __vector signed char __b) {
10745 return (__vector signed char)
10746 __builtin_s390_vfaeb((__vector unsigned char)__a,
10747 (__vector unsigned char)__b, 8);
10750 static inline __ATTRS_o_ai __vector unsigned char
10751 vec_find_any_ne_idx(__vector __bool char __a, __vector __bool char __b) {
10752 return __builtin_s390_vfaeb((__vector unsigned char)__a,
10753 (__vector unsigned char)__b, 8);
10756 static inline __ATTRS_o_ai __vector unsigned char
10757 vec_find_any_ne_idx(__vector unsigned char __a, __vector unsigned char __b) {
10758 return __builtin_s390_vfaeb(__a, __b, 8);
10761 static inline __ATTRS_o_ai __vector signed short
10762 vec_find_any_ne_idx(__vector signed short __a, __vector signed short __b) {
10763 return (__vector signed short)
10764 __builtin_s390_vfaeh((__vector unsigned short)__a,
10765 (__vector unsigned short)__b, 8);
10768 static inline __ATTRS_o_ai __vector unsigned short
10769 vec_find_any_ne_idx(__vector __bool short __a, __vector __bool short __b) {
10770 return __builtin_s390_vfaeh((__vector unsigned short)__a,
10771 (__vector unsigned short)__b, 8);
10774 static inline __ATTRS_o_ai __vector unsigned short
10775 vec_find_any_ne_idx(__vector unsigned short __a, __vector unsigned short __b) {
10776 return __builtin_s390_vfaeh(__a, __b, 8);
10779 static inline __ATTRS_o_ai __vector signed int
10780 vec_find_any_ne_idx(__vector signed int __a, __vector signed int __b) {
10781 return (__vector signed int)
10782 __builtin_s390_vfaef((__vector unsigned int)__a,
10783 (__vector unsigned int)__b, 8);
10786 static inline __ATTRS_o_ai __vector unsigned int
10787 vec_find_any_ne_idx(__vector __bool int __a, __vector __bool int __b) {
10788 return __builtin_s390_vfaef((__vector unsigned int)__a,
10789 (__vector unsigned int)__b, 8);
10792 static inline __ATTRS_o_ai __vector unsigned int
10793 vec_find_any_ne_idx(__vector unsigned int __a, __vector unsigned int __b) {
10794 return __builtin_s390_vfaef(__a, __b, 8);
10797 /*-- vec_find_any_ne_idx_cc -------------------------------------------------*/
10799 static inline __ATTRS_o_ai __vector signed char
10800 vec_find_any_ne_idx_cc(__vector signed char __a,
10801 __vector signed char __b, int *__cc) {
10802 return (__vector signed char)
10803 __builtin_s390_vfaebs((__vector unsigned char)__a,
10804 (__vector unsigned char)__b, 8, __cc);
10807 static inline __ATTRS_o_ai __vector unsigned char
10808 vec_find_any_ne_idx_cc(__vector __bool char __a,
10809 __vector __bool char __b, int *__cc) {
10810 return __builtin_s390_vfaebs((__vector unsigned char)__a,
10811 (__vector unsigned char)__b, 8, __cc);
10814 static inline __ATTRS_o_ai __vector unsigned char
10815 vec_find_any_ne_idx_cc(__vector unsigned char __a,
10816 __vector unsigned char __b,
10817 int *__cc) {
10818 return __builtin_s390_vfaebs(__a, __b, 8, __cc);
10821 static inline __ATTRS_o_ai __vector signed short
10822 vec_find_any_ne_idx_cc(__vector signed short __a,
10823 __vector signed short __b, int *__cc) {
10824 return (__vector signed short)
10825 __builtin_s390_vfaehs((__vector unsigned short)__a,
10826 (__vector unsigned short)__b, 8, __cc);
10829 static inline __ATTRS_o_ai __vector unsigned short
10830 vec_find_any_ne_idx_cc(__vector __bool short __a,
10831 __vector __bool short __b, int *__cc) {
10832 return __builtin_s390_vfaehs((__vector unsigned short)__a,
10833 (__vector unsigned short)__b, 8, __cc);
10836 static inline __ATTRS_o_ai __vector unsigned short
10837 vec_find_any_ne_idx_cc(__vector unsigned short __a,
10838 __vector unsigned short __b, int *__cc) {
10839 return __builtin_s390_vfaehs(__a, __b, 8, __cc);
10842 static inline __ATTRS_o_ai __vector signed int
10843 vec_find_any_ne_idx_cc(__vector signed int __a,
10844 __vector signed int __b, int *__cc) {
10845 return (__vector signed int)
10846 __builtin_s390_vfaefs((__vector unsigned int)__a,
10847 (__vector unsigned int)__b, 8, __cc);
10850 static inline __ATTRS_o_ai __vector unsigned int
10851 vec_find_any_ne_idx_cc(__vector __bool int __a,
10852 __vector __bool int __b, int *__cc) {
10853 return __builtin_s390_vfaefs((__vector unsigned int)__a,
10854 (__vector unsigned int)__b, 8, __cc);
10857 static inline __ATTRS_o_ai __vector unsigned int
10858 vec_find_any_ne_idx_cc(__vector unsigned int __a,
10859 __vector unsigned int __b, int *__cc) {
10860 return __builtin_s390_vfaefs(__a, __b, 8, __cc);
10863 /*-- vec_find_any_ne_or_0_idx -----------------------------------------------*/
10865 static inline __ATTRS_o_ai __vector signed char
10866 vec_find_any_ne_or_0_idx(__vector signed char __a,
10867 __vector signed char __b) {
10868 return (__vector signed char)
10869 __builtin_s390_vfaezb((__vector unsigned char)__a,
10870 (__vector unsigned char)__b, 8);
10873 static inline __ATTRS_o_ai __vector unsigned char
10874 vec_find_any_ne_or_0_idx(__vector __bool char __a,
10875 __vector __bool char __b) {
10876 return __builtin_s390_vfaezb((__vector unsigned char)__a,
10877 (__vector unsigned char)__b, 8);
10880 static inline __ATTRS_o_ai __vector unsigned char
10881 vec_find_any_ne_or_0_idx(__vector unsigned char __a,
10882 __vector unsigned char __b) {
10883 return __builtin_s390_vfaezb(__a, __b, 8);
10886 static inline __ATTRS_o_ai __vector signed short
10887 vec_find_any_ne_or_0_idx(__vector signed short __a,
10888 __vector signed short __b) {
10889 return (__vector signed short)
10890 __builtin_s390_vfaezh((__vector unsigned short)__a,
10891 (__vector unsigned short)__b, 8);
10894 static inline __ATTRS_o_ai __vector unsigned short
10895 vec_find_any_ne_or_0_idx(__vector __bool short __a,
10896 __vector __bool short __b) {
10897 return __builtin_s390_vfaezh((__vector unsigned short)__a,
10898 (__vector unsigned short)__b, 8);
10901 static inline __ATTRS_o_ai __vector unsigned short
10902 vec_find_any_ne_or_0_idx(__vector unsigned short __a,
10903 __vector unsigned short __b) {
10904 return __builtin_s390_vfaezh(__a, __b, 8);
10907 static inline __ATTRS_o_ai __vector signed int
10908 vec_find_any_ne_or_0_idx(__vector signed int __a,
10909 __vector signed int __b) {
10910 return (__vector signed int)
10911 __builtin_s390_vfaezf((__vector unsigned int)__a,
10912 (__vector unsigned int)__b, 8);
10915 static inline __ATTRS_o_ai __vector unsigned int
10916 vec_find_any_ne_or_0_idx(__vector __bool int __a,
10917 __vector __bool int __b) {
10918 return __builtin_s390_vfaezf((__vector unsigned int)__a,
10919 (__vector unsigned int)__b, 8);
10922 static inline __ATTRS_o_ai __vector unsigned int
10923 vec_find_any_ne_or_0_idx(__vector unsigned int __a,
10924 __vector unsigned int __b) {
10925 return __builtin_s390_vfaezf(__a, __b, 8);
10928 /*-- vec_find_any_ne_or_0_idx_cc --------------------------------------------*/
10930 static inline __ATTRS_o_ai __vector signed char
10931 vec_find_any_ne_or_0_idx_cc(__vector signed char __a,
10932 __vector signed char __b, int *__cc) {
10933 return (__vector signed char)
10934 __builtin_s390_vfaezbs((__vector unsigned char)__a,
10935 (__vector unsigned char)__b, 8, __cc);
10938 static inline __ATTRS_o_ai __vector unsigned char
10939 vec_find_any_ne_or_0_idx_cc(__vector __bool char __a,
10940 __vector __bool char __b, int *__cc) {
10941 return __builtin_s390_vfaezbs((__vector unsigned char)__a,
10942 (__vector unsigned char)__b, 8, __cc);
10945 static inline __ATTRS_o_ai __vector unsigned char
10946 vec_find_any_ne_or_0_idx_cc(__vector unsigned char __a,
10947 __vector unsigned char __b, int *__cc) {
10948 return __builtin_s390_vfaezbs(__a, __b, 8, __cc);
10951 static inline __ATTRS_o_ai __vector signed short
10952 vec_find_any_ne_or_0_idx_cc(__vector signed short __a,
10953 __vector signed short __b, int *__cc) {
10954 return (__vector signed short)
10955 __builtin_s390_vfaezhs((__vector unsigned short)__a,
10956 (__vector unsigned short)__b, 8, __cc);
10959 static inline __ATTRS_o_ai __vector unsigned short
10960 vec_find_any_ne_or_0_idx_cc(__vector __bool short __a,
10961 __vector __bool short __b, int *__cc) {
10962 return __builtin_s390_vfaezhs((__vector unsigned short)__a,
10963 (__vector unsigned short)__b, 8, __cc);
10966 static inline __ATTRS_o_ai __vector unsigned short
10967 vec_find_any_ne_or_0_idx_cc(__vector unsigned short __a,
10968 __vector unsigned short __b, int *__cc) {
10969 return __builtin_s390_vfaezhs(__a, __b, 8, __cc);
10972 static inline __ATTRS_o_ai __vector signed int
10973 vec_find_any_ne_or_0_idx_cc(__vector signed int __a,
10974 __vector signed int __b, int *__cc) {
10975 return (__vector signed int)
10976 __builtin_s390_vfaezfs((__vector unsigned int)__a,
10977 (__vector unsigned int)__b, 8, __cc);
10980 static inline __ATTRS_o_ai __vector unsigned int
10981 vec_find_any_ne_or_0_idx_cc(__vector __bool int __a,
10982 __vector __bool int __b, int *__cc) {
10983 return __builtin_s390_vfaezfs((__vector unsigned int)__a,
10984 (__vector unsigned int)__b, 8, __cc);
10987 static inline __ATTRS_o_ai __vector unsigned int
10988 vec_find_any_ne_or_0_idx_cc(__vector unsigned int __a,
10989 __vector unsigned int __b, int *__cc) {
10990 return __builtin_s390_vfaezfs(__a, __b, 8, __cc);
10993 /*-- vec_search_string_cc ---------------------------------------------------*/
10995 #if __ARCH__ >= 13
10997 static inline __ATTRS_o_ai __vector unsigned char
10998 vec_search_string_cc(__vector signed char __a, __vector signed char __b,
10999 __vector unsigned char __c, int *__cc) {
11000 return __builtin_s390_vstrsb((__vector unsigned char)__a,
11001 (__vector unsigned char)__b, __c, __cc);
11004 static inline __ATTRS_o_ai __vector unsigned char
11005 vec_search_string_cc(__vector __bool char __a, __vector __bool char __b,
11006 __vector unsigned char __c, int *__cc) {
11007 return __builtin_s390_vstrsb((__vector unsigned char)__a,
11008 (__vector unsigned char)__b, __c, __cc);
11011 static inline __ATTRS_o_ai __vector unsigned char
11012 vec_search_string_cc(__vector unsigned char __a, __vector unsigned char __b,
11013 __vector unsigned char __c, int *__cc) {
11014 return __builtin_s390_vstrsb(__a, __b, __c, __cc);
11017 static inline __ATTRS_o_ai __vector unsigned char
11018 vec_search_string_cc(__vector signed short __a, __vector signed short __b,
11019 __vector unsigned char __c, int *__cc) {
11020 return __builtin_s390_vstrsh((__vector unsigned short)__a,
11021 (__vector unsigned short)__b, __c, __cc);
11024 static inline __ATTRS_o_ai __vector unsigned char
11025 vec_search_string_cc(__vector __bool short __a, __vector __bool short __b,
11026 __vector unsigned char __c, int *__cc) {
11027 return __builtin_s390_vstrsh((__vector unsigned short)__a,
11028 (__vector unsigned short)__b, __c, __cc);
11031 static inline __ATTRS_o_ai __vector unsigned char
11032 vec_search_string_cc(__vector unsigned short __a, __vector unsigned short __b,
11033 __vector unsigned char __c, int *__cc) {
11034 return __builtin_s390_vstrsh(__a, __b, __c, __cc);
11037 static inline __ATTRS_o_ai __vector unsigned char
11038 vec_search_string_cc(__vector signed int __a, __vector signed int __b,
11039 __vector unsigned char __c, int *__cc) {
11040 return __builtin_s390_vstrsf((__vector unsigned int)__a,
11041 (__vector unsigned int)__b, __c, __cc);
11044 static inline __ATTRS_o_ai __vector unsigned char
11045 vec_search_string_cc(__vector __bool int __a, __vector __bool int __b,
11046 __vector unsigned char __c, int *__cc) {
11047 return __builtin_s390_vstrsf((__vector unsigned int)__a,
11048 (__vector unsigned int)__b, __c, __cc);
11051 static inline __ATTRS_o_ai __vector unsigned char
11052 vec_search_string_cc(__vector unsigned int __a, __vector unsigned int __b,
11053 __vector unsigned char __c, int *__cc) {
11054 return __builtin_s390_vstrsf(__a, __b, __c, __cc);
11057 #endif
11059 /*-- vec_search_string_until_zero_cc ----------------------------------------*/
11061 #if __ARCH__ >= 13
11063 static inline __ATTRS_o_ai __vector unsigned char
11064 vec_search_string_until_zero_cc(__vector signed char __a,
11065 __vector signed char __b,
11066 __vector unsigned char __c, int *__cc) {
11067 return __builtin_s390_vstrszb((__vector unsigned char)__a,
11068 (__vector unsigned char)__b, __c, __cc);
11071 static inline __ATTRS_o_ai __vector unsigned char
11072 vec_search_string_until_zero_cc(__vector __bool char __a,
11073 __vector __bool char __b,
11074 __vector unsigned char __c, int *__cc) {
11075 return __builtin_s390_vstrszb((__vector unsigned char)__a,
11076 (__vector unsigned char)__b, __c, __cc);
11079 static inline __ATTRS_o_ai __vector unsigned char
11080 vec_search_string_until_zero_cc(__vector unsigned char __a,
11081 __vector unsigned char __b,
11082 __vector unsigned char __c, int *__cc) {
11083 return __builtin_s390_vstrszb(__a, __b, __c, __cc);
11086 static inline __ATTRS_o_ai __vector unsigned char
11087 vec_search_string_until_zero_cc(__vector signed short __a,
11088 __vector signed short __b,
11089 __vector unsigned char __c, int *__cc) {
11090 return __builtin_s390_vstrszh((__vector unsigned short)__a,
11091 (__vector unsigned short)__b, __c, __cc);
11094 static inline __ATTRS_o_ai __vector unsigned char
11095 vec_search_string_until_zero_cc(__vector __bool short __a,
11096 __vector __bool short __b,
11097 __vector unsigned char __c, int *__cc) {
11098 return __builtin_s390_vstrszh((__vector unsigned short)__a,
11099 (__vector unsigned short)__b, __c, __cc);
11102 static inline __ATTRS_o_ai __vector unsigned char
11103 vec_search_string_until_zero_cc(__vector unsigned short __a,
11104 __vector unsigned short __b,
11105 __vector unsigned char __c, int *__cc) {
11106 return __builtin_s390_vstrszh(__a, __b, __c, __cc);
11109 static inline __ATTRS_o_ai __vector unsigned char
11110 vec_search_string_until_zero_cc(__vector signed int __a,
11111 __vector signed int __b,
11112 __vector unsigned char __c, int *__cc) {
11113 return __builtin_s390_vstrszf((__vector unsigned int)__a,
11114 (__vector unsigned int)__b, __c, __cc);
11117 static inline __ATTRS_o_ai __vector unsigned char
11118 vec_search_string_until_zero_cc(__vector __bool int __a,
11119 __vector __bool int __b,
11120 __vector unsigned char __c, int *__cc) {
11121 return __builtin_s390_vstrszf((__vector unsigned int)__a,
11122 (__vector unsigned int)__b, __c, __cc);
11125 static inline __ATTRS_o_ai __vector unsigned char
11126 vec_search_string_until_zero_cc(__vector unsigned int __a,
11127 __vector unsigned int __b,
11128 __vector unsigned char __c, int *__cc) {
11129 return __builtin_s390_vstrszf(__a, __b, __c, __cc);
11132 #endif
11134 #undef __constant_pow2_range
11135 #undef __constant_range
11136 #undef __constant
11137 #undef __ATTRS_o
11138 #undef __ATTRS_o_ai
11139 #undef __ATTRS_ai
11141 #else
11143 #error "Use -fzvector to enable vector extensions"
11145 #endif