blob: ec1dbfd015f6ef4d20fe344afb870409bfa6fba6 [file] [log] [blame]
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001/*===---- vecintrin.h - Vector intrinsics ----------------------------------===
2 *
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
6 *
7 *===-----------------------------------------------------------------------===
8 */
9
10#if defined(__s390x__) && defined(__VEC__)
11
12#define __ATTRS_ai __attribute__((__always_inline__))
13#define __ATTRS_o __attribute__((__overloadable__))
14#define __ATTRS_o_ai __attribute__((__overloadable__, __always_inline__))
15
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)))
26
27/*-- __lcbb -----------------------------------------------------------------*/
28
29extern __ATTRS_o unsigned int
30__lcbb(const void *__ptr, unsigned short __len)
31 __constant_pow2_range(__len, 64, 4096);
32
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))
42
43/*-- vec_extract ------------------------------------------------------------*/
44
45static inline __ATTRS_o_ai signed char
46vec_extract(__vector signed char __vec, int __index) {
47 return __vec[__index & 15];
48}
49
50static inline __ATTRS_o_ai unsigned char
51vec_extract(__vector __bool char __vec, int __index) {
52 return __vec[__index & 15];
53}
54
55static inline __ATTRS_o_ai unsigned char
56vec_extract(__vector unsigned char __vec, int __index) {
57 return __vec[__index & 15];
58}
59
60static inline __ATTRS_o_ai signed short
61vec_extract(__vector signed short __vec, int __index) {
62 return __vec[__index & 7];
63}
64
65static inline __ATTRS_o_ai unsigned short
66vec_extract(__vector __bool short __vec, int __index) {
67 return __vec[__index & 7];
68}
69
70static inline __ATTRS_o_ai unsigned short
71vec_extract(__vector unsigned short __vec, int __index) {
72 return __vec[__index & 7];
73}
74
75static inline __ATTRS_o_ai signed int
76vec_extract(__vector signed int __vec, int __index) {
77 return __vec[__index & 3];
78}
79
80static inline __ATTRS_o_ai unsigned int
81vec_extract(__vector __bool int __vec, int __index) {
82 return __vec[__index & 3];
83}
84
85static inline __ATTRS_o_ai unsigned int
86vec_extract(__vector unsigned int __vec, int __index) {
87 return __vec[__index & 3];
88}
89
90static inline __ATTRS_o_ai signed long long
91vec_extract(__vector signed long long __vec, int __index) {
92 return __vec[__index & 1];
93}
94
95static inline __ATTRS_o_ai unsigned long long
96vec_extract(__vector __bool long long __vec, int __index) {
97 return __vec[__index & 1];
98}
99
100static inline __ATTRS_o_ai unsigned long long
101vec_extract(__vector unsigned long long __vec, int __index) {
102 return __vec[__index & 1];
103}
104
105#if __ARCH__ >= 12
106static inline __ATTRS_o_ai float
107vec_extract(__vector float __vec, int __index) {
108 return __vec[__index & 3];
109}
110#endif
111
112static inline __ATTRS_o_ai double
113vec_extract(__vector double __vec, int __index) {
114 return __vec[__index & 1];
115}
116
117/*-- vec_insert -------------------------------------------------------------*/
118
119static inline __ATTRS_o_ai __vector signed char
120vec_insert(signed char __scalar, __vector signed char __vec, int __index) {
121 __vec[__index & 15] = __scalar;
122 return __vec;
123}
124
125// This prototype is deprecated.
126static inline __ATTRS_o_ai __vector unsigned char
127vec_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;
131}
132
133static inline __ATTRS_o_ai __vector unsigned char
134vec_insert(unsigned char __scalar, __vector unsigned char __vec, int __index) {
135 __vec[__index & 15] = __scalar;
136 return __vec;
137}
138
139static inline __ATTRS_o_ai __vector signed short
140vec_insert(signed short __scalar, __vector signed short __vec, int __index) {
141 __vec[__index & 7] = __scalar;
142 return __vec;
143}
144
145// This prototype is deprecated.
146static inline __ATTRS_o_ai __vector unsigned short
147vec_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;
152}
153
154static inline __ATTRS_o_ai __vector unsigned short
155vec_insert(unsigned short __scalar, __vector unsigned short __vec,
156 int __index) {
157 __vec[__index & 7] = __scalar;
158 return __vec;
159}
160
161static inline __ATTRS_o_ai __vector signed int
162vec_insert(signed int __scalar, __vector signed int __vec, int __index) {
163 __vec[__index & 3] = __scalar;
164 return __vec;
165}
166
167// This prototype is deprecated.
168static inline __ATTRS_o_ai __vector unsigned int
169vec_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;
173}
174
175static inline __ATTRS_o_ai __vector unsigned int
176vec_insert(unsigned int __scalar, __vector unsigned int __vec, int __index) {
177 __vec[__index & 3] = __scalar;
178 return __vec;
179}
180
181static inline __ATTRS_o_ai __vector signed long long
182vec_insert(signed long long __scalar, __vector signed long long __vec,
183 int __index) {
184 __vec[__index & 1] = __scalar;
185 return __vec;
186}
187
188// This prototype is deprecated.
189static inline __ATTRS_o_ai __vector unsigned long long
190vec_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;
195}
196
197static inline __ATTRS_o_ai __vector unsigned long long
198vec_insert(unsigned long long __scalar, __vector unsigned long long __vec,
199 int __index) {
200 __vec[__index & 1] = __scalar;
201 return __vec;
202}
203
204#if __ARCH__ >= 12
205static inline __ATTRS_o_ai __vector float
206vec_insert(float __scalar, __vector float __vec, int __index) {
207 __vec[__index & 1] = __scalar;
208 return __vec;
209}
210#endif
211
212static inline __ATTRS_o_ai __vector double
213vec_insert(double __scalar, __vector double __vec, int __index) {
214 __vec[__index & 1] = __scalar;
215 return __vec;
216}
217
218/*-- vec_promote ------------------------------------------------------------*/
219
220static inline __ATTRS_o_ai __vector signed char
221vec_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;
227}
228
229static inline __ATTRS_o_ai __vector unsigned char
230vec_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;
236}
237
238static inline __ATTRS_o_ai __vector signed short
239vec_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;
245}
246
247static inline __ATTRS_o_ai __vector unsigned short
248vec_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;
254}
255
256static inline __ATTRS_o_ai __vector signed int
257vec_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;
263}
264
265static inline __ATTRS_o_ai __vector unsigned int
266vec_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;
272}
273
274static inline __ATTRS_o_ai __vector signed long long
275vec_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;
281}
282
283static inline __ATTRS_o_ai __vector unsigned long long
284vec_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;
290}
291
292#if __ARCH__ >= 12
293static inline __ATTRS_o_ai __vector float
294vec_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;
300}
301#endif
302
303static inline __ATTRS_o_ai __vector double
304vec_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;
309}
310
311/*-- vec_insert_and_zero ----------------------------------------------------*/
312
313static inline __ATTRS_o_ai __vector signed char
314vec_insert_and_zero(const signed char *__ptr) {
315 __vector signed char __vec = (__vector signed char)0;
316 __vec[7] = *__ptr;
317 return __vec;
318}
319
320static inline __ATTRS_o_ai __vector unsigned char
321vec_insert_and_zero(const unsigned char *__ptr) {
322 __vector unsigned char __vec = (__vector unsigned char)0;
323 __vec[7] = *__ptr;
324 return __vec;
325}
326
327static inline __ATTRS_o_ai __vector signed short
328vec_insert_and_zero(const signed short *__ptr) {
329 __vector signed short __vec = (__vector signed short)0;
330 __vec[3] = *__ptr;
331 return __vec;
332}
333
334static inline __ATTRS_o_ai __vector unsigned short
335vec_insert_and_zero(const unsigned short *__ptr) {
336 __vector unsigned short __vec = (__vector unsigned short)0;
337 __vec[3] = *__ptr;
338 return __vec;
339}
340
341static inline __ATTRS_o_ai __vector signed int
342vec_insert_and_zero(const signed int *__ptr) {
343 __vector signed int __vec = (__vector signed int)0;
344 __vec[1] = *__ptr;
345 return __vec;
346}
347
348static inline __ATTRS_o_ai __vector unsigned int
349vec_insert_and_zero(const unsigned int *__ptr) {
350 __vector unsigned int __vec = (__vector unsigned int)0;
351 __vec[1] = *__ptr;
352 return __vec;
353}
354
355static inline __ATTRS_o_ai __vector signed long long
356vec_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;
360}
361
362static inline __ATTRS_o_ai __vector unsigned long long
363vec_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;
367}
368
369#if __ARCH__ >= 12
370static inline __ATTRS_o_ai __vector float
371vec_insert_and_zero(const float *__ptr) {
372 __vector float __vec = (__vector float)0.0f;
373 __vec[1] = *__ptr;
374 return __vec;
375}
376#endif
377
378static inline __ATTRS_o_ai __vector double
379vec_insert_and_zero(const double *__ptr) {
380 __vector double __vec = (__vector double)0.0;
381 __vec[0] = *__ptr;
382 return __vec;
383}
384
385/*-- vec_perm ---------------------------------------------------------------*/
386
387static inline __ATTRS_o_ai __vector signed char
388vec_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);
392}
393
394static inline __ATTRS_o_ai __vector unsigned char
395vec_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);
399}
400
401static inline __ATTRS_o_ai __vector __bool char
402vec_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);
406}
407
408static inline __ATTRS_o_ai __vector signed short
409vec_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);
413}
414
415static inline __ATTRS_o_ai __vector unsigned short
416vec_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);
420}
421
422static inline __ATTRS_o_ai __vector __bool short
423vec_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);
427}
428
429static inline __ATTRS_o_ai __vector signed int
430vec_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);
434}
435
436static inline __ATTRS_o_ai __vector unsigned int
437vec_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);
441}
442
443static inline __ATTRS_o_ai __vector __bool int
444vec_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);
448}
449
450static inline __ATTRS_o_ai __vector signed long long
451vec_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);
455}
456
457static inline __ATTRS_o_ai __vector unsigned long long
458vec_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);
462}
463
464static inline __ATTRS_o_ai __vector __bool long long
465vec_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);
469}
470
471#if __ARCH__ >= 12
472static inline __ATTRS_o_ai __vector float
473vec_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);
477}
478#endif
479
480static inline __ATTRS_o_ai __vector double
481vec_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);
485}
486
487/*-- vec_permi --------------------------------------------------------------*/
488
489// This prototype is deprecated.
490extern __ATTRS_o __vector signed long long
491vec_permi(__vector signed long long __a, __vector signed long long __b,
492 int __c)
493 __constant_range(__c, 0, 3);
494
495// This prototype is deprecated.
496extern __ATTRS_o __vector unsigned long long
497vec_permi(__vector unsigned long long __a, __vector unsigned long long __b,
498 int __c)
499 __constant_range(__c, 0, 3);
500
501// This prototype is deprecated.
502extern __ATTRS_o __vector __bool long long
503vec_permi(__vector __bool long long __a, __vector __bool long long __b,
504 int __c)
505 __constant_range(__c, 0, 3);
506
507// This prototype is deprecated.
508extern __ATTRS_o __vector double
509vec_permi(__vector double __a, __vector double __b, int __c)
510 __constant_range(__c, 0, 3);
511
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)))
516
517/*-- vec_bperm_u128 ---------------------------------------------------------*/
518
519#if __ARCH__ >= 12
520static inline __ATTRS_ai __vector unsigned long long
521vec_bperm_u128(__vector unsigned char __a, __vector unsigned char __b) {
522 return __builtin_s390_vbperm(__a, __b);
523}
524#endif
525
526/*-- vec_revb ---------------------------------------------------------------*/
527
528static inline __ATTRS_o_ai __vector signed short
529vec_revb(__vector signed short __vec) {
530 return (__vector signed short)
531 __builtin_s390_vlbrh((__vector unsigned short)__vec);
532}
533
534static inline __ATTRS_o_ai __vector unsigned short
535vec_revb(__vector unsigned short __vec) {
536 return __builtin_s390_vlbrh(__vec);
537}
538
539static inline __ATTRS_o_ai __vector signed int
540vec_revb(__vector signed int __vec) {
541 return (__vector signed int)
542 __builtin_s390_vlbrf((__vector unsigned int)__vec);
543}
544
545static inline __ATTRS_o_ai __vector unsigned int
546vec_revb(__vector unsigned int __vec) {
547 return __builtin_s390_vlbrf(__vec);
548}
549
550static inline __ATTRS_o_ai __vector signed long long
551vec_revb(__vector signed long long __vec) {
552 return (__vector signed long long)
553 __builtin_s390_vlbrg((__vector unsigned long long)__vec);
554}
555
556static inline __ATTRS_o_ai __vector unsigned long long
557vec_revb(__vector unsigned long long __vec) {
558 return __builtin_s390_vlbrg(__vec);
559}
560
561#if __ARCH__ >= 12
562static inline __ATTRS_o_ai __vector float
563vec_revb(__vector float __vec) {
564 return (__vector float)
565 __builtin_s390_vlbrf((__vector unsigned int)__vec);
566}
567#endif
568
569static inline __ATTRS_o_ai __vector double
570vec_revb(__vector double __vec) {
571 return (__vector double)
572 __builtin_s390_vlbrg((__vector unsigned long long)__vec);
573}
574
575/*-- vec_reve ---------------------------------------------------------------*/
576
577static inline __ATTRS_o_ai __vector signed char
578vec_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] };
583}
584
585static inline __ATTRS_o_ai __vector unsigned char
586vec_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] };
591}
592
593static inline __ATTRS_o_ai __vector __bool char
594vec_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] };
599}
600
601static inline __ATTRS_o_ai __vector signed short
602vec_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] };
605}
606
607static inline __ATTRS_o_ai __vector unsigned short
608vec_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] };
611}
612
613static inline __ATTRS_o_ai __vector __bool short
614vec_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] };
617}
618
619static inline __ATTRS_o_ai __vector signed int
620vec_reve(__vector signed int __vec) {
621 return (__vector signed int) { __vec[3], __vec[2], __vec[1], __vec[0] };
622}
623
624static inline __ATTRS_o_ai __vector unsigned int
625vec_reve(__vector unsigned int __vec) {
626 return (__vector unsigned int) { __vec[3], __vec[2], __vec[1], __vec[0] };
627}
628
629static inline __ATTRS_o_ai __vector __bool int
630vec_reve(__vector __bool int __vec) {
631 return (__vector __bool int) { __vec[3], __vec[2], __vec[1], __vec[0] };
632}
633
634static inline __ATTRS_o_ai __vector signed long long
635vec_reve(__vector signed long long __vec) {
636 return (__vector signed long long) { __vec[1], __vec[0] };
637}
638
639static inline __ATTRS_o_ai __vector unsigned long long
640vec_reve(__vector unsigned long long __vec) {
641 return (__vector unsigned long long) { __vec[1], __vec[0] };
642}
643
644static inline __ATTRS_o_ai __vector __bool long long
645vec_reve(__vector __bool long long __vec) {
646 return (__vector __bool long long) { __vec[1], __vec[0] };
647}
648
649#if __ARCH__ >= 12
650static inline __ATTRS_o_ai __vector float
651vec_reve(__vector float __vec) {
652 return (__vector float) { __vec[3], __vec[2], __vec[1], __vec[0] };
653}
654#endif
655
656static inline __ATTRS_o_ai __vector double
657vec_reve(__vector double __vec) {
658 return (__vector double) { __vec[1], __vec[0] };
659}
660
661/*-- vec_sel ----------------------------------------------------------------*/
662
663static inline __ATTRS_o_ai __vector signed char
664vec_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));
668}
669
670static inline __ATTRS_o_ai __vector signed char
671vec_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));
675}
676
677static inline __ATTRS_o_ai __vector __bool char
678vec_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));
682}
683
684static inline __ATTRS_o_ai __vector __bool char
685vec_sel(__vector __bool char __a, __vector __bool char __b,
686 __vector __bool char __c) {
687 return (__c & __b) | (~__c & __a);
688}
689
690static inline __ATTRS_o_ai __vector unsigned char
691vec_sel(__vector unsigned char __a, __vector unsigned char __b,
692 __vector unsigned char __c) {
693 return (__c & __b) | (~__c & __a);
694}
695
696static inline __ATTRS_o_ai __vector unsigned char
697vec_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));
701}
702
703static inline __ATTRS_o_ai __vector signed short
704vec_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));
708}
709
710static inline __ATTRS_o_ai __vector signed short
711vec_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));
715}
716
717static inline __ATTRS_o_ai __vector __bool short
718vec_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));
722}
723
724static inline __ATTRS_o_ai __vector __bool short
725vec_sel(__vector __bool short __a, __vector __bool short __b,
726 __vector __bool short __c) {
727 return (__c & __b) | (~__c & __a);
728}
729
730static inline __ATTRS_o_ai __vector unsigned short
731vec_sel(__vector unsigned short __a, __vector unsigned short __b,
732 __vector unsigned short __c) {
733 return (__c & __b) | (~__c & __a);
734}
735
736static inline __ATTRS_o_ai __vector unsigned short
737vec_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));
741}
742
743static inline __ATTRS_o_ai __vector signed int
744vec_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));
748}
749
750static inline __ATTRS_o_ai __vector signed int
751vec_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));
755}
756
757static inline __ATTRS_o_ai __vector __bool int
758vec_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));
762}
763
764static inline __ATTRS_o_ai __vector __bool int
765vec_sel(__vector __bool int __a, __vector __bool int __b,
766 __vector __bool int __c) {
767 return (__c & __b) | (~__c & __a);
768}
769
770static inline __ATTRS_o_ai __vector unsigned int
771vec_sel(__vector unsigned int __a, __vector unsigned int __b,
772 __vector unsigned int __c) {
773 return (__c & __b) | (~__c & __a);
774}
775
776static inline __ATTRS_o_ai __vector unsigned int
777vec_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));
781}
782
783static inline __ATTRS_o_ai __vector signed long long
784vec_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));
788}
789
790static inline __ATTRS_o_ai __vector signed long long
791vec_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));
795}
796
797static inline __ATTRS_o_ai __vector __bool long long
798vec_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));
802}
803
804static inline __ATTRS_o_ai __vector __bool long long
805vec_sel(__vector __bool long long __a, __vector __bool long long __b,
806 __vector __bool long long __c) {
807 return (__c & __b) | (~__c & __a);
808}
809
810static inline __ATTRS_o_ai __vector unsigned long long
811vec_sel(__vector unsigned long long __a, __vector unsigned long long __b,
812 __vector unsigned long long __c) {
813 return (__c & __b) | (~__c & __a);
814}
815
816static inline __ATTRS_o_ai __vector unsigned long long
817vec_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));
821}
822
823#if __ARCH__ >= 12
824static inline __ATTRS_o_ai __vector float
825vec_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));
828}
829
830static inline __ATTRS_o_ai __vector float
831vec_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));
836}
837#endif
838
839static inline __ATTRS_o_ai __vector double
840vec_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));
844}
845
846static inline __ATTRS_o_ai __vector double
847vec_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));
853}
854
855/*-- vec_gather_element -----------------------------------------------------*/
856
857static inline __ATTRS_o_ai __vector signed int
858vec_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;
865}
866
867static inline __ATTRS_o_ai __vector __bool int
868vec_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;
875}
876
877static inline __ATTRS_o_ai __vector unsigned int
878vec_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;
885}
886
887static inline __ATTRS_o_ai __vector signed long long
888vec_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;
895}
896
897static inline __ATTRS_o_ai __vector __bool long long
898vec_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;
905}
906
907static inline __ATTRS_o_ai __vector unsigned long long
908vec_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;
915}
916
917#if __ARCH__ >= 12
918static inline __ATTRS_o_ai __vector float
919vec_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;
926}
927#endif
928
929static inline __ATTRS_o_ai __vector double
930vec_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;
937}
938
939/*-- vec_scatter_element ----------------------------------------------------*/
940
941static inline __ATTRS_o_ai void
942vec_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];
948}
949
950static inline __ATTRS_o_ai void
951vec_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];
957}
958
959static inline __ATTRS_o_ai void
960vec_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];
966}
967
968static inline __ATTRS_o_ai void
969vec_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];
975}
976
977static inline __ATTRS_o_ai void
978vec_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];
984}
985
986static inline __ATTRS_o_ai void
987vec_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];
993}
994
995#if __ARCH__ >= 12
996static inline __ATTRS_o_ai void
997vec_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];
1003}
1004#endif
1005
1006static inline __ATTRS_o_ai void
1007vec_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];
1013}
1014
1015/*-- vec_xl -----------------------------------------------------------------*/
1016
1017static inline __ATTRS_o_ai __vector signed char
1018vec_xl(long __offset, const signed char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001019 __vector signed char V;
1020 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1021 sizeof(__vector signed char));
1022 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001023}
1024
1025static inline __ATTRS_o_ai __vector unsigned char
1026vec_xl(long __offset, const unsigned char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001027 __vector unsigned char V;
1028 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1029 sizeof(__vector unsigned char));
1030 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001031}
1032
1033static inline __ATTRS_o_ai __vector signed short
1034vec_xl(long __offset, const signed short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001035 __vector signed short V;
1036 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1037 sizeof(__vector signed short));
1038 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001039}
1040
1041static inline __ATTRS_o_ai __vector unsigned short
1042vec_xl(long __offset, const unsigned short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001043 __vector unsigned short V;
1044 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1045 sizeof(__vector unsigned short));
1046 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001047}
1048
1049static inline __ATTRS_o_ai __vector signed int
1050vec_xl(long __offset, const signed int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001051 __vector signed int V;
1052 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1053 sizeof(__vector signed int));
1054 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001055}
1056
1057static inline __ATTRS_o_ai __vector unsigned int
1058vec_xl(long __offset, const unsigned int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001059 __vector unsigned int V;
1060 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1061 sizeof(__vector unsigned int));
1062 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001063}
1064
1065static inline __ATTRS_o_ai __vector signed long long
1066vec_xl(long __offset, const signed long long *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001067 __vector signed long long V;
1068 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1069 sizeof(__vector signed long long));
1070 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001071}
1072
1073static inline __ATTRS_o_ai __vector unsigned long long
1074vec_xl(long __offset, const unsigned long long *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001075 __vector unsigned long long V;
1076 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1077 sizeof(__vector unsigned long long));
1078 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001079}
1080
1081#if __ARCH__ >= 12
1082static inline __ATTRS_o_ai __vector float
1083vec_xl(long __offset, const float *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001084 __vector float V;
1085 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1086 sizeof(__vector float));
1087 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001088}
1089#endif
1090
1091static inline __ATTRS_o_ai __vector double
1092vec_xl(long __offset, const double *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001093 __vector double V;
1094 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1095 sizeof(__vector double));
1096 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001097}
1098
1099/*-- vec_xld2 ---------------------------------------------------------------*/
1100
1101// This prototype is deprecated.
1102static inline __ATTRS_o_ai __vector signed char
1103vec_xld2(long __offset, const signed char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001104 __vector signed char V;
1105 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1106 sizeof(__vector signed char));
1107 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001108}
1109
1110// This prototype is deprecated.
1111static inline __ATTRS_o_ai __vector unsigned char
1112vec_xld2(long __offset, const unsigned char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001113 __vector unsigned char V;
1114 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1115 sizeof(__vector unsigned char));
1116 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001117}
1118
1119// This prototype is deprecated.
1120static inline __ATTRS_o_ai __vector signed short
1121vec_xld2(long __offset, const signed short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001122 __vector signed short V;
1123 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1124 sizeof(__vector signed short));
1125 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001126}
1127
1128// This prototype is deprecated.
1129static inline __ATTRS_o_ai __vector unsigned short
1130vec_xld2(long __offset, const unsigned short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001131 __vector unsigned short V;
1132 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1133 sizeof(__vector unsigned short));
1134 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001135}
1136
1137// This prototype is deprecated.
1138static inline __ATTRS_o_ai __vector signed int
1139vec_xld2(long __offset, const signed int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001140 __vector signed int V;
1141 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1142 sizeof(__vector signed int));
1143 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001144}
1145
1146// This prototype is deprecated.
1147static inline __ATTRS_o_ai __vector unsigned int
1148vec_xld2(long __offset, const unsigned int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001149 __vector unsigned int V;
1150 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1151 sizeof(__vector unsigned int));
1152 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001153}
1154
1155// This prototype is deprecated.
1156static inline __ATTRS_o_ai __vector signed long long
1157vec_xld2(long __offset, const signed long long *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001158 __vector signed long long V;
1159 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1160 sizeof(__vector signed long long));
1161 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001162}
1163
1164// This prototype is deprecated.
1165static inline __ATTRS_o_ai __vector unsigned long long
1166vec_xld2(long __offset, const unsigned long long *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001167 __vector unsigned long long V;
1168 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1169 sizeof(__vector unsigned long long));
1170 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001171}
1172
1173// This prototype is deprecated.
1174static inline __ATTRS_o_ai __vector double
1175vec_xld2(long __offset, const double *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001176 __vector double V;
1177 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1178 sizeof(__vector double));
1179 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001180}
1181
1182/*-- vec_xlw4 ---------------------------------------------------------------*/
1183
1184// This prototype is deprecated.
1185static inline __ATTRS_o_ai __vector signed char
1186vec_xlw4(long __offset, const signed char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001187 __vector signed char V;
1188 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1189 sizeof(__vector signed char));
1190 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001191}
1192
1193// This prototype is deprecated.
1194static inline __ATTRS_o_ai __vector unsigned char
1195vec_xlw4(long __offset, const unsigned char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001196 __vector unsigned char V;
1197 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1198 sizeof(__vector unsigned char));
1199 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001200}
1201
1202// This prototype is deprecated.
1203static inline __ATTRS_o_ai __vector signed short
1204vec_xlw4(long __offset, const signed short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001205 __vector signed short V;
1206 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1207 sizeof(__vector signed short));
1208 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001209}
1210
1211// This prototype is deprecated.
1212static inline __ATTRS_o_ai __vector unsigned short
1213vec_xlw4(long __offset, const unsigned short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001214 __vector unsigned short V;
1215 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1216 sizeof(__vector unsigned short));
1217 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001218}
1219
1220// This prototype is deprecated.
1221static inline __ATTRS_o_ai __vector signed int
1222vec_xlw4(long __offset, const signed int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001223 __vector signed int V;
1224 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1225 sizeof(__vector signed int));
1226 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001227}
1228
1229// This prototype is deprecated.
1230static inline __ATTRS_o_ai __vector unsigned int
1231vec_xlw4(long __offset, const unsigned int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001232 __vector unsigned int V;
1233 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1234 sizeof(__vector unsigned int));
1235 return V;
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001236}
1237
1238/*-- vec_xst ----------------------------------------------------------------*/
1239
1240static inline __ATTRS_o_ai void
1241vec_xst(__vector signed char __vec, long __offset, signed char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001242 __vector signed char V = __vec;
1243 __builtin_memcpy(((char *)__ptr + __offset), &V,
1244 sizeof(__vector signed char));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001245}
1246
1247static inline __ATTRS_o_ai void
1248vec_xst(__vector unsigned char __vec, long __offset, unsigned char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001249 __vector unsigned char V = __vec;
1250 __builtin_memcpy(((char *)__ptr + __offset), &V,
1251 sizeof(__vector unsigned char));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001252}
1253
1254static inline __ATTRS_o_ai void
1255vec_xst(__vector signed short __vec, long __offset, signed short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001256 __vector signed short V = __vec;
1257 __builtin_memcpy(((char *)__ptr + __offset), &V,
1258 sizeof(__vector signed short));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001259}
1260
1261static inline __ATTRS_o_ai void
1262vec_xst(__vector unsigned short __vec, long __offset, unsigned short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001263 __vector unsigned short V = __vec;
1264 __builtin_memcpy(((char *)__ptr + __offset), &V,
1265 sizeof(__vector unsigned short));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001266}
1267
1268static inline __ATTRS_o_ai void
1269vec_xst(__vector signed int __vec, long __offset, signed int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001270 __vector signed int V = __vec;
1271 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector signed int));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001272}
1273
1274static inline __ATTRS_o_ai void
1275vec_xst(__vector unsigned int __vec, long __offset, unsigned int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001276 __vector unsigned int V = __vec;
1277 __builtin_memcpy(((char *)__ptr + __offset), &V,
1278 sizeof(__vector unsigned int));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001279}
1280
1281static inline __ATTRS_o_ai void
1282vec_xst(__vector signed long long __vec, long __offset,
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001283 signed long long *__ptr) {
1284 __vector signed long long V = __vec;
1285 __builtin_memcpy(((char *)__ptr + __offset), &V,
1286 sizeof(__vector signed long long));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001287}
1288
1289static inline __ATTRS_o_ai void
1290vec_xst(__vector unsigned long long __vec, long __offset,
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001291 unsigned long long *__ptr) {
1292 __vector unsigned long long V = __vec;
1293 __builtin_memcpy(((char *)__ptr + __offset), &V,
1294 sizeof(__vector unsigned long long));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001295}
1296
1297#if __ARCH__ >= 12
1298static inline __ATTRS_o_ai void
1299vec_xst(__vector float __vec, long __offset, float *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001300 __vector float V = __vec;
1301 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector float));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001302}
1303#endif
1304
1305static inline __ATTRS_o_ai void
1306vec_xst(__vector double __vec, long __offset, double *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001307 __vector double V = __vec;
1308 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector double));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001309}
1310
1311/*-- vec_xstd2 --------------------------------------------------------------*/
1312
1313// This prototype is deprecated.
1314static inline __ATTRS_o_ai void
1315vec_xstd2(__vector signed char __vec, long __offset, signed char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001316 __vector signed char V = __vec;
1317 __builtin_memcpy(((char *)__ptr + __offset), &V,
1318 sizeof(__vector signed char));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001319}
1320
1321// This prototype is deprecated.
1322static inline __ATTRS_o_ai void
1323vec_xstd2(__vector unsigned char __vec, long __offset, unsigned char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001324 __vector unsigned char V = __vec;
1325 __builtin_memcpy(((char *)__ptr + __offset), &V,
1326 sizeof(__vector unsigned char));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001327}
1328
1329// This prototype is deprecated.
1330static inline __ATTRS_o_ai void
1331vec_xstd2(__vector signed short __vec, long __offset, signed short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001332 __vector signed short V = __vec;
1333 __builtin_memcpy(((char *)__ptr + __offset), &V,
1334 sizeof(__vector signed short));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001335}
1336
1337// This prototype is deprecated.
1338static inline __ATTRS_o_ai void
1339vec_xstd2(__vector unsigned short __vec, long __offset, unsigned short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001340 __vector unsigned short V = __vec;
1341 __builtin_memcpy(((char *)__ptr + __offset), &V,
1342 sizeof(__vector unsigned short));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001343}
1344
1345// This prototype is deprecated.
1346static inline __ATTRS_o_ai void
1347vec_xstd2(__vector signed int __vec, long __offset, signed int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001348 __vector signed int V = __vec;
1349 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector signed int));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001350}
1351
1352// This prototype is deprecated.
1353static inline __ATTRS_o_ai void
1354vec_xstd2(__vector unsigned int __vec, long __offset, unsigned int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001355 __vector unsigned int V = __vec;
1356 __builtin_memcpy(((char *)__ptr + __offset), &V,
1357 sizeof(__vector unsigned int));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001358}
1359
1360// This prototype is deprecated.
1361static inline __ATTRS_o_ai void
1362vec_xstd2(__vector signed long long __vec, long __offset,
1363 signed long long *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001364 __vector signed long long V = __vec;
1365 __builtin_memcpy(((char *)__ptr + __offset), &V,
1366 sizeof(__vector signed long long));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001367}
1368
1369// This prototype is deprecated.
1370static inline __ATTRS_o_ai void
1371vec_xstd2(__vector unsigned long long __vec, long __offset,
1372 unsigned long long *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001373 __vector unsigned long long V = __vec;
1374 __builtin_memcpy(((char *)__ptr + __offset), &V,
1375 sizeof(__vector unsigned long long));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001376}
1377
1378// This prototype is deprecated.
1379static inline __ATTRS_o_ai void
1380vec_xstd2(__vector double __vec, long __offset, double *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001381 __vector double V = __vec;
1382 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector double));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001383}
1384
1385/*-- vec_xstw4 --------------------------------------------------------------*/
1386
1387// This prototype is deprecated.
1388static inline __ATTRS_o_ai void
1389vec_xstw4(__vector signed char __vec, long __offset, signed char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001390 __vector signed char V = __vec;
1391 __builtin_memcpy(((char *)__ptr + __offset), &V,
1392 sizeof(__vector signed char));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001393}
1394
1395// This prototype is deprecated.
1396static inline __ATTRS_o_ai void
1397vec_xstw4(__vector unsigned char __vec, long __offset, unsigned char *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001398 __vector unsigned char V = __vec;
1399 __builtin_memcpy(((char *)__ptr + __offset), &V,
1400 sizeof(__vector unsigned char));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001401}
1402
1403// This prototype is deprecated.
1404static inline __ATTRS_o_ai void
1405vec_xstw4(__vector signed short __vec, long __offset, signed short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001406 __vector signed short V = __vec;
1407 __builtin_memcpy(((char *)__ptr + __offset), &V,
1408 sizeof(__vector signed short));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001409}
1410
1411// This prototype is deprecated.
1412static inline __ATTRS_o_ai void
1413vec_xstw4(__vector unsigned short __vec, long __offset, unsigned short *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001414 __vector unsigned short V = __vec;
1415 __builtin_memcpy(((char *)__ptr + __offset), &V,
1416 sizeof(__vector unsigned short));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001417}
1418
1419// This prototype is deprecated.
1420static inline __ATTRS_o_ai void
1421vec_xstw4(__vector signed int __vec, long __offset, signed int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001422 __vector signed int V = __vec;
1423 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector signed int));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001424}
1425
1426// This prototype is deprecated.
1427static inline __ATTRS_o_ai void
1428vec_xstw4(__vector unsigned int __vec, long __offset, unsigned int *__ptr) {
Pirama Arumuga Nainar7e1f8392021-08-16 17:30:48 -07001429 __vector unsigned int V = __vec;
1430 __builtin_memcpy(((char *)__ptr + __offset), &V,
1431 sizeof(__vector unsigned int));
Sasha Smundak0fc590b2020-10-07 08:11:59 -07001432}
1433
1434/*-- vec_load_bndry ---------------------------------------------------------*/
1435
1436extern __ATTRS_o __vector signed char
1437vec_load_bndry(const signed char *__ptr, unsigned short __len)
1438 __constant_pow2_range(__len, 64, 4096);
1439
1440extern __ATTRS_o __vector unsigned char
1441vec_load_bndry(const unsigned char *__ptr, unsigned short __len)
1442 __constant_pow2_range(__len, 64, 4096);
1443
1444extern __ATTRS_o __vector signed short
1445vec_load_bndry(const signed short *__ptr, unsigned short __len)
1446 __constant_pow2_range(__len, 64, 4096);
1447
1448extern __ATTRS_o __vector unsigned short
1449vec_load_bndry(const unsigned short *__ptr, unsigned short __len)
1450 __constant_pow2_range(__len, 64, 4096);
1451
1452extern __ATTRS_o __vector signed int
1453vec_load_bndry(const signed int *__ptr, unsigned short __len)
1454 __constant_pow2_range(__len, 64, 4096);
1455
1456extern __ATTRS_o __vector unsigned int
1457vec_load_bndry(const unsigned int *__ptr, unsigned short __len)
1458 __constant_pow2_range(__len, 64, 4096);
1459
1460extern __ATTRS_o __vector signed long long
1461vec_load_bndry(const signed long long *__ptr, unsigned short __len)
1462 __constant_pow2_range(__len, 64, 4096);
1463
1464extern __ATTRS_o __vector unsigned long long
1465vec_load_bndry(const unsigned long long *__ptr, unsigned short __len)
1466 __constant_pow2_range(__len, 64, 4096);
1467
1468#if __ARCH__ >= 12
1469extern __ATTRS_o __vector float
1470vec_load_bndry(const float *__ptr, unsigned short __len)
1471 __constant_pow2_range(__len, 64, 4096);
1472#endif
1473
1474extern __ATTRS_o __vector double
1475vec_load_bndry(const double *__ptr, unsigned short __len)
1476 __constant_pow2_range(__len, 64, 4096);
1477
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)))
1486
1487/*-- vec_load_len -----------------------------------------------------------*/
1488
1489static inline __ATTRS_o_ai __vector signed char
1490vec_load_len(const signed char *__ptr, unsigned int __len) {
1491 return (__vector signed char)__builtin_s390_vll(__len, __ptr);
1492}
1493
1494static inline __ATTRS_o_ai __vector unsigned char
1495vec_load_len(const unsigned char *__ptr, unsigned int __len) {
1496 return (__vector unsigned char)__builtin_s390_vll(__len, __ptr);
1497}
1498
1499static inline __ATTRS_o_ai __vector signed short
1500vec_load_len(const signed short *__ptr, unsigned int __len) {
1501 return (__vector signed short)__builtin_s390_vll(__len, __ptr);
1502}
1503
1504static inline __ATTRS_o_ai __vector unsigned short
1505vec_load_len(const unsigned short *__ptr, unsigned int __len) {
1506 return (__vector unsigned short)__builtin_s390_vll(__len, __ptr);
1507}
1508
1509static inline __ATTRS_o_ai __vector signed int
1510vec_load_len(const signed int *__ptr, unsigned int __len) {
1511 return (__vector signed int)__builtin_s390_vll(__len, __ptr);
1512}
1513
1514static inline __ATTRS_o_ai __vector unsigned int
1515vec_load_len(const unsigned int *__ptr, unsigned int __len) {
1516 return (__vector unsigned int)__builtin_s390_vll(__len, __ptr);
1517}
1518
1519static inline __ATTRS_o_ai __vector signed long long
1520vec_load_len(const signed long long *__ptr, unsigned int __len) {
1521 return (__vector signed long long)__builtin_s390_vll(__len, __ptr);
1522}
1523
1524static inline __ATTRS_o_ai __vector unsigned long long
1525vec_load_len(const unsigned long long *__ptr, unsigned int __len) {
1526 return (__vector unsigned long long)__builtin_s390_vll(__len, __ptr);
1527}
1528
1529#if __ARCH__ >= 12
1530static inline __ATTRS_o_ai __vector float
1531vec_load_len(const float *__ptr, unsigned int __len) {
1532 return (__vector float)__builtin_s390_vll(__len, __ptr);
1533}
1534#endif
1535
1536static inline __ATTRS_o_ai __vector double
1537vec_load_len(const double *__ptr, unsigned int __len) {
1538 return (__vector double)__builtin_s390_vll(__len, __ptr);
1539}
1540
1541/*-- vec_load_len_r ---------------------------------------------------------*/
1542
1543#if __ARCH__ >= 12
1544static inline __ATTRS_ai __vector unsigned char
1545vec_load_len_r(const unsigned char *__ptr, unsigned int __len) {
1546 return (__vector unsigned char)__builtin_s390_vlrl(__len, __ptr);
1547}
1548#endif
1549
1550/*-- vec_store_len ----------------------------------------------------------*/
1551
1552static inline __ATTRS_o_ai void
1553vec_store_len(__vector signed char __vec, signed char *__ptr,
1554 unsigned int __len) {
1555 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1556}
1557
1558static inline __ATTRS_o_ai void
1559vec_store_len(__vector unsigned char __vec, unsigned char *__ptr,
1560 unsigned int __len) {
1561 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1562}
1563
1564static inline __ATTRS_o_ai void
1565vec_store_len(__vector signed short __vec, signed short *__ptr,
1566 unsigned int __len) {
1567 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1568}
1569
1570static inline __ATTRS_o_ai void
1571vec_store_len(__vector unsigned short __vec, unsigned short *__ptr,
1572 unsigned int __len) {
1573 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1574}
1575
1576static inline __ATTRS_o_ai void
1577vec_store_len(__vector signed int __vec, signed int *__ptr,
1578 unsigned int __len) {
1579 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1580}
1581
1582static inline __ATTRS_o_ai void
1583vec_store_len(__vector unsigned int __vec, unsigned int *__ptr,
1584 unsigned int __len) {
1585 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1586}
1587
1588static inline __ATTRS_o_ai void
1589vec_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);
1592}
1593
1594static inline __ATTRS_o_ai void
1595vec_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);
1598}
1599
1600#if __ARCH__ >= 12
1601static inline __ATTRS_o_ai void
1602vec_store_len(__vector float __vec, float *__ptr,
1603 unsigned int __len) {
1604 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1605}
1606#endif
1607
1608static inline __ATTRS_o_ai void
1609vec_store_len(__vector double __vec, double *__ptr,
1610 unsigned int __len) {
1611 __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr);
1612}
1613
1614/*-- vec_store_len_r --------------------------------------------------------*/
1615
1616#if __ARCH__ >= 12
1617static inline __ATTRS_ai void
1618vec_store_len_r(__vector unsigned char __vec, unsigned char *__ptr,
1619 unsigned int __len) {
1620 __builtin_s390_vstrl((__vector signed char)__vec, __len, __ptr);
1621}
1622#endif
1623
1624/*-- vec_load_pair ----------------------------------------------------------*/
1625
1626static inline __ATTRS_o_ai __vector signed long long
1627vec_load_pair(signed long long __a, signed long long __b) {
1628 return (__vector signed long long)(__a, __b);
1629}
1630
1631static inline __ATTRS_o_ai __vector unsigned long long
1632vec_load_pair(unsigned long long __a, unsigned long long __b) {
1633 return (__vector unsigned long long)(__a, __b);
1634}
1635
1636/*-- vec_genmask ------------------------------------------------------------*/
1637
1638static inline __ATTRS_o_ai __vector unsigned char
1639vec_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);
1658}
1659
1660/*-- vec_genmasks_* ---------------------------------------------------------*/
1661
1662static inline __ATTRS_o_ai __vector unsigned char
1663vec_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;
1673}
1674
1675static inline __ATTRS_o_ai __vector unsigned short
1676vec_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;
1686}
1687
1688static inline __ATTRS_o_ai __vector unsigned int
1689vec_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;
1699}
1700
1701static inline __ATTRS_o_ai __vector unsigned long long
1702vec_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;
1712}
1713
1714/*-- vec_splat --------------------------------------------------------------*/
1715
1716static inline __ATTRS_o_ai __vector signed char
1717vec_splat(__vector signed char __vec, int __index)
1718 __constant_range(__index, 0, 15) {
1719 return (__vector signed char)__vec[__index];
1720}
1721
1722static inline __ATTRS_o_ai __vector __bool char
1723vec_splat(__vector __bool char __vec, int __index)
1724 __constant_range(__index, 0, 15) {
1725 return (__vector __bool char)(__vector unsigned char)__vec[__index];
1726}
1727
1728static inline __ATTRS_o_ai __vector unsigned char
1729vec_splat(__vector unsigned char __vec, int __index)
1730 __constant_range(__index, 0, 15) {
1731 return (__vector unsigned char)__vec[__index];
1732}
1733
1734static inline __ATTRS_o_ai __vector signed short
1735vec_splat(__vector signed short __vec, int __index)
1736 __constant_range(__index, 0, 7) {
1737 return (__vector signed short)__vec[__index];
1738}
1739
1740static inline __ATTRS_o_ai __vector __bool short
1741vec_splat(__vector __bool short __vec, int __index)
1742 __constant_range(__index, 0, 7) {
1743 return (__vector __bool short)(__vector unsigned short)__vec[__index];
1744}
1745
1746static inline __ATTRS_o_ai __vector unsigned short
1747vec_splat(__vector unsigned short __vec, int __index)
1748 __constant_range(__index, 0, 7) {
1749 return (__vector unsigned short)__vec[__index];
1750}
1751
1752static inline __ATTRS_o_ai __vector signed int
1753vec_splat(__vector signed int __vec, int __index)
1754 __constant_range(__index, 0, 3) {
1755 return (__vector signed int)__vec[__index];
1756}
1757
1758static inline __ATTRS_o_ai __vector __bool int
1759vec_splat(__vector __bool int __vec, int __index)
1760 __constant_range(__index, 0, 3) {
1761 return (__vector __bool int)(__vector unsigned int)__vec[__index];
1762}
1763
1764static inline __ATTRS_o_ai __vector unsigned int
1765vec_splat(__vector unsigned int __vec, int __index)
1766 __constant_range(__index, 0, 3) {
1767 return (__vector unsigned int)__vec[__index];
1768}
1769
1770static inline __ATTRS_o_ai __vector signed long long
1771vec_splat(__vector signed long long __vec, int __index)
1772 __constant_range(__index, 0, 1) {
1773 return (__vector signed long long)__vec[__index];
1774}
1775
1776static inline __ATTRS_o_ai __vector __bool long long
1777vec_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]);
1781}
1782
1783static inline __ATTRS_o_ai __vector unsigned long long
1784vec_splat(__vector unsigned long long __vec, int __index)
1785 __constant_range(__index, 0, 1) {
1786 return (__vector unsigned long long)__vec[__index];
1787}
1788
1789#if __ARCH__ >= 12
1790static inline __ATTRS_o_ai __vector float
1791vec_splat(__vector float __vec, int __index)
1792 __constant_range(__index, 0, 3) {
1793 return (__vector float)__vec[__index];
1794}
1795#endif
1796
1797static inline __ATTRS_o_ai __vector double
1798vec_splat(__vector double __vec, int __index)
1799 __constant_range(__index, 0, 1) {
1800 return (__vector double)__vec[__index];
1801}
1802
1803/*-- vec_splat_s* -----------------------------------------------------------*/
1804
1805static inline __ATTRS_ai __vector signed char
1806vec_splat_s8(signed char __scalar)
1807 __constant(__scalar) {
1808 return (__vector signed char)__scalar;
1809}
1810
1811static inline __ATTRS_ai __vector signed short
1812vec_splat_s16(signed short __scalar)
1813 __constant(__scalar) {
1814 return (__vector signed short)__scalar;
1815}
1816
1817static inline __ATTRS_ai __vector signed int
1818vec_splat_s32(signed short __scalar)
1819 __constant(__scalar) {
1820 return (__vector signed int)(signed int)__scalar;
1821}
1822
1823static inline __ATTRS_ai __vector signed long long
1824vec_splat_s64(signed short __scalar)
1825 __constant(__scalar) {
1826 return (__vector signed long long)(signed long)__scalar;
1827}
1828
1829/*-- vec_splat_u* -----------------------------------------------------------*/
1830
1831static inline __ATTRS_ai __vector unsigned char
1832vec_splat_u8(unsigned char __scalar)
1833 __constant(__scalar) {
1834 return (__vector unsigned char)__scalar;
1835}
1836
1837static inline __ATTRS_ai __vector unsigned short
1838vec_splat_u16(unsigned short __scalar)
1839 __constant(__scalar) {
1840 return (__vector unsigned short)__scalar;
1841}
1842
1843static inline __ATTRS_ai __vector unsigned int
1844vec_splat_u32(signed short __scalar)
1845 __constant(__scalar) {
1846 return (__vector unsigned int)(signed int)__scalar;
1847}
1848
1849static inline __ATTRS_ai __vector unsigned long long
1850vec_splat_u64(signed short __scalar)
1851 __constant(__scalar) {
1852 return (__vector unsigned long long)(signed long long)__scalar;
1853}
1854
1855/*-- vec_splats -------------------------------------------------------------*/
1856
1857static inline __ATTRS_o_ai __vector signed char
1858vec_splats(signed char __scalar) {
1859 return (__vector signed char)__scalar;
1860}
1861
1862static inline __ATTRS_o_ai __vector unsigned char
1863vec_splats(unsigned char __scalar) {
1864 return (__vector unsigned char)__scalar;
1865}
1866
1867static inline __ATTRS_o_ai __vector signed short
1868vec_splats(signed short __scalar) {
1869 return (__vector signed short)__scalar;
1870}
1871
1872static inline __ATTRS_o_ai __vector unsigned short
1873vec_splats(unsigned short __scalar) {
1874 return (__vector unsigned short)__scalar;
1875}
1876
1877static inline __ATTRS_o_ai __vector signed int
1878vec_splats(signed int __scalar) {
1879 return (__vector signed int)__scalar;
1880}
1881
1882static inline __ATTRS_o_ai __vector unsigned int
1883vec_splats(unsigned int __scalar) {
1884 return (__vector unsigned int)__scalar;
1885}
1886
1887static inline __ATTRS_o_ai __vector signed long long
1888vec_splats(signed long long __scalar) {
1889 return (__vector signed long long)__scalar;
1890}
1891
1892static inline __ATTRS_o_ai __vector unsigned long long
1893vec_splats(unsigned long long __scalar) {
1894 return (__vector unsigned long long)__scalar;
1895}
1896
1897#if __ARCH__ >= 12
1898static inline __ATTRS_o_ai __vector float
1899vec_splats(float __scalar) {
1900 return (__vector float)__scalar;
1901}
1902#endif
1903
1904static inline __ATTRS_o_ai __vector double
1905vec_splats(double __scalar) {
1906 return (__vector double)__scalar;
1907}
1908
1909/*-- vec_extend_s64 ---------------------------------------------------------*/
1910
1911static inline __ATTRS_o_ai __vector signed long long
1912vec_extend_s64(__vector signed char __a) {
1913 return (__vector signed long long)(__a[7], __a[15]);
1914}
1915
1916static inline __ATTRS_o_ai __vector signed long long
1917vec_extend_s64(__vector signed short __a) {
1918 return (__vector signed long long)(__a[3], __a[7]);
1919}
1920
1921static inline __ATTRS_o_ai __vector signed long long
1922vec_extend_s64(__vector signed int __a) {
1923 return (__vector signed long long)(__a[1], __a[3]);
1924}
1925
1926/*-- vec_mergeh -------------------------------------------------------------*/
1927
1928static inline __ATTRS_o_ai __vector signed char
1929vec_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]);
1933}
1934
1935static inline __ATTRS_o_ai __vector __bool char
1936vec_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]);
1940}
1941
1942static inline __ATTRS_o_ai __vector unsigned char
1943vec_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]);
1947}
1948
1949static inline __ATTRS_o_ai __vector signed short
1950vec_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]);
1953}
1954
1955static inline __ATTRS_o_ai __vector __bool short
1956vec_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]);
1959}
1960
1961static inline __ATTRS_o_ai __vector unsigned short
1962vec_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]);
1965}
1966
1967static inline __ATTRS_o_ai __vector signed int
1968vec_mergeh(__vector signed int __a, __vector signed int __b) {
1969 return (__vector signed int)(__a[0], __b[0], __a[1], __b[1]);
1970}
1971
1972static inline __ATTRS_o_ai __vector __bool int
1973vec_mergeh(__vector __bool int __a, __vector __bool int __b) {
1974 return (__vector __bool int)(__a[0], __b[0], __a[1], __b[1]);
1975}
1976
1977static inline __ATTRS_o_ai __vector unsigned int
1978vec_mergeh(__vector unsigned int __a, __vector unsigned int __b) {
1979 return (__vector unsigned int)(__a[0], __b[0], __a[1], __b[1]);
1980}
1981
1982static inline __ATTRS_o_ai __vector signed long long
1983vec_mergeh(__vector signed long long __a, __vector signed long long __b) {
1984 return (__vector signed long long)(__a[0], __b[0]);
1985}
1986
1987static inline __ATTRS_o_ai __vector __bool long long
1988vec_mergeh(__vector __bool long long __a, __vector __bool long long __b) {
1989 return (__vector __bool long long)(__a[0], __b[0]);
1990}
1991
1992static inline __ATTRS_o_ai __vector unsigned long long
1993vec_mergeh(__vector unsigned long long __a, __vector unsigned long long __b) {
1994 return (__vector unsigned long long)(__a[0], __b[0]);
1995}
1996
1997#if __ARCH__ >= 12
1998static inline __ATTRS_o_ai __vector float
1999vec_mergeh(__vector float __a, __vector float __b) {
2000 return (__vector float)(__a[0], __b[0], __a[1], __b[1]);
2001}
2002#endif
2003
2004static inline __ATTRS_o_ai __vector double
2005vec_mergeh(__vector double __a, __vector double __b) {
2006 return (__vector double)(__a[0], __b[0]);
2007}
2008
2009/*-- vec_mergel -------------------------------------------------------------*/
2010
2011static inline __ATTRS_o_ai __vector signed char
2012vec_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]);
2016}
2017
2018static inline __ATTRS_o_ai __vector __bool char
2019vec_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]);
2023}
2024
2025static inline __ATTRS_o_ai __vector unsigned char
2026vec_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]);
2030}
2031
2032static inline __ATTRS_o_ai __vector signed short
2033vec_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]);
2036}
2037
2038static inline __ATTRS_o_ai __vector __bool short
2039vec_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]);
2042}
2043
2044static inline __ATTRS_o_ai __vector unsigned short
2045vec_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]);
2048}
2049
2050static inline __ATTRS_o_ai __vector signed int
2051vec_mergel(__vector signed int __a, __vector signed int __b) {
2052 return (__vector signed int)(__a[2], __b[2], __a[3], __b[3]);
2053}
2054
2055static inline __ATTRS_o_ai __vector __bool int
2056vec_mergel(__vector __bool int __a, __vector __bool int __b) {
2057 return (__vector __bool int)(__a[2], __b[2], __a[3], __b[3]);
2058}
2059
2060static inline __ATTRS_o_ai __vector unsigned int
2061vec_mergel(__vector unsigned int __a, __vector unsigned int __b) {
2062 return (__vector unsigned int)(__a[2], __b[2], __a[3], __b[3]);
2063}
2064
2065static inline __ATTRS_o_ai __vector signed long long
2066vec_mergel(__vector signed long long __a, __vector signed long long __b) {
2067 return (__vector signed long long)(__a[1], __b[1]);
2068}
2069
2070static inline __ATTRS_o_ai __vector __bool long long
2071vec_mergel(__vector __bool long long __a, __vector __bool long long __b) {
2072 return (__vector __bool long long)(__a[1], __b[1]);
2073}
2074
2075static inline __ATTRS_o_ai __vector unsigned long long
2076vec_mergel(__vector unsigned long long __a, __vector unsigned long long __b) {
2077 return (__vector unsigned long long)(__a[1], __b[1]);
2078}
2079
2080#if __ARCH__ >= 12
2081static inline __ATTRS_o_ai __vector float
2082vec_mergel(__vector float __a, __vector float __b) {
2083 return (__vector float)(__a[2], __b[2], __a[3], __b[3]);
2084}
2085#endif
2086
2087static inline __ATTRS_o_ai __vector double
2088vec_mergel(__vector double __a, __vector double __b) {
2089 return (__vector double)(__a[1], __b[1]);
2090}
2091
2092/*-- vec_pack ---------------------------------------------------------------*/
2093
2094static inline __ATTRS_o_ai __vector signed char
2095vec_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]);
2101}
2102
2103static inline __ATTRS_o_ai __vector __bool char
2104vec_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]);
2110}
2111
2112static inline __ATTRS_o_ai __vector unsigned char
2113vec_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]);
2119}
2120
2121static inline __ATTRS_o_ai __vector signed short
2122vec_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]);
2128}
2129
2130static inline __ATTRS_o_ai __vector __bool short
2131vec_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]);
2137}
2138
2139static inline __ATTRS_o_ai __vector unsigned short
2140vec_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]);
2146}
2147
2148static inline __ATTRS_o_ai __vector signed int
2149vec_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]);
2153}
2154
2155static inline __ATTRS_o_ai __vector __bool int
2156vec_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]);
2160}
2161
2162static inline __ATTRS_o_ai __vector unsigned int
2163vec_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]);
2167}
2168
2169/*-- vec_packs --------------------------------------------------------------*/
2170
2171static inline __ATTRS_o_ai __vector signed char
2172vec_packs(__vector signed short __a, __vector signed short __b) {
2173 return __builtin_s390_vpksh(__a, __b);
2174}
2175
2176static inline __ATTRS_o_ai __vector unsigned char
2177vec_packs(__vector unsigned short __a, __vector unsigned short __b) {
2178 return __builtin_s390_vpklsh(__a, __b);
2179}
2180
2181static inline __ATTRS_o_ai __vector signed short
2182vec_packs(__vector signed int __a, __vector signed int __b) {
2183 return __builtin_s390_vpksf(__a, __b);
2184}
2185
2186static inline __ATTRS_o_ai __vector unsigned short
2187vec_packs(__vector unsigned int __a, __vector unsigned int __b) {
2188 return __builtin_s390_vpklsf(__a, __b);
2189}
2190
2191static inline __ATTRS_o_ai __vector signed int
2192vec_packs(__vector signed long long __a, __vector signed long long __b) {
2193 return __builtin_s390_vpksg(__a, __b);
2194}
2195
2196static inline __ATTRS_o_ai __vector unsigned int
2197vec_packs(__vector unsigned long long __a, __vector unsigned long long __b) {
2198 return __builtin_s390_vpklsg(__a, __b);
2199}
2200
2201/*-- vec_packs_cc -----------------------------------------------------------*/
2202
2203static inline __ATTRS_o_ai __vector signed char
2204vec_packs_cc(__vector signed short __a, __vector signed short __b, int *__cc) {
2205 return __builtin_s390_vpkshs(__a, __b, __cc);
2206}
2207
2208static inline __ATTRS_o_ai __vector unsigned char
2209vec_packs_cc(__vector unsigned short __a, __vector unsigned short __b,
2210 int *__cc) {
2211 return __builtin_s390_vpklshs(__a, __b, __cc);
2212}
2213
2214static inline __ATTRS_o_ai __vector signed short
2215vec_packs_cc(__vector signed int __a, __vector signed int __b, int *__cc) {
2216 return __builtin_s390_vpksfs(__a, __b, __cc);
2217}
2218
2219static inline __ATTRS_o_ai __vector unsigned short
2220vec_packs_cc(__vector unsigned int __a, __vector unsigned int __b, int *__cc) {
2221 return __builtin_s390_vpklsfs(__a, __b, __cc);
2222}
2223
2224static inline __ATTRS_o_ai __vector signed int
2225vec_packs_cc(__vector signed long long __a, __vector signed long long __b,
2226 int *__cc) {
2227 return __builtin_s390_vpksgs(__a, __b, __cc);
2228}
2229
2230static inline __ATTRS_o_ai __vector unsigned int
2231vec_packs_cc(__vector unsigned long long __a, __vector unsigned long long __b,
2232 int *__cc) {
2233 return __builtin_s390_vpklsgs(__a, __b, __cc);
2234}
2235
2236/*-- vec_packsu -------------------------------------------------------------*/
2237
2238static inline __ATTRS_o_ai __vector unsigned char
2239vec_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);
2244}
2245
2246static inline __ATTRS_o_ai __vector unsigned char
2247vec_packsu(__vector unsigned short __a, __vector unsigned short __b) {
2248 return __builtin_s390_vpklsh(__a, __b);
2249}
2250
2251static inline __ATTRS_o_ai __vector unsigned short
2252vec_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);
2257}
2258
2259static inline __ATTRS_o_ai __vector unsigned short
2260vec_packsu(__vector unsigned int __a, __vector unsigned int __b) {
2261 return __builtin_s390_vpklsf(__a, __b);
2262}
2263
2264static inline __ATTRS_o_ai __vector unsigned int
2265vec_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);
2272}
2273
2274static inline __ATTRS_o_ai __vector unsigned int
2275vec_packsu(__vector unsigned long long __a, __vector unsigned long long __b) {
2276 return __builtin_s390_vpklsg(__a, __b);
2277}
2278
2279/*-- vec_packsu_cc ----------------------------------------------------------*/
2280
2281static inline __ATTRS_o_ai __vector unsigned char
2282vec_packsu_cc(__vector unsigned short __a, __vector unsigned short __b,
2283 int *__cc) {
2284 return __builtin_s390_vpklshs(__a, __b, __cc);
2285}
2286
2287static inline __ATTRS_o_ai __vector unsigned short
2288vec_packsu_cc(__vector unsigned int __a, __vector unsigned int __b, int *__cc) {
2289 return __builtin_s390_vpklsfs(__a, __b, __cc);
2290}
2291
2292static inline __ATTRS_o_ai __vector unsigned int
2293vec_packsu_cc(__vector unsigned long long __a, __vector unsigned long long __b,
2294 int *__cc) {
2295 return __builtin_s390_vpklsgs(__a, __b, __cc);
2296}
2297
2298/*-- vec_unpackh ------------------------------------------------------------*/
2299
2300static inline __ATTRS_o_ai __vector signed short
2301vec_unpackh(__vector signed char __a) {
2302 return __builtin_s390_vuphb(__a);
2303}
2304
2305static inline __ATTRS_o_ai __vector __bool short
2306vec_unpackh(__vector __bool char __a) {
2307 return ((__vector __bool short)
2308 __builtin_s390_vuphb((__vector signed char)__a));
2309}
2310
2311static inline __ATTRS_o_ai __vector unsigned short
2312vec_unpackh(__vector unsigned char __a) {
2313 return __builtin_s390_vuplhb(__a);
2314}
2315
2316static inline __ATTRS_o_ai __vector signed int
2317vec_unpackh(__vector signed short __a) {
2318 return __builtin_s390_vuphh(__a);
2319}
2320
2321static inline __ATTRS_o_ai __vector __bool int
2322vec_unpackh(__vector __bool short __a) {
2323 return (__vector __bool int)__builtin_s390_vuphh((__vector signed short)__a);
2324}
2325
2326static inline __ATTRS_o_ai __vector unsigned int
2327vec_unpackh(__vector unsigned short __a) {
2328 return __builtin_s390_vuplhh(__a);
2329}
2330
2331static inline __ATTRS_o_ai __vector signed long long
2332vec_unpackh(__vector signed int __a) {
2333 return __builtin_s390_vuphf(__a);
2334}
2335
2336static inline __ATTRS_o_ai __vector __bool long long
2337vec_unpackh(__vector __bool int __a) {
2338 return ((__vector __bool long long)
2339 __builtin_s390_vuphf((__vector signed int)__a));
2340}
2341
2342static inline __ATTRS_o_ai __vector unsigned long long
2343vec_unpackh(__vector unsigned int __a) {
2344 return __builtin_s390_vuplhf(__a);
2345}
2346
2347/*-- vec_unpackl ------------------------------------------------------------*/
2348
2349static inline __ATTRS_o_ai __vector signed short
2350vec_unpackl(__vector signed char __a) {
2351 return __builtin_s390_vuplb(__a);
2352}
2353
2354static inline __ATTRS_o_ai __vector __bool short
2355vec_unpackl(__vector __bool char __a) {
2356 return ((__vector __bool short)
2357 __builtin_s390_vuplb((__vector signed char)__a));
2358}
2359
2360static inline __ATTRS_o_ai __vector unsigned short
2361vec_unpackl(__vector unsigned char __a) {
2362 return __builtin_s390_vupllb(__a);
2363}
2364
2365static inline __ATTRS_o_ai __vector signed int
2366vec_unpackl(__vector signed short __a) {
2367 return __builtin_s390_vuplhw(__a);
2368}
2369
2370static inline __ATTRS_o_ai __vector __bool int
2371vec_unpackl(__vector __bool short __a) {
2372 return ((__vector __bool int)
2373 __builtin_s390_vuplhw((__vector signed short)__a));
2374}
2375
2376static inline __ATTRS_o_ai __vector unsigned int
2377vec_unpackl(__vector unsigned short __a) {
2378 return __builtin_s390_vupllh(__a);
2379}
2380
2381static inline __ATTRS_o_ai __vector signed long long
2382vec_unpackl(__vector signed int __a) {
2383 return __builtin_s390_vuplf(__a);
2384}
2385
2386static inline __ATTRS_o_ai __vector __bool long long
2387vec_unpackl(__vector __bool int __a) {
2388 return ((__vector __bool long long)
2389 __builtin_s390_vuplf((__vector signed int)__a));
2390}
2391
2392static inline __ATTRS_o_ai __vector unsigned long long
2393vec_unpackl(__vector unsigned int __a) {
2394 return __builtin_s390_vupllf(__a);
2395}
2396
2397/*-- vec_cmpeq --------------------------------------------------------------*/
2398
2399static inline __ATTRS_o_ai __vector __bool char
2400vec_cmpeq(__vector __bool char __a, __vector __bool char __b) {
2401 return (__vector __bool char)(__a == __b);
2402}
2403
2404static inline __ATTRS_o_ai __vector __bool char
2405vec_cmpeq(__vector signed char __a, __vector signed char __b) {
2406 return (__vector __bool char)(__a == __b);
2407}
2408
2409static inline __ATTRS_o_ai __vector __bool char
2410vec_cmpeq(__vector unsigned char __a, __vector unsigned char __b) {
2411 return (__vector __bool char)(__a == __b);
2412}
2413
2414static inline __ATTRS_o_ai __vector __bool short
2415vec_cmpeq(__vector __bool short __a, __vector __bool short __b) {
2416 return (__vector __bool short)(__a == __b);
2417}
2418
2419static inline __ATTRS_o_ai __vector __bool short
2420vec_cmpeq(__vector signed short __a, __vector signed short __b) {
2421 return (__vector __bool short)(__a == __b);
2422}
2423
2424static inline __ATTRS_o_ai __vector __bool short
2425vec_cmpeq(__vector unsigned short __a, __vector unsigned short __b) {
2426 return (__vector __bool short)(__a == __b);
2427}
2428
2429static inline __ATTRS_o_ai __vector __bool int
2430vec_cmpeq(__vector __bool int __a, __vector __bool int __b) {
2431 return (__vector __bool int)(__a == __b);
2432}
2433
2434static inline __ATTRS_o_ai __vector __bool int
2435vec_cmpeq(__vector signed int __a, __vector signed int __b) {
2436 return (__vector __bool int)(__a == __b);
2437}
2438
2439static inline __ATTRS_o_ai __vector __bool int
2440vec_cmpeq(__vector unsigned int __a, __vector unsigned int __b) {
2441 return (__vector __bool int)(__a == __b);
2442}
2443
2444static inline __ATTRS_o_ai __vector __bool long long
2445vec_cmpeq(__vector __bool long long __a, __vector __bool long long __b) {
2446 return (__vector __bool long long)(__a == __b);
2447}
2448
2449static inline __ATTRS_o_ai __vector __bool long long
2450vec_cmpeq(__vector signed long long __a, __vector signed long long __b) {
2451 return (__vector __bool long long)(__a == __b);
2452}
2453
2454static inline __ATTRS_o_ai __vector __bool long long
2455vec_cmpeq(__vector unsigned long long __a, __vector unsigned long long __b) {
2456 return (__vector __bool long long)(__a == __b);
2457}
2458
2459#if __ARCH__ >= 12
2460static inline __ATTRS_o_ai __vector __bool int
2461vec_cmpeq(__vector float __a, __vector float __b) {
2462 return (__vector __bool int)(__a == __b);
2463}
2464#endif
2465
2466static inline __ATTRS_o_ai __vector __bool long long
2467vec_cmpeq(__vector double __a, __vector double __b) {
2468 return (__vector __bool long long)(__a == __b);
2469}
2470
2471/*-- vec_cmpge --------------------------------------------------------------*/
2472
2473static inline __ATTRS_o_ai __vector __bool char
2474vec_cmpge(__vector signed char __a, __vector signed char __b) {
2475 return (__vector __bool char)(__a >= __b);
2476}
2477
2478static inline __ATTRS_o_ai __vector __bool char
2479vec_cmpge(__vector unsigned char __a, __vector unsigned char __b) {
2480 return (__vector __bool char)(__a >= __b);
2481}
2482
2483static inline __ATTRS_o_ai __vector __bool short
2484vec_cmpge(__vector signed short __a, __vector signed short __b) {
2485 return (__vector __bool short)(__a >= __b);
2486}
2487
2488static inline __ATTRS_o_ai __vector __bool short
2489vec_cmpge(__vector unsigned short __a, __vector unsigned short __b) {
2490 return (__vector __bool short)(__a >= __b);
2491}
2492
2493static inline __ATTRS_o_ai __vector __bool int
2494vec_cmpge(__vector signed int __a, __vector signed int __b) {
2495 return (__vector __bool int)(__a >= __b);
2496}
2497
2498static inline __ATTRS_o_ai __vector __bool int
2499vec_cmpge(__vector unsigned int __a, __vector unsigned int __b) {
2500 return (__vector __bool int)(__a >= __b);
2501}
2502
2503static inline __ATTRS_o_ai __vector __bool long long
2504vec_cmpge(__vector signed long long __a, __vector signed long long __b) {
2505 return (__vector __bool long long)(__a >= __b);
2506}
2507
2508static inline __ATTRS_o_ai __vector __bool long long
2509vec_cmpge(__vector unsigned long long __a, __vector unsigned long long __b) {
2510 return (__vector __bool long long)(__a >= __b);
2511}
2512
2513#if __ARCH__ >= 12
2514static inline __ATTRS_o_ai __vector __bool int
2515vec_cmpge(__vector float __a, __vector float __b) {
2516 return (__vector __bool int)(__a >= __b);
2517}
2518#endif
2519
2520static inline __ATTRS_o_ai __vector __bool long long
2521vec_cmpge(__vector double __a, __vector double __b) {
2522 return (__vector __bool long long)(__a >= __b);
2523}
2524
2525/*-- vec_cmpgt --------------------------------------------------------------*/
2526
2527static inline __ATTRS_o_ai __vector __bool char
2528vec_cmpgt(__vector signed char __a, __vector signed char __b) {
2529 return (__vector __bool char)(__a > __b);
2530}
2531
2532static inline __ATTRS_o_ai __vector __bool char
2533vec_cmpgt(__vector unsigned char __a, __vector unsigned char __b) {
2534 return (__vector __bool char)(__a > __b);
2535}
2536
2537static inline __ATTRS_o_ai __vector __bool short
2538vec_cmpgt(__vector signed short __a, __vector signed short __b) {
2539 return (__vector __bool short)(__a > __b);
2540}
2541
2542static inline __ATTRS_o_ai __vector __bool short
2543vec_cmpgt(__vector unsigned short __a, __vector unsigned short __b) {
2544 return (__vector __bool short)(__a > __b);
2545}
2546
2547static inline __ATTRS_o_ai __vector __bool int
2548vec_cmpgt(__vector signed int __a, __vector signed int __b) {
2549 return (__vector __bool int)(__a > __b);
2550}
2551
2552static inline __ATTRS_o_ai __vector __bool int
2553vec_cmpgt(__vector unsigned int __a, __vector unsigned int __b) {
2554 return (__vector __bool int)(__a > __b);
2555}
2556
2557static inline __ATTRS_o_ai __vector __bool long long
2558vec_cmpgt(__vector signed long long __a, __vector signed long long __b) {
2559 return (__vector __bool long long)(__a > __b);
2560}
2561
2562static inline __ATTRS_o_ai __vector __bool long long
2563vec_cmpgt(__vector unsigned long long __a, __vector unsigned long long __b) {
2564 return (__vector __bool long long)(__a > __b);
2565}
2566
2567#if __ARCH__ >= 12
2568static inline __ATTRS_o_ai __vector __bool int
2569vec_cmpgt(__vector float __a, __vector float __b) {
2570 return (__vector __bool int)(__a > __b);
2571}
2572#endif
2573
2574static inline __ATTRS_o_ai __vector __bool long long
2575vec_cmpgt(__vector double __a, __vector double __b) {
2576 return (__vector __bool long long)(__a > __b);
2577}
2578
2579/*-- vec_cmple --------------------------------------------------------------*/
2580
2581static inline __ATTRS_o_ai __vector __bool char
2582vec_cmple(__vector signed char __a, __vector signed char __b) {
2583 return (__vector __bool char)(__a <= __b);
2584}
2585
2586static inline __ATTRS_o_ai __vector __bool char
2587vec_cmple(__vector unsigned char __a, __vector unsigned char __b) {
2588 return (__vector __bool char)(__a <= __b);
2589}
2590
2591static inline __ATTRS_o_ai __vector __bool short
2592vec_cmple(__vector signed short __a, __vector signed short __b) {
2593 return (__vector __bool short)(__a <= __b);
2594}
2595
2596static inline __ATTRS_o_ai __vector __bool short
2597vec_cmple(__vector unsigned short __a, __vector unsigned short __b) {
2598 return (__vector __bool short)(__a <= __b);
2599}
2600
2601static inline __ATTRS_o_ai __vector __bool int
2602vec_cmple(__vector signed int __a, __vector signed int __b) {
2603 return (__vector __bool int)(__a <= __b);
2604}
2605
2606static inline __ATTRS_o_ai __vector __bool int
2607vec_cmple(__vector unsigned int __a, __vector unsigned int __b) {
2608 return (__vector __bool int)(__a <= __b);
2609}
2610
2611static inline __ATTRS_o_ai __vector __bool long long
2612vec_cmple(__vector signed long long __a, __vector signed long long __b) {
2613 return (__vector __bool long long)(__a <= __b);
2614}
2615
2616static inline __ATTRS_o_ai __vector __bool long long
2617vec_cmple(__vector unsigned long long __a, __vector unsigned long long __b) {
2618 return (__vector __bool long long)(__a <= __b);
2619}
2620
2621#if __ARCH__ >= 12
2622static inline __ATTRS_o_ai __vector __bool int
2623vec_cmple(__vector float __a, __vector float __b) {
2624 return (__vector __bool int)(__a <= __b);
2625}
2626#endif
2627
2628static inline __ATTRS_o_ai __vector __bool long long
2629vec_cmple(__vector double __a, __vector double __b) {
2630 return (__vector __bool long long)(__a <= __b);
2631}
2632
2633/*-- vec_cmplt --------------------------------------------------------------*/
2634
2635static inline __ATTRS_o_ai __vector __bool char
2636vec_cmplt(__vector signed char __a, __vector signed char __b) {
2637 return (__vector __bool char)(__a < __b);
2638}
2639
2640static inline __ATTRS_o_ai __vector __bool char
2641vec_cmplt(__vector unsigned char __a, __vector unsigned char __b) {
2642 return (__vector __bool char)(__a < __b);
2643}
2644
2645static inline __ATTRS_o_ai __vector __bool short
2646vec_cmplt(__vector signed short __a, __vector signed short __b) {
2647 return (__vector __bool short)(__a < __b);
2648}
2649
2650static inline __ATTRS_o_ai __vector __bool short
2651vec_cmplt(__vector unsigned short __a, __vector unsigned short __b) {
2652 return (__vector __bool short)(__a < __b);
2653}
2654
2655static inline __ATTRS_o_ai __vector __bool int
2656vec_cmplt(__vector signed int __a, __vector signed int __b) {
2657 return (__vector __bool int)(__a < __b);
2658}
2659
2660static inline __ATTRS_o_ai __vector __bool int
2661vec_cmplt(__vector unsigned int __a, __vector unsigned int __b) {
2662 return (__vector __bool int)(__a < __b);
2663}
2664
2665static inline __ATTRS_o_ai __vector __bool long long
2666vec_cmplt(__vector signed long long __a, __vector signed long long __b) {
2667 return (__vector __bool long long)(__a < __b);
2668}
2669
2670static inline __ATTRS_o_ai __vector __bool long long
2671vec_cmplt(__vector unsigned long long __a, __vector unsigned long long __b) {
2672 return (__vector __bool long long)(__a < __b);
2673}
2674
2675#if __ARCH__ >= 12
2676static inline __ATTRS_o_ai __vector __bool int
2677vec_cmplt(__vector float __a, __vector float __b) {
2678 return (__vector __bool int)(__a < __b);
2679}
2680#endif
2681
2682static inline __ATTRS_o_ai __vector __bool long long
2683vec_cmplt(__vector double __a, __vector double __b) {
2684 return (__vector __bool long long)(__a < __b);
2685}
2686
2687/*-- vec_all_eq -------------------------------------------------------------*/
2688
2689static inline __ATTRS_o_ai int
2690vec_all_eq(__vector signed char __a, __vector signed char __b) {
2691 int __cc;
2692 __builtin_s390_vceqbs(__a, __b, &__cc);
2693 return __cc == 0;
2694}
2695
2696// This prototype is deprecated.
2697static inline __ATTRS_o_ai int
2698vec_all_eq(__vector signed char __a, __vector __bool char __b) {
2699 int __cc;
2700 __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc);
2701 return __cc == 0;
2702}
2703
2704// This prototype is deprecated.
2705static inline __ATTRS_o_ai int
2706vec_all_eq(__vector __bool char __a, __vector signed char __b) {
2707 int __cc;
2708 __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc);
2709 return __cc == 0;
2710}
2711
2712static inline __ATTRS_o_ai int
2713vec_all_eq(__vector unsigned char __a, __vector unsigned char __b) {
2714 int __cc;
2715 __builtin_s390_vceqbs((__vector signed char)__a,
2716 (__vector signed char)__b, &__cc);
2717 return __cc == 0;
2718}
2719
2720// This prototype is deprecated.
2721static inline __ATTRS_o_ai int
2722vec_all_eq(__vector unsigned char __a, __vector __bool char __b) {
2723 int __cc;
2724 __builtin_s390_vceqbs((__vector signed char)__a,
2725 (__vector signed char)__b, &__cc);
2726 return __cc == 0;
2727}
2728
2729// This prototype is deprecated.
2730static inline __ATTRS_o_ai int
2731vec_all_eq(__vector __bool char __a, __vector unsigned char __b) {
2732 int __cc;
2733 __builtin_s390_vceqbs((__vector signed char)__a,
2734 (__vector signed char)__b, &__cc);
2735 return __cc == 0;
2736}
2737
2738static inline __ATTRS_o_ai int
2739vec_all_eq(__vector __bool char __a, __vector __bool char __b) {
2740 int __cc;
2741 __builtin_s390_vceqbs((__vector signed char)__a,
2742 (__vector signed char)__b, &__cc);
2743 return __cc == 0;
2744}
2745
2746static inline __ATTRS_o_ai int
2747vec_all_eq(__vector signed short __a, __vector signed short __b) {
2748 int __cc;
2749 __builtin_s390_vceqhs(__a, __b, &__cc);
2750 return __cc == 0;
2751}
2752
2753// This prototype is deprecated.
2754static inline __ATTRS_o_ai int
2755vec_all_eq(__vector signed short __a, __vector __bool short __b) {
2756 int __cc;
2757 __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc);
2758 return __cc == 0;
2759}
2760
2761// This prototype is deprecated.
2762static inline __ATTRS_o_ai int
2763vec_all_eq(__vector __bool short __a, __vector signed short __b) {
2764 int __cc;
2765 __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc);
2766 return __cc == 0;
2767}
2768
2769static inline __ATTRS_o_ai int
2770vec_all_eq(__vector unsigned short __a, __vector unsigned short __b) {
2771 int __cc;
2772 __builtin_s390_vceqhs((__vector signed short)__a,
2773 (__vector signed short)__b, &__cc);
2774 return __cc == 0;
2775}
2776
2777// This prototype is deprecated.
2778static inline __ATTRS_o_ai int
2779vec_all_eq(__vector unsigned short __a, __vector __bool short __b) {
2780 int __cc;
2781 __builtin_s390_vceqhs((__vector signed short)__a,
2782 (__vector signed short)__b, &__cc);
2783 return __cc == 0;
2784}
2785
2786// This prototype is deprecated.
2787static inline __ATTRS_o_ai int
2788vec_all_eq(__vector __bool short __a, __vector unsigned short __b) {
2789 int __cc;
2790 __builtin_s390_vceqhs((__vector signed short)__a,
2791 (__vector signed short)__b, &__cc);
2792 return __cc == 0;
2793}
2794
2795static inline __ATTRS_o_ai int
2796vec_all_eq(__vector __bool short __a, __vector __bool short __b) {
2797 int __cc;
2798 __builtin_s390_vceqhs((__vector signed short)__a,
2799 (__vector signed short)__b, &__cc);
2800 return __cc == 0;
2801}
2802
2803static inline __ATTRS_o_ai int
2804vec_all_eq(__vector signed int __a, __vector signed int __b) {
2805 int __cc;
2806 __builtin_s390_vceqfs(__a, __b, &__cc);
2807 return __cc == 0;
2808}
2809
2810// This prototype is deprecated.
2811static inline __ATTRS_o_ai int
2812vec_all_eq(__vector signed int __a, __vector __bool int __b) {
2813 int __cc;
2814 __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc);
2815 return __cc == 0;
2816}
2817
2818// This prototype is deprecated.
2819static inline __ATTRS_o_ai int
2820vec_all_eq(__vector __bool int __a, __vector signed int __b) {
2821 int __cc;
2822 __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc);
2823 return __cc == 0;
2824}
2825
2826static inline __ATTRS_o_ai int
2827vec_all_eq(__vector unsigned int __a, __vector unsigned int __b) {
2828 int __cc;
2829 __builtin_s390_vceqfs((__vector signed int)__a,
2830 (__vector signed int)__b, &__cc);
2831 return __cc == 0;
2832}
2833
2834// This prototype is deprecated.
2835static inline __ATTRS_o_ai int
2836vec_all_eq(__vector unsigned int __a, __vector __bool int __b) {
2837 int __cc;
2838 __builtin_s390_vceqfs((__vector signed int)__a,
2839 (__vector signed int)__b, &__cc);
2840 return __cc == 0;
2841}
2842
2843// This prototype is deprecated.
2844static inline __ATTRS_o_ai int
2845vec_all_eq(__vector __bool int __a, __vector unsigned int __b) {
2846 int __cc;
2847 __builtin_s390_vceqfs((__vector signed int)__a,
2848 (__vector signed int)__b, &__cc);
2849 return __cc == 0;
2850}
2851
2852static inline __ATTRS_o_ai int
2853vec_all_eq(__vector __bool int __a, __vector __bool int __b) {
2854 int __cc;
2855 __builtin_s390_vceqfs((__vector signed int)__a,
2856 (__vector signed int)__b, &__cc);
2857 return __cc == 0;
2858}
2859
2860static inline __ATTRS_o_ai int
2861vec_all_eq(__vector signed long long __a, __vector signed long long __b) {
2862 int __cc;
2863 __builtin_s390_vceqgs(__a, __b, &__cc);
2864 return __cc == 0;
2865}
2866
2867// This prototype is deprecated.
2868static inline __ATTRS_o_ai int
2869vec_all_eq(__vector signed long long __a, __vector __bool long long __b) {
2870 int __cc;
2871 __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc);
2872 return __cc == 0;
2873}
2874
2875// This prototype is deprecated.
2876static inline __ATTRS_o_ai int
2877vec_all_eq(__vector __bool long long __a, __vector signed long long __b) {
2878 int __cc;
2879 __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc);
2880 return __cc == 0;
2881}
2882
2883static inline __ATTRS_o_ai int
2884vec_all_eq(__vector unsigned long long __a, __vector unsigned long long __b) {
2885 int __cc;
2886 __builtin_s390_vceqgs((__vector signed long long)__a,
2887 (__vector signed long long)__b, &__cc);
2888 return __cc == 0;
2889}
2890
2891// This prototype is deprecated.
2892static inline __ATTRS_o_ai int
2893vec_all_eq(__vector unsigned long long __a, __vector __bool long long __b) {
2894 int __cc;
2895 __builtin_s390_vceqgs((__vector signed long long)__a,
2896 (__vector signed long long)__b, &__cc);
2897 return __cc == 0;
2898}
2899
2900// This prototype is deprecated.
2901static inline __ATTRS_o_ai int
2902vec_all_eq(__vector __bool long long __a, __vector unsigned long long __b) {
2903 int __cc;
2904 __builtin_s390_vceqgs((__vector signed long long)__a,
2905 (__vector signed long long)__b, &__cc);
2906 return __cc == 0;
2907}
2908
2909static inline __ATTRS_o_ai int
2910vec_all_eq(__vector __bool long long __a, __vector __bool long long __b) {
2911 int __cc;
2912 __builtin_s390_vceqgs((__vector signed long long)__a,
2913 (__vector signed long long)__b, &__cc);
2914 return __cc == 0;
2915}
2916
2917#if __ARCH__ >= 12
2918static inline __ATTRS_o_ai int
2919vec_all_eq(__vector float __a, __vector float __b) {
2920 int __cc;
2921 __builtin_s390_vfcesbs(__a, __b, &__cc);
2922 return __cc == 0;
2923}
2924#endif
2925
2926static inline __ATTRS_o_ai int
2927vec_all_eq(__vector double __a, __vector double __b) {
2928 int __cc;
2929 __builtin_s390_vfcedbs(__a, __b, &__cc);
2930 return __cc == 0;
2931}
2932
2933/*-- vec_all_ne -------------------------------------------------------------*/
2934
2935static inline __ATTRS_o_ai int
2936vec_all_ne(__vector signed char __a, __vector signed char __b) {
2937 int __cc;
2938 __builtin_s390_vceqbs(__a, __b, &__cc);
2939 return __cc == 3;
2940}
2941
2942// This prototype is deprecated.
2943static inline __ATTRS_o_ai int
2944vec_all_ne(__vector signed char __a, __vector __bool char __b) {
2945 int __cc;
2946 __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc);
2947 return __cc == 3;
2948}
2949
2950// This prototype is deprecated.
2951static inline __ATTRS_o_ai int
2952vec_all_ne(__vector __bool char __a, __vector signed char __b) {
2953 int __cc;
2954 __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc);
2955 return __cc == 3;
2956}
2957
2958static inline __ATTRS_o_ai int
2959vec_all_ne(__vector unsigned char __a, __vector unsigned char __b) {
2960 int __cc;
2961 __builtin_s390_vceqbs((__vector signed char)__a,
2962 (__vector signed char)__b, &__cc);
2963 return __cc == 3;
2964}
2965
2966// This prototype is deprecated.
2967static inline __ATTRS_o_ai int
2968vec_all_ne(__vector unsigned char __a, __vector __bool char __b) {
2969 int __cc;
2970 __builtin_s390_vceqbs((__vector signed char)__a,
2971 (__vector signed char)__b, &__cc);
2972 return __cc == 3;
2973}
2974
2975// This prototype is deprecated.
2976static inline __ATTRS_o_ai int
2977vec_all_ne(__vector __bool char __a, __vector unsigned char __b) {
2978 int __cc;
2979 __builtin_s390_vceqbs((__vector signed char)__a,
2980 (__vector signed char)__b, &__cc);
2981 return __cc == 3;
2982}
2983
2984static inline __ATTRS_o_ai int
2985vec_all_ne(__vector __bool char __a, __vector __bool char __b) {
2986 int __cc;
2987 __builtin_s390_vceqbs((__vector signed char)__a,
2988 (__vector signed char)__b, &__cc);
2989 return __cc == 3;
2990}
2991
2992static inline __ATTRS_o_ai int
2993vec_all_ne(__vector signed short __a, __vector signed short __b) {
2994 int __cc;
2995 __builtin_s390_vceqhs(__a, __b, &__cc);
2996 return __cc == 3;
2997}
2998
2999// This prototype is deprecated.
3000static inline __ATTRS_o_ai int
3001vec_all_ne(__vector signed short __a, __vector __bool short __b) {
3002 int __cc;
3003 __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc);
3004 return __cc == 3;
3005}
3006
3007// This prototype is deprecated.
3008static inline __ATTRS_o_ai int
3009vec_all_ne(__vector __bool short __a, __vector signed short __b) {
3010 int __cc;
3011 __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc);
3012 return __cc == 3;
3013}
3014
3015static inline __ATTRS_o_ai int
3016vec_all_ne(__vector unsigned short __a, __vector unsigned short __b) {
3017 int __cc;
3018 __builtin_s390_vceqhs((__vector signed short)__a,
3019 (__vector signed short)__b, &__cc);
3020 return __cc == 3;
3021}
3022
3023// This prototype is deprecated.
3024static inline __ATTRS_o_ai int
3025vec_all_ne(__vector unsigned short __a, __vector __bool short __b) {
3026 int __cc;
3027 __builtin_s390_vceqhs((__vector signed short)__a,
3028 (__vector signed short)__b, &__cc);
3029 return __cc == 3;
3030}
3031
3032// This prototype is deprecated.
3033static inline __ATTRS_o_ai int
3034vec_all_ne(__vector __bool short __a, __vector unsigned short __b) {
3035 int __cc;
3036 __builtin_s390_vceqhs((__vector signed short)__a,
3037 (__vector signed short)__b, &__cc);
3038 return __cc == 3;
3039}
3040
3041static inline __ATTRS_o_ai int
3042vec_all_ne(__vector __bool short __a, __vector __bool short __b) {
3043 int __cc;
3044 __builtin_s390_vceqhs((__vector signed short)__a,
3045 (__vector signed short)__b, &__cc);
3046 return __cc == 3;
3047}
3048
3049static inline __ATTRS_o_ai int
3050vec_all_ne(__vector signed int __a, __vector signed int __b) {
3051 int __cc;
3052 __builtin_s390_vceqfs(__a, __b, &__cc);
3053 return __cc == 3;
3054}
3055
3056// This prototype is deprecated.
3057static inline __ATTRS_o_ai int
3058vec_all_ne(__vector signed int __a, __vector __bool int __b) {
3059 int __cc;
3060 __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc);
3061 return __cc == 3;
3062}
3063
3064// This prototype is deprecated.
3065static inline __ATTRS_o_ai int
3066vec_all_ne(__vector __bool int __a, __vector signed int __b) {
3067 int __cc;
3068 __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc);
3069 return __cc == 3;
3070}
3071
3072static inline __ATTRS_o_ai int
3073vec_all_ne(__vector unsigned int __a, __vector unsigned int __b) {
3074 int __cc;
3075 __builtin_s390_vceqfs((__vector signed int)__a,
3076 (__vector signed int)__b, &__cc);
3077 return __cc == 3;
3078}
3079
3080// This prototype is deprecated.
3081static inline __ATTRS_o_ai int
3082vec_all_ne(__vector unsigned int __a, __vector __bool int __b) {
3083 int __cc;
3084 __builtin_s390_vceqfs((__vector signed int)__a,
3085 (__vector signed int)__b, &__cc);
3086 return __cc == 3;
3087}
3088
3089// This prototype is deprecated.
3090static inline __ATTRS_o_ai int
3091vec_all_ne(__vector __bool int __a, __vector unsigned int __b) {
3092 int __cc;
3093 __builtin_s390_vceqfs((__vector signed int)__a,
3094 (__vector signed int)__b, &__cc);
3095 return __cc == 3;
3096}
3097
3098static inline __ATTRS_o_ai int
3099vec_all_ne(__vector __bool int __a, __vector __bool int __b) {
3100 int __cc;
3101 __builtin_s390_vceqfs((__vector signed int)__a,
3102 (__vector signed int)__b, &__cc);
3103 return __cc == 3;
3104}
3105
3106static inline __ATTRS_o_ai int
3107vec_all_ne(__vector signed long long __a, __vector signed long long __b) {
3108 int __cc;
3109 __builtin_s390_vceqgs(__a, __b, &__cc);
3110 return __cc == 3;
3111}
3112
3113// This prototype is deprecated.
3114static inline __ATTRS_o_ai int
3115vec_all_ne(__vector signed long long __a, __vector __bool long long __b) {
3116 int __cc;
3117 __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc);
3118 return __cc == 3;
3119}
3120
3121// This prototype is deprecated.
3122static inline __ATTRS_o_ai int
3123vec_all_ne(__vector __bool long long __a, __vector signed long long __b) {
3124 int __cc;
3125 __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc);
3126 return __cc == 3;
3127}
3128
3129static inline __ATTRS_o_ai int
3130vec_all_ne(__vector unsigned long long __a, __vector unsigned long long __b) {
3131 int __cc;
3132 __builtin_s390_vceqgs((__vector signed long long)__a,
3133 (__vector signed long long)__b, &__cc);
3134 return __cc == 3;
3135}
3136
3137// This prototype is deprecated.
3138static inline __ATTRS_o_ai int
3139vec_all_ne(__vector unsigned long long __a, __vector __bool long long __b) {
3140 int __cc;
3141 __builtin_s390_vceqgs((__vector signed long long)__a,
3142 (__vector signed long long)__b, &__cc);
3143 return __cc == 3;
3144}
3145
3146// This prototype is deprecated.
3147static inline __ATTRS_o_ai int
3148vec_all_ne(__vector __bool long long __a, __vector unsigned long long __b) {
3149 int __cc;
3150 __builtin_s390_vceqgs((__vector signed long long)__a,
3151 (__vector signed long long)__b, &__cc);
3152 return __cc == 3;
3153}
3154
3155static inline __ATTRS_o_ai int
3156vec_all_ne(__vector __bool long long __a, __vector __bool long long __b) {
3157 int __cc;
3158 __builtin_s390_vceqgs((__vector signed long long)__a,
3159 (__vector signed long long)__b, &__cc);
3160 return __cc == 3;
3161}
3162
3163#if __ARCH__ >= 12
3164static inline __ATTRS_o_ai int
3165vec_all_ne(__vector float __a, __vector float __b) {
3166 int __cc;
3167 __builtin_s390_vfcesbs(__a, __b, &__cc);
3168 return __cc == 3;
3169}
3170#endif
3171
3172static inline __ATTRS_o_ai int
3173vec_all_ne(__vector double __a, __vector double __b) {
3174 int __cc;
3175 __builtin_s390_vfcedbs(__a, __b, &__cc);
3176 return __cc == 3;
3177}
3178
3179/*-- vec_all_ge -------------------------------------------------------------*/
3180
3181static inline __ATTRS_o_ai int
3182vec_all_ge(__vector signed char __a, __vector signed char __b) {
3183 int __cc;
3184 __builtin_s390_vchbs(__b, __a, &__cc);
3185 return __cc == 3;
3186}
3187
3188// This prototype is deprecated.
3189static inline __ATTRS_o_ai int
3190vec_all_ge(__vector signed char __a, __vector __bool char __b) {
3191 int __cc;
3192 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
3193 return __cc == 3;
3194}
3195
3196// This prototype is deprecated.
3197static inline __ATTRS_o_ai int
3198vec_all_ge(__vector __bool char __a, __vector signed char __b) {
3199 int __cc;
3200 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
3201 return __cc == 3;
3202}
3203
3204static inline __ATTRS_o_ai int
3205vec_all_ge(__vector unsigned char __a, __vector unsigned char __b) {
3206 int __cc;
3207 __builtin_s390_vchlbs(__b, __a, &__cc);
3208 return __cc == 3;
3209}
3210
3211// This prototype is deprecated.
3212static inline __ATTRS_o_ai int
3213vec_all_ge(__vector unsigned char __a, __vector __bool char __b) {
3214 int __cc;
3215 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
3216 return __cc == 3;
3217}
3218
3219// This prototype is deprecated.
3220static inline __ATTRS_o_ai int
3221vec_all_ge(__vector __bool char __a, __vector unsigned char __b) {
3222 int __cc;
3223 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
3224 return __cc == 3;
3225}
3226
3227// This prototype is deprecated.
3228static inline __ATTRS_o_ai int
3229vec_all_ge(__vector __bool char __a, __vector __bool char __b) {
3230 int __cc;
3231 __builtin_s390_vchlbs((__vector unsigned char)__b,
3232 (__vector unsigned char)__a, &__cc);
3233 return __cc == 3;
3234}
3235
3236static inline __ATTRS_o_ai int
3237vec_all_ge(__vector signed short __a, __vector signed short __b) {
3238 int __cc;
3239 __builtin_s390_vchhs(__b, __a, &__cc);
3240 return __cc == 3;
3241}
3242
3243// This prototype is deprecated.
3244static inline __ATTRS_o_ai int
3245vec_all_ge(__vector signed short __a, __vector __bool short __b) {
3246 int __cc;
3247 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
3248 return __cc == 3;
3249}
3250
3251// This prototype is deprecated.
3252static inline __ATTRS_o_ai int
3253vec_all_ge(__vector __bool short __a, __vector signed short __b) {
3254 int __cc;
3255 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
3256 return __cc == 3;
3257}
3258
3259static inline __ATTRS_o_ai int
3260vec_all_ge(__vector unsigned short __a, __vector unsigned short __b) {
3261 int __cc;
3262 __builtin_s390_vchlhs(__b, __a, &__cc);
3263 return __cc == 3;
3264}
3265
3266// This prototype is deprecated.
3267static inline __ATTRS_o_ai int
3268vec_all_ge(__vector unsigned short __a, __vector __bool short __b) {
3269 int __cc;
3270 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
3271 return __cc == 3;
3272}
3273
3274// This prototype is deprecated.
3275static inline __ATTRS_o_ai int
3276vec_all_ge(__vector __bool short __a, __vector unsigned short __b) {
3277 int __cc;
3278 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
3279 return __cc == 3;
3280}
3281
3282// This prototype is deprecated.
3283static inline __ATTRS_o_ai int
3284vec_all_ge(__vector __bool short __a, __vector __bool short __b) {
3285 int __cc;
3286 __builtin_s390_vchlhs((__vector unsigned short)__b,
3287 (__vector unsigned short)__a, &__cc);
3288 return __cc == 3;
3289}
3290
3291static inline __ATTRS_o_ai int
3292vec_all_ge(__vector signed int __a, __vector signed int __b) {
3293 int __cc;
3294 __builtin_s390_vchfs(__b, __a, &__cc);
3295 return __cc == 3;
3296}
3297
3298// This prototype is deprecated.
3299static inline __ATTRS_o_ai int
3300vec_all_ge(__vector signed int __a, __vector __bool int __b) {
3301 int __cc;
3302 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
3303 return __cc == 3;
3304}
3305
3306// This prototype is deprecated.
3307static inline __ATTRS_o_ai int
3308vec_all_ge(__vector __bool int __a, __vector signed int __b) {
3309 int __cc;
3310 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
3311 return __cc == 3;
3312}
3313
3314static inline __ATTRS_o_ai int
3315vec_all_ge(__vector unsigned int __a, __vector unsigned int __b) {
3316 int __cc;
3317 __builtin_s390_vchlfs(__b, __a, &__cc);
3318 return __cc == 3;
3319}
3320
3321// This prototype is deprecated.
3322static inline __ATTRS_o_ai int
3323vec_all_ge(__vector unsigned int __a, __vector __bool int __b) {
3324 int __cc;
3325 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
3326 return __cc == 3;
3327}
3328
3329// This prototype is deprecated.
3330static inline __ATTRS_o_ai int
3331vec_all_ge(__vector __bool int __a, __vector unsigned int __b) {
3332 int __cc;
3333 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
3334 return __cc == 3;
3335}
3336
3337// This prototype is deprecated.
3338static inline __ATTRS_o_ai int
3339vec_all_ge(__vector __bool int __a, __vector __bool int __b) {
3340 int __cc;
3341 __builtin_s390_vchlfs((__vector unsigned int)__b,
3342 (__vector unsigned int)__a, &__cc);
3343 return __cc == 3;
3344}
3345
3346static inline __ATTRS_o_ai int
3347vec_all_ge(__vector signed long long __a, __vector signed long long __b) {
3348 int __cc;
3349 __builtin_s390_vchgs(__b, __a, &__cc);
3350 return __cc == 3;
3351}
3352
3353// This prototype is deprecated.
3354static inline __ATTRS_o_ai int
3355vec_all_ge(__vector signed long long __a, __vector __bool long long __b) {
3356 int __cc;
3357 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
3358 return __cc == 3;
3359}
3360
3361// This prototype is deprecated.
3362static inline __ATTRS_o_ai int
3363vec_all_ge(__vector __bool long long __a, __vector signed long long __b) {
3364 int __cc;
3365 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
3366 return __cc == 3;
3367}
3368
3369static inline __ATTRS_o_ai int
3370vec_all_ge(__vector unsigned long long __a, __vector unsigned long long __b) {
3371 int __cc;
3372 __builtin_s390_vchlgs(__b, __a, &__cc);
3373 return __cc == 3;
3374}
3375
3376// This prototype is deprecated.
3377static inline __ATTRS_o_ai int
3378vec_all_ge(__vector unsigned long long __a, __vector __bool long long __b) {
3379 int __cc;
3380 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
3381 return __cc == 3;
3382}
3383
3384// This prototype is deprecated.
3385static inline __ATTRS_o_ai int
3386vec_all_ge(__vector __bool long long __a, __vector unsigned long long __b) {
3387 int __cc;
3388 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
3389 return __cc == 3;
3390}
3391
3392// This prototype is deprecated.
3393static inline __ATTRS_o_ai int
3394vec_all_ge(__vector __bool long long __a, __vector __bool long long __b) {
3395 int __cc;
3396 __builtin_s390_vchlgs((__vector unsigned long long)__b,
3397 (__vector unsigned long long)__a, &__cc);
3398 return __cc == 3;
3399}
3400
3401#if __ARCH__ >= 12
3402static inline __ATTRS_o_ai int
3403vec_all_ge(__vector float __a, __vector float __b) {
3404 int __cc;
3405 __builtin_s390_vfchesbs(__a, __b, &__cc);
3406 return __cc == 0;
3407}
3408#endif
3409
3410static inline __ATTRS_o_ai int
3411vec_all_ge(__vector double __a, __vector double __b) {
3412 int __cc;
3413 __builtin_s390_vfchedbs(__a, __b, &__cc);
3414 return __cc == 0;
3415}
3416
3417/*-- vec_all_gt -------------------------------------------------------------*/
3418
3419static inline __ATTRS_o_ai int
3420vec_all_gt(__vector signed char __a, __vector signed char __b) {
3421 int __cc;
3422 __builtin_s390_vchbs(__a, __b, &__cc);
3423 return __cc == 0;
3424}
3425
3426// This prototype is deprecated.
3427static inline __ATTRS_o_ai int
3428vec_all_gt(__vector signed char __a, __vector __bool char __b) {
3429 int __cc;
3430 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
3431 return __cc == 0;
3432}
3433
3434// This prototype is deprecated.
3435static inline __ATTRS_o_ai int
3436vec_all_gt(__vector __bool char __a, __vector signed char __b) {
3437 int __cc;
3438 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
3439 return __cc == 0;
3440}
3441
3442static inline __ATTRS_o_ai int
3443vec_all_gt(__vector unsigned char __a, __vector unsigned char __b) {
3444 int __cc;
3445 __builtin_s390_vchlbs(__a, __b, &__cc);
3446 return __cc == 0;
3447}
3448
3449// This prototype is deprecated.
3450static inline __ATTRS_o_ai int
3451vec_all_gt(__vector unsigned char __a, __vector __bool char __b) {
3452 int __cc;
3453 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
3454 return __cc == 0;
3455}
3456
3457// This prototype is deprecated.
3458static inline __ATTRS_o_ai int
3459vec_all_gt(__vector __bool char __a, __vector unsigned char __b) {
3460 int __cc;
3461 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
3462 return __cc == 0;
3463}
3464
3465// This prototype is deprecated.
3466static inline __ATTRS_o_ai int
3467vec_all_gt(__vector __bool char __a, __vector __bool char __b) {
3468 int __cc;
3469 __builtin_s390_vchlbs((__vector unsigned char)__a,
3470 (__vector unsigned char)__b, &__cc);
3471 return __cc == 0;
3472}
3473
3474static inline __ATTRS_o_ai int
3475vec_all_gt(__vector signed short __a, __vector signed short __b) {
3476 int __cc;
3477 __builtin_s390_vchhs(__a, __b, &__cc);
3478 return __cc == 0;
3479}
3480
3481// This prototype is deprecated.
3482static inline __ATTRS_o_ai int
3483vec_all_gt(__vector signed short __a, __vector __bool short __b) {
3484 int __cc;
3485 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
3486 return __cc == 0;
3487}
3488
3489// This prototype is deprecated.
3490static inline __ATTRS_o_ai int
3491vec_all_gt(__vector __bool short __a, __vector signed short __b) {
3492 int __cc;
3493 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
3494 return __cc == 0;
3495}
3496
3497static inline __ATTRS_o_ai int
3498vec_all_gt(__vector unsigned short __a, __vector unsigned short __b) {
3499 int __cc;
3500 __builtin_s390_vchlhs(__a, __b, &__cc);
3501 return __cc == 0;
3502}
3503
3504// This prototype is deprecated.
3505static inline __ATTRS_o_ai int
3506vec_all_gt(__vector unsigned short __a, __vector __bool short __b) {
3507 int __cc;
3508 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
3509 return __cc == 0;
3510}
3511
3512// This prototype is deprecated.
3513static inline __ATTRS_o_ai int
3514vec_all_gt(__vector __bool short __a, __vector unsigned short __b) {
3515 int __cc;
3516 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
3517 return __cc == 0;
3518}
3519
3520// This prototype is deprecated.
3521static inline __ATTRS_o_ai int
3522vec_all_gt(__vector __bool short __a, __vector __bool short __b) {
3523 int __cc;
3524 __builtin_s390_vchlhs((__vector unsigned short)__a,
3525 (__vector unsigned short)__b, &__cc);
3526 return __cc == 0;
3527}
3528
3529static inline __ATTRS_o_ai int
3530vec_all_gt(__vector signed int __a, __vector signed int __b) {
3531 int __cc;
3532 __builtin_s390_vchfs(__a, __b, &__cc);
3533 return __cc == 0;
3534}
3535
3536// This prototype is deprecated.
3537static inline __ATTRS_o_ai int
3538vec_all_gt(__vector signed int __a, __vector __bool int __b) {
3539 int __cc;
3540 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
3541 return __cc == 0;
3542}
3543
3544// This prototype is deprecated.
3545static inline __ATTRS_o_ai int
3546vec_all_gt(__vector __bool int __a, __vector signed int __b) {
3547 int __cc;
3548 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
3549 return __cc == 0;
3550}
3551
3552static inline __ATTRS_o_ai int
3553vec_all_gt(__vector unsigned int __a, __vector unsigned int __b) {
3554 int __cc;
3555 __builtin_s390_vchlfs(__a, __b, &__cc);
3556 return __cc == 0;
3557}
3558
3559// This prototype is deprecated.
3560static inline __ATTRS_o_ai int
3561vec_all_gt(__vector unsigned int __a, __vector __bool int __b) {
3562 int __cc;
3563 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
3564 return __cc == 0;
3565}
3566
3567// This prototype is deprecated.
3568static inline __ATTRS_o_ai int
3569vec_all_gt(__vector __bool int __a, __vector unsigned int __b) {
3570 int __cc;
3571 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
3572 return __cc == 0;
3573}
3574
3575// This prototype is deprecated.
3576static inline __ATTRS_o_ai int
3577vec_all_gt(__vector __bool int __a, __vector __bool int __b) {
3578 int __cc;
3579 __builtin_s390_vchlfs((__vector unsigned int)__a,
3580 (__vector unsigned int)__b, &__cc);
3581 return __cc == 0;
3582}
3583
3584static inline __ATTRS_o_ai int
3585vec_all_gt(__vector signed long long __a, __vector signed long long __b) {
3586 int __cc;
3587 __builtin_s390_vchgs(__a, __b, &__cc);
3588 return __cc == 0;
3589}
3590
3591// This prototype is deprecated.
3592static inline __ATTRS_o_ai int
3593vec_all_gt(__vector signed long long __a, __vector __bool long long __b) {
3594 int __cc;
3595 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
3596 return __cc == 0;
3597}
3598
3599// This prototype is deprecated.
3600static inline __ATTRS_o_ai int
3601vec_all_gt(__vector __bool long long __a, __vector signed long long __b) {
3602 int __cc;
3603 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
3604 return __cc == 0;
3605}
3606
3607static inline __ATTRS_o_ai int
3608vec_all_gt(__vector unsigned long long __a, __vector unsigned long long __b) {
3609 int __cc;
3610 __builtin_s390_vchlgs(__a, __b, &__cc);
3611 return __cc == 0;
3612}
3613
3614// This prototype is deprecated.
3615static inline __ATTRS_o_ai int
3616vec_all_gt(__vector unsigned long long __a, __vector __bool long long __b) {
3617 int __cc;
3618 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
3619 return __cc == 0;
3620}
3621
3622// This prototype is deprecated.
3623static inline __ATTRS_o_ai int
3624vec_all_gt(__vector __bool long long __a, __vector unsigned long long __b) {
3625 int __cc;
3626 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
3627 return __cc == 0;
3628}
3629
3630// This prototype is deprecated.
3631static inline __ATTRS_o_ai int
3632vec_all_gt(__vector __bool long long __a, __vector __bool long long __b) {
3633 int __cc;
3634 __builtin_s390_vchlgs((__vector unsigned long long)__a,
3635 (__vector unsigned long long)__b, &__cc);
3636 return __cc == 0;
3637}
3638
3639#if __ARCH__ >= 12
3640static inline __ATTRS_o_ai int
3641vec_all_gt(__vector float __a, __vector float __b) {
3642 int __cc;
3643 __builtin_s390_vfchsbs(__a, __b, &__cc);
3644 return __cc == 0;
3645}
3646#endif
3647
3648static inline __ATTRS_o_ai int
3649vec_all_gt(__vector double __a, __vector double __b) {
3650 int __cc;
3651 __builtin_s390_vfchdbs(__a, __b, &__cc);
3652 return __cc == 0;
3653}
3654
3655/*-- vec_all_le -------------------------------------------------------------*/
3656
3657static inline __ATTRS_o_ai int
3658vec_all_le(__vector signed char __a, __vector signed char __b) {
3659 int __cc;
3660 __builtin_s390_vchbs(__a, __b, &__cc);
3661 return __cc == 3;
3662}
3663
3664// This prototype is deprecated.
3665static inline __ATTRS_o_ai int
3666vec_all_le(__vector signed char __a, __vector __bool char __b) {
3667 int __cc;
3668 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
3669 return __cc == 3;
3670}
3671
3672// This prototype is deprecated.
3673static inline __ATTRS_o_ai int
3674vec_all_le(__vector __bool char __a, __vector signed char __b) {
3675 int __cc;
3676 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
3677 return __cc == 3;
3678}
3679
3680static inline __ATTRS_o_ai int
3681vec_all_le(__vector unsigned char __a, __vector unsigned char __b) {
3682 int __cc;
3683 __builtin_s390_vchlbs(__a, __b, &__cc);
3684 return __cc == 3;
3685}
3686
3687// This prototype is deprecated.
3688static inline __ATTRS_o_ai int
3689vec_all_le(__vector unsigned char __a, __vector __bool char __b) {
3690 int __cc;
3691 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
3692 return __cc == 3;
3693}
3694
3695// This prototype is deprecated.
3696static inline __ATTRS_o_ai int
3697vec_all_le(__vector __bool char __a, __vector unsigned char __b) {
3698 int __cc;
3699 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
3700 return __cc == 3;
3701}
3702
3703// This prototype is deprecated.
3704static inline __ATTRS_o_ai int
3705vec_all_le(__vector __bool char __a, __vector __bool char __b) {
3706 int __cc;
3707 __builtin_s390_vchlbs((__vector unsigned char)__a,
3708 (__vector unsigned char)__b, &__cc);
3709 return __cc == 3;
3710}
3711
3712static inline __ATTRS_o_ai int
3713vec_all_le(__vector signed short __a, __vector signed short __b) {
3714 int __cc;
3715 __builtin_s390_vchhs(__a, __b, &__cc);
3716 return __cc == 3;
3717}
3718
3719// This prototype is deprecated.
3720static inline __ATTRS_o_ai int
3721vec_all_le(__vector signed short __a, __vector __bool short __b) {
3722 int __cc;
3723 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
3724 return __cc == 3;
3725}
3726
3727// This prototype is deprecated.
3728static inline __ATTRS_o_ai int
3729vec_all_le(__vector __bool short __a, __vector signed short __b) {
3730 int __cc;
3731 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
3732 return __cc == 3;
3733}
3734
3735static inline __ATTRS_o_ai int
3736vec_all_le(__vector unsigned short __a, __vector unsigned short __b) {
3737 int __cc;
3738 __builtin_s390_vchlhs(__a, __b, &__cc);
3739 return __cc == 3;
3740}
3741
3742// This prototype is deprecated.
3743static inline __ATTRS_o_ai int
3744vec_all_le(__vector unsigned short __a, __vector __bool short __b) {
3745 int __cc;
3746 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
3747 return __cc == 3;
3748}
3749
3750// This prototype is deprecated.
3751static inline __ATTRS_o_ai int
3752vec_all_le(__vector __bool short __a, __vector unsigned short __b) {
3753 int __cc;
3754 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
3755 return __cc == 3;
3756}
3757
3758// This prototype is deprecated.
3759static inline __ATTRS_o_ai int
3760vec_all_le(__vector __bool short __a, __vector __bool short __b) {
3761 int __cc;
3762 __builtin_s390_vchlhs((__vector unsigned short)__a,
3763 (__vector unsigned short)__b, &__cc);
3764 return __cc == 3;
3765}
3766
3767static inline __ATTRS_o_ai int
3768vec_all_le(__vector signed int __a, __vector signed int __b) {
3769 int __cc;
3770 __builtin_s390_vchfs(__a, __b, &__cc);
3771 return __cc == 3;
3772}
3773
3774// This prototype is deprecated.
3775static inline __ATTRS_o_ai int
3776vec_all_le(__vector signed int __a, __vector __bool int __b) {
3777 int __cc;
3778 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
3779 return __cc == 3;
3780}
3781
3782// This prototype is deprecated.
3783static inline __ATTRS_o_ai int
3784vec_all_le(__vector __bool int __a, __vector signed int __b) {
3785 int __cc;
3786 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
3787 return __cc == 3;
3788}
3789
3790static inline __ATTRS_o_ai int
3791vec_all_le(__vector unsigned int __a, __vector unsigned int __b) {
3792 int __cc;
3793 __builtin_s390_vchlfs(__a, __b, &__cc);
3794 return __cc == 3;
3795}
3796
3797// This prototype is deprecated.
3798static inline __ATTRS_o_ai int
3799vec_all_le(__vector unsigned int __a, __vector __bool int __b) {
3800 int __cc;
3801 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
3802 return __cc == 3;
3803}
3804
3805// This prototype is deprecated.
3806static inline __ATTRS_o_ai int
3807vec_all_le(__vector __bool int __a, __vector unsigned int __b) {
3808 int __cc;
3809 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
3810 return __cc == 3;
3811}
3812
3813// This prototype is deprecated.
3814static inline __ATTRS_o_ai int
3815vec_all_le(__vector __bool int __a, __vector __bool int __b) {
3816 int __cc;
3817 __builtin_s390_vchlfs((__vector unsigned int)__a,
3818 (__vector unsigned int)__b, &__cc);
3819 return __cc == 3;
3820}
3821
3822static inline __ATTRS_o_ai int
3823vec_all_le(__vector signed long long __a, __vector signed long long __b) {
3824 int __cc;
3825 __builtin_s390_vchgs(__a, __b, &__cc);
3826 return __cc == 3;
3827}
3828
3829// This prototype is deprecated.
3830static inline __ATTRS_o_ai int
3831vec_all_le(__vector signed long long __a, __vector __bool long long __b) {
3832 int __cc;
3833 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
3834 return __cc == 3;
3835}
3836
3837// This prototype is deprecated.
3838static inline __ATTRS_o_ai int
3839vec_all_le(__vector __bool long long __a, __vector signed long long __b) {
3840 int __cc;
3841 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
3842 return __cc == 3;
3843}
3844
3845static inline __ATTRS_o_ai int
3846vec_all_le(__vector unsigned long long __a, __vector unsigned long long __b) {
3847 int __cc;
3848 __builtin_s390_vchlgs(__a, __b, &__cc);
3849 return __cc == 3;
3850}
3851
3852// This prototype is deprecated.
3853static inline __ATTRS_o_ai int
3854vec_all_le(__vector unsigned long long __a, __vector __bool long long __b) {
3855 int __cc;
3856 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
3857 return __cc == 3;
3858}
3859
3860// This prototype is deprecated.
3861static inline __ATTRS_o_ai int
3862vec_all_le(__vector __bool long long __a, __vector unsigned long long __b) {
3863 int __cc;
3864 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
3865 return __cc == 3;
3866}
3867
3868// This prototype is deprecated.
3869static inline __ATTRS_o_ai int
3870vec_all_le(__vector __bool long long __a, __vector __bool long long __b) {
3871 int __cc;
3872 __builtin_s390_vchlgs((__vector unsigned long long)__a,
3873 (__vector unsigned long long)__b, &__cc);
3874 return __cc == 3;
3875}
3876
3877#if __ARCH__ >= 12
3878static inline __ATTRS_o_ai int
3879vec_all_le(__vector float __a, __vector float __b) {
3880 int __cc;
3881 __builtin_s390_vfchesbs(__b, __a, &__cc);
3882 return __cc == 0;
3883}
3884#endif
3885
3886static inline __ATTRS_o_ai int
3887vec_all_le(__vector double __a, __vector double __b) {
3888 int __cc;
3889 __builtin_s390_vfchedbs(__b, __a, &__cc);
3890 return __cc == 0;
3891}
3892
3893/*-- vec_all_lt -------------------------------------------------------------*/
3894
3895static inline __ATTRS_o_ai int
3896vec_all_lt(__vector signed char __a, __vector signed char __b) {
3897 int __cc;
3898 __builtin_s390_vchbs(__b, __a, &__cc);
3899 return __cc == 0;
3900}
3901
3902// This prototype is deprecated.
3903static inline __ATTRS_o_ai int
3904vec_all_lt(__vector signed char __a, __vector __bool char __b) {
3905 int __cc;
3906 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
3907 return __cc == 0;
3908}
3909
3910// This prototype is deprecated.
3911static inline __ATTRS_o_ai int
3912vec_all_lt(__vector __bool char __a, __vector signed char __b) {
3913 int __cc;
3914 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
3915 return __cc == 0;
3916}
3917
3918static inline __ATTRS_o_ai int
3919vec_all_lt(__vector unsigned char __a, __vector unsigned char __b) {
3920 int __cc;
3921 __builtin_s390_vchlbs(__b, __a, &__cc);
3922 return __cc == 0;
3923}
3924
3925// This prototype is deprecated.
3926static inline __ATTRS_o_ai int
3927vec_all_lt(__vector unsigned char __a, __vector __bool char __b) {
3928 int __cc;
3929 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
3930 return __cc == 0;
3931}
3932
3933// This prototype is deprecated.
3934static inline __ATTRS_o_ai int
3935vec_all_lt(__vector __bool char __a, __vector unsigned char __b) {
3936 int __cc;
3937 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
3938 return __cc == 0;
3939}
3940
3941// This prototype is deprecated.
3942static inline __ATTRS_o_ai int
3943vec_all_lt(__vector __bool char __a, __vector __bool char __b) {
3944 int __cc;
3945 __builtin_s390_vchlbs((__vector unsigned char)__b,
3946 (__vector unsigned char)__a, &__cc);
3947 return __cc == 0;
3948}
3949
3950static inline __ATTRS_o_ai int
3951vec_all_lt(__vector signed short __a, __vector signed short __b) {
3952 int __cc;
3953 __builtin_s390_vchhs(__b, __a, &__cc);
3954 return __cc == 0;
3955}
3956
3957// This prototype is deprecated.
3958static inline __ATTRS_o_ai int
3959vec_all_lt(__vector signed short __a, __vector __bool short __b) {
3960 int __cc;
3961 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
3962 return __cc == 0;
3963}
3964
3965// This prototype is deprecated.
3966static inline __ATTRS_o_ai int
3967vec_all_lt(__vector __bool short __a, __vector signed short __b) {
3968 int __cc;
3969 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
3970 return __cc == 0;
3971}
3972
3973static inline __ATTRS_o_ai int
3974vec_all_lt(__vector unsigned short __a, __vector unsigned short __b) {
3975 int __cc;
3976 __builtin_s390_vchlhs(__b, __a, &__cc);
3977 return __cc == 0;
3978}
3979
3980// This prototype is deprecated.
3981static inline __ATTRS_o_ai int
3982vec_all_lt(__vector unsigned short __a, __vector __bool short __b) {
3983 int __cc;
3984 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
3985 return __cc == 0;
3986}
3987
3988// This prototype is deprecated.
3989static inline __ATTRS_o_ai int
3990vec_all_lt(__vector __bool short __a, __vector unsigned short __b) {
3991 int __cc;
3992 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
3993 return __cc == 0;
3994}
3995
3996// This prototype is deprecated.
3997static inline __ATTRS_o_ai int
3998vec_all_lt(__vector __bool short __a, __vector __bool short __b) {
3999 int __cc;
4000 __builtin_s390_vchlhs((__vector unsigned short)__b,
4001 (__vector unsigned short)__a, &__cc);
4002 return __cc == 0;
4003}
4004
4005static inline __ATTRS_o_ai int
4006vec_all_lt(__vector signed int __a, __vector signed int __b) {
4007 int __cc;
4008 __builtin_s390_vchfs(__b, __a, &__cc);
4009 return __cc == 0;
4010}
4011
4012// This prototype is deprecated.
4013static inline __ATTRS_o_ai int
4014vec_all_lt(__vector signed int __a, __vector __bool int __b) {
4015 int __cc;
4016 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
4017 return __cc == 0;
4018}
4019
4020// This prototype is deprecated.
4021static inline __ATTRS_o_ai int
4022vec_all_lt(__vector __bool int __a, __vector signed int __b) {
4023 int __cc;
4024 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
4025 return __cc == 0;
4026}
4027
4028static inline __ATTRS_o_ai int
4029vec_all_lt(__vector unsigned int __a, __vector unsigned int __b) {
4030 int __cc;
4031 __builtin_s390_vchlfs(__b, __a, &__cc);
4032 return __cc == 0;
4033}
4034
4035// This prototype is deprecated.
4036static inline __ATTRS_o_ai int
4037vec_all_lt(__vector unsigned int __a, __vector __bool int __b) {
4038 int __cc;
4039 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
4040 return __cc == 0;
4041}
4042
4043// This prototype is deprecated.
4044static inline __ATTRS_o_ai int
4045vec_all_lt(__vector __bool int __a, __vector unsigned int __b) {
4046 int __cc;
4047 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
4048 return __cc == 0;
4049}
4050
4051// This prototype is deprecated.
4052static inline __ATTRS_o_ai int
4053vec_all_lt(__vector __bool int __a, __vector __bool int __b) {
4054 int __cc;
4055 __builtin_s390_vchlfs((__vector unsigned int)__b,
4056 (__vector unsigned int)__a, &__cc);
4057 return __cc == 0;
4058}
4059
4060static inline __ATTRS_o_ai int
4061vec_all_lt(__vector signed long long __a, __vector signed long long __b) {
4062 int __cc;
4063 __builtin_s390_vchgs(__b, __a, &__cc);
4064 return __cc == 0;
4065}
4066
4067// This prototype is deprecated.
4068static inline __ATTRS_o_ai int
4069vec_all_lt(__vector signed long long __a, __vector __bool long long __b) {
4070 int __cc;
4071 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
4072 return __cc == 0;
4073}
4074
4075// This prototype is deprecated.
4076static inline __ATTRS_o_ai int
4077vec_all_lt(__vector __bool long long __a, __vector signed long long __b) {
4078 int __cc;
4079 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
4080 return __cc == 0;
4081}
4082
4083static inline __ATTRS_o_ai int
4084vec_all_lt(__vector unsigned long long __a, __vector unsigned long long __b) {
4085 int __cc;
4086 __builtin_s390_vchlgs(__b, __a, &__cc);
4087 return __cc == 0;
4088}
4089
4090// This prototype is deprecated.
4091static inline __ATTRS_o_ai int
4092vec_all_lt(__vector unsigned long long __a, __vector __bool long long __b) {
4093 int __cc;
4094 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
4095 return __cc == 0;
4096}
4097
4098// This prototype is deprecated.
4099static inline __ATTRS_o_ai int
4100vec_all_lt(__vector __bool long long __a, __vector unsigned long long __b) {
4101 int __cc;
4102 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
4103 return __cc == 0;
4104}
4105
4106// This prototype is deprecated.
4107static inline __ATTRS_o_ai int
4108vec_all_lt(__vector __bool long long __a, __vector __bool long long __b) {
4109 int __cc;
4110 __builtin_s390_vchlgs((__vector unsigned long long)__b,
4111 (__vector unsigned long long)__a, &__cc);
4112 return __cc == 0;
4113}
4114
4115#if __ARCH__ >= 12
4116static inline __ATTRS_o_ai int
4117vec_all_lt(__vector float __a, __vector float __b) {
4118 int __cc;
4119 __builtin_s390_vfchsbs(__b, __a, &__cc);
4120 return __cc == 0;
4121}
4122#endif
4123
4124static inline __ATTRS_o_ai int
4125vec_all_lt(__vector double __a, __vector double __b) {
4126 int __cc;
4127 __builtin_s390_vfchdbs(__b, __a, &__cc);
4128 return __cc == 0;
4129}
4130
4131/*-- vec_all_nge ------------------------------------------------------------*/
4132
4133#if __ARCH__ >= 12
4134static inline __ATTRS_o_ai int
4135vec_all_nge(__vector float __a, __vector float __b) {
4136 int __cc;
4137 __builtin_s390_vfchesbs(__a, __b, &__cc);
4138 return __cc == 3;
4139}
4140#endif
4141
4142static inline __ATTRS_o_ai int
4143vec_all_nge(__vector double __a, __vector double __b) {
4144 int __cc;
4145 __builtin_s390_vfchedbs(__a, __b, &__cc);
4146 return __cc == 3;
4147}
4148
4149/*-- vec_all_ngt ------------------------------------------------------------*/
4150
4151#if __ARCH__ >= 12
4152static inline __ATTRS_o_ai int
4153vec_all_ngt(__vector float __a, __vector float __b) {
4154 int __cc;
4155 __builtin_s390_vfchsbs(__a, __b, &__cc);
4156 return __cc == 3;
4157}
4158#endif
4159
4160static inline __ATTRS_o_ai int
4161vec_all_ngt(__vector double __a, __vector double __b) {
4162 int __cc;
4163 __builtin_s390_vfchdbs(__a, __b, &__cc);
4164 return __cc == 3;
4165}
4166
4167/*-- vec_all_nle ------------------------------------------------------------*/
4168
4169#if __ARCH__ >= 12
4170static inline __ATTRS_o_ai int
4171vec_all_nle(__vector float __a, __vector float __b) {
4172 int __cc;
4173 __builtin_s390_vfchesbs(__b, __a, &__cc);
4174 return __cc == 3;
4175}
4176#endif
4177
4178static inline __ATTRS_o_ai int
4179vec_all_nle(__vector double __a, __vector double __b) {
4180 int __cc;
4181 __builtin_s390_vfchedbs(__b, __a, &__cc);
4182 return __cc == 3;
4183}
4184
4185/*-- vec_all_nlt ------------------------------------------------------------*/
4186
4187#if __ARCH__ >= 12
4188static inline __ATTRS_o_ai int
4189vec_all_nlt(__vector float __a, __vector float __b) {
4190 int __cc;
4191 __builtin_s390_vfchsbs(__b, __a, &__cc);
4192 return __cc == 3;
4193}
4194#endif
4195
4196static inline __ATTRS_o_ai int
4197vec_all_nlt(__vector double __a, __vector double __b) {
4198 int __cc;
4199 __builtin_s390_vfchdbs(__b, __a, &__cc);
4200 return __cc == 3;
4201}
4202
4203/*-- vec_all_nan ------------------------------------------------------------*/
4204
4205#if __ARCH__ >= 12
4206static inline __ATTRS_o_ai int
4207vec_all_nan(__vector float __a) {
4208 int __cc;
4209 __builtin_s390_vftcisb(__a, 15, &__cc);
4210 return __cc == 0;
4211}
4212#endif
4213
4214static inline __ATTRS_o_ai int
4215vec_all_nan(__vector double __a) {
4216 int __cc;
4217 __builtin_s390_vftcidb(__a, 15, &__cc);
4218 return __cc == 0;
4219}
4220
4221/*-- vec_all_numeric --------------------------------------------------------*/
4222
4223#if __ARCH__ >= 12
4224static inline __ATTRS_o_ai int
4225vec_all_numeric(__vector float __a) {
4226 int __cc;
4227 __builtin_s390_vftcisb(__a, 15, &__cc);
4228 return __cc == 3;
4229}
4230#endif
4231
4232static inline __ATTRS_o_ai int
4233vec_all_numeric(__vector double __a) {
4234 int __cc;
4235 __builtin_s390_vftcidb(__a, 15, &__cc);
4236 return __cc == 3;
4237}
4238
4239/*-- vec_any_eq -------------------------------------------------------------*/
4240
4241static inline __ATTRS_o_ai int
4242vec_any_eq(__vector signed char __a, __vector signed char __b) {
4243 int __cc;
4244 __builtin_s390_vceqbs(__a, __b, &__cc);
4245 return __cc <= 1;
4246}
4247
4248// This prototype is deprecated.
4249static inline __ATTRS_o_ai int
4250vec_any_eq(__vector signed char __a, __vector __bool char __b) {
4251 int __cc;
4252 __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc);
4253 return __cc <= 1;
4254}
4255
4256// This prototype is deprecated.
4257static inline __ATTRS_o_ai int
4258vec_any_eq(__vector __bool char __a, __vector signed char __b) {
4259 int __cc;
4260 __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc);
4261 return __cc <= 1;
4262}
4263
4264static inline __ATTRS_o_ai int
4265vec_any_eq(__vector unsigned char __a, __vector unsigned char __b) {
4266 int __cc;
4267 __builtin_s390_vceqbs((__vector signed char)__a,
4268 (__vector signed char)__b, &__cc);
4269 return __cc <= 1;
4270}
4271
4272// This prototype is deprecated.
4273static inline __ATTRS_o_ai int
4274vec_any_eq(__vector unsigned char __a, __vector __bool char __b) {
4275 int __cc;
4276 __builtin_s390_vceqbs((__vector signed char)__a,
4277 (__vector signed char)__b, &__cc);
4278 return __cc <= 1;
4279}
4280
4281// This prototype is deprecated.
4282static inline __ATTRS_o_ai int
4283vec_any_eq(__vector __bool char __a, __vector unsigned char __b) {
4284 int __cc;
4285 __builtin_s390_vceqbs((__vector signed char)__a,
4286 (__vector signed char)__b, &__cc);
4287 return __cc <= 1;
4288}
4289
4290static inline __ATTRS_o_ai int
4291vec_any_eq(__vector __bool char __a, __vector __bool char __b) {
4292 int __cc;
4293 __builtin_s390_vceqbs((__vector signed char)__a,
4294 (__vector signed char)__b, &__cc);
4295 return __cc <= 1;
4296}
4297
4298static inline __ATTRS_o_ai int
4299vec_any_eq(__vector signed short __a, __vector signed short __b) {
4300 int __cc;
4301 __builtin_s390_vceqhs(__a, __b, &__cc);
4302 return __cc <= 1;
4303}
4304
4305// This prototype is deprecated.
4306static inline __ATTRS_o_ai int
4307vec_any_eq(__vector signed short __a, __vector __bool short __b) {
4308 int __cc;
4309 __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc);
4310 return __cc <= 1;
4311}
4312
4313// This prototype is deprecated.
4314static inline __ATTRS_o_ai int
4315vec_any_eq(__vector __bool short __a, __vector signed short __b) {
4316 int __cc;
4317 __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc);
4318 return __cc <= 1;
4319}
4320
4321static inline __ATTRS_o_ai int
4322vec_any_eq(__vector unsigned short __a, __vector unsigned short __b) {
4323 int __cc;
4324 __builtin_s390_vceqhs((__vector signed short)__a,
4325 (__vector signed short)__b, &__cc);
4326 return __cc <= 1;
4327}
4328
4329// This prototype is deprecated.
4330static inline __ATTRS_o_ai int
4331vec_any_eq(__vector unsigned short __a, __vector __bool short __b) {
4332 int __cc;
4333 __builtin_s390_vceqhs((__vector signed short)__a,
4334 (__vector signed short)__b, &__cc);
4335 return __cc <= 1;
4336}
4337
4338// This prototype is deprecated.
4339static inline __ATTRS_o_ai int
4340vec_any_eq(__vector __bool short __a, __vector unsigned short __b) {
4341 int __cc;
4342 __builtin_s390_vceqhs((__vector signed short)__a,
4343 (__vector signed short)__b, &__cc);
4344 return __cc <= 1;
4345}
4346
4347static inline __ATTRS_o_ai int
4348vec_any_eq(__vector __bool short __a, __vector __bool short __b) {
4349 int __cc;
4350 __builtin_s390_vceqhs((__vector signed short)__a,
4351 (__vector signed short)__b, &__cc);
4352 return __cc <= 1;
4353}
4354
4355static inline __ATTRS_o_ai int
4356vec_any_eq(__vector signed int __a, __vector signed int __b) {
4357 int __cc;
4358 __builtin_s390_vceqfs(__a, __b, &__cc);
4359 return __cc <= 1;
4360}
4361
4362// This prototype is deprecated.
4363static inline __ATTRS_o_ai int
4364vec_any_eq(__vector signed int __a, __vector __bool int __b) {
4365 int __cc;
4366 __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc);
4367 return __cc <= 1;
4368}
4369
4370// This prototype is deprecated.
4371static inline __ATTRS_o_ai int
4372vec_any_eq(__vector __bool int __a, __vector signed int __b) {
4373 int __cc;
4374 __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc);
4375 return __cc <= 1;
4376}
4377
4378static inline __ATTRS_o_ai int
4379vec_any_eq(__vector unsigned int __a, __vector unsigned int __b) {
4380 int __cc;
4381 __builtin_s390_vceqfs((__vector signed int)__a,
4382 (__vector signed int)__b, &__cc);
4383 return __cc <= 1;
4384}
4385
4386// This prototype is deprecated.
4387static inline __ATTRS_o_ai int
4388vec_any_eq(__vector unsigned int __a, __vector __bool int __b) {
4389 int __cc;
4390 __builtin_s390_vceqfs((__vector signed int)__a,
4391 (__vector signed int)__b, &__cc);
4392 return __cc <= 1;
4393}
4394
4395// This prototype is deprecated.
4396static inline __ATTRS_o_ai int
4397vec_any_eq(__vector __bool int __a, __vector unsigned int __b) {
4398 int __cc;
4399 __builtin_s390_vceqfs((__vector signed int)__a,
4400 (__vector signed int)__b, &__cc);
4401 return __cc <= 1;
4402}
4403
4404static inline __ATTRS_o_ai int
4405vec_any_eq(__vector __bool int __a, __vector __bool int __b) {
4406 int __cc;
4407 __builtin_s390_vceqfs((__vector signed int)__a,
4408 (__vector signed int)__b, &__cc);
4409 return __cc <= 1;
4410}
4411
4412static inline __ATTRS_o_ai int
4413vec_any_eq(__vector signed long long __a, __vector signed long long __b) {
4414 int __cc;
4415 __builtin_s390_vceqgs(__a, __b, &__cc);
4416 return __cc <= 1;
4417}
4418
4419// This prototype is deprecated.
4420static inline __ATTRS_o_ai int
4421vec_any_eq(__vector signed long long __a, __vector __bool long long __b) {
4422 int __cc;
4423 __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc);
4424 return __cc <= 1;
4425}
4426
4427// This prototype is deprecated.
4428static inline __ATTRS_o_ai int
4429vec_any_eq(__vector __bool long long __a, __vector signed long long __b) {
4430 int __cc;
4431 __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc);
4432 return __cc <= 1;
4433}
4434
4435static inline __ATTRS_o_ai int
4436vec_any_eq(__vector unsigned long long __a, __vector unsigned long long __b) {
4437 int __cc;
4438 __builtin_s390_vceqgs((__vector signed long long)__a,
4439 (__vector signed long long)__b, &__cc);
4440 return __cc <= 1;
4441}
4442
4443// This prototype is deprecated.
4444static inline __ATTRS_o_ai int
4445vec_any_eq(__vector unsigned long long __a, __vector __bool long long __b) {
4446 int __cc;
4447 __builtin_s390_vceqgs((__vector signed long long)__a,
4448 (__vector signed long long)__b, &__cc);
4449 return __cc <= 1;
4450}
4451
4452// This prototype is deprecated.
4453static inline __ATTRS_o_ai int
4454vec_any_eq(__vector __bool long long __a, __vector unsigned long long __b) {
4455 int __cc;
4456 __builtin_s390_vceqgs((__vector signed long long)__a,
4457 (__vector signed long long)__b, &__cc);
4458 return __cc <= 1;
4459}
4460
4461static inline __ATTRS_o_ai int
4462vec_any_eq(__vector __bool long long __a, __vector __bool long long __b) {
4463 int __cc;
4464 __builtin_s390_vceqgs((__vector signed long long)__a,
4465 (__vector signed long long)__b, &__cc);
4466 return __cc <= 1;
4467}
4468
4469#if __ARCH__ >= 12
4470static inline __ATTRS_o_ai int
4471vec_any_eq(__vector float __a, __vector float __b) {
4472 int __cc;
4473 __builtin_s390_vfcesbs(__a, __b, &__cc);
4474 return __cc <= 1;
4475}
4476#endif
4477
4478static inline __ATTRS_o_ai int
4479vec_any_eq(__vector double __a, __vector double __b) {
4480 int __cc;
4481 __builtin_s390_vfcedbs(__a, __b, &__cc);
4482 return __cc <= 1;
4483}
4484
4485/*-- vec_any_ne -------------------------------------------------------------*/
4486
4487static inline __ATTRS_o_ai int
4488vec_any_ne(__vector signed char __a, __vector signed char __b) {
4489 int __cc;
4490 __builtin_s390_vceqbs(__a, __b, &__cc);
4491 return __cc != 0;
4492}
4493
4494// This prototype is deprecated.
4495static inline __ATTRS_o_ai int
4496vec_any_ne(__vector signed char __a, __vector __bool char __b) {
4497 int __cc;
4498 __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc);
4499 return __cc != 0;
4500}
4501
4502// This prototype is deprecated.
4503static inline __ATTRS_o_ai int
4504vec_any_ne(__vector __bool char __a, __vector signed char __b) {
4505 int __cc;
4506 __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc);
4507 return __cc != 0;
4508}
4509
4510static inline __ATTRS_o_ai int
4511vec_any_ne(__vector unsigned char __a, __vector unsigned char __b) {
4512 int __cc;
4513 __builtin_s390_vceqbs((__vector signed char)__a,
4514 (__vector signed char)__b, &__cc);
4515 return __cc != 0;
4516}
4517
4518// This prototype is deprecated.
4519static inline __ATTRS_o_ai int
4520vec_any_ne(__vector unsigned char __a, __vector __bool char __b) {
4521 int __cc;
4522 __builtin_s390_vceqbs((__vector signed char)__a,
4523 (__vector signed char)__b, &__cc);
4524 return __cc != 0;
4525}
4526
4527// This prototype is deprecated.
4528static inline __ATTRS_o_ai int
4529vec_any_ne(__vector __bool char __a, __vector unsigned char __b) {
4530 int __cc;
4531 __builtin_s390_vceqbs((__vector signed char)__a,
4532 (__vector signed char)__b, &__cc);
4533 return __cc != 0;
4534}
4535
4536static inline __ATTRS_o_ai int
4537vec_any_ne(__vector __bool char __a, __vector __bool char __b) {
4538 int __cc;
4539 __builtin_s390_vceqbs((__vector signed char)__a,
4540 (__vector signed char)__b, &__cc);
4541 return __cc != 0;
4542}
4543
4544static inline __ATTRS_o_ai int
4545vec_any_ne(__vector signed short __a, __vector signed short __b) {
4546 int __cc;
4547 __builtin_s390_vceqhs(__a, __b, &__cc);
4548 return __cc != 0;
4549}
4550
4551// This prototype is deprecated.
4552static inline __ATTRS_o_ai int
4553vec_any_ne(__vector signed short __a, __vector __bool short __b) {
4554 int __cc;
4555 __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc);
4556 return __cc != 0;
4557}
4558
4559// This prototype is deprecated.
4560static inline __ATTRS_o_ai int
4561vec_any_ne(__vector __bool short __a, __vector signed short __b) {
4562 int __cc;
4563 __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc);
4564 return __cc != 0;
4565}
4566
4567static inline __ATTRS_o_ai int
4568vec_any_ne(__vector unsigned short __a, __vector unsigned short __b) {
4569 int __cc;
4570 __builtin_s390_vceqhs((__vector signed short)__a,
4571 (__vector signed short)__b, &__cc);
4572 return __cc != 0;
4573}
4574
4575// This prototype is deprecated.
4576static inline __ATTRS_o_ai int
4577vec_any_ne(__vector unsigned short __a, __vector __bool short __b) {
4578 int __cc;
4579 __builtin_s390_vceqhs((__vector signed short)__a,
4580 (__vector signed short)__b, &__cc);
4581 return __cc != 0;
4582}
4583
4584// This prototype is deprecated.
4585static inline __ATTRS_o_ai int
4586vec_any_ne(__vector __bool short __a, __vector unsigned short __b) {
4587 int __cc;
4588 __builtin_s390_vceqhs((__vector signed short)__a,
4589 (__vector signed short)__b, &__cc);
4590 return __cc != 0;
4591}
4592
4593static inline __ATTRS_o_ai int
4594vec_any_ne(__vector __bool short __a, __vector __bool short __b) {
4595 int __cc;
4596 __builtin_s390_vceqhs((__vector signed short)__a,
4597 (__vector signed short)__b, &__cc);
4598 return __cc != 0;
4599}
4600
4601static inline __ATTRS_o_ai int
4602vec_any_ne(__vector signed int __a, __vector signed int __b) {
4603 int __cc;
4604 __builtin_s390_vceqfs(__a, __b, &__cc);
4605 return __cc != 0;
4606}
4607
4608// This prototype is deprecated.
4609static inline __ATTRS_o_ai int
4610vec_any_ne(__vector signed int __a, __vector __bool int __b) {
4611 int __cc;
4612 __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc);
4613 return __cc != 0;
4614}
4615
4616// This prototype is deprecated.
4617static inline __ATTRS_o_ai int
4618vec_any_ne(__vector __bool int __a, __vector signed int __b) {
4619 int __cc;
4620 __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc);
4621 return __cc != 0;
4622}
4623
4624static inline __ATTRS_o_ai int
4625vec_any_ne(__vector unsigned int __a, __vector unsigned int __b) {
4626 int __cc;
4627 __builtin_s390_vceqfs((__vector signed int)__a,
4628 (__vector signed int)__b, &__cc);
4629 return __cc != 0;
4630}
4631
4632// This prototype is deprecated.
4633static inline __ATTRS_o_ai int
4634vec_any_ne(__vector unsigned int __a, __vector __bool int __b) {
4635 int __cc;
4636 __builtin_s390_vceqfs((__vector signed int)__a,
4637 (__vector signed int)__b, &__cc);
4638 return __cc != 0;
4639}
4640
4641// This prototype is deprecated.
4642static inline __ATTRS_o_ai int
4643vec_any_ne(__vector __bool int __a, __vector unsigned int __b) {
4644 int __cc;
4645 __builtin_s390_vceqfs((__vector signed int)__a,
4646 (__vector signed int)__b, &__cc);
4647 return __cc != 0;
4648}
4649
4650static inline __ATTRS_o_ai int
4651vec_any_ne(__vector __bool int __a, __vector __bool int __b) {
4652 int __cc;
4653 __builtin_s390_vceqfs((__vector signed int)__a,
4654 (__vector signed int)__b, &__cc);
4655 return __cc != 0;
4656}
4657
4658static inline __ATTRS_o_ai int
4659vec_any_ne(__vector signed long long __a, __vector signed long long __b) {
4660 int __cc;
4661 __builtin_s390_vceqgs(__a, __b, &__cc);
4662 return __cc != 0;
4663}
4664
4665// This prototype is deprecated.
4666static inline __ATTRS_o_ai int
4667vec_any_ne(__vector signed long long __a, __vector __bool long long __b) {
4668 int __cc;
4669 __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc);
4670 return __cc != 0;
4671}
4672
4673// This prototype is deprecated.
4674static inline __ATTRS_o_ai int
4675vec_any_ne(__vector __bool long long __a, __vector signed long long __b) {
4676 int __cc;
4677 __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc);
4678 return __cc != 0;
4679}
4680
4681static inline __ATTRS_o_ai int
4682vec_any_ne(__vector unsigned long long __a, __vector unsigned long long __b) {
4683 int __cc;
4684 __builtin_s390_vceqgs((__vector signed long long)__a,
4685 (__vector signed long long)__b, &__cc);
4686 return __cc != 0;
4687}
4688
4689// This prototype is deprecated.
4690static inline __ATTRS_o_ai int
4691vec_any_ne(__vector unsigned long long __a, __vector __bool long long __b) {
4692 int __cc;
4693 __builtin_s390_vceqgs((__vector signed long long)__a,
4694 (__vector signed long long)__b, &__cc);
4695 return __cc != 0;
4696}
4697
4698// This prototype is deprecated.
4699static inline __ATTRS_o_ai int
4700vec_any_ne(__vector __bool long long __a, __vector unsigned long long __b) {
4701 int __cc;
4702 __builtin_s390_vceqgs((__vector signed long long)__a,
4703 (__vector signed long long)__b, &__cc);
4704 return __cc != 0;
4705}
4706
4707static inline __ATTRS_o_ai int
4708vec_any_ne(__vector __bool long long __a, __vector __bool long long __b) {
4709 int __cc;
4710 __builtin_s390_vceqgs((__vector signed long long)__a,
4711 (__vector signed long long)__b, &__cc);
4712 return __cc != 0;
4713}
4714
4715#if __ARCH__ >= 12
4716static inline __ATTRS_o_ai int
4717vec_any_ne(__vector float __a, __vector float __b) {
4718 int __cc;
4719 __builtin_s390_vfcesbs(__a, __b, &__cc);
4720 return __cc != 0;
4721}
4722#endif
4723
4724static inline __ATTRS_o_ai int
4725vec_any_ne(__vector double __a, __vector double __b) {
4726 int __cc;
4727 __builtin_s390_vfcedbs(__a, __b, &__cc);
4728 return __cc != 0;
4729}
4730
4731/*-- vec_any_ge -------------------------------------------------------------*/
4732
4733static inline __ATTRS_o_ai int
4734vec_any_ge(__vector signed char __a, __vector signed char __b) {
4735 int __cc;
4736 __builtin_s390_vchbs(__b, __a, &__cc);
4737 return __cc != 0;
4738}
4739
4740// This prototype is deprecated.
4741static inline __ATTRS_o_ai int
4742vec_any_ge(__vector signed char __a, __vector __bool char __b) {
4743 int __cc;
4744 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
4745 return __cc != 0;
4746}
4747
4748// This prototype is deprecated.
4749static inline __ATTRS_o_ai int
4750vec_any_ge(__vector __bool char __a, __vector signed char __b) {
4751 int __cc;
4752 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
4753 return __cc != 0;
4754}
4755
4756static inline __ATTRS_o_ai int
4757vec_any_ge(__vector unsigned char __a, __vector unsigned char __b) {
4758 int __cc;
4759 __builtin_s390_vchlbs(__b, __a, &__cc);
4760 return __cc != 0;
4761}
4762
4763// This prototype is deprecated.
4764static inline __ATTRS_o_ai int
4765vec_any_ge(__vector unsigned char __a, __vector __bool char __b) {
4766 int __cc;
4767 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
4768 return __cc != 0;
4769}
4770
4771// This prototype is deprecated.
4772static inline __ATTRS_o_ai int
4773vec_any_ge(__vector __bool char __a, __vector unsigned char __b) {
4774 int __cc;
4775 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
4776 return __cc != 0;
4777}
4778
4779// This prototype is deprecated.
4780static inline __ATTRS_o_ai int
4781vec_any_ge(__vector __bool char __a, __vector __bool char __b) {
4782 int __cc;
4783 __builtin_s390_vchlbs((__vector unsigned char)__b,
4784 (__vector unsigned char)__a, &__cc);
4785 return __cc != 0;
4786}
4787
4788static inline __ATTRS_o_ai int
4789vec_any_ge(__vector signed short __a, __vector signed short __b) {
4790 int __cc;
4791 __builtin_s390_vchhs(__b, __a, &__cc);
4792 return __cc != 0;
4793}
4794
4795// This prototype is deprecated.
4796static inline __ATTRS_o_ai int
4797vec_any_ge(__vector signed short __a, __vector __bool short __b) {
4798 int __cc;
4799 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
4800 return __cc != 0;
4801}
4802
4803// This prototype is deprecated.
4804static inline __ATTRS_o_ai int
4805vec_any_ge(__vector __bool short __a, __vector signed short __b) {
4806 int __cc;
4807 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
4808 return __cc != 0;
4809}
4810
4811static inline __ATTRS_o_ai int
4812vec_any_ge(__vector unsigned short __a, __vector unsigned short __b) {
4813 int __cc;
4814 __builtin_s390_vchlhs(__b, __a, &__cc);
4815 return __cc != 0;
4816}
4817
4818// This prototype is deprecated.
4819static inline __ATTRS_o_ai int
4820vec_any_ge(__vector unsigned short __a, __vector __bool short __b) {
4821 int __cc;
4822 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
4823 return __cc != 0;
4824}
4825
4826// This prototype is deprecated.
4827static inline __ATTRS_o_ai int
4828vec_any_ge(__vector __bool short __a, __vector unsigned short __b) {
4829 int __cc;
4830 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
4831 return __cc != 0;
4832}
4833
4834// This prototype is deprecated.
4835static inline __ATTRS_o_ai int
4836vec_any_ge(__vector __bool short __a, __vector __bool short __b) {
4837 int __cc;
4838 __builtin_s390_vchlhs((__vector unsigned short)__b,
4839 (__vector unsigned short)__a, &__cc);
4840 return __cc != 0;
4841}
4842
4843static inline __ATTRS_o_ai int
4844vec_any_ge(__vector signed int __a, __vector signed int __b) {
4845 int __cc;
4846 __builtin_s390_vchfs(__b, __a, &__cc);
4847 return __cc != 0;
4848}
4849
4850// This prototype is deprecated.
4851static inline __ATTRS_o_ai int
4852vec_any_ge(__vector signed int __a, __vector __bool int __b) {
4853 int __cc;
4854 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
4855 return __cc != 0;
4856}
4857
4858// This prototype is deprecated.
4859static inline __ATTRS_o_ai int
4860vec_any_ge(__vector __bool int __a, __vector signed int __b) {
4861 int __cc;
4862 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
4863 return __cc != 0;
4864}
4865
4866static inline __ATTRS_o_ai int
4867vec_any_ge(__vector unsigned int __a, __vector unsigned int __b) {
4868 int __cc;
4869 __builtin_s390_vchlfs(__b, __a, &__cc);
4870 return __cc != 0;
4871}
4872
4873// This prototype is deprecated.
4874static inline __ATTRS_o_ai int
4875vec_any_ge(__vector unsigned int __a, __vector __bool int __b) {
4876 int __cc;
4877 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
4878 return __cc != 0;
4879}
4880
4881// This prototype is deprecated.
4882static inline __ATTRS_o_ai int
4883vec_any_ge(__vector __bool int __a, __vector unsigned int __b) {
4884 int __cc;
4885 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
4886 return __cc != 0;
4887}
4888
4889// This prototype is deprecated.
4890static inline __ATTRS_o_ai int
4891vec_any_ge(__vector __bool int __a, __vector __bool int __b) {
4892 int __cc;
4893 __builtin_s390_vchlfs((__vector unsigned int)__b,
4894 (__vector unsigned int)__a, &__cc);
4895 return __cc != 0;
4896}
4897
4898static inline __ATTRS_o_ai int
4899vec_any_ge(__vector signed long long __a, __vector signed long long __b) {
4900 int __cc;
4901 __builtin_s390_vchgs(__b, __a, &__cc);
4902 return __cc != 0;
4903}
4904
4905// This prototype is deprecated.
4906static inline __ATTRS_o_ai int
4907vec_any_ge(__vector signed long long __a, __vector __bool long long __b) {
4908 int __cc;
4909 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
4910 return __cc != 0;
4911}
4912
4913// This prototype is deprecated.
4914static inline __ATTRS_o_ai int
4915vec_any_ge(__vector __bool long long __a, __vector signed long long __b) {
4916 int __cc;
4917 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
4918 return __cc != 0;
4919}
4920
4921static inline __ATTRS_o_ai int
4922vec_any_ge(__vector unsigned long long __a, __vector unsigned long long __b) {
4923 int __cc;
4924 __builtin_s390_vchlgs(__b, __a, &__cc);
4925 return __cc != 0;
4926}
4927
4928// This prototype is deprecated.
4929static inline __ATTRS_o_ai int
4930vec_any_ge(__vector unsigned long long __a, __vector __bool long long __b) {
4931 int __cc;
4932 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
4933 return __cc != 0;
4934}
4935
4936// This prototype is deprecated.
4937static inline __ATTRS_o_ai int
4938vec_any_ge(__vector __bool long long __a, __vector unsigned long long __b) {
4939 int __cc;
4940 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
4941 return __cc != 0;
4942}
4943
4944// This prototype is deprecated.
4945static inline __ATTRS_o_ai int
4946vec_any_ge(__vector __bool long long __a, __vector __bool long long __b) {
4947 int __cc;
4948 __builtin_s390_vchlgs((__vector unsigned long long)__b,
4949 (__vector unsigned long long)__a, &__cc);
4950 return __cc != 0;
4951}
4952
4953#if __ARCH__ >= 12
4954static inline __ATTRS_o_ai int
4955vec_any_ge(__vector float __a, __vector float __b) {
4956 int __cc;
4957 __builtin_s390_vfchesbs(__a, __b, &__cc);
4958 return __cc <= 1;
4959}
4960#endif
4961
4962static inline __ATTRS_o_ai int
4963vec_any_ge(__vector double __a, __vector double __b) {
4964 int __cc;
4965 __builtin_s390_vfchedbs(__a, __b, &__cc);
4966 return __cc <= 1;
4967}
4968
4969/*-- vec_any_gt -------------------------------------------------------------*/
4970
4971static inline __ATTRS_o_ai int
4972vec_any_gt(__vector signed char __a, __vector signed char __b) {
4973 int __cc;
4974 __builtin_s390_vchbs(__a, __b, &__cc);
4975 return __cc <= 1;
4976}
4977
4978// This prototype is deprecated.
4979static inline __ATTRS_o_ai int
4980vec_any_gt(__vector signed char __a, __vector __bool char __b) {
4981 int __cc;
4982 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
4983 return __cc <= 1;
4984}
4985
4986// This prototype is deprecated.
4987static inline __ATTRS_o_ai int
4988vec_any_gt(__vector __bool char __a, __vector signed char __b) {
4989 int __cc;
4990 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
4991 return __cc <= 1;
4992}
4993
4994static inline __ATTRS_o_ai int
4995vec_any_gt(__vector unsigned char __a, __vector unsigned char __b) {
4996 int __cc;
4997 __builtin_s390_vchlbs(__a, __b, &__cc);
4998 return __cc <= 1;
4999}
5000
5001// This prototype is deprecated.
5002static inline __ATTRS_o_ai int
5003vec_any_gt(__vector unsigned char __a, __vector __bool char __b) {
5004 int __cc;
5005 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
5006 return __cc <= 1;
5007}
5008
5009// This prototype is deprecated.
5010static inline __ATTRS_o_ai int
5011vec_any_gt(__vector __bool char __a, __vector unsigned char __b) {
5012 int __cc;
5013 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
5014 return __cc <= 1;
5015}
5016
5017// This prototype is deprecated.
5018static inline __ATTRS_o_ai int
5019vec_any_gt(__vector __bool char __a, __vector __bool char __b) {
5020 int __cc;
5021 __builtin_s390_vchlbs((__vector unsigned char)__a,
5022 (__vector unsigned char)__b, &__cc);
5023 return __cc <= 1;
5024}
5025
5026static inline __ATTRS_o_ai int
5027vec_any_gt(__vector signed short __a, __vector signed short __b) {
5028 int __cc;
5029 __builtin_s390_vchhs(__a, __b, &__cc);
5030 return __cc <= 1;
5031}
5032
5033// This prototype is deprecated.
5034static inline __ATTRS_o_ai int
5035vec_any_gt(__vector signed short __a, __vector __bool short __b) {
5036 int __cc;
5037 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
5038 return __cc <= 1;
5039}
5040
5041// This prototype is deprecated.
5042static inline __ATTRS_o_ai int
5043vec_any_gt(__vector __bool short __a, __vector signed short __b) {
5044 int __cc;
5045 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
5046 return __cc <= 1;
5047}
5048
5049static inline __ATTRS_o_ai int
5050vec_any_gt(__vector unsigned short __a, __vector unsigned short __b) {
5051 int __cc;
5052 __builtin_s390_vchlhs(__a, __b, &__cc);
5053 return __cc <= 1;
5054}
5055
5056// This prototype is deprecated.
5057static inline __ATTRS_o_ai int
5058vec_any_gt(__vector unsigned short __a, __vector __bool short __b) {
5059 int __cc;
5060 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
5061 return __cc <= 1;
5062}
5063
5064// This prototype is deprecated.
5065static inline __ATTRS_o_ai int
5066vec_any_gt(__vector __bool short __a, __vector unsigned short __b) {
5067 int __cc;
5068 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
5069 return __cc <= 1;
5070}
5071
5072// This prototype is deprecated.
5073static inline __ATTRS_o_ai int
5074vec_any_gt(__vector __bool short __a, __vector __bool short __b) {
5075 int __cc;
5076 __builtin_s390_vchlhs((__vector unsigned short)__a,
5077 (__vector unsigned short)__b, &__cc);
5078 return __cc <= 1;
5079}
5080
5081static inline __ATTRS_o_ai int
5082vec_any_gt(__vector signed int __a, __vector signed int __b) {
5083 int __cc;
5084 __builtin_s390_vchfs(__a, __b, &__cc);
5085 return __cc <= 1;
5086}
5087
5088// This prototype is deprecated.
5089static inline __ATTRS_o_ai int
5090vec_any_gt(__vector signed int __a, __vector __bool int __b) {
5091 int __cc;
5092 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
5093 return __cc <= 1;
5094}
5095
5096// This prototype is deprecated.
5097static inline __ATTRS_o_ai int
5098vec_any_gt(__vector __bool int __a, __vector signed int __b) {
5099 int __cc;
5100 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
5101 return __cc <= 1;
5102}
5103
5104static inline __ATTRS_o_ai int
5105vec_any_gt(__vector unsigned int __a, __vector unsigned int __b) {
5106 int __cc;
5107 __builtin_s390_vchlfs(__a, __b, &__cc);
5108 return __cc <= 1;
5109}
5110
5111// This prototype is deprecated.
5112static inline __ATTRS_o_ai int
5113vec_any_gt(__vector unsigned int __a, __vector __bool int __b) {
5114 int __cc;
5115 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
5116 return __cc <= 1;
5117}
5118
5119// This prototype is deprecated.
5120static inline __ATTRS_o_ai int
5121vec_any_gt(__vector __bool int __a, __vector unsigned int __b) {
5122 int __cc;
5123 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
5124 return __cc <= 1;
5125}
5126
5127// This prototype is deprecated.
5128static inline __ATTRS_o_ai int
5129vec_any_gt(__vector __bool int __a, __vector __bool int __b) {
5130 int __cc;
5131 __builtin_s390_vchlfs((__vector unsigned int)__a,
5132 (__vector unsigned int)__b, &__cc);
5133 return __cc <= 1;
5134}
5135
5136static inline __ATTRS_o_ai int
5137vec_any_gt(__vector signed long long __a, __vector signed long long __b) {
5138 int __cc;
5139 __builtin_s390_vchgs(__a, __b, &__cc);
5140 return __cc <= 1;
5141}
5142
5143// This prototype is deprecated.
5144static inline __ATTRS_o_ai int
5145vec_any_gt(__vector signed long long __a, __vector __bool long long __b) {
5146 int __cc;
5147 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
5148 return __cc <= 1;
5149}
5150
5151// This prototype is deprecated.
5152static inline __ATTRS_o_ai int
5153vec_any_gt(__vector __bool long long __a, __vector signed long long __b) {
5154 int __cc;
5155 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
5156 return __cc <= 1;
5157}
5158
5159static inline __ATTRS_o_ai int
5160vec_any_gt(__vector unsigned long long __a, __vector unsigned long long __b) {
5161 int __cc;
5162 __builtin_s390_vchlgs(__a, __b, &__cc);
5163 return __cc <= 1;
5164}
5165
5166// This prototype is deprecated.
5167static inline __ATTRS_o_ai int
5168vec_any_gt(__vector unsigned long long __a, __vector __bool long long __b) {
5169 int __cc;
5170 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
5171 return __cc <= 1;
5172}
5173
5174// This prototype is deprecated.
5175static inline __ATTRS_o_ai int
5176vec_any_gt(__vector __bool long long __a, __vector unsigned long long __b) {
5177 int __cc;
5178 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
5179 return __cc <= 1;
5180}
5181
5182// This prototype is deprecated.
5183static inline __ATTRS_o_ai int
5184vec_any_gt(__vector __bool long long __a, __vector __bool long long __b) {
5185 int __cc;
5186 __builtin_s390_vchlgs((__vector unsigned long long)__a,
5187 (__vector unsigned long long)__b, &__cc);
5188 return __cc <= 1;
5189}
5190
5191#if __ARCH__ >= 12
5192static inline __ATTRS_o_ai int
5193vec_any_gt(__vector float __a, __vector float __b) {
5194 int __cc;
5195 __builtin_s390_vfchsbs(__a, __b, &__cc);
5196 return __cc <= 1;
5197}
5198#endif
5199
5200static inline __ATTRS_o_ai int
5201vec_any_gt(__vector double __a, __vector double __b) {
5202 int __cc;
5203 __builtin_s390_vfchdbs(__a, __b, &__cc);
5204 return __cc <= 1;
5205}
5206
5207/*-- vec_any_le -------------------------------------------------------------*/
5208
5209static inline __ATTRS_o_ai int
5210vec_any_le(__vector signed char __a, __vector signed char __b) {
5211 int __cc;
5212 __builtin_s390_vchbs(__a, __b, &__cc);
5213 return __cc != 0;
5214}
5215
5216// This prototype is deprecated.
5217static inline __ATTRS_o_ai int
5218vec_any_le(__vector signed char __a, __vector __bool char __b) {
5219 int __cc;
5220 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
5221 return __cc != 0;
5222}
5223
5224// This prototype is deprecated.
5225static inline __ATTRS_o_ai int
5226vec_any_le(__vector __bool char __a, __vector signed char __b) {
5227 int __cc;
5228 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
5229 return __cc != 0;
5230}
5231
5232static inline __ATTRS_o_ai int
5233vec_any_le(__vector unsigned char __a, __vector unsigned char __b) {
5234 int __cc;
5235 __builtin_s390_vchlbs(__a, __b, &__cc);
5236 return __cc != 0;
5237}
5238
5239// This prototype is deprecated.
5240static inline __ATTRS_o_ai int
5241vec_any_le(__vector unsigned char __a, __vector __bool char __b) {
5242 int __cc;
5243 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
5244 return __cc != 0;
5245}
5246
5247// This prototype is deprecated.
5248static inline __ATTRS_o_ai int
5249vec_any_le(__vector __bool char __a, __vector unsigned char __b) {
5250 int __cc;
5251 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
5252 return __cc != 0;
5253}
5254
5255// This prototype is deprecated.
5256static inline __ATTRS_o_ai int
5257vec_any_le(__vector __bool char __a, __vector __bool char __b) {
5258 int __cc;
5259 __builtin_s390_vchlbs((__vector unsigned char)__a,
5260 (__vector unsigned char)__b, &__cc);
5261 return __cc != 0;
5262}
5263
5264static inline __ATTRS_o_ai int
5265vec_any_le(__vector signed short __a, __vector signed short __b) {
5266 int __cc;
5267 __builtin_s390_vchhs(__a, __b, &__cc);
5268 return __cc != 0;
5269}
5270
5271// This prototype is deprecated.
5272static inline __ATTRS_o_ai int
5273vec_any_le(__vector signed short __a, __vector __bool short __b) {
5274 int __cc;
5275 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
5276 return __cc != 0;
5277}
5278
5279// This prototype is deprecated.
5280static inline __ATTRS_o_ai int
5281vec_any_le(__vector __bool short __a, __vector signed short __b) {
5282 int __cc;
5283 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
5284 return __cc != 0;
5285}
5286
5287static inline __ATTRS_o_ai int
5288vec_any_le(__vector unsigned short __a, __vector unsigned short __b) {
5289 int __cc;
5290 __builtin_s390_vchlhs(__a, __b, &__cc);
5291 return __cc != 0;
5292}
5293
5294// This prototype is deprecated.
5295static inline __ATTRS_o_ai int
5296vec_any_le(__vector unsigned short __a, __vector __bool short __b) {
5297 int __cc;
5298 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
5299 return __cc != 0;
5300}
5301
5302// This prototype is deprecated.
5303static inline __ATTRS_o_ai int
5304vec_any_le(__vector __bool short __a, __vector unsigned short __b) {
5305 int __cc;
5306 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
5307 return __cc != 0;
5308}
5309
5310// This prototype is deprecated.
5311static inline __ATTRS_o_ai int
5312vec_any_le(__vector __bool short __a, __vector __bool short __b) {
5313 int __cc;
5314 __builtin_s390_vchlhs((__vector unsigned short)__a,
5315 (__vector unsigned short)__b, &__cc);
5316 return __cc != 0;
5317}
5318
5319static inline __ATTRS_o_ai int
5320vec_any_le(__vector signed int __a, __vector signed int __b) {
5321 int __cc;
5322 __builtin_s390_vchfs(__a, __b, &__cc);
5323 return __cc != 0;
5324}
5325
5326// This prototype is deprecated.
5327static inline __ATTRS_o_ai int
5328vec_any_le(__vector signed int __a, __vector __bool int __b) {
5329 int __cc;
5330 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
5331 return __cc != 0;
5332}
5333
5334// This prototype is deprecated.
5335static inline __ATTRS_o_ai int
5336vec_any_le(__vector __bool int __a, __vector signed int __b) {
5337 int __cc;
5338 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
5339 return __cc != 0;
5340}
5341
5342static inline __ATTRS_o_ai int
5343vec_any_le(__vector unsigned int __a, __vector unsigned int __b) {
5344 int __cc;
5345 __builtin_s390_vchlfs(__a, __b, &__cc);
5346 return __cc != 0;
5347}
5348
5349// This prototype is deprecated.
5350static inline __ATTRS_o_ai int
5351vec_any_le(__vector unsigned int __a, __vector __bool int __b) {
5352 int __cc;
5353 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
5354 return __cc != 0;
5355}
5356
5357// This prototype is deprecated.
5358static inline __ATTRS_o_ai int
5359vec_any_le(__vector __bool int __a, __vector unsigned int __b) {
5360 int __cc;
5361 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
5362 return __cc != 0;
5363}
5364
5365// This prototype is deprecated.
5366static inline __ATTRS_o_ai int
5367vec_any_le(__vector __bool int __a, __vector __bool int __b) {
5368 int __cc;
5369 __builtin_s390_vchlfs((__vector unsigned int)__a,
5370 (__vector unsigned int)__b, &__cc);
5371 return __cc != 0;
5372}
5373
5374static inline __ATTRS_o_ai int
5375vec_any_le(__vector signed long long __a, __vector signed long long __b) {
5376 int __cc;
5377 __builtin_s390_vchgs(__a, __b, &__cc);
5378 return __cc != 0;
5379}
5380
5381// This prototype is deprecated.
5382static inline __ATTRS_o_ai int
5383vec_any_le(__vector signed long long __a, __vector __bool long long __b) {
5384 int __cc;
5385 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
5386 return __cc != 0;
5387}
5388
5389// This prototype is deprecated.
5390static inline __ATTRS_o_ai int
5391vec_any_le(__vector __bool long long __a, __vector signed long long __b) {
5392 int __cc;
5393 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
5394 return __cc != 0;
5395}
5396
5397static inline __ATTRS_o_ai int
5398vec_any_le(__vector unsigned long long __a, __vector unsigned long long __b) {
5399 int __cc;
5400 __builtin_s390_vchlgs(__a, __b, &__cc);
5401 return __cc != 0;
5402}
5403
5404// This prototype is deprecated.
5405static inline __ATTRS_o_ai int
5406vec_any_le(__vector unsigned long long __a, __vector __bool long long __b) {
5407 int __cc;
5408 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
5409 return __cc != 0;
5410}
5411
5412// This prototype is deprecated.
5413static inline __ATTRS_o_ai int
5414vec_any_le(__vector __bool long long __a, __vector unsigned long long __b) {
5415 int __cc;
5416 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
5417 return __cc != 0;
5418}
5419
5420// This prototype is deprecated.
5421static inline __ATTRS_o_ai int
5422vec_any_le(__vector __bool long long __a, __vector __bool long long __b) {
5423 int __cc;
5424 __builtin_s390_vchlgs((__vector unsigned long long)__a,
5425 (__vector unsigned long long)__b, &__cc);
5426 return __cc != 0;
5427}
5428
5429#if __ARCH__ >= 12
5430static inline __ATTRS_o_ai int
5431vec_any_le(__vector float __a, __vector float __b) {
5432 int __cc;
5433 __builtin_s390_vfchesbs(__b, __a, &__cc);
5434 return __cc <= 1;
5435}
5436#endif
5437
5438static inline __ATTRS_o_ai int
5439vec_any_le(__vector double __a, __vector double __b) {
5440 int __cc;
5441 __builtin_s390_vfchedbs(__b, __a, &__cc);
5442 return __cc <= 1;
5443}
5444
5445/*-- vec_any_lt -------------------------------------------------------------*/
5446
5447static inline __ATTRS_o_ai int
5448vec_any_lt(__vector signed char __a, __vector signed char __b) {
5449 int __cc;
5450 __builtin_s390_vchbs(__b, __a, &__cc);
5451 return __cc <= 1;
5452}
5453
5454// This prototype is deprecated.
5455static inline __ATTRS_o_ai int
5456vec_any_lt(__vector signed char __a, __vector __bool char __b) {
5457 int __cc;
5458 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
5459 return __cc <= 1;
5460}
5461
5462// This prototype is deprecated.
5463static inline __ATTRS_o_ai int
5464vec_any_lt(__vector __bool char __a, __vector signed char __b) {
5465 int __cc;
5466 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
5467 return __cc <= 1;
5468}
5469
5470static inline __ATTRS_o_ai int
5471vec_any_lt(__vector unsigned char __a, __vector unsigned char __b) {
5472 int __cc;
5473 __builtin_s390_vchlbs(__b, __a, &__cc);
5474 return __cc <= 1;
5475}
5476
5477// This prototype is deprecated.
5478static inline __ATTRS_o_ai int
5479vec_any_lt(__vector unsigned char __a, __vector __bool char __b) {
5480 int __cc;
5481 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
5482 return __cc <= 1;
5483}
5484
5485// This prototype is deprecated.
5486static inline __ATTRS_o_ai int
5487vec_any_lt(__vector __bool char __a, __vector unsigned char __b) {
5488 int __cc;
5489 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
5490 return __cc <= 1;
5491}
5492
5493// This prototype is deprecated.
5494static inline __ATTRS_o_ai int
5495vec_any_lt(__vector __bool char __a, __vector __bool char __b) {
5496 int __cc;
5497 __builtin_s390_vchlbs((__vector unsigned char)__b,
5498 (__vector unsigned char)__a, &__cc);
5499 return __cc <= 1;
5500}
5501
5502static inline __ATTRS_o_ai int
5503vec_any_lt(__vector signed short __a, __vector signed short __b) {
5504 int __cc;
5505 __builtin_s390_vchhs(__b, __a, &__cc);
5506 return __cc <= 1;
5507}
5508
5509// This prototype is deprecated.
5510static inline __ATTRS_o_ai int
5511vec_any_lt(__vector signed short __a, __vector __bool short __b) {
5512 int __cc;
5513 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
5514 return __cc <= 1;
5515}
5516
5517// This prototype is deprecated.
5518static inline __ATTRS_o_ai int
5519vec_any_lt(__vector __bool short __a, __vector signed short __b) {
5520 int __cc;
5521 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
5522 return __cc <= 1;
5523}
5524
5525static inline __ATTRS_o_ai int
5526vec_any_lt(__vector unsigned short __a, __vector unsigned short __b) {
5527 int __cc;
5528 __builtin_s390_vchlhs(__b, __a, &__cc);
5529 return __cc <= 1;
5530}
5531
5532// This prototype is deprecated.
5533static inline __ATTRS_o_ai int
5534vec_any_lt(__vector unsigned short __a, __vector __bool short __b) {
5535 int __cc;
5536 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
5537 return __cc <= 1;
5538}
5539
5540// This prototype is deprecated.
5541static inline __ATTRS_o_ai int
5542vec_any_lt(__vector __bool short __a, __vector unsigned short __b) {
5543 int __cc;
5544 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
5545 return __cc <= 1;
5546}
5547
5548// This prototype is deprecated.
5549static inline __ATTRS_o_ai int
5550vec_any_lt(__vector __bool short __a, __vector __bool short __b) {
5551 int __cc;
5552 __builtin_s390_vchlhs((__vector unsigned short)__b,
5553 (__vector unsigned short)__a, &__cc);
5554 return __cc <= 1;
5555}
5556
5557static inline __ATTRS_o_ai int
5558vec_any_lt(__vector signed int __a, __vector signed int __b) {
5559 int __cc;
5560 __builtin_s390_vchfs(__b, __a, &__cc);
5561 return __cc <= 1;
5562}
5563
5564// This prototype is deprecated.
5565static inline __ATTRS_o_ai int
5566vec_any_lt(__vector signed int __a, __vector __bool int __b) {
5567 int __cc;
5568 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
5569 return __cc <= 1;
5570}
5571
5572// This prototype is deprecated.
5573static inline __ATTRS_o_ai int
5574vec_any_lt(__vector __bool int __a, __vector signed int __b) {
5575 int __cc;
5576 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
5577 return __cc <= 1;
5578}
5579
5580static inline __ATTRS_o_ai int
5581vec_any_lt(__vector unsigned int __a, __vector unsigned int __b) {
5582 int __cc;
5583 __builtin_s390_vchlfs(__b, __a, &__cc);
5584 return __cc <= 1;
5585}
5586
5587// This prototype is deprecated.
5588static inline __ATTRS_o_ai int
5589vec_any_lt(__vector unsigned int __a, __vector __bool int __b) {
5590 int __cc;
5591 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
5592 return __cc <= 1;
5593}
5594
5595// This prototype is deprecated.
5596static inline __ATTRS_o_ai int
5597vec_any_lt(__vector __bool int __a, __vector unsigned int __b) {
5598 int __cc;
5599 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
5600 return __cc <= 1;
5601}
5602
5603// This prototype is deprecated.
5604static inline __ATTRS_o_ai int
5605vec_any_lt(__vector __bool int __a, __vector __bool int __b) {
5606 int __cc;
5607 __builtin_s390_vchlfs((__vector unsigned int)__b,
5608 (__vector unsigned int)__a, &__cc);
5609 return __cc <= 1;
5610}
5611
5612static inline __ATTRS_o_ai int
5613vec_any_lt(__vector signed long long __a, __vector signed long long __b) {
5614 int __cc;
5615 __builtin_s390_vchgs(__b, __a, &__cc);
5616 return __cc <= 1;
5617}
5618
5619// This prototype is deprecated.
5620static inline __ATTRS_o_ai int
5621vec_any_lt(__vector signed long long __a, __vector __bool long long __b) {
5622 int __cc;
5623 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
5624 return __cc <= 1;
5625}
5626
5627// This prototype is deprecated.
5628static inline __ATTRS_o_ai int
5629vec_any_lt(__vector __bool long long __a, __vector signed long long __b) {
5630 int __cc;
5631 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
5632 return __cc <= 1;
5633}
5634
5635static inline __ATTRS_o_ai int
5636vec_any_lt(__vector unsigned long long __a, __vector unsigned long long __b) {
5637 int __cc;
5638 __builtin_s390_vchlgs(__b, __a, &__cc);
5639 return __cc <= 1;
5640}
5641
5642// This prototype is deprecated.
5643static inline __ATTRS_o_ai int
5644vec_any_lt(__vector unsigned long long __a, __vector __bool long long __b) {
5645 int __cc;
5646 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
5647 return __cc <= 1;
5648}
5649
5650// This prototype is deprecated.
5651static inline __ATTRS_o_ai int
5652vec_any_lt(__vector __bool long long __a, __vector unsigned long long __b) {
5653 int __cc;
5654 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
5655 return __cc <= 1;
5656}
5657
5658// This prototype is deprecated.
5659static inline __ATTRS_o_ai int
5660vec_any_lt(__vector __bool long long __a, __vector __bool long long __b) {
5661 int __cc;
5662 __builtin_s390_vchlgs((__vector unsigned long long)__b,
5663 (__vector unsigned long long)__a, &__cc);
5664 return __cc <= 1;
5665}
5666
5667#if __ARCH__ >= 12
5668static inline __ATTRS_o_ai int
5669vec_any_lt(__vector float __a, __vector float __b) {
5670 int __cc;
5671 __builtin_s390_vfchsbs(__b, __a, &__cc);
5672 return __cc <= 1;
5673}
5674#endif
5675
5676static inline __ATTRS_o_ai int
5677vec_any_lt(__vector double __a, __vector double __b) {
5678 int __cc;
5679 __builtin_s390_vfchdbs(__b, __a, &__cc);
5680 return __cc <= 1;
5681}
5682
5683/*-- vec_any_nge ------------------------------------------------------------*/
5684
5685#if __ARCH__ >= 12
5686static inline __ATTRS_o_ai int
5687vec_any_nge(__vector float __a, __vector float __b) {
5688 int __cc;
5689 __builtin_s390_vfchesbs(__a, __b, &__cc);
5690 return __cc != 0;
5691}
5692#endif
5693
5694static inline __ATTRS_o_ai int
5695vec_any_nge(__vector double __a, __vector double __b) {
5696 int __cc;
5697 __builtin_s390_vfchedbs(__a, __b, &__cc);
5698 return __cc != 0;
5699}
5700
5701/*-- vec_any_ngt ------------------------------------------------------------*/
5702
5703#if __ARCH__ >= 12
5704static inline __ATTRS_o_ai int
5705vec_any_ngt(__vector float __a, __vector float __b) {
5706 int __cc;
5707 __builtin_s390_vfchsbs(__a, __b, &__cc);
5708 return __cc != 0;
5709}
5710#endif
5711
5712static inline __ATTRS_o_ai int
5713vec_any_ngt(__vector double __a, __vector double __b) {
5714 int __cc;
5715 __builtin_s390_vfchdbs(__a, __b, &__cc);
5716 return __cc != 0;
5717}
5718
5719/*-- vec_any_nle ------------------------------------------------------------*/
5720
5721#if __ARCH__ >= 12
5722static inline __ATTRS_o_ai int
5723vec_any_nle(__vector float __a, __vector float __b) {
5724 int __cc;
5725 __builtin_s390_vfchesbs(__b, __a, &__cc);
5726 return __cc != 0;
5727}
5728#endif
5729
5730static inline __ATTRS_o_ai int
5731vec_any_nle(__vector double __a, __vector double __b) {
5732 int __cc;
5733 __builtin_s390_vfchedbs(__b, __a, &__cc);
5734 return __cc != 0;
5735}
5736
5737/*-- vec_any_nlt ------------------------------------------------------------*/
5738
5739#if __ARCH__ >= 12
5740static inline __ATTRS_o_ai int
5741vec_any_nlt(__vector float __a, __vector float __b) {
5742 int __cc;
5743 __builtin_s390_vfchsbs(__b, __a, &__cc);
5744 return __cc != 0;
5745}
5746#endif
5747
5748static inline __ATTRS_o_ai int
5749vec_any_nlt(__vector double __a, __vector double __b) {
5750 int __cc;
5751 __builtin_s390_vfchdbs(__b, __a, &__cc);
5752 return __cc != 0;
5753}
5754
5755/*-- vec_any_nan ------------------------------------------------------------*/
5756
5757#if __ARCH__ >= 12
5758static inline __ATTRS_o_ai int
5759vec_any_nan(__vector float __a) {
5760 int __cc;
5761 __builtin_s390_vftcisb(__a, 15, &__cc);
5762 return __cc != 3;
5763}
5764#endif
5765
5766static inline __ATTRS_o_ai int
5767vec_any_nan(__vector double __a) {
5768 int __cc;
5769 __builtin_s390_vftcidb(__a, 15, &__cc);
5770 return __cc != 3;
5771}
5772
5773/*-- vec_any_numeric --------------------------------------------------------*/
5774
5775#if __ARCH__ >= 12
5776static inline __ATTRS_o_ai int
5777vec_any_numeric(__vector float __a) {
5778 int __cc;
5779 __builtin_s390_vftcisb(__a, 15, &__cc);
5780 return __cc != 0;
5781}
5782#endif
5783
5784static inline __ATTRS_o_ai int
5785vec_any_numeric(__vector double __a) {
5786 int __cc;
5787 __builtin_s390_vftcidb(__a, 15, &__cc);
5788 return __cc != 0;
5789}
5790
5791/*-- vec_andc ---------------------------------------------------------------*/
5792
5793static inline __ATTRS_o_ai __vector __bool char
5794vec_andc(__vector __bool char __a, __vector __bool char __b) {
5795 return __a & ~__b;
5796}
5797
5798static inline __ATTRS_o_ai __vector signed char
5799vec_andc(__vector signed char __a, __vector signed char __b) {
5800 return __a & ~__b;
5801}
5802
5803// This prototype is deprecated.
5804static inline __ATTRS_o_ai __vector signed char
5805vec_andc(__vector __bool char __a, __vector signed char __b) {
5806 return __a & ~__b;
5807}
5808
5809// This prototype is deprecated.
5810static inline __ATTRS_o_ai __vector signed char
5811vec_andc(__vector signed char __a, __vector __bool char __b) {
5812 return __a & ~__b;
5813}
5814
5815static inline __ATTRS_o_ai __vector unsigned char
5816vec_andc(__vector unsigned char __a, __vector unsigned char __b) {
5817 return __a & ~__b;
5818}
5819
5820// This prototype is deprecated.
5821static inline __ATTRS_o_ai __vector unsigned char
5822vec_andc(__vector __bool char __a, __vector unsigned char __b) {
5823 return __a & ~__b;
5824}
5825
5826// This prototype is deprecated.
5827static inline __ATTRS_o_ai __vector unsigned char
5828vec_andc(__vector unsigned char __a, __vector __bool char __b) {
5829 return __a & ~__b;
5830}
5831
5832static inline __ATTRS_o_ai __vector __bool short
5833vec_andc(__vector __bool short __a, __vector __bool short __b) {
5834 return __a & ~__b;
5835}
5836
5837static inline __ATTRS_o_ai __vector signed short
5838vec_andc(__vector signed short __a, __vector signed short __b) {
5839 return __a & ~__b;
5840}
5841
5842// This prototype is deprecated.
5843static inline __ATTRS_o_ai __vector signed short
5844vec_andc(__vector __bool short __a, __vector signed short __b) {
5845 return __a & ~__b;
5846}
5847
5848// This prototype is deprecated.
5849static inline __ATTRS_o_ai __vector signed short
5850vec_andc(__vector signed short __a, __vector __bool short __b) {
5851 return __a & ~__b;
5852}
5853
5854static inline __ATTRS_o_ai __vector unsigned short
5855vec_andc(__vector unsigned short __a, __vector unsigned short __b) {
5856 return __a & ~__b;
5857}
5858
5859// This prototype is deprecated.
5860static inline __ATTRS_o_ai __vector unsigned short
5861vec_andc(__vector __bool short __a, __vector unsigned short __b) {
5862 return __a & ~__b;
5863}
5864
5865// This prototype is deprecated.
5866static inline __ATTRS_o_ai __vector unsigned short
5867vec_andc(__vector unsigned short __a, __vector __bool short __b) {
5868 return __a & ~__b;
5869}
5870
5871static inline __ATTRS_o_ai __vector __bool int
5872vec_andc(__vector __bool int __a, __vector __bool int __b) {
5873 return __a & ~__b;
5874}
5875
5876static inline __ATTRS_o_ai __vector signed int
5877vec_andc(__vector signed int __a, __vector signed int __b) {
5878 return __a & ~__b;
5879}
5880
5881// This prototype is deprecated.
5882static inline __ATTRS_o_ai __vector signed int
5883vec_andc(__vector __bool int __a, __vector signed int __b) {
5884 return __a & ~__b;
5885}
5886
5887// This prototype is deprecated.
5888static inline __ATTRS_o_ai __vector signed int
5889vec_andc(__vector signed int __a, __vector __bool int __b) {
5890 return __a & ~__b;
5891}
5892
5893static inline __ATTRS_o_ai __vector unsigned int
5894vec_andc(__vector unsigned int __a, __vector unsigned int __b) {
5895 return __a & ~__b;
5896}
5897
5898// This prototype is deprecated.
5899static inline __ATTRS_o_ai __vector unsigned int
5900vec_andc(__vector __bool int __a, __vector unsigned int __b) {
5901 return __a & ~__b;
5902}
5903
5904// This prototype is deprecated.
5905static inline __ATTRS_o_ai __vector unsigned int
5906vec_andc(__vector unsigned int __a, __vector __bool int __b) {
5907 return __a & ~__b;
5908}
5909
5910static inline __ATTRS_o_ai __vector __bool long long
5911vec_andc(__vector __bool long long __a, __vector __bool long long __b) {
5912 return __a & ~__b;
5913}
5914
5915static inline __ATTRS_o_ai __vector signed long long
5916vec_andc(__vector signed long long __a, __vector signed long long __b) {
5917 return __a & ~__b;
5918}
5919
5920// This prototype is deprecated.
5921static inline __ATTRS_o_ai __vector signed long long
5922vec_andc(__vector __bool long long __a, __vector signed long long __b) {
5923 return __a & ~__b;
5924}
5925
5926// This prototype is deprecated.
5927static inline __ATTRS_o_ai __vector signed long long
5928vec_andc(__vector signed long long __a, __vector __bool long long __b) {
5929 return __a & ~__b;
5930}
5931
5932static inline __ATTRS_o_ai __vector unsigned long long
5933vec_andc(__vector unsigned long long __a, __vector unsigned long long __b) {
5934 return __a & ~__b;
5935}
5936
5937// This prototype is deprecated.
5938static inline __ATTRS_o_ai __vector unsigned long long
5939vec_andc(__vector __bool long long __a, __vector unsigned long long __b) {
5940 return __a & ~__b;
5941}
5942
5943// This prototype is deprecated.
5944static inline __ATTRS_o_ai __vector unsigned long long
5945vec_andc(__vector unsigned long long __a, __vector __bool long long __b) {
5946 return __a & ~__b;
5947}
5948
5949#if __ARCH__ >= 12
5950static inline __ATTRS_o_ai __vector float
5951vec_andc(__vector float __a, __vector float __b) {
5952 return (__vector float)((__vector unsigned int)__a &
5953 ~(__vector unsigned int)__b);
5954}
5955#endif
5956
5957static inline __ATTRS_o_ai __vector double
5958vec_andc(__vector double __a, __vector double __b) {
5959 return (__vector double)((__vector unsigned long long)__a &
5960 ~(__vector unsigned long long)__b);
5961}
5962
5963// This prototype is deprecated.
5964static inline __ATTRS_o_ai __vector double
5965vec_andc(__vector __bool long long __a, __vector double __b) {
5966 return (__vector double)((__vector unsigned long long)__a &
5967 ~(__vector unsigned long long)__b);
5968}
5969
5970// This prototype is deprecated.
5971static inline __ATTRS_o_ai __vector double
5972vec_andc(__vector double __a, __vector __bool long long __b) {
5973 return (__vector double)((__vector unsigned long long)__a &
5974 ~(__vector unsigned long long)__b);
5975}
5976
5977/*-- vec_nor ----------------------------------------------------------------*/
5978
5979static inline __ATTRS_o_ai __vector __bool char
5980vec_nor(__vector __bool char __a, __vector __bool char __b) {
5981 return ~(__a | __b);
5982}
5983
5984static inline __ATTRS_o_ai __vector signed char
5985vec_nor(__vector signed char __a, __vector signed char __b) {
5986 return ~(__a | __b);
5987}
5988
5989// This prototype is deprecated.
5990static inline __ATTRS_o_ai __vector signed char
5991vec_nor(__vector __bool char __a, __vector signed char __b) {
5992 return ~(__a | __b);
5993}
5994
5995// This prototype is deprecated.
5996static inline __ATTRS_o_ai __vector signed char
5997vec_nor(__vector signed char __a, __vector __bool char __b) {
5998 return ~(__a | __b);
5999}
6000
6001static inline __ATTRS_o_ai __vector unsigned char
6002vec_nor(__vector unsigned char __a, __vector unsigned char __b) {
6003 return ~(__a | __b);
6004}
6005
6006// This prototype is deprecated.
6007static inline __ATTRS_o_ai __vector unsigned char
6008vec_nor(__vector __bool char __a, __vector unsigned char __b) {
6009 return ~(__a | __b);
6010}
6011
6012// This prototype is deprecated.
6013static inline __ATTRS_o_ai __vector unsigned char
6014vec_nor(__vector unsigned char __a, __vector __bool char __b) {
6015 return ~(__a | __b);
6016}
6017
6018static inline __ATTRS_o_ai __vector __bool short
6019vec_nor(__vector __bool short __a, __vector __bool short __b) {
6020 return ~(__a | __b);
6021}
6022
6023static inline __ATTRS_o_ai __vector signed short
6024vec_nor(__vector signed short __a, __vector signed short __b) {
6025 return ~(__a | __b);
6026}
6027
6028// This prototype is deprecated.
6029static inline __ATTRS_o_ai __vector signed short
6030vec_nor(__vector __bool short __a, __vector signed short __b) {
6031 return ~(__a | __b);
6032}
6033
6034// This prototype is deprecated.
6035static inline __ATTRS_o_ai __vector signed short
6036vec_nor(__vector signed short __a, __vector __bool short __b) {
6037 return ~(__a | __b);
6038}
6039
6040static inline __ATTRS_o_ai __vector unsigned short
6041vec_nor(__vector unsigned short __a, __vector unsigned short __b) {
6042 return ~(__a | __b);
6043}
6044
6045// This prototype is deprecated.
6046static inline __ATTRS_o_ai __vector unsigned short
6047vec_nor(__vector __bool short __a, __vector unsigned short __b) {
6048 return ~(__a | __b);
6049}
6050
6051// This prototype is deprecated.
6052static inline __ATTRS_o_ai __vector unsigned short
6053vec_nor(__vector unsigned short __a, __vector __bool short __b) {
6054 return ~(__a | __b);
6055}
6056
6057static inline __ATTRS_o_ai __vector __bool int
6058vec_nor(__vector __bool int __a, __vector __bool int __b) {
6059 return ~(__a | __b);
6060}
6061
6062static inline __ATTRS_o_ai __vector signed int
6063vec_nor(__vector signed int __a, __vector signed int __b) {
6064 return ~(__a | __b);
6065}
6066
6067// This prototype is deprecated.
6068static inline __ATTRS_o_ai __vector signed int
6069vec_nor(__vector __bool int __a, __vector signed int __b) {
6070 return ~(__a | __b);
6071}
6072
6073// This prototype is deprecated.
6074static inline __ATTRS_o_ai __vector signed int
6075vec_nor(__vector signed int __a, __vector __bool int __b) {
6076 return ~(__a | __b);
6077}
6078
6079static inline __ATTRS_o_ai __vector unsigned int
6080vec_nor(__vector unsigned int __a, __vector unsigned int __b) {
6081 return ~(__a | __b);
6082}
6083
6084// This prototype is deprecated.
6085static inline __ATTRS_o_ai __vector unsigned int
6086vec_nor(__vector __bool int __a, __vector unsigned int __b) {
6087 return ~(__a | __b);
6088}
6089
6090// This prototype is deprecated.
6091static inline __ATTRS_o_ai __vector unsigned int
6092vec_nor(__vector unsigned int __a, __vector __bool int __b) {
6093 return ~(__a | __b);
6094}
6095
6096static inline __ATTRS_o_ai __vector __bool long long
6097vec_nor(__vector __bool long long __a, __vector __bool long long __b) {
6098 return ~(__a | __b);
6099}
6100
6101static inline __ATTRS_o_ai __vector signed long long
6102vec_nor(__vector signed long long __a, __vector signed long long __b) {
6103 return ~(__a | __b);
6104}
6105
6106// This prototype is deprecated.
6107static inline __ATTRS_o_ai __vector signed long long
6108vec_nor(__vector __bool long long __a, __vector signed long long __b) {
6109 return ~(__a | __b);
6110}
6111
6112// This prototype is deprecated.
6113static inline __ATTRS_o_ai __vector signed long long
6114vec_nor(__vector signed long long __a, __vector __bool long long __b) {
6115 return ~(__a | __b);
6116}
6117
6118static inline __ATTRS_o_ai __vector unsigned long long
6119vec_nor(__vector unsigned long long __a, __vector unsigned long long __b) {
6120 return ~(__a | __b);
6121}
6122
6123// This prototype is deprecated.
6124static inline __ATTRS_o_ai __vector unsigned long long
6125vec_nor(__vector __bool long long __a, __vector unsigned long long __b) {
6126 return ~(__a | __b);
6127}
6128
6129// This prototype is deprecated.
6130static inline __ATTRS_o_ai __vector unsigned long long
6131vec_nor(__vector unsigned long long __a, __vector __bool long long __b) {
6132 return ~(__a | __b);
6133}
6134
6135#if __ARCH__ >= 12
6136static inline __ATTRS_o_ai __vector float
6137vec_nor(__vector float __a, __vector float __b) {
6138 return (__vector float)~((__vector unsigned int)__a |
6139 (__vector unsigned int)__b);
6140}
6141#endif
6142
6143static inline __ATTRS_o_ai __vector double
6144vec_nor(__vector double __a, __vector double __b) {
6145 return (__vector double)~((__vector unsigned long long)__a |
6146 (__vector unsigned long long)__b);
6147}
6148
6149// This prototype is deprecated.
6150static inline __ATTRS_o_ai __vector double
6151vec_nor(__vector __bool long long __a, __vector double __b) {
6152 return (__vector double)~((__vector unsigned long long)__a |
6153 (__vector unsigned long long)__b);
6154}
6155
6156// This prototype is deprecated.
6157static inline __ATTRS_o_ai __vector double
6158vec_nor(__vector double __a, __vector __bool long long __b) {
6159 return (__vector double)~((__vector unsigned long long)__a |
6160 (__vector unsigned long long)__b);
6161}
6162
6163/*-- vec_orc ----------------------------------------------------------------*/
6164
6165#if __ARCH__ >= 12
6166static inline __ATTRS_o_ai __vector __bool char
6167vec_orc(__vector __bool char __a, __vector __bool char __b) {
6168 return __a | ~__b;
6169}
6170
6171static inline __ATTRS_o_ai __vector signed char
6172vec_orc(__vector signed char __a, __vector signed char __b) {
6173 return __a | ~__b;
6174}
6175
6176static inline __ATTRS_o_ai __vector unsigned char
6177vec_orc(__vector unsigned char __a, __vector unsigned char __b) {
6178 return __a | ~__b;
6179}
6180
6181static inline __ATTRS_o_ai __vector __bool short
6182vec_orc(__vector __bool short __a, __vector __bool short __b) {
6183 return __a | ~__b;
6184}
6185
6186static inline __ATTRS_o_ai __vector signed short
6187vec_orc(__vector signed short __a, __vector signed short __b) {
6188 return __a | ~__b;
6189}
6190
6191static inline __ATTRS_o_ai __vector unsigned short
6192vec_orc(__vector unsigned short __a, __vector unsigned short __b) {
6193 return __a | ~__b;
6194}
6195
6196static inline __ATTRS_o_ai __vector __bool int
6197vec_orc(__vector __bool int __a, __vector __bool int __b) {
6198 return __a | ~__b;
6199}
6200
6201static inline __ATTRS_o_ai __vector signed int
6202vec_orc(__vector signed int __a, __vector signed int __b) {
6203 return __a | ~__b;
6204}
6205
6206static inline __ATTRS_o_ai __vector unsigned int
6207vec_orc(__vector unsigned int __a, __vector unsigned int __b) {
6208 return __a | ~__b;
6209}
6210
6211static inline __ATTRS_o_ai __vector __bool long long
6212vec_orc(__vector __bool long long __a, __vector __bool long long __b) {
6213 return __a | ~__b;
6214}
6215
6216static inline __ATTRS_o_ai __vector signed long long
6217vec_orc(__vector signed long long __a, __vector signed long long __b) {
6218 return __a | ~__b;
6219}
6220
6221static inline __ATTRS_o_ai __vector unsigned long long
6222vec_orc(__vector unsigned long long __a, __vector unsigned long long __b) {
6223 return __a | ~__b;
6224}
6225
6226static inline __ATTRS_o_ai __vector float
6227vec_orc(__vector float __a, __vector float __b) {
6228 return (__vector float)((__vector unsigned int)__a |
6229 ~(__vector unsigned int)__b);
6230}
6231
6232static inline __ATTRS_o_ai __vector double
6233vec_orc(__vector double __a, __vector double __b) {
6234 return (__vector double)((__vector unsigned long long)__a |
6235 ~(__vector unsigned long long)__b);
6236}
6237#endif
6238
6239/*-- vec_nand ---------------------------------------------------------------*/
6240
6241#if __ARCH__ >= 12
6242static inline __ATTRS_o_ai __vector __bool char
6243vec_nand(__vector __bool char __a, __vector __bool char __b) {
6244 return ~(__a & __b);
6245}
6246
6247static inline __ATTRS_o_ai __vector signed char
6248vec_nand(__vector signed char __a, __vector signed char __b) {
6249 return ~(__a & __b);
6250}
6251
6252static inline __ATTRS_o_ai __vector unsigned char
6253vec_nand(__vector unsigned char __a, __vector unsigned char __b) {
6254 return ~(__a & __b);
6255}
6256
6257static inline __ATTRS_o_ai __vector __bool short
6258vec_nand(__vector __bool short __a, __vector __bool short __b) {
6259 return ~(__a & __b);
6260}
6261
6262static inline __ATTRS_o_ai __vector signed short
6263vec_nand(__vector signed short __a, __vector signed short __b) {
6264 return ~(__a & __b);
6265}
6266
6267static inline __ATTRS_o_ai __vector unsigned short
6268vec_nand(__vector unsigned short __a, __vector unsigned short __b) {
6269 return ~(__a & __b);
6270}
6271
6272static inline __ATTRS_o_ai __vector __bool int
6273vec_nand(__vector __bool int __a, __vector __bool int __b) {
6274 return ~(__a & __b);
6275}
6276
6277static inline __ATTRS_o_ai __vector signed int
6278vec_nand(__vector signed int __a, __vector signed int __b) {
6279 return ~(__a & __b);
6280}
6281
6282static inline __ATTRS_o_ai __vector unsigned int
6283vec_nand(__vector unsigned int __a, __vector unsigned int __b) {
6284 return ~(__a & __b);
6285}
6286
6287static inline __ATTRS_o_ai __vector __bool long long
6288vec_nand(__vector __bool long long __a, __vector __bool long long __b) {
6289 return ~(__a & __b);
6290}
6291
6292static inline __ATTRS_o_ai __vector signed long long
6293vec_nand(__vector signed long long __a, __vector signed long long __b) {
6294 return ~(__a & __b);
6295}
6296
6297static inline __ATTRS_o_ai __vector unsigned long long
6298vec_nand(__vector unsigned long long __a, __vector unsigned long long __b) {
6299 return ~(__a & __b);
6300}
6301
6302static inline __ATTRS_o_ai __vector float
6303vec_nand(__vector float __a, __vector float __b) {
6304 return (__vector float)~((__vector unsigned int)__a &
6305 (__vector unsigned int)__b);
6306}
6307
6308static inline __ATTRS_o_ai __vector double
6309vec_nand(__vector double __a, __vector double __b) {
6310 return (__vector double)~((__vector unsigned long long)__a &
6311 (__vector unsigned long long)__b);
6312}
6313#endif
6314
6315/*-- vec_eqv ----------------------------------------------------------------*/
6316
6317#if __ARCH__ >= 12
6318static inline __ATTRS_o_ai __vector __bool char
6319vec_eqv(__vector __bool char __a, __vector __bool char __b) {
6320 return ~(__a ^ __b);
6321}
6322
6323static inline __ATTRS_o_ai __vector signed char
6324vec_eqv(__vector signed char __a, __vector signed char __b) {
6325 return ~(__a ^ __b);
6326}
6327
6328static inline __ATTRS_o_ai __vector unsigned char
6329vec_eqv(__vector unsigned char __a, __vector unsigned char __b) {
6330 return ~(__a ^ __b);
6331}
6332
6333static inline __ATTRS_o_ai __vector __bool short
6334vec_eqv(__vector __bool short __a, __vector __bool short __b) {
6335 return ~(__a ^ __b);
6336}
6337
6338static inline __ATTRS_o_ai __vector signed short
6339vec_eqv(__vector signed short __a, __vector signed short __b) {
6340 return ~(__a ^ __b);
6341}
6342
6343static inline __ATTRS_o_ai __vector unsigned short
6344vec_eqv(__vector unsigned short __a, __vector unsigned short __b) {
6345 return ~(__a ^ __b);
6346}
6347
6348static inline __ATTRS_o_ai __vector __bool int
6349vec_eqv(__vector __bool int __a, __vector __bool int __b) {
6350 return ~(__a ^ __b);
6351}
6352
6353static inline __ATTRS_o_ai __vector signed int
6354vec_eqv(__vector signed int __a, __vector signed int __b) {
6355 return ~(__a ^ __b);
6356}
6357
6358static inline __ATTRS_o_ai __vector unsigned int
6359vec_eqv(__vector unsigned int __a, __vector unsigned int __b) {
6360 return ~(__a ^ __b);
6361}
6362
6363static inline __ATTRS_o_ai __vector __bool long long
6364vec_eqv(__vector __bool long long __a, __vector __bool long long __b) {
6365 return ~(__a ^ __b);
6366}
6367
6368static inline __ATTRS_o_ai __vector signed long long
6369vec_eqv(__vector signed long long __a, __vector signed long long __b) {
6370 return ~(__a ^ __b);
6371}
6372
6373static inline __ATTRS_o_ai __vector unsigned long long
6374vec_eqv(__vector unsigned long long __a, __vector unsigned long long __b) {
6375 return ~(__a ^ __b);
6376}
6377
6378static inline __ATTRS_o_ai __vector float
6379vec_eqv(__vector float __a, __vector float __b) {
6380 return (__vector float)~((__vector unsigned int)__a ^
6381 (__vector unsigned int)__b);
6382}
6383
6384static inline __ATTRS_o_ai __vector double
6385vec_eqv(__vector double __a, __vector double __b) {
6386 return (__vector double)~((__vector unsigned long long)__a ^
6387 (__vector unsigned long long)__b);
6388}
6389#endif
6390
6391/*-- vec_cntlz --------------------------------------------------------------*/
6392
6393static inline __ATTRS_o_ai __vector unsigned char
6394vec_cntlz(__vector signed char __a) {
6395 return __builtin_s390_vclzb((__vector unsigned char)__a);
6396}
6397
6398static inline __ATTRS_o_ai __vector unsigned char
6399vec_cntlz(__vector unsigned char __a) {
6400 return __builtin_s390_vclzb(__a);
6401}
6402
6403static inline __ATTRS_o_ai __vector unsigned short
6404vec_cntlz(__vector signed short __a) {
6405 return __builtin_s390_vclzh((__vector unsigned short)__a);
6406}
6407
6408static inline __ATTRS_o_ai __vector unsigned short
6409vec_cntlz(__vector unsigned short __a) {
6410 return __builtin_s390_vclzh(__a);
6411}
6412
6413static inline __ATTRS_o_ai __vector unsigned int
6414vec_cntlz(__vector signed int __a) {
6415 return __builtin_s390_vclzf((__vector unsigned int)__a);
6416}
6417
6418static inline __ATTRS_o_ai __vector unsigned int
6419vec_cntlz(__vector unsigned int __a) {
6420 return __builtin_s390_vclzf(__a);
6421}
6422
6423static inline __ATTRS_o_ai __vector unsigned long long
6424vec_cntlz(__vector signed long long __a) {
6425 return __builtin_s390_vclzg((__vector unsigned long long)__a);
6426}
6427
6428static inline __ATTRS_o_ai __vector unsigned long long
6429vec_cntlz(__vector unsigned long long __a) {
6430 return __builtin_s390_vclzg(__a);
6431}
6432
6433/*-- vec_cnttz --------------------------------------------------------------*/
6434
6435static inline __ATTRS_o_ai __vector unsigned char
6436vec_cnttz(__vector signed char __a) {
6437 return __builtin_s390_vctzb((__vector unsigned char)__a);
6438}
6439
6440static inline __ATTRS_o_ai __vector unsigned char
6441vec_cnttz(__vector unsigned char __a) {
6442 return __builtin_s390_vctzb(__a);
6443}
6444
6445static inline __ATTRS_o_ai __vector unsigned short
6446vec_cnttz(__vector signed short __a) {
6447 return __builtin_s390_vctzh((__vector unsigned short)__a);
6448}
6449
6450static inline __ATTRS_o_ai __vector unsigned short
6451vec_cnttz(__vector unsigned short __a) {
6452 return __builtin_s390_vctzh(__a);
6453}
6454
6455static inline __ATTRS_o_ai __vector unsigned int
6456vec_cnttz(__vector signed int __a) {
6457 return __builtin_s390_vctzf((__vector unsigned int)__a);
6458}
6459
6460static inline __ATTRS_o_ai __vector unsigned int
6461vec_cnttz(__vector unsigned int __a) {
6462 return __builtin_s390_vctzf(__a);
6463}
6464
6465static inline __ATTRS_o_ai __vector unsigned long long
6466vec_cnttz(__vector signed long long __a) {
6467 return __builtin_s390_vctzg((__vector unsigned long long)__a);
6468}
6469
6470static inline __ATTRS_o_ai __vector unsigned long long
6471vec_cnttz(__vector unsigned long long __a) {
6472 return __builtin_s390_vctzg(__a);
6473}
6474
6475/*-- vec_popcnt -------------------------------------------------------------*/
6476
6477static inline __ATTRS_o_ai __vector unsigned char
6478vec_popcnt(__vector signed char __a) {
6479 return __builtin_s390_vpopctb((__vector unsigned char)__a);
6480}
6481
6482static inline __ATTRS_o_ai __vector unsigned char
6483vec_popcnt(__vector unsigned char __a) {
6484 return __builtin_s390_vpopctb(__a);
6485}
6486
6487static inline __ATTRS_o_ai __vector unsigned short
6488vec_popcnt(__vector signed short __a) {
6489 return __builtin_s390_vpopcth((__vector unsigned short)__a);
6490}
6491
6492static inline __ATTRS_o_ai __vector unsigned short
6493vec_popcnt(__vector unsigned short __a) {
6494 return __builtin_s390_vpopcth(__a);
6495}
6496
6497static inline __ATTRS_o_ai __vector unsigned int
6498vec_popcnt(__vector signed int __a) {
6499 return __builtin_s390_vpopctf((__vector unsigned int)__a);
6500}
6501
6502static inline __ATTRS_o_ai __vector unsigned int
6503vec_popcnt(__vector unsigned int __a) {
6504 return __builtin_s390_vpopctf(__a);
6505}
6506
6507static inline __ATTRS_o_ai __vector unsigned long long
6508vec_popcnt(__vector signed long long __a) {
6509 return __builtin_s390_vpopctg((__vector unsigned long long)__a);
6510}
6511
6512static inline __ATTRS_o_ai __vector unsigned long long
6513vec_popcnt(__vector unsigned long long __a) {
6514 return __builtin_s390_vpopctg(__a);
6515}
6516
6517/*-- vec_rl -----------------------------------------------------------------*/
6518
6519static inline __ATTRS_o_ai __vector signed char
6520vec_rl(__vector signed char __a, __vector unsigned char __b) {
6521 return (__vector signed char)__builtin_s390_verllvb(
6522 (__vector unsigned char)__a, __b);
6523}
6524
6525static inline __ATTRS_o_ai __vector unsigned char
6526vec_rl(__vector unsigned char __a, __vector unsigned char __b) {
6527 return __builtin_s390_verllvb(__a, __b);
6528}
6529
6530static inline __ATTRS_o_ai __vector signed short
6531vec_rl(__vector signed short __a, __vector unsigned short __b) {
6532 return (__vector signed short)__builtin_s390_verllvh(
6533 (__vector unsigned short)__a, __b);
6534}
6535
6536static inline __ATTRS_o_ai __vector unsigned short
6537vec_rl(__vector unsigned short __a, __vector unsigned short __b) {
6538 return __builtin_s390_verllvh(__a, __b);
6539}
6540
6541static inline __ATTRS_o_ai __vector signed int
6542vec_rl(__vector signed int __a, __vector unsigned int __b) {
6543 return (__vector signed int)__builtin_s390_verllvf(
6544 (__vector unsigned int)__a, __b);
6545}
6546
6547static inline __ATTRS_o_ai __vector unsigned int
6548vec_rl(__vector unsigned int __a, __vector unsigned int __b) {
6549 return __builtin_s390_verllvf(__a, __b);
6550}
6551
6552static inline __ATTRS_o_ai __vector signed long long
6553vec_rl(__vector signed long long __a, __vector unsigned long long __b) {
6554 return (__vector signed long long)__builtin_s390_verllvg(
6555 (__vector unsigned long long)__a, __b);
6556}
6557
6558static inline __ATTRS_o_ai __vector unsigned long long
6559vec_rl(__vector unsigned long long __a, __vector unsigned long long __b) {
6560 return __builtin_s390_verllvg(__a, __b);
6561}
6562
6563/*-- vec_rli ----------------------------------------------------------------*/
6564
6565static inline __ATTRS_o_ai __vector signed char
6566vec_rli(__vector signed char __a, unsigned long __b) {
6567 return (__vector signed char)__builtin_s390_verllb(
6568 (__vector unsigned char)__a, (int)__b);
6569}
6570
6571static inline __ATTRS_o_ai __vector unsigned char
6572vec_rli(__vector unsigned char __a, unsigned long __b) {
6573 return __builtin_s390_verllb(__a, (int)__b);
6574}
6575
6576static inline __ATTRS_o_ai __vector signed short
6577vec_rli(__vector signed short __a, unsigned long __b) {
6578 return (__vector signed short)__builtin_s390_verllh(
6579 (__vector unsigned short)__a, (int)__b);
6580}
6581
6582static inline __ATTRS_o_ai __vector unsigned short
6583vec_rli(__vector unsigned short __a, unsigned long __b) {
6584 return __builtin_s390_verllh(__a, (int)__b);
6585}
6586
6587static inline __ATTRS_o_ai __vector signed int
6588vec_rli(__vector signed int __a, unsigned long __b) {
6589 return (__vector signed int)__builtin_s390_verllf(
6590 (__vector unsigned int)__a, (int)__b);
6591}
6592
6593static inline __ATTRS_o_ai __vector unsigned int
6594vec_rli(__vector unsigned int __a, unsigned long __b) {
6595 return __builtin_s390_verllf(__a, (int)__b);
6596}
6597
6598static inline __ATTRS_o_ai __vector signed long long
6599vec_rli(__vector signed long long __a, unsigned long __b) {
6600 return (__vector signed long long)__builtin_s390_verllg(
6601 (__vector unsigned long long)__a, (int)__b);
6602}
6603
6604static inline __ATTRS_o_ai __vector unsigned long long
6605vec_rli(__vector unsigned long long __a, unsigned long __b) {
6606 return __builtin_s390_verllg(__a, (int)__b);
6607}
6608
6609/*-- vec_rl_mask ------------------------------------------------------------*/
6610
6611extern __ATTRS_o __vector signed char
6612vec_rl_mask(__vector signed char __a, __vector unsigned char __b,
6613 unsigned char __c) __constant(__c);
6614
6615extern __ATTRS_o __vector unsigned char
6616vec_rl_mask(__vector unsigned char __a, __vector unsigned char __b,
6617 unsigned char __c) __constant(__c);
6618
6619extern __ATTRS_o __vector signed short
6620vec_rl_mask(__vector signed short __a, __vector unsigned short __b,
6621 unsigned char __c) __constant(__c);
6622
6623extern __ATTRS_o __vector unsigned short
6624vec_rl_mask(__vector unsigned short __a, __vector unsigned short __b,
6625 unsigned char __c) __constant(__c);
6626
6627extern __ATTRS_o __vector signed int
6628vec_rl_mask(__vector signed int __a, __vector unsigned int __b,
6629 unsigned char __c) __constant(__c);
6630
6631extern __ATTRS_o __vector unsigned int
6632vec_rl_mask(__vector unsigned int __a, __vector unsigned int __b,
6633 unsigned char __c) __constant(__c);
6634
6635extern __ATTRS_o __vector signed long long
6636vec_rl_mask(__vector signed long long __a, __vector unsigned long long __b,
6637 unsigned char __c) __constant(__c);
6638
6639extern __ATTRS_o __vector unsigned long long
6640vec_rl_mask(__vector unsigned long long __a, __vector unsigned long long __b,
6641 unsigned char __c) __constant(__c);
6642
6643#define vec_rl_mask(X, Y, Z) ((__typeof__((vec_rl_mask)((X), (Y), (Z)))) \
6644 __extension__ ({ \
6645 __vector unsigned char __res; \
6646 __vector unsigned char __x = (__vector unsigned char)(X); \
6647 __vector unsigned char __y = (__vector unsigned char)(Y); \
6648 switch (sizeof ((X)[0])) { \
6649 case 1: __res = (__vector unsigned char) __builtin_s390_verimb( \
6650 (__vector unsigned char)__x, (__vector unsigned char)__x, \
6651 (__vector unsigned char)__y, (Z)); break; \
6652 case 2: __res = (__vector unsigned char) __builtin_s390_verimh( \
6653 (__vector unsigned short)__x, (__vector unsigned short)__x, \
6654 (__vector unsigned short)__y, (Z)); break; \
6655 case 4: __res = (__vector unsigned char) __builtin_s390_verimf( \
6656 (__vector unsigned int)__x, (__vector unsigned int)__x, \
6657 (__vector unsigned int)__y, (Z)); break; \
6658 default: __res = (__vector unsigned char) __builtin_s390_verimg( \
6659 (__vector unsigned long long)__x, (__vector unsigned long long)__x, \
6660 (__vector unsigned long long)__y, (Z)); break; \
6661 } __res; }))
6662
6663/*-- vec_sll ----------------------------------------------------------------*/
6664
6665static inline __ATTRS_o_ai __vector signed char
6666vec_sll(__vector signed char __a, __vector unsigned char __b) {
6667 return (__vector signed char)__builtin_s390_vsl(
6668 (__vector unsigned char)__a, __b);
6669}
6670
6671// This prototype is deprecated.
6672static inline __ATTRS_o_ai __vector signed char
6673vec_sll(__vector signed char __a, __vector unsigned short __b) {
6674 return (__vector signed char)__builtin_s390_vsl(
6675 (__vector unsigned char)__a, (__vector unsigned char)__b);
6676}
6677
6678// This prototype is deprecated.
6679static inline __ATTRS_o_ai __vector signed char
6680vec_sll(__vector signed char __a, __vector unsigned int __b) {
6681 return (__vector signed char)__builtin_s390_vsl(
6682 (__vector unsigned char)__a, (__vector unsigned char)__b);
6683}
6684
6685// This prototype is deprecated.
6686static inline __ATTRS_o_ai __vector __bool char
6687vec_sll(__vector __bool char __a, __vector unsigned char __b) {
6688 return (__vector __bool char)__builtin_s390_vsl(
6689 (__vector unsigned char)__a, __b);
6690}
6691
6692// This prototype is deprecated.
6693static inline __ATTRS_o_ai __vector __bool char
6694vec_sll(__vector __bool char __a, __vector unsigned short __b) {
6695 return (__vector __bool char)__builtin_s390_vsl(
6696 (__vector unsigned char)__a, (__vector unsigned char)__b);
6697}
6698
6699// This prototype is deprecated.
6700static inline __ATTRS_o_ai __vector __bool char
6701vec_sll(__vector __bool char __a, __vector unsigned int __b) {
6702 return (__vector __bool char)__builtin_s390_vsl(
6703 (__vector unsigned char)__a, (__vector unsigned char)__b);
6704}
6705
6706static inline __ATTRS_o_ai __vector unsigned char
6707vec_sll(__vector unsigned char __a, __vector unsigned char __b) {
6708 return __builtin_s390_vsl(__a, __b);
6709}
6710
6711// This prototype is deprecated.
6712static inline __ATTRS_o_ai __vector unsigned char
6713vec_sll(__vector unsigned char __a, __vector unsigned short __b) {
6714 return __builtin_s390_vsl(__a, (__vector unsigned char)__b);
6715}
6716
6717// This prototype is deprecated.
6718static inline __ATTRS_o_ai __vector unsigned char
6719vec_sll(__vector unsigned char __a, __vector unsigned int __b) {
6720 return __builtin_s390_vsl(__a, (__vector unsigned char)__b);
6721}
6722
6723static inline __ATTRS_o_ai __vector signed short
6724vec_sll(__vector signed short __a, __vector unsigned char __b) {
6725 return (__vector signed short)__builtin_s390_vsl(
6726 (__vector unsigned char)__a, __b);
6727}
6728
6729// This prototype is deprecated.
6730static inline __ATTRS_o_ai __vector signed short
6731vec_sll(__vector signed short __a, __vector unsigned short __b) {
6732 return (__vector signed short)__builtin_s390_vsl(
6733 (__vector unsigned char)__a, (__vector unsigned char)__b);
6734}
6735
6736// This prototype is deprecated.
6737static inline __ATTRS_o_ai __vector signed short
6738vec_sll(__vector signed short __a, __vector unsigned int __b) {
6739 return (__vector signed short)__builtin_s390_vsl(
6740 (__vector unsigned char)__a, (__vector unsigned char)__b);
6741}
6742
6743// This prototype is deprecated.
6744static inline __ATTRS_o_ai __vector __bool short
6745vec_sll(__vector __bool short __a, __vector unsigned char __b) {
6746 return (__vector __bool short)__builtin_s390_vsl(
6747 (__vector unsigned char)__a, __b);
6748}
6749
6750// This prototype is deprecated.
6751static inline __ATTRS_o_ai __vector __bool short
6752vec_sll(__vector __bool short __a, __vector unsigned short __b) {
6753 return (__vector __bool short)__builtin_s390_vsl(
6754 (__vector unsigned char)__a, (__vector unsigned char)__b);
6755}
6756
6757// This prototype is deprecated.
6758static inline __ATTRS_o_ai __vector __bool short
6759vec_sll(__vector __bool short __a, __vector unsigned int __b) {
6760 return (__vector __bool short)__builtin_s390_vsl(
6761 (__vector unsigned char)__a, (__vector unsigned char)__b);
6762}
6763
6764static inline __ATTRS_o_ai __vector unsigned short
6765vec_sll(__vector unsigned short __a, __vector unsigned char __b) {
6766 return (__vector unsigned short)__builtin_s390_vsl(
6767 (__vector unsigned char)__a, __b);
6768}
6769
6770// This prototype is deprecated.
6771static inline __ATTRS_o_ai __vector unsigned short
6772vec_sll(__vector unsigned short __a, __vector unsigned short __b) {
6773 return (__vector unsigned short)__builtin_s390_vsl(
6774 (__vector unsigned char)__a, (__vector unsigned char)__b);
6775}
6776
6777// This prototype is deprecated.
6778static inline __ATTRS_o_ai __vector unsigned short
6779vec_sll(__vector unsigned short __a, __vector unsigned int __b) {
6780 return (__vector unsigned short)__builtin_s390_vsl(
6781 (__vector unsigned char)__a, (__vector unsigned char)__b);
6782}
6783
6784static inline __ATTRS_o_ai __vector signed int
6785vec_sll(__vector signed int __a, __vector unsigned char __b) {
6786 return (__vector signed int)__builtin_s390_vsl(
6787 (__vector unsigned char)__a, __b);
6788}
6789
6790// This prototype is deprecated.
6791static inline __ATTRS_o_ai __vector signed int
6792vec_sll(__vector signed int __a, __vector unsigned short __b) {
6793 return (__vector signed int)__builtin_s390_vsl(
6794 (__vector unsigned char)__a, (__vector unsigned char)__b);
6795}
6796
6797// This prototype is deprecated.
6798static inline __ATTRS_o_ai __vector signed int
6799vec_sll(__vector signed int __a, __vector unsigned int __b) {
6800 return (__vector signed int)__builtin_s390_vsl(
6801 (__vector unsigned char)__a, (__vector unsigned char)__b);
6802}
6803
6804// This prototype is deprecated.
6805static inline __ATTRS_o_ai __vector __bool int
6806vec_sll(__vector __bool int __a, __vector unsigned char __b) {
6807 return (__vector __bool int)__builtin_s390_vsl(
6808 (__vector unsigned char)__a, __b);
6809}
6810
6811// This prototype is deprecated.
6812static inline __ATTRS_o_ai __vector __bool int
6813vec_sll(__vector __bool int __a, __vector unsigned short __b) {
6814 return (__vector __bool int)__builtin_s390_vsl(
6815 (__vector unsigned char)__a, (__vector unsigned char)__b);
6816}
6817
6818// This prototype is deprecated.
6819static inline __ATTRS_o_ai __vector __bool int
6820vec_sll(__vector __bool int __a, __vector unsigned int __b) {
6821 return (__vector __bool int)__builtin_s390_vsl(
6822 (__vector unsigned char)__a, (__vector unsigned char)__b);
6823}
6824
6825static inline __ATTRS_o_ai __vector unsigned int
6826vec_sll(__vector unsigned int __a, __vector unsigned char __b) {
6827 return (__vector unsigned int)__builtin_s390_vsl(
6828 (__vector unsigned char)__a, __b);
6829}
6830
6831// This prototype is deprecated.
6832static inline __ATTRS_o_ai __vector unsigned int
6833vec_sll(__vector unsigned int __a, __vector unsigned short __b) {
6834 return (__vector unsigned int)__builtin_s390_vsl(
6835 (__vector unsigned char)__a, (__vector unsigned char)__b);
6836}
6837
6838// This prototype is deprecated.
6839static inline __ATTRS_o_ai __vector unsigned int
6840vec_sll(__vector unsigned int __a, __vector unsigned int __b) {
6841 return (__vector unsigned int)__builtin_s390_vsl(
6842 (__vector unsigned char)__a, (__vector unsigned char)__b);
6843}
6844
6845static inline __ATTRS_o_ai __vector signed long long
6846vec_sll(__vector signed long long __a, __vector unsigned char __b) {
6847 return (__vector signed long long)__builtin_s390_vsl(
6848 (__vector unsigned char)__a, __b);
6849}
6850
6851// This prototype is deprecated.
6852static inline __ATTRS_o_ai __vector signed long long
6853vec_sll(__vector signed long long __a, __vector unsigned short __b) {
6854 return (__vector signed long long)__builtin_s390_vsl(
6855 (__vector unsigned char)__a, (__vector unsigned char)__b);
6856}
6857
6858// This prototype is deprecated.
6859static inline __ATTRS_o_ai __vector signed long long
6860vec_sll(__vector signed long long __a, __vector unsigned int __b) {
6861 return (__vector signed long long)__builtin_s390_vsl(
6862 (__vector unsigned char)__a, (__vector unsigned char)__b);
6863}
6864
6865// This prototype is deprecated.
6866static inline __ATTRS_o_ai __vector __bool long long
6867vec_sll(__vector __bool long long __a, __vector unsigned char __b) {
6868 return (__vector __bool long long)__builtin_s390_vsl(
6869 (__vector unsigned char)__a, __b);
6870}
6871
6872// This prototype is deprecated.
6873static inline __ATTRS_o_ai __vector __bool long long
6874vec_sll(__vector __bool long long __a, __vector unsigned short __b) {
6875 return (__vector __bool long long)__builtin_s390_vsl(
6876 (__vector unsigned char)__a, (__vector unsigned char)__b);
6877}
6878
6879// This prototype is deprecated.
6880static inline __ATTRS_o_ai __vector __bool long long
6881vec_sll(__vector __bool long long __a, __vector unsigned int __b) {
6882 return (__vector __bool long long)__builtin_s390_vsl(
6883 (__vector unsigned char)__a, (__vector unsigned char)__b);
6884}
6885
6886static inline __ATTRS_o_ai __vector unsigned long long
6887vec_sll(__vector unsigned long long __a, __vector unsigned char __b) {
6888 return (__vector unsigned long long)__builtin_s390_vsl(
6889 (__vector unsigned char)__a, __b);
6890}
6891
6892// This prototype is deprecated.
6893static inline __ATTRS_o_ai __vector unsigned long long
6894vec_sll(__vector unsigned long long __a, __vector unsigned short __b) {
6895 return (__vector unsigned long long)__builtin_s390_vsl(
6896 (__vector unsigned char)__a, (__vector unsigned char)__b);
6897}
6898
6899// This prototype is deprecated.
6900static inline __ATTRS_o_ai __vector unsigned long long
6901vec_sll(__vector unsigned long long __a, __vector unsigned int __b) {
6902 return (__vector unsigned long long)__builtin_s390_vsl(
6903 (__vector unsigned char)__a, (__vector unsigned char)__b);
6904}
6905
6906/*-- vec_slb ----------------------------------------------------------------*/
6907
6908static inline __ATTRS_o_ai __vector signed char
6909vec_slb(__vector signed char __a, __vector signed char __b) {
6910 return (__vector signed char)__builtin_s390_vslb(
6911 (__vector unsigned char)__a, (__vector unsigned char)__b);
6912}
6913
6914static inline __ATTRS_o_ai __vector signed char
6915vec_slb(__vector signed char __a, __vector unsigned char __b) {
6916 return (__vector signed char)__builtin_s390_vslb(
6917 (__vector unsigned char)__a, __b);
6918}
6919
6920static inline __ATTRS_o_ai __vector unsigned char
6921vec_slb(__vector unsigned char __a, __vector signed char __b) {
6922 return __builtin_s390_vslb(__a, (__vector unsigned char)__b);
6923}
6924
6925static inline __ATTRS_o_ai __vector unsigned char
6926vec_slb(__vector unsigned char __a, __vector unsigned char __b) {
6927 return __builtin_s390_vslb(__a, __b);
6928}
6929
6930static inline __ATTRS_o_ai __vector signed short
6931vec_slb(__vector signed short __a, __vector signed short __b) {
6932 return (__vector signed short)__builtin_s390_vslb(
6933 (__vector unsigned char)__a, (__vector unsigned char)__b);
6934}
6935
6936static inline __ATTRS_o_ai __vector signed short
6937vec_slb(__vector signed short __a, __vector unsigned short __b) {
6938 return (__vector signed short)__builtin_s390_vslb(
6939 (__vector unsigned char)__a, (__vector unsigned char)__b);
6940}
6941
6942static inline __ATTRS_o_ai __vector unsigned short
6943vec_slb(__vector unsigned short __a, __vector signed short __b) {
6944 return (__vector unsigned short)__builtin_s390_vslb(
6945 (__vector unsigned char)__a, (__vector unsigned char)__b);
6946}
6947
6948static inline __ATTRS_o_ai __vector unsigned short
6949vec_slb(__vector unsigned short __a, __vector unsigned short __b) {
6950 return (__vector unsigned short)__builtin_s390_vslb(
6951 (__vector unsigned char)__a, (__vector unsigned char)__b);
6952}
6953
6954static inline __ATTRS_o_ai __vector signed int
6955vec_slb(__vector signed int __a, __vector signed int __b) {
6956 return (__vector signed int)__builtin_s390_vslb(
6957 (__vector unsigned char)__a, (__vector unsigned char)__b);
6958}
6959
6960static inline __ATTRS_o_ai __vector signed int
6961vec_slb(__vector signed int __a, __vector unsigned int __b) {
6962 return (__vector signed int)__builtin_s390_vslb(
6963 (__vector unsigned char)__a, (__vector unsigned char)__b);
6964}
6965
6966static inline __ATTRS_o_ai __vector unsigned int
6967vec_slb(__vector unsigned int __a, __vector signed int __b) {
6968 return (__vector unsigned int)__builtin_s390_vslb(
6969 (__vector unsigned char)__a, (__vector unsigned char)__b);
6970}
6971
6972static inline __ATTRS_o_ai __vector unsigned int
6973vec_slb(__vector unsigned int __a, __vector unsigned int __b) {
6974 return (__vector unsigned int)__builtin_s390_vslb(
6975 (__vector unsigned char)__a, (__vector unsigned char)__b);
6976}
6977
6978static inline __ATTRS_o_ai __vector signed long long
6979vec_slb(__vector signed long long __a, __vector signed long long __b) {
6980 return (__vector signed long long)__builtin_s390_vslb(
6981 (__vector unsigned char)__a, (__vector unsigned char)__b);
6982}
6983
6984static inline __ATTRS_o_ai __vector signed long long
6985vec_slb(__vector signed long long __a, __vector unsigned long long __b) {
6986 return (__vector signed long long)__builtin_s390_vslb(
6987 (__vector unsigned char)__a, (__vector unsigned char)__b);
6988}
6989
6990static inline __ATTRS_o_ai __vector unsigned long long
6991vec_slb(__vector unsigned long long __a, __vector signed long long __b) {
6992 return (__vector unsigned long long)__builtin_s390_vslb(
6993 (__vector unsigned char)__a, (__vector unsigned char)__b);
6994}
6995
6996static inline __ATTRS_o_ai __vector unsigned long long
6997vec_slb(__vector unsigned long long __a, __vector unsigned long long __b) {
6998 return (__vector unsigned long long)__builtin_s390_vslb(
6999 (__vector unsigned char)__a, (__vector unsigned char)__b);
7000}
7001
7002#if __ARCH__ >= 12
7003static inline __ATTRS_o_ai __vector float
7004vec_slb(__vector float __a, __vector signed int __b) {
7005 return (__vector float)__builtin_s390_vslb(
7006 (__vector unsigned char)__a, (__vector unsigned char)__b);
7007}
7008
7009static inline __ATTRS_o_ai __vector float
7010vec_slb(__vector float __a, __vector unsigned int __b) {
7011 return (__vector float)__builtin_s390_vslb(
7012 (__vector unsigned char)__a, (__vector unsigned char)__b);
7013}
7014#endif
7015
7016static inline __ATTRS_o_ai __vector double
7017vec_slb(__vector double __a, __vector signed long long __b) {
7018 return (__vector double)__builtin_s390_vslb(
7019 (__vector unsigned char)__a, (__vector unsigned char)__b);
7020}
7021
7022static inline __ATTRS_o_ai __vector double
7023vec_slb(__vector double __a, __vector unsigned long long __b) {
7024 return (__vector double)__builtin_s390_vslb(
7025 (__vector unsigned char)__a, (__vector unsigned char)__b);
7026}
7027
7028/*-- vec_sld ----------------------------------------------------------------*/
7029
7030extern __ATTRS_o __vector signed char
7031vec_sld(__vector signed char __a, __vector signed char __b, int __c)
7032 __constant_range(__c, 0, 15);
7033
7034extern __ATTRS_o __vector __bool char
7035vec_sld(__vector __bool char __a, __vector __bool char __b, int __c)
7036 __constant_range(__c, 0, 15);
7037
7038extern __ATTRS_o __vector unsigned char
7039vec_sld(__vector unsigned char __a, __vector unsigned char __b, int __c)
7040 __constant_range(__c, 0, 15);
7041
7042extern __ATTRS_o __vector signed short
7043vec_sld(__vector signed short __a, __vector signed short __b, int __c)
7044 __constant_range(__c, 0, 15);
7045
7046extern __ATTRS_o __vector __bool short
7047vec_sld(__vector __bool short __a, __vector __bool short __b, int __c)
7048 __constant_range(__c, 0, 15);
7049
7050extern __ATTRS_o __vector unsigned short
7051vec_sld(__vector unsigned short __a, __vector unsigned short __b, int __c)
7052 __constant_range(__c, 0, 15);
7053
7054extern __ATTRS_o __vector signed int
7055vec_sld(__vector signed int __a, __vector signed int __b, int __c)
7056 __constant_range(__c, 0, 15);
7057
7058extern __ATTRS_o __vector __bool int
7059vec_sld(__vector __bool int __a, __vector __bool int __b, int __c)
7060 __constant_range(__c, 0, 15);
7061
7062extern __ATTRS_o __vector unsigned int
7063vec_sld(__vector unsigned int __a, __vector unsigned int __b, int __c)
7064 __constant_range(__c, 0, 15);
7065
7066extern __ATTRS_o __vector signed long long
7067vec_sld(__vector signed long long __a, __vector signed long long __b, int __c)
7068 __constant_range(__c, 0, 15);
7069
7070extern __ATTRS_o __vector __bool long long
7071vec_sld(__vector __bool long long __a, __vector __bool long long __b, int __c)
7072 __constant_range(__c, 0, 15);
7073
7074extern __ATTRS_o __vector unsigned long long
7075vec_sld(__vector unsigned long long __a, __vector unsigned long long __b,
7076 int __c)
7077 __constant_range(__c, 0, 15);
7078
7079#if __ARCH__ >= 12
7080extern __ATTRS_o __vector float
7081vec_sld(__vector float __a, __vector float __b, int __c)
7082 __constant_range(__c, 0, 15);
7083#endif
7084
7085extern __ATTRS_o __vector double
7086vec_sld(__vector double __a, __vector double __b, int __c)
7087 __constant_range(__c, 0, 15);
7088
7089#define vec_sld(X, Y, Z) ((__typeof__((vec_sld)((X), (Y), (Z)))) \
7090 __builtin_s390_vsldb((__vector unsigned char)(X), \
7091 (__vector unsigned char)(Y), (Z)))
7092
7093/*-- vec_sldw ---------------------------------------------------------------*/
7094
7095extern __ATTRS_o __vector signed char
7096vec_sldw(__vector signed char __a, __vector signed char __b, int __c)
7097 __constant_range(__c, 0, 3);
7098
7099extern __ATTRS_o __vector unsigned char
7100vec_sldw(__vector unsigned char __a, __vector unsigned char __b, int __c)
7101 __constant_range(__c, 0, 3);
7102
7103extern __ATTRS_o __vector signed short
7104vec_sldw(__vector signed short __a, __vector signed short __b, int __c)
7105 __constant_range(__c, 0, 3);
7106
7107extern __ATTRS_o __vector unsigned short
7108vec_sldw(__vector unsigned short __a, __vector unsigned short __b, int __c)
7109 __constant_range(__c, 0, 3);
7110
7111extern __ATTRS_o __vector signed int
7112vec_sldw(__vector signed int __a, __vector signed int __b, int __c)
7113 __constant_range(__c, 0, 3);
7114
7115extern __ATTRS_o __vector unsigned int
7116vec_sldw(__vector unsigned int __a, __vector unsigned int __b, int __c)
7117 __constant_range(__c, 0, 3);
7118
7119extern __ATTRS_o __vector signed long long
7120vec_sldw(__vector signed long long __a, __vector signed long long __b, int __c)
7121 __constant_range(__c, 0, 3);
7122
7123extern __ATTRS_o __vector unsigned long long
7124vec_sldw(__vector unsigned long long __a, __vector unsigned long long __b,
7125 int __c)
7126 __constant_range(__c, 0, 3);
7127
7128// This prototype is deprecated.
7129extern __ATTRS_o __vector double
7130vec_sldw(__vector double __a, __vector double __b, int __c)
7131 __constant_range(__c, 0, 3);
7132
7133#define vec_sldw(X, Y, Z) ((__typeof__((vec_sldw)((X), (Y), (Z)))) \
7134 __builtin_s390_vsldb((__vector unsigned char)(X), \
7135 (__vector unsigned char)(Y), (Z) * 4))
7136
7137/*-- vec_sldb ---------------------------------------------------------------*/
7138
7139#if __ARCH__ >= 13
7140
7141extern __ATTRS_o __vector signed char
7142vec_sldb(__vector signed char __a, __vector signed char __b, int __c)
7143 __constant_range(__c, 0, 7);
7144
7145extern __ATTRS_o __vector unsigned char
7146vec_sldb(__vector unsigned char __a, __vector unsigned char __b, int __c)
7147 __constant_range(__c, 0, 7);
7148
7149extern __ATTRS_o __vector signed short
7150vec_sldb(__vector signed short __a, __vector signed short __b, int __c)
7151 __constant_range(__c, 0, 7);
7152
7153extern __ATTRS_o __vector unsigned short
7154vec_sldb(__vector unsigned short __a, __vector unsigned short __b, int __c)
7155 __constant_range(__c, 0, 7);
7156
7157extern __ATTRS_o __vector signed int
7158vec_sldb(__vector signed int __a, __vector signed int __b, int __c)
7159 __constant_range(__c, 0, 7);
7160
7161extern __ATTRS_o __vector unsigned int
7162vec_sldb(__vector unsigned int __a, __vector unsigned int __b, int __c)
7163 __constant_range(__c, 0, 7);
7164
7165extern __ATTRS_o __vector signed long long
7166vec_sldb(__vector signed long long __a, __vector signed long long __b, int __c)
7167 __constant_range(__c, 0, 7);
7168
7169extern __ATTRS_o __vector unsigned long long
7170vec_sldb(__vector unsigned long long __a, __vector unsigned long long __b,
7171 int __c)
7172 __constant_range(__c, 0, 7);
7173
7174extern __ATTRS_o __vector float
7175vec_sldb(__vector float __a, __vector float __b, int __c)
7176 __constant_range(__c, 0, 7);
7177
7178extern __ATTRS_o __vector double
7179vec_sldb(__vector double __a, __vector double __b, int __c)
7180 __constant_range(__c, 0, 7);
7181
7182#define vec_sldb(X, Y, Z) ((__typeof__((vec_sldb)((X), (Y), (Z)))) \
7183 __builtin_s390_vsld((__vector unsigned char)(X), \
7184 (__vector unsigned char)(Y), (Z)))
7185
7186#endif
7187
7188/*-- vec_sral ---------------------------------------------------------------*/
7189
7190static inline __ATTRS_o_ai __vector signed char
7191vec_sral(__vector signed char __a, __vector unsigned char __b) {
7192 return (__vector signed char)__builtin_s390_vsra(
7193 (__vector unsigned char)__a, __b);
7194}
7195
7196// This prototype is deprecated.
7197static inline __ATTRS_o_ai __vector signed char
7198vec_sral(__vector signed char __a, __vector unsigned short __b) {
7199 return (__vector signed char)__builtin_s390_vsra(
7200 (__vector unsigned char)__a, (__vector unsigned char)__b);
7201}
7202
7203// This prototype is deprecated.
7204static inline __ATTRS_o_ai __vector signed char
7205vec_sral(__vector signed char __a, __vector unsigned int __b) {
7206 return (__vector signed char)__builtin_s390_vsra(
7207 (__vector unsigned char)__a, (__vector unsigned char)__b);
7208}
7209
7210// This prototype is deprecated.
7211static inline __ATTRS_o_ai __vector __bool char
7212vec_sral(__vector __bool char __a, __vector unsigned char __b) {
7213 return (__vector __bool char)__builtin_s390_vsra(
7214 (__vector unsigned char)__a, __b);
7215}
7216
7217// This prototype is deprecated.
7218static inline __ATTRS_o_ai __vector __bool char
7219vec_sral(__vector __bool char __a, __vector unsigned short __b) {
7220 return (__vector __bool char)__builtin_s390_vsra(
7221 (__vector unsigned char)__a, (__vector unsigned char)__b);
7222}
7223
7224// This prototype is deprecated.
7225static inline __ATTRS_o_ai __vector __bool char
7226vec_sral(__vector __bool char __a, __vector unsigned int __b) {
7227 return (__vector __bool char)__builtin_s390_vsra(
7228 (__vector unsigned char)__a, (__vector unsigned char)__b);
7229}
7230
7231static inline __ATTRS_o_ai __vector unsigned char
7232vec_sral(__vector unsigned char __a, __vector unsigned char __b) {
7233 return __builtin_s390_vsra(__a, __b);
7234}
7235
7236// This prototype is deprecated.
7237static inline __ATTRS_o_ai __vector unsigned char
7238vec_sral(__vector unsigned char __a, __vector unsigned short __b) {
7239 return __builtin_s390_vsra(__a, (__vector unsigned char)__b);
7240}
7241
7242// This prototype is deprecated.
7243static inline __ATTRS_o_ai __vector unsigned char
7244vec_sral(__vector unsigned char __a, __vector unsigned int __b) {
7245 return __builtin_s390_vsra(__a, (__vector unsigned char)__b);
7246}
7247
7248static inline __ATTRS_o_ai __vector signed short
7249vec_sral(__vector signed short __a, __vector unsigned char __b) {
7250 return (__vector signed short)__builtin_s390_vsra(
7251 (__vector unsigned char)__a, __b);
7252}
7253
7254// This prototype is deprecated.
7255static inline __ATTRS_o_ai __vector signed short
7256vec_sral(__vector signed short __a, __vector unsigned short __b) {
7257 return (__vector signed short)__builtin_s390_vsra(
7258 (__vector unsigned char)__a, (__vector unsigned char)__b);
7259}
7260
7261// This prototype is deprecated.
7262static inline __ATTRS_o_ai __vector signed short
7263vec_sral(__vector signed short __a, __vector unsigned int __b) {
7264 return (__vector signed short)__builtin_s390_vsra(
7265 (__vector unsigned char)__a, (__vector unsigned char)__b);
7266}
7267
7268// This prototype is deprecated.
7269static inline __ATTRS_o_ai __vector __bool short
7270vec_sral(__vector __bool short __a, __vector unsigned char __b) {
7271 return (__vector __bool short)__builtin_s390_vsra(
7272 (__vector unsigned char)__a, __b);
7273}
7274
7275// This prototype is deprecated.
7276static inline __ATTRS_o_ai __vector __bool short
7277vec_sral(__vector __bool short __a, __vector unsigned short __b) {
7278 return (__vector __bool short)__builtin_s390_vsra(
7279 (__vector unsigned char)__a, (__vector unsigned char)__b);
7280}
7281
7282// This prototype is deprecated.
7283static inline __ATTRS_o_ai __vector __bool short
7284vec_sral(__vector __bool short __a, __vector unsigned int __b) {
7285 return (__vector __bool short)__builtin_s390_vsra(
7286 (__vector unsigned char)__a, (__vector unsigned char)__b);
7287}
7288
7289static inline __ATTRS_o_ai __vector unsigned short
7290vec_sral(__vector unsigned short __a, __vector unsigned char __b) {
7291 return (__vector unsigned short)__builtin_s390_vsra(
7292 (__vector unsigned char)__a, __b);
7293}
7294
7295// This prototype is deprecated.
7296static inline __ATTRS_o_ai __vector unsigned short
7297vec_sral(__vector unsigned short __a, __vector unsigned short __b) {
7298 return (__vector unsigned short)__builtin_s390_vsra(
7299 (__vector unsigned char)__a, (__vector unsigned char)__b);
7300}
7301
7302// This prototype is deprecated.
7303static inline __ATTRS_o_ai __vector unsigned short
7304vec_sral(__vector unsigned short __a, __vector unsigned int __b) {
7305 return (__vector unsigned short)__builtin_s390_vsra(
7306 (__vector unsigned char)__a, (__vector unsigned char)__b);
7307}
7308
7309static inline __ATTRS_o_ai __vector signed int
7310vec_sral(__vector signed int __a, __vector unsigned char __b) {
7311 return (__vector signed int)__builtin_s390_vsra(
7312 (__vector unsigned char)__a, __b);
7313}
7314
7315// This prototype is deprecated.
7316static inline __ATTRS_o_ai __vector signed int
7317vec_sral(__vector signed int __a, __vector unsigned short __b) {
7318 return (__vector signed int)__builtin_s390_vsra(
7319 (__vector unsigned char)__a, (__vector unsigned char)__b);
7320}
7321
7322// This prototype is deprecated.
7323static inline __ATTRS_o_ai __vector signed int
7324vec_sral(__vector signed int __a, __vector unsigned int __b) {
7325 return (__vector signed int)__builtin_s390_vsra(
7326 (__vector unsigned char)__a, (__vector unsigned char)__b);
7327}
7328
7329// This prototype is deprecated.
7330static inline __ATTRS_o_ai __vector __bool int
7331vec_sral(__vector __bool int __a, __vector unsigned char __b) {
7332 return (__vector __bool int)__builtin_s390_vsra(
7333 (__vector unsigned char)__a, __b);
7334}
7335
7336// This prototype is deprecated.
7337static inline __ATTRS_o_ai __vector __bool int
7338vec_sral(__vector __bool int __a, __vector unsigned short __b) {
7339 return (__vector __bool int)__builtin_s390_vsra(
7340 (__vector unsigned char)__a, (__vector unsigned char)__b);
7341}
7342
7343// This prototype is deprecated.
7344static inline __ATTRS_o_ai __vector __bool int
7345vec_sral(__vector __bool int __a, __vector unsigned int __b) {
7346 return (__vector __bool int)__builtin_s390_vsra(
7347 (__vector unsigned char)__a, (__vector unsigned char)__b);
7348}
7349
7350static inline __ATTRS_o_ai __vector unsigned int
7351vec_sral(__vector unsigned int __a, __vector unsigned char __b) {
7352 return (__vector unsigned int)__builtin_s390_vsra(
7353 (__vector unsigned char)__a, __b);
7354}
7355
7356// This prototype is deprecated.
7357static inline __ATTRS_o_ai __vector unsigned int
7358vec_sral(__vector unsigned int __a, __vector unsigned short __b) {
7359 return (__vector unsigned int)__builtin_s390_vsra(
7360 (__vector unsigned char)__a, (__vector unsigned char)__b);
7361}
7362
7363// This prototype is deprecated.
7364static inline __ATTRS_o_ai __vector unsigned int
7365vec_sral(__vector unsigned int __a, __vector unsigned int __b) {
7366 return (__vector unsigned int)__builtin_s390_vsra(
7367 (__vector unsigned char)__a, (__vector unsigned char)__b);
7368}
7369
7370static inline __ATTRS_o_ai __vector signed long long
7371vec_sral(__vector signed long long __a, __vector unsigned char __b) {
7372 return (__vector signed long long)__builtin_s390_vsra(
7373 (__vector unsigned char)__a, __b);
7374}
7375
7376// This prototype is deprecated.
7377static inline __ATTRS_o_ai __vector signed long long
7378vec_sral(__vector signed long long __a, __vector unsigned short __b) {
7379 return (__vector signed long long)__builtin_s390_vsra(
7380 (__vector unsigned char)__a, (__vector unsigned char)__b);
7381}
7382
7383// This prototype is deprecated.
7384static inline __ATTRS_o_ai __vector signed long long
7385vec_sral(__vector signed long long __a, __vector unsigned int __b) {
7386 return (__vector signed long long)__builtin_s390_vsra(
7387 (__vector unsigned char)__a, (__vector unsigned char)__b);
7388}
7389
7390// This prototype is deprecated.
7391static inline __ATTRS_o_ai __vector __bool long long
7392vec_sral(__vector __bool long long __a, __vector unsigned char __b) {
7393 return (__vector __bool long long)__builtin_s390_vsra(
7394 (__vector unsigned char)__a, __b);
7395}
7396
7397// This prototype is deprecated.
7398static inline __ATTRS_o_ai __vector __bool long long
7399vec_sral(__vector __bool long long __a, __vector unsigned short __b) {
7400 return (__vector __bool long long)__builtin_s390_vsra(
7401 (__vector unsigned char)__a, (__vector unsigned char)__b);
7402}
7403
7404// This prototype is deprecated.
7405static inline __ATTRS_o_ai __vector __bool long long
7406vec_sral(__vector __bool long long __a, __vector unsigned int __b) {
7407 return (__vector __bool long long)__builtin_s390_vsra(
7408 (__vector unsigned char)__a, (__vector unsigned char)__b);
7409}
7410
7411static inline __ATTRS_o_ai __vector unsigned long long
7412vec_sral(__vector unsigned long long __a, __vector unsigned char __b) {
7413 return (__vector unsigned long long)__builtin_s390_vsra(
7414 (__vector unsigned char)__a, __b);
7415}
7416
7417// This prototype is deprecated.
7418static inline __ATTRS_o_ai __vector unsigned long long
7419vec_sral(__vector unsigned long long __a, __vector unsigned short __b) {
7420 return (__vector unsigned long long)__builtin_s390_vsra(
7421 (__vector unsigned char)__a, (__vector unsigned char)__b);
7422}
7423
7424// This prototype is deprecated.
7425static inline __ATTRS_o_ai __vector unsigned long long
7426vec_sral(__vector unsigned long long __a, __vector unsigned int __b) {
7427 return (__vector unsigned long long)__builtin_s390_vsra(
7428 (__vector unsigned char)__a, (__vector unsigned char)__b);
7429}
7430
7431/*-- vec_srab ---------------------------------------------------------------*/
7432
7433static inline __ATTRS_o_ai __vector signed char
7434vec_srab(__vector signed char __a, __vector signed char __b) {
7435 return (__vector signed char)__builtin_s390_vsrab(
7436 (__vector unsigned char)__a, (__vector unsigned char)__b);
7437}
7438
7439static inline __ATTRS_o_ai __vector signed char
7440vec_srab(__vector signed char __a, __vector unsigned char __b) {
7441 return (__vector signed char)__builtin_s390_vsrab(
7442 (__vector unsigned char)__a, __b);
7443}
7444
7445static inline __ATTRS_o_ai __vector unsigned char
7446vec_srab(__vector unsigned char __a, __vector signed char __b) {
7447 return __builtin_s390_vsrab(__a, (__vector unsigned char)__b);
7448}
7449
7450static inline __ATTRS_o_ai __vector unsigned char
7451vec_srab(__vector unsigned char __a, __vector unsigned char __b) {
7452 return __builtin_s390_vsrab(__a, __b);
7453}
7454
7455static inline __ATTRS_o_ai __vector signed short
7456vec_srab(__vector signed short __a, __vector signed short __b) {
7457 return (__vector signed short)__builtin_s390_vsrab(
7458 (__vector unsigned char)__a, (__vector unsigned char)__b);
7459}
7460
7461static inline __ATTRS_o_ai __vector signed short
7462vec_srab(__vector signed short __a, __vector unsigned short __b) {
7463 return (__vector signed short)__builtin_s390_vsrab(
7464 (__vector unsigned char)__a, (__vector unsigned char)__b);
7465}
7466
7467static inline __ATTRS_o_ai __vector unsigned short
7468vec_srab(__vector unsigned short __a, __vector signed short __b) {
7469 return (__vector unsigned short)__builtin_s390_vsrab(
7470 (__vector unsigned char)__a, (__vector unsigned char)__b);
7471}
7472
7473static inline __ATTRS_o_ai __vector unsigned short
7474vec_srab(__vector unsigned short __a, __vector unsigned short __b) {
7475 return (__vector unsigned short)__builtin_s390_vsrab(
7476 (__vector unsigned char)__a, (__vector unsigned char)__b);
7477}
7478
7479static inline __ATTRS_o_ai __vector signed int
7480vec_srab(__vector signed int __a, __vector signed int __b) {
7481 return (__vector signed int)__builtin_s390_vsrab(
7482 (__vector unsigned char)__a, (__vector unsigned char)__b);
7483}
7484
7485static inline __ATTRS_o_ai __vector signed int
7486vec_srab(__vector signed int __a, __vector unsigned int __b) {
7487 return (__vector signed int)__builtin_s390_vsrab(
7488 (__vector unsigned char)__a, (__vector unsigned char)__b);
7489}
7490
7491static inline __ATTRS_o_ai __vector unsigned int
7492vec_srab(__vector unsigned int __a, __vector signed int __b) {
7493 return (__vector unsigned int)__builtin_s390_vsrab(
7494 (__vector unsigned char)__a, (__vector unsigned char)__b);
7495}
7496
7497static inline __ATTRS_o_ai __vector unsigned int
7498vec_srab(__vector unsigned int __a, __vector unsigned int __b) {
7499 return (__vector unsigned int)__builtin_s390_vsrab(
7500 (__vector unsigned char)__a, (__vector unsigned char)__b);
7501}
7502
7503static inline __ATTRS_o_ai __vector signed long long
7504vec_srab(__vector signed long long __a, __vector signed long long __b) {
7505 return (__vector signed long long)__builtin_s390_vsrab(
7506 (__vector unsigned char)__a, (__vector unsigned char)__b);
7507}
7508
7509static inline __ATTRS_o_ai __vector signed long long
7510vec_srab(__vector signed long long __a, __vector unsigned long long __b) {
7511 return (__vector signed long long)__builtin_s390_vsrab(
7512 (__vector unsigned char)__a, (__vector unsigned char)__b);
7513}
7514
7515static inline __ATTRS_o_ai __vector unsigned long long
7516vec_srab(__vector unsigned long long __a, __vector signed long long __b) {
7517 return (__vector unsigned long long)__builtin_s390_vsrab(
7518 (__vector unsigned char)__a, (__vector unsigned char)__b);
7519}
7520
7521static inline __ATTRS_o_ai __vector unsigned long long
7522vec_srab(__vector unsigned long long __a, __vector unsigned long long __b) {
7523 return (__vector unsigned long long)__builtin_s390_vsrab(
7524 (__vector unsigned char)__a, (__vector unsigned char)__b);
7525}
7526
7527#if __ARCH__ >= 12
7528static inline __ATTRS_o_ai __vector float
7529vec_srab(__vector float __a, __vector signed int __b) {
7530 return (__vector float)__builtin_s390_vsrab(
7531 (__vector unsigned char)__a, (__vector unsigned char)__b);
7532}
7533
7534static inline __ATTRS_o_ai __vector float
7535vec_srab(__vector float __a, __vector unsigned int __b) {
7536 return (__vector float)__builtin_s390_vsrab(
7537 (__vector unsigned char)__a, (__vector unsigned char)__b);
7538}
7539#endif
7540
7541static inline __ATTRS_o_ai __vector double
7542vec_srab(__vector double __a, __vector signed long long __b) {
7543 return (__vector double)__builtin_s390_vsrab(
7544 (__vector unsigned char)__a, (__vector unsigned char)__b);
7545}
7546
7547static inline __ATTRS_o_ai __vector double
7548vec_srab(__vector double __a, __vector unsigned long long __b) {
7549 return (__vector double)__builtin_s390_vsrab(
7550 (__vector unsigned char)__a, (__vector unsigned char)__b);
7551}
7552
7553/*-- vec_srl ----------------------------------------------------------------*/
7554
7555static inline __ATTRS_o_ai __vector signed char
7556vec_srl(__vector signed char __a, __vector unsigned char __b) {
7557 return (__vector signed char)__builtin_s390_vsrl(
7558 (__vector unsigned char)__a, __b);
7559}
7560
7561// This prototype is deprecated.
7562static inline __ATTRS_o_ai __vector signed char
7563vec_srl(__vector signed char __a, __vector unsigned short __b) {
7564 return (__vector signed char)__builtin_s390_vsrl(
7565 (__vector unsigned char)__a, (__vector unsigned char)__b);
7566}
7567
7568// This prototype is deprecated.
7569static inline __ATTRS_o_ai __vector signed char
7570vec_srl(__vector signed char __a, __vector unsigned int __b) {
7571 return (__vector signed char)__builtin_s390_vsrl(
7572 (__vector unsigned char)__a, (__vector unsigned char)__b);
7573}
7574
7575// This prototype is deprecated.
7576static inline __ATTRS_o_ai __vector __bool char
7577vec_srl(__vector __bool char __a, __vector unsigned char __b) {
7578 return (__vector __bool char)__builtin_s390_vsrl(
7579 (__vector unsigned char)__a, __b);
7580}
7581
7582// This prototype is deprecated.
7583static inline __ATTRS_o_ai __vector __bool char
7584vec_srl(__vector __bool char __a, __vector unsigned short __b) {
7585 return (__vector __bool char)__builtin_s390_vsrl(
7586 (__vector unsigned char)__a, (__vector unsigned char)__b);
7587}
7588
7589// This prototype is deprecated.
7590static inline __ATTRS_o_ai __vector __bool char
7591vec_srl(__vector __bool char __a, __vector unsigned int __b) {
7592 return (__vector __bool char)__builtin_s390_vsrl(
7593 (__vector unsigned char)__a, (__vector unsigned char)__b);
7594}
7595
7596static inline __ATTRS_o_ai __vector unsigned char
7597vec_srl(__vector unsigned char __a, __vector unsigned char __b) {
7598 return __builtin_s390_vsrl(__a, __b);
7599}
7600
7601// This prototype is deprecated.
7602static inline __ATTRS_o_ai __vector unsigned char
7603vec_srl(__vector unsigned char __a, __vector unsigned short __b) {
7604 return __builtin_s390_vsrl(__a, (__vector unsigned char)__b);
7605}
7606
7607// This prototype is deprecated.
7608static inline __ATTRS_o_ai __vector unsigned char
7609vec_srl(__vector unsigned char __a, __vector unsigned int __b) {
7610 return __builtin_s390_vsrl(__a, (__vector unsigned char)__b);
7611}
7612
7613static inline __ATTRS_o_ai __vector signed short
7614vec_srl(__vector signed short __a, __vector unsigned char __b) {
7615 return (__vector signed short)__builtin_s390_vsrl(
7616 (__vector unsigned char)__a, __b);
7617}
7618
7619// This prototype is deprecated.
7620static inline __ATTRS_o_ai __vector signed short
7621vec_srl(__vector signed short __a, __vector unsigned short __b) {
7622 return (__vector signed short)__builtin_s390_vsrl(
7623 (__vector unsigned char)__a, (__vector unsigned char)__b);
7624}
7625
7626// This prototype is deprecated.
7627static inline __ATTRS_o_ai __vector signed short
7628vec_srl(__vector signed short __a, __vector unsigned int __b) {
7629 return (__vector signed short)__builtin_s390_vsrl(
7630 (__vector unsigned char)__a, (__vector unsigned char)__b);
7631}
7632
7633// This prototype is deprecated.
7634static inline __ATTRS_o_ai __vector __bool short
7635vec_srl(__vector __bool short __a, __vector unsigned char __b) {
7636 return (__vector __bool short)__builtin_s390_vsrl(
7637 (__vector unsigned char)__a, __b);
7638}
7639
7640// This prototype is deprecated.
7641static inline __ATTRS_o_ai __vector __bool short
7642vec_srl(__vector __bool short __a, __vector unsigned short __b) {
7643 return (__vector __bool short)__builtin_s390_vsrl(
7644 (__vector unsigned char)__a, (__vector unsigned char)__b);
7645}
7646
7647// This prototype is deprecated.
7648static inline __ATTRS_o_ai __vector __bool short
7649vec_srl(__vector __bool short __a, __vector unsigned int __b) {
7650 return (__vector __bool short)__builtin_s390_vsrl(
7651 (__vector unsigned char)__a, (__vector unsigned char)__b);
7652}
7653
7654static inline __ATTRS_o_ai __vector unsigned short
7655vec_srl(__vector unsigned short __a, __vector unsigned char __b) {
7656 return (__vector unsigned short)__builtin_s390_vsrl(
7657 (__vector unsigned char)__a, __b);
7658}
7659
7660// This prototype is deprecated.
7661static inline __ATTRS_o_ai __vector unsigned short
7662vec_srl(__vector unsigned short __a, __vector unsigned short __b) {
7663 return (__vector unsigned short)__builtin_s390_vsrl(
7664 (__vector unsigned char)__a, (__vector unsigned char)__b);
7665}
7666
7667// This prototype is deprecated.
7668static inline __ATTRS_o_ai __vector unsigned short
7669vec_srl(__vector unsigned short __a, __vector unsigned int __b) {
7670 return (__vector unsigned short)__builtin_s390_vsrl(
7671 (__vector unsigned char)__a, (__vector unsigned char)__b);
7672}
7673
7674static inline __ATTRS_o_ai __vector signed int
7675vec_srl(__vector signed int __a, __vector unsigned char __b) {
7676 return (__vector signed int)__builtin_s390_vsrl(
7677 (__vector unsigned char)__a, __b);
7678}
7679
7680// This prototype is deprecated.
7681static inline __ATTRS_o_ai __vector signed int
7682vec_srl(__vector signed int __a, __vector unsigned short __b) {
7683 return (__vector signed int)__builtin_s390_vsrl(
7684 (__vector unsigned char)__a, (__vector unsigned char)__b);
7685}
7686
7687// This prototype is deprecated.
7688static inline __ATTRS_o_ai __vector signed int
7689vec_srl(__vector signed int __a, __vector unsigned int __b) {
7690 return (__vector signed int)__builtin_s390_vsrl(
7691 (__vector unsigned char)__a, (__vector unsigned char)__b);
7692}
7693
7694// This prototype is deprecated.
7695static inline __ATTRS_o_ai __vector __bool int
7696vec_srl(__vector __bool int __a, __vector unsigned char __b) {
7697 return (__vector __bool int)__builtin_s390_vsrl(
7698 (__vector unsigned char)__a, __b);
7699}
7700
7701// This prototype is deprecated.
7702static inline __ATTRS_o_ai __vector __bool int
7703vec_srl(__vector __bool int __a, __vector unsigned short __b) {
7704 return (__vector __bool int)__builtin_s390_vsrl(
7705 (__vector unsigned char)__a, (__vector unsigned char)__b);
7706}
7707
7708// This prototype is deprecated.
7709static inline __ATTRS_o_ai __vector __bool int
7710vec_srl(__vector __bool int __a, __vector unsigned int __b) {
7711 return (__vector __bool int)__builtin_s390_vsrl(
7712 (__vector unsigned char)__a, (__vector unsigned char)__b);
7713}
7714
7715static inline __ATTRS_o_ai __vector unsigned int
7716vec_srl(__vector unsigned int __a, __vector unsigned char __b) {
7717 return (__vector unsigned int)__builtin_s390_vsrl(
7718 (__vector unsigned char)__a, __b);
7719}
7720
7721// This prototype is deprecated.
7722static inline __ATTRS_o_ai __vector unsigned int
7723vec_srl(__vector unsigned int __a, __vector unsigned short __b) {
7724 return (__vector unsigned int)__builtin_s390_vsrl(
7725 (__vector unsigned char)__a, (__vector unsigned char)__b);
7726}
7727
7728// This prototype is deprecated.
7729static inline __ATTRS_o_ai __vector unsigned int
7730vec_srl(__vector unsigned int __a, __vector unsigned int __b) {
7731 return (__vector unsigned int)__builtin_s390_vsrl(
7732 (__vector unsigned char)__a, (__vector unsigned char)__b);
7733}
7734
7735static inline __ATTRS_o_ai __vector signed long long
7736vec_srl(__vector signed long long __a, __vector unsigned char __b) {
7737 return (__vector signed long long)__builtin_s390_vsrl(
7738 (__vector unsigned char)__a, __b);
7739}
7740
7741// This prototype is deprecated.
7742static inline __ATTRS_o_ai __vector signed long long
7743vec_srl(__vector signed long long __a, __vector unsigned short __b) {
7744 return (__vector signed long long)__builtin_s390_vsrl(
7745 (__vector unsigned char)__a, (__vector unsigned char)__b);
7746}
7747
7748// This prototype is deprecated.
7749static inline __ATTRS_o_ai __vector signed long long
7750vec_srl(__vector signed long long __a, __vector unsigned int __b) {
7751 return (__vector signed long long)__builtin_s390_vsrl(
7752 (__vector unsigned char)__a, (__vector unsigned char)__b);
7753}
7754
7755// This prototype is deprecated.
7756static inline __ATTRS_o_ai __vector __bool long long
7757vec_srl(__vector __bool long long __a, __vector unsigned char __b) {
7758 return (__vector __bool long long)__builtin_s390_vsrl(
7759 (__vector unsigned char)__a, __b);
7760}
7761
7762// This prototype is deprecated.
7763static inline __ATTRS_o_ai __vector __bool long long
7764vec_srl(__vector __bool long long __a, __vector unsigned short __b) {
7765 return (__vector __bool long long)__builtin_s390_vsrl(
7766 (__vector unsigned char)__a, (__vector unsigned char)__b);
7767}
7768
7769// This prototype is deprecated.
7770static inline __ATTRS_o_ai __vector __bool long long
7771vec_srl(__vector __bool long long __a, __vector unsigned int __b) {
7772 return (__vector __bool long long)__builtin_s390_vsrl(
7773 (__vector unsigned char)__a, (__vector unsigned char)__b);
7774}
7775
7776static inline __ATTRS_o_ai __vector unsigned long long
7777vec_srl(__vector unsigned long long __a, __vector unsigned char __b) {
7778 return (__vector unsigned long long)__builtin_s390_vsrl(
7779 (__vector unsigned char)__a, __b);
7780}
7781
7782// This prototype is deprecated.
7783static inline __ATTRS_o_ai __vector unsigned long long
7784vec_srl(__vector unsigned long long __a, __vector unsigned short __b) {
7785 return (__vector unsigned long long)__builtin_s390_vsrl(
7786 (__vector unsigned char)__a, (__vector unsigned char)__b);
7787}
7788
7789// This prototype is deprecated.
7790static inline __ATTRS_o_ai __vector unsigned long long
7791vec_srl(__vector unsigned long long __a, __vector unsigned int __b) {
7792 return (__vector unsigned long long)__builtin_s390_vsrl(
7793 (__vector unsigned char)__a, (__vector unsigned char)__b);
7794}
7795
7796/*-- vec_srb ----------------------------------------------------------------*/
7797
7798static inline __ATTRS_o_ai __vector signed char
7799vec_srb(__vector signed char __a, __vector signed char __b) {
7800 return (__vector signed char)__builtin_s390_vsrlb(
7801 (__vector unsigned char)__a, (__vector unsigned char)__b);
7802}
7803
7804static inline __ATTRS_o_ai __vector signed char
7805vec_srb(__vector signed char __a, __vector unsigned char __b) {
7806 return (__vector signed char)__builtin_s390_vsrlb(
7807 (__vector unsigned char)__a, __b);
7808}
7809
7810static inline __ATTRS_o_ai __vector unsigned char
7811vec_srb(__vector unsigned char __a, __vector signed char __b) {
7812 return __builtin_s390_vsrlb(__a, (__vector unsigned char)__b);
7813}
7814
7815static inline __ATTRS_o_ai __vector unsigned char
7816vec_srb(__vector unsigned char __a, __vector unsigned char __b) {
7817 return __builtin_s390_vsrlb(__a, __b);
7818}
7819
7820static inline __ATTRS_o_ai __vector signed short
7821vec_srb(__vector signed short __a, __vector signed short __b) {
7822 return (__vector signed short)__builtin_s390_vsrlb(
7823 (__vector unsigned char)__a, (__vector unsigned char)__b);
7824}
7825
7826static inline __ATTRS_o_ai __vector signed short
7827vec_srb(__vector signed short __a, __vector unsigned short __b) {
7828 return (__vector signed short)__builtin_s390_vsrlb(
7829 (__vector unsigned char)__a, (__vector unsigned char)__b);
7830}
7831
7832static inline __ATTRS_o_ai __vector unsigned short
7833vec_srb(__vector unsigned short __a, __vector signed short __b) {
7834 return (__vector unsigned short)__builtin_s390_vsrlb(
7835 (__vector unsigned char)__a, (__vector unsigned char)__b);
7836}
7837
7838static inline __ATTRS_o_ai __vector unsigned short
7839vec_srb(__vector unsigned short __a, __vector unsigned short __b) {
7840 return (__vector unsigned short)__builtin_s390_vsrlb(
7841 (__vector unsigned char)__a, (__vector unsigned char)__b);
7842}
7843
7844static inline __ATTRS_o_ai __vector signed int
7845vec_srb(__vector signed int __a, __vector signed int __b) {
7846 return (__vector signed int)__builtin_s390_vsrlb(
7847 (__vector unsigned char)__a, (__vector unsigned char)__b);
7848}
7849
7850static inline __ATTRS_o_ai __vector signed int
7851vec_srb(__vector signed int __a, __vector unsigned int __b) {
7852 return (__vector signed int)__builtin_s390_vsrlb(
7853 (__vector unsigned char)__a, (__vector unsigned char)__b);
7854}
7855
7856static inline __ATTRS_o_ai __vector unsigned int
7857vec_srb(__vector unsigned int __a, __vector signed int __b) {
7858 return (__vector unsigned int)__builtin_s390_vsrlb(
7859 (__vector unsigned char)__a, (__vector unsigned char)__b);
7860}
7861
7862static inline __ATTRS_o_ai __vector unsigned int
7863vec_srb(__vector unsigned int __a, __vector unsigned int __b) {
7864 return (__vector unsigned int)__builtin_s390_vsrlb(
7865 (__vector unsigned char)__a, (__vector unsigned char)__b);
7866}
7867
7868static inline __ATTRS_o_ai __vector signed long long
7869vec_srb(__vector signed long long __a, __vector signed long long __b) {
7870 return (__vector signed long long)__builtin_s390_vsrlb(
7871 (__vector unsigned char)__a, (__vector unsigned char)__b);
7872}
7873
7874static inline __ATTRS_o_ai __vector signed long long
7875vec_srb(__vector signed long long __a, __vector unsigned long long __b) {
7876 return (__vector signed long long)__builtin_s390_vsrlb(
7877 (__vector unsigned char)__a, (__vector unsigned char)__b);
7878}
7879
7880static inline __ATTRS_o_ai __vector unsigned long long
7881vec_srb(__vector unsigned long long __a, __vector signed long long __b) {
7882 return (__vector unsigned long long)__builtin_s390_vsrlb(
7883 (__vector unsigned char)__a, (__vector unsigned char)__b);
7884}
7885
7886static inline __ATTRS_o_ai __vector unsigned long long
7887vec_srb(__vector unsigned long long __a, __vector unsigned long long __b) {
7888 return (__vector unsigned long long)__builtin_s390_vsrlb(
7889 (__vector unsigned char)__a, (__vector unsigned char)__b);
7890}
7891
7892#if __ARCH__ >= 12
7893static inline __ATTRS_o_ai __vector float
7894vec_srb(__vector float __a, __vector signed int __b) {
7895 return (__vector float)__builtin_s390_vsrlb(
7896 (__vector unsigned char)__a, (__vector unsigned char)__b);
7897}
7898
7899static inline __ATTRS_o_ai __vector float
7900vec_srb(__vector float __a, __vector unsigned int __b) {
7901 return (__vector float)__builtin_s390_vsrlb(
7902 (__vector unsigned char)__a, (__vector unsigned char)__b);
7903}
7904#endif
7905
7906static inline __ATTRS_o_ai __vector double
7907vec_srb(__vector double __a, __vector signed long long __b) {
7908 return (__vector double)__builtin_s390_vsrlb(
7909 (__vector unsigned char)__a, (__vector unsigned char)__b);
7910}
7911
7912static inline __ATTRS_o_ai __vector double
7913vec_srb(__vector double __a, __vector unsigned long long __b) {
7914 return (__vector double)__builtin_s390_vsrlb(
7915 (__vector unsigned char)__a, (__vector unsigned char)__b);
7916}
7917
7918/*-- vec_srdb ---------------------------------------------------------------*/
7919
7920#if __ARCH__ >= 13
7921
7922extern __ATTRS_o __vector signed char
7923vec_srdb(__vector signed char __a, __vector signed char __b, int __c)
7924 __constant_range(__c, 0, 7);
7925
7926extern __ATTRS_o __vector unsigned char
7927vec_srdb(__vector unsigned char __a, __vector unsigned char __b, int __c)
7928 __constant_range(__c, 0, 7);
7929
7930extern __ATTRS_o __vector signed short
7931vec_srdb(__vector signed short __a, __vector signed short __b, int __c)
7932 __constant_range(__c, 0, 7);
7933
7934extern __ATTRS_o __vector unsigned short
7935vec_srdb(__vector unsigned short __a, __vector unsigned short __b, int __c)
7936 __constant_range(__c, 0, 7);
7937
7938extern __ATTRS_o __vector signed int
7939vec_srdb(__vector signed int __a, __vector signed int __b, int __c)
7940 __constant_range(__c, 0, 7);
7941
7942extern __ATTRS_o __vector unsigned int
7943vec_srdb(__vector unsigned int __a, __vector unsigned int __b, int __c)
7944 __constant_range(__c, 0, 7);
7945
7946extern __ATTRS_o __vector signed long long
7947vec_srdb(__vector signed long long __a, __vector signed long long __b, int __c)
7948 __constant_range(__c, 0, 7);
7949
7950extern __ATTRS_o __vector unsigned long long
7951vec_srdb(__vector unsigned long long __a, __vector unsigned long long __b,
7952 int __c)
7953 __constant_range(__c, 0, 7);
7954
7955extern __ATTRS_o __vector float
7956vec_srdb(__vector float __a, __vector float __b, int __c)
7957 __constant_range(__c, 0, 7);
7958
7959extern __ATTRS_o __vector double
7960vec_srdb(__vector double __a, __vector double __b, int __c)
7961 __constant_range(__c, 0, 7);
7962
7963#define vec_srdb(X, Y, Z) ((__typeof__((vec_srdb)((X), (Y), (Z)))) \
7964 __builtin_s390_vsrd((__vector unsigned char)(X), \
7965 (__vector unsigned char)(Y), (Z)))
7966
7967#endif
7968
7969/*-- vec_abs ----------------------------------------------------------------*/
7970
7971static inline __ATTRS_o_ai __vector signed char
7972vec_abs(__vector signed char __a) {
7973 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed char)0));
7974}
7975
7976static inline __ATTRS_o_ai __vector signed short
7977vec_abs(__vector signed short __a) {
7978 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed short)0));
7979}
7980
7981static inline __ATTRS_o_ai __vector signed int
7982vec_abs(__vector signed int __a) {
7983 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed int)0));
7984}
7985
7986static inline __ATTRS_o_ai __vector signed long long
7987vec_abs(__vector signed long long __a) {
7988 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed long long)0));
7989}
7990
7991#if __ARCH__ >= 12
7992static inline __ATTRS_o_ai __vector float
7993vec_abs(__vector float __a) {
7994 return __builtin_s390_vflpsb(__a);
7995}
7996#endif
7997
7998static inline __ATTRS_o_ai __vector double
7999vec_abs(__vector double __a) {
8000 return __builtin_s390_vflpdb(__a);
8001}
8002
8003/*-- vec_nabs ---------------------------------------------------------------*/
8004
8005#if __ARCH__ >= 12
8006static inline __ATTRS_o_ai __vector float
8007vec_nabs(__vector float __a) {
8008 return __builtin_s390_vflnsb(__a);
8009}
8010#endif
8011
8012static inline __ATTRS_o_ai __vector double
8013vec_nabs(__vector double __a) {
8014 return __builtin_s390_vflndb(__a);
8015}
8016
8017/*-- vec_max ----------------------------------------------------------------*/
8018
8019static inline __ATTRS_o_ai __vector signed char
8020vec_max(__vector signed char __a, __vector signed char __b) {
8021 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8022}
8023
8024// This prototype is deprecated.
8025static inline __ATTRS_o_ai __vector signed char
8026vec_max(__vector signed char __a, __vector __bool char __b) {
8027 __vector signed char __bc = (__vector signed char)__b;
8028 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8029}
8030
8031// This prototype is deprecated.
8032static inline __ATTRS_o_ai __vector signed char
8033vec_max(__vector __bool char __a, __vector signed char __b) {
8034 __vector signed char __ac = (__vector signed char)__a;
8035 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8036}
8037
8038static inline __ATTRS_o_ai __vector unsigned char
8039vec_max(__vector unsigned char __a, __vector unsigned char __b) {
8040 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8041}
8042
8043// This prototype is deprecated.
8044static inline __ATTRS_o_ai __vector unsigned char
8045vec_max(__vector unsigned char __a, __vector __bool char __b) {
8046 __vector unsigned char __bc = (__vector unsigned char)__b;
8047 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8048}
8049
8050// This prototype is deprecated.
8051static inline __ATTRS_o_ai __vector unsigned char
8052vec_max(__vector __bool char __a, __vector unsigned char __b) {
8053 __vector unsigned char __ac = (__vector unsigned char)__a;
8054 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8055}
8056
8057static inline __ATTRS_o_ai __vector signed short
8058vec_max(__vector signed short __a, __vector signed short __b) {
8059 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8060}
8061
8062// This prototype is deprecated.
8063static inline __ATTRS_o_ai __vector signed short
8064vec_max(__vector signed short __a, __vector __bool short __b) {
8065 __vector signed short __bc = (__vector signed short)__b;
8066 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8067}
8068
8069// This prototype is deprecated.
8070static inline __ATTRS_o_ai __vector signed short
8071vec_max(__vector __bool short __a, __vector signed short __b) {
8072 __vector signed short __ac = (__vector signed short)__a;
8073 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8074}
8075
8076static inline __ATTRS_o_ai __vector unsigned short
8077vec_max(__vector unsigned short __a, __vector unsigned short __b) {
8078 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8079}
8080
8081// This prototype is deprecated.
8082static inline __ATTRS_o_ai __vector unsigned short
8083vec_max(__vector unsigned short __a, __vector __bool short __b) {
8084 __vector unsigned short __bc = (__vector unsigned short)__b;
8085 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8086}
8087
8088// This prototype is deprecated.
8089static inline __ATTRS_o_ai __vector unsigned short
8090vec_max(__vector __bool short __a, __vector unsigned short __b) {
8091 __vector unsigned short __ac = (__vector unsigned short)__a;
8092 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8093}
8094
8095static inline __ATTRS_o_ai __vector signed int
8096vec_max(__vector signed int __a, __vector signed int __b) {
8097 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8098}
8099
8100// This prototype is deprecated.
8101static inline __ATTRS_o_ai __vector signed int
8102vec_max(__vector signed int __a, __vector __bool int __b) {
8103 __vector signed int __bc = (__vector signed int)__b;
8104 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8105}
8106
8107// This prototype is deprecated.
8108static inline __ATTRS_o_ai __vector signed int
8109vec_max(__vector __bool int __a, __vector signed int __b) {
8110 __vector signed int __ac = (__vector signed int)__a;
8111 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8112}
8113
8114static inline __ATTRS_o_ai __vector unsigned int
8115vec_max(__vector unsigned int __a, __vector unsigned int __b) {
8116 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8117}
8118
8119// This prototype is deprecated.
8120static inline __ATTRS_o_ai __vector unsigned int
8121vec_max(__vector unsigned int __a, __vector __bool int __b) {
8122 __vector unsigned int __bc = (__vector unsigned int)__b;
8123 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8124}
8125
8126// This prototype is deprecated.
8127static inline __ATTRS_o_ai __vector unsigned int
8128vec_max(__vector __bool int __a, __vector unsigned int __b) {
8129 __vector unsigned int __ac = (__vector unsigned int)__a;
8130 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8131}
8132
8133static inline __ATTRS_o_ai __vector signed long long
8134vec_max(__vector signed long long __a, __vector signed long long __b) {
8135 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8136}
8137
8138// This prototype is deprecated.
8139static inline __ATTRS_o_ai __vector signed long long
8140vec_max(__vector signed long long __a, __vector __bool long long __b) {
8141 __vector signed long long __bc = (__vector signed long long)__b;
8142 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8143}
8144
8145// This prototype is deprecated.
8146static inline __ATTRS_o_ai __vector signed long long
8147vec_max(__vector __bool long long __a, __vector signed long long __b) {
8148 __vector signed long long __ac = (__vector signed long long)__a;
8149 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8150}
8151
8152static inline __ATTRS_o_ai __vector unsigned long long
8153vec_max(__vector unsigned long long __a, __vector unsigned long long __b) {
8154 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8155}
8156
8157// This prototype is deprecated.
8158static inline __ATTRS_o_ai __vector unsigned long long
8159vec_max(__vector unsigned long long __a, __vector __bool long long __b) {
8160 __vector unsigned long long __bc = (__vector unsigned long long)__b;
8161 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8162}
8163
8164// This prototype is deprecated.
8165static inline __ATTRS_o_ai __vector unsigned long long
8166vec_max(__vector __bool long long __a, __vector unsigned long long __b) {
8167 __vector unsigned long long __ac = (__vector unsigned long long)__a;
8168 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8169}
8170
8171#if __ARCH__ >= 12
8172static inline __ATTRS_o_ai __vector float
8173vec_max(__vector float __a, __vector float __b) {
8174 return __builtin_s390_vfmaxsb(__a, __b, 0);
8175}
8176#endif
8177
8178static inline __ATTRS_o_ai __vector double
8179vec_max(__vector double __a, __vector double __b) {
8180#if __ARCH__ >= 12
8181 return __builtin_s390_vfmaxdb(__a, __b, 0);
8182#else
8183 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8184#endif
8185}
8186
8187/*-- vec_min ----------------------------------------------------------------*/
8188
8189static inline __ATTRS_o_ai __vector signed char
8190vec_min(__vector signed char __a, __vector signed char __b) {
8191 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8192}
8193
8194// This prototype is deprecated.
8195static inline __ATTRS_o_ai __vector signed char
8196vec_min(__vector signed char __a, __vector __bool char __b) {
8197 __vector signed char __bc = (__vector signed char)__b;
8198 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8199}
8200
8201// This prototype is deprecated.
8202static inline __ATTRS_o_ai __vector signed char
8203vec_min(__vector __bool char __a, __vector signed char __b) {
8204 __vector signed char __ac = (__vector signed char)__a;
8205 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8206}
8207
8208static inline __ATTRS_o_ai __vector unsigned char
8209vec_min(__vector unsigned char __a, __vector unsigned char __b) {
8210 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8211}
8212
8213// This prototype is deprecated.
8214static inline __ATTRS_o_ai __vector unsigned char
8215vec_min(__vector unsigned char __a, __vector __bool char __b) {
8216 __vector unsigned char __bc = (__vector unsigned char)__b;
8217 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8218}
8219
8220// This prototype is deprecated.
8221static inline __ATTRS_o_ai __vector unsigned char
8222vec_min(__vector __bool char __a, __vector unsigned char __b) {
8223 __vector unsigned char __ac = (__vector unsigned char)__a;
8224 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8225}
8226
8227static inline __ATTRS_o_ai __vector signed short
8228vec_min(__vector signed short __a, __vector signed short __b) {
8229 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8230}
8231
8232// This prototype is deprecated.
8233static inline __ATTRS_o_ai __vector signed short
8234vec_min(__vector signed short __a, __vector __bool short __b) {
8235 __vector signed short __bc = (__vector signed short)__b;
8236 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8237}
8238
8239// This prototype is deprecated.
8240static inline __ATTRS_o_ai __vector signed short
8241vec_min(__vector __bool short __a, __vector signed short __b) {
8242 __vector signed short __ac = (__vector signed short)__a;
8243 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8244}
8245
8246static inline __ATTRS_o_ai __vector unsigned short
8247vec_min(__vector unsigned short __a, __vector unsigned short __b) {
8248 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8249}
8250
8251// This prototype is deprecated.
8252static inline __ATTRS_o_ai __vector unsigned short
8253vec_min(__vector unsigned short __a, __vector __bool short __b) {
8254 __vector unsigned short __bc = (__vector unsigned short)__b;
8255 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8256}
8257
8258// This prototype is deprecated.
8259static inline __ATTRS_o_ai __vector unsigned short
8260vec_min(__vector __bool short __a, __vector unsigned short __b) {
8261 __vector unsigned short __ac = (__vector unsigned short)__a;
8262 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8263}
8264
8265static inline __ATTRS_o_ai __vector signed int
8266vec_min(__vector signed int __a, __vector signed int __b) {
8267 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8268}
8269
8270// This prototype is deprecated.
8271static inline __ATTRS_o_ai __vector signed int
8272vec_min(__vector signed int __a, __vector __bool int __b) {
8273 __vector signed int __bc = (__vector signed int)__b;
8274 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8275}
8276
8277// This prototype is deprecated.
8278static inline __ATTRS_o_ai __vector signed int
8279vec_min(__vector __bool int __a, __vector signed int __b) {
8280 __vector signed int __ac = (__vector signed int)__a;
8281 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8282}
8283
8284static inline __ATTRS_o_ai __vector unsigned int
8285vec_min(__vector unsigned int __a, __vector unsigned int __b) {
8286 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8287}
8288
8289// This prototype is deprecated.
8290static inline __ATTRS_o_ai __vector unsigned int
8291vec_min(__vector unsigned int __a, __vector __bool int __b) {
8292 __vector unsigned int __bc = (__vector unsigned int)__b;
8293 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8294}
8295
8296// This prototype is deprecated.
8297static inline __ATTRS_o_ai __vector unsigned int
8298vec_min(__vector __bool int __a, __vector unsigned int __b) {
8299 __vector unsigned int __ac = (__vector unsigned int)__a;
8300 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8301}
8302
8303static inline __ATTRS_o_ai __vector signed long long
8304vec_min(__vector signed long long __a, __vector signed long long __b) {
8305 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8306}
8307
8308// This prototype is deprecated.
8309static inline __ATTRS_o_ai __vector signed long long
8310vec_min(__vector signed long long __a, __vector __bool long long __b) {
8311 __vector signed long long __bc = (__vector signed long long)__b;
8312 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8313}
8314
8315// This prototype is deprecated.
8316static inline __ATTRS_o_ai __vector signed long long
8317vec_min(__vector __bool long long __a, __vector signed long long __b) {
8318 __vector signed long long __ac = (__vector signed long long)__a;
8319 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8320}
8321
8322static inline __ATTRS_o_ai __vector unsigned long long
8323vec_min(__vector unsigned long long __a, __vector unsigned long long __b) {
8324 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8325}
8326
8327// This prototype is deprecated.
8328static inline __ATTRS_o_ai __vector unsigned long long
8329vec_min(__vector unsigned long long __a, __vector __bool long long __b) {
8330 __vector unsigned long long __bc = (__vector unsigned long long)__b;
8331 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8332}
8333
8334// This prototype is deprecated.
8335static inline __ATTRS_o_ai __vector unsigned long long
8336vec_min(__vector __bool long long __a, __vector unsigned long long __b) {
8337 __vector unsigned long long __ac = (__vector unsigned long long)__a;
8338 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8339}
8340
8341#if __ARCH__ >= 12
8342static inline __ATTRS_o_ai __vector float
8343vec_min(__vector float __a, __vector float __b) {
8344 return __builtin_s390_vfminsb(__a, __b, 0);
8345}
8346#endif
8347
8348static inline __ATTRS_o_ai __vector double
8349vec_min(__vector double __a, __vector double __b) {
8350#if __ARCH__ >= 12
8351 return __builtin_s390_vfmindb(__a, __b, 0);
8352#else
8353 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8354#endif
8355}
8356
8357/*-- vec_add_u128 -----------------------------------------------------------*/
8358
8359static inline __ATTRS_ai __vector unsigned char
8360vec_add_u128(__vector unsigned char __a, __vector unsigned char __b) {
8361 return __builtin_s390_vaq(__a, __b);
8362}
8363
8364/*-- vec_addc ---------------------------------------------------------------*/
8365
8366static inline __ATTRS_o_ai __vector unsigned char
8367vec_addc(__vector unsigned char __a, __vector unsigned char __b) {
8368 return __builtin_s390_vaccb(__a, __b);
8369}
8370
8371static inline __ATTRS_o_ai __vector unsigned short
8372vec_addc(__vector unsigned short __a, __vector unsigned short __b) {
8373 return __builtin_s390_vacch(__a, __b);
8374}
8375
8376static inline __ATTRS_o_ai __vector unsigned int
8377vec_addc(__vector unsigned int __a, __vector unsigned int __b) {
8378 return __builtin_s390_vaccf(__a, __b);
8379}
8380
8381static inline __ATTRS_o_ai __vector unsigned long long
8382vec_addc(__vector unsigned long long __a, __vector unsigned long long __b) {
8383 return __builtin_s390_vaccg(__a, __b);
8384}
8385
8386/*-- vec_addc_u128 ----------------------------------------------------------*/
8387
8388static inline __ATTRS_ai __vector unsigned char
8389vec_addc_u128(__vector unsigned char __a, __vector unsigned char __b) {
8390 return __builtin_s390_vaccq(__a, __b);
8391}
8392
8393/*-- vec_adde_u128 ----------------------------------------------------------*/
8394
8395static inline __ATTRS_ai __vector unsigned char
8396vec_adde_u128(__vector unsigned char __a, __vector unsigned char __b,
8397 __vector unsigned char __c) {
8398 return __builtin_s390_vacq(__a, __b, __c);
8399}
8400
8401/*-- vec_addec_u128 ---------------------------------------------------------*/
8402
8403static inline __ATTRS_ai __vector unsigned char
8404vec_addec_u128(__vector unsigned char __a, __vector unsigned char __b,
8405 __vector unsigned char __c) {
8406 return __builtin_s390_vacccq(__a, __b, __c);
8407}
8408
8409/*-- vec_avg ----------------------------------------------------------------*/
8410
8411static inline __ATTRS_o_ai __vector signed char
8412vec_avg(__vector signed char __a, __vector signed char __b) {
8413 return __builtin_s390_vavgb(__a, __b);
8414}
8415
8416static inline __ATTRS_o_ai __vector signed short
8417vec_avg(__vector signed short __a, __vector signed short __b) {
8418 return __builtin_s390_vavgh(__a, __b);
8419}
8420
8421static inline __ATTRS_o_ai __vector signed int
8422vec_avg(__vector signed int __a, __vector signed int __b) {
8423 return __builtin_s390_vavgf(__a, __b);
8424}
8425
8426static inline __ATTRS_o_ai __vector signed long long
8427vec_avg(__vector signed long long __a, __vector signed long long __b) {
8428 return __builtin_s390_vavgg(__a, __b);
8429}
8430
8431static inline __ATTRS_o_ai __vector unsigned char
8432vec_avg(__vector unsigned char __a, __vector unsigned char __b) {
8433 return __builtin_s390_vavglb(__a, __b);
8434}
8435
8436static inline __ATTRS_o_ai __vector unsigned short
8437vec_avg(__vector unsigned short __a, __vector unsigned short __b) {
8438 return __builtin_s390_vavglh(__a, __b);
8439}
8440
8441static inline __ATTRS_o_ai __vector unsigned int
8442vec_avg(__vector unsigned int __a, __vector unsigned int __b) {
8443 return __builtin_s390_vavglf(__a, __b);
8444}
8445
8446static inline __ATTRS_o_ai __vector unsigned long long
8447vec_avg(__vector unsigned long long __a, __vector unsigned long long __b) {
8448 return __builtin_s390_vavglg(__a, __b);
8449}
8450
8451/*-- vec_checksum -----------------------------------------------------------*/
8452
8453static inline __ATTRS_ai __vector unsigned int
8454vec_checksum(__vector unsigned int __a, __vector unsigned int __b) {
8455 return __builtin_s390_vcksm(__a, __b);
8456}
8457
8458/*-- vec_gfmsum -------------------------------------------------------------*/
8459
8460static inline __ATTRS_o_ai __vector unsigned short
8461vec_gfmsum(__vector unsigned char __a, __vector unsigned char __b) {
8462 return __builtin_s390_vgfmb(__a, __b);
8463}
8464
8465static inline __ATTRS_o_ai __vector unsigned int
8466vec_gfmsum(__vector unsigned short __a, __vector unsigned short __b) {
8467 return __builtin_s390_vgfmh(__a, __b);
8468}
8469
8470static inline __ATTRS_o_ai __vector unsigned long long
8471vec_gfmsum(__vector unsigned int __a, __vector unsigned int __b) {
8472 return __builtin_s390_vgfmf(__a, __b);
8473}
8474
8475/*-- vec_gfmsum_128 ---------------------------------------------------------*/
8476
8477static inline __ATTRS_o_ai __vector unsigned char
8478vec_gfmsum_128(__vector unsigned long long __a,
8479 __vector unsigned long long __b) {
8480 return __builtin_s390_vgfmg(__a, __b);
8481}
8482
8483/*-- vec_gfmsum_accum -------------------------------------------------------*/
8484
8485static inline __ATTRS_o_ai __vector unsigned short
8486vec_gfmsum_accum(__vector unsigned char __a, __vector unsigned char __b,
8487 __vector unsigned short __c) {
8488 return __builtin_s390_vgfmab(__a, __b, __c);
8489}
8490
8491static inline __ATTRS_o_ai __vector unsigned int
8492vec_gfmsum_accum(__vector unsigned short __a, __vector unsigned short __b,
8493 __vector unsigned int __c) {
8494 return __builtin_s390_vgfmah(__a, __b, __c);
8495}
8496
8497static inline __ATTRS_o_ai __vector unsigned long long
8498vec_gfmsum_accum(__vector unsigned int __a, __vector unsigned int __b,
8499 __vector unsigned long long __c) {
8500 return __builtin_s390_vgfmaf(__a, __b, __c);
8501}
8502
8503/*-- vec_gfmsum_accum_128 ---------------------------------------------------*/
8504
8505static inline __ATTRS_o_ai __vector unsigned char
8506vec_gfmsum_accum_128(__vector unsigned long long __a,
8507 __vector unsigned long long __b,
8508 __vector unsigned char __c) {
8509 return __builtin_s390_vgfmag(__a, __b, __c);
8510}
8511
8512/*-- vec_mladd --------------------------------------------------------------*/
8513
8514static inline __ATTRS_o_ai __vector signed char
8515vec_mladd(__vector signed char __a, __vector signed char __b,
8516 __vector signed char __c) {
8517 return __a * __b + __c;
8518}
8519
8520static inline __ATTRS_o_ai __vector signed char
8521vec_mladd(__vector unsigned char __a, __vector signed char __b,
8522 __vector signed char __c) {
8523 return (__vector signed char)__a * __b + __c;
8524}
8525
8526static inline __ATTRS_o_ai __vector signed char
8527vec_mladd(__vector signed char __a, __vector unsigned char __b,
8528 __vector unsigned char __c) {
8529 return __a * (__vector signed char)__b + (__vector signed char)__c;
8530}
8531
8532static inline __ATTRS_o_ai __vector unsigned char
8533vec_mladd(__vector unsigned char __a, __vector unsigned char __b,
8534 __vector unsigned char __c) {
8535 return __a * __b + __c;
8536}
8537
8538static inline __ATTRS_o_ai __vector signed short
8539vec_mladd(__vector signed short __a, __vector signed short __b,
8540 __vector signed short __c) {
8541 return __a * __b + __c;
8542}
8543
8544static inline __ATTRS_o_ai __vector signed short
8545vec_mladd(__vector unsigned short __a, __vector signed short __b,
8546 __vector signed short __c) {
8547 return (__vector signed short)__a * __b + __c;
8548}
8549
8550static inline __ATTRS_o_ai __vector signed short
8551vec_mladd(__vector signed short __a, __vector unsigned short __b,
8552 __vector unsigned short __c) {
8553 return __a * (__vector signed short)__b + (__vector signed short)__c;
8554}
8555
8556static inline __ATTRS_o_ai __vector unsigned short
8557vec_mladd(__vector unsigned short __a, __vector unsigned short __b,
8558 __vector unsigned short __c) {
8559 return __a * __b + __c;
8560}
8561
8562static inline __ATTRS_o_ai __vector signed int
8563vec_mladd(__vector signed int __a, __vector signed int __b,
8564 __vector signed int __c) {
8565 return __a * __b + __c;
8566}
8567
8568static inline __ATTRS_o_ai __vector signed int
8569vec_mladd(__vector unsigned int __a, __vector signed int __b,
8570 __vector signed int __c) {
8571 return (__vector signed int)__a * __b + __c;
8572}
8573
8574static inline __ATTRS_o_ai __vector signed int
8575vec_mladd(__vector signed int __a, __vector unsigned int __b,
8576 __vector unsigned int __c) {
8577 return __a * (__vector signed int)__b + (__vector signed int)__c;
8578}
8579
8580static inline __ATTRS_o_ai __vector unsigned int
8581vec_mladd(__vector unsigned int __a, __vector unsigned int __b,
8582 __vector unsigned int __c) {
8583 return __a * __b + __c;
8584}
8585
8586/*-- vec_mhadd --------------------------------------------------------------*/
8587
8588static inline __ATTRS_o_ai __vector signed char
8589vec_mhadd(__vector signed char __a, __vector signed char __b,
8590 __vector signed char __c) {
8591 return __builtin_s390_vmahb(__a, __b, __c);
8592}
8593
8594static inline __ATTRS_o_ai __vector unsigned char
8595vec_mhadd(__vector unsigned char __a, __vector unsigned char __b,
8596 __vector unsigned char __c) {
8597 return __builtin_s390_vmalhb(__a, __b, __c);
8598}
8599
8600static inline __ATTRS_o_ai __vector signed short
8601vec_mhadd(__vector signed short __a, __vector signed short __b,
8602 __vector signed short __c) {
8603 return __builtin_s390_vmahh(__a, __b, __c);
8604}
8605
8606static inline __ATTRS_o_ai __vector unsigned short
8607vec_mhadd(__vector unsigned short __a, __vector unsigned short __b,
8608 __vector unsigned short __c) {
8609 return __builtin_s390_vmalhh(__a, __b, __c);
8610}
8611
8612static inline __ATTRS_o_ai __vector signed int
8613vec_mhadd(__vector signed int __a, __vector signed int __b,
8614 __vector signed int __c) {
8615 return __builtin_s390_vmahf(__a, __b, __c);
8616}
8617
8618static inline __ATTRS_o_ai __vector unsigned int
8619vec_mhadd(__vector unsigned int __a, __vector unsigned int __b,
8620 __vector unsigned int __c) {
8621 return __builtin_s390_vmalhf(__a, __b, __c);
8622}
8623
8624/*-- vec_meadd --------------------------------------------------------------*/
8625
8626static inline __ATTRS_o_ai __vector signed short
8627vec_meadd(__vector signed char __a, __vector signed char __b,
8628 __vector signed short __c) {
8629 return __builtin_s390_vmaeb(__a, __b, __c);
8630}
8631
8632static inline __ATTRS_o_ai __vector unsigned short
8633vec_meadd(__vector unsigned char __a, __vector unsigned char __b,
8634 __vector unsigned short __c) {
8635 return __builtin_s390_vmaleb(__a, __b, __c);
8636}
8637
8638static inline __ATTRS_o_ai __vector signed int
8639vec_meadd(__vector signed short __a, __vector signed short __b,
8640 __vector signed int __c) {
8641 return __builtin_s390_vmaeh(__a, __b, __c);
8642}
8643
8644static inline __ATTRS_o_ai __vector unsigned int
8645vec_meadd(__vector unsigned short __a, __vector unsigned short __b,
8646 __vector unsigned int __c) {
8647 return __builtin_s390_vmaleh(__a, __b, __c);
8648}
8649
8650static inline __ATTRS_o_ai __vector signed long long
8651vec_meadd(__vector signed int __a, __vector signed int __b,
8652 __vector signed long long __c) {
8653 return __builtin_s390_vmaef(__a, __b, __c);
8654}
8655
8656static inline __ATTRS_o_ai __vector unsigned long long
8657vec_meadd(__vector unsigned int __a, __vector unsigned int __b,
8658 __vector unsigned long long __c) {
8659 return __builtin_s390_vmalef(__a, __b, __c);
8660}
8661
8662/*-- vec_moadd --------------------------------------------------------------*/
8663
8664static inline __ATTRS_o_ai __vector signed short
8665vec_moadd(__vector signed char __a, __vector signed char __b,
8666 __vector signed short __c) {
8667 return __builtin_s390_vmaob(__a, __b, __c);
8668}
8669
8670static inline __ATTRS_o_ai __vector unsigned short
8671vec_moadd(__vector unsigned char __a, __vector unsigned char __b,
8672 __vector unsigned short __c) {
8673 return __builtin_s390_vmalob(__a, __b, __c);
8674}
8675
8676static inline __ATTRS_o_ai __vector signed int
8677vec_moadd(__vector signed short __a, __vector signed short __b,
8678 __vector signed int __c) {
8679 return __builtin_s390_vmaoh(__a, __b, __c);
8680}
8681
8682static inline __ATTRS_o_ai __vector unsigned int
8683vec_moadd(__vector unsigned short __a, __vector unsigned short __b,
8684 __vector unsigned int __c) {
8685 return __builtin_s390_vmaloh(__a, __b, __c);
8686}
8687
8688static inline __ATTRS_o_ai __vector signed long long
8689vec_moadd(__vector signed int __a, __vector signed int __b,
8690 __vector signed long long __c) {
8691 return __builtin_s390_vmaof(__a, __b, __c);
8692}
8693
8694static inline __ATTRS_o_ai __vector unsigned long long
8695vec_moadd(__vector unsigned int __a, __vector unsigned int __b,
8696 __vector unsigned long long __c) {
8697 return __builtin_s390_vmalof(__a, __b, __c);
8698}
8699
8700/*-- vec_mulh ---------------------------------------------------------------*/
8701
8702static inline __ATTRS_o_ai __vector signed char
8703vec_mulh(__vector signed char __a, __vector signed char __b) {
8704 return __builtin_s390_vmhb(__a, __b);
8705}
8706
8707static inline __ATTRS_o_ai __vector unsigned char
8708vec_mulh(__vector unsigned char __a, __vector unsigned char __b) {
8709 return __builtin_s390_vmlhb(__a, __b);
8710}
8711
8712static inline __ATTRS_o_ai __vector signed short
8713vec_mulh(__vector signed short __a, __vector signed short __b) {
8714 return __builtin_s390_vmhh(__a, __b);
8715}
8716
8717static inline __ATTRS_o_ai __vector unsigned short
8718vec_mulh(__vector unsigned short __a, __vector unsigned short __b) {
8719 return __builtin_s390_vmlhh(__a, __b);
8720}
8721
8722static inline __ATTRS_o_ai __vector signed int
8723vec_mulh(__vector signed int __a, __vector signed int __b) {
8724 return __builtin_s390_vmhf(__a, __b);
8725}
8726
8727static inline __ATTRS_o_ai __vector unsigned int
8728vec_mulh(__vector unsigned int __a, __vector unsigned int __b) {
8729 return __builtin_s390_vmlhf(__a, __b);
8730}
8731
8732/*-- vec_mule ---------------------------------------------------------------*/
8733
8734static inline __ATTRS_o_ai __vector signed short
8735vec_mule(__vector signed char __a, __vector signed char __b) {
8736 return __builtin_s390_vmeb(__a, __b);
8737}
8738
8739static inline __ATTRS_o_ai __vector unsigned short
8740vec_mule(__vector unsigned char __a, __vector unsigned char __b) {
8741 return __builtin_s390_vmleb(__a, __b);
8742}
8743
8744static inline __ATTRS_o_ai __vector signed int
8745vec_mule(__vector signed short __a, __vector signed short __b) {
8746 return __builtin_s390_vmeh(__a, __b);
8747}
8748
8749static inline __ATTRS_o_ai __vector unsigned int
8750vec_mule(__vector unsigned short __a, __vector unsigned short __b) {
8751 return __builtin_s390_vmleh(__a, __b);
8752}
8753
8754static inline __ATTRS_o_ai __vector signed long long
8755vec_mule(__vector signed int __a, __vector signed int __b) {
8756 return __builtin_s390_vmef(__a, __b);
8757}
8758
8759static inline __ATTRS_o_ai __vector unsigned long long
8760vec_mule(__vector unsigned int __a, __vector unsigned int __b) {
8761 return __builtin_s390_vmlef(__a, __b);
8762}
8763
8764/*-- vec_mulo ---------------------------------------------------------------*/
8765
8766static inline __ATTRS_o_ai __vector signed short
8767vec_mulo(__vector signed char __a, __vector signed char __b) {
8768 return __builtin_s390_vmob(__a, __b);
8769}
8770
8771static inline __ATTRS_o_ai __vector unsigned short
8772vec_mulo(__vector unsigned char __a, __vector unsigned char __b) {
8773 return __builtin_s390_vmlob(__a, __b);
8774}
8775
8776static inline __ATTRS_o_ai __vector signed int
8777vec_mulo(__vector signed short __a, __vector signed short __b) {
8778 return __builtin_s390_vmoh(__a, __b);
8779}
8780
8781static inline __ATTRS_o_ai __vector unsigned int
8782vec_mulo(__vector unsigned short __a, __vector unsigned short __b) {
8783 return __builtin_s390_vmloh(__a, __b);
8784}
8785
8786static inline __ATTRS_o_ai __vector signed long long
8787vec_mulo(__vector signed int __a, __vector signed int __b) {
8788 return __builtin_s390_vmof(__a, __b);
8789}
8790
8791static inline __ATTRS_o_ai __vector unsigned long long
8792vec_mulo(__vector unsigned int __a, __vector unsigned int __b) {
8793 return __builtin_s390_vmlof(__a, __b);
8794}
8795
8796/*-- vec_msum_u128 ----------------------------------------------------------*/
8797
8798#if __ARCH__ >= 12
8799#define vec_msum_u128(X, Y, Z, W) \
8800 ((__vector unsigned char)__builtin_s390_vmslg((X), (Y), (Z), (W)));
8801#endif
8802
8803/*-- vec_sub_u128 -----------------------------------------------------------*/
8804
8805static inline __ATTRS_ai __vector unsigned char
8806vec_sub_u128(__vector unsigned char __a, __vector unsigned char __b) {
8807 return __builtin_s390_vsq(__a, __b);
8808}
8809
8810/*-- vec_subc ---------------------------------------------------------------*/
8811
8812static inline __ATTRS_o_ai __vector unsigned char
8813vec_subc(__vector unsigned char __a, __vector unsigned char __b) {
8814 return __builtin_s390_vscbib(__a, __b);
8815}
8816
8817static inline __ATTRS_o_ai __vector unsigned short
8818vec_subc(__vector unsigned short __a, __vector unsigned short __b) {
8819 return __builtin_s390_vscbih(__a, __b);
8820}
8821
8822static inline __ATTRS_o_ai __vector unsigned int
8823vec_subc(__vector unsigned int __a, __vector unsigned int __b) {
8824 return __builtin_s390_vscbif(__a, __b);
8825}
8826
8827static inline __ATTRS_o_ai __vector unsigned long long
8828vec_subc(__vector unsigned long long __a, __vector unsigned long long __b) {
8829 return __builtin_s390_vscbig(__a, __b);
8830}
8831
8832/*-- vec_subc_u128 ----------------------------------------------------------*/
8833
8834static inline __ATTRS_ai __vector unsigned char
8835vec_subc_u128(__vector unsigned char __a, __vector unsigned char __b) {
8836 return __builtin_s390_vscbiq(__a, __b);
8837}
8838
8839/*-- vec_sube_u128 ----------------------------------------------------------*/
8840
8841static inline __ATTRS_ai __vector unsigned char
8842vec_sube_u128(__vector unsigned char __a, __vector unsigned char __b,
8843 __vector unsigned char __c) {
8844 return __builtin_s390_vsbiq(__a, __b, __c);
8845}
8846
8847/*-- vec_subec_u128 ---------------------------------------------------------*/
8848
8849static inline __ATTRS_ai __vector unsigned char
8850vec_subec_u128(__vector unsigned char __a, __vector unsigned char __b,
8851 __vector unsigned char __c) {
8852 return __builtin_s390_vsbcbiq(__a, __b, __c);
8853}
8854
8855/*-- vec_sum2 ---------------------------------------------------------------*/
8856
8857static inline __ATTRS_o_ai __vector unsigned long long
8858vec_sum2(__vector unsigned short __a, __vector unsigned short __b) {
8859 return __builtin_s390_vsumgh(__a, __b);
8860}
8861
8862static inline __ATTRS_o_ai __vector unsigned long long
8863vec_sum2(__vector unsigned int __a, __vector unsigned int __b) {
8864 return __builtin_s390_vsumgf(__a, __b);
8865}
8866
8867/*-- vec_sum_u128 -----------------------------------------------------------*/
8868
8869static inline __ATTRS_o_ai __vector unsigned char
8870vec_sum_u128(__vector unsigned int __a, __vector unsigned int __b) {
8871 return __builtin_s390_vsumqf(__a, __b);
8872}
8873
8874static inline __ATTRS_o_ai __vector unsigned char
8875vec_sum_u128(__vector unsigned long long __a, __vector unsigned long long __b) {
8876 return __builtin_s390_vsumqg(__a, __b);
8877}
8878
8879/*-- vec_sum4 ---------------------------------------------------------------*/
8880
8881static inline __ATTRS_o_ai __vector unsigned int
8882vec_sum4(__vector unsigned char __a, __vector unsigned char __b) {
8883 return __builtin_s390_vsumb(__a, __b);
8884}
8885
8886static inline __ATTRS_o_ai __vector unsigned int
8887vec_sum4(__vector unsigned short __a, __vector unsigned short __b) {
8888 return __builtin_s390_vsumh(__a, __b);
8889}
8890
8891/*-- vec_test_mask ----------------------------------------------------------*/
8892
8893static inline __ATTRS_o_ai int
8894vec_test_mask(__vector signed char __a, __vector unsigned char __b) {
8895 return __builtin_s390_vtm((__vector unsigned char)__a,
8896 (__vector unsigned char)__b);
8897}
8898
8899static inline __ATTRS_o_ai int
8900vec_test_mask(__vector unsigned char __a, __vector unsigned char __b) {
8901 return __builtin_s390_vtm(__a, __b);
8902}
8903
8904static inline __ATTRS_o_ai int
8905vec_test_mask(__vector signed short __a, __vector unsigned short __b) {
8906 return __builtin_s390_vtm((__vector unsigned char)__a,
8907 (__vector unsigned char)__b);
8908}
8909
8910static inline __ATTRS_o_ai int
8911vec_test_mask(__vector unsigned short __a, __vector unsigned short __b) {
8912 return __builtin_s390_vtm((__vector unsigned char)__a,
8913 (__vector unsigned char)__b);
8914}
8915
8916static inline __ATTRS_o_ai int
8917vec_test_mask(__vector signed int __a, __vector unsigned int __b) {
8918 return __builtin_s390_vtm((__vector unsigned char)__a,
8919 (__vector unsigned char)__b);
8920}
8921
8922static inline __ATTRS_o_ai int
8923vec_test_mask(__vector unsigned int __a, __vector unsigned int __b) {
8924 return __builtin_s390_vtm((__vector unsigned char)__a,
8925 (__vector unsigned char)__b);
8926}
8927
8928static inline __ATTRS_o_ai int
8929vec_test_mask(__vector signed long long __a, __vector unsigned long long __b) {
8930 return __builtin_s390_vtm((__vector unsigned char)__a,
8931 (__vector unsigned char)__b);
8932}
8933
8934static inline __ATTRS_o_ai int
8935vec_test_mask(__vector unsigned long long __a,
8936 __vector unsigned long long __b) {
8937 return __builtin_s390_vtm((__vector unsigned char)__a,
8938 (__vector unsigned char)__b);
8939}
8940
8941#if __ARCH__ >= 12
8942static inline __ATTRS_o_ai int
8943vec_test_mask(__vector float __a, __vector unsigned int __b) {
8944 return __builtin_s390_vtm((__vector unsigned char)__a,
8945 (__vector unsigned char)__b);
8946}
8947#endif
8948
8949static inline __ATTRS_o_ai int
8950vec_test_mask(__vector double __a, __vector unsigned long long __b) {
8951 return __builtin_s390_vtm((__vector unsigned char)__a,
8952 (__vector unsigned char)__b);
8953}
8954
8955/*-- vec_madd ---------------------------------------------------------------*/
8956
8957#if __ARCH__ >= 12
8958static inline __ATTRS_o_ai __vector float
8959vec_madd(__vector float __a, __vector float __b, __vector float __c) {
8960 return __builtin_s390_vfmasb(__a, __b, __c);
8961}
8962#endif
8963
8964static inline __ATTRS_o_ai __vector double
8965vec_madd(__vector double __a, __vector double __b, __vector double __c) {
8966 return __builtin_s390_vfmadb(__a, __b, __c);
8967}
8968
8969/*-- vec_msub ---------------------------------------------------------------*/
8970
8971#if __ARCH__ >= 12
8972static inline __ATTRS_o_ai __vector float
8973vec_msub(__vector float __a, __vector float __b, __vector float __c) {
8974 return __builtin_s390_vfmssb(__a, __b, __c);
8975}
8976#endif
8977
8978static inline __ATTRS_o_ai __vector double
8979vec_msub(__vector double __a, __vector double __b, __vector double __c) {
8980 return __builtin_s390_vfmsdb(__a, __b, __c);
8981}
8982
8983/*-- vec_nmadd ---------------------------------------------------------------*/
8984
8985#if __ARCH__ >= 12
8986static inline __ATTRS_o_ai __vector float
8987vec_nmadd(__vector float __a, __vector float __b, __vector float __c) {
8988 return __builtin_s390_vfnmasb(__a, __b, __c);
8989}
8990
8991static inline __ATTRS_o_ai __vector double
8992vec_nmadd(__vector double __a, __vector double __b, __vector double __c) {
8993 return __builtin_s390_vfnmadb(__a, __b, __c);
8994}
8995#endif
8996
8997/*-- vec_nmsub ---------------------------------------------------------------*/
8998
8999#if __ARCH__ >= 12
9000static inline __ATTRS_o_ai __vector float
9001vec_nmsub(__vector float __a, __vector float __b, __vector float __c) {
9002 return __builtin_s390_vfnmssb(__a, __b, __c);
9003}
9004
9005static inline __ATTRS_o_ai __vector double
9006vec_nmsub(__vector double __a, __vector double __b, __vector double __c) {
9007 return __builtin_s390_vfnmsdb(__a, __b, __c);
9008}
9009#endif
9010
9011/*-- vec_sqrt ---------------------------------------------------------------*/
9012
9013#if __ARCH__ >= 12
9014static inline __ATTRS_o_ai __vector float
9015vec_sqrt(__vector float __a) {
9016 return __builtin_s390_vfsqsb(__a);
9017}
9018#endif
9019
9020static inline __ATTRS_o_ai __vector double
9021vec_sqrt(__vector double __a) {
9022 return __builtin_s390_vfsqdb(__a);
9023}
9024
9025/*-- vec_ld2f ---------------------------------------------------------------*/
9026
9027// This prototype is deprecated.
9028static inline __ATTRS_ai __vector double
9029vec_ld2f(const float *__ptr) {
9030 typedef float __v2f32 __attribute__((__vector_size__(8)));
9031 return __builtin_convertvector(*(const __v2f32 *)__ptr, __vector double);
9032}
9033
9034/*-- vec_st2f ---------------------------------------------------------------*/
9035
9036// This prototype is deprecated.
9037static inline __ATTRS_ai void
9038vec_st2f(__vector double __a, float *__ptr) {
9039 typedef float __v2f32 __attribute__((__vector_size__(8)));
9040 *(__v2f32 *)__ptr = __builtin_convertvector(__a, __v2f32);
9041}
9042
9043/*-- vec_ctd ----------------------------------------------------------------*/
9044
9045// This prototype is deprecated.
9046static inline __ATTRS_o_ai __vector double
9047vec_ctd(__vector signed long long __a, int __b)
9048 __constant_range(__b, 0, 31) {
9049 __vector double __conv = __builtin_convertvector(__a, __vector double);
9050 __conv *= ((__vector double)(__vector unsigned long long)
9051 ((0x3ffULL - __b) << 52));
9052 return __conv;
9053}
9054
9055// This prototype is deprecated.
9056static inline __ATTRS_o_ai __vector double
9057vec_ctd(__vector unsigned long long __a, int __b)
9058 __constant_range(__b, 0, 31) {
9059 __vector double __conv = __builtin_convertvector(__a, __vector double);
9060 __conv *= ((__vector double)(__vector unsigned long long)
9061 ((0x3ffULL - __b) << 52));
9062 return __conv;
9063}
9064
9065/*-- vec_ctsl ---------------------------------------------------------------*/
9066
9067// This prototype is deprecated.
9068static inline __ATTRS_o_ai __vector signed long long
9069vec_ctsl(__vector double __a, int __b)
9070 __constant_range(__b, 0, 31) {
9071 __a *= ((__vector double)(__vector unsigned long long)
9072 ((0x3ffULL + __b) << 52));
9073 return __builtin_convertvector(__a, __vector signed long long);
9074}
9075
9076/*-- vec_ctul ---------------------------------------------------------------*/
9077
9078// This prototype is deprecated.
9079static inline __ATTRS_o_ai __vector unsigned long long
9080vec_ctul(__vector double __a, int __b)
9081 __constant_range(__b, 0, 31) {
9082 __a *= ((__vector double)(__vector unsigned long long)
9083 ((0x3ffULL + __b) << 52));
9084 return __builtin_convertvector(__a, __vector unsigned long long);
9085}
9086
9087/*-- vec_doublee ------------------------------------------------------------*/
9088
9089#if __ARCH__ >= 12
9090static inline __ATTRS_ai __vector double
9091vec_doublee(__vector float __a) {
9092 typedef float __v2f32 __attribute__((__vector_size__(8)));
9093 __v2f32 __pack = __builtin_shufflevector(__a, __a, 0, 2);
9094 return __builtin_convertvector(__pack, __vector double);
9095}
9096#endif
9097
9098/*-- vec_floate -------------------------------------------------------------*/
9099
9100#if __ARCH__ >= 12
9101static inline __ATTRS_ai __vector float
9102vec_floate(__vector double __a) {
9103 typedef float __v2f32 __attribute__((__vector_size__(8)));
9104 __v2f32 __pack = __builtin_convertvector(__a, __v2f32);
9105 return __builtin_shufflevector(__pack, __pack, 0, -1, 1, -1);
9106}
9107#endif
9108
9109/*-- vec_double -------------------------------------------------------------*/
9110
9111static inline __ATTRS_o_ai __vector double
9112vec_double(__vector signed long long __a) {
9113 return __builtin_convertvector(__a, __vector double);
9114}
9115
9116static inline __ATTRS_o_ai __vector double
9117vec_double(__vector unsigned long long __a) {
9118 return __builtin_convertvector(__a, __vector double);
9119}
9120
9121/*-- vec_float --------------------------------------------------------------*/
9122
9123#if __ARCH__ >= 13
9124
9125static inline __ATTRS_o_ai __vector float
9126vec_float(__vector signed int __a) {
9127 return __builtin_convertvector(__a, __vector float);
9128}
9129
9130static inline __ATTRS_o_ai __vector float
9131vec_float(__vector unsigned int __a) {
9132 return __builtin_convertvector(__a, __vector float);
9133}
9134
9135#endif
9136
9137/*-- vec_signed -------------------------------------------------------------*/
9138
9139static inline __ATTRS_o_ai __vector signed long long
9140vec_signed(__vector double __a) {
9141 return __builtin_convertvector(__a, __vector signed long long);
9142}
9143
9144#if __ARCH__ >= 13
9145static inline __ATTRS_o_ai __vector signed int
9146vec_signed(__vector float __a) {
9147 return __builtin_convertvector(__a, __vector signed int);
9148}
9149#endif
9150
9151/*-- vec_unsigned -----------------------------------------------------------*/
9152
9153static inline __ATTRS_o_ai __vector unsigned long long
9154vec_unsigned(__vector double __a) {
9155 return __builtin_convertvector(__a, __vector unsigned long long);
9156}
9157
9158#if __ARCH__ >= 13
9159static inline __ATTRS_o_ai __vector unsigned int
9160vec_unsigned(__vector float __a) {
9161 return __builtin_convertvector(__a, __vector unsigned int);
9162}
9163#endif
9164
9165/*-- vec_roundp -------------------------------------------------------------*/
9166
9167#if __ARCH__ >= 12
9168static inline __ATTRS_o_ai __vector float
9169vec_roundp(__vector float __a) {
9170 return __builtin_s390_vfisb(__a, 4, 6);
9171}
9172#endif
9173
9174static inline __ATTRS_o_ai __vector double
9175vec_roundp(__vector double __a) {
9176 return __builtin_s390_vfidb(__a, 4, 6);
9177}
9178
9179/*-- vec_ceil ---------------------------------------------------------------*/
9180
9181#if __ARCH__ >= 12
9182static inline __ATTRS_o_ai __vector float
9183vec_ceil(__vector float __a) {
9184 // On this platform, vec_ceil never triggers the IEEE-inexact exception.
9185 return __builtin_s390_vfisb(__a, 4, 6);
9186}
9187#endif
9188
9189static inline __ATTRS_o_ai __vector double
9190vec_ceil(__vector double __a) {
9191 // On this platform, vec_ceil never triggers the IEEE-inexact exception.
9192 return __builtin_s390_vfidb(__a, 4, 6);
9193}
9194
9195/*-- vec_roundm -------------------------------------------------------------*/
9196
9197#if __ARCH__ >= 12
9198static inline __ATTRS_o_ai __vector float
9199vec_roundm(__vector float __a) {
9200 return __builtin_s390_vfisb(__a, 4, 7);
9201}
9202#endif
9203
9204static inline __ATTRS_o_ai __vector double
9205vec_roundm(__vector double __a) {
9206 return __builtin_s390_vfidb(__a, 4, 7);
9207}
9208
9209/*-- vec_floor --------------------------------------------------------------*/
9210
9211#if __ARCH__ >= 12
9212static inline __ATTRS_o_ai __vector float
9213vec_floor(__vector float __a) {
9214 // On this platform, vec_floor never triggers the IEEE-inexact exception.
9215 return __builtin_s390_vfisb(__a, 4, 7);
9216}
9217#endif
9218
9219static inline __ATTRS_o_ai __vector double
9220vec_floor(__vector double __a) {
9221 // On this platform, vec_floor never triggers the IEEE-inexact exception.
9222 return __builtin_s390_vfidb(__a, 4, 7);
9223}
9224
9225/*-- vec_roundz -------------------------------------------------------------*/
9226
9227#if __ARCH__ >= 12
9228static inline __ATTRS_o_ai __vector float
9229vec_roundz(__vector float __a) {
9230 return __builtin_s390_vfisb(__a, 4, 5);
9231}
9232#endif
9233
9234static inline __ATTRS_o_ai __vector double
9235vec_roundz(__vector double __a) {
9236 return __builtin_s390_vfidb(__a, 4, 5);
9237}
9238
9239/*-- vec_trunc --------------------------------------------------------------*/
9240
9241#if __ARCH__ >= 12
9242static inline __ATTRS_o_ai __vector float
9243vec_trunc(__vector float __a) {
9244 // On this platform, vec_trunc never triggers the IEEE-inexact exception.
9245 return __builtin_s390_vfisb(__a, 4, 5);
9246}
9247#endif
9248
9249static inline __ATTRS_o_ai __vector double
9250vec_trunc(__vector double __a) {
9251 // On this platform, vec_trunc never triggers the IEEE-inexact exception.
9252 return __builtin_s390_vfidb(__a, 4, 5);
9253}
9254
9255/*-- vec_roundc -------------------------------------------------------------*/
9256
9257#if __ARCH__ >= 12
9258static inline __ATTRS_o_ai __vector float
9259vec_roundc(__vector float __a) {
9260 return __builtin_s390_vfisb(__a, 4, 0);
9261}
9262#endif
9263
9264static inline __ATTRS_o_ai __vector double
9265vec_roundc(__vector double __a) {
9266 return __builtin_s390_vfidb(__a, 4, 0);
9267}
9268
9269/*-- vec_rint ---------------------------------------------------------------*/
9270
9271#if __ARCH__ >= 12
9272static inline __ATTRS_o_ai __vector float
9273vec_rint(__vector float __a) {
9274 // vec_rint may trigger the IEEE-inexact exception.
9275 return __builtin_s390_vfisb(__a, 0, 0);
9276}
9277#endif
9278
9279static inline __ATTRS_o_ai __vector double
9280vec_rint(__vector double __a) {
9281 // vec_rint may trigger the IEEE-inexact exception.
9282 return __builtin_s390_vfidb(__a, 0, 0);
9283}
9284
9285/*-- vec_round --------------------------------------------------------------*/
9286
9287#if __ARCH__ >= 12
9288static inline __ATTRS_o_ai __vector float
9289vec_round(__vector float __a) {
9290 return __builtin_s390_vfisb(__a, 4, 4);
9291}
9292#endif
9293
9294static inline __ATTRS_o_ai __vector double
9295vec_round(__vector double __a) {
9296 return __builtin_s390_vfidb(__a, 4, 4);
9297}
9298
9299/*-- vec_fp_test_data_class -------------------------------------------------*/
9300
9301#if __ARCH__ >= 12
9302extern __ATTRS_o __vector __bool int
9303vec_fp_test_data_class(__vector float __a, int __b, int *__c)
9304 __constant_range(__b, 0, 4095);
9305
9306extern __ATTRS_o __vector __bool long long
9307vec_fp_test_data_class(__vector double __a, int __b, int *__c)
9308 __constant_range(__b, 0, 4095);
9309
9310#define vec_fp_test_data_class(X, Y, Z) \
9311 ((__typeof__((vec_fp_test_data_class)((X), (Y), (Z)))) \
9312 __extension__ ({ \
9313 __vector unsigned char __res; \
9314 __vector unsigned char __x = (__vector unsigned char)(X); \
9315 int *__z = (Z); \
9316 switch (sizeof ((X)[0])) { \
9317 case 4: __res = (__vector unsigned char) \
9318 __builtin_s390_vftcisb((__vector float)__x, (Y), __z); \
9319 break; \
9320 default: __res = (__vector unsigned char) \
9321 __builtin_s390_vftcidb((__vector double)__x, (Y), __z); \
9322 break; \
9323 } __res; }))
9324#else
9325#define vec_fp_test_data_class(X, Y, Z) \
9326 ((__vector __bool long long)__builtin_s390_vftcidb((X), (Y), (Z)))
9327#endif
9328
9329#define __VEC_CLASS_FP_ZERO_P (1 << 11)
9330#define __VEC_CLASS_FP_ZERO_N (1 << 10)
9331#define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | __VEC_CLASS_FP_ZERO_N)
9332#define __VEC_CLASS_FP_NORMAL_P (1 << 9)
9333#define __VEC_CLASS_FP_NORMAL_N (1 << 8)
9334#define __VEC_CLASS_FP_NORMAL (__VEC_CLASS_FP_NORMAL_P | \
9335 __VEC_CLASS_FP_NORMAL_N)
9336#define __VEC_CLASS_FP_SUBNORMAL_P (1 << 7)
9337#define __VEC_CLASS_FP_SUBNORMAL_N (1 << 6)
9338#define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \
9339 __VEC_CLASS_FP_SUBNORMAL_N)
9340#define __VEC_CLASS_FP_INFINITY_P (1 << 5)
9341#define __VEC_CLASS_FP_INFINITY_N (1 << 4)
9342#define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \
9343 __VEC_CLASS_FP_INFINITY_N)
9344#define __VEC_CLASS_FP_QNAN_P (1 << 3)
9345#define __VEC_CLASS_FP_QNAN_N (1 << 2)
9346#define __VEC_CLASS_FP_QNAN (__VEC_CLASS_FP_QNAN_P | __VEC_CLASS_FP_QNAN_N)
9347#define __VEC_CLASS_FP_SNAN_P (1 << 1)
9348#define __VEC_CLASS_FP_SNAN_N (1 << 0)
9349#define __VEC_CLASS_FP_SNAN (__VEC_CLASS_FP_SNAN_P | __VEC_CLASS_FP_SNAN_N)
9350#define __VEC_CLASS_FP_NAN (__VEC_CLASS_FP_QNAN | __VEC_CLASS_FP_SNAN)
9351#define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \
9352 __VEC_CLASS_FP_SUBNORMAL | \
9353 __VEC_CLASS_FP_ZERO | \
9354 __VEC_CLASS_FP_INFINITY)
9355
Pirama Arumuga Nainar494f6452021-12-02 10:42:14 -08009356/*-- vec_extend_to_fp32_hi --------------------------------------------------*/
9357
9358#if __ARCH__ >= 14
9359#define vec_extend_to_fp32_hi(X, W) \
9360 ((__vector float)__builtin_s390_vclfnhs((X), (W)));
9361#endif
9362
9363/*-- vec_extend_to_fp32_hi --------------------------------------------------*/
9364
9365#if __ARCH__ >= 14
9366#define vec_extend_to_fp32_lo(X, W) \
9367 ((__vector float)__builtin_s390_vclfnls((X), (W)));
9368#endif
9369
9370/*-- vec_round_from_fp32 ----------------------------------------------------*/
9371
9372#if __ARCH__ >= 14
9373#define vec_round_from_fp32(X, Y, W) \
9374 ((__vector unsigned short)__builtin_s390_vcrnfs((X), (Y), (W)));
9375#endif
9376
9377/*-- vec_convert_to_fp16 ----------------------------------------------------*/
9378
9379#if __ARCH__ >= 14
9380#define vec_convert_to_fp16(X, W) \
9381 ((__vector unsigned short)__builtin_s390_vcfn((X), (W)));
9382#endif
9383
9384/*-- vec_convert_from_fp16 --------------------------------------------------*/
9385
9386#if __ARCH__ >= 14
9387#define vec_convert_from_fp16(X, W) \
9388 ((__vector unsigned short)__builtin_s390_vcnf((X), (W)));
9389#endif
9390
Sasha Smundak0fc590b2020-10-07 08:11:59 -07009391/*-- vec_cp_until_zero ------------------------------------------------------*/
9392
9393static inline __ATTRS_o_ai __vector signed char
9394vec_cp_until_zero(__vector signed char __a) {
9395 return ((__vector signed char)
9396 __builtin_s390_vistrb((__vector unsigned char)__a));
9397}
9398
9399static inline __ATTRS_o_ai __vector __bool char
9400vec_cp_until_zero(__vector __bool char __a) {
9401 return ((__vector __bool char)
9402 __builtin_s390_vistrb((__vector unsigned char)__a));
9403}
9404
9405static inline __ATTRS_o_ai __vector unsigned char
9406vec_cp_until_zero(__vector unsigned char __a) {
9407 return __builtin_s390_vistrb(__a);
9408}
9409
9410static inline __ATTRS_o_ai __vector signed short
9411vec_cp_until_zero(__vector signed short __a) {
9412 return ((__vector signed short)
9413 __builtin_s390_vistrh((__vector unsigned short)__a));
9414}
9415
9416static inline __ATTRS_o_ai __vector __bool short
9417vec_cp_until_zero(__vector __bool short __a) {
9418 return ((__vector __bool short)
9419 __builtin_s390_vistrh((__vector unsigned short)__a));
9420}
9421
9422static inline __ATTRS_o_ai __vector unsigned short
9423vec_cp_until_zero(__vector unsigned short __a) {
9424 return __builtin_s390_vistrh(__a);
9425}
9426
9427static inline __ATTRS_o_ai __vector signed int
9428vec_cp_until_zero(__vector signed int __a) {
9429 return ((__vector signed int)
9430 __builtin_s390_vistrf((__vector unsigned int)__a));
9431}
9432
9433static inline __ATTRS_o_ai __vector __bool int
9434vec_cp_until_zero(__vector __bool int __a) {
9435 return ((__vector __bool int)
9436 __builtin_s390_vistrf((__vector unsigned int)__a));
9437}
9438
9439static inline __ATTRS_o_ai __vector unsigned int
9440vec_cp_until_zero(__vector unsigned int __a) {
9441 return __builtin_s390_vistrf(__a);
9442}
9443
9444/*-- vec_cp_until_zero_cc ---------------------------------------------------*/
9445
9446static inline __ATTRS_o_ai __vector signed char
9447vec_cp_until_zero_cc(__vector signed char __a, int *__cc) {
9448 return (__vector signed char)
9449 __builtin_s390_vistrbs((__vector unsigned char)__a, __cc);
9450}
9451
9452static inline __ATTRS_o_ai __vector __bool char
9453vec_cp_until_zero_cc(__vector __bool char __a, int *__cc) {
9454 return (__vector __bool char)
9455 __builtin_s390_vistrbs((__vector unsigned char)__a, __cc);
9456}
9457
9458static inline __ATTRS_o_ai __vector unsigned char
9459vec_cp_until_zero_cc(__vector unsigned char __a, int *__cc) {
9460 return __builtin_s390_vistrbs(__a, __cc);
9461}
9462
9463static inline __ATTRS_o_ai __vector signed short
9464vec_cp_until_zero_cc(__vector signed short __a, int *__cc) {
9465 return (__vector signed short)
9466 __builtin_s390_vistrhs((__vector unsigned short)__a, __cc);
9467}
9468
9469static inline __ATTRS_o_ai __vector __bool short
9470vec_cp_until_zero_cc(__vector __bool short __a, int *__cc) {
9471 return (__vector __bool short)
9472 __builtin_s390_vistrhs((__vector unsigned short)__a, __cc);
9473}
9474
9475static inline __ATTRS_o_ai __vector unsigned short
9476vec_cp_until_zero_cc(__vector unsigned short __a, int *__cc) {
9477 return __builtin_s390_vistrhs(__a, __cc);
9478}
9479
9480static inline __ATTRS_o_ai __vector signed int
9481vec_cp_until_zero_cc(__vector signed int __a, int *__cc) {
9482 return (__vector signed int)
9483 __builtin_s390_vistrfs((__vector unsigned int)__a, __cc);
9484}
9485
9486static inline __ATTRS_o_ai __vector __bool int
9487vec_cp_until_zero_cc(__vector __bool int __a, int *__cc) {
9488 return (__vector __bool int)
9489 __builtin_s390_vistrfs((__vector unsigned int)__a, __cc);
9490}
9491
9492static inline __ATTRS_o_ai __vector unsigned int
9493vec_cp_until_zero_cc(__vector unsigned int __a, int *__cc) {
9494 return __builtin_s390_vistrfs(__a, __cc);
9495}
9496
9497/*-- vec_cmpeq_idx ----------------------------------------------------------*/
9498
9499static inline __ATTRS_o_ai __vector signed char
9500vec_cmpeq_idx(__vector signed char __a, __vector signed char __b) {
9501 return (__vector signed char)
9502 __builtin_s390_vfeeb((__vector unsigned char)__a,
9503 (__vector unsigned char)__b);
9504}
9505
9506static inline __ATTRS_o_ai __vector unsigned char
9507vec_cmpeq_idx(__vector __bool char __a, __vector __bool char __b) {
9508 return __builtin_s390_vfeeb((__vector unsigned char)__a,
9509 (__vector unsigned char)__b);
9510}
9511
9512static inline __ATTRS_o_ai __vector unsigned char
9513vec_cmpeq_idx(__vector unsigned char __a, __vector unsigned char __b) {
9514 return __builtin_s390_vfeeb(__a, __b);
9515}
9516
9517static inline __ATTRS_o_ai __vector signed short
9518vec_cmpeq_idx(__vector signed short __a, __vector signed short __b) {
9519 return (__vector signed short)
9520 __builtin_s390_vfeeh((__vector unsigned short)__a,
9521 (__vector unsigned short)__b);
9522}
9523
9524static inline __ATTRS_o_ai __vector unsigned short
9525vec_cmpeq_idx(__vector __bool short __a, __vector __bool short __b) {
9526 return __builtin_s390_vfeeh((__vector unsigned short)__a,
9527 (__vector unsigned short)__b);
9528}
9529
9530static inline __ATTRS_o_ai __vector unsigned short
9531vec_cmpeq_idx(__vector unsigned short __a, __vector unsigned short __b) {
9532 return __builtin_s390_vfeeh(__a, __b);
9533}
9534
9535static inline __ATTRS_o_ai __vector signed int
9536vec_cmpeq_idx(__vector signed int __a, __vector signed int __b) {
9537 return (__vector signed int)
9538 __builtin_s390_vfeef((__vector unsigned int)__a,
9539 (__vector unsigned int)__b);
9540}
9541
9542static inline __ATTRS_o_ai __vector unsigned int
9543vec_cmpeq_idx(__vector __bool int __a, __vector __bool int __b) {
9544 return __builtin_s390_vfeef((__vector unsigned int)__a,
9545 (__vector unsigned int)__b);
9546}
9547
9548static inline __ATTRS_o_ai __vector unsigned int
9549vec_cmpeq_idx(__vector unsigned int __a, __vector unsigned int __b) {
9550 return __builtin_s390_vfeef(__a, __b);
9551}
9552
9553/*-- vec_cmpeq_idx_cc -------------------------------------------------------*/
9554
9555static inline __ATTRS_o_ai __vector signed char
9556vec_cmpeq_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) {
9557 return (__vector signed char)
9558 __builtin_s390_vfeebs((__vector unsigned char)__a,
9559 (__vector unsigned char)__b, __cc);
9560}
9561
9562static inline __ATTRS_o_ai __vector unsigned char
9563vec_cmpeq_idx_cc(__vector __bool char __a, __vector __bool char __b, int *__cc) {
9564 return __builtin_s390_vfeebs((__vector unsigned char)__a,
9565 (__vector unsigned char)__b, __cc);
9566}
9567
9568static inline __ATTRS_o_ai __vector unsigned char
9569vec_cmpeq_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9570 int *__cc) {
9571 return __builtin_s390_vfeebs(__a, __b, __cc);
9572}
9573
9574static inline __ATTRS_o_ai __vector signed short
9575vec_cmpeq_idx_cc(__vector signed short __a, __vector signed short __b,
9576 int *__cc) {
9577 return (__vector signed short)
9578 __builtin_s390_vfeehs((__vector unsigned short)__a,
9579 (__vector unsigned short)__b, __cc);
9580}
9581
9582static inline __ATTRS_o_ai __vector unsigned short
9583vec_cmpeq_idx_cc(__vector __bool short __a, __vector __bool short __b, int *__cc) {
9584 return __builtin_s390_vfeehs((__vector unsigned short)__a,
9585 (__vector unsigned short)__b, __cc);
9586}
9587
9588static inline __ATTRS_o_ai __vector unsigned short
9589vec_cmpeq_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9590 int *__cc) {
9591 return __builtin_s390_vfeehs(__a, __b, __cc);
9592}
9593
9594static inline __ATTRS_o_ai __vector signed int
9595vec_cmpeq_idx_cc(__vector signed int __a, __vector signed int __b, int *__cc) {
9596 return (__vector signed int)
9597 __builtin_s390_vfeefs((__vector unsigned int)__a,
9598 (__vector unsigned int)__b, __cc);
9599}
9600
9601static inline __ATTRS_o_ai __vector unsigned int
9602vec_cmpeq_idx_cc(__vector __bool int __a, __vector __bool int __b, int *__cc) {
9603 return __builtin_s390_vfeefs((__vector unsigned int)__a,
9604 (__vector unsigned int)__b, __cc);
9605}
9606
9607static inline __ATTRS_o_ai __vector unsigned int
9608vec_cmpeq_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9609 int *__cc) {
9610 return __builtin_s390_vfeefs(__a, __b, __cc);
9611}
9612
9613/*-- vec_cmpeq_or_0_idx -----------------------------------------------------*/
9614
9615static inline __ATTRS_o_ai __vector signed char
9616vec_cmpeq_or_0_idx(__vector signed char __a, __vector signed char __b) {
9617 return (__vector signed char)
9618 __builtin_s390_vfeezb((__vector unsigned char)__a,
9619 (__vector unsigned char)__b);
9620}
9621
9622static inline __ATTRS_o_ai __vector unsigned char
9623vec_cmpeq_or_0_idx(__vector __bool char __a, __vector __bool char __b) {
9624 return __builtin_s390_vfeezb((__vector unsigned char)__a,
9625 (__vector unsigned char)__b);
9626}
9627
9628static inline __ATTRS_o_ai __vector unsigned char
9629vec_cmpeq_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) {
9630 return __builtin_s390_vfeezb(__a, __b);
9631}
9632
9633static inline __ATTRS_o_ai __vector signed short
9634vec_cmpeq_or_0_idx(__vector signed short __a, __vector signed short __b) {
9635 return (__vector signed short)
9636 __builtin_s390_vfeezh((__vector unsigned short)__a,
9637 (__vector unsigned short)__b);
9638}
9639
9640static inline __ATTRS_o_ai __vector unsigned short
9641vec_cmpeq_or_0_idx(__vector __bool short __a, __vector __bool short __b) {
9642 return __builtin_s390_vfeezh((__vector unsigned short)__a,
9643 (__vector unsigned short)__b);
9644}
9645
9646static inline __ATTRS_o_ai __vector unsigned short
9647vec_cmpeq_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) {
9648 return __builtin_s390_vfeezh(__a, __b);
9649}
9650
9651static inline __ATTRS_o_ai __vector signed int
9652vec_cmpeq_or_0_idx(__vector signed int __a, __vector signed int __b) {
9653 return (__vector signed int)
9654 __builtin_s390_vfeezf((__vector unsigned int)__a,
9655 (__vector unsigned int)__b);
9656}
9657
9658static inline __ATTRS_o_ai __vector unsigned int
9659vec_cmpeq_or_0_idx(__vector __bool int __a, __vector __bool int __b) {
9660 return __builtin_s390_vfeezf((__vector unsigned int)__a,
9661 (__vector unsigned int)__b);
9662}
9663
9664static inline __ATTRS_o_ai __vector unsigned int
9665vec_cmpeq_or_0_idx(__vector unsigned int __a, __vector unsigned int __b) {
9666 return __builtin_s390_vfeezf(__a, __b);
9667}
9668
9669/*-- vec_cmpeq_or_0_idx_cc --------------------------------------------------*/
9670
9671static inline __ATTRS_o_ai __vector signed char
9672vec_cmpeq_or_0_idx_cc(__vector signed char __a, __vector signed char __b,
9673 int *__cc) {
9674 return (__vector signed char)
9675 __builtin_s390_vfeezbs((__vector unsigned char)__a,
9676 (__vector unsigned char)__b, __cc);
9677}
9678
9679static inline __ATTRS_o_ai __vector unsigned char
9680vec_cmpeq_or_0_idx_cc(__vector __bool char __a, __vector __bool char __b,
9681 int *__cc) {
9682 return __builtin_s390_vfeezbs((__vector unsigned char)__a,
9683 (__vector unsigned char)__b, __cc);
9684}
9685
9686static inline __ATTRS_o_ai __vector unsigned char
9687vec_cmpeq_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9688 int *__cc) {
9689 return __builtin_s390_vfeezbs(__a, __b, __cc);
9690}
9691
9692static inline __ATTRS_o_ai __vector signed short
9693vec_cmpeq_or_0_idx_cc(__vector signed short __a, __vector signed short __b,
9694 int *__cc) {
9695 return (__vector signed short)
9696 __builtin_s390_vfeezhs((__vector unsigned short)__a,
9697 (__vector unsigned short)__b, __cc);
9698}
9699
9700static inline __ATTRS_o_ai __vector unsigned short
9701vec_cmpeq_or_0_idx_cc(__vector __bool short __a, __vector __bool short __b,
9702 int *__cc) {
9703 return __builtin_s390_vfeezhs((__vector unsigned short)__a,
9704 (__vector unsigned short)__b, __cc);
9705}
9706
9707static inline __ATTRS_o_ai __vector unsigned short
9708vec_cmpeq_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9709 int *__cc) {
9710 return __builtin_s390_vfeezhs(__a, __b, __cc);
9711}
9712
9713static inline __ATTRS_o_ai __vector signed int
9714vec_cmpeq_or_0_idx_cc(__vector signed int __a, __vector signed int __b,
9715 int *__cc) {
9716 return (__vector signed int)
9717 __builtin_s390_vfeezfs((__vector unsigned int)__a,
9718 (__vector unsigned int)__b, __cc);
9719}
9720
9721static inline __ATTRS_o_ai __vector unsigned int
9722vec_cmpeq_or_0_idx_cc(__vector __bool int __a, __vector __bool int __b,
9723 int *__cc) {
9724 return __builtin_s390_vfeezfs((__vector unsigned int)__a,
9725 (__vector unsigned int)__b, __cc);
9726}
9727
9728static inline __ATTRS_o_ai __vector unsigned int
9729vec_cmpeq_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9730 int *__cc) {
9731 return __builtin_s390_vfeezfs(__a, __b, __cc);
9732}
9733
9734/*-- vec_cmpne_idx ----------------------------------------------------------*/
9735
9736static inline __ATTRS_o_ai __vector signed char
9737vec_cmpne_idx(__vector signed char __a, __vector signed char __b) {
9738 return (__vector signed char)
9739 __builtin_s390_vfeneb((__vector unsigned char)__a,
9740 (__vector unsigned char)__b);
9741}
9742
9743static inline __ATTRS_o_ai __vector unsigned char
9744vec_cmpne_idx(__vector __bool char __a, __vector __bool char __b) {
9745 return __builtin_s390_vfeneb((__vector unsigned char)__a,
9746 (__vector unsigned char)__b);
9747}
9748
9749static inline __ATTRS_o_ai __vector unsigned char
9750vec_cmpne_idx(__vector unsigned char __a, __vector unsigned char __b) {
9751 return __builtin_s390_vfeneb(__a, __b);
9752}
9753
9754static inline __ATTRS_o_ai __vector signed short
9755vec_cmpne_idx(__vector signed short __a, __vector signed short __b) {
9756 return (__vector signed short)
9757 __builtin_s390_vfeneh((__vector unsigned short)__a,
9758 (__vector unsigned short)__b);
9759}
9760
9761static inline __ATTRS_o_ai __vector unsigned short
9762vec_cmpne_idx(__vector __bool short __a, __vector __bool short __b) {
9763 return __builtin_s390_vfeneh((__vector unsigned short)__a,
9764 (__vector unsigned short)__b);
9765}
9766
9767static inline __ATTRS_o_ai __vector unsigned short
9768vec_cmpne_idx(__vector unsigned short __a, __vector unsigned short __b) {
9769 return __builtin_s390_vfeneh(__a, __b);
9770}
9771
9772static inline __ATTRS_o_ai __vector signed int
9773vec_cmpne_idx(__vector signed int __a, __vector signed int __b) {
9774 return (__vector signed int)
9775 __builtin_s390_vfenef((__vector unsigned int)__a,
9776 (__vector unsigned int)__b);
9777}
9778
9779static inline __ATTRS_o_ai __vector unsigned int
9780vec_cmpne_idx(__vector __bool int __a, __vector __bool int __b) {
9781 return __builtin_s390_vfenef((__vector unsigned int)__a,
9782 (__vector unsigned int)__b);
9783}
9784
9785static inline __ATTRS_o_ai __vector unsigned int
9786vec_cmpne_idx(__vector unsigned int __a, __vector unsigned int __b) {
9787 return __builtin_s390_vfenef(__a, __b);
9788}
9789
9790/*-- vec_cmpne_idx_cc -------------------------------------------------------*/
9791
9792static inline __ATTRS_o_ai __vector signed char
9793vec_cmpne_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) {
9794 return (__vector signed char)
9795 __builtin_s390_vfenebs((__vector unsigned char)__a,
9796 (__vector unsigned char)__b, __cc);
9797}
9798
9799static inline __ATTRS_o_ai __vector unsigned char
9800vec_cmpne_idx_cc(__vector __bool char __a, __vector __bool char __b, int *__cc) {
9801 return __builtin_s390_vfenebs((__vector unsigned char)__a,
9802 (__vector unsigned char)__b, __cc);
9803}
9804
9805static inline __ATTRS_o_ai __vector unsigned char
9806vec_cmpne_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9807 int *__cc) {
9808 return __builtin_s390_vfenebs(__a, __b, __cc);
9809}
9810
9811static inline __ATTRS_o_ai __vector signed short
9812vec_cmpne_idx_cc(__vector signed short __a, __vector signed short __b,
9813 int *__cc) {
9814 return (__vector signed short)
9815 __builtin_s390_vfenehs((__vector unsigned short)__a,
9816 (__vector unsigned short)__b, __cc);
9817}
9818
9819static inline __ATTRS_o_ai __vector unsigned short
9820vec_cmpne_idx_cc(__vector __bool short __a, __vector __bool short __b,
9821 int *__cc) {
9822 return __builtin_s390_vfenehs((__vector unsigned short)__a,
9823 (__vector unsigned short)__b, __cc);
9824}
9825
9826static inline __ATTRS_o_ai __vector unsigned short
9827vec_cmpne_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9828 int *__cc) {
9829 return __builtin_s390_vfenehs(__a, __b, __cc);
9830}
9831
9832static inline __ATTRS_o_ai __vector signed int
9833vec_cmpne_idx_cc(__vector signed int __a, __vector signed int __b, int *__cc) {
9834 return (__vector signed int)
9835 __builtin_s390_vfenefs((__vector unsigned int)__a,
9836 (__vector unsigned int)__b, __cc);
9837}
9838
9839static inline __ATTRS_o_ai __vector unsigned int
9840vec_cmpne_idx_cc(__vector __bool int __a, __vector __bool int __b, int *__cc) {
9841 return __builtin_s390_vfenefs((__vector unsigned int)__a,
9842 (__vector unsigned int)__b, __cc);
9843}
9844
9845static inline __ATTRS_o_ai __vector unsigned int
9846vec_cmpne_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9847 int *__cc) {
9848 return __builtin_s390_vfenefs(__a, __b, __cc);
9849}
9850
9851/*-- vec_cmpne_or_0_idx -----------------------------------------------------*/
9852
9853static inline __ATTRS_o_ai __vector signed char
9854vec_cmpne_or_0_idx(__vector signed char __a, __vector signed char __b) {
9855 return (__vector signed char)
9856 __builtin_s390_vfenezb((__vector unsigned char)__a,
9857 (__vector unsigned char)__b);
9858}
9859
9860static inline __ATTRS_o_ai __vector unsigned char
9861vec_cmpne_or_0_idx(__vector __bool char __a, __vector __bool char __b) {
9862 return __builtin_s390_vfenezb((__vector unsigned char)__a,
9863 (__vector unsigned char)__b);
9864}
9865
9866static inline __ATTRS_o_ai __vector unsigned char
9867vec_cmpne_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) {
9868 return __builtin_s390_vfenezb(__a, __b);
9869}
9870
9871static inline __ATTRS_o_ai __vector signed short
9872vec_cmpne_or_0_idx(__vector signed short __a, __vector signed short __b) {
9873 return (__vector signed short)
9874 __builtin_s390_vfenezh((__vector unsigned short)__a,
9875 (__vector unsigned short)__b);
9876}
9877
9878static inline __ATTRS_o_ai __vector unsigned short
9879vec_cmpne_or_0_idx(__vector __bool short __a, __vector __bool short __b) {
9880 return __builtin_s390_vfenezh((__vector unsigned short)__a,
9881 (__vector unsigned short)__b);
9882}
9883
9884static inline __ATTRS_o_ai __vector unsigned short
9885vec_cmpne_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) {
9886 return __builtin_s390_vfenezh(__a, __b);
9887}
9888
9889static inline __ATTRS_o_ai __vector signed int
9890vec_cmpne_or_0_idx(__vector signed int __a, __vector signed int __b) {
9891 return (__vector signed int)
9892 __builtin_s390_vfenezf((__vector unsigned int)__a,
9893 (__vector unsigned int)__b);
9894}
9895
9896static inline __ATTRS_o_ai __vector unsigned int
9897vec_cmpne_or_0_idx(__vector __bool int __a, __vector __bool int __b) {
9898 return __builtin_s390_vfenezf((__vector unsigned int)__a,
9899 (__vector unsigned int)__b);
9900}
9901
9902static inline __ATTRS_o_ai __vector unsigned int
9903vec_cmpne_or_0_idx(__vector unsigned int __a, __vector unsigned int __b) {
9904 return __builtin_s390_vfenezf(__a, __b);
9905}
9906
9907/*-- vec_cmpne_or_0_idx_cc --------------------------------------------------*/
9908
9909static inline __ATTRS_o_ai __vector signed char
9910vec_cmpne_or_0_idx_cc(__vector signed char __a, __vector signed char __b,
9911 int *__cc) {
9912 return (__vector signed char)
9913 __builtin_s390_vfenezbs((__vector unsigned char)__a,
9914 (__vector unsigned char)__b, __cc);
9915}
9916
9917static inline __ATTRS_o_ai __vector unsigned char
9918vec_cmpne_or_0_idx_cc(__vector __bool char __a, __vector __bool char __b,
9919 int *__cc) {
9920 return __builtin_s390_vfenezbs((__vector unsigned char)__a,
9921 (__vector unsigned char)__b, __cc);
9922}
9923
9924static inline __ATTRS_o_ai __vector unsigned char
9925vec_cmpne_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9926 int *__cc) {
9927 return __builtin_s390_vfenezbs(__a, __b, __cc);
9928}
9929
9930static inline __ATTRS_o_ai __vector signed short
9931vec_cmpne_or_0_idx_cc(__vector signed short __a, __vector signed short __b,
9932 int *__cc) {
9933 return (__vector signed short)
9934 __builtin_s390_vfenezhs((__vector unsigned short)__a,
9935 (__vector unsigned short)__b, __cc);
9936}
9937
9938static inline __ATTRS_o_ai __vector unsigned short
9939vec_cmpne_or_0_idx_cc(__vector __bool short __a, __vector __bool short __b,
9940 int *__cc) {
9941 return __builtin_s390_vfenezhs((__vector unsigned short)__a,
9942 (__vector unsigned short)__b, __cc);
9943}
9944
9945static inline __ATTRS_o_ai __vector unsigned short
9946vec_cmpne_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9947 int *__cc) {
9948 return __builtin_s390_vfenezhs(__a, __b, __cc);
9949}
9950
9951static inline __ATTRS_o_ai __vector signed int
9952vec_cmpne_or_0_idx_cc(__vector signed int __a, __vector signed int __b,
9953 int *__cc) {
9954 return (__vector signed int)
9955 __builtin_s390_vfenezfs((__vector unsigned int)__a,
9956 (__vector unsigned int)__b, __cc);
9957}
9958
9959static inline __ATTRS_o_ai __vector unsigned int
9960vec_cmpne_or_0_idx_cc(__vector __bool int __a, __vector __bool int __b,
9961 int *__cc) {
9962 return __builtin_s390_vfenezfs((__vector unsigned int)__a,
9963 (__vector unsigned int)__b, __cc);
9964}
9965
9966static inline __ATTRS_o_ai __vector unsigned int
9967vec_cmpne_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9968 int *__cc) {
9969 return __builtin_s390_vfenezfs(__a, __b, __cc);
9970}
9971
9972/*-- vec_cmprg --------------------------------------------------------------*/
9973
9974static inline __ATTRS_o_ai __vector __bool char
9975vec_cmprg(__vector unsigned char __a, __vector unsigned char __b,
9976 __vector unsigned char __c) {
9977 return (__vector __bool char)__builtin_s390_vstrcb(__a, __b, __c, 4);
9978}
9979
9980static inline __ATTRS_o_ai __vector __bool short
9981vec_cmprg(__vector unsigned short __a, __vector unsigned short __b,
9982 __vector unsigned short __c) {
9983 return (__vector __bool short)__builtin_s390_vstrch(__a, __b, __c, 4);
9984}
9985
9986static inline __ATTRS_o_ai __vector __bool int
9987vec_cmprg(__vector unsigned int __a, __vector unsigned int __b,
9988 __vector unsigned int __c) {
9989 return (__vector __bool int)__builtin_s390_vstrcf(__a, __b, __c, 4);
9990}
9991
9992/*-- vec_cmprg_cc -----------------------------------------------------------*/
9993
9994static inline __ATTRS_o_ai __vector __bool char
9995vec_cmprg_cc(__vector unsigned char __a, __vector unsigned char __b,
9996 __vector unsigned char __c, int *__cc) {
9997 return (__vector __bool char)__builtin_s390_vstrcbs(__a, __b, __c, 4, __cc);
9998}
9999
10000static inline __ATTRS_o_ai __vector __bool short
10001vec_cmprg_cc(__vector unsigned short __a, __vector unsigned short __b,
10002 __vector unsigned short __c, int *__cc) {
10003 return (__vector __bool short)__builtin_s390_vstrchs(__a, __b, __c, 4, __cc);
10004}
10005
10006static inline __ATTRS_o_ai __vector __bool int
10007vec_cmprg_cc(__vector unsigned int __a, __vector unsigned int __b,
10008 __vector unsigned int __c, int *__cc) {
10009 return (__vector __bool int)__builtin_s390_vstrcfs(__a, __b, __c, 4, __cc);
10010}
10011
10012/*-- vec_cmprg_idx ----------------------------------------------------------*/
10013
10014static inline __ATTRS_o_ai __vector unsigned char
10015vec_cmprg_idx(__vector unsigned char __a, __vector unsigned char __b,
10016 __vector unsigned char __c) {
10017 return __builtin_s390_vstrcb(__a, __b, __c, 0);
10018}
10019
10020static inline __ATTRS_o_ai __vector unsigned short
10021vec_cmprg_idx(__vector unsigned short __a, __vector unsigned short __b,
10022 __vector unsigned short __c) {
10023 return __builtin_s390_vstrch(__a, __b, __c, 0);
10024}
10025
10026static inline __ATTRS_o_ai __vector unsigned int
10027vec_cmprg_idx(__vector unsigned int __a, __vector unsigned int __b,
10028 __vector unsigned int __c) {
10029 return __builtin_s390_vstrcf(__a, __b, __c, 0);
10030}
10031
10032/*-- vec_cmprg_idx_cc -------------------------------------------------------*/
10033
10034static inline __ATTRS_o_ai __vector unsigned char
10035vec_cmprg_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10036 __vector unsigned char __c, int *__cc) {
10037 return __builtin_s390_vstrcbs(__a, __b, __c, 0, __cc);
10038}
10039
10040static inline __ATTRS_o_ai __vector unsigned short
10041vec_cmprg_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10042 __vector unsigned short __c, int *__cc) {
10043 return __builtin_s390_vstrchs(__a, __b, __c, 0, __cc);
10044}
10045
10046static inline __ATTRS_o_ai __vector unsigned int
10047vec_cmprg_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10048 __vector unsigned int __c, int *__cc) {
10049 return __builtin_s390_vstrcfs(__a, __b, __c, 0, __cc);
10050}
10051
10052/*-- vec_cmprg_or_0_idx -----------------------------------------------------*/
10053
10054static inline __ATTRS_o_ai __vector unsigned char
10055vec_cmprg_or_0_idx(__vector unsigned char __a, __vector unsigned char __b,
10056 __vector unsigned char __c) {
10057 return __builtin_s390_vstrczb(__a, __b, __c, 0);
10058}
10059
10060static inline __ATTRS_o_ai __vector unsigned short
10061vec_cmprg_or_0_idx(__vector unsigned short __a, __vector unsigned short __b,
10062 __vector unsigned short __c) {
10063 return __builtin_s390_vstrczh(__a, __b, __c, 0);
10064}
10065
10066static inline __ATTRS_o_ai __vector unsigned int
10067vec_cmprg_or_0_idx(__vector unsigned int __a, __vector unsigned int __b,
10068 __vector unsigned int __c) {
10069 return __builtin_s390_vstrczf(__a, __b, __c, 0);
10070}
10071
10072/*-- vec_cmprg_or_0_idx_cc --------------------------------------------------*/
10073
10074static inline __ATTRS_o_ai __vector unsigned char
10075vec_cmprg_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10076 __vector unsigned char __c, int *__cc) {
10077 return __builtin_s390_vstrczbs(__a, __b, __c, 0, __cc);
10078}
10079
10080static inline __ATTRS_o_ai __vector unsigned short
10081vec_cmprg_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10082 __vector unsigned short __c, int *__cc) {
10083 return __builtin_s390_vstrczhs(__a, __b, __c, 0, __cc);
10084}
10085
10086static inline __ATTRS_o_ai __vector unsigned int
10087vec_cmprg_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10088 __vector unsigned int __c, int *__cc) {
10089 return __builtin_s390_vstrczfs(__a, __b, __c, 0, __cc);
10090}
10091
10092/*-- vec_cmpnrg -------------------------------------------------------------*/
10093
10094static inline __ATTRS_o_ai __vector __bool char
10095vec_cmpnrg(__vector unsigned char __a, __vector unsigned char __b,
10096 __vector unsigned char __c) {
10097 return (__vector __bool char)__builtin_s390_vstrcb(__a, __b, __c, 12);
10098}
10099
10100static inline __ATTRS_o_ai __vector __bool short
10101vec_cmpnrg(__vector unsigned short __a, __vector unsigned short __b,
10102 __vector unsigned short __c) {
10103 return (__vector __bool short)__builtin_s390_vstrch(__a, __b, __c, 12);
10104}
10105
10106static inline __ATTRS_o_ai __vector __bool int
10107vec_cmpnrg(__vector unsigned int __a, __vector unsigned int __b,
10108 __vector unsigned int __c) {
10109 return (__vector __bool int)__builtin_s390_vstrcf(__a, __b, __c, 12);
10110}
10111
10112/*-- vec_cmpnrg_cc ----------------------------------------------------------*/
10113
10114static inline __ATTRS_o_ai __vector __bool char
10115vec_cmpnrg_cc(__vector unsigned char __a, __vector unsigned char __b,
10116 __vector unsigned char __c, int *__cc) {
10117 return (__vector __bool char)
10118 __builtin_s390_vstrcbs(__a, __b, __c, 12, __cc);
10119}
10120
10121static inline __ATTRS_o_ai __vector __bool short
10122vec_cmpnrg_cc(__vector unsigned short __a, __vector unsigned short __b,
10123 __vector unsigned short __c, int *__cc) {
10124 return (__vector __bool short)
10125 __builtin_s390_vstrchs(__a, __b, __c, 12, __cc);
10126}
10127
10128static inline __ATTRS_o_ai __vector __bool int
10129vec_cmpnrg_cc(__vector unsigned int __a, __vector unsigned int __b,
10130 __vector unsigned int __c, int *__cc) {
10131 return (__vector __bool int)
10132 __builtin_s390_vstrcfs(__a, __b, __c, 12, __cc);
10133}
10134
10135/*-- vec_cmpnrg_idx ---------------------------------------------------------*/
10136
10137static inline __ATTRS_o_ai __vector unsigned char
10138vec_cmpnrg_idx(__vector unsigned char __a, __vector unsigned char __b,
10139 __vector unsigned char __c) {
10140 return __builtin_s390_vstrcb(__a, __b, __c, 8);
10141}
10142
10143static inline __ATTRS_o_ai __vector unsigned short
10144vec_cmpnrg_idx(__vector unsigned short __a, __vector unsigned short __b,
10145 __vector unsigned short __c) {
10146 return __builtin_s390_vstrch(__a, __b, __c, 8);
10147}
10148
10149static inline __ATTRS_o_ai __vector unsigned int
10150vec_cmpnrg_idx(__vector unsigned int __a, __vector unsigned int __b,
10151 __vector unsigned int __c) {
10152 return __builtin_s390_vstrcf(__a, __b, __c, 8);
10153}
10154
10155/*-- vec_cmpnrg_idx_cc ------------------------------------------------------*/
10156
10157static inline __ATTRS_o_ai __vector unsigned char
10158vec_cmpnrg_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10159 __vector unsigned char __c, int *__cc) {
10160 return __builtin_s390_vstrcbs(__a, __b, __c, 8, __cc);
10161}
10162
10163static inline __ATTRS_o_ai __vector unsigned short
10164vec_cmpnrg_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10165 __vector unsigned short __c, int *__cc) {
10166 return __builtin_s390_vstrchs(__a, __b, __c, 8, __cc);
10167}
10168
10169static inline __ATTRS_o_ai __vector unsigned int
10170vec_cmpnrg_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10171 __vector unsigned int __c, int *__cc) {
10172 return __builtin_s390_vstrcfs(__a, __b, __c, 8, __cc);
10173}
10174
10175/*-- vec_cmpnrg_or_0_idx ----------------------------------------------------*/
10176
10177static inline __ATTRS_o_ai __vector unsigned char
10178vec_cmpnrg_or_0_idx(__vector unsigned char __a, __vector unsigned char __b,
10179 __vector unsigned char __c) {
10180 return __builtin_s390_vstrczb(__a, __b, __c, 8);
10181}
10182
10183static inline __ATTRS_o_ai __vector unsigned short
10184vec_cmpnrg_or_0_idx(__vector unsigned short __a, __vector unsigned short __b,
10185 __vector unsigned short __c) {
10186 return __builtin_s390_vstrczh(__a, __b, __c, 8);
10187}
10188
10189static inline __ATTRS_o_ai __vector unsigned int
10190vec_cmpnrg_or_0_idx(__vector unsigned int __a, __vector unsigned int __b,
10191 __vector unsigned int __c) {
10192 return __builtin_s390_vstrczf(__a, __b, __c, 8);
10193}
10194
10195/*-- vec_cmpnrg_or_0_idx_cc -------------------------------------------------*/
10196
10197static inline __ATTRS_o_ai __vector unsigned char
10198vec_cmpnrg_or_0_idx_cc(__vector unsigned char __a,
10199 __vector unsigned char __b,
10200 __vector unsigned char __c, int *__cc) {
10201 return __builtin_s390_vstrczbs(__a, __b, __c, 8, __cc);
10202}
10203
10204static inline __ATTRS_o_ai __vector unsigned short
10205vec_cmpnrg_or_0_idx_cc(__vector unsigned short __a,
10206 __vector unsigned short __b,
10207 __vector unsigned short __c, int *__cc) {
10208 return __builtin_s390_vstrczhs(__a, __b, __c, 8, __cc);
10209}
10210
10211static inline __ATTRS_o_ai __vector unsigned int
10212vec_cmpnrg_or_0_idx_cc(__vector unsigned int __a,
10213 __vector unsigned int __b,
10214 __vector unsigned int __c, int *__cc) {
10215 return __builtin_s390_vstrczfs(__a, __b, __c, 8, __cc);
10216}
10217
10218/*-- vec_find_any_eq --------------------------------------------------------*/
10219
10220static inline __ATTRS_o_ai __vector __bool char
10221vec_find_any_eq(__vector signed char __a, __vector signed char __b) {
10222 return (__vector __bool char)
10223 __builtin_s390_vfaeb((__vector unsigned char)__a,
10224 (__vector unsigned char)__b, 4);
10225}
10226
10227static inline __ATTRS_o_ai __vector __bool char
10228vec_find_any_eq(__vector __bool char __a, __vector __bool char __b) {
10229 return (__vector __bool char)
10230 __builtin_s390_vfaeb((__vector unsigned char)__a,
10231 (__vector unsigned char)__b, 4);
10232}
10233
10234static inline __ATTRS_o_ai __vector __bool char
10235vec_find_any_eq(__vector unsigned char __a, __vector unsigned char __b) {
10236 return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 4);
10237}
10238
10239static inline __ATTRS_o_ai __vector __bool short
10240vec_find_any_eq(__vector signed short __a, __vector signed short __b) {
10241 return (__vector __bool short)
10242 __builtin_s390_vfaeh((__vector unsigned short)__a,
10243 (__vector unsigned short)__b, 4);
10244}
10245
10246static inline __ATTRS_o_ai __vector __bool short
10247vec_find_any_eq(__vector __bool short __a, __vector __bool short __b) {
10248 return (__vector __bool short)
10249 __builtin_s390_vfaeh((__vector unsigned short)__a,
10250 (__vector unsigned short)__b, 4);
10251}
10252
10253static inline __ATTRS_o_ai __vector __bool short
10254vec_find_any_eq(__vector unsigned short __a, __vector unsigned short __b) {
10255 return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 4);
10256}
10257
10258static inline __ATTRS_o_ai __vector __bool int
10259vec_find_any_eq(__vector signed int __a, __vector signed int __b) {
10260 return (__vector __bool int)
10261 __builtin_s390_vfaef((__vector unsigned int)__a,
10262 (__vector unsigned int)__b, 4);
10263}
10264
10265static inline __ATTRS_o_ai __vector __bool int
10266vec_find_any_eq(__vector __bool int __a, __vector __bool int __b) {
10267 return (__vector __bool int)
10268 __builtin_s390_vfaef((__vector unsigned int)__a,
10269 (__vector unsigned int)__b, 4);
10270}
10271
10272static inline __ATTRS_o_ai __vector __bool int
10273vec_find_any_eq(__vector unsigned int __a, __vector unsigned int __b) {
10274 return (__vector __bool int)__builtin_s390_vfaef(__a, __b, 4);
10275}
10276
10277/*-- vec_find_any_eq_cc -----------------------------------------------------*/
10278
10279static inline __ATTRS_o_ai __vector __bool char
10280vec_find_any_eq_cc(__vector signed char __a, __vector signed char __b,
10281 int *__cc) {
10282 return (__vector __bool char)
10283 __builtin_s390_vfaebs((__vector unsigned char)__a,
10284 (__vector unsigned char)__b, 4, __cc);
10285}
10286
10287static inline __ATTRS_o_ai __vector __bool char
10288vec_find_any_eq_cc(__vector __bool char __a, __vector __bool char __b,
10289 int *__cc) {
10290 return (__vector __bool char)
10291 __builtin_s390_vfaebs((__vector unsigned char)__a,
10292 (__vector unsigned char)__b, 4, __cc);
10293}
10294
10295static inline __ATTRS_o_ai __vector __bool char
10296vec_find_any_eq_cc(__vector unsigned char __a, __vector unsigned char __b,
10297 int *__cc) {
10298 return (__vector __bool char)__builtin_s390_vfaebs(__a, __b, 4, __cc);
10299}
10300
10301static inline __ATTRS_o_ai __vector __bool short
10302vec_find_any_eq_cc(__vector signed short __a, __vector signed short __b,
10303 int *__cc) {
10304 return (__vector __bool short)
10305 __builtin_s390_vfaehs((__vector unsigned short)__a,
10306 (__vector unsigned short)__b, 4, __cc);
10307}
10308
10309static inline __ATTRS_o_ai __vector __bool short
10310vec_find_any_eq_cc(__vector __bool short __a, __vector __bool short __b,
10311 int *__cc) {
10312 return (__vector __bool short)
10313 __builtin_s390_vfaehs((__vector unsigned short)__a,
10314 (__vector unsigned short)__b, 4, __cc);
10315}
10316
10317static inline __ATTRS_o_ai __vector __bool short
10318vec_find_any_eq_cc(__vector unsigned short __a, __vector unsigned short __b,
10319 int *__cc) {
10320 return (__vector __bool short)__builtin_s390_vfaehs(__a, __b, 4, __cc);
10321}
10322
10323static inline __ATTRS_o_ai __vector __bool int
10324vec_find_any_eq_cc(__vector signed int __a, __vector signed int __b,
10325 int *__cc) {
10326 return (__vector __bool int)
10327 __builtin_s390_vfaefs((__vector unsigned int)__a,
10328 (__vector unsigned int)__b, 4, __cc);
10329}
10330
10331static inline __ATTRS_o_ai __vector __bool int
10332vec_find_any_eq_cc(__vector __bool int __a, __vector __bool int __b,
10333 int *__cc) {
10334 return (__vector __bool int)
10335 __builtin_s390_vfaefs((__vector unsigned int)__a,
10336 (__vector unsigned int)__b, 4, __cc);
10337}
10338
10339static inline __ATTRS_o_ai __vector __bool int
10340vec_find_any_eq_cc(__vector unsigned int __a, __vector unsigned int __b,
10341 int *__cc) {
10342 return (__vector __bool int)__builtin_s390_vfaefs(__a, __b, 4, __cc);
10343}
10344
10345/*-- vec_find_any_eq_idx ----------------------------------------------------*/
10346
10347static inline __ATTRS_o_ai __vector signed char
10348vec_find_any_eq_idx(__vector signed char __a, __vector signed char __b) {
10349 return (__vector signed char)
10350 __builtin_s390_vfaeb((__vector unsigned char)__a,
10351 (__vector unsigned char)__b, 0);
10352}
10353
10354static inline __ATTRS_o_ai __vector unsigned char
10355vec_find_any_eq_idx(__vector __bool char __a, __vector __bool char __b) {
10356 return __builtin_s390_vfaeb((__vector unsigned char)__a,
10357 (__vector unsigned char)__b, 0);
10358}
10359
10360static inline __ATTRS_o_ai __vector unsigned char
10361vec_find_any_eq_idx(__vector unsigned char __a, __vector unsigned char __b) {
10362 return __builtin_s390_vfaeb(__a, __b, 0);
10363}
10364
10365static inline __ATTRS_o_ai __vector signed short
10366vec_find_any_eq_idx(__vector signed short __a, __vector signed short __b) {
10367 return (__vector signed short)
10368 __builtin_s390_vfaeh((__vector unsigned short)__a,
10369 (__vector unsigned short)__b, 0);
10370}
10371
10372static inline __ATTRS_o_ai __vector unsigned short
10373vec_find_any_eq_idx(__vector __bool short __a, __vector __bool short __b) {
10374 return __builtin_s390_vfaeh((__vector unsigned short)__a,
10375 (__vector unsigned short)__b, 0);
10376}
10377
10378static inline __ATTRS_o_ai __vector unsigned short
10379vec_find_any_eq_idx(__vector unsigned short __a, __vector unsigned short __b) {
10380 return __builtin_s390_vfaeh(__a, __b, 0);
10381}
10382
10383static inline __ATTRS_o_ai __vector signed int
10384vec_find_any_eq_idx(__vector signed int __a, __vector signed int __b) {
10385 return (__vector signed int)
10386 __builtin_s390_vfaef((__vector unsigned int)__a,
10387 (__vector unsigned int)__b, 0);
10388}
10389
10390static inline __ATTRS_o_ai __vector unsigned int
10391vec_find_any_eq_idx(__vector __bool int __a, __vector __bool int __b) {
10392 return __builtin_s390_vfaef((__vector unsigned int)__a,
10393 (__vector unsigned int)__b, 0);
10394}
10395
10396static inline __ATTRS_o_ai __vector unsigned int
10397vec_find_any_eq_idx(__vector unsigned int __a, __vector unsigned int __b) {
10398 return __builtin_s390_vfaef(__a, __b, 0);
10399}
10400
10401/*-- vec_find_any_eq_idx_cc -------------------------------------------------*/
10402
10403static inline __ATTRS_o_ai __vector signed char
10404vec_find_any_eq_idx_cc(__vector signed char __a,
10405 __vector signed char __b, int *__cc) {
10406 return (__vector signed char)
10407 __builtin_s390_vfaebs((__vector unsigned char)__a,
10408 (__vector unsigned char)__b, 0, __cc);
10409}
10410
10411static inline __ATTRS_o_ai __vector unsigned char
10412vec_find_any_eq_idx_cc(__vector __bool char __a,
10413 __vector __bool char __b, int *__cc) {
10414 return __builtin_s390_vfaebs((__vector unsigned char)__a,
10415 (__vector unsigned char)__b, 0, __cc);
10416}
10417
10418static inline __ATTRS_o_ai __vector unsigned char
10419vec_find_any_eq_idx_cc(__vector unsigned char __a,
10420 __vector unsigned char __b, int *__cc) {
10421 return __builtin_s390_vfaebs(__a, __b, 0, __cc);
10422}
10423
10424static inline __ATTRS_o_ai __vector signed short
10425vec_find_any_eq_idx_cc(__vector signed short __a,
10426 __vector signed short __b, int *__cc) {
10427 return (__vector signed short)
10428 __builtin_s390_vfaehs((__vector unsigned short)__a,
10429 (__vector unsigned short)__b, 0, __cc);
10430}
10431
10432static inline __ATTRS_o_ai __vector unsigned short
10433vec_find_any_eq_idx_cc(__vector __bool short __a,
10434 __vector __bool short __b, int *__cc) {
10435 return __builtin_s390_vfaehs((__vector unsigned short)__a,
10436 (__vector unsigned short)__b, 0, __cc);
10437}
10438
10439static inline __ATTRS_o_ai __vector unsigned short
10440vec_find_any_eq_idx_cc(__vector unsigned short __a,
10441 __vector unsigned short __b, int *__cc) {
10442 return __builtin_s390_vfaehs(__a, __b, 0, __cc);
10443}
10444
10445static inline __ATTRS_o_ai __vector signed int
10446vec_find_any_eq_idx_cc(__vector signed int __a,
10447 __vector signed int __b, int *__cc) {
10448 return (__vector signed int)
10449 __builtin_s390_vfaefs((__vector unsigned int)__a,
10450 (__vector unsigned int)__b, 0, __cc);
10451}
10452
10453static inline __ATTRS_o_ai __vector unsigned int
10454vec_find_any_eq_idx_cc(__vector __bool int __a,
10455 __vector __bool int __b, int *__cc) {
10456 return __builtin_s390_vfaefs((__vector unsigned int)__a,
10457 (__vector unsigned int)__b, 0, __cc);
10458}
10459
10460static inline __ATTRS_o_ai __vector unsigned int
10461vec_find_any_eq_idx_cc(__vector unsigned int __a,
10462 __vector unsigned int __b, int *__cc) {
10463 return __builtin_s390_vfaefs(__a, __b, 0, __cc);
10464}
10465
10466/*-- vec_find_any_eq_or_0_idx -----------------------------------------------*/
10467
10468static inline __ATTRS_o_ai __vector signed char
10469vec_find_any_eq_or_0_idx(__vector signed char __a,
10470 __vector signed char __b) {
10471 return (__vector signed char)
10472 __builtin_s390_vfaezb((__vector unsigned char)__a,
10473 (__vector unsigned char)__b, 0);
10474}
10475
10476static inline __ATTRS_o_ai __vector unsigned char
10477vec_find_any_eq_or_0_idx(__vector __bool char __a,
10478 __vector __bool char __b) {
10479 return __builtin_s390_vfaezb((__vector unsigned char)__a,
10480 (__vector unsigned char)__b, 0);
10481}
10482
10483static inline __ATTRS_o_ai __vector unsigned char
10484vec_find_any_eq_or_0_idx(__vector unsigned char __a,
10485 __vector unsigned char __b) {
10486 return __builtin_s390_vfaezb(__a, __b, 0);
10487}
10488
10489static inline __ATTRS_o_ai __vector signed short
10490vec_find_any_eq_or_0_idx(__vector signed short __a,
10491 __vector signed short __b) {
10492 return (__vector signed short)
10493 __builtin_s390_vfaezh((__vector unsigned short)__a,
10494 (__vector unsigned short)__b, 0);
10495}
10496
10497static inline __ATTRS_o_ai __vector unsigned short
10498vec_find_any_eq_or_0_idx(__vector __bool short __a,
10499 __vector __bool short __b) {
10500 return __builtin_s390_vfaezh((__vector unsigned short)__a,
10501 (__vector unsigned short)__b, 0);
10502}
10503
10504static inline __ATTRS_o_ai __vector unsigned short
10505vec_find_any_eq_or_0_idx(__vector unsigned short __a,
10506 __vector unsigned short __b) {
10507 return __builtin_s390_vfaezh(__a, __b, 0);
10508}
10509
10510static inline __ATTRS_o_ai __vector signed int
10511vec_find_any_eq_or_0_idx(__vector signed int __a,
10512 __vector signed int __b) {
10513 return (__vector signed int)
10514 __builtin_s390_vfaezf((__vector unsigned int)__a,
10515 (__vector unsigned int)__b, 0);
10516}
10517
10518static inline __ATTRS_o_ai __vector unsigned int
10519vec_find_any_eq_or_0_idx(__vector __bool int __a,
10520 __vector __bool int __b) {
10521 return __builtin_s390_vfaezf((__vector unsigned int)__a,
10522 (__vector unsigned int)__b, 0);
10523}
10524
10525static inline __ATTRS_o_ai __vector unsigned int
10526vec_find_any_eq_or_0_idx(__vector unsigned int __a,
10527 __vector unsigned int __b) {
10528 return __builtin_s390_vfaezf(__a, __b, 0);
10529}
10530
10531/*-- vec_find_any_eq_or_0_idx_cc --------------------------------------------*/
10532
10533static inline __ATTRS_o_ai __vector signed char
10534vec_find_any_eq_or_0_idx_cc(__vector signed char __a,
10535 __vector signed char __b, int *__cc) {
10536 return (__vector signed char)
10537 __builtin_s390_vfaezbs((__vector unsigned char)__a,
10538 (__vector unsigned char)__b, 0, __cc);
10539}
10540
10541static inline __ATTRS_o_ai __vector unsigned char
10542vec_find_any_eq_or_0_idx_cc(__vector __bool char __a,
10543 __vector __bool char __b, int *__cc) {
10544 return __builtin_s390_vfaezbs((__vector unsigned char)__a,
10545 (__vector unsigned char)__b, 0, __cc);
10546}
10547
10548static inline __ATTRS_o_ai __vector unsigned char
10549vec_find_any_eq_or_0_idx_cc(__vector unsigned char __a,
10550 __vector unsigned char __b, int *__cc) {
10551 return __builtin_s390_vfaezbs(__a, __b, 0, __cc);
10552}
10553
10554static inline __ATTRS_o_ai __vector signed short
10555vec_find_any_eq_or_0_idx_cc(__vector signed short __a,
10556 __vector signed short __b, int *__cc) {
10557 return (__vector signed short)
10558 __builtin_s390_vfaezhs((__vector unsigned short)__a,
10559 (__vector unsigned short)__b, 0, __cc);
10560}
10561
10562static inline __ATTRS_o_ai __vector unsigned short
10563vec_find_any_eq_or_0_idx_cc(__vector __bool short __a,
10564 __vector __bool short __b, int *__cc) {
10565 return __builtin_s390_vfaezhs((__vector unsigned short)__a,
10566 (__vector unsigned short)__b, 0, __cc);
10567}
10568
10569static inline __ATTRS_o_ai __vector unsigned short
10570vec_find_any_eq_or_0_idx_cc(__vector unsigned short __a,
10571 __vector unsigned short __b, int *__cc) {
10572 return __builtin_s390_vfaezhs(__a, __b, 0, __cc);
10573}
10574
10575static inline __ATTRS_o_ai __vector signed int
10576vec_find_any_eq_or_0_idx_cc(__vector signed int __a,
10577 __vector signed int __b, int *__cc) {
10578 return (__vector signed int)
10579 __builtin_s390_vfaezfs((__vector unsigned int)__a,
10580 (__vector unsigned int)__b, 0, __cc);
10581}
10582
10583static inline __ATTRS_o_ai __vector unsigned int
10584vec_find_any_eq_or_0_idx_cc(__vector __bool int __a,
10585 __vector __bool int __b, int *__cc) {
10586 return __builtin_s390_vfaezfs((__vector unsigned int)__a,
10587 (__vector unsigned int)__b, 0, __cc);
10588}
10589
10590static inline __ATTRS_o_ai __vector unsigned int
10591vec_find_any_eq_or_0_idx_cc(__vector unsigned int __a,
10592 __vector unsigned int __b, int *__cc) {
10593 return __builtin_s390_vfaezfs(__a, __b, 0, __cc);
10594}
10595
10596/*-- vec_find_any_ne --------------------------------------------------------*/
10597
10598static inline __ATTRS_o_ai __vector __bool char
10599vec_find_any_ne(__vector signed char __a, __vector signed char __b) {
10600 return (__vector __bool char)
10601 __builtin_s390_vfaeb((__vector unsigned char)__a,
10602 (__vector unsigned char)__b, 12);
10603}
10604
10605static inline __ATTRS_o_ai __vector __bool char
10606vec_find_any_ne(__vector __bool char __a, __vector __bool char __b) {
10607 return (__vector __bool char)
10608 __builtin_s390_vfaeb((__vector unsigned char)__a,
10609 (__vector unsigned char)__b, 12);
10610}
10611
10612static inline __ATTRS_o_ai __vector __bool char
10613vec_find_any_ne(__vector unsigned char __a, __vector unsigned char __b) {
10614 return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 12);
10615}
10616
10617static inline __ATTRS_o_ai __vector __bool short
10618vec_find_any_ne(__vector signed short __a, __vector signed short __b) {
10619 return (__vector __bool short)
10620 __builtin_s390_vfaeh((__vector unsigned short)__a,
10621 (__vector unsigned short)__b, 12);
10622}
10623
10624static inline __ATTRS_o_ai __vector __bool short
10625vec_find_any_ne(__vector __bool short __a, __vector __bool short __b) {
10626 return (__vector __bool short)
10627 __builtin_s390_vfaeh((__vector unsigned short)__a,
10628 (__vector unsigned short)__b, 12);
10629}
10630
10631static inline __ATTRS_o_ai __vector __bool short
10632vec_find_any_ne(__vector unsigned short __a, __vector unsigned short __b) {
10633 return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 12);
10634}
10635
10636static inline __ATTRS_o_ai __vector __bool int
10637vec_find_any_ne(__vector signed int __a, __vector signed int __b) {
10638 return (__vector __bool int)
10639 __builtin_s390_vfaef((__vector unsigned int)__a,
10640 (__vector unsigned int)__b, 12);
10641}
10642
10643static inline __ATTRS_o_ai __vector __bool int
10644vec_find_any_ne(__vector __bool int __a, __vector __bool int __b) {
10645 return (__vector __bool int)
10646 __builtin_s390_vfaef((__vector unsigned int)__a,
10647 (__vector unsigned int)__b, 12);
10648}
10649
10650static inline __ATTRS_o_ai __vector __bool int
10651vec_find_any_ne(__vector unsigned int __a, __vector unsigned int __b) {
10652 return (__vector __bool int)__builtin_s390_vfaef(__a, __b, 12);
10653}
10654
10655/*-- vec_find_any_ne_cc -----------------------------------------------------*/
10656
10657static inline __ATTRS_o_ai __vector __bool char
10658vec_find_any_ne_cc(__vector signed char __a,
10659 __vector signed char __b, int *__cc) {
10660 return (__vector __bool char)
10661 __builtin_s390_vfaebs((__vector unsigned char)__a,
10662 (__vector unsigned char)__b, 12, __cc);
10663}
10664
10665static inline __ATTRS_o_ai __vector __bool char
10666vec_find_any_ne_cc(__vector __bool char __a,
10667 __vector __bool char __b, int *__cc) {
10668 return (__vector __bool char)
10669 __builtin_s390_vfaebs((__vector unsigned char)__a,
10670 (__vector unsigned char)__b, 12, __cc);
10671}
10672
10673static inline __ATTRS_o_ai __vector __bool char
10674vec_find_any_ne_cc(__vector unsigned char __a,
10675 __vector unsigned char __b, int *__cc) {
10676 return (__vector __bool char)__builtin_s390_vfaebs(__a, __b, 12, __cc);
10677}
10678
10679static inline __ATTRS_o_ai __vector __bool short
10680vec_find_any_ne_cc(__vector signed short __a,
10681 __vector signed short __b, int *__cc) {
10682 return (__vector __bool short)
10683 __builtin_s390_vfaehs((__vector unsigned short)__a,
10684 (__vector unsigned short)__b, 12, __cc);
10685}
10686
10687static inline __ATTRS_o_ai __vector __bool short
10688vec_find_any_ne_cc(__vector __bool short __a,
10689 __vector __bool short __b, int *__cc) {
10690 return (__vector __bool short)
10691 __builtin_s390_vfaehs((__vector unsigned short)__a,
10692 (__vector unsigned short)__b, 12, __cc);
10693}
10694
10695static inline __ATTRS_o_ai __vector __bool short
10696vec_find_any_ne_cc(__vector unsigned short __a,
10697 __vector unsigned short __b, int *__cc) {
10698 return (__vector __bool short)__builtin_s390_vfaehs(__a, __b, 12, __cc);
10699}
10700
10701static inline __ATTRS_o_ai __vector __bool int
10702vec_find_any_ne_cc(__vector signed int __a,
10703 __vector signed int __b, int *__cc) {
10704 return (__vector __bool int)
10705 __builtin_s390_vfaefs((__vector unsigned int)__a,
10706 (__vector unsigned int)__b, 12, __cc);
10707}
10708
10709static inline __ATTRS_o_ai __vector __bool int
10710vec_find_any_ne_cc(__vector __bool int __a,
10711 __vector __bool int __b, int *__cc) {
10712 return (__vector __bool int)
10713 __builtin_s390_vfaefs((__vector unsigned int)__a,
10714 (__vector unsigned int)__b, 12, __cc);
10715}
10716
10717static inline __ATTRS_o_ai __vector __bool int
10718vec_find_any_ne_cc(__vector unsigned int __a,
10719 __vector unsigned int __b, int *__cc) {
10720 return (__vector __bool int)__builtin_s390_vfaefs(__a, __b, 12, __cc);
10721}
10722
10723/*-- vec_find_any_ne_idx ----------------------------------------------------*/
10724
10725static inline __ATTRS_o_ai __vector signed char
10726vec_find_any_ne_idx(__vector signed char __a, __vector signed char __b) {
10727 return (__vector signed char)
10728 __builtin_s390_vfaeb((__vector unsigned char)__a,
10729 (__vector unsigned char)__b, 8);
10730}
10731
10732static inline __ATTRS_o_ai __vector unsigned char
10733vec_find_any_ne_idx(__vector __bool char __a, __vector __bool char __b) {
10734 return __builtin_s390_vfaeb((__vector unsigned char)__a,
10735 (__vector unsigned char)__b, 8);
10736}
10737
10738static inline __ATTRS_o_ai __vector unsigned char
10739vec_find_any_ne_idx(__vector unsigned char __a, __vector unsigned char __b) {
10740 return __builtin_s390_vfaeb(__a, __b, 8);
10741}
10742
10743static inline __ATTRS_o_ai __vector signed short
10744vec_find_any_ne_idx(__vector signed short __a, __vector signed short __b) {
10745 return (__vector signed short)
10746 __builtin_s390_vfaeh((__vector unsigned short)__a,
10747 (__vector unsigned short)__b, 8);
10748}
10749
10750static inline __ATTRS_o_ai __vector unsigned short
10751vec_find_any_ne_idx(__vector __bool short __a, __vector __bool short __b) {
10752 return __builtin_s390_vfaeh((__vector unsigned short)__a,
10753 (__vector unsigned short)__b, 8);
10754}
10755
10756static inline __ATTRS_o_ai __vector unsigned short
10757vec_find_any_ne_idx(__vector unsigned short __a, __vector unsigned short __b) {
10758 return __builtin_s390_vfaeh(__a, __b, 8);
10759}
10760
10761static inline __ATTRS_o_ai __vector signed int
10762vec_find_any_ne_idx(__vector signed int __a, __vector signed int __b) {
10763 return (__vector signed int)
10764 __builtin_s390_vfaef((__vector unsigned int)__a,
10765 (__vector unsigned int)__b, 8);
10766}
10767
10768static inline __ATTRS_o_ai __vector unsigned int
10769vec_find_any_ne_idx(__vector __bool int __a, __vector __bool int __b) {
10770 return __builtin_s390_vfaef((__vector unsigned int)__a,
10771 (__vector unsigned int)__b, 8);
10772}
10773
10774static inline __ATTRS_o_ai __vector unsigned int
10775vec_find_any_ne_idx(__vector unsigned int __a, __vector unsigned int __b) {
10776 return __builtin_s390_vfaef(__a, __b, 8);
10777}
10778
10779/*-- vec_find_any_ne_idx_cc -------------------------------------------------*/
10780
10781static inline __ATTRS_o_ai __vector signed char
10782vec_find_any_ne_idx_cc(__vector signed char __a,
10783 __vector signed char __b, int *__cc) {
10784 return (__vector signed char)
10785 __builtin_s390_vfaebs((__vector unsigned char)__a,
10786 (__vector unsigned char)__b, 8, __cc);
10787}
10788
10789static inline __ATTRS_o_ai __vector unsigned char
10790vec_find_any_ne_idx_cc(__vector __bool char __a,
10791 __vector __bool char __b, int *__cc) {
10792 return __builtin_s390_vfaebs((__vector unsigned char)__a,
10793 (__vector unsigned char)__b, 8, __cc);
10794}
10795
10796static inline __ATTRS_o_ai __vector unsigned char
10797vec_find_any_ne_idx_cc(__vector unsigned char __a,
10798 __vector unsigned char __b,
10799 int *__cc) {
10800 return __builtin_s390_vfaebs(__a, __b, 8, __cc);
10801}
10802
10803static inline __ATTRS_o_ai __vector signed short
10804vec_find_any_ne_idx_cc(__vector signed short __a,
10805 __vector signed short __b, int *__cc) {
10806 return (__vector signed short)
10807 __builtin_s390_vfaehs((__vector unsigned short)__a,
10808 (__vector unsigned short)__b, 8, __cc);
10809}
10810
10811static inline __ATTRS_o_ai __vector unsigned short
10812vec_find_any_ne_idx_cc(__vector __bool short __a,
10813 __vector __bool short __b, int *__cc) {
10814 return __builtin_s390_vfaehs((__vector unsigned short)__a,
10815 (__vector unsigned short)__b, 8, __cc);
10816}
10817
10818static inline __ATTRS_o_ai __vector unsigned short
10819vec_find_any_ne_idx_cc(__vector unsigned short __a,
10820 __vector unsigned short __b, int *__cc) {
10821 return __builtin_s390_vfaehs(__a, __b, 8, __cc);
10822}
10823
10824static inline __ATTRS_o_ai __vector signed int
10825vec_find_any_ne_idx_cc(__vector signed int __a,
10826 __vector signed int __b, int *__cc) {
10827 return (__vector signed int)
10828 __builtin_s390_vfaefs((__vector unsigned int)__a,
10829 (__vector unsigned int)__b, 8, __cc);
10830}
10831
10832static inline __ATTRS_o_ai __vector unsigned int
10833vec_find_any_ne_idx_cc(__vector __bool int __a,
10834 __vector __bool int __b, int *__cc) {
10835 return __builtin_s390_vfaefs((__vector unsigned int)__a,
10836 (__vector unsigned int)__b, 8, __cc);
10837}
10838
10839static inline __ATTRS_o_ai __vector unsigned int
10840vec_find_any_ne_idx_cc(__vector unsigned int __a,
10841 __vector unsigned int __b, int *__cc) {
10842 return __builtin_s390_vfaefs(__a, __b, 8, __cc);
10843}
10844
10845/*-- vec_find_any_ne_or_0_idx -----------------------------------------------*/
10846
10847static inline __ATTRS_o_ai __vector signed char
10848vec_find_any_ne_or_0_idx(__vector signed char __a,
10849 __vector signed char __b) {
10850 return (__vector signed char)
10851 __builtin_s390_vfaezb((__vector unsigned char)__a,
10852 (__vector unsigned char)__b, 8);
10853}
10854
10855static inline __ATTRS_o_ai __vector unsigned char
10856vec_find_any_ne_or_0_idx(__vector __bool char __a,
10857 __vector __bool char __b) {
10858 return __builtin_s390_vfaezb((__vector unsigned char)__a,
10859 (__vector unsigned char)__b, 8);
10860}
10861
10862static inline __ATTRS_o_ai __vector unsigned char
10863vec_find_any_ne_or_0_idx(__vector unsigned char __a,
10864 __vector unsigned char __b) {
10865 return __builtin_s390_vfaezb(__a, __b, 8);
10866}
10867
10868static inline __ATTRS_o_ai __vector signed short
10869vec_find_any_ne_or_0_idx(__vector signed short __a,
10870 __vector signed short __b) {
10871 return (__vector signed short)
10872 __builtin_s390_vfaezh((__vector unsigned short)__a,
10873 (__vector unsigned short)__b, 8);
10874}
10875
10876static inline __ATTRS_o_ai __vector unsigned short
10877vec_find_any_ne_or_0_idx(__vector __bool short __a,
10878 __vector __bool short __b) {
10879 return __builtin_s390_vfaezh((__vector unsigned short)__a,
10880 (__vector unsigned short)__b, 8);
10881}
10882
10883static inline __ATTRS_o_ai __vector unsigned short
10884vec_find_any_ne_or_0_idx(__vector unsigned short __a,
10885 __vector unsigned short __b) {
10886 return __builtin_s390_vfaezh(__a, __b, 8);
10887}
10888
10889static inline __ATTRS_o_ai __vector signed int
10890vec_find_any_ne_or_0_idx(__vector signed int __a,
10891 __vector signed int __b) {
10892 return (__vector signed int)
10893 __builtin_s390_vfaezf((__vector unsigned int)__a,
10894 (__vector unsigned int)__b, 8);
10895}
10896
10897static inline __ATTRS_o_ai __vector unsigned int
10898vec_find_any_ne_or_0_idx(__vector __bool int __a,
10899 __vector __bool int __b) {
10900 return __builtin_s390_vfaezf((__vector unsigned int)__a,
10901 (__vector unsigned int)__b, 8);
10902}
10903
10904static inline __ATTRS_o_ai __vector unsigned int
10905vec_find_any_ne_or_0_idx(__vector unsigned int __a,
10906 __vector unsigned int __b) {
10907 return __builtin_s390_vfaezf(__a, __b, 8);
10908}
10909
10910/*-- vec_find_any_ne_or_0_idx_cc --------------------------------------------*/
10911
10912static inline __ATTRS_o_ai __vector signed char
10913vec_find_any_ne_or_0_idx_cc(__vector signed char __a,
10914 __vector signed char __b, int *__cc) {
10915 return (__vector signed char)
10916 __builtin_s390_vfaezbs((__vector unsigned char)__a,
10917 (__vector unsigned char)__b, 8, __cc);
10918}
10919
10920static inline __ATTRS_o_ai __vector unsigned char
10921vec_find_any_ne_or_0_idx_cc(__vector __bool char __a,
10922 __vector __bool char __b, int *__cc) {
10923 return __builtin_s390_vfaezbs((__vector unsigned char)__a,
10924 (__vector unsigned char)__b, 8, __cc);
10925}
10926
10927static inline __ATTRS_o_ai __vector unsigned char
10928vec_find_any_ne_or_0_idx_cc(__vector unsigned char __a,
10929 __vector unsigned char __b, int *__cc) {
10930 return __builtin_s390_vfaezbs(__a, __b, 8, __cc);
10931}
10932
10933static inline __ATTRS_o_ai __vector signed short
10934vec_find_any_ne_or_0_idx_cc(__vector signed short __a,
10935 __vector signed short __b, int *__cc) {
10936 return (__vector signed short)
10937 __builtin_s390_vfaezhs((__vector unsigned short)__a,
10938 (__vector unsigned short)__b, 8, __cc);
10939}
10940
10941static inline __ATTRS_o_ai __vector unsigned short
10942vec_find_any_ne_or_0_idx_cc(__vector __bool short __a,
10943 __vector __bool short __b, int *__cc) {
10944 return __builtin_s390_vfaezhs((__vector unsigned short)__a,
10945 (__vector unsigned short)__b, 8, __cc);
10946}
10947
10948static inline __ATTRS_o_ai __vector unsigned short
10949vec_find_any_ne_or_0_idx_cc(__vector unsigned short __a,
10950 __vector unsigned short __b, int *__cc) {
10951 return __builtin_s390_vfaezhs(__a, __b, 8, __cc);
10952}
10953
10954static inline __ATTRS_o_ai __vector signed int
10955vec_find_any_ne_or_0_idx_cc(__vector signed int __a,
10956 __vector signed int __b, int *__cc) {
10957 return (__vector signed int)
10958 __builtin_s390_vfaezfs((__vector unsigned int)__a,
10959 (__vector unsigned int)__b, 8, __cc);
10960}
10961
10962static inline __ATTRS_o_ai __vector unsigned int
10963vec_find_any_ne_or_0_idx_cc(__vector __bool int __a,
10964 __vector __bool int __b, int *__cc) {
10965 return __builtin_s390_vfaezfs((__vector unsigned int)__a,
10966 (__vector unsigned int)__b, 8, __cc);
10967}
10968
10969static inline __ATTRS_o_ai __vector unsigned int
10970vec_find_any_ne_or_0_idx_cc(__vector unsigned int __a,
10971 __vector unsigned int __b, int *__cc) {
10972 return __builtin_s390_vfaezfs(__a, __b, 8, __cc);
10973}
10974
10975/*-- vec_search_string_cc ---------------------------------------------------*/
10976
10977#if __ARCH__ >= 13
10978
10979static inline __ATTRS_o_ai __vector unsigned char
10980vec_search_string_cc(__vector signed char __a, __vector signed char __b,
10981 __vector unsigned char __c, int *__cc) {
10982 return __builtin_s390_vstrsb((__vector unsigned char)__a,
10983 (__vector unsigned char)__b, __c, __cc);
10984}
10985
10986static inline __ATTRS_o_ai __vector unsigned char
10987vec_search_string_cc(__vector __bool char __a, __vector __bool char __b,
10988 __vector unsigned char __c, int *__cc) {
10989 return __builtin_s390_vstrsb((__vector unsigned char)__a,
10990 (__vector unsigned char)__b, __c, __cc);
10991}
10992
10993static inline __ATTRS_o_ai __vector unsigned char
10994vec_search_string_cc(__vector unsigned char __a, __vector unsigned char __b,
10995 __vector unsigned char __c, int *__cc) {
10996 return __builtin_s390_vstrsb(__a, __b, __c, __cc);
10997}
10998
10999static inline __ATTRS_o_ai __vector unsigned char
11000vec_search_string_cc(__vector signed short __a, __vector signed short __b,
11001 __vector unsigned char __c, int *__cc) {
11002 return __builtin_s390_vstrsh((__vector unsigned short)__a,
11003 (__vector unsigned short)__b, __c, __cc);
11004}
11005
11006static inline __ATTRS_o_ai __vector unsigned char
11007vec_search_string_cc(__vector __bool short __a, __vector __bool short __b,
11008 __vector unsigned char __c, int *__cc) {
11009 return __builtin_s390_vstrsh((__vector unsigned short)__a,
11010 (__vector unsigned short)__b, __c, __cc);
11011}
11012
11013static inline __ATTRS_o_ai __vector unsigned char
11014vec_search_string_cc(__vector unsigned short __a, __vector unsigned short __b,
11015 __vector unsigned char __c, int *__cc) {
11016 return __builtin_s390_vstrsh(__a, __b, __c, __cc);
11017}
11018
11019static inline __ATTRS_o_ai __vector unsigned char
11020vec_search_string_cc(__vector signed int __a, __vector signed int __b,
11021 __vector unsigned char __c, int *__cc) {
11022 return __builtin_s390_vstrsf((__vector unsigned int)__a,
11023 (__vector unsigned int)__b, __c, __cc);
11024}
11025
11026static inline __ATTRS_o_ai __vector unsigned char
11027vec_search_string_cc(__vector __bool int __a, __vector __bool int __b,
11028 __vector unsigned char __c, int *__cc) {
11029 return __builtin_s390_vstrsf((__vector unsigned int)__a,
11030 (__vector unsigned int)__b, __c, __cc);
11031}
11032
11033static inline __ATTRS_o_ai __vector unsigned char
11034vec_search_string_cc(__vector unsigned int __a, __vector unsigned int __b,
11035 __vector unsigned char __c, int *__cc) {
11036 return __builtin_s390_vstrsf(__a, __b, __c, __cc);
11037}
11038
11039#endif
11040
11041/*-- vec_search_string_until_zero_cc ----------------------------------------*/
11042
11043#if __ARCH__ >= 13
11044
11045static inline __ATTRS_o_ai __vector unsigned char
11046vec_search_string_until_zero_cc(__vector signed char __a,
11047 __vector signed char __b,
11048 __vector unsigned char __c, int *__cc) {
11049 return __builtin_s390_vstrszb((__vector unsigned char)__a,
11050 (__vector unsigned char)__b, __c, __cc);
11051}
11052
11053static inline __ATTRS_o_ai __vector unsigned char
11054vec_search_string_until_zero_cc(__vector __bool char __a,
11055 __vector __bool char __b,
11056 __vector unsigned char __c, int *__cc) {
11057 return __builtin_s390_vstrszb((__vector unsigned char)__a,
11058 (__vector unsigned char)__b, __c, __cc);
11059}
11060
11061static inline __ATTRS_o_ai __vector unsigned char
11062vec_search_string_until_zero_cc(__vector unsigned char __a,
11063 __vector unsigned char __b,
11064 __vector unsigned char __c, int *__cc) {
11065 return __builtin_s390_vstrszb(__a, __b, __c, __cc);
11066}
11067
11068static inline __ATTRS_o_ai __vector unsigned char
11069vec_search_string_until_zero_cc(__vector signed short __a,
11070 __vector signed short __b,
11071 __vector unsigned char __c, int *__cc) {
11072 return __builtin_s390_vstrszh((__vector unsigned short)__a,
11073 (__vector unsigned short)__b, __c, __cc);
11074}
11075
11076static inline __ATTRS_o_ai __vector unsigned char
11077vec_search_string_until_zero_cc(__vector __bool short __a,
11078 __vector __bool short __b,
11079 __vector unsigned char __c, int *__cc) {
11080 return __builtin_s390_vstrszh((__vector unsigned short)__a,
11081 (__vector unsigned short)__b, __c, __cc);
11082}
11083
11084static inline __ATTRS_o_ai __vector unsigned char
11085vec_search_string_until_zero_cc(__vector unsigned short __a,
11086 __vector unsigned short __b,
11087 __vector unsigned char __c, int *__cc) {
11088 return __builtin_s390_vstrszh(__a, __b, __c, __cc);
11089}
11090
11091static inline __ATTRS_o_ai __vector unsigned char
11092vec_search_string_until_zero_cc(__vector signed int __a,
11093 __vector signed int __b,
11094 __vector unsigned char __c, int *__cc) {
11095 return __builtin_s390_vstrszf((__vector unsigned int)__a,
11096 (__vector unsigned int)__b, __c, __cc);
11097}
11098
11099static inline __ATTRS_o_ai __vector unsigned char
11100vec_search_string_until_zero_cc(__vector __bool int __a,
11101 __vector __bool int __b,
11102 __vector unsigned char __c, int *__cc) {
11103 return __builtin_s390_vstrszf((__vector unsigned int)__a,
11104 (__vector unsigned int)__b, __c, __cc);
11105}
11106
11107static inline __ATTRS_o_ai __vector unsigned char
11108vec_search_string_until_zero_cc(__vector unsigned int __a,
11109 __vector unsigned int __b,
11110 __vector unsigned char __c, int *__cc) {
11111 return __builtin_s390_vstrszf(__a, __b, __c, __cc);
11112}
11113
11114#endif
11115
11116#undef __constant_pow2_range
11117#undef __constant_range
11118#undef __constant
11119#undef __ATTRS_o
11120#undef __ATTRS_o_ai
11121#undef __ATTRS_ai
11122
11123#else
11124
11125#error "Use -fzvector to enable vector extensions"
11126
11127#endif