clang 20.0.0git
vecintrin.h
Go to the documentation of this file.
1/*===---- 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) {
1019 __vector signed char V;
1020 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1021 sizeof(__vector signed char));
1022 return V;
1023}
1024
1025static inline __ATTRS_o_ai __vector unsigned char
1026vec_xl(long __offset, const unsigned char *__ptr) {
1027 __vector unsigned char V;
1028 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1029 sizeof(__vector unsigned char));
1030 return V;
1031}
1032
1033static inline __ATTRS_o_ai __vector signed short
1034vec_xl(long __offset, const signed short *__ptr) {
1035 __vector signed short V;
1036 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1037 sizeof(__vector signed short));
1038 return V;
1039}
1040
1041static inline __ATTRS_o_ai __vector unsigned short
1042vec_xl(long __offset, const unsigned short *__ptr) {
1043 __vector unsigned short V;
1044 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1045 sizeof(__vector unsigned short));
1046 return V;
1047}
1048
1049static inline __ATTRS_o_ai __vector signed int
1050vec_xl(long __offset, const signed int *__ptr) {
1051 __vector signed int V;
1052 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1053 sizeof(__vector signed int));
1054 return V;
1055}
1056
1057static inline __ATTRS_o_ai __vector unsigned int
1058vec_xl(long __offset, const unsigned int *__ptr) {
1059 __vector unsigned int V;
1060 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1061 sizeof(__vector unsigned int));
1062 return V;
1063}
1064
1065static inline __ATTRS_o_ai __vector signed long long
1066vec_xl(long __offset, const signed long long *__ptr) {
1067 __vector signed long long V;
1068 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1069 sizeof(__vector signed long long));
1070 return V;
1071}
1072
1073static inline __ATTRS_o_ai __vector unsigned long long
1074vec_xl(long __offset, const unsigned long long *__ptr) {
1075 __vector unsigned long long V;
1076 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1077 sizeof(__vector unsigned long long));
1078 return V;
1079}
1080
1081#if __ARCH__ >= 12
1082static inline __ATTRS_o_ai __vector float
1083vec_xl(long __offset, const float *__ptr) {
1084 __vector float V;
1085 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1086 sizeof(__vector float));
1087 return V;
1088}
1089#endif
1090
1091static inline __ATTRS_o_ai __vector double
1092vec_xl(long __offset, const double *__ptr) {
1093 __vector double V;
1094 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1095 sizeof(__vector double));
1096 return V;
1097}
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) {
1104 __vector signed char V;
1105 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1106 sizeof(__vector signed char));
1107 return V;
1108}
1109
1110// This prototype is deprecated.
1111static inline __ATTRS_o_ai __vector unsigned char
1112vec_xld2(long __offset, const unsigned char *__ptr) {
1113 __vector unsigned char V;
1114 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1115 sizeof(__vector unsigned char));
1116 return V;
1117}
1118
1119// This prototype is deprecated.
1120static inline __ATTRS_o_ai __vector signed short
1121vec_xld2(long __offset, const signed short *__ptr) {
1122 __vector signed short V;
1123 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1124 sizeof(__vector signed short));
1125 return V;
1126}
1127
1128// This prototype is deprecated.
1129static inline __ATTRS_o_ai __vector unsigned short
1130vec_xld2(long __offset, const unsigned short *__ptr) {
1131 __vector unsigned short V;
1132 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1133 sizeof(__vector unsigned short));
1134 return V;
1135}
1136
1137// This prototype is deprecated.
1138static inline __ATTRS_o_ai __vector signed int
1139vec_xld2(long __offset, const signed int *__ptr) {
1140 __vector signed int V;
1141 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1142 sizeof(__vector signed int));
1143 return V;
1144}
1145
1146// This prototype is deprecated.
1147static inline __ATTRS_o_ai __vector unsigned int
1148vec_xld2(long __offset, const unsigned int *__ptr) {
1149 __vector unsigned int V;
1150 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1151 sizeof(__vector unsigned int));
1152 return V;
1153}
1154
1155// This prototype is deprecated.
1156static inline __ATTRS_o_ai __vector signed long long
1157vec_xld2(long __offset, const signed long long *__ptr) {
1158 __vector signed long long V;
1159 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1160 sizeof(__vector signed long long));
1161 return V;
1162}
1163
1164// This prototype is deprecated.
1165static inline __ATTRS_o_ai __vector unsigned long long
1166vec_xld2(long __offset, const unsigned long long *__ptr) {
1167 __vector unsigned long long V;
1168 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1169 sizeof(__vector unsigned long long));
1170 return V;
1171}
1172
1173// This prototype is deprecated.
1174static inline __ATTRS_o_ai __vector double
1175vec_xld2(long __offset, const double *__ptr) {
1176 __vector double V;
1177 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1178 sizeof(__vector double));
1179 return V;
1180}
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) {
1187 __vector signed char V;
1188 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1189 sizeof(__vector signed char));
1190 return V;
1191}
1192
1193// This prototype is deprecated.
1194static inline __ATTRS_o_ai __vector unsigned char
1195vec_xlw4(long __offset, const unsigned char *__ptr) {
1196 __vector unsigned char V;
1197 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1198 sizeof(__vector unsigned char));
1199 return V;
1200}
1201
1202// This prototype is deprecated.
1203static inline __ATTRS_o_ai __vector signed short
1204vec_xlw4(long __offset, const signed short *__ptr) {
1205 __vector signed short V;
1206 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1207 sizeof(__vector signed short));
1208 return V;
1209}
1210
1211// This prototype is deprecated.
1212static inline __ATTRS_o_ai __vector unsigned short
1213vec_xlw4(long __offset, const unsigned short *__ptr) {
1214 __vector unsigned short V;
1215 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1216 sizeof(__vector unsigned short));
1217 return V;
1218}
1219
1220// This prototype is deprecated.
1221static inline __ATTRS_o_ai __vector signed int
1222vec_xlw4(long __offset, const signed int *__ptr) {
1223 __vector signed int V;
1224 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1225 sizeof(__vector signed int));
1226 return V;
1227}
1228
1229// This prototype is deprecated.
1230static inline __ATTRS_o_ai __vector unsigned int
1231vec_xlw4(long __offset, const unsigned int *__ptr) {
1232 __vector unsigned int V;
1233 __builtin_memcpy(&V, ((const char *)__ptr + __offset),
1234 sizeof(__vector unsigned int));
1235 return V;
1236}
1237
1238/*-- vec_xst ----------------------------------------------------------------*/
1239
1240static inline __ATTRS_o_ai void
1241vec_xst(__vector signed char __vec, long __offset, signed char *__ptr) {
1242 __vector signed char V = __vec;
1243 __builtin_memcpy(((char *)__ptr + __offset), &V,
1244 sizeof(__vector signed char));
1245}
1246
1247static inline __ATTRS_o_ai void
1248vec_xst(__vector unsigned char __vec, long __offset, unsigned char *__ptr) {
1249 __vector unsigned char V = __vec;
1250 __builtin_memcpy(((char *)__ptr + __offset), &V,
1251 sizeof(__vector unsigned char));
1252}
1253
1254static inline __ATTRS_o_ai void
1255vec_xst(__vector signed short __vec, long __offset, signed short *__ptr) {
1256 __vector signed short V = __vec;
1257 __builtin_memcpy(((char *)__ptr + __offset), &V,
1258 sizeof(__vector signed short));
1259}
1260
1261static inline __ATTRS_o_ai void
1262vec_xst(__vector unsigned short __vec, long __offset, unsigned short *__ptr) {
1263 __vector unsigned short V = __vec;
1264 __builtin_memcpy(((char *)__ptr + __offset), &V,
1265 sizeof(__vector unsigned short));
1266}
1267
1268static inline __ATTRS_o_ai void
1269vec_xst(__vector signed int __vec, long __offset, signed int *__ptr) {
1270 __vector signed int V = __vec;
1271 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector signed int));
1272}
1273
1274static inline __ATTRS_o_ai void
1275vec_xst(__vector unsigned int __vec, long __offset, unsigned int *__ptr) {
1276 __vector unsigned int V = __vec;
1277 __builtin_memcpy(((char *)__ptr + __offset), &V,
1278 sizeof(__vector unsigned int));
1279}
1280
1281static inline __ATTRS_o_ai void
1282vec_xst(__vector signed long long __vec, long __offset,
1283 signed long long *__ptr) {
1284 __vector signed long long V = __vec;
1285 __builtin_memcpy(((char *)__ptr + __offset), &V,
1286 sizeof(__vector signed long long));
1287}
1288
1289static inline __ATTRS_o_ai void
1290vec_xst(__vector unsigned long long __vec, long __offset,
1291 unsigned long long *__ptr) {
1292 __vector unsigned long long V = __vec;
1293 __builtin_memcpy(((char *)__ptr + __offset), &V,
1294 sizeof(__vector unsigned long long));
1295}
1296
1297#if __ARCH__ >= 12
1298static inline __ATTRS_o_ai void
1299vec_xst(__vector float __vec, long __offset, float *__ptr) {
1300 __vector float V = __vec;
1301 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector float));
1302}
1303#endif
1304
1305static inline __ATTRS_o_ai void
1306vec_xst(__vector double __vec, long __offset, double *__ptr) {
1307 __vector double V = __vec;
1308 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector double));
1309}
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) {
1316 __vector signed char V = __vec;
1317 __builtin_memcpy(((char *)__ptr + __offset), &V,
1318 sizeof(__vector signed char));
1319}
1320
1321// This prototype is deprecated.
1322static inline __ATTRS_o_ai void
1323vec_xstd2(__vector unsigned char __vec, long __offset, unsigned char *__ptr) {
1324 __vector unsigned char V = __vec;
1325 __builtin_memcpy(((char *)__ptr + __offset), &V,
1326 sizeof(__vector unsigned char));
1327}
1328
1329// This prototype is deprecated.
1330static inline __ATTRS_o_ai void
1331vec_xstd2(__vector signed short __vec, long __offset, signed short *__ptr) {
1332 __vector signed short V = __vec;
1333 __builtin_memcpy(((char *)__ptr + __offset), &V,
1334 sizeof(__vector signed short));
1335}
1336
1337// This prototype is deprecated.
1338static inline __ATTRS_o_ai void
1339vec_xstd2(__vector unsigned short __vec, long __offset, unsigned short *__ptr) {
1340 __vector unsigned short V = __vec;
1341 __builtin_memcpy(((char *)__ptr + __offset), &V,
1342 sizeof(__vector unsigned short));
1343}
1344
1345// This prototype is deprecated.
1346static inline __ATTRS_o_ai void
1347vec_xstd2(__vector signed int __vec, long __offset, signed int *__ptr) {
1348 __vector signed int V = __vec;
1349 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector signed int));
1350}
1351
1352// This prototype is deprecated.
1353static inline __ATTRS_o_ai void
1354vec_xstd2(__vector unsigned int __vec, long __offset, unsigned int *__ptr) {
1355 __vector unsigned int V = __vec;
1356 __builtin_memcpy(((char *)__ptr + __offset), &V,
1357 sizeof(__vector unsigned int));
1358}
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) {
1364 __vector signed long long V = __vec;
1365 __builtin_memcpy(((char *)__ptr + __offset), &V,
1366 sizeof(__vector signed long long));
1367}
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) {
1373 __vector unsigned long long V = __vec;
1374 __builtin_memcpy(((char *)__ptr + __offset), &V,
1375 sizeof(__vector unsigned long long));
1376}
1377
1378// This prototype is deprecated.
1379static inline __ATTRS_o_ai void
1380vec_xstd2(__vector double __vec, long __offset, double *__ptr) {
1381 __vector double V = __vec;
1382 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector double));
1383}
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) {
1390 __vector signed char V = __vec;
1391 __builtin_memcpy(((char *)__ptr + __offset), &V,
1392 sizeof(__vector signed char));
1393}
1394
1395// This prototype is deprecated.
1396static inline __ATTRS_o_ai void
1397vec_xstw4(__vector unsigned char __vec, long __offset, unsigned char *__ptr) {
1398 __vector unsigned char V = __vec;
1399 __builtin_memcpy(((char *)__ptr + __offset), &V,
1400 sizeof(__vector unsigned char));
1401}
1402
1403// This prototype is deprecated.
1404static inline __ATTRS_o_ai void
1405vec_xstw4(__vector signed short __vec, long __offset, signed short *__ptr) {
1406 __vector signed short V = __vec;
1407 __builtin_memcpy(((char *)__ptr + __offset), &V,
1408 sizeof(__vector signed short));
1409}
1410
1411// This prototype is deprecated.
1412static inline __ATTRS_o_ai void
1413vec_xstw4(__vector unsigned short __vec, long __offset, unsigned short *__ptr) {
1414 __vector unsigned short V = __vec;
1415 __builtin_memcpy(((char *)__ptr + __offset), &V,
1416 sizeof(__vector unsigned short));
1417}
1418
1419// This prototype is deprecated.
1420static inline __ATTRS_o_ai void
1421vec_xstw4(__vector signed int __vec, long __offset, signed int *__ptr) {
1422 __vector signed int V = __vec;
1423 __builtin_memcpy(((char *)__ptr + __offset), &V, sizeof(__vector signed int));
1424}
1425
1426// This prototype is deprecated.
1427static inline __ATTRS_o_ai void
1428vec_xstw4(__vector unsigned int __vec, long __offset, unsigned int *__ptr) {
1429 __vector unsigned int V = __vec;
1430 __builtin_memcpy(((char *)__ptr + __offset), &V,
1431 sizeof(__vector unsigned int));
1432}
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_vlrlr(__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_vstrlr((__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((__vector unsigned char)__a,
2693 (__vector unsigned char)__b, &__cc);
2694 return __cc == 0;
2695}
2696
2697// This prototype is deprecated.
2698static inline __ATTRS_o_ai int
2699vec_all_eq(__vector signed char __a, __vector __bool char __b) {
2700 int __cc;
2701 __builtin_s390_vceqbs((__vector unsigned char)__a,
2702 (__vector unsigned char)__b, &__cc);
2703 return __cc == 0;
2704}
2705
2706// This prototype is deprecated.
2707static inline __ATTRS_o_ai int
2708vec_all_eq(__vector __bool char __a, __vector signed char __b) {
2709 int __cc;
2710 __builtin_s390_vceqbs((__vector unsigned char)__a,
2711 (__vector unsigned char)__b, &__cc);
2712 return __cc == 0;
2713}
2714
2715static inline __ATTRS_o_ai int
2716vec_all_eq(__vector unsigned char __a, __vector unsigned char __b) {
2717 int __cc;
2718 __builtin_s390_vceqbs(__a, __b, &__cc);
2719 return __cc == 0;
2720}
2721
2722// This prototype is deprecated.
2723static inline __ATTRS_o_ai int
2724vec_all_eq(__vector unsigned char __a, __vector __bool char __b) {
2725 int __cc;
2726 __builtin_s390_vceqbs(__a, (__vector unsigned char)__b, &__cc);
2727 return __cc == 0;
2728}
2729
2730// This prototype is deprecated.
2731static inline __ATTRS_o_ai int
2732vec_all_eq(__vector __bool char __a, __vector unsigned char __b) {
2733 int __cc;
2734 __builtin_s390_vceqbs((__vector unsigned char)__a, __b, &__cc);
2735 return __cc == 0;
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 unsigned char)__a,
2742 (__vector unsigned 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((__vector unsigned short)__a,
2750 (__vector unsigned short)__b, &__cc);
2751 return __cc == 0;
2752}
2753
2754// This prototype is deprecated.
2755static inline __ATTRS_o_ai int
2756vec_all_eq(__vector signed short __a, __vector __bool short __b) {
2757 int __cc;
2758 __builtin_s390_vceqhs((__vector unsigned short)__a,
2759 (__vector unsigned short)__b, &__cc);
2760 return __cc == 0;
2761}
2762
2763// This prototype is deprecated.
2764static inline __ATTRS_o_ai int
2765vec_all_eq(__vector __bool short __a, __vector signed short __b) {
2766 int __cc;
2767 __builtin_s390_vceqhs((__vector unsigned short)__a,
2768 (__vector unsigned short)__b, &__cc);
2769 return __cc == 0;
2770}
2771
2772static inline __ATTRS_o_ai int
2773vec_all_eq(__vector unsigned short __a, __vector unsigned short __b) {
2774 int __cc;
2775 __builtin_s390_vceqhs(__a, __b, &__cc);
2776 return __cc == 0;
2777}
2778
2779// This prototype is deprecated.
2780static inline __ATTRS_o_ai int
2781vec_all_eq(__vector unsigned short __a, __vector __bool short __b) {
2782 int __cc;
2783 __builtin_s390_vceqhs(__a, (__vector unsigned short)__b, &__cc);
2784 return __cc == 0;
2785}
2786
2787// This prototype is deprecated.
2788static inline __ATTRS_o_ai int
2789vec_all_eq(__vector __bool short __a, __vector unsigned short __b) {
2790 int __cc;
2791 __builtin_s390_vceqhs((__vector unsigned short)__a, __b, &__cc);
2792 return __cc == 0;
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 unsigned short)__a,
2799 (__vector unsigned 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((__vector unsigned int)__a,
2807 (__vector unsigned int)__b, &__cc);
2808 return __cc == 0;
2809}
2810
2811// This prototype is deprecated.
2812static inline __ATTRS_o_ai int
2813vec_all_eq(__vector signed int __a, __vector __bool int __b) {
2814 int __cc;
2815 __builtin_s390_vceqfs((__vector unsigned int)__a,
2816 (__vector unsigned int)__b, &__cc);
2817 return __cc == 0;
2818}
2819
2820// This prototype is deprecated.
2821static inline __ATTRS_o_ai int
2822vec_all_eq(__vector __bool int __a, __vector signed int __b) {
2823 int __cc;
2824 __builtin_s390_vceqfs((__vector unsigned int)__a,
2825 (__vector unsigned int)__b, &__cc);
2826 return __cc == 0;
2827}
2828
2829static inline __ATTRS_o_ai int
2830vec_all_eq(__vector unsigned int __a, __vector unsigned int __b) {
2831 int __cc;
2832 __builtin_s390_vceqfs(__a, __b, &__cc);
2833 return __cc == 0;
2834}
2835
2836// This prototype is deprecated.
2837static inline __ATTRS_o_ai int
2838vec_all_eq(__vector unsigned int __a, __vector __bool int __b) {
2839 int __cc;
2840 __builtin_s390_vceqfs(__a, (__vector unsigned int)__b, &__cc);
2841 return __cc == 0;
2842}
2843
2844// This prototype is deprecated.
2845static inline __ATTRS_o_ai int
2846vec_all_eq(__vector __bool int __a, __vector unsigned int __b) {
2847 int __cc;
2848 __builtin_s390_vceqfs((__vector unsigned int)__a, __b, &__cc);
2849 return __cc == 0;
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 unsigned int)__a,
2856 (__vector unsigned 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((__vector unsigned long long)__a,
2864 (__vector unsigned long long)__b, &__cc);
2865 return __cc == 0;
2866}
2867
2868// This prototype is deprecated.
2869static inline __ATTRS_o_ai int
2870vec_all_eq(__vector signed long long __a, __vector __bool long long __b) {
2871 int __cc;
2872 __builtin_s390_vceqgs((__vector unsigned long long)__a,
2873 (__vector unsigned long long)__b, &__cc);
2874 return __cc == 0;
2875}
2876
2877// This prototype is deprecated.
2878static inline __ATTRS_o_ai int
2879vec_all_eq(__vector __bool long long __a, __vector signed long long __b) {
2880 int __cc;
2881 __builtin_s390_vceqgs((__vector unsigned long long)__a,
2882 (__vector unsigned long long)__b, &__cc);
2883 return __cc == 0;
2884}
2885
2886static inline __ATTRS_o_ai int
2887vec_all_eq(__vector unsigned long long __a, __vector unsigned long long __b) {
2888 int __cc;
2889 __builtin_s390_vceqgs(__a, __b, &__cc);
2890 return __cc == 0;
2891}
2892
2893// This prototype is deprecated.
2894static inline __ATTRS_o_ai int
2895vec_all_eq(__vector unsigned long long __a, __vector __bool long long __b) {
2896 int __cc;
2897 __builtin_s390_vceqgs(__a, (__vector unsigned long long)__b, &__cc);
2898 return __cc == 0;
2899}
2900
2901// This prototype is deprecated.
2902static inline __ATTRS_o_ai int
2903vec_all_eq(__vector __bool long long __a, __vector unsigned long long __b) {
2904 int __cc;
2905 __builtin_s390_vceqgs((__vector unsigned long long)__a, __b, &__cc);
2906 return __cc == 0;
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 unsigned long long)__a,
2913 (__vector unsigned 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((__vector unsigned char)__a,
2939 (__vector unsigned char)__b, &__cc);
2940 return __cc == 3;
2941}
2942
2943// This prototype is deprecated.
2944static inline __ATTRS_o_ai int
2945vec_all_ne(__vector signed char __a, __vector __bool char __b) {
2946 int __cc;
2947 __builtin_s390_vceqbs((__vector unsigned char)__a,
2948 (__vector unsigned char)__b, &__cc);
2949 return __cc == 3;
2950}
2951
2952// This prototype is deprecated.
2953static inline __ATTRS_o_ai int
2954vec_all_ne(__vector __bool char __a, __vector signed char __b) {
2955 int __cc;
2956 __builtin_s390_vceqbs((__vector unsigned char)__a,
2957 (__vector unsigned char)__b, &__cc);
2958 return __cc == 3;
2959}
2960
2961static inline __ATTRS_o_ai int
2962vec_all_ne(__vector unsigned char __a, __vector unsigned char __b) {
2963 int __cc;
2964 __builtin_s390_vceqbs((__vector unsigned char)__a,
2965 (__vector unsigned char)__b, &__cc);
2966 return __cc == 3;
2967}
2968
2969// This prototype is deprecated.
2970static inline __ATTRS_o_ai int
2971vec_all_ne(__vector unsigned char __a, __vector __bool char __b) {
2972 int __cc;
2973 __builtin_s390_vceqbs(__a, (__vector unsigned char)__b, &__cc);
2974 return __cc == 3;
2975}
2976
2977// This prototype is deprecated.
2978static inline __ATTRS_o_ai int
2979vec_all_ne(__vector __bool char __a, __vector unsigned char __b) {
2980 int __cc;
2981 __builtin_s390_vceqbs((__vector unsigned char)__a, __b, &__cc);
2982 return __cc == 3;
2983}
2984
2985static inline __ATTRS_o_ai int
2986vec_all_ne(__vector __bool char __a, __vector __bool char __b) {
2987 int __cc;
2988 __builtin_s390_vceqbs((__vector unsigned char)__a,
2989 (__vector unsigned char)__b, &__cc);
2990 return __cc == 3;
2991}
2992
2993static inline __ATTRS_o_ai int
2994vec_all_ne(__vector signed short __a, __vector signed short __b) {
2995 int __cc;
2996 __builtin_s390_vceqhs((__vector unsigned short)__a,
2997 (__vector unsigned short)__b, &__cc);
2998 return __cc == 3;
2999}
3000
3001// This prototype is deprecated.
3002static inline __ATTRS_o_ai int
3003vec_all_ne(__vector signed short __a, __vector __bool short __b) {
3004 int __cc;
3005 __builtin_s390_vceqhs((__vector unsigned short)__a,
3006 (__vector unsigned short)__b, &__cc);
3007 return __cc == 3;
3008}
3009
3010// This prototype is deprecated.
3011static inline __ATTRS_o_ai int
3012vec_all_ne(__vector __bool short __a, __vector signed short __b) {
3013 int __cc;
3014 __builtin_s390_vceqhs((__vector unsigned short)__a,
3015 (__vector unsigned short)__b, &__cc);
3016 return __cc == 3;
3017}
3018
3019static inline __ATTRS_o_ai int
3020vec_all_ne(__vector unsigned short __a, __vector unsigned short __b) {
3021 int __cc;
3022 __builtin_s390_vceqhs(__a, __b, &__cc);
3023 return __cc == 3;
3024}
3025
3026// This prototype is deprecated.
3027static inline __ATTRS_o_ai int
3028vec_all_ne(__vector unsigned short __a, __vector __bool short __b) {
3029 int __cc;
3030 __builtin_s390_vceqhs(__a, (__vector unsigned short)__b, &__cc);
3031 return __cc == 3;
3032}
3033
3034// This prototype is deprecated.
3035static inline __ATTRS_o_ai int
3036vec_all_ne(__vector __bool short __a, __vector unsigned short __b) {
3037 int __cc;
3038 __builtin_s390_vceqhs((__vector unsigned short)__a, __b, &__cc);
3039 return __cc == 3;
3040}
3041
3042static inline __ATTRS_o_ai int
3043vec_all_ne(__vector __bool short __a, __vector __bool short __b) {
3044 int __cc;
3045 __builtin_s390_vceqhs((__vector unsigned short)__a,
3046 (__vector unsigned short)__b, &__cc);
3047 return __cc == 3;
3048}
3049
3050static inline __ATTRS_o_ai int
3051vec_all_ne(__vector signed int __a, __vector signed int __b) {
3052 int __cc;
3053 __builtin_s390_vceqfs((__vector unsigned int)__a,
3054 (__vector unsigned int)__b, &__cc);
3055 return __cc == 3;
3056}
3057
3058// This prototype is deprecated.
3059static inline __ATTRS_o_ai int
3060vec_all_ne(__vector signed int __a, __vector __bool int __b) {
3061 int __cc;
3062 __builtin_s390_vceqfs((__vector unsigned int)__a,
3063 (__vector unsigned int)__b, &__cc);
3064 return __cc == 3;
3065}
3066
3067// This prototype is deprecated.
3068static inline __ATTRS_o_ai int
3069vec_all_ne(__vector __bool int __a, __vector signed int __b) {
3070 int __cc;
3071 __builtin_s390_vceqfs((__vector unsigned int)__a,
3072 (__vector unsigned int)__b, &__cc);
3073 return __cc == 3;
3074}
3075
3076static inline __ATTRS_o_ai int
3077vec_all_ne(__vector unsigned int __a, __vector unsigned int __b) {
3078 int __cc;
3079 __builtin_s390_vceqfs(__a, __b, &__cc);
3080 return __cc == 3;
3081}
3082
3083// This prototype is deprecated.
3084static inline __ATTRS_o_ai int
3085vec_all_ne(__vector unsigned int __a, __vector __bool int __b) {
3086 int __cc;
3087 __builtin_s390_vceqfs(__a, (__vector unsigned int)__b, &__cc);
3088 return __cc == 3;
3089}
3090
3091// This prototype is deprecated.
3092static inline __ATTRS_o_ai int
3093vec_all_ne(__vector __bool int __a, __vector unsigned int __b) {
3094 int __cc;
3095 __builtin_s390_vceqfs((__vector unsigned int)__a, __b, &__cc);
3096 return __cc == 3;
3097}
3098
3099static inline __ATTRS_o_ai int
3100vec_all_ne(__vector __bool int __a, __vector __bool int __b) {
3101 int __cc;
3102 __builtin_s390_vceqfs((__vector unsigned int)__a,
3103 (__vector unsigned int)__b, &__cc);
3104 return __cc == 3;
3105}
3106
3107static inline __ATTRS_o_ai int
3108vec_all_ne(__vector signed long long __a, __vector signed long long __b) {
3109 int __cc;
3110 __builtin_s390_vceqgs((__vector unsigned long long)__a,
3111 (__vector unsigned long long)__b, &__cc);
3112 return __cc == 3;
3113}
3114
3115// This prototype is deprecated.
3116static inline __ATTRS_o_ai int
3117vec_all_ne(__vector signed long long __a, __vector __bool long long __b) {
3118 int __cc;
3119 __builtin_s390_vceqgs((__vector unsigned long long)__a,
3120 (__vector unsigned long long)__b, &__cc);
3121 return __cc == 3;
3122}
3123
3124// This prototype is deprecated.
3125static inline __ATTRS_o_ai int
3126vec_all_ne(__vector __bool long long __a, __vector signed long long __b) {
3127 int __cc;
3128 __builtin_s390_vceqgs((__vector unsigned long long)__a,
3129 (__vector unsigned long long)__b, &__cc);
3130 return __cc == 3;
3131}
3132
3133static inline __ATTRS_o_ai int
3134vec_all_ne(__vector unsigned long long __a, __vector unsigned long long __b) {
3135 int __cc;
3136 __builtin_s390_vceqgs(__a, __b, &__cc);
3137 return __cc == 3;
3138}
3139
3140// This prototype is deprecated.
3141static inline __ATTRS_o_ai int
3142vec_all_ne(__vector unsigned long long __a, __vector __bool long long __b) {
3143 int __cc;
3144 __builtin_s390_vceqgs(__a, (__vector unsigned long long)__b, &__cc);
3145 return __cc == 3;
3146}
3147
3148// This prototype is deprecated.
3149static inline __ATTRS_o_ai int
3150vec_all_ne(__vector __bool long long __a, __vector unsigned long long __b) {
3151 int __cc;
3152 __builtin_s390_vceqgs((__vector unsigned long long)__a, __b, &__cc);
3153 return __cc == 3;
3154}
3155
3156static inline __ATTRS_o_ai int
3157vec_all_ne(__vector __bool long long __a, __vector __bool long long __b) {
3158 int __cc;
3159 __builtin_s390_vceqgs((__vector unsigned long long)__a,
3160 (__vector unsigned long long)__b, &__cc);
3161 return __cc == 3;
3162}
3163
3164#if __ARCH__ >= 12
3165static inline __ATTRS_o_ai int
3166vec_all_ne(__vector float __a, __vector float __b) {
3167 int __cc;
3168 __builtin_s390_vfcesbs(__a, __b, &__cc);
3169 return __cc == 3;
3170}
3171#endif
3172
3173static inline __ATTRS_o_ai int
3174vec_all_ne(__vector double __a, __vector double __b) {
3175 int __cc;
3176 __builtin_s390_vfcedbs(__a, __b, &__cc);
3177 return __cc == 3;
3178}
3179
3180/*-- vec_all_ge -------------------------------------------------------------*/
3181
3182static inline __ATTRS_o_ai int
3183vec_all_ge(__vector signed char __a, __vector signed char __b) {
3184 int __cc;
3185 __builtin_s390_vchbs(__b, __a, &__cc);
3186 return __cc == 3;
3187}
3188
3189// This prototype is deprecated.
3190static inline __ATTRS_o_ai int
3191vec_all_ge(__vector signed char __a, __vector __bool char __b) {
3192 int __cc;
3193 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
3194 return __cc == 3;
3195}
3196
3197// This prototype is deprecated.
3198static inline __ATTRS_o_ai int
3199vec_all_ge(__vector __bool char __a, __vector signed char __b) {
3200 int __cc;
3201 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
3202 return __cc == 3;
3203}
3204
3205static inline __ATTRS_o_ai int
3206vec_all_ge(__vector unsigned char __a, __vector unsigned char __b) {
3207 int __cc;
3208 __builtin_s390_vchlbs(__b, __a, &__cc);
3209 return __cc == 3;
3210}
3211
3212// This prototype is deprecated.
3213static inline __ATTRS_o_ai int
3214vec_all_ge(__vector unsigned char __a, __vector __bool char __b) {
3215 int __cc;
3216 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
3217 return __cc == 3;
3218}
3219
3220// This prototype is deprecated.
3221static inline __ATTRS_o_ai int
3222vec_all_ge(__vector __bool char __a, __vector unsigned char __b) {
3223 int __cc;
3224 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
3225 return __cc == 3;
3226}
3227
3228// This prototype is deprecated.
3229static inline __ATTRS_o_ai int
3230vec_all_ge(__vector __bool char __a, __vector __bool char __b) {
3231 int __cc;
3232 __builtin_s390_vchlbs((__vector unsigned char)__b,
3233 (__vector unsigned char)__a, &__cc);
3234 return __cc == 3;
3235}
3236
3237static inline __ATTRS_o_ai int
3238vec_all_ge(__vector signed short __a, __vector signed short __b) {
3239 int __cc;
3240 __builtin_s390_vchhs(__b, __a, &__cc);
3241 return __cc == 3;
3242}
3243
3244// This prototype is deprecated.
3245static inline __ATTRS_o_ai int
3246vec_all_ge(__vector signed short __a, __vector __bool short __b) {
3247 int __cc;
3248 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
3249 return __cc == 3;
3250}
3251
3252// This prototype is deprecated.
3253static inline __ATTRS_o_ai int
3254vec_all_ge(__vector __bool short __a, __vector signed short __b) {
3255 int __cc;
3256 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
3257 return __cc == 3;
3258}
3259
3260static inline __ATTRS_o_ai int
3261vec_all_ge(__vector unsigned short __a, __vector unsigned short __b) {
3262 int __cc;
3263 __builtin_s390_vchlhs(__b, __a, &__cc);
3264 return __cc == 3;
3265}
3266
3267// This prototype is deprecated.
3268static inline __ATTRS_o_ai int
3269vec_all_ge(__vector unsigned short __a, __vector __bool short __b) {
3270 int __cc;
3271 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
3272 return __cc == 3;
3273}
3274
3275// This prototype is deprecated.
3276static inline __ATTRS_o_ai int
3277vec_all_ge(__vector __bool short __a, __vector unsigned short __b) {
3278 int __cc;
3279 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
3280 return __cc == 3;
3281}
3282
3283// This prototype is deprecated.
3284static inline __ATTRS_o_ai int
3285vec_all_ge(__vector __bool short __a, __vector __bool short __b) {
3286 int __cc;
3287 __builtin_s390_vchlhs((__vector unsigned short)__b,
3288 (__vector unsigned short)__a, &__cc);
3289 return __cc == 3;
3290}
3291
3292static inline __ATTRS_o_ai int
3293vec_all_ge(__vector signed int __a, __vector signed int __b) {
3294 int __cc;
3295 __builtin_s390_vchfs(__b, __a, &__cc);
3296 return __cc == 3;
3297}
3298
3299// This prototype is deprecated.
3300static inline __ATTRS_o_ai int
3301vec_all_ge(__vector signed int __a, __vector __bool int __b) {
3302 int __cc;
3303 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
3304 return __cc == 3;
3305}
3306
3307// This prototype is deprecated.
3308static inline __ATTRS_o_ai int
3309vec_all_ge(__vector __bool int __a, __vector signed int __b) {
3310 int __cc;
3311 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
3312 return __cc == 3;
3313}
3314
3315static inline __ATTRS_o_ai int
3316vec_all_ge(__vector unsigned int __a, __vector unsigned int __b) {
3317 int __cc;
3318 __builtin_s390_vchlfs(__b, __a, &__cc);
3319 return __cc == 3;
3320}
3321
3322// This prototype is deprecated.
3323static inline __ATTRS_o_ai int
3324vec_all_ge(__vector unsigned int __a, __vector __bool int __b) {
3325 int __cc;
3326 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
3327 return __cc == 3;
3328}
3329
3330// This prototype is deprecated.
3331static inline __ATTRS_o_ai int
3332vec_all_ge(__vector __bool int __a, __vector unsigned int __b) {
3333 int __cc;
3334 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
3335 return __cc == 3;
3336}
3337
3338// This prototype is deprecated.
3339static inline __ATTRS_o_ai int
3340vec_all_ge(__vector __bool int __a, __vector __bool int __b) {
3341 int __cc;
3342 __builtin_s390_vchlfs((__vector unsigned int)__b,
3343 (__vector unsigned int)__a, &__cc);
3344 return __cc == 3;
3345}
3346
3347static inline __ATTRS_o_ai int
3348vec_all_ge(__vector signed long long __a, __vector signed long long __b) {
3349 int __cc;
3350 __builtin_s390_vchgs(__b, __a, &__cc);
3351 return __cc == 3;
3352}
3353
3354// This prototype is deprecated.
3355static inline __ATTRS_o_ai int
3356vec_all_ge(__vector signed long long __a, __vector __bool long long __b) {
3357 int __cc;
3358 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
3359 return __cc == 3;
3360}
3361
3362// This prototype is deprecated.
3363static inline __ATTRS_o_ai int
3364vec_all_ge(__vector __bool long long __a, __vector signed long long __b) {
3365 int __cc;
3366 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
3367 return __cc == 3;
3368}
3369
3370static inline __ATTRS_o_ai int
3371vec_all_ge(__vector unsigned long long __a, __vector unsigned long long __b) {
3372 int __cc;
3373 __builtin_s390_vchlgs(__b, __a, &__cc);
3374 return __cc == 3;
3375}
3376
3377// This prototype is deprecated.
3378static inline __ATTRS_o_ai int
3379vec_all_ge(__vector unsigned long long __a, __vector __bool long long __b) {
3380 int __cc;
3381 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
3382 return __cc == 3;
3383}
3384
3385// This prototype is deprecated.
3386static inline __ATTRS_o_ai int
3387vec_all_ge(__vector __bool long long __a, __vector unsigned long long __b) {
3388 int __cc;
3389 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
3390 return __cc == 3;
3391}
3392
3393// This prototype is deprecated.
3394static inline __ATTRS_o_ai int
3395vec_all_ge(__vector __bool long long __a, __vector __bool long long __b) {
3396 int __cc;
3397 __builtin_s390_vchlgs((__vector unsigned long long)__b,
3398 (__vector unsigned long long)__a, &__cc);
3399 return __cc == 3;
3400}
3401
3402#if __ARCH__ >= 12
3403static inline __ATTRS_o_ai int
3404vec_all_ge(__vector float __a, __vector float __b) {
3405 int __cc;
3406 __builtin_s390_vfchesbs(__a, __b, &__cc);
3407 return __cc == 0;
3408}
3409#endif
3410
3411static inline __ATTRS_o_ai int
3412vec_all_ge(__vector double __a, __vector double __b) {
3413 int __cc;
3414 __builtin_s390_vfchedbs(__a, __b, &__cc);
3415 return __cc == 0;
3416}
3417
3418/*-- vec_all_gt -------------------------------------------------------------*/
3419
3420static inline __ATTRS_o_ai int
3421vec_all_gt(__vector signed char __a, __vector signed char __b) {
3422 int __cc;
3423 __builtin_s390_vchbs(__a, __b, &__cc);
3424 return __cc == 0;
3425}
3426
3427// This prototype is deprecated.
3428static inline __ATTRS_o_ai int
3429vec_all_gt(__vector signed char __a, __vector __bool char __b) {
3430 int __cc;
3431 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
3432 return __cc == 0;
3433}
3434
3435// This prototype is deprecated.
3436static inline __ATTRS_o_ai int
3437vec_all_gt(__vector __bool char __a, __vector signed char __b) {
3438 int __cc;
3439 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
3440 return __cc == 0;
3441}
3442
3443static inline __ATTRS_o_ai int
3444vec_all_gt(__vector unsigned char __a, __vector unsigned char __b) {
3445 int __cc;
3446 __builtin_s390_vchlbs(__a, __b, &__cc);
3447 return __cc == 0;
3448}
3449
3450// This prototype is deprecated.
3451static inline __ATTRS_o_ai int
3452vec_all_gt(__vector unsigned char __a, __vector __bool char __b) {
3453 int __cc;
3454 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
3455 return __cc == 0;
3456}
3457
3458// This prototype is deprecated.
3459static inline __ATTRS_o_ai int
3460vec_all_gt(__vector __bool char __a, __vector unsigned char __b) {
3461 int __cc;
3462 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
3463 return __cc == 0;
3464}
3465
3466// This prototype is deprecated.
3467static inline __ATTRS_o_ai int
3468vec_all_gt(__vector __bool char __a, __vector __bool char __b) {
3469 int __cc;
3470 __builtin_s390_vchlbs((__vector unsigned char)__a,
3471 (__vector unsigned char)__b, &__cc);
3472 return __cc == 0;
3473}
3474
3475static inline __ATTRS_o_ai int
3476vec_all_gt(__vector signed short __a, __vector signed short __b) {
3477 int __cc;
3478 __builtin_s390_vchhs(__a, __b, &__cc);
3479 return __cc == 0;
3480}
3481
3482// This prototype is deprecated.
3483static inline __ATTRS_o_ai int
3484vec_all_gt(__vector signed short __a, __vector __bool short __b) {
3485 int __cc;
3486 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
3487 return __cc == 0;
3488}
3489
3490// This prototype is deprecated.
3491static inline __ATTRS_o_ai int
3492vec_all_gt(__vector __bool short __a, __vector signed short __b) {
3493 int __cc;
3494 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
3495 return __cc == 0;
3496}
3497
3498static inline __ATTRS_o_ai int
3499vec_all_gt(__vector unsigned short __a, __vector unsigned short __b) {
3500 int __cc;
3501 __builtin_s390_vchlhs(__a, __b, &__cc);
3502 return __cc == 0;
3503}
3504
3505// This prototype is deprecated.
3506static inline __ATTRS_o_ai int
3507vec_all_gt(__vector unsigned short __a, __vector __bool short __b) {
3508 int __cc;
3509 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
3510 return __cc == 0;
3511}
3512
3513// This prototype is deprecated.
3514static inline __ATTRS_o_ai int
3515vec_all_gt(__vector __bool short __a, __vector unsigned short __b) {
3516 int __cc;
3517 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
3518 return __cc == 0;
3519}
3520
3521// This prototype is deprecated.
3522static inline __ATTRS_o_ai int
3523vec_all_gt(__vector __bool short __a, __vector __bool short __b) {
3524 int __cc;
3525 __builtin_s390_vchlhs((__vector unsigned short)__a,
3526 (__vector unsigned short)__b, &__cc);
3527 return __cc == 0;
3528}
3529
3530static inline __ATTRS_o_ai int
3531vec_all_gt(__vector signed int __a, __vector signed int __b) {
3532 int __cc;
3533 __builtin_s390_vchfs(__a, __b, &__cc);
3534 return __cc == 0;
3535}
3536
3537// This prototype is deprecated.
3538static inline __ATTRS_o_ai int
3539vec_all_gt(__vector signed int __a, __vector __bool int __b) {
3540 int __cc;
3541 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
3542 return __cc == 0;
3543}
3544
3545// This prototype is deprecated.
3546static inline __ATTRS_o_ai int
3547vec_all_gt(__vector __bool int __a, __vector signed int __b) {
3548 int __cc;
3549 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
3550 return __cc == 0;
3551}
3552
3553static inline __ATTRS_o_ai int
3554vec_all_gt(__vector unsigned int __a, __vector unsigned int __b) {
3555 int __cc;
3556 __builtin_s390_vchlfs(__a, __b, &__cc);
3557 return __cc == 0;
3558}
3559
3560// This prototype is deprecated.
3561static inline __ATTRS_o_ai int
3562vec_all_gt(__vector unsigned int __a, __vector __bool int __b) {
3563 int __cc;
3564 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
3565 return __cc == 0;
3566}
3567
3568// This prototype is deprecated.
3569static inline __ATTRS_o_ai int
3570vec_all_gt(__vector __bool int __a, __vector unsigned int __b) {
3571 int __cc;
3572 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
3573 return __cc == 0;
3574}
3575
3576// This prototype is deprecated.
3577static inline __ATTRS_o_ai int
3578vec_all_gt(__vector __bool int __a, __vector __bool int __b) {
3579 int __cc;
3580 __builtin_s390_vchlfs((__vector unsigned int)__a,
3581 (__vector unsigned int)__b, &__cc);
3582 return __cc == 0;
3583}
3584
3585static inline __ATTRS_o_ai int
3586vec_all_gt(__vector signed long long __a, __vector signed long long __b) {
3587 int __cc;
3588 __builtin_s390_vchgs(__a, __b, &__cc);
3589 return __cc == 0;
3590}
3591
3592// This prototype is deprecated.
3593static inline __ATTRS_o_ai int
3594vec_all_gt(__vector signed long long __a, __vector __bool long long __b) {
3595 int __cc;
3596 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
3597 return __cc == 0;
3598}
3599
3600// This prototype is deprecated.
3601static inline __ATTRS_o_ai int
3602vec_all_gt(__vector __bool long long __a, __vector signed long long __b) {
3603 int __cc;
3604 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
3605 return __cc == 0;
3606}
3607
3608static inline __ATTRS_o_ai int
3609vec_all_gt(__vector unsigned long long __a, __vector unsigned long long __b) {
3610 int __cc;
3611 __builtin_s390_vchlgs(__a, __b, &__cc);
3612 return __cc == 0;
3613}
3614
3615// This prototype is deprecated.
3616static inline __ATTRS_o_ai int
3617vec_all_gt(__vector unsigned long long __a, __vector __bool long long __b) {
3618 int __cc;
3619 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
3620 return __cc == 0;
3621}
3622
3623// This prototype is deprecated.
3624static inline __ATTRS_o_ai int
3625vec_all_gt(__vector __bool long long __a, __vector unsigned long long __b) {
3626 int __cc;
3627 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
3628 return __cc == 0;
3629}
3630
3631// This prototype is deprecated.
3632static inline __ATTRS_o_ai int
3633vec_all_gt(__vector __bool long long __a, __vector __bool long long __b) {
3634 int __cc;
3635 __builtin_s390_vchlgs((__vector unsigned long long)__a,
3636 (__vector unsigned long long)__b, &__cc);
3637 return __cc == 0;
3638}
3639
3640#if __ARCH__ >= 12
3641static inline __ATTRS_o_ai int
3642vec_all_gt(__vector float __a, __vector float __b) {
3643 int __cc;
3644 __builtin_s390_vfchsbs(__a, __b, &__cc);
3645 return __cc == 0;
3646}
3647#endif
3648
3649static inline __ATTRS_o_ai int
3650vec_all_gt(__vector double __a, __vector double __b) {
3651 int __cc;
3652 __builtin_s390_vfchdbs(__a, __b, &__cc);
3653 return __cc == 0;
3654}
3655
3656/*-- vec_all_le -------------------------------------------------------------*/
3657
3658static inline __ATTRS_o_ai int
3659vec_all_le(__vector signed char __a, __vector signed char __b) {
3660 int __cc;
3661 __builtin_s390_vchbs(__a, __b, &__cc);
3662 return __cc == 3;
3663}
3664
3665// This prototype is deprecated.
3666static inline __ATTRS_o_ai int
3667vec_all_le(__vector signed char __a, __vector __bool char __b) {
3668 int __cc;
3669 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
3670 return __cc == 3;
3671}
3672
3673// This prototype is deprecated.
3674static inline __ATTRS_o_ai int
3675vec_all_le(__vector __bool char __a, __vector signed char __b) {
3676 int __cc;
3677 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
3678 return __cc == 3;
3679}
3680
3681static inline __ATTRS_o_ai int
3682vec_all_le(__vector unsigned char __a, __vector unsigned char __b) {
3683 int __cc;
3684 __builtin_s390_vchlbs(__a, __b, &__cc);
3685 return __cc == 3;
3686}
3687
3688// This prototype is deprecated.
3689static inline __ATTRS_o_ai int
3690vec_all_le(__vector unsigned char __a, __vector __bool char __b) {
3691 int __cc;
3692 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
3693 return __cc == 3;
3694}
3695
3696// This prototype is deprecated.
3697static inline __ATTRS_o_ai int
3698vec_all_le(__vector __bool char __a, __vector unsigned char __b) {
3699 int __cc;
3700 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
3701 return __cc == 3;
3702}
3703
3704// This prototype is deprecated.
3705static inline __ATTRS_o_ai int
3706vec_all_le(__vector __bool char __a, __vector __bool char __b) {
3707 int __cc;
3708 __builtin_s390_vchlbs((__vector unsigned char)__a,
3709 (__vector unsigned char)__b, &__cc);
3710 return __cc == 3;
3711}
3712
3713static inline __ATTRS_o_ai int
3714vec_all_le(__vector signed short __a, __vector signed short __b) {
3715 int __cc;
3716 __builtin_s390_vchhs(__a, __b, &__cc);
3717 return __cc == 3;
3718}
3719
3720// This prototype is deprecated.
3721static inline __ATTRS_o_ai int
3722vec_all_le(__vector signed short __a, __vector __bool short __b) {
3723 int __cc;
3724 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
3725 return __cc == 3;
3726}
3727
3728// This prototype is deprecated.
3729static inline __ATTRS_o_ai int
3730vec_all_le(__vector __bool short __a, __vector signed short __b) {
3731 int __cc;
3732 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
3733 return __cc == 3;
3734}
3735
3736static inline __ATTRS_o_ai int
3737vec_all_le(__vector unsigned short __a, __vector unsigned short __b) {
3738 int __cc;
3739 __builtin_s390_vchlhs(__a, __b, &__cc);
3740 return __cc == 3;
3741}
3742
3743// This prototype is deprecated.
3744static inline __ATTRS_o_ai int
3745vec_all_le(__vector unsigned short __a, __vector __bool short __b) {
3746 int __cc;
3747 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
3748 return __cc == 3;
3749}
3750
3751// This prototype is deprecated.
3752static inline __ATTRS_o_ai int
3753vec_all_le(__vector __bool short __a, __vector unsigned short __b) {
3754 int __cc;
3755 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
3756 return __cc == 3;
3757}
3758
3759// This prototype is deprecated.
3760static inline __ATTRS_o_ai int
3761vec_all_le(__vector __bool short __a, __vector __bool short __b) {
3762 int __cc;
3763 __builtin_s390_vchlhs((__vector unsigned short)__a,
3764 (__vector unsigned short)__b, &__cc);
3765 return __cc == 3;
3766}
3767
3768static inline __ATTRS_o_ai int
3769vec_all_le(__vector signed int __a, __vector signed int __b) {
3770 int __cc;
3771 __builtin_s390_vchfs(__a, __b, &__cc);
3772 return __cc == 3;
3773}
3774
3775// This prototype is deprecated.
3776static inline __ATTRS_o_ai int
3777vec_all_le(__vector signed int __a, __vector __bool int __b) {
3778 int __cc;
3779 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
3780 return __cc == 3;
3781}
3782
3783// This prototype is deprecated.
3784static inline __ATTRS_o_ai int
3785vec_all_le(__vector __bool int __a, __vector signed int __b) {
3786 int __cc;
3787 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
3788 return __cc == 3;
3789}
3790
3791static inline __ATTRS_o_ai int
3792vec_all_le(__vector unsigned int __a, __vector unsigned int __b) {
3793 int __cc;
3794 __builtin_s390_vchlfs(__a, __b, &__cc);
3795 return __cc == 3;
3796}
3797
3798// This prototype is deprecated.
3799static inline __ATTRS_o_ai int
3800vec_all_le(__vector unsigned int __a, __vector __bool int __b) {
3801 int __cc;
3802 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
3803 return __cc == 3;
3804}
3805
3806// This prototype is deprecated.
3807static inline __ATTRS_o_ai int
3808vec_all_le(__vector __bool int __a, __vector unsigned int __b) {
3809 int __cc;
3810 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
3811 return __cc == 3;
3812}
3813
3814// This prototype is deprecated.
3815static inline __ATTRS_o_ai int
3816vec_all_le(__vector __bool int __a, __vector __bool int __b) {
3817 int __cc;
3818 __builtin_s390_vchlfs((__vector unsigned int)__a,
3819 (__vector unsigned int)__b, &__cc);
3820 return __cc == 3;
3821}
3822
3823static inline __ATTRS_o_ai int
3824vec_all_le(__vector signed long long __a, __vector signed long long __b) {
3825 int __cc;
3826 __builtin_s390_vchgs(__a, __b, &__cc);
3827 return __cc == 3;
3828}
3829
3830// This prototype is deprecated.
3831static inline __ATTRS_o_ai int
3832vec_all_le(__vector signed long long __a, __vector __bool long long __b) {
3833 int __cc;
3834 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
3835 return __cc == 3;
3836}
3837
3838// This prototype is deprecated.
3839static inline __ATTRS_o_ai int
3840vec_all_le(__vector __bool long long __a, __vector signed long long __b) {
3841 int __cc;
3842 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
3843 return __cc == 3;
3844}
3845
3846static inline __ATTRS_o_ai int
3847vec_all_le(__vector unsigned long long __a, __vector unsigned long long __b) {
3848 int __cc;
3849 __builtin_s390_vchlgs(__a, __b, &__cc);
3850 return __cc == 3;
3851}
3852
3853// This prototype is deprecated.
3854static inline __ATTRS_o_ai int
3855vec_all_le(__vector unsigned long long __a, __vector __bool long long __b) {
3856 int __cc;
3857 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
3858 return __cc == 3;
3859}
3860
3861// This prototype is deprecated.
3862static inline __ATTRS_o_ai int
3863vec_all_le(__vector __bool long long __a, __vector unsigned long long __b) {
3864 int __cc;
3865 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
3866 return __cc == 3;
3867}
3868
3869// This prototype is deprecated.
3870static inline __ATTRS_o_ai int
3871vec_all_le(__vector __bool long long __a, __vector __bool long long __b) {
3872 int __cc;
3873 __builtin_s390_vchlgs((__vector unsigned long long)__a,
3874 (__vector unsigned long long)__b, &__cc);
3875 return __cc == 3;
3876}
3877
3878#if __ARCH__ >= 12
3879static inline __ATTRS_o_ai int
3880vec_all_le(__vector float __a, __vector float __b) {
3881 int __cc;
3882 __builtin_s390_vfchesbs(__b, __a, &__cc);
3883 return __cc == 0;
3884}
3885#endif
3886
3887static inline __ATTRS_o_ai int
3888vec_all_le(__vector double __a, __vector double __b) {
3889 int __cc;
3890 __builtin_s390_vfchedbs(__b, __a, &__cc);
3891 return __cc == 0;
3892}
3893
3894/*-- vec_all_lt -------------------------------------------------------------*/
3895
3896static inline __ATTRS_o_ai int
3897vec_all_lt(__vector signed char __a, __vector signed char __b) {
3898 int __cc;
3899 __builtin_s390_vchbs(__b, __a, &__cc);
3900 return __cc == 0;
3901}
3902
3903// This prototype is deprecated.
3904static inline __ATTRS_o_ai int
3905vec_all_lt(__vector signed char __a, __vector __bool char __b) {
3906 int __cc;
3907 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
3908 return __cc == 0;
3909}
3910
3911// This prototype is deprecated.
3912static inline __ATTRS_o_ai int
3913vec_all_lt(__vector __bool char __a, __vector signed char __b) {
3914 int __cc;
3915 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
3916 return __cc == 0;
3917}
3918
3919static inline __ATTRS_o_ai int
3920vec_all_lt(__vector unsigned char __a, __vector unsigned char __b) {
3921 int __cc;
3922 __builtin_s390_vchlbs(__b, __a, &__cc);
3923 return __cc == 0;
3924}
3925
3926// This prototype is deprecated.
3927static inline __ATTRS_o_ai int
3928vec_all_lt(__vector unsigned char __a, __vector __bool char __b) {
3929 int __cc;
3930 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
3931 return __cc == 0;
3932}
3933
3934// This prototype is deprecated.
3935static inline __ATTRS_o_ai int
3936vec_all_lt(__vector __bool char __a, __vector unsigned char __b) {
3937 int __cc;
3938 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
3939 return __cc == 0;
3940}
3941
3942// This prototype is deprecated.
3943static inline __ATTRS_o_ai int
3944vec_all_lt(__vector __bool char __a, __vector __bool char __b) {
3945 int __cc;
3946 __builtin_s390_vchlbs((__vector unsigned char)__b,
3947 (__vector unsigned char)__a, &__cc);
3948 return __cc == 0;
3949}
3950
3951static inline __ATTRS_o_ai int
3952vec_all_lt(__vector signed short __a, __vector signed short __b) {
3953 int __cc;
3954 __builtin_s390_vchhs(__b, __a, &__cc);
3955 return __cc == 0;
3956}
3957
3958// This prototype is deprecated.
3959static inline __ATTRS_o_ai int
3960vec_all_lt(__vector signed short __a, __vector __bool short __b) {
3961 int __cc;
3962 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
3963 return __cc == 0;
3964}
3965
3966// This prototype is deprecated.
3967static inline __ATTRS_o_ai int
3968vec_all_lt(__vector __bool short __a, __vector signed short __b) {
3969 int __cc;
3970 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
3971 return __cc == 0;
3972}
3973
3974static inline __ATTRS_o_ai int
3975vec_all_lt(__vector unsigned short __a, __vector unsigned short __b) {
3976 int __cc;
3977 __builtin_s390_vchlhs(__b, __a, &__cc);
3978 return __cc == 0;
3979}
3980
3981// This prototype is deprecated.
3982static inline __ATTRS_o_ai int
3983vec_all_lt(__vector unsigned short __a, __vector __bool short __b) {
3984 int __cc;
3985 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
3986 return __cc == 0;
3987}
3988
3989// This prototype is deprecated.
3990static inline __ATTRS_o_ai int
3991vec_all_lt(__vector __bool short __a, __vector unsigned short __b) {
3992 int __cc;
3993 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
3994 return __cc == 0;
3995}
3996
3997// This prototype is deprecated.
3998static inline __ATTRS_o_ai int
3999vec_all_lt(__vector __bool short __a, __vector __bool short __b) {
4000 int __cc;
4001 __builtin_s390_vchlhs((__vector unsigned short)__b,
4002 (__vector unsigned short)__a, &__cc);
4003 return __cc == 0;
4004}
4005
4006static inline __ATTRS_o_ai int
4007vec_all_lt(__vector signed int __a, __vector signed int __b) {
4008 int __cc;
4009 __builtin_s390_vchfs(__b, __a, &__cc);
4010 return __cc == 0;
4011}
4012
4013// This prototype is deprecated.
4014static inline __ATTRS_o_ai int
4015vec_all_lt(__vector signed int __a, __vector __bool int __b) {
4016 int __cc;
4017 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
4018 return __cc == 0;
4019}
4020
4021// This prototype is deprecated.
4022static inline __ATTRS_o_ai int
4023vec_all_lt(__vector __bool int __a, __vector signed int __b) {
4024 int __cc;
4025 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
4026 return __cc == 0;
4027}
4028
4029static inline __ATTRS_o_ai int
4030vec_all_lt(__vector unsigned int __a, __vector unsigned int __b) {
4031 int __cc;
4032 __builtin_s390_vchlfs(__b, __a, &__cc);
4033 return __cc == 0;
4034}
4035
4036// This prototype is deprecated.
4037static inline __ATTRS_o_ai int
4038vec_all_lt(__vector unsigned int __a, __vector __bool int __b) {
4039 int __cc;
4040 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
4041 return __cc == 0;
4042}
4043
4044// This prototype is deprecated.
4045static inline __ATTRS_o_ai int
4046vec_all_lt(__vector __bool int __a, __vector unsigned int __b) {
4047 int __cc;
4048 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
4049 return __cc == 0;
4050}
4051
4052// This prototype is deprecated.
4053static inline __ATTRS_o_ai int
4054vec_all_lt(__vector __bool int __a, __vector __bool int __b) {
4055 int __cc;
4056 __builtin_s390_vchlfs((__vector unsigned int)__b,
4057 (__vector unsigned int)__a, &__cc);
4058 return __cc == 0;
4059}
4060
4061static inline __ATTRS_o_ai int
4062vec_all_lt(__vector signed long long __a, __vector signed long long __b) {
4063 int __cc;
4064 __builtin_s390_vchgs(__b, __a, &__cc);
4065 return __cc == 0;
4066}
4067
4068// This prototype is deprecated.
4069static inline __ATTRS_o_ai int
4070vec_all_lt(__vector signed long long __a, __vector __bool long long __b) {
4071 int __cc;
4072 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
4073 return __cc == 0;
4074}
4075
4076// This prototype is deprecated.
4077static inline __ATTRS_o_ai int
4078vec_all_lt(__vector __bool long long __a, __vector signed long long __b) {
4079 int __cc;
4080 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
4081 return __cc == 0;
4082}
4083
4084static inline __ATTRS_o_ai int
4085vec_all_lt(__vector unsigned long long __a, __vector unsigned long long __b) {
4086 int __cc;
4087 __builtin_s390_vchlgs(__b, __a, &__cc);
4088 return __cc == 0;
4089}
4090
4091// This prototype is deprecated.
4092static inline __ATTRS_o_ai int
4093vec_all_lt(__vector unsigned long long __a, __vector __bool long long __b) {
4094 int __cc;
4095 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
4096 return __cc == 0;
4097}
4098
4099// This prototype is deprecated.
4100static inline __ATTRS_o_ai int
4101vec_all_lt(__vector __bool long long __a, __vector unsigned long long __b) {
4102 int __cc;
4103 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
4104 return __cc == 0;
4105}
4106
4107// This prototype is deprecated.
4108static inline __ATTRS_o_ai int
4109vec_all_lt(__vector __bool long long __a, __vector __bool long long __b) {
4110 int __cc;
4111 __builtin_s390_vchlgs((__vector unsigned long long)__b,
4112 (__vector unsigned long long)__a, &__cc);
4113 return __cc == 0;
4114}
4115
4116#if __ARCH__ >= 12
4117static inline __ATTRS_o_ai int
4118vec_all_lt(__vector float __a, __vector float __b) {
4119 int __cc;
4120 __builtin_s390_vfchsbs(__b, __a, &__cc);
4121 return __cc == 0;
4122}
4123#endif
4124
4125static inline __ATTRS_o_ai int
4126vec_all_lt(__vector double __a, __vector double __b) {
4127 int __cc;
4128 __builtin_s390_vfchdbs(__b, __a, &__cc);
4129 return __cc == 0;
4130}
4131
4132/*-- vec_all_nge ------------------------------------------------------------*/
4133
4134#if __ARCH__ >= 12
4135static inline __ATTRS_o_ai int
4136vec_all_nge(__vector float __a, __vector float __b) {
4137 int __cc;
4138 __builtin_s390_vfchesbs(__a, __b, &__cc);
4139 return __cc == 3;
4140}
4141#endif
4142
4143static inline __ATTRS_o_ai int
4144vec_all_nge(__vector double __a, __vector double __b) {
4145 int __cc;
4146 __builtin_s390_vfchedbs(__a, __b, &__cc);
4147 return __cc == 3;
4148}
4149
4150/*-- vec_all_ngt ------------------------------------------------------------*/
4151
4152#if __ARCH__ >= 12
4153static inline __ATTRS_o_ai int
4154vec_all_ngt(__vector float __a, __vector float __b) {
4155 int __cc;
4156 __builtin_s390_vfchsbs(__a, __b, &__cc);
4157 return __cc == 3;
4158}
4159#endif
4160
4161static inline __ATTRS_o_ai int
4162vec_all_ngt(__vector double __a, __vector double __b) {
4163 int __cc;
4164 __builtin_s390_vfchdbs(__a, __b, &__cc);
4165 return __cc == 3;
4166}
4167
4168/*-- vec_all_nle ------------------------------------------------------------*/
4169
4170#if __ARCH__ >= 12
4171static inline __ATTRS_o_ai int
4172vec_all_nle(__vector float __a, __vector float __b) {
4173 int __cc;
4174 __builtin_s390_vfchesbs(__b, __a, &__cc);
4175 return __cc == 3;
4176}
4177#endif
4178
4179static inline __ATTRS_o_ai int
4180vec_all_nle(__vector double __a, __vector double __b) {
4181 int __cc;
4182 __builtin_s390_vfchedbs(__b, __a, &__cc);
4183 return __cc == 3;
4184}
4185
4186/*-- vec_all_nlt ------------------------------------------------------------*/
4187
4188#if __ARCH__ >= 12
4189static inline __ATTRS_o_ai int
4190vec_all_nlt(__vector float __a, __vector float __b) {
4191 int __cc;
4192 __builtin_s390_vfchsbs(__b, __a, &__cc);
4193 return __cc == 3;
4194}
4195#endif
4196
4197static inline __ATTRS_o_ai int
4198vec_all_nlt(__vector double __a, __vector double __b) {
4199 int __cc;
4200 __builtin_s390_vfchdbs(__b, __a, &__cc);
4201 return __cc == 3;
4202}
4203
4204/*-- vec_all_nan ------------------------------------------------------------*/
4205
4206#if __ARCH__ >= 12
4207static inline __ATTRS_o_ai int
4208vec_all_nan(__vector float __a) {
4209 int __cc;
4210 __builtin_s390_vftcisb(__a, 15, &__cc);
4211 return __cc == 0;
4212}
4213#endif
4214
4215static inline __ATTRS_o_ai int
4216vec_all_nan(__vector double __a) {
4217 int __cc;
4218 __builtin_s390_vftcidb(__a, 15, &__cc);
4219 return __cc == 0;
4220}
4221
4222/*-- vec_all_numeric --------------------------------------------------------*/
4223
4224#if __ARCH__ >= 12
4225static inline __ATTRS_o_ai int
4226vec_all_numeric(__vector float __a) {
4227 int __cc;
4228 __builtin_s390_vftcisb(__a, 15, &__cc);
4229 return __cc == 3;
4230}
4231#endif
4232
4233static inline __ATTRS_o_ai int
4234vec_all_numeric(__vector double __a) {
4235 int __cc;
4236 __builtin_s390_vftcidb(__a, 15, &__cc);
4237 return __cc == 3;
4238}
4239
4240/*-- vec_any_eq -------------------------------------------------------------*/
4241
4242static inline __ATTRS_o_ai int
4243vec_any_eq(__vector signed char __a, __vector signed char __b) {
4244 int __cc;
4245 __builtin_s390_vceqbs((__vector unsigned char)__a,
4246 (__vector unsigned char)__b, &__cc);
4247 return __cc <= 1;
4248}
4249
4250// This prototype is deprecated.
4251static inline __ATTRS_o_ai int
4252vec_any_eq(__vector signed char __a, __vector __bool char __b) {
4253 int __cc;
4254 __builtin_s390_vceqbs((__vector unsigned char)__a,
4255 (__vector unsigned char)__b, &__cc);
4256 return __cc <= 1;
4257}
4258
4259// This prototype is deprecated.
4260static inline __ATTRS_o_ai int
4261vec_any_eq(__vector __bool char __a, __vector signed char __b) {
4262 int __cc;
4263 __builtin_s390_vceqbs((__vector unsigned char)__a,
4264 (__vector unsigned char)__b, &__cc);
4265 return __cc <= 1;
4266}
4267
4268static inline __ATTRS_o_ai int
4269vec_any_eq(__vector unsigned char __a, __vector unsigned char __b) {
4270 int __cc;
4271 __builtin_s390_vceqbs(__a, __b, &__cc);
4272 return __cc <= 1;
4273}
4274
4275// This prototype is deprecated.
4276static inline __ATTRS_o_ai int
4277vec_any_eq(__vector unsigned char __a, __vector __bool char __b) {
4278 int __cc;
4279 __builtin_s390_vceqbs(__a, (__vector unsigned char)__b, &__cc);
4280 return __cc <= 1;
4281}
4282
4283// This prototype is deprecated.
4284static inline __ATTRS_o_ai int
4285vec_any_eq(__vector __bool char __a, __vector unsigned char __b) {
4286 int __cc;
4287 __builtin_s390_vceqbs((__vector unsigned char)__a, __b, &__cc);
4288 return __cc <= 1;
4289}
4290
4291static inline __ATTRS_o_ai int
4292vec_any_eq(__vector __bool char __a, __vector __bool char __b) {
4293 int __cc;
4294 __builtin_s390_vceqbs((__vector unsigned char)__a,
4295 (__vector unsigned char)__b, &__cc);
4296 return __cc <= 1;
4297}
4298
4299static inline __ATTRS_o_ai int
4300vec_any_eq(__vector signed short __a, __vector signed short __b) {
4301 int __cc;
4302 __builtin_s390_vceqhs((__vector unsigned short)__a,
4303 (__vector unsigned short)__b, &__cc);
4304 return __cc <= 1;
4305}
4306
4307// This prototype is deprecated.
4308static inline __ATTRS_o_ai int
4309vec_any_eq(__vector signed short __a, __vector __bool short __b) {
4310 int __cc;
4311 __builtin_s390_vceqhs((__vector unsigned short)__a,
4312 (__vector unsigned short)__b, &__cc);
4313 return __cc <= 1;
4314}
4315
4316// This prototype is deprecated.
4317static inline __ATTRS_o_ai int
4318vec_any_eq(__vector __bool short __a, __vector signed short __b) {
4319 int __cc;
4320 __builtin_s390_vceqhs((__vector unsigned short)__a,
4321 (__vector unsigned short)__b, &__cc);
4322 return __cc <= 1;
4323}
4324
4325static inline __ATTRS_o_ai int
4326vec_any_eq(__vector unsigned short __a, __vector unsigned short __b) {
4327 int __cc;
4328 __builtin_s390_vceqhs(__a, __b, &__cc);
4329 return __cc <= 1;
4330}
4331
4332// This prototype is deprecated.
4333static inline __ATTRS_o_ai int
4334vec_any_eq(__vector unsigned short __a, __vector __bool short __b) {
4335 int __cc;
4336 __builtin_s390_vceqhs(__a, (__vector unsigned short)__b, &__cc);
4337 return __cc <= 1;
4338}
4339
4340// This prototype is deprecated.
4341static inline __ATTRS_o_ai int
4342vec_any_eq(__vector __bool short __a, __vector unsigned short __b) {
4343 int __cc;
4344 __builtin_s390_vceqhs((__vector unsigned short)__a, __b, &__cc);
4345 return __cc <= 1;
4346}
4347
4348static inline __ATTRS_o_ai int
4349vec_any_eq(__vector __bool short __a, __vector __bool short __b) {
4350 int __cc;
4351 __builtin_s390_vceqhs((__vector unsigned short)__a,
4352 (__vector unsigned short)__b, &__cc);
4353 return __cc <= 1;
4354}
4355
4356static inline __ATTRS_o_ai int
4357vec_any_eq(__vector signed int __a, __vector signed int __b) {
4358 int __cc;
4359 __builtin_s390_vceqfs((__vector unsigned int)__a,
4360 (__vector unsigned int)__b, &__cc);
4361 return __cc <= 1;
4362}
4363
4364// This prototype is deprecated.
4365static inline __ATTRS_o_ai int
4366vec_any_eq(__vector signed int __a, __vector __bool int __b) {
4367 int __cc;
4368 __builtin_s390_vceqfs((__vector unsigned int)__a,
4369 (__vector unsigned int)__b, &__cc);
4370 return __cc <= 1;
4371}
4372
4373// This prototype is deprecated.
4374static inline __ATTRS_o_ai int
4375vec_any_eq(__vector __bool int __a, __vector signed int __b) {
4376 int __cc;
4377 __builtin_s390_vceqfs((__vector unsigned int)__a,
4378 (__vector unsigned int)__b, &__cc);
4379 return __cc <= 1;
4380}
4381
4382static inline __ATTRS_o_ai int
4383vec_any_eq(__vector unsigned int __a, __vector unsigned int __b) {
4384 int __cc;
4385 __builtin_s390_vceqfs(__a, __b, &__cc);
4386 return __cc <= 1;
4387}
4388
4389// This prototype is deprecated.
4390static inline __ATTRS_o_ai int
4391vec_any_eq(__vector unsigned int __a, __vector __bool int __b) {
4392 int __cc;
4393 __builtin_s390_vceqfs(__a, (__vector unsigned int)__b, &__cc);
4394 return __cc <= 1;
4395}
4396
4397// This prototype is deprecated.
4398static inline __ATTRS_o_ai int
4399vec_any_eq(__vector __bool int __a, __vector unsigned int __b) {
4400 int __cc;
4401 __builtin_s390_vceqfs((__vector unsigned int)__a, __b, &__cc);
4402 return __cc <= 1;
4403}
4404
4405static inline __ATTRS_o_ai int
4406vec_any_eq(__vector __bool int __a, __vector __bool int __b) {
4407 int __cc;
4408 __builtin_s390_vceqfs((__vector unsigned int)__a,
4409 (__vector unsigned int)__b, &__cc);
4410 return __cc <= 1;
4411}
4412
4413static inline __ATTRS_o_ai int
4414vec_any_eq(__vector signed long long __a, __vector signed long long __b) {
4415 int __cc;
4416 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4417 (__vector unsigned long long)__b, &__cc);
4418 return __cc <= 1;
4419}
4420
4421// This prototype is deprecated.
4422static inline __ATTRS_o_ai int
4423vec_any_eq(__vector signed long long __a, __vector __bool long long __b) {
4424 int __cc;
4425 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4426 (__vector unsigned long long)__b, &__cc);
4427 return __cc <= 1;
4428}
4429
4430// This prototype is deprecated.
4431static inline __ATTRS_o_ai int
4432vec_any_eq(__vector __bool long long __a, __vector signed long long __b) {
4433 int __cc;
4434 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4435 (__vector unsigned long long)__b, &__cc);
4436 return __cc <= 1;
4437}
4438
4439static inline __ATTRS_o_ai int
4440vec_any_eq(__vector unsigned long long __a, __vector unsigned long long __b) {
4441 int __cc;
4442 __builtin_s390_vceqgs(__a, __b, &__cc);
4443 return __cc <= 1;
4444}
4445
4446// This prototype is deprecated.
4447static inline __ATTRS_o_ai int
4448vec_any_eq(__vector unsigned long long __a, __vector __bool long long __b) {
4449 int __cc;
4450 __builtin_s390_vceqgs(__a, (__vector unsigned long long)__b, &__cc);
4451 return __cc <= 1;
4452}
4453
4454// This prototype is deprecated.
4455static inline __ATTRS_o_ai int
4456vec_any_eq(__vector __bool long long __a, __vector unsigned long long __b) {
4457 int __cc;
4458 __builtin_s390_vceqgs((__vector unsigned long long)__a, __b, &__cc);
4459 return __cc <= 1;
4460}
4461
4462static inline __ATTRS_o_ai int
4463vec_any_eq(__vector __bool long long __a, __vector __bool long long __b) {
4464 int __cc;
4465 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4466 (__vector unsigned long long)__b, &__cc);
4467 return __cc <= 1;
4468}
4469
4470#if __ARCH__ >= 12
4471static inline __ATTRS_o_ai int
4472vec_any_eq(__vector float __a, __vector float __b) {
4473 int __cc;
4474 __builtin_s390_vfcesbs(__a, __b, &__cc);
4475 return __cc <= 1;
4476}
4477#endif
4478
4479static inline __ATTRS_o_ai int
4480vec_any_eq(__vector double __a, __vector double __b) {
4481 int __cc;
4482 __builtin_s390_vfcedbs(__a, __b, &__cc);
4483 return __cc <= 1;
4484}
4485
4486/*-- vec_any_ne -------------------------------------------------------------*/
4487
4488static inline __ATTRS_o_ai int
4489vec_any_ne(__vector signed char __a, __vector signed char __b) {
4490 int __cc;
4491 __builtin_s390_vceqbs((__vector unsigned char)__a,
4492 (__vector unsigned char)__b, &__cc);
4493 return __cc != 0;
4494}
4495
4496// This prototype is deprecated.
4497static inline __ATTRS_o_ai int
4498vec_any_ne(__vector signed char __a, __vector __bool char __b) {
4499 int __cc;
4500 __builtin_s390_vceqbs((__vector unsigned char)__a,
4501 (__vector unsigned char)__b, &__cc);
4502 return __cc != 0;
4503}
4504
4505// This prototype is deprecated.
4506static inline __ATTRS_o_ai int
4507vec_any_ne(__vector __bool char __a, __vector signed char __b) {
4508 int __cc;
4509 __builtin_s390_vceqbs((__vector unsigned char)__a,
4510 (__vector unsigned char)__b, &__cc);
4511 return __cc != 0;
4512}
4513
4514static inline __ATTRS_o_ai int
4515vec_any_ne(__vector unsigned char __a, __vector unsigned char __b) {
4516 int __cc;
4517 __builtin_s390_vceqbs(__a, __b, &__cc);
4518 return __cc != 0;
4519}
4520
4521// This prototype is deprecated.
4522static inline __ATTRS_o_ai int
4523vec_any_ne(__vector unsigned char __a, __vector __bool char __b) {
4524 int __cc;
4525 __builtin_s390_vceqbs(__a, (__vector unsigned char)__b, &__cc);
4526 return __cc != 0;
4527}
4528
4529// This prototype is deprecated.
4530static inline __ATTRS_o_ai int
4531vec_any_ne(__vector __bool char __a, __vector unsigned char __b) {
4532 int __cc;
4533 __builtin_s390_vceqbs((__vector unsigned char)__a, __b, &__cc);
4534 return __cc != 0;
4535}
4536
4537static inline __ATTRS_o_ai int
4538vec_any_ne(__vector __bool char __a, __vector __bool char __b) {
4539 int __cc;
4540 __builtin_s390_vceqbs((__vector unsigned char)__a,
4541 (__vector unsigned char)__b, &__cc);
4542 return __cc != 0;
4543}
4544
4545static inline __ATTRS_o_ai int
4546vec_any_ne(__vector signed short __a, __vector signed short __b) {
4547 int __cc;
4548 __builtin_s390_vceqhs((__vector unsigned short)__a,
4549 (__vector unsigned short)__b, &__cc);
4550 return __cc != 0;
4551}
4552
4553// This prototype is deprecated.
4554static inline __ATTRS_o_ai int
4555vec_any_ne(__vector signed short __a, __vector __bool short __b) {
4556 int __cc;
4557 __builtin_s390_vceqhs((__vector unsigned short)__a,
4558 (__vector unsigned short)__b, &__cc);
4559 return __cc != 0;
4560}
4561
4562// This prototype is deprecated.
4563static inline __ATTRS_o_ai int
4564vec_any_ne(__vector __bool short __a, __vector signed short __b) {
4565 int __cc;
4566 __builtin_s390_vceqhs((__vector unsigned short)__a,
4567 (__vector unsigned short)__b, &__cc);
4568 return __cc != 0;
4569}
4570
4571static inline __ATTRS_o_ai int
4572vec_any_ne(__vector unsigned short __a, __vector unsigned short __b) {
4573 int __cc;
4574 __builtin_s390_vceqhs(__a, __b, &__cc);
4575 return __cc != 0;
4576}
4577
4578// This prototype is deprecated.
4579static inline __ATTRS_o_ai int
4580vec_any_ne(__vector unsigned short __a, __vector __bool short __b) {
4581 int __cc;
4582 __builtin_s390_vceqhs(__a, (__vector unsigned short)__b, &__cc);
4583 return __cc != 0;
4584}
4585
4586// This prototype is deprecated.
4587static inline __ATTRS_o_ai int
4588vec_any_ne(__vector __bool short __a, __vector unsigned short __b) {
4589 int __cc;
4590 __builtin_s390_vceqhs((__vector unsigned short)__a, __b, &__cc);
4591 return __cc != 0;
4592}
4593
4594static inline __ATTRS_o_ai int
4595vec_any_ne(__vector __bool short __a, __vector __bool short __b) {
4596 int __cc;
4597 __builtin_s390_vceqhs((__vector unsigned short)__a,
4598 (__vector unsigned short)__b, &__cc);
4599 return __cc != 0;
4600}
4601
4602static inline __ATTRS_o_ai int
4603vec_any_ne(__vector signed int __a, __vector signed int __b) {
4604 int __cc;
4605 __builtin_s390_vceqfs((__vector unsigned int)__a,
4606 (__vector unsigned int)__b, &__cc);
4607 return __cc != 0;
4608}
4609
4610// This prototype is deprecated.
4611static inline __ATTRS_o_ai int
4612vec_any_ne(__vector signed int __a, __vector __bool int __b) {
4613 int __cc;
4614 __builtin_s390_vceqfs((__vector unsigned int)__a,
4615 (__vector unsigned int)__b, &__cc);
4616 return __cc != 0;
4617}
4618
4619// This prototype is deprecated.
4620static inline __ATTRS_o_ai int
4621vec_any_ne(__vector __bool int __a, __vector signed int __b) {
4622 int __cc;
4623 __builtin_s390_vceqfs((__vector unsigned int)__a,
4624 (__vector unsigned int)__b, &__cc);
4625 return __cc != 0;
4626}
4627
4628static inline __ATTRS_o_ai int
4629vec_any_ne(__vector unsigned int __a, __vector unsigned int __b) {
4630 int __cc;
4631 __builtin_s390_vceqfs(__a, __b, &__cc);
4632 return __cc != 0;
4633}
4634
4635// This prototype is deprecated.
4636static inline __ATTRS_o_ai int
4637vec_any_ne(__vector unsigned int __a, __vector __bool int __b) {
4638 int __cc;
4639 __builtin_s390_vceqfs(__a, (__vector unsigned int)__b, &__cc);
4640 return __cc != 0;
4641}
4642
4643// This prototype is deprecated.
4644static inline __ATTRS_o_ai int
4645vec_any_ne(__vector __bool int __a, __vector unsigned int __b) {
4646 int __cc;
4647 __builtin_s390_vceqfs((__vector unsigned int)__a, __b, &__cc);
4648 return __cc != 0;
4649}
4650
4651static inline __ATTRS_o_ai int
4652vec_any_ne(__vector __bool int __a, __vector __bool int __b) {
4653 int __cc;
4654 __builtin_s390_vceqfs((__vector unsigned int)__a,
4655 (__vector unsigned int)__b, &__cc);
4656 return __cc != 0;
4657}
4658
4659static inline __ATTRS_o_ai int
4660vec_any_ne(__vector signed long long __a, __vector signed long long __b) {
4661 int __cc;
4662 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4663 (__vector unsigned long long)__b, &__cc);
4664 return __cc != 0;
4665}
4666
4667// This prototype is deprecated.
4668static inline __ATTRS_o_ai int
4669vec_any_ne(__vector signed long long __a, __vector __bool long long __b) {
4670 int __cc;
4671 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4672 (__vector unsigned long long)__b, &__cc);
4673 return __cc != 0;
4674}
4675
4676// This prototype is deprecated.
4677static inline __ATTRS_o_ai int
4678vec_any_ne(__vector __bool long long __a, __vector signed long long __b) {
4679 int __cc;
4680 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4681 (__vector unsigned long long)__b, &__cc);
4682 return __cc != 0;
4683}
4684
4685static inline __ATTRS_o_ai int
4686vec_any_ne(__vector unsigned long long __a, __vector unsigned long long __b) {
4687 int __cc;
4688 __builtin_s390_vceqgs(__a, __b, &__cc);
4689 return __cc != 0;
4690}
4691
4692// This prototype is deprecated.
4693static inline __ATTRS_o_ai int
4694vec_any_ne(__vector unsigned long long __a, __vector __bool long long __b) {
4695 int __cc;
4696 __builtin_s390_vceqgs(__a, (__vector unsigned long long)__b, &__cc);
4697 return __cc != 0;
4698}
4699
4700// This prototype is deprecated.
4701static inline __ATTRS_o_ai int
4702vec_any_ne(__vector __bool long long __a, __vector unsigned long long __b) {
4703 int __cc;
4704 __builtin_s390_vceqgs((__vector unsigned long long)__a, __b, &__cc);
4705 return __cc != 0;
4706}
4707
4708static inline __ATTRS_o_ai int
4709vec_any_ne(__vector __bool long long __a, __vector __bool long long __b) {
4710 int __cc;
4711 __builtin_s390_vceqgs((__vector unsigned long long)__a,
4712 (__vector unsigned long long)__b, &__cc);
4713 return __cc != 0;
4714}
4715
4716#if __ARCH__ >= 12
4717static inline __ATTRS_o_ai int
4718vec_any_ne(__vector float __a, __vector float __b) {
4719 int __cc;
4720 __builtin_s390_vfcesbs(__a, __b, &__cc);
4721 return __cc != 0;
4722}
4723#endif
4724
4725static inline __ATTRS_o_ai int
4726vec_any_ne(__vector double __a, __vector double __b) {
4727 int __cc;
4728 __builtin_s390_vfcedbs(__a, __b, &__cc);
4729 return __cc != 0;
4730}
4731
4732/*-- vec_any_ge -------------------------------------------------------------*/
4733
4734static inline __ATTRS_o_ai int
4735vec_any_ge(__vector signed char __a, __vector signed char __b) {
4736 int __cc;
4737 __builtin_s390_vchbs(__b, __a, &__cc);
4738 return __cc != 0;
4739}
4740
4741// This prototype is deprecated.
4742static inline __ATTRS_o_ai int
4743vec_any_ge(__vector signed char __a, __vector __bool char __b) {
4744 int __cc;
4745 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
4746 return __cc != 0;
4747}
4748
4749// This prototype is deprecated.
4750static inline __ATTRS_o_ai int
4751vec_any_ge(__vector __bool char __a, __vector signed char __b) {
4752 int __cc;
4753 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
4754 return __cc != 0;
4755}
4756
4757static inline __ATTRS_o_ai int
4758vec_any_ge(__vector unsigned char __a, __vector unsigned char __b) {
4759 int __cc;
4760 __builtin_s390_vchlbs(__b, __a, &__cc);
4761 return __cc != 0;
4762}
4763
4764// This prototype is deprecated.
4765static inline __ATTRS_o_ai int
4766vec_any_ge(__vector unsigned char __a, __vector __bool char __b) {
4767 int __cc;
4768 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
4769 return __cc != 0;
4770}
4771
4772// This prototype is deprecated.
4773static inline __ATTRS_o_ai int
4774vec_any_ge(__vector __bool char __a, __vector unsigned char __b) {
4775 int __cc;
4776 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
4777 return __cc != 0;
4778}
4779
4780// This prototype is deprecated.
4781static inline __ATTRS_o_ai int
4782vec_any_ge(__vector __bool char __a, __vector __bool char __b) {
4783 int __cc;
4784 __builtin_s390_vchlbs((__vector unsigned char)__b,
4785 (__vector unsigned char)__a, &__cc);
4786 return __cc != 0;
4787}
4788
4789static inline __ATTRS_o_ai int
4790vec_any_ge(__vector signed short __a, __vector signed short __b) {
4791 int __cc;
4792 __builtin_s390_vchhs(__b, __a, &__cc);
4793 return __cc != 0;
4794}
4795
4796// This prototype is deprecated.
4797static inline __ATTRS_o_ai int
4798vec_any_ge(__vector signed short __a, __vector __bool short __b) {
4799 int __cc;
4800 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
4801 return __cc != 0;
4802}
4803
4804// This prototype is deprecated.
4805static inline __ATTRS_o_ai int
4806vec_any_ge(__vector __bool short __a, __vector signed short __b) {
4807 int __cc;
4808 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
4809 return __cc != 0;
4810}
4811
4812static inline __ATTRS_o_ai int
4813vec_any_ge(__vector unsigned short __a, __vector unsigned short __b) {
4814 int __cc;
4815 __builtin_s390_vchlhs(__b, __a, &__cc);
4816 return __cc != 0;
4817}
4818
4819// This prototype is deprecated.
4820static inline __ATTRS_o_ai int
4821vec_any_ge(__vector unsigned short __a, __vector __bool short __b) {
4822 int __cc;
4823 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
4824 return __cc != 0;
4825}
4826
4827// This prototype is deprecated.
4828static inline __ATTRS_o_ai int
4829vec_any_ge(__vector __bool short __a, __vector unsigned short __b) {
4830 int __cc;
4831 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
4832 return __cc != 0;
4833}
4834
4835// This prototype is deprecated.
4836static inline __ATTRS_o_ai int
4837vec_any_ge(__vector __bool short __a, __vector __bool short __b) {
4838 int __cc;
4839 __builtin_s390_vchlhs((__vector unsigned short)__b,
4840 (__vector unsigned short)__a, &__cc);
4841 return __cc != 0;
4842}
4843
4844static inline __ATTRS_o_ai int
4845vec_any_ge(__vector signed int __a, __vector signed int __b) {
4846 int __cc;
4847 __builtin_s390_vchfs(__b, __a, &__cc);
4848 return __cc != 0;
4849}
4850
4851// This prototype is deprecated.
4852static inline __ATTRS_o_ai int
4853vec_any_ge(__vector signed int __a, __vector __bool int __b) {
4854 int __cc;
4855 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
4856 return __cc != 0;
4857}
4858
4859// This prototype is deprecated.
4860static inline __ATTRS_o_ai int
4861vec_any_ge(__vector __bool int __a, __vector signed int __b) {
4862 int __cc;
4863 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
4864 return __cc != 0;
4865}
4866
4867static inline __ATTRS_o_ai int
4868vec_any_ge(__vector unsigned int __a, __vector unsigned int __b) {
4869 int __cc;
4870 __builtin_s390_vchlfs(__b, __a, &__cc);
4871 return __cc != 0;
4872}
4873
4874// This prototype is deprecated.
4875static inline __ATTRS_o_ai int
4876vec_any_ge(__vector unsigned int __a, __vector __bool int __b) {
4877 int __cc;
4878 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
4879 return __cc != 0;
4880}
4881
4882// This prototype is deprecated.
4883static inline __ATTRS_o_ai int
4884vec_any_ge(__vector __bool int __a, __vector unsigned int __b) {
4885 int __cc;
4886 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
4887 return __cc != 0;
4888}
4889
4890// This prototype is deprecated.
4891static inline __ATTRS_o_ai int
4892vec_any_ge(__vector __bool int __a, __vector __bool int __b) {
4893 int __cc;
4894 __builtin_s390_vchlfs((__vector unsigned int)__b,
4895 (__vector unsigned int)__a, &__cc);
4896 return __cc != 0;
4897}
4898
4899static inline __ATTRS_o_ai int
4900vec_any_ge(__vector signed long long __a, __vector signed long long __b) {
4901 int __cc;
4902 __builtin_s390_vchgs(__b, __a, &__cc);
4903 return __cc != 0;
4904}
4905
4906// This prototype is deprecated.
4907static inline __ATTRS_o_ai int
4908vec_any_ge(__vector signed long long __a, __vector __bool long long __b) {
4909 int __cc;
4910 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
4911 return __cc != 0;
4912}
4913
4914// This prototype is deprecated.
4915static inline __ATTRS_o_ai int
4916vec_any_ge(__vector __bool long long __a, __vector signed long long __b) {
4917 int __cc;
4918 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
4919 return __cc != 0;
4920}
4921
4922static inline __ATTRS_o_ai int
4923vec_any_ge(__vector unsigned long long __a, __vector unsigned long long __b) {
4924 int __cc;
4925 __builtin_s390_vchlgs(__b, __a, &__cc);
4926 return __cc != 0;
4927}
4928
4929// This prototype is deprecated.
4930static inline __ATTRS_o_ai int
4931vec_any_ge(__vector unsigned long long __a, __vector __bool long long __b) {
4932 int __cc;
4933 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
4934 return __cc != 0;
4935}
4936
4937// This prototype is deprecated.
4938static inline __ATTRS_o_ai int
4939vec_any_ge(__vector __bool long long __a, __vector unsigned long long __b) {
4940 int __cc;
4941 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
4942 return __cc != 0;
4943}
4944
4945// This prototype is deprecated.
4946static inline __ATTRS_o_ai int
4947vec_any_ge(__vector __bool long long __a, __vector __bool long long __b) {
4948 int __cc;
4949 __builtin_s390_vchlgs((__vector unsigned long long)__b,
4950 (__vector unsigned long long)__a, &__cc);
4951 return __cc != 0;
4952}
4953
4954#if __ARCH__ >= 12
4955static inline __ATTRS_o_ai int
4956vec_any_ge(__vector float __a, __vector float __b) {
4957 int __cc;
4958 __builtin_s390_vfchesbs(__a, __b, &__cc);
4959 return __cc <= 1;
4960}
4961#endif
4962
4963static inline __ATTRS_o_ai int
4964vec_any_ge(__vector double __a, __vector double __b) {
4965 int __cc;
4966 __builtin_s390_vfchedbs(__a, __b, &__cc);
4967 return __cc <= 1;
4968}
4969
4970/*-- vec_any_gt -------------------------------------------------------------*/
4971
4972static inline __ATTRS_o_ai int
4973vec_any_gt(__vector signed char __a, __vector signed char __b) {
4974 int __cc;
4975 __builtin_s390_vchbs(__a, __b, &__cc);
4976 return __cc <= 1;
4977}
4978
4979// This prototype is deprecated.
4980static inline __ATTRS_o_ai int
4981vec_any_gt(__vector signed char __a, __vector __bool char __b) {
4982 int __cc;
4983 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
4984 return __cc <= 1;
4985}
4986
4987// This prototype is deprecated.
4988static inline __ATTRS_o_ai int
4989vec_any_gt(__vector __bool char __a, __vector signed char __b) {
4990 int __cc;
4991 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
4992 return __cc <= 1;
4993}
4994
4995static inline __ATTRS_o_ai int
4996vec_any_gt(__vector unsigned char __a, __vector unsigned char __b) {
4997 int __cc;
4998 __builtin_s390_vchlbs(__a, __b, &__cc);
4999 return __cc <= 1;
5000}
5001
5002// This prototype is deprecated.
5003static inline __ATTRS_o_ai int
5004vec_any_gt(__vector unsigned char __a, __vector __bool char __b) {
5005 int __cc;
5006 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
5007 return __cc <= 1;
5008}
5009
5010// This prototype is deprecated.
5011static inline __ATTRS_o_ai int
5012vec_any_gt(__vector __bool char __a, __vector unsigned char __b) {
5013 int __cc;
5014 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
5015 return __cc <= 1;
5016}
5017
5018// This prototype is deprecated.
5019static inline __ATTRS_o_ai int
5020vec_any_gt(__vector __bool char __a, __vector __bool char __b) {
5021 int __cc;
5022 __builtin_s390_vchlbs((__vector unsigned char)__a,
5023 (__vector unsigned char)__b, &__cc);
5024 return __cc <= 1;
5025}
5026
5027static inline __ATTRS_o_ai int
5028vec_any_gt(__vector signed short __a, __vector signed short __b) {
5029 int __cc;
5030 __builtin_s390_vchhs(__a, __b, &__cc);
5031 return __cc <= 1;
5032}
5033
5034// This prototype is deprecated.
5035static inline __ATTRS_o_ai int
5036vec_any_gt(__vector signed short __a, __vector __bool short __b) {
5037 int __cc;
5038 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
5039 return __cc <= 1;
5040}
5041
5042// This prototype is deprecated.
5043static inline __ATTRS_o_ai int
5044vec_any_gt(__vector __bool short __a, __vector signed short __b) {
5045 int __cc;
5046 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
5047 return __cc <= 1;
5048}
5049
5050static inline __ATTRS_o_ai int
5051vec_any_gt(__vector unsigned short __a, __vector unsigned short __b) {
5052 int __cc;
5053 __builtin_s390_vchlhs(__a, __b, &__cc);
5054 return __cc <= 1;
5055}
5056
5057// This prototype is deprecated.
5058static inline __ATTRS_o_ai int
5059vec_any_gt(__vector unsigned short __a, __vector __bool short __b) {
5060 int __cc;
5061 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
5062 return __cc <= 1;
5063}
5064
5065// This prototype is deprecated.
5066static inline __ATTRS_o_ai int
5067vec_any_gt(__vector __bool short __a, __vector unsigned short __b) {
5068 int __cc;
5069 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
5070 return __cc <= 1;
5071}
5072
5073// This prototype is deprecated.
5074static inline __ATTRS_o_ai int
5075vec_any_gt(__vector __bool short __a, __vector __bool short __b) {
5076 int __cc;
5077 __builtin_s390_vchlhs((__vector unsigned short)__a,
5078 (__vector unsigned short)__b, &__cc);
5079 return __cc <= 1;
5080}
5081
5082static inline __ATTRS_o_ai int
5083vec_any_gt(__vector signed int __a, __vector signed int __b) {
5084 int __cc;
5085 __builtin_s390_vchfs(__a, __b, &__cc);
5086 return __cc <= 1;
5087}
5088
5089// This prototype is deprecated.
5090static inline __ATTRS_o_ai int
5091vec_any_gt(__vector signed int __a, __vector __bool int __b) {
5092 int __cc;
5093 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
5094 return __cc <= 1;
5095}
5096
5097// This prototype is deprecated.
5098static inline __ATTRS_o_ai int
5099vec_any_gt(__vector __bool int __a, __vector signed int __b) {
5100 int __cc;
5101 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
5102 return __cc <= 1;
5103}
5104
5105static inline __ATTRS_o_ai int
5106vec_any_gt(__vector unsigned int __a, __vector unsigned int __b) {
5107 int __cc;
5108 __builtin_s390_vchlfs(__a, __b, &__cc);
5109 return __cc <= 1;
5110}
5111
5112// This prototype is deprecated.
5113static inline __ATTRS_o_ai int
5114vec_any_gt(__vector unsigned int __a, __vector __bool int __b) {
5115 int __cc;
5116 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
5117 return __cc <= 1;
5118}
5119
5120// This prototype is deprecated.
5121static inline __ATTRS_o_ai int
5122vec_any_gt(__vector __bool int __a, __vector unsigned int __b) {
5123 int __cc;
5124 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
5125 return __cc <= 1;
5126}
5127
5128// This prototype is deprecated.
5129static inline __ATTRS_o_ai int
5130vec_any_gt(__vector __bool int __a, __vector __bool int __b) {
5131 int __cc;
5132 __builtin_s390_vchlfs((__vector unsigned int)__a,
5133 (__vector unsigned int)__b, &__cc);
5134 return __cc <= 1;
5135}
5136
5137static inline __ATTRS_o_ai int
5138vec_any_gt(__vector signed long long __a, __vector signed long long __b) {
5139 int __cc;
5140 __builtin_s390_vchgs(__a, __b, &__cc);
5141 return __cc <= 1;
5142}
5143
5144// This prototype is deprecated.
5145static inline __ATTRS_o_ai int
5146vec_any_gt(__vector signed long long __a, __vector __bool long long __b) {
5147 int __cc;
5148 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
5149 return __cc <= 1;
5150}
5151
5152// This prototype is deprecated.
5153static inline __ATTRS_o_ai int
5154vec_any_gt(__vector __bool long long __a, __vector signed long long __b) {
5155 int __cc;
5156 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
5157 return __cc <= 1;
5158}
5159
5160static inline __ATTRS_o_ai int
5161vec_any_gt(__vector unsigned long long __a, __vector unsigned long long __b) {
5162 int __cc;
5163 __builtin_s390_vchlgs(__a, __b, &__cc);
5164 return __cc <= 1;
5165}
5166
5167// This prototype is deprecated.
5168static inline __ATTRS_o_ai int
5169vec_any_gt(__vector unsigned long long __a, __vector __bool long long __b) {
5170 int __cc;
5171 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
5172 return __cc <= 1;
5173}
5174
5175// This prototype is deprecated.
5176static inline __ATTRS_o_ai int
5177vec_any_gt(__vector __bool long long __a, __vector unsigned long long __b) {
5178 int __cc;
5179 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
5180 return __cc <= 1;
5181}
5182
5183// This prototype is deprecated.
5184static inline __ATTRS_o_ai int
5185vec_any_gt(__vector __bool long long __a, __vector __bool long long __b) {
5186 int __cc;
5187 __builtin_s390_vchlgs((__vector unsigned long long)__a,
5188 (__vector unsigned long long)__b, &__cc);
5189 return __cc <= 1;
5190}
5191
5192#if __ARCH__ >= 12
5193static inline __ATTRS_o_ai int
5194vec_any_gt(__vector float __a, __vector float __b) {
5195 int __cc;
5196 __builtin_s390_vfchsbs(__a, __b, &__cc);
5197 return __cc <= 1;
5198}
5199#endif
5200
5201static inline __ATTRS_o_ai int
5202vec_any_gt(__vector double __a, __vector double __b) {
5203 int __cc;
5204 __builtin_s390_vfchdbs(__a, __b, &__cc);
5205 return __cc <= 1;
5206}
5207
5208/*-- vec_any_le -------------------------------------------------------------*/
5209
5210static inline __ATTRS_o_ai int
5211vec_any_le(__vector signed char __a, __vector signed char __b) {
5212 int __cc;
5213 __builtin_s390_vchbs(__a, __b, &__cc);
5214 return __cc != 0;
5215}
5216
5217// This prototype is deprecated.
5218static inline __ATTRS_o_ai int
5219vec_any_le(__vector signed char __a, __vector __bool char __b) {
5220 int __cc;
5221 __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc);
5222 return __cc != 0;
5223}
5224
5225// This prototype is deprecated.
5226static inline __ATTRS_o_ai int
5227vec_any_le(__vector __bool char __a, __vector signed char __b) {
5228 int __cc;
5229 __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc);
5230 return __cc != 0;
5231}
5232
5233static inline __ATTRS_o_ai int
5234vec_any_le(__vector unsigned char __a, __vector unsigned char __b) {
5235 int __cc;
5236 __builtin_s390_vchlbs(__a, __b, &__cc);
5237 return __cc != 0;
5238}
5239
5240// This prototype is deprecated.
5241static inline __ATTRS_o_ai int
5242vec_any_le(__vector unsigned char __a, __vector __bool char __b) {
5243 int __cc;
5244 __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc);
5245 return __cc != 0;
5246}
5247
5248// This prototype is deprecated.
5249static inline __ATTRS_o_ai int
5250vec_any_le(__vector __bool char __a, __vector unsigned char __b) {
5251 int __cc;
5252 __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc);
5253 return __cc != 0;
5254}
5255
5256// This prototype is deprecated.
5257static inline __ATTRS_o_ai int
5258vec_any_le(__vector __bool char __a, __vector __bool char __b) {
5259 int __cc;
5260 __builtin_s390_vchlbs((__vector unsigned char)__a,
5261 (__vector unsigned char)__b, &__cc);
5262 return __cc != 0;
5263}
5264
5265static inline __ATTRS_o_ai int
5266vec_any_le(__vector signed short __a, __vector signed short __b) {
5267 int __cc;
5268 __builtin_s390_vchhs(__a, __b, &__cc);
5269 return __cc != 0;
5270}
5271
5272// This prototype is deprecated.
5273static inline __ATTRS_o_ai int
5274vec_any_le(__vector signed short __a, __vector __bool short __b) {
5275 int __cc;
5276 __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc);
5277 return __cc != 0;
5278}
5279
5280// This prototype is deprecated.
5281static inline __ATTRS_o_ai int
5282vec_any_le(__vector __bool short __a, __vector signed short __b) {
5283 int __cc;
5284 __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc);
5285 return __cc != 0;
5286}
5287
5288static inline __ATTRS_o_ai int
5289vec_any_le(__vector unsigned short __a, __vector unsigned short __b) {
5290 int __cc;
5291 __builtin_s390_vchlhs(__a, __b, &__cc);
5292 return __cc != 0;
5293}
5294
5295// This prototype is deprecated.
5296static inline __ATTRS_o_ai int
5297vec_any_le(__vector unsigned short __a, __vector __bool short __b) {
5298 int __cc;
5299 __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc);
5300 return __cc != 0;
5301}
5302
5303// This prototype is deprecated.
5304static inline __ATTRS_o_ai int
5305vec_any_le(__vector __bool short __a, __vector unsigned short __b) {
5306 int __cc;
5307 __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc);
5308 return __cc != 0;
5309}
5310
5311// This prototype is deprecated.
5312static inline __ATTRS_o_ai int
5313vec_any_le(__vector __bool short __a, __vector __bool short __b) {
5314 int __cc;
5315 __builtin_s390_vchlhs((__vector unsigned short)__a,
5316 (__vector unsigned short)__b, &__cc);
5317 return __cc != 0;
5318}
5319
5320static inline __ATTRS_o_ai int
5321vec_any_le(__vector signed int __a, __vector signed int __b) {
5322 int __cc;
5323 __builtin_s390_vchfs(__a, __b, &__cc);
5324 return __cc != 0;
5325}
5326
5327// This prototype is deprecated.
5328static inline __ATTRS_o_ai int
5329vec_any_le(__vector signed int __a, __vector __bool int __b) {
5330 int __cc;
5331 __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc);
5332 return __cc != 0;
5333}
5334
5335// This prototype is deprecated.
5336static inline __ATTRS_o_ai int
5337vec_any_le(__vector __bool int __a, __vector signed int __b) {
5338 int __cc;
5339 __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc);
5340 return __cc != 0;
5341}
5342
5343static inline __ATTRS_o_ai int
5344vec_any_le(__vector unsigned int __a, __vector unsigned int __b) {
5345 int __cc;
5346 __builtin_s390_vchlfs(__a, __b, &__cc);
5347 return __cc != 0;
5348}
5349
5350// This prototype is deprecated.
5351static inline __ATTRS_o_ai int
5352vec_any_le(__vector unsigned int __a, __vector __bool int __b) {
5353 int __cc;
5354 __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc);
5355 return __cc != 0;
5356}
5357
5358// This prototype is deprecated.
5359static inline __ATTRS_o_ai int
5360vec_any_le(__vector __bool int __a, __vector unsigned int __b) {
5361 int __cc;
5362 __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc);
5363 return __cc != 0;
5364}
5365
5366// This prototype is deprecated.
5367static inline __ATTRS_o_ai int
5368vec_any_le(__vector __bool int __a, __vector __bool int __b) {
5369 int __cc;
5370 __builtin_s390_vchlfs((__vector unsigned int)__a,
5371 (__vector unsigned int)__b, &__cc);
5372 return __cc != 0;
5373}
5374
5375static inline __ATTRS_o_ai int
5376vec_any_le(__vector signed long long __a, __vector signed long long __b) {
5377 int __cc;
5378 __builtin_s390_vchgs(__a, __b, &__cc);
5379 return __cc != 0;
5380}
5381
5382// This prototype is deprecated.
5383static inline __ATTRS_o_ai int
5384vec_any_le(__vector signed long long __a, __vector __bool long long __b) {
5385 int __cc;
5386 __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc);
5387 return __cc != 0;
5388}
5389
5390// This prototype is deprecated.
5391static inline __ATTRS_o_ai int
5392vec_any_le(__vector __bool long long __a, __vector signed long long __b) {
5393 int __cc;
5394 __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc);
5395 return __cc != 0;
5396}
5397
5398static inline __ATTRS_o_ai int
5399vec_any_le(__vector unsigned long long __a, __vector unsigned long long __b) {
5400 int __cc;
5401 __builtin_s390_vchlgs(__a, __b, &__cc);
5402 return __cc != 0;
5403}
5404
5405// This prototype is deprecated.
5406static inline __ATTRS_o_ai int
5407vec_any_le(__vector unsigned long long __a, __vector __bool long long __b) {
5408 int __cc;
5409 __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc);
5410 return __cc != 0;
5411}
5412
5413// This prototype is deprecated.
5414static inline __ATTRS_o_ai int
5415vec_any_le(__vector __bool long long __a, __vector unsigned long long __b) {
5416 int __cc;
5417 __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc);
5418 return __cc != 0;
5419}
5420
5421// This prototype is deprecated.
5422static inline __ATTRS_o_ai int
5423vec_any_le(__vector __bool long long __a, __vector __bool long long __b) {
5424 int __cc;
5425 __builtin_s390_vchlgs((__vector unsigned long long)__a,
5426 (__vector unsigned long long)__b, &__cc);
5427 return __cc != 0;
5428}
5429
5430#if __ARCH__ >= 12
5431static inline __ATTRS_o_ai int
5432vec_any_le(__vector float __a, __vector float __b) {
5433 int __cc;
5434 __builtin_s390_vfchesbs(__b, __a, &__cc);
5435 return __cc <= 1;
5436}
5437#endif
5438
5439static inline __ATTRS_o_ai int
5440vec_any_le(__vector double __a, __vector double __b) {
5441 int __cc;
5442 __builtin_s390_vfchedbs(__b, __a, &__cc);
5443 return __cc <= 1;
5444}
5445
5446/*-- vec_any_lt -------------------------------------------------------------*/
5447
5448static inline __ATTRS_o_ai int
5449vec_any_lt(__vector signed char __a, __vector signed char __b) {
5450 int __cc;
5451 __builtin_s390_vchbs(__b, __a, &__cc);
5452 return __cc <= 1;
5453}
5454
5455// This prototype is deprecated.
5456static inline __ATTRS_o_ai int
5457vec_any_lt(__vector signed char __a, __vector __bool char __b) {
5458 int __cc;
5459 __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc);
5460 return __cc <= 1;
5461}
5462
5463// This prototype is deprecated.
5464static inline __ATTRS_o_ai int
5465vec_any_lt(__vector __bool char __a, __vector signed char __b) {
5466 int __cc;
5467 __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc);
5468 return __cc <= 1;
5469}
5470
5471static inline __ATTRS_o_ai int
5472vec_any_lt(__vector unsigned char __a, __vector unsigned char __b) {
5473 int __cc;
5474 __builtin_s390_vchlbs(__b, __a, &__cc);
5475 return __cc <= 1;
5476}
5477
5478// This prototype is deprecated.
5479static inline __ATTRS_o_ai int
5480vec_any_lt(__vector unsigned char __a, __vector __bool char __b) {
5481 int __cc;
5482 __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc);
5483 return __cc <= 1;
5484}
5485
5486// This prototype is deprecated.
5487static inline __ATTRS_o_ai int
5488vec_any_lt(__vector __bool char __a, __vector unsigned char __b) {
5489 int __cc;
5490 __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc);
5491 return __cc <= 1;
5492}
5493
5494// This prototype is deprecated.
5495static inline __ATTRS_o_ai int
5496vec_any_lt(__vector __bool char __a, __vector __bool char __b) {
5497 int __cc;
5498 __builtin_s390_vchlbs((__vector unsigned char)__b,
5499 (__vector unsigned char)__a, &__cc);
5500 return __cc <= 1;
5501}
5502
5503static inline __ATTRS_o_ai int
5504vec_any_lt(__vector signed short __a, __vector signed short __b) {
5505 int __cc;
5506 __builtin_s390_vchhs(__b, __a, &__cc);
5507 return __cc <= 1;
5508}
5509
5510// This prototype is deprecated.
5511static inline __ATTRS_o_ai int
5512vec_any_lt(__vector signed short __a, __vector __bool short __b) {
5513 int __cc;
5514 __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc);
5515 return __cc <= 1;
5516}
5517
5518// This prototype is deprecated.
5519static inline __ATTRS_o_ai int
5520vec_any_lt(__vector __bool short __a, __vector signed short __b) {
5521 int __cc;
5522 __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc);
5523 return __cc <= 1;
5524}
5525
5526static inline __ATTRS_o_ai int
5527vec_any_lt(__vector unsigned short __a, __vector unsigned short __b) {
5528 int __cc;
5529 __builtin_s390_vchlhs(__b, __a, &__cc);
5530 return __cc <= 1;
5531}
5532
5533// This prototype is deprecated.
5534static inline __ATTRS_o_ai int
5535vec_any_lt(__vector unsigned short __a, __vector __bool short __b) {
5536 int __cc;
5537 __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc);
5538 return __cc <= 1;
5539}
5540
5541// This prototype is deprecated.
5542static inline __ATTRS_o_ai int
5543vec_any_lt(__vector __bool short __a, __vector unsigned short __b) {
5544 int __cc;
5545 __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc);
5546 return __cc <= 1;
5547}
5548
5549// This prototype is deprecated.
5550static inline __ATTRS_o_ai int
5551vec_any_lt(__vector __bool short __a, __vector __bool short __b) {
5552 int __cc;
5553 __builtin_s390_vchlhs((__vector unsigned short)__b,
5554 (__vector unsigned short)__a, &__cc);
5555 return __cc <= 1;
5556}
5557
5558static inline __ATTRS_o_ai int
5559vec_any_lt(__vector signed int __a, __vector signed int __b) {
5560 int __cc;
5561 __builtin_s390_vchfs(__b, __a, &__cc);
5562 return __cc <= 1;
5563}
5564
5565// This prototype is deprecated.
5566static inline __ATTRS_o_ai int
5567vec_any_lt(__vector signed int __a, __vector __bool int __b) {
5568 int __cc;
5569 __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc);
5570 return __cc <= 1;
5571}
5572
5573// This prototype is deprecated.
5574static inline __ATTRS_o_ai int
5575vec_any_lt(__vector __bool int __a, __vector signed int __b) {
5576 int __cc;
5577 __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc);
5578 return __cc <= 1;
5579}
5580
5581static inline __ATTRS_o_ai int
5582vec_any_lt(__vector unsigned int __a, __vector unsigned int __b) {
5583 int __cc;
5584 __builtin_s390_vchlfs(__b, __a, &__cc);
5585 return __cc <= 1;
5586}
5587
5588// This prototype is deprecated.
5589static inline __ATTRS_o_ai int
5590vec_any_lt(__vector unsigned int __a, __vector __bool int __b) {
5591 int __cc;
5592 __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc);
5593 return __cc <= 1;
5594}
5595
5596// This prototype is deprecated.
5597static inline __ATTRS_o_ai int
5598vec_any_lt(__vector __bool int __a, __vector unsigned int __b) {
5599 int __cc;
5600 __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc);
5601 return __cc <= 1;
5602}
5603
5604// This prototype is deprecated.
5605static inline __ATTRS_o_ai int
5606vec_any_lt(__vector __bool int __a, __vector __bool int __b) {
5607 int __cc;
5608 __builtin_s390_vchlfs((__vector unsigned int)__b,
5609 (__vector unsigned int)__a, &__cc);
5610 return __cc <= 1;
5611}
5612
5613static inline __ATTRS_o_ai int
5614vec_any_lt(__vector signed long long __a, __vector signed long long __b) {
5615 int __cc;
5616 __builtin_s390_vchgs(__b, __a, &__cc);
5617 return __cc <= 1;
5618}
5619
5620// This prototype is deprecated.
5621static inline __ATTRS_o_ai int
5622vec_any_lt(__vector signed long long __a, __vector __bool long long __b) {
5623 int __cc;
5624 __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc);
5625 return __cc <= 1;
5626}
5627
5628// This prototype is deprecated.
5629static inline __ATTRS_o_ai int
5630vec_any_lt(__vector __bool long long __a, __vector signed long long __b) {
5631 int __cc;
5632 __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc);
5633 return __cc <= 1;
5634}
5635
5636static inline __ATTRS_o_ai int
5637vec_any_lt(__vector unsigned long long __a, __vector unsigned long long __b) {
5638 int __cc;
5639 __builtin_s390_vchlgs(__b, __a, &__cc);
5640 return __cc <= 1;
5641}
5642
5643// This prototype is deprecated.
5644static inline __ATTRS_o_ai int
5645vec_any_lt(__vector unsigned long long __a, __vector __bool long long __b) {
5646 int __cc;
5647 __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc);
5648 return __cc <= 1;
5649}
5650
5651// This prototype is deprecated.
5652static inline __ATTRS_o_ai int
5653vec_any_lt(__vector __bool long long __a, __vector unsigned long long __b) {
5654 int __cc;
5655 __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc);
5656 return __cc <= 1;
5657}
5658
5659// This prototype is deprecated.
5660static inline __ATTRS_o_ai int
5661vec_any_lt(__vector __bool long long __a, __vector __bool long long __b) {
5662 int __cc;
5663 __builtin_s390_vchlgs((__vector unsigned long long)__b,
5664 (__vector unsigned long long)__a, &__cc);
5665 return __cc <= 1;
5666}
5667
5668#if __ARCH__ >= 12
5669static inline __ATTRS_o_ai int
5670vec_any_lt(__vector float __a, __vector float __b) {
5671 int __cc;
5672 __builtin_s390_vfchsbs(__b, __a, &__cc);
5673 return __cc <= 1;
5674}
5675#endif
5676
5677static inline __ATTRS_o_ai int
5678vec_any_lt(__vector double __a, __vector double __b) {
5679 int __cc;
5680 __builtin_s390_vfchdbs(__b, __a, &__cc);
5681 return __cc <= 1;
5682}
5683
5684/*-- vec_any_nge ------------------------------------------------------------*/
5685
5686#if __ARCH__ >= 12
5687static inline __ATTRS_o_ai int
5688vec_any_nge(__vector float __a, __vector float __b) {
5689 int __cc;
5690 __builtin_s390_vfchesbs(__a, __b, &__cc);
5691 return __cc != 0;
5692}
5693#endif
5694
5695static inline __ATTRS_o_ai int
5696vec_any_nge(__vector double __a, __vector double __b) {
5697 int __cc;
5698 __builtin_s390_vfchedbs(__a, __b, &__cc);
5699 return __cc != 0;
5700}
5701
5702/*-- vec_any_ngt ------------------------------------------------------------*/
5703
5704#if __ARCH__ >= 12
5705static inline __ATTRS_o_ai int
5706vec_any_ngt(__vector float __a, __vector float __b) {
5707 int __cc;
5708 __builtin_s390_vfchsbs(__a, __b, &__cc);
5709 return __cc != 0;
5710}
5711#endif
5712
5713static inline __ATTRS_o_ai int
5714vec_any_ngt(__vector double __a, __vector double __b) {
5715 int __cc;
5716 __builtin_s390_vfchdbs(__a, __b, &__cc);
5717 return __cc != 0;
5718}
5719
5720/*-- vec_any_nle ------------------------------------------------------------*/
5721
5722#if __ARCH__ >= 12
5723static inline __ATTRS_o_ai int
5724vec_any_nle(__vector float __a, __vector float __b) {
5725 int __cc;
5726 __builtin_s390_vfchesbs(__b, __a, &__cc);
5727 return __cc != 0;
5728}
5729#endif
5730
5731static inline __ATTRS_o_ai int
5732vec_any_nle(__vector double __a, __vector double __b) {
5733 int __cc;
5734 __builtin_s390_vfchedbs(__b, __a, &__cc);
5735 return __cc != 0;
5736}
5737
5738/*-- vec_any_nlt ------------------------------------------------------------*/
5739
5740#if __ARCH__ >= 12
5741static inline __ATTRS_o_ai int
5742vec_any_nlt(__vector float __a, __vector float __b) {
5743 int __cc;
5744 __builtin_s390_vfchsbs(__b, __a, &__cc);
5745 return __cc != 0;
5746}
5747#endif
5748
5749static inline __ATTRS_o_ai int
5750vec_any_nlt(__vector double __a, __vector double __b) {
5751 int __cc;
5752 __builtin_s390_vfchdbs(__b, __a, &__cc);
5753 return __cc != 0;
5754}
5755
5756/*-- vec_any_nan ------------------------------------------------------------*/
5757
5758#if __ARCH__ >= 12
5759static inline __ATTRS_o_ai int
5760vec_any_nan(__vector float __a) {
5761 int __cc;
5762 __builtin_s390_vftcisb(__a, 15, &__cc);
5763 return __cc != 3;
5764}
5765#endif
5766
5767static inline __ATTRS_o_ai int
5768vec_any_nan(__vector double __a) {
5769 int __cc;
5770 __builtin_s390_vftcidb(__a, 15, &__cc);
5771 return __cc != 3;
5772}
5773
5774/*-- vec_any_numeric --------------------------------------------------------*/
5775
5776#if __ARCH__ >= 12
5777static inline __ATTRS_o_ai int
5778vec_any_numeric(__vector float __a) {
5779 int __cc;
5780 __builtin_s390_vftcisb(__a, 15, &__cc);
5781 return __cc != 0;
5782}
5783#endif
5784
5785static inline __ATTRS_o_ai int
5786vec_any_numeric(__vector double __a) {
5787 int __cc;
5788 __builtin_s390_vftcidb(__a, 15, &__cc);
5789 return __cc != 0;
5790}
5791
5792/*-- vec_andc ---------------------------------------------------------------*/
5793
5794static inline __ATTRS_o_ai __vector __bool char
5795vec_andc(__vector __bool char __a, __vector __bool char __b) {
5796 return __a & ~__b;
5797}
5798
5799static inline __ATTRS_o_ai __vector signed char
5800vec_andc(__vector signed char __a, __vector signed char __b) {
5801 return __a & ~__b;
5802}
5803
5804// This prototype is deprecated.
5805static inline __ATTRS_o_ai __vector signed char
5806vec_andc(__vector __bool char __a, __vector signed char __b) {
5807 return __a & ~__b;
5808}
5809
5810// This prototype is deprecated.
5811static inline __ATTRS_o_ai __vector signed char
5812vec_andc(__vector signed char __a, __vector __bool char __b) {
5813 return __a & ~__b;
5814}
5815
5816static inline __ATTRS_o_ai __vector unsigned char
5817vec_andc(__vector unsigned char __a, __vector unsigned char __b) {
5818 return __a & ~__b;
5819}
5820
5821// This prototype is deprecated.
5822static inline __ATTRS_o_ai __vector unsigned char
5823vec_andc(__vector __bool char __a, __vector unsigned char __b) {
5824 return __a & ~__b;
5825}
5826
5827// This prototype is deprecated.
5828static inline __ATTRS_o_ai __vector unsigned char
5829vec_andc(__vector unsigned char __a, __vector __bool char __b) {
5830 return __a & ~__b;
5831}
5832
5833static inline __ATTRS_o_ai __vector __bool short
5834vec_andc(__vector __bool short __a, __vector __bool short __b) {
5835 return __a & ~__b;
5836}
5837
5838static inline __ATTRS_o_ai __vector signed short
5839vec_andc(__vector signed short __a, __vector signed short __b) {
5840 return __a & ~__b;
5841}
5842
5843// This prototype is deprecated.
5844static inline __ATTRS_o_ai __vector signed short
5845vec_andc(__vector __bool short __a, __vector signed short __b) {
5846 return __a & ~__b;
5847}
5848
5849// This prototype is deprecated.
5850static inline __ATTRS_o_ai __vector signed short
5851vec_andc(__vector signed short __a, __vector __bool short __b) {
5852 return __a & ~__b;
5853}
5854
5855static inline __ATTRS_o_ai __vector unsigned short
5856vec_andc(__vector unsigned short __a, __vector unsigned short __b) {
5857 return __a & ~__b;
5858}
5859
5860// This prototype is deprecated.
5861static inline __ATTRS_o_ai __vector unsigned short
5862vec_andc(__vector __bool short __a, __vector unsigned short __b) {
5863 return __a & ~__b;
5864}
5865
5866// This prototype is deprecated.
5867static inline __ATTRS_o_ai __vector unsigned short
5868vec_andc(__vector unsigned short __a, __vector __bool short __b) {
5869 return __a & ~__b;
5870}
5871
5872static inline __ATTRS_o_ai __vector __bool int
5873vec_andc(__vector __bool int __a, __vector __bool int __b) {
5874 return __a & ~__b;
5875}
5876
5877static inline __ATTRS_o_ai __vector signed int
5878vec_andc(__vector signed int __a, __vector signed int __b) {
5879 return __a & ~__b;
5880}
5881
5882// This prototype is deprecated.
5883static inline __ATTRS_o_ai __vector signed int
5884vec_andc(__vector __bool int __a, __vector signed int __b) {
5885 return __a & ~__b;
5886}
5887
5888// This prototype is deprecated.
5889static inline __ATTRS_o_ai __vector signed int
5890vec_andc(__vector signed int __a, __vector __bool int __b) {
5891 return __a & ~__b;
5892}
5893
5894static inline __ATTRS_o_ai __vector unsigned int
5895vec_andc(__vector unsigned int __a, __vector unsigned int __b) {
5896 return __a & ~__b;
5897}
5898
5899// This prototype is deprecated.
5900static inline __ATTRS_o_ai __vector unsigned int
5901vec_andc(__vector __bool int __a, __vector unsigned int __b) {
5902 return __a & ~__b;
5903}
5904
5905// This prototype is deprecated.
5906static inline __ATTRS_o_ai __vector unsigned int
5907vec_andc(__vector unsigned int __a, __vector __bool int __b) {
5908 return __a & ~__b;
5909}
5910
5911static inline __ATTRS_o_ai __vector __bool long long
5912vec_andc(__vector __bool long long __a, __vector __bool long long __b) {
5913 return __a & ~__b;
5914}
5915
5916static inline __ATTRS_o_ai __vector signed long long
5917vec_andc(__vector signed long long __a, __vector signed long long __b) {
5918 return __a & ~__b;
5919}
5920
5921// This prototype is deprecated.
5922static inline __ATTRS_o_ai __vector signed long long
5923vec_andc(__vector __bool long long __a, __vector signed long long __b) {
5924 return __a & ~__b;
5925}
5926
5927// This prototype is deprecated.
5928static inline __ATTRS_o_ai __vector signed long long
5929vec_andc(__vector signed long long __a, __vector __bool long long __b) {
5930 return __a & ~__b;
5931}
5932
5933static inline __ATTRS_o_ai __vector unsigned long long
5934vec_andc(__vector unsigned long long __a, __vector unsigned long long __b) {
5935 return __a & ~__b;
5936}
5937
5938// This prototype is deprecated.
5939static inline __ATTRS_o_ai __vector unsigned long long
5940vec_andc(__vector __bool long long __a, __vector unsigned long long __b) {
5941 return __a & ~__b;
5942}
5943
5944// This prototype is deprecated.
5945static inline __ATTRS_o_ai __vector unsigned long long
5946vec_andc(__vector unsigned long long __a, __vector __bool long long __b) {
5947 return __a & ~__b;
5948}
5949
5950#if __ARCH__ >= 12
5951static inline __ATTRS_o_ai __vector float
5952vec_andc(__vector float __a, __vector float __b) {
5953 return (__vector float)((__vector unsigned int)__a &
5954 ~(__vector unsigned int)__b);
5955}
5956#endif
5957
5958static inline __ATTRS_o_ai __vector double
5959vec_andc(__vector double __a, __vector double __b) {
5960 return (__vector double)((__vector unsigned long long)__a &
5961 ~(__vector unsigned long long)__b);
5962}
5963
5964// This prototype is deprecated.
5965static inline __ATTRS_o_ai __vector double
5966vec_andc(__vector __bool long long __a, __vector double __b) {
5967 return (__vector double)((__vector unsigned long long)__a &
5968 ~(__vector unsigned long long)__b);
5969}
5970
5971// This prototype is deprecated.
5972static inline __ATTRS_o_ai __vector double
5973vec_andc(__vector double __a, __vector __bool long long __b) {
5974 return (__vector double)((__vector unsigned long long)__a &
5975 ~(__vector unsigned long long)__b);
5976}
5977
5978/*-- vec_nor ----------------------------------------------------------------*/
5979
5980static inline __ATTRS_o_ai __vector __bool char
5981vec_nor(__vector __bool char __a, __vector __bool char __b) {
5982 return ~(__a | __b);
5983}
5984
5985static inline __ATTRS_o_ai __vector signed char
5986vec_nor(__vector signed char __a, __vector signed char __b) {
5987 return ~(__a | __b);
5988}
5989
5990// This prototype is deprecated.
5991static inline __ATTRS_o_ai __vector signed char
5992vec_nor(__vector __bool char __a, __vector signed char __b) {
5993 return ~(__a | __b);
5994}
5995
5996// This prototype is deprecated.
5997static inline __ATTRS_o_ai __vector signed char
5998vec_nor(__vector signed char __a, __vector __bool char __b) {
5999 return ~(__a | __b);
6000}
6001
6002static inline __ATTRS_o_ai __vector unsigned char
6003vec_nor(__vector unsigned char __a, __vector unsigned char __b) {
6004 return ~(__a | __b);
6005}
6006
6007// This prototype is deprecated.
6008static inline __ATTRS_o_ai __vector unsigned char
6009vec_nor(__vector __bool char __a, __vector unsigned char __b) {
6010 return ~(__a | __b);
6011}
6012
6013// This prototype is deprecated.
6014static inline __ATTRS_o_ai __vector unsigned char
6015vec_nor(__vector unsigned char __a, __vector __bool char __b) {
6016 return ~(__a | __b);
6017}
6018
6019static inline __ATTRS_o_ai __vector __bool short
6020vec_nor(__vector __bool short __a, __vector __bool short __b) {
6021 return ~(__a | __b);
6022}
6023
6024static inline __ATTRS_o_ai __vector signed short
6025vec_nor(__vector signed short __a, __vector signed short __b) {
6026 return ~(__a | __b);
6027}
6028
6029// This prototype is deprecated.
6030static inline __ATTRS_o_ai __vector signed short
6031vec_nor(__vector __bool short __a, __vector signed short __b) {
6032 return ~(__a | __b);
6033}
6034
6035// This prototype is deprecated.
6036static inline __ATTRS_o_ai __vector signed short
6037vec_nor(__vector signed short __a, __vector __bool short __b) {
6038 return ~(__a | __b);
6039}
6040
6041static inline __ATTRS_o_ai __vector unsigned short
6042vec_nor(__vector unsigned short __a, __vector unsigned short __b) {
6043 return ~(__a | __b);
6044}
6045
6046// This prototype is deprecated.
6047static inline __ATTRS_o_ai __vector unsigned short
6048vec_nor(__vector __bool short __a, __vector unsigned short __b) {
6049 return ~(__a | __b);
6050}
6051
6052// This prototype is deprecated.
6053static inline __ATTRS_o_ai __vector unsigned short
6054vec_nor(__vector unsigned short __a, __vector __bool short __b) {
6055 return ~(__a | __b);
6056}
6057
6058static inline __ATTRS_o_ai __vector __bool int
6059vec_nor(__vector __bool int __a, __vector __bool int __b) {
6060 return ~(__a | __b);
6061}
6062
6063static inline __ATTRS_o_ai __vector signed int
6064vec_nor(__vector signed int __a, __vector signed int __b) {
6065 return ~(__a | __b);
6066}
6067
6068// This prototype is deprecated.
6069static inline __ATTRS_o_ai __vector signed int
6070vec_nor(__vector __bool int __a, __vector signed int __b) {
6071 return ~(__a | __b);
6072}
6073
6074// This prototype is deprecated.
6075static inline __ATTRS_o_ai __vector signed int
6076vec_nor(__vector signed int __a, __vector __bool int __b) {
6077 return ~(__a | __b);
6078}
6079
6080static inline __ATTRS_o_ai __vector unsigned int
6081vec_nor(__vector unsigned int __a, __vector unsigned int __b) {
6082 return ~(__a | __b);
6083}
6084
6085// This prototype is deprecated.
6086static inline __ATTRS_o_ai __vector unsigned int
6087vec_nor(__vector __bool int __a, __vector unsigned int __b) {
6088 return ~(__a | __b);
6089}
6090
6091// This prototype is deprecated.
6092static inline __ATTRS_o_ai __vector unsigned int
6093vec_nor(__vector unsigned int __a, __vector __bool int __b) {
6094 return ~(__a | __b);
6095}
6096
6097static inline __ATTRS_o_ai __vector __bool long long
6098vec_nor(__vector __bool long long __a, __vector __bool long long __b) {
6099 return ~(__a | __b);
6100}
6101
6102static inline __ATTRS_o_ai __vector signed long long
6103vec_nor(__vector signed long long __a, __vector signed long long __b) {
6104 return ~(__a | __b);
6105}
6106
6107// This prototype is deprecated.
6108static inline __ATTRS_o_ai __vector signed long long
6109vec_nor(__vector __bool long long __a, __vector signed long long __b) {
6110 return ~(__a | __b);
6111}
6112
6113// This prototype is deprecated.
6114static inline __ATTRS_o_ai __vector signed long long
6115vec_nor(__vector signed long long __a, __vector __bool long long __b) {
6116 return ~(__a | __b);
6117}
6118
6119static inline __ATTRS_o_ai __vector unsigned long long
6120vec_nor(__vector unsigned long long __a, __vector unsigned long long __b) {
6121 return ~(__a | __b);
6122}
6123
6124// This prototype is deprecated.
6125static inline __ATTRS_o_ai __vector unsigned long long
6126vec_nor(__vector __bool long long __a, __vector unsigned long long __b) {
6127 return ~(__a | __b);
6128}
6129
6130// This prototype is deprecated.
6131static inline __ATTRS_o_ai __vector unsigned long long
6132vec_nor(__vector unsigned long long __a, __vector __bool long long __b) {
6133 return ~(__a | __b);
6134}
6135
6136#if __ARCH__ >= 12
6137static inline __ATTRS_o_ai __vector float
6138vec_nor(__vector float __a, __vector float __b) {
6139 return (__vector float)~((__vector unsigned int)__a |
6140 (__vector unsigned int)__b);
6141}
6142#endif
6143
6144static inline __ATTRS_o_ai __vector double
6145vec_nor(__vector double __a, __vector double __b) {
6146 return (__vector double)~((__vector unsigned long long)__a |
6147 (__vector unsigned long long)__b);
6148}
6149
6150// This prototype is deprecated.
6151static inline __ATTRS_o_ai __vector double
6152vec_nor(__vector __bool long long __a, __vector double __b) {
6153 return (__vector double)~((__vector unsigned long long)__a |
6154 (__vector unsigned long long)__b);
6155}
6156
6157// This prototype is deprecated.
6158static inline __ATTRS_o_ai __vector double
6159vec_nor(__vector double __a, __vector __bool long long __b) {
6160 return (__vector double)~((__vector unsigned long long)__a |
6161 (__vector unsigned long long)__b);
6162}
6163
6164/*-- vec_orc ----------------------------------------------------------------*/
6165
6166#if __ARCH__ >= 12
6167static inline __ATTRS_o_ai __vector __bool char
6168vec_orc(__vector __bool char __a, __vector __bool char __b) {
6169 return __a | ~__b;
6170}
6171
6172static inline __ATTRS_o_ai __vector signed char
6173vec_orc(__vector signed char __a, __vector signed char __b) {
6174 return __a | ~__b;
6175}
6176
6177static inline __ATTRS_o_ai __vector unsigned char
6178vec_orc(__vector unsigned char __a, __vector unsigned char __b) {
6179 return __a | ~__b;
6180}
6181
6182static inline __ATTRS_o_ai __vector __bool short
6183vec_orc(__vector __bool short __a, __vector __bool short __b) {
6184 return __a | ~__b;
6185}
6186
6187static inline __ATTRS_o_ai __vector signed short
6188vec_orc(__vector signed short __a, __vector signed short __b) {
6189 return __a | ~__b;
6190}
6191
6192static inline __ATTRS_o_ai __vector unsigned short
6193vec_orc(__vector unsigned short __a, __vector unsigned short __b) {
6194 return __a | ~__b;
6195}
6196
6197static inline __ATTRS_o_ai __vector __bool int
6198vec_orc(__vector __bool int __a, __vector __bool int __b) {
6199 return __a | ~__b;
6200}
6201
6202static inline __ATTRS_o_ai __vector signed int
6203vec_orc(__vector signed int __a, __vector signed int __b) {
6204 return __a | ~__b;
6205}
6206
6207static inline __ATTRS_o_ai __vector unsigned int
6208vec_orc(__vector unsigned int __a, __vector unsigned int __b) {
6209 return __a | ~__b;
6210}
6211
6212static inline __ATTRS_o_ai __vector __bool long long
6213vec_orc(__vector __bool long long __a, __vector __bool long long __b) {
6214 return __a | ~__b;
6215}
6216
6217static inline __ATTRS_o_ai __vector signed long long
6218vec_orc(__vector signed long long __a, __vector signed long long __b) {
6219 return __a | ~__b;
6220}
6221
6222static inline __ATTRS_o_ai __vector unsigned long long
6223vec_orc(__vector unsigned long long __a, __vector unsigned long long __b) {
6224 return __a | ~__b;
6225}
6226
6227static inline __ATTRS_o_ai __vector float
6228vec_orc(__vector float __a, __vector float __b) {
6229 return (__vector float)((__vector unsigned int)__a |
6230 ~(__vector unsigned int)__b);
6231}
6232
6233static inline __ATTRS_o_ai __vector double
6234vec_orc(__vector double __a, __vector double __b) {
6235 return (__vector double)((__vector unsigned long long)__a |
6236 ~(__vector unsigned long long)__b);
6237}
6238#endif
6239
6240/*-- vec_nand ---------------------------------------------------------------*/
6241
6242#if __ARCH__ >= 12
6243static inline __ATTRS_o_ai __vector __bool char
6244vec_nand(__vector __bool char __a, __vector __bool char __b) {
6245 return ~(__a & __b);
6246}
6247
6248static inline __ATTRS_o_ai __vector signed char
6249vec_nand(__vector signed char __a, __vector signed char __b) {
6250 return ~(__a & __b);
6251}
6252
6253static inline __ATTRS_o_ai __vector unsigned char
6254vec_nand(__vector unsigned char __a, __vector unsigned char __b) {
6255 return ~(__a & __b);
6256}
6257
6258static inline __ATTRS_o_ai __vector __bool short
6259vec_nand(__vector __bool short __a, __vector __bool short __b) {
6260 return ~(__a & __b);
6261}
6262
6263static inline __ATTRS_o_ai __vector signed short
6264vec_nand(__vector signed short __a, __vector signed short __b) {
6265 return ~(__a & __b);
6266}
6267
6268static inline __ATTRS_o_ai __vector unsigned short
6269vec_nand(__vector unsigned short __a, __vector unsigned short __b) {
6270 return ~(__a & __b);
6271}
6272
6273static inline __ATTRS_o_ai __vector __bool int
6274vec_nand(__vector __bool int __a, __vector __bool int __b) {
6275 return ~(__a & __b);
6276}
6277
6278static inline __ATTRS_o_ai __vector signed int
6279vec_nand(__vector signed int __a, __vector signed int __b) {
6280 return ~(__a & __b);
6281}
6282
6283static inline __ATTRS_o_ai __vector unsigned int
6284vec_nand(__vector unsigned int __a, __vector unsigned int __b) {
6285 return ~(__a & __b);
6286}
6287
6288static inline __ATTRS_o_ai __vector __bool long long
6289vec_nand(__vector __bool long long __a, __vector __bool long long __b) {
6290 return ~(__a & __b);
6291}
6292
6293static inline __ATTRS_o_ai __vector signed long long
6294vec_nand(__vector signed long long __a, __vector signed long long __b) {
6295 return ~(__a & __b);
6296}
6297
6298static inline __ATTRS_o_ai __vector unsigned long long
6299vec_nand(__vector unsigned long long __a, __vector unsigned long long __b) {
6300 return ~(__a & __b);
6301}
6302
6303static inline __ATTRS_o_ai __vector float
6304vec_nand(__vector float __a, __vector float __b) {
6305 return (__vector float)~((__vector unsigned int)__a &
6306 (__vector unsigned int)__b);
6307}
6308
6309static inline __ATTRS_o_ai __vector double
6310vec_nand(__vector double __a, __vector double __b) {
6311 return (__vector double)~((__vector unsigned long long)__a &
6312 (__vector unsigned long long)__b);
6313}
6314#endif
6315
6316/*-- vec_eqv ----------------------------------------------------------------*/
6317
6318#if __ARCH__ >= 12
6319static inline __ATTRS_o_ai __vector __bool char
6320vec_eqv(__vector __bool char __a, __vector __bool char __b) {
6321 return ~(__a ^ __b);
6322}
6323
6324static inline __ATTRS_o_ai __vector signed char
6325vec_eqv(__vector signed char __a, __vector signed char __b) {
6326 return ~(__a ^ __b);
6327}
6328
6329static inline __ATTRS_o_ai __vector unsigned char
6330vec_eqv(__vector unsigned char __a, __vector unsigned char __b) {
6331 return ~(__a ^ __b);
6332}
6333
6334static inline __ATTRS_o_ai __vector __bool short
6335vec_eqv(__vector __bool short __a, __vector __bool short __b) {
6336 return ~(__a ^ __b);
6337}
6338
6339static inline __ATTRS_o_ai __vector signed short
6340vec_eqv(__vector signed short __a, __vector signed short __b) {
6341 return ~(__a ^ __b);
6342}
6343
6344static inline __ATTRS_o_ai __vector unsigned short
6345vec_eqv(__vector unsigned short __a, __vector unsigned short __b) {
6346 return ~(__a ^ __b);
6347}
6348
6349static inline __ATTRS_o_ai __vector __bool int
6350vec_eqv(__vector __bool int __a, __vector __bool int __b) {
6351 return ~(__a ^ __b);
6352}
6353
6354static inline __ATTRS_o_ai __vector signed int
6355vec_eqv(__vector signed int __a, __vector signed int __b) {
6356 return ~(__a ^ __b);
6357}
6358
6359static inline __ATTRS_o_ai __vector unsigned int
6360vec_eqv(__vector unsigned int __a, __vector unsigned int __b) {
6361 return ~(__a ^ __b);
6362}
6363
6364static inline __ATTRS_o_ai __vector __bool long long
6365vec_eqv(__vector __bool long long __a, __vector __bool long long __b) {
6366 return ~(__a ^ __b);
6367}
6368
6369static inline __ATTRS_o_ai __vector signed long long
6370vec_eqv(__vector signed long long __a, __vector signed long long __b) {
6371 return ~(__a ^ __b);
6372}
6373
6374static inline __ATTRS_o_ai __vector unsigned long long
6375vec_eqv(__vector unsigned long long __a, __vector unsigned long long __b) {
6376 return ~(__a ^ __b);
6377}
6378
6379static inline __ATTRS_o_ai __vector float
6380vec_eqv(__vector float __a, __vector float __b) {
6381 return (__vector float)~((__vector unsigned int)__a ^
6382 (__vector unsigned int)__b);
6383}
6384
6385static inline __ATTRS_o_ai __vector double
6386vec_eqv(__vector double __a, __vector double __b) {
6387 return (__vector double)~((__vector unsigned long long)__a ^
6388 (__vector unsigned long long)__b);
6389}
6390#endif
6391
6392/*-- vec_cntlz --------------------------------------------------------------*/
6393
6394static inline __ATTRS_o_ai __vector unsigned char
6395vec_cntlz(__vector signed char __a) {
6396 return __builtin_s390_vclzb((__vector unsigned char)__a);
6397}
6398
6399static inline __ATTRS_o_ai __vector unsigned char
6400vec_cntlz(__vector unsigned char __a) {
6401 return __builtin_s390_vclzb(__a);
6402}
6403
6404static inline __ATTRS_o_ai __vector unsigned short
6405vec_cntlz(__vector signed short __a) {
6406 return __builtin_s390_vclzh((__vector unsigned short)__a);
6407}
6408
6409static inline __ATTRS_o_ai __vector unsigned short
6410vec_cntlz(__vector unsigned short __a) {
6411 return __builtin_s390_vclzh(__a);
6412}
6413
6414static inline __ATTRS_o_ai __vector unsigned int
6415vec_cntlz(__vector signed int __a) {
6416 return __builtin_s390_vclzf((__vector unsigned int)__a);
6417}
6418
6419static inline __ATTRS_o_ai __vector unsigned int
6420vec_cntlz(__vector unsigned int __a) {
6421 return __builtin_s390_vclzf(__a);
6422}
6423
6424static inline __ATTRS_o_ai __vector unsigned long long
6425vec_cntlz(__vector signed long long __a) {
6426 return __builtin_s390_vclzg((__vector unsigned long long)__a);
6427}
6428
6429static inline __ATTRS_o_ai __vector unsigned long long
6430vec_cntlz(__vector unsigned long long __a) {
6431 return __builtin_s390_vclzg(__a);
6432}
6433
6434/*-- vec_cnttz --------------------------------------------------------------*/
6435
6436static inline __ATTRS_o_ai __vector unsigned char
6437vec_cnttz(__vector signed char __a) {
6438 return __builtin_s390_vctzb((__vector unsigned char)__a);
6439}
6440
6441static inline __ATTRS_o_ai __vector unsigned char
6442vec_cnttz(__vector unsigned char __a) {
6443 return __builtin_s390_vctzb(__a);
6444}
6445
6446static inline __ATTRS_o_ai __vector unsigned short
6447vec_cnttz(__vector signed short __a) {
6448 return __builtin_s390_vctzh((__vector unsigned short)__a);
6449}
6450
6451static inline __ATTRS_o_ai __vector unsigned short
6452vec_cnttz(__vector unsigned short __a) {
6453 return __builtin_s390_vctzh(__a);
6454}
6455
6456static inline __ATTRS_o_ai __vector unsigned int
6457vec_cnttz(__vector signed int __a) {
6458 return __builtin_s390_vctzf((__vector unsigned int)__a);
6459}
6460
6461static inline __ATTRS_o_ai __vector unsigned int
6462vec_cnttz(__vector unsigned int __a) {
6463 return __builtin_s390_vctzf(__a);
6464}
6465
6466static inline __ATTRS_o_ai __vector unsigned long long
6467vec_cnttz(__vector signed long long __a) {
6468 return __builtin_s390_vctzg((__vector unsigned long long)__a);
6469}
6470
6471static inline __ATTRS_o_ai __vector unsigned long long
6472vec_cnttz(__vector unsigned long long __a) {
6473 return __builtin_s390_vctzg(__a);
6474}
6475
6476/*-- vec_popcnt -------------------------------------------------------------*/
6477
6478static inline __ATTRS_o_ai __vector unsigned char
6479vec_popcnt(__vector signed char __a) {
6480 return __builtin_elementwise_popcount((__vector unsigned char)__a);
6481}
6482
6483static inline __ATTRS_o_ai __vector unsigned char
6484vec_popcnt(__vector unsigned char __a) {
6485 return __builtin_elementwise_popcount(__a);
6486}
6487
6488static inline __ATTRS_o_ai __vector unsigned short
6489vec_popcnt(__vector signed short __a) {
6490 return __builtin_elementwise_popcount((__vector unsigned short)__a);
6491}
6492
6493static inline __ATTRS_o_ai __vector unsigned short
6494vec_popcnt(__vector unsigned short __a) {
6495 return __builtin_elementwise_popcount(__a);
6496}
6497
6498static inline __ATTRS_o_ai __vector unsigned int
6499vec_popcnt(__vector signed int __a) {
6500 return __builtin_elementwise_popcount((__vector unsigned int)__a);
6501}
6502
6503static inline __ATTRS_o_ai __vector unsigned int
6504vec_popcnt(__vector unsigned int __a) {
6505 return __builtin_elementwise_popcount(__a);
6506}
6507
6508static inline __ATTRS_o_ai __vector unsigned long long
6509vec_popcnt(__vector signed long long __a) {
6510 return __builtin_elementwise_popcount((__vector unsigned long long)__a);
6511}
6512
6513static inline __ATTRS_o_ai __vector unsigned long long
6514vec_popcnt(__vector unsigned long long __a) {
6515 return __builtin_elementwise_popcount(__a);
6516}
6517
6518/*-- vec_rl -----------------------------------------------------------------*/
6519
6520static inline __ATTRS_o_ai __vector signed char
6521vec_rl(__vector signed char __a, __vector unsigned char __b) {
6522 return (__vector signed char)__builtin_s390_verllvb(
6523 (__vector unsigned char)__a, __b);
6524}
6525
6526static inline __ATTRS_o_ai __vector unsigned char
6527vec_rl(__vector unsigned char __a, __vector unsigned char __b) {
6528 return __builtin_s390_verllvb(__a, __b);
6529}
6530
6531static inline __ATTRS_o_ai __vector signed short
6532vec_rl(__vector signed short __a, __vector unsigned short __b) {
6533 return (__vector signed short)__builtin_s390_verllvh(
6534 (__vector unsigned short)__a, __b);
6535}
6536
6537static inline __ATTRS_o_ai __vector unsigned short
6538vec_rl(__vector unsigned short __a, __vector unsigned short __b) {
6539 return __builtin_s390_verllvh(__a, __b);
6540}
6541
6542static inline __ATTRS_o_ai __vector signed int
6543vec_rl(__vector signed int __a, __vector unsigned int __b) {
6544 return (__vector signed int)__builtin_s390_verllvf(
6545 (__vector unsigned int)__a, __b);
6546}
6547
6548static inline __ATTRS_o_ai __vector unsigned int
6549vec_rl(__vector unsigned int __a, __vector unsigned int __b) {
6550 return __builtin_s390_verllvf(__a, __b);
6551}
6552
6553static inline __ATTRS_o_ai __vector signed long long
6554vec_rl(__vector signed long long __a, __vector unsigned long long __b) {
6555 return (__vector signed long long)__builtin_s390_verllvg(
6556 (__vector unsigned long long)__a, __b);
6557}
6558
6559static inline __ATTRS_o_ai __vector unsigned long long
6560vec_rl(__vector unsigned long long __a, __vector unsigned long long __b) {
6561 return __builtin_s390_verllvg(__a, __b);
6562}
6563
6564/*-- vec_rli ----------------------------------------------------------------*/
6565
6566static inline __ATTRS_o_ai __vector signed char
6567vec_rli(__vector signed char __a, unsigned long __b) {
6568 return (__vector signed char)__builtin_s390_verllb(
6569 (__vector unsigned char)__a, (unsigned char)__b);
6570}
6571
6572static inline __ATTRS_o_ai __vector unsigned char
6573vec_rli(__vector unsigned char __a, unsigned long __b) {
6574 return __builtin_s390_verllb(__a, (unsigned char)__b);
6575}
6576
6577static inline __ATTRS_o_ai __vector signed short
6578vec_rli(__vector signed short __a, unsigned long __b) {
6579 return (__vector signed short)__builtin_s390_verllh(
6580 (__vector unsigned short)__a, (unsigned char)__b);
6581}
6582
6583static inline __ATTRS_o_ai __vector unsigned short
6584vec_rli(__vector unsigned short __a, unsigned long __b) {
6585 return __builtin_s390_verllh(__a, (unsigned char)__b);
6586}
6587
6588static inline __ATTRS_o_ai __vector signed int
6589vec_rli(__vector signed int __a, unsigned long __b) {
6590 return (__vector signed int)__builtin_s390_verllf(
6591 (__vector unsigned int)__a, (unsigned char)__b);
6592}
6593
6594static inline __ATTRS_o_ai __vector unsigned int
6595vec_rli(__vector unsigned int __a, unsigned long __b) {
6596 return __builtin_s390_verllf(__a, (unsigned char)__b);
6597}
6598
6599static inline __ATTRS_o_ai __vector signed long long
6600vec_rli(__vector signed long long __a, unsigned long __b) {
6601 return (__vector signed long long)__builtin_s390_verllg(
6602 (__vector unsigned long long)__a, (unsigned char)__b);
6603}
6604
6605static inline __ATTRS_o_ai __vector unsigned long long
6606vec_rli(__vector unsigned long long __a, unsigned long __b) {
6607 return __builtin_s390_verllg(__a, (unsigned char)__b);
6608}
6609
6610/*-- vec_rl_mask ------------------------------------------------------------*/
6611
6612extern __ATTRS_o __vector signed char
6613vec_rl_mask(__vector signed char __a, __vector unsigned char __b,
6614 unsigned char __c) __constant(__c);
6615
6616extern __ATTRS_o __vector unsigned char
6617vec_rl_mask(__vector unsigned char __a, __vector unsigned char __b,
6618 unsigned char __c) __constant(__c);
6619
6620extern __ATTRS_o __vector signed short
6621vec_rl_mask(__vector signed short __a, __vector unsigned short __b,
6622 unsigned char __c) __constant(__c);
6623
6624extern __ATTRS_o __vector unsigned short
6625vec_rl_mask(__vector unsigned short __a, __vector unsigned short __b,
6626 unsigned char __c) __constant(__c);
6627
6628extern __ATTRS_o __vector signed int
6629vec_rl_mask(__vector signed int __a, __vector unsigned int __b,
6630 unsigned char __c) __constant(__c);
6631
6632extern __ATTRS_o __vector unsigned int
6633vec_rl_mask(__vector unsigned int __a, __vector unsigned int __b,
6634 unsigned char __c) __constant(__c);
6635
6636extern __ATTRS_o __vector signed long long
6637vec_rl_mask(__vector signed long long __a, __vector unsigned long long __b,
6638 unsigned char __c) __constant(__c);
6639
6640extern __ATTRS_o __vector unsigned long long
6641vec_rl_mask(__vector unsigned long long __a, __vector unsigned long long __b,
6642 unsigned char __c) __constant(__c);
6643
6644#define vec_rl_mask(X, Y, Z) ((__typeof__((vec_rl_mask)((X), (Y), (Z)))) \
6645 __extension__ ({ \
6646 __vector unsigned char __res; \
6647 __vector unsigned char __x = (__vector unsigned char)(X); \
6648 __vector unsigned char __y = (__vector unsigned char)(Y); \
6649 switch (sizeof ((X)[0])) { \
6650 case 1: __res = (__vector unsigned char) __builtin_s390_verimb( \
6651 (__vector unsigned char)__x, (__vector unsigned char)__x, \
6652 (__vector unsigned char)__y, (Z)); break; \
6653 case 2: __res = (__vector unsigned char) __builtin_s390_verimh( \
6654 (__vector unsigned short)__x, (__vector unsigned short)__x, \
6655 (__vector unsigned short)__y, (Z)); break; \
6656 case 4: __res = (__vector unsigned char) __builtin_s390_verimf( \
6657 (__vector unsigned int)__x, (__vector unsigned int)__x, \
6658 (__vector unsigned int)__y, (Z)); break; \
6659 default: __res = (__vector unsigned char) __builtin_s390_verimg( \
6660 (__vector unsigned long long)__x, (__vector unsigned long long)__x, \
6661 (__vector unsigned long long)__y, (Z)); break; \
6662 } __res; }))
6663
6664/*-- vec_sll ----------------------------------------------------------------*/
6665
6666static inline __ATTRS_o_ai __vector signed char
6667vec_sll(__vector signed char __a, __vector unsigned char __b) {
6668 return (__vector signed char)__builtin_s390_vsl(
6669 (__vector unsigned char)__a, __b);
6670}
6671
6672// This prototype is deprecated.
6673static inline __ATTRS_o_ai __vector signed char
6674vec_sll(__vector signed char __a, __vector unsigned short __b) {
6675 return (__vector signed char)__builtin_s390_vsl(
6676 (__vector unsigned char)__a, (__vector unsigned char)__b);
6677}
6678
6679// This prototype is deprecated.
6680static inline __ATTRS_o_ai __vector signed char
6681vec_sll(__vector signed char __a, __vector unsigned int __b) {
6682 return (__vector signed char)__builtin_s390_vsl(
6683 (__vector unsigned char)__a, (__vector unsigned char)__b);
6684}
6685
6686// This prototype is deprecated.
6687static inline __ATTRS_o_ai __vector __bool char
6688vec_sll(__vector __bool char __a, __vector unsigned char __b) {
6689 return (__vector __bool char)__builtin_s390_vsl(
6690 (__vector unsigned char)__a, __b);
6691}
6692
6693// This prototype is deprecated.
6694static inline __ATTRS_o_ai __vector __bool char
6695vec_sll(__vector __bool char __a, __vector unsigned short __b) {
6696 return (__vector __bool char)__builtin_s390_vsl(
6697 (__vector unsigned char)__a, (__vector unsigned char)__b);
6698}
6699
6700// This prototype is deprecated.
6701static inline __ATTRS_o_ai __vector __bool char
6702vec_sll(__vector __bool char __a, __vector unsigned int __b) {
6703 return (__vector __bool char)__builtin_s390_vsl(
6704 (__vector unsigned char)__a, (__vector unsigned char)__b);
6705}
6706
6707static inline __ATTRS_o_ai __vector unsigned char
6708vec_sll(__vector unsigned char __a, __vector unsigned char __b) {
6709 return __builtin_s390_vsl(__a, __b);
6710}
6711
6712// This prototype is deprecated.
6713static inline __ATTRS_o_ai __vector unsigned char
6714vec_sll(__vector unsigned char __a, __vector unsigned short __b) {
6715 return __builtin_s390_vsl(__a, (__vector unsigned char)__b);
6716}
6717
6718// This prototype is deprecated.
6719static inline __ATTRS_o_ai __vector unsigned char
6720vec_sll(__vector unsigned char __a, __vector unsigned int __b) {
6721 return __builtin_s390_vsl(__a, (__vector unsigned char)__b);
6722}
6723
6724static inline __ATTRS_o_ai __vector signed short
6725vec_sll(__vector signed short __a, __vector unsigned char __b) {
6726 return (__vector signed short)__builtin_s390_vsl(
6727 (__vector unsigned char)__a, __b);
6728}
6729
6730// This prototype is deprecated.
6731static inline __ATTRS_o_ai __vector signed short
6732vec_sll(__vector signed short __a, __vector unsigned short __b) {
6733 return (__vector signed short)__builtin_s390_vsl(
6734 (__vector unsigned char)__a, (__vector unsigned char)__b);
6735}
6736
6737// This prototype is deprecated.
6738static inline __ATTRS_o_ai __vector signed short
6739vec_sll(__vector signed short __a, __vector unsigned int __b) {
6740 return (__vector signed short)__builtin_s390_vsl(
6741 (__vector unsigned char)__a, (__vector unsigned char)__b);
6742}
6743
6744// This prototype is deprecated.
6745static inline __ATTRS_o_ai __vector __bool short
6746vec_sll(__vector __bool short __a, __vector unsigned char __b) {
6747 return (__vector __bool short)__builtin_s390_vsl(
6748 (__vector unsigned char)__a, __b);
6749}
6750
6751// This prototype is deprecated.
6752static inline __ATTRS_o_ai __vector __bool short
6753vec_sll(__vector __bool short __a, __vector unsigned short __b) {
6754 return (__vector __bool short)__builtin_s390_vsl(
6755 (__vector unsigned char)__a, (__vector unsigned char)__b);
6756}
6757
6758// This prototype is deprecated.
6759static inline __ATTRS_o_ai __vector __bool short
6760vec_sll(__vector __bool short __a, __vector unsigned int __b) {
6761 return (__vector __bool short)__builtin_s390_vsl(
6762 (__vector unsigned char)__a, (__vector unsigned char)__b);
6763}
6764
6765static inline __ATTRS_o_ai __vector unsigned short
6766vec_sll(__vector unsigned short __a, __vector unsigned char __b) {
6767 return (__vector unsigned short)__builtin_s390_vsl(
6768 (__vector unsigned char)__a, __b);
6769}
6770
6771// This prototype is deprecated.
6772static inline __ATTRS_o_ai __vector unsigned short
6773vec_sll(__vector unsigned short __a, __vector unsigned short __b) {
6774 return (__vector unsigned short)__builtin_s390_vsl(
6775 (__vector unsigned char)__a, (__vector unsigned char)__b);
6776}
6777
6778// This prototype is deprecated.
6779static inline __ATTRS_o_ai __vector unsigned short
6780vec_sll(__vector unsigned short __a, __vector unsigned int __b) {
6781 return (__vector unsigned short)__builtin_s390_vsl(
6782 (__vector unsigned char)__a, (__vector unsigned char)__b);
6783}
6784
6785static inline __ATTRS_o_ai __vector signed int
6786vec_sll(__vector signed int __a, __vector unsigned char __b) {
6787 return (__vector signed int)__builtin_s390_vsl(
6788 (__vector unsigned char)__a, __b);
6789}
6790
6791// This prototype is deprecated.
6792static inline __ATTRS_o_ai __vector signed int
6793vec_sll(__vector signed int __a, __vector unsigned short __b) {
6794 return (__vector signed int)__builtin_s390_vsl(
6795 (__vector unsigned char)__a, (__vector unsigned char)__b);
6796}
6797
6798// This prototype is deprecated.
6799static inline __ATTRS_o_ai __vector signed int
6800vec_sll(__vector signed int __a, __vector unsigned int __b) {
6801 return (__vector signed int)__builtin_s390_vsl(
6802 (__vector unsigned char)__a, (__vector unsigned char)__b);
6803}
6804
6805// This prototype is deprecated.
6806static inline __ATTRS_o_ai __vector __bool int
6807vec_sll(__vector __bool int __a, __vector unsigned char __b) {
6808 return (__vector __bool int)__builtin_s390_vsl(
6809 (__vector unsigned char)__a, __b);
6810}
6811
6812// This prototype is deprecated.
6813static inline __ATTRS_o_ai __vector __bool int
6814vec_sll(__vector __bool int __a, __vector unsigned short __b) {
6815 return (__vector __bool int)__builtin_s390_vsl(
6816 (__vector unsigned char)__a, (__vector unsigned char)__b);
6817}
6818
6819// This prototype is deprecated.
6820static inline __ATTRS_o_ai __vector __bool int
6821vec_sll(__vector __bool int __a, __vector unsigned int __b) {
6822 return (__vector __bool int)__builtin_s390_vsl(
6823 (__vector unsigned char)__a, (__vector unsigned char)__b);
6824}
6825
6826static inline __ATTRS_o_ai __vector unsigned int
6827vec_sll(__vector unsigned int __a, __vector unsigned char __b) {
6828 return (__vector unsigned int)__builtin_s390_vsl(
6829 (__vector unsigned char)__a, __b);
6830}
6831
6832// This prototype is deprecated.
6833static inline __ATTRS_o_ai __vector unsigned int
6834vec_sll(__vector unsigned int __a, __vector unsigned short __b) {
6835 return (__vector unsigned int)__builtin_s390_vsl(
6836 (__vector unsigned char)__a, (__vector unsigned char)__b);
6837}
6838
6839// This prototype is deprecated.
6840static inline __ATTRS_o_ai __vector unsigned int
6841vec_sll(__vector unsigned int __a, __vector unsigned int __b) {
6842 return (__vector unsigned int)__builtin_s390_vsl(
6843 (__vector unsigned char)__a, (__vector unsigned char)__b);
6844}
6845
6846static inline __ATTRS_o_ai __vector signed long long
6847vec_sll(__vector signed long long __a, __vector unsigned char __b) {
6848 return (__vector signed long long)__builtin_s390_vsl(
6849 (__vector unsigned char)__a, __b);
6850}
6851
6852// This prototype is deprecated.
6853static inline __ATTRS_o_ai __vector signed long long
6854vec_sll(__vector signed long long __a, __vector unsigned short __b) {
6855 return (__vector signed long long)__builtin_s390_vsl(
6856 (__vector unsigned char)__a, (__vector unsigned char)__b);
6857}
6858
6859// This prototype is deprecated.
6860static inline __ATTRS_o_ai __vector signed long long
6861vec_sll(__vector signed long long __a, __vector unsigned int __b) {
6862 return (__vector signed long long)__builtin_s390_vsl(
6863 (__vector unsigned char)__a, (__vector unsigned char)__b);
6864}
6865
6866// This prototype is deprecated.
6867static inline __ATTRS_o_ai __vector __bool long long
6868vec_sll(__vector __bool long long __a, __vector unsigned char __b) {
6869 return (__vector __bool long long)__builtin_s390_vsl(
6870 (__vector unsigned char)__a, __b);
6871}
6872
6873// This prototype is deprecated.
6874static inline __ATTRS_o_ai __vector __bool long long
6875vec_sll(__vector __bool long long __a, __vector unsigned short __b) {
6876 return (__vector __bool long long)__builtin_s390_vsl(
6877 (__vector unsigned char)__a, (__vector unsigned char)__b);
6878}
6879
6880// This prototype is deprecated.
6881static inline __ATTRS_o_ai __vector __bool long long
6882vec_sll(__vector __bool long long __a, __vector unsigned int __b) {
6883 return (__vector __bool long long)__builtin_s390_vsl(
6884 (__vector unsigned char)__a, (__vector unsigned char)__b);
6885}
6886
6887static inline __ATTRS_o_ai __vector unsigned long long
6888vec_sll(__vector unsigned long long __a, __vector unsigned char __b) {
6889 return (__vector unsigned long long)__builtin_s390_vsl(
6890 (__vector unsigned char)__a, __b);
6891}
6892
6893// This prototype is deprecated.
6894static inline __ATTRS_o_ai __vector unsigned long long
6895vec_sll(__vector unsigned long long __a, __vector unsigned short __b) {
6896 return (__vector unsigned long long)__builtin_s390_vsl(
6897 (__vector unsigned char)__a, (__vector unsigned char)__b);
6898}
6899
6900// This prototype is deprecated.
6901static inline __ATTRS_o_ai __vector unsigned long long
6902vec_sll(__vector unsigned long long __a, __vector unsigned int __b) {
6903 return (__vector unsigned long long)__builtin_s390_vsl(
6904 (__vector unsigned char)__a, (__vector unsigned char)__b);
6905}
6906
6907/*-- vec_slb ----------------------------------------------------------------*/
6908
6909static inline __ATTRS_o_ai __vector signed char
6910vec_slb(__vector signed char __a, __vector signed char __b) {
6911 return (__vector signed char)__builtin_s390_vslb(
6912 (__vector unsigned char)__a, (__vector unsigned char)__b);
6913}
6914
6915static inline __ATTRS_o_ai __vector signed char
6916vec_slb(__vector signed char __a, __vector unsigned char __b) {
6917 return (__vector signed char)__builtin_s390_vslb(
6918 (__vector unsigned char)__a, __b);
6919}
6920
6921static inline __ATTRS_o_ai __vector unsigned char
6922vec_slb(__vector unsigned char __a, __vector signed char __b) {
6923 return __builtin_s390_vslb(__a, (__vector unsigned char)__b);
6924}
6925
6926static inline __ATTRS_o_ai __vector unsigned char
6927vec_slb(__vector unsigned char __a, __vector unsigned char __b) {
6928 return __builtin_s390_vslb(__a, __b);
6929}
6930
6931static inline __ATTRS_o_ai __vector signed short
6932vec_slb(__vector signed short __a, __vector signed short __b) {
6933 return (__vector signed short)__builtin_s390_vslb(
6934 (__vector unsigned char)__a, (__vector unsigned char)__b);
6935}
6936
6937static inline __ATTRS_o_ai __vector signed short
6938vec_slb(__vector signed short __a, __vector unsigned short __b) {
6939 return (__vector signed short)__builtin_s390_vslb(
6940 (__vector unsigned char)__a, (__vector unsigned char)__b);
6941}
6942
6943static inline __ATTRS_o_ai __vector unsigned short
6944vec_slb(__vector unsigned short __a, __vector signed short __b) {
6945 return (__vector unsigned short)__builtin_s390_vslb(
6946 (__vector unsigned char)__a, (__vector unsigned char)__b);
6947}
6948
6949static inline __ATTRS_o_ai __vector unsigned short
6950vec_slb(__vector unsigned short __a, __vector unsigned short __b) {
6951 return (__vector unsigned short)__builtin_s390_vslb(
6952 (__vector unsigned char)__a, (__vector unsigned char)__b);
6953}
6954
6955static inline __ATTRS_o_ai __vector signed int
6956vec_slb(__vector signed int __a, __vector signed int __b) {
6957 return (__vector signed int)__builtin_s390_vslb(
6958 (__vector unsigned char)__a, (__vector unsigned char)__b);
6959}
6960
6961static inline __ATTRS_o_ai __vector signed int
6962vec_slb(__vector signed int __a, __vector unsigned int __b) {
6963 return (__vector signed int)__builtin_s390_vslb(
6964 (__vector unsigned char)__a, (__vector unsigned char)__b);
6965}
6966
6967static inline __ATTRS_o_ai __vector unsigned int
6968vec_slb(__vector unsigned int __a, __vector signed int __b) {
6969 return (__vector unsigned int)__builtin_s390_vslb(
6970 (__vector unsigned char)__a, (__vector unsigned char)__b);
6971}
6972
6973static inline __ATTRS_o_ai __vector unsigned int
6974vec_slb(__vector unsigned int __a, __vector unsigned int __b) {
6975 return (__vector unsigned int)__builtin_s390_vslb(
6976 (__vector unsigned char)__a, (__vector unsigned char)__b);
6977}
6978
6979static inline __ATTRS_o_ai __vector signed long long
6980vec_slb(__vector signed long long __a, __vector signed long long __b) {
6981 return (__vector signed long long)__builtin_s390_vslb(
6982 (__vector unsigned char)__a, (__vector unsigned char)__b);
6983}
6984
6985static inline __ATTRS_o_ai __vector signed long long
6986vec_slb(__vector signed long long __a, __vector unsigned long long __b) {
6987 return (__vector signed long long)__builtin_s390_vslb(
6988 (__vector unsigned char)__a, (__vector unsigned char)__b);
6989}
6990
6991static inline __ATTRS_o_ai __vector unsigned long long
6992vec_slb(__vector unsigned long long __a, __vector signed long long __b) {
6993 return (__vector unsigned long long)__builtin_s390_vslb(
6994 (__vector unsigned char)__a, (__vector unsigned char)__b);
6995}
6996
6997static inline __ATTRS_o_ai __vector unsigned long long
6998vec_slb(__vector unsigned long long __a, __vector unsigned long long __b) {
6999 return (__vector unsigned long long)__builtin_s390_vslb(
7000 (__vector unsigned char)__a, (__vector unsigned char)__b);
7001}
7002
7003#if __ARCH__ >= 12
7004static inline __ATTRS_o_ai __vector float
7005vec_slb(__vector float __a, __vector signed int __b) {
7006 return (__vector float)__builtin_s390_vslb(
7007 (__vector unsigned char)__a, (__vector unsigned char)__b);
7008}
7009
7010static inline __ATTRS_o_ai __vector float
7011vec_slb(__vector float __a, __vector unsigned int __b) {
7012 return (__vector float)__builtin_s390_vslb(
7013 (__vector unsigned char)__a, (__vector unsigned char)__b);
7014}
7015#endif
7016
7017static inline __ATTRS_o_ai __vector double
7018vec_slb(__vector double __a, __vector signed long long __b) {
7019 return (__vector double)__builtin_s390_vslb(
7020 (__vector unsigned char)__a, (__vector unsigned char)__b);
7021}
7022
7023static inline __ATTRS_o_ai __vector double
7024vec_slb(__vector double __a, __vector unsigned long long __b) {
7025 return (__vector double)__builtin_s390_vslb(
7026 (__vector unsigned char)__a, (__vector unsigned char)__b);
7027}
7028
7029/*-- vec_sld ----------------------------------------------------------------*/
7030
7031extern __ATTRS_o __vector signed char
7032vec_sld(__vector signed char __a, __vector signed char __b, int __c)
7033 __constant_range(__c, 0, 15);
7034
7035extern __ATTRS_o __vector __bool char
7036vec_sld(__vector __bool char __a, __vector __bool char __b, int __c)
7037 __constant_range(__c, 0, 15);
7038
7039extern __ATTRS_o __vector unsigned char
7040vec_sld(__vector unsigned char __a, __vector unsigned char __b, int __c)
7041 __constant_range(__c, 0, 15);
7042
7043extern __ATTRS_o __vector signed short
7044vec_sld(__vector signed short __a, __vector signed short __b, int __c)
7045 __constant_range(__c, 0, 15);
7046
7047extern __ATTRS_o __vector __bool short
7048vec_sld(__vector __bool short __a, __vector __bool short __b, int __c)
7049 __constant_range(__c, 0, 15);
7050
7051extern __ATTRS_o __vector unsigned short
7052vec_sld(__vector unsigned short __a, __vector unsigned short __b, int __c)
7053 __constant_range(__c, 0, 15);
7054
7055extern __ATTRS_o __vector signed int
7056vec_sld(__vector signed int __a, __vector signed int __b, int __c)
7057 __constant_range(__c, 0, 15);
7058
7059extern __ATTRS_o __vector __bool int
7060vec_sld(__vector __bool int __a, __vector __bool int __b, int __c)
7061 __constant_range(__c, 0, 15);
7062
7063extern __ATTRS_o __vector unsigned int
7064vec_sld(__vector unsigned int __a, __vector unsigned int __b, int __c)
7065 __constant_range(__c, 0, 15);
7066
7067extern __ATTRS_o __vector signed long long
7068vec_sld(__vector signed long long __a, __vector signed long long __b, int __c)
7069 __constant_range(__c, 0, 15);
7070
7071extern __ATTRS_o __vector __bool long long
7072vec_sld(__vector __bool long long __a, __vector __bool long long __b, int __c)
7073 __constant_range(__c, 0, 15);
7074
7075extern __ATTRS_o __vector unsigned long long
7076vec_sld(__vector unsigned long long __a, __vector unsigned long long __b,
7077 int __c)
7078 __constant_range(__c, 0, 15);
7079
7080#if __ARCH__ >= 12
7081extern __ATTRS_o __vector float
7082vec_sld(__vector float __a, __vector float __b, int __c)
7083 __constant_range(__c, 0, 15);
7084#endif
7085
7086extern __ATTRS_o __vector double
7087vec_sld(__vector double __a, __vector double __b, int __c)
7088 __constant_range(__c, 0, 15);
7089
7090#define vec_sld(X, Y, Z) ((__typeof__((vec_sld)((X), (Y), (Z)))) \
7091 __builtin_s390_vsldb((__vector unsigned char)(X), \
7092 (__vector unsigned char)(Y), (Z)))
7093
7094/*-- vec_sldw ---------------------------------------------------------------*/
7095
7096extern __ATTRS_o __vector signed char
7097vec_sldw(__vector signed char __a, __vector signed char __b, int __c)
7098 __constant_range(__c, 0, 3);
7099
7100extern __ATTRS_o __vector unsigned char
7101vec_sldw(__vector unsigned char __a, __vector unsigned char __b, int __c)
7102 __constant_range(__c, 0, 3);
7103
7104extern __ATTRS_o __vector signed short
7105vec_sldw(__vector signed short __a, __vector signed short __b, int __c)
7106 __constant_range(__c, 0, 3);
7107
7108extern __ATTRS_o __vector unsigned short
7109vec_sldw(__vector unsigned short __a, __vector unsigned short __b, int __c)
7110 __constant_range(__c, 0, 3);
7111
7112extern __ATTRS_o __vector signed int
7113vec_sldw(__vector signed int __a, __vector signed int __b, int __c)
7114 __constant_range(__c, 0, 3);
7115
7116extern __ATTRS_o __vector unsigned int
7117vec_sldw(__vector unsigned int __a, __vector unsigned int __b, int __c)
7118 __constant_range(__c, 0, 3);
7119
7120extern __ATTRS_o __vector signed long long
7121vec_sldw(__vector signed long long __a, __vector signed long long __b, int __c)
7122 __constant_range(__c, 0, 3);
7123
7124extern __ATTRS_o __vector unsigned long long
7125vec_sldw(__vector unsigned long long __a, __vector unsigned long long __b,
7126 int __c)
7127 __constant_range(__c, 0, 3);
7128
7129// This prototype is deprecated.
7130extern __ATTRS_o __vector double
7131vec_sldw(__vector double __a, __vector double __b, int __c)
7132 __constant_range(__c, 0, 3);
7133
7134#define vec_sldw(X, Y, Z) ((__typeof__((vec_sldw)((X), (Y), (Z)))) \
7135 __builtin_s390_vsldb((__vector unsigned char)(X), \
7136 (__vector unsigned char)(Y), (Z) * 4))
7137
7138/*-- vec_sldb ---------------------------------------------------------------*/
7139
7140#if __ARCH__ >= 13
7141
7142extern __ATTRS_o __vector signed char
7143vec_sldb(__vector signed char __a, __vector signed char __b, int __c)
7144 __constant_range(__c, 0, 7);
7145
7146extern __ATTRS_o __vector unsigned char
7147vec_sldb(__vector unsigned char __a, __vector unsigned char __b, int __c)
7148 __constant_range(__c, 0, 7);
7149
7150extern __ATTRS_o __vector signed short
7151vec_sldb(__vector signed short __a, __vector signed short __b, int __c)
7152 __constant_range(__c, 0, 7);
7153
7154extern __ATTRS_o __vector unsigned short
7155vec_sldb(__vector unsigned short __a, __vector unsigned short __b, int __c)
7156 __constant_range(__c, 0, 7);
7157
7158extern __ATTRS_o __vector signed int
7159vec_sldb(__vector signed int __a, __vector signed int __b, int __c)
7160 __constant_range(__c, 0, 7);
7161
7162extern __ATTRS_o __vector unsigned int
7163vec_sldb(__vector unsigned int __a, __vector unsigned int __b, int __c)
7164 __constant_range(__c, 0, 7);
7165
7166extern __ATTRS_o __vector signed long long
7167vec_sldb(__vector signed long long __a, __vector signed long long __b, int __c)
7168 __constant_range(__c, 0, 7);
7169
7170extern __ATTRS_o __vector unsigned long long
7171vec_sldb(__vector unsigned long long __a, __vector unsigned long long __b,
7172 int __c)
7173 __constant_range(__c, 0, 7);
7174
7175extern __ATTRS_o __vector float
7176vec_sldb(__vector float __a, __vector float __b, int __c)
7177 __constant_range(__c, 0, 7);
7178
7179extern __ATTRS_o __vector double
7180vec_sldb(__vector double __a, __vector double __b, int __c)
7181 __constant_range(__c, 0, 7);
7182
7183#define vec_sldb(X, Y, Z) ((__typeof__((vec_sldb)((X), (Y), (Z)))) \
7184 __builtin_s390_vsld((__vector unsigned char)(X), \
7185 (__vector unsigned char)(Y), (Z)))
7186
7187#endif
7188
7189/*-- vec_sral ---------------------------------------------------------------*/
7190
7191static inline __ATTRS_o_ai __vector signed char
7192vec_sral(__vector signed char __a, __vector unsigned char __b) {
7193 return (__vector signed char)__builtin_s390_vsra(
7194 (__vector unsigned char)__a, __b);
7195}
7196
7197// This prototype is deprecated.
7198static inline __ATTRS_o_ai __vector signed char
7199vec_sral(__vector signed char __a, __vector unsigned short __b) {
7200 return (__vector signed char)__builtin_s390_vsra(
7201 (__vector unsigned char)__a, (__vector unsigned char)__b);
7202}
7203
7204// This prototype is deprecated.
7205static inline __ATTRS_o_ai __vector signed char
7206vec_sral(__vector signed char __a, __vector unsigned int __b) {
7207 return (__vector signed char)__builtin_s390_vsra(
7208 (__vector unsigned char)__a, (__vector unsigned char)__b);
7209}
7210
7211// This prototype is deprecated.
7212static inline __ATTRS_o_ai __vector __bool char
7213vec_sral(__vector __bool char __a, __vector unsigned char __b) {
7214 return (__vector __bool char)__builtin_s390_vsra(
7215 (__vector unsigned char)__a, __b);
7216}
7217
7218// This prototype is deprecated.
7219static inline __ATTRS_o_ai __vector __bool char
7220vec_sral(__vector __bool char __a, __vector unsigned short __b) {
7221 return (__vector __bool char)__builtin_s390_vsra(
7222 (__vector unsigned char)__a, (__vector unsigned char)__b);
7223}
7224
7225// This prototype is deprecated.
7226static inline __ATTRS_o_ai __vector __bool char
7227vec_sral(__vector __bool char __a, __vector unsigned int __b) {
7228 return (__vector __bool char)__builtin_s390_vsra(
7229 (__vector unsigned char)__a, (__vector unsigned char)__b);
7230}
7231
7232static inline __ATTRS_o_ai __vector unsigned char
7233vec_sral(__vector unsigned char __a, __vector unsigned char __b) {
7234 return __builtin_s390_vsra(__a, __b);
7235}
7236
7237// This prototype is deprecated.
7238static inline __ATTRS_o_ai __vector unsigned char
7239vec_sral(__vector unsigned char __a, __vector unsigned short __b) {
7240 return __builtin_s390_vsra(__a, (__vector unsigned char)__b);
7241}
7242
7243// This prototype is deprecated.
7244static inline __ATTRS_o_ai __vector unsigned char
7245vec_sral(__vector unsigned char __a, __vector unsigned int __b) {
7246 return __builtin_s390_vsra(__a, (__vector unsigned char)__b);
7247}
7248
7249static inline __ATTRS_o_ai __vector signed short
7250vec_sral(__vector signed short __a, __vector unsigned char __b) {
7251 return (__vector signed short)__builtin_s390_vsra(
7252 (__vector unsigned char)__a, __b);
7253}
7254
7255// This prototype is deprecated.
7256static inline __ATTRS_o_ai __vector signed short
7257vec_sral(__vector signed short __a, __vector unsigned short __b) {
7258 return (__vector signed short)__builtin_s390_vsra(
7259 (__vector unsigned char)__a, (__vector unsigned char)__b);
7260}
7261
7262// This prototype is deprecated.
7263static inline __ATTRS_o_ai __vector signed short
7264vec_sral(__vector signed short __a, __vector unsigned int __b) {
7265 return (__vector signed short)__builtin_s390_vsra(
7266 (__vector unsigned char)__a, (__vector unsigned char)__b);
7267}
7268
7269// This prototype is deprecated.
7270static inline __ATTRS_o_ai __vector __bool short
7271vec_sral(__vector __bool short __a, __vector unsigned char __b) {
7272 return (__vector __bool short)__builtin_s390_vsra(
7273 (__vector unsigned char)__a, __b);
7274}
7275
7276// This prototype is deprecated.
7277static inline __ATTRS_o_ai __vector __bool short
7278vec_sral(__vector __bool short __a, __vector unsigned short __b) {
7279 return (__vector __bool short)__builtin_s390_vsra(
7280 (__vector unsigned char)__a, (__vector unsigned char)__b);
7281}
7282
7283// This prototype is deprecated.
7284static inline __ATTRS_o_ai __vector __bool short
7285vec_sral(__vector __bool short __a, __vector unsigned int __b) {
7286 return (__vector __bool short)__builtin_s390_vsra(
7287 (__vector unsigned char)__a, (__vector unsigned char)__b);
7288}
7289
7290static inline __ATTRS_o_ai __vector unsigned short
7291vec_sral(__vector unsigned short __a, __vector unsigned char __b) {
7292 return (__vector unsigned short)__builtin_s390_vsra(
7293 (__vector unsigned char)__a, __b);
7294}
7295
7296// This prototype is deprecated.
7297static inline __ATTRS_o_ai __vector unsigned short
7298vec_sral(__vector unsigned short __a, __vector unsigned short __b) {
7299 return (__vector unsigned short)__builtin_s390_vsra(
7300 (__vector unsigned char)__a, (__vector unsigned char)__b);
7301}
7302
7303// This prototype is deprecated.
7304static inline __ATTRS_o_ai __vector unsigned short
7305vec_sral(__vector unsigned short __a, __vector unsigned int __b) {
7306 return (__vector unsigned short)__builtin_s390_vsra(
7307 (__vector unsigned char)__a, (__vector unsigned char)__b);
7308}
7309
7310static inline __ATTRS_o_ai __vector signed int
7311vec_sral(__vector signed int __a, __vector unsigned char __b) {
7312 return (__vector signed int)__builtin_s390_vsra(
7313 (__vector unsigned char)__a, __b);
7314}
7315
7316// This prototype is deprecated.
7317static inline __ATTRS_o_ai __vector signed int
7318vec_sral(__vector signed int __a, __vector unsigned short __b) {
7319 return (__vector signed int)__builtin_s390_vsra(
7320 (__vector unsigned char)__a, (__vector unsigned char)__b);
7321}
7322
7323// This prototype is deprecated.
7324static inline __ATTRS_o_ai __vector signed int
7325vec_sral(__vector signed int __a, __vector unsigned int __b) {
7326 return (__vector signed int)__builtin_s390_vsra(
7327 (__vector unsigned char)__a, (__vector unsigned char)__b);
7328}
7329
7330// This prototype is deprecated.
7331static inline __ATTRS_o_ai __vector __bool int
7332vec_sral(__vector __bool int __a, __vector unsigned char __b) {
7333 return (__vector __bool int)__builtin_s390_vsra(
7334 (__vector unsigned char)__a, __b);
7335}
7336
7337// This prototype is deprecated.
7338static inline __ATTRS_o_ai __vector __bool int
7339vec_sral(__vector __bool int __a, __vector unsigned short __b) {
7340 return (__vector __bool int)__builtin_s390_vsra(
7341 (__vector unsigned char)__a, (__vector unsigned char)__b);
7342}
7343
7344// This prototype is deprecated.
7345static inline __ATTRS_o_ai __vector __bool int
7346vec_sral(__vector __bool int __a, __vector unsigned int __b) {
7347 return (__vector __bool int)__builtin_s390_vsra(
7348 (__vector unsigned char)__a, (__vector unsigned char)__b);
7349}
7350
7351static inline __ATTRS_o_ai __vector unsigned int
7352vec_sral(__vector unsigned int __a, __vector unsigned char __b) {
7353 return (__vector unsigned int)__builtin_s390_vsra(
7354 (__vector unsigned char)__a, __b);
7355}
7356
7357// This prototype is deprecated.
7358static inline __ATTRS_o_ai __vector unsigned int
7359vec_sral(__vector unsigned int __a, __vector unsigned short __b) {
7360 return (__vector unsigned int)__builtin_s390_vsra(
7361 (__vector unsigned char)__a, (__vector unsigned char)__b);
7362}
7363
7364// This prototype is deprecated.
7365static inline __ATTRS_o_ai __vector unsigned int
7366vec_sral(__vector unsigned int __a, __vector unsigned int __b) {
7367 return (__vector unsigned int)__builtin_s390_vsra(
7368 (__vector unsigned char)__a, (__vector unsigned char)__b);
7369}
7370
7371static inline __ATTRS_o_ai __vector signed long long
7372vec_sral(__vector signed long long __a, __vector unsigned char __b) {
7373 return (__vector signed long long)__builtin_s390_vsra(
7374 (__vector unsigned char)__a, __b);
7375}
7376
7377// This prototype is deprecated.
7378static inline __ATTRS_o_ai __vector signed long long
7379vec_sral(__vector signed long long __a, __vector unsigned short __b) {
7380 return (__vector signed long long)__builtin_s390_vsra(
7381 (__vector unsigned char)__a, (__vector unsigned char)__b);
7382}
7383
7384// This prototype is deprecated.
7385static inline __ATTRS_o_ai __vector signed long long
7386vec_sral(__vector signed long long __a, __vector unsigned int __b) {
7387 return (__vector signed long long)__builtin_s390_vsra(
7388 (__vector unsigned char)__a, (__vector unsigned char)__b);
7389}
7390
7391// This prototype is deprecated.
7392static inline __ATTRS_o_ai __vector __bool long long
7393vec_sral(__vector __bool long long __a, __vector unsigned char __b) {
7394 return (__vector __bool long long)__builtin_s390_vsra(
7395 (__vector unsigned char)__a, __b);
7396}
7397
7398// This prototype is deprecated.
7399static inline __ATTRS_o_ai __vector __bool long long
7400vec_sral(__vector __bool long long __a, __vector unsigned short __b) {
7401 return (__vector __bool long long)__builtin_s390_vsra(
7402 (__vector unsigned char)__a, (__vector unsigned char)__b);
7403}
7404
7405// This prototype is deprecated.
7406static inline __ATTRS_o_ai __vector __bool long long
7407vec_sral(__vector __bool long long __a, __vector unsigned int __b) {
7408 return (__vector __bool long long)__builtin_s390_vsra(
7409 (__vector unsigned char)__a, (__vector unsigned char)__b);
7410}
7411
7412static inline __ATTRS_o_ai __vector unsigned long long
7413vec_sral(__vector unsigned long long __a, __vector unsigned char __b) {
7414 return (__vector unsigned long long)__builtin_s390_vsra(
7415 (__vector unsigned char)__a, __b);
7416}
7417
7418// This prototype is deprecated.
7419static inline __ATTRS_o_ai __vector unsigned long long
7420vec_sral(__vector unsigned long long __a, __vector unsigned short __b) {
7421 return (__vector unsigned long long)__builtin_s390_vsra(
7422 (__vector unsigned char)__a, (__vector unsigned char)__b);
7423}
7424
7425// This prototype is deprecated.
7426static inline __ATTRS_o_ai __vector unsigned long long
7427vec_sral(__vector unsigned long long __a, __vector unsigned int __b) {
7428 return (__vector unsigned long long)__builtin_s390_vsra(
7429 (__vector unsigned char)__a, (__vector unsigned char)__b);
7430}
7431
7432/*-- vec_srab ---------------------------------------------------------------*/
7433
7434static inline __ATTRS_o_ai __vector signed char
7435vec_srab(__vector signed char __a, __vector signed char __b) {
7436 return (__vector signed char)__builtin_s390_vsrab(
7437 (__vector unsigned char)__a, (__vector unsigned char)__b);
7438}
7439
7440static inline __ATTRS_o_ai __vector signed char
7441vec_srab(__vector signed char __a, __vector unsigned char __b) {
7442 return (__vector signed char)__builtin_s390_vsrab(
7443 (__vector unsigned char)__a, __b);
7444}
7445
7446static inline __ATTRS_o_ai __vector unsigned char
7447vec_srab(__vector unsigned char __a, __vector signed char __b) {
7448 return __builtin_s390_vsrab(__a, (__vector unsigned char)__b);
7449}
7450
7451static inline __ATTRS_o_ai __vector unsigned char
7452vec_srab(__vector unsigned char __a, __vector unsigned char __b) {
7453 return __builtin_s390_vsrab(__a, __b);
7454}
7455
7456static inline __ATTRS_o_ai __vector signed short
7457vec_srab(__vector signed short __a, __vector signed short __b) {
7458 return (__vector signed short)__builtin_s390_vsrab(
7459 (__vector unsigned char)__a, (__vector unsigned char)__b);
7460}
7461
7462static inline __ATTRS_o_ai __vector signed short
7463vec_srab(__vector signed short __a, __vector unsigned short __b) {
7464 return (__vector signed short)__builtin_s390_vsrab(
7465 (__vector unsigned char)__a, (__vector unsigned char)__b);
7466}
7467
7468static inline __ATTRS_o_ai __vector unsigned short
7469vec_srab(__vector unsigned short __a, __vector signed short __b) {
7470 return (__vector unsigned short)__builtin_s390_vsrab(
7471 (__vector unsigned char)__a, (__vector unsigned char)__b);
7472}
7473
7474static inline __ATTRS_o_ai __vector unsigned short
7475vec_srab(__vector unsigned short __a, __vector unsigned short __b) {
7476 return (__vector unsigned short)__builtin_s390_vsrab(
7477 (__vector unsigned char)__a, (__vector unsigned char)__b);
7478}
7479
7480static inline __ATTRS_o_ai __vector signed int
7481vec_srab(__vector signed int __a, __vector signed int __b) {
7482 return (__vector signed int)__builtin_s390_vsrab(
7483 (__vector unsigned char)__a, (__vector unsigned char)__b);
7484}
7485
7486static inline __ATTRS_o_ai __vector signed int
7487vec_srab(__vector signed int __a, __vector unsigned int __b) {
7488 return (__vector signed int)__builtin_s390_vsrab(
7489 (__vector unsigned char)__a, (__vector unsigned char)__b);
7490}
7491
7492static inline __ATTRS_o_ai __vector unsigned int
7493vec_srab(__vector unsigned int __a, __vector signed int __b) {
7494 return (__vector unsigned int)__builtin_s390_vsrab(
7495 (__vector unsigned char)__a, (__vector unsigned char)__b);
7496}
7497
7498static inline __ATTRS_o_ai __vector unsigned int
7499vec_srab(__vector unsigned int __a, __vector unsigned int __b) {
7500 return (__vector unsigned int)__builtin_s390_vsrab(
7501 (__vector unsigned char)__a, (__vector unsigned char)__b);
7502}
7503
7504static inline __ATTRS_o_ai __vector signed long long
7505vec_srab(__vector signed long long __a, __vector signed long long __b) {
7506 return (__vector signed long long)__builtin_s390_vsrab(
7507 (__vector unsigned char)__a, (__vector unsigned char)__b);
7508}
7509
7510static inline __ATTRS_o_ai __vector signed long long
7511vec_srab(__vector signed long long __a, __vector unsigned long long __b) {
7512 return (__vector signed long long)__builtin_s390_vsrab(
7513 (__vector unsigned char)__a, (__vector unsigned char)__b);
7514}
7515
7516static inline __ATTRS_o_ai __vector unsigned long long
7517vec_srab(__vector unsigned long long __a, __vector signed long long __b) {
7518 return (__vector unsigned long long)__builtin_s390_vsrab(
7519 (__vector unsigned char)__a, (__vector unsigned char)__b);
7520}
7521
7522static inline __ATTRS_o_ai __vector unsigned long long
7523vec_srab(__vector unsigned long long __a, __vector unsigned long long __b) {
7524 return (__vector unsigned long long)__builtin_s390_vsrab(
7525 (__vector unsigned char)__a, (__vector unsigned char)__b);
7526}
7527
7528#if __ARCH__ >= 12
7529static inline __ATTRS_o_ai __vector float
7530vec_srab(__vector float __a, __vector signed int __b) {
7531 return (__vector float)__builtin_s390_vsrab(
7532 (__vector unsigned char)__a, (__vector unsigned char)__b);
7533}
7534
7535static inline __ATTRS_o_ai __vector float
7536vec_srab(__vector float __a, __vector unsigned int __b) {
7537 return (__vector float)__builtin_s390_vsrab(
7538 (__vector unsigned char)__a, (__vector unsigned char)__b);
7539}
7540#endif
7541
7542static inline __ATTRS_o_ai __vector double
7543vec_srab(__vector double __a, __vector signed long long __b) {
7544 return (__vector double)__builtin_s390_vsrab(
7545 (__vector unsigned char)__a, (__vector unsigned char)__b);
7546}
7547
7548static inline __ATTRS_o_ai __vector double
7549vec_srab(__vector double __a, __vector unsigned long long __b) {
7550 return (__vector double)__builtin_s390_vsrab(
7551 (__vector unsigned char)__a, (__vector unsigned char)__b);
7552}
7553
7554/*-- vec_srl ----------------------------------------------------------------*/
7555
7556static inline __ATTRS_o_ai __vector signed char
7557vec_srl(__vector signed char __a, __vector unsigned char __b) {
7558 return (__vector signed char)__builtin_s390_vsrl(
7559 (__vector unsigned char)__a, __b);
7560}
7561
7562// This prototype is deprecated.
7563static inline __ATTRS_o_ai __vector signed char
7564vec_srl(__vector signed char __a, __vector unsigned short __b) {
7565 return (__vector signed char)__builtin_s390_vsrl(
7566 (__vector unsigned char)__a, (__vector unsigned char)__b);
7567}
7568
7569// This prototype is deprecated.
7570static inline __ATTRS_o_ai __vector signed char
7571vec_srl(__vector signed char __a, __vector unsigned int __b) {
7572 return (__vector signed char)__builtin_s390_vsrl(
7573 (__vector unsigned char)__a, (__vector unsigned char)__b);
7574}
7575
7576// This prototype is deprecated.
7577static inline __ATTRS_o_ai __vector __bool char
7578vec_srl(__vector __bool char __a, __vector unsigned char __b) {
7579 return (__vector __bool char)__builtin_s390_vsrl(
7580 (__vector unsigned char)__a, __b);
7581}
7582
7583// This prototype is deprecated.
7584static inline __ATTRS_o_ai __vector __bool char
7585vec_srl(__vector __bool char __a, __vector unsigned short __b) {
7586 return (__vector __bool char)__builtin_s390_vsrl(
7587 (__vector unsigned char)__a, (__vector unsigned char)__b);
7588}
7589
7590// This prototype is deprecated.
7591static inline __ATTRS_o_ai __vector __bool char
7592vec_srl(__vector __bool char __a, __vector unsigned int __b) {
7593 return (__vector __bool char)__builtin_s390_vsrl(
7594 (__vector unsigned char)__a, (__vector unsigned char)__b);
7595}
7596
7597static inline __ATTRS_o_ai __vector unsigned char
7598vec_srl(__vector unsigned char __a, __vector unsigned char __b) {
7599 return __builtin_s390_vsrl(__a, __b);
7600}
7601
7602// This prototype is deprecated.
7603static inline __ATTRS_o_ai __vector unsigned char
7604vec_srl(__vector unsigned char __a, __vector unsigned short __b) {
7605 return __builtin_s390_vsrl(__a, (__vector unsigned char)__b);
7606}
7607
7608// This prototype is deprecated.
7609static inline __ATTRS_o_ai __vector unsigned char
7610vec_srl(__vector unsigned char __a, __vector unsigned int __b) {
7611 return __builtin_s390_vsrl(__a, (__vector unsigned char)__b);
7612}
7613
7614static inline __ATTRS_o_ai __vector signed short
7615vec_srl(__vector signed short __a, __vector unsigned char __b) {
7616 return (__vector signed short)__builtin_s390_vsrl(
7617 (__vector unsigned char)__a, __b);
7618}
7619
7620// This prototype is deprecated.
7621static inline __ATTRS_o_ai __vector signed short
7622vec_srl(__vector signed short __a, __vector unsigned short __b) {
7623 return (__vector signed short)__builtin_s390_vsrl(
7624 (__vector unsigned char)__a, (__vector unsigned char)__b);
7625}
7626
7627// This prototype is deprecated.
7628static inline __ATTRS_o_ai __vector signed short
7629vec_srl(__vector signed short __a, __vector unsigned int __b) {
7630 return (__vector signed short)__builtin_s390_vsrl(
7631 (__vector unsigned char)__a, (__vector unsigned char)__b);
7632}
7633
7634// This prototype is deprecated.
7635static inline __ATTRS_o_ai __vector __bool short
7636vec_srl(__vector __bool short __a, __vector unsigned char __b) {
7637 return (__vector __bool short)__builtin_s390_vsrl(
7638 (__vector unsigned char)__a, __b);
7639}
7640
7641// This prototype is deprecated.
7642static inline __ATTRS_o_ai __vector __bool short
7643vec_srl(__vector __bool short __a, __vector unsigned short __b) {
7644 return (__vector __bool short)__builtin_s390_vsrl(
7645 (__vector unsigned char)__a, (__vector unsigned char)__b);
7646}
7647
7648// This prototype is deprecated.
7649static inline __ATTRS_o_ai __vector __bool short
7650vec_srl(__vector __bool short __a, __vector unsigned int __b) {
7651 return (__vector __bool short)__builtin_s390_vsrl(
7652 (__vector unsigned char)__a, (__vector unsigned char)__b);
7653}
7654
7655static inline __ATTRS_o_ai __vector unsigned short
7656vec_srl(__vector unsigned short __a, __vector unsigned char __b) {
7657 return (__vector unsigned short)__builtin_s390_vsrl(
7658 (__vector unsigned char)__a, __b);
7659}
7660
7661// This prototype is deprecated.
7662static inline __ATTRS_o_ai __vector unsigned short
7663vec_srl(__vector unsigned short __a, __vector unsigned short __b) {
7664 return (__vector unsigned short)__builtin_s390_vsrl(
7665 (__vector unsigned char)__a, (__vector unsigned char)__b);
7666}
7667
7668// This prototype is deprecated.
7669static inline __ATTRS_o_ai __vector unsigned short
7670vec_srl(__vector unsigned short __a, __vector unsigned int __b) {
7671 return (__vector unsigned short)__builtin_s390_vsrl(
7672 (__vector unsigned char)__a, (__vector unsigned char)__b);
7673}
7674
7675static inline __ATTRS_o_ai __vector signed int
7676vec_srl(__vector signed int __a, __vector unsigned char __b) {
7677 return (__vector signed int)__builtin_s390_vsrl(
7678 (__vector unsigned char)__a, __b);
7679}
7680
7681// This prototype is deprecated.
7682static inline __ATTRS_o_ai __vector signed int
7683vec_srl(__vector signed int __a, __vector unsigned short __b) {
7684 return (__vector signed int)__builtin_s390_vsrl(
7685 (__vector unsigned char)__a, (__vector unsigned char)__b);
7686}
7687
7688// This prototype is deprecated.
7689static inline __ATTRS_o_ai __vector signed int
7690vec_srl(__vector signed int __a, __vector unsigned int __b) {
7691 return (__vector signed int)__builtin_s390_vsrl(
7692 (__vector unsigned char)__a, (__vector unsigned char)__b);
7693}
7694
7695// This prototype is deprecated.
7696static inline __ATTRS_o_ai __vector __bool int
7697vec_srl(__vector __bool int __a, __vector unsigned char __b) {
7698 return (__vector __bool int)__builtin_s390_vsrl(
7699 (__vector unsigned char)__a, __b);
7700}
7701
7702// This prototype is deprecated.
7703static inline __ATTRS_o_ai __vector __bool int
7704vec_srl(__vector __bool int __a, __vector unsigned short __b) {
7705 return (__vector __bool int)__builtin_s390_vsrl(
7706 (__vector unsigned char)__a, (__vector unsigned char)__b);
7707}
7708
7709// This prototype is deprecated.
7710static inline __ATTRS_o_ai __vector __bool int
7711vec_srl(__vector __bool int __a, __vector unsigned int __b) {
7712 return (__vector __bool int)__builtin_s390_vsrl(
7713 (__vector unsigned char)__a, (__vector unsigned char)__b);
7714}
7715
7716static inline __ATTRS_o_ai __vector unsigned int
7717vec_srl(__vector unsigned int __a, __vector unsigned char __b) {
7718 return (__vector unsigned int)__builtin_s390_vsrl(
7719 (__vector unsigned char)__a, __b);
7720}
7721
7722// This prototype is deprecated.
7723static inline __ATTRS_o_ai __vector unsigned int
7724vec_srl(__vector unsigned int __a, __vector unsigned short __b) {
7725 return (__vector unsigned int)__builtin_s390_vsrl(
7726 (__vector unsigned char)__a, (__vector unsigned char)__b);
7727}
7728
7729// This prototype is deprecated.
7730static inline __ATTRS_o_ai __vector unsigned int
7731vec_srl(__vector unsigned int __a, __vector unsigned int __b) {
7732 return (__vector unsigned int)__builtin_s390_vsrl(
7733 (__vector unsigned char)__a, (__vector unsigned char)__b);
7734}
7735
7736static inline __ATTRS_o_ai __vector signed long long
7737vec_srl(__vector signed long long __a, __vector unsigned char __b) {
7738 return (__vector signed long long)__builtin_s390_vsrl(
7739 (__vector unsigned char)__a, __b);
7740}
7741
7742// This prototype is deprecated.
7743static inline __ATTRS_o_ai __vector signed long long
7744vec_srl(__vector signed long long __a, __vector unsigned short __b) {
7745 return (__vector signed long long)__builtin_s390_vsrl(
7746 (__vector unsigned char)__a, (__vector unsigned char)__b);
7747}
7748
7749// This prototype is deprecated.
7750static inline __ATTRS_o_ai __vector signed long long
7751vec_srl(__vector signed long long __a, __vector unsigned int __b) {
7752 return (__vector signed long long)__builtin_s390_vsrl(
7753 (__vector unsigned char)__a, (__vector unsigned char)__b);
7754}
7755
7756// This prototype is deprecated.
7757static inline __ATTRS_o_ai __vector __bool long long
7758vec_srl(__vector __bool long long __a, __vector unsigned char __b) {
7759 return (__vector __bool long long)__builtin_s390_vsrl(
7760 (__vector unsigned char)__a, __b);
7761}
7762
7763// This prototype is deprecated.
7764static inline __ATTRS_o_ai __vector __bool long long
7765vec_srl(__vector __bool long long __a, __vector unsigned short __b) {
7766 return (__vector __bool long long)__builtin_s390_vsrl(
7767 (__vector unsigned char)__a, (__vector unsigned char)__b);
7768}
7769
7770// This prototype is deprecated.
7771static inline __ATTRS_o_ai __vector __bool long long
7772vec_srl(__vector __bool long long __a, __vector unsigned int __b) {
7773 return (__vector __bool long long)__builtin_s390_vsrl(
7774 (__vector unsigned char)__a, (__vector unsigned char)__b);
7775}
7776
7777static inline __ATTRS_o_ai __vector unsigned long long
7778vec_srl(__vector unsigned long long __a, __vector unsigned char __b) {
7779 return (__vector unsigned long long)__builtin_s390_vsrl(
7780 (__vector unsigned char)__a, __b);
7781}
7782
7783// This prototype is deprecated.
7784static inline __ATTRS_o_ai __vector unsigned long long
7785vec_srl(__vector unsigned long long __a, __vector unsigned short __b) {
7786 return (__vector unsigned long long)__builtin_s390_vsrl(
7787 (__vector unsigned char)__a, (__vector unsigned char)__b);
7788}
7789
7790// This prototype is deprecated.
7791static inline __ATTRS_o_ai __vector unsigned long long
7792vec_srl(__vector unsigned long long __a, __vector unsigned int __b) {
7793 return (__vector unsigned long long)__builtin_s390_vsrl(
7794 (__vector unsigned char)__a, (__vector unsigned char)__b);
7795}
7796
7797/*-- vec_srb ----------------------------------------------------------------*/
7798
7799static inline __ATTRS_o_ai __vector signed char
7800vec_srb(__vector signed char __a, __vector signed char __b) {
7801 return (__vector signed char)__builtin_s390_vsrlb(
7802 (__vector unsigned char)__a, (__vector unsigned char)__b);
7803}
7804
7805static inline __ATTRS_o_ai __vector signed char
7806vec_srb(__vector signed char __a, __vector unsigned char __b) {
7807 return (__vector signed char)__builtin_s390_vsrlb(
7808 (__vector unsigned char)__a, __b);
7809}
7810
7811static inline __ATTRS_o_ai __vector unsigned char
7812vec_srb(__vector unsigned char __a, __vector signed char __b) {
7813 return __builtin_s390_vsrlb(__a, (__vector unsigned char)__b);
7814}
7815
7816static inline __ATTRS_o_ai __vector unsigned char
7817vec_srb(__vector unsigned char __a, __vector unsigned char __b) {
7818 return __builtin_s390_vsrlb(__a, __b);
7819}
7820
7821static inline __ATTRS_o_ai __vector signed short
7822vec_srb(__vector signed short __a, __vector signed short __b) {
7823 return (__vector signed short)__builtin_s390_vsrlb(
7824 (__vector unsigned char)__a, (__vector unsigned char)__b);
7825}
7826
7827static inline __ATTRS_o_ai __vector signed short
7828vec_srb(__vector signed short __a, __vector unsigned short __b) {
7829 return (__vector signed short)__builtin_s390_vsrlb(
7830 (__vector unsigned char)__a, (__vector unsigned char)__b);
7831}
7832
7833static inline __ATTRS_o_ai __vector unsigned short
7834vec_srb(__vector unsigned short __a, __vector signed short __b) {
7835 return (__vector unsigned short)__builtin_s390_vsrlb(
7836 (__vector unsigned char)__a, (__vector unsigned char)__b);
7837}
7838
7839static inline __ATTRS_o_ai __vector unsigned short
7840vec_srb(__vector unsigned short __a, __vector unsigned short __b) {
7841 return (__vector unsigned short)__builtin_s390_vsrlb(
7842 (__vector unsigned char)__a, (__vector unsigned char)__b);
7843}
7844
7845static inline __ATTRS_o_ai __vector signed int
7846vec_srb(__vector signed int __a, __vector signed int __b) {
7847 return (__vector signed int)__builtin_s390_vsrlb(
7848 (__vector unsigned char)__a, (__vector unsigned char)__b);
7849}
7850
7851static inline __ATTRS_o_ai __vector signed int
7852vec_srb(__vector signed int __a, __vector unsigned int __b) {
7853 return (__vector signed int)__builtin_s390_vsrlb(
7854 (__vector unsigned char)__a, (__vector unsigned char)__b);
7855}
7856
7857static inline __ATTRS_o_ai __vector unsigned int
7858vec_srb(__vector unsigned int __a, __vector signed int __b) {
7859 return (__vector unsigned int)__builtin_s390_vsrlb(
7860 (__vector unsigned char)__a, (__vector unsigned char)__b);
7861}
7862
7863static inline __ATTRS_o_ai __vector unsigned int
7864vec_srb(__vector unsigned int __a, __vector unsigned int __b) {
7865 return (__vector unsigned int)__builtin_s390_vsrlb(
7866 (__vector unsigned char)__a, (__vector unsigned char)__b);
7867}
7868
7869static inline __ATTRS_o_ai __vector signed long long
7870vec_srb(__vector signed long long __a, __vector signed long long __b) {
7871 return (__vector signed long long)__builtin_s390_vsrlb(
7872 (__vector unsigned char)__a, (__vector unsigned char)__b);
7873}
7874
7875static inline __ATTRS_o_ai __vector signed long long
7876vec_srb(__vector signed long long __a, __vector unsigned long long __b) {
7877 return (__vector signed long long)__builtin_s390_vsrlb(
7878 (__vector unsigned char)__a, (__vector unsigned char)__b);
7879}
7880
7881static inline __ATTRS_o_ai __vector unsigned long long
7882vec_srb(__vector unsigned long long __a, __vector signed long long __b) {
7883 return (__vector unsigned long long)__builtin_s390_vsrlb(
7884 (__vector unsigned char)__a, (__vector unsigned char)__b);
7885}
7886
7887static inline __ATTRS_o_ai __vector unsigned long long
7888vec_srb(__vector unsigned long long __a, __vector unsigned long long __b) {
7889 return (__vector unsigned long long)__builtin_s390_vsrlb(
7890 (__vector unsigned char)__a, (__vector unsigned char)__b);
7891}
7892
7893#if __ARCH__ >= 12
7894static inline __ATTRS_o_ai __vector float
7895vec_srb(__vector float __a, __vector signed int __b) {
7896 return (__vector float)__builtin_s390_vsrlb(
7897 (__vector unsigned char)__a, (__vector unsigned char)__b);
7898}
7899
7900static inline __ATTRS_o_ai __vector float
7901vec_srb(__vector float __a, __vector unsigned int __b) {
7902 return (__vector float)__builtin_s390_vsrlb(
7903 (__vector unsigned char)__a, (__vector unsigned char)__b);
7904}
7905#endif
7906
7907static inline __ATTRS_o_ai __vector double
7908vec_srb(__vector double __a, __vector signed long long __b) {
7909 return (__vector double)__builtin_s390_vsrlb(
7910 (__vector unsigned char)__a, (__vector unsigned char)__b);
7911}
7912
7913static inline __ATTRS_o_ai __vector double
7914vec_srb(__vector double __a, __vector unsigned long long __b) {
7915 return (__vector double)__builtin_s390_vsrlb(
7916 (__vector unsigned char)__a, (__vector unsigned char)__b);
7917}
7918
7919/*-- vec_srdb ---------------------------------------------------------------*/
7920
7921#if __ARCH__ >= 13
7922
7923extern __ATTRS_o __vector signed char
7924vec_srdb(__vector signed char __a, __vector signed char __b, int __c)
7925 __constant_range(__c, 0, 7);
7926
7927extern __ATTRS_o __vector unsigned char
7928vec_srdb(__vector unsigned char __a, __vector unsigned char __b, int __c)
7929 __constant_range(__c, 0, 7);
7930
7931extern __ATTRS_o __vector signed short
7932vec_srdb(__vector signed short __a, __vector signed short __b, int __c)
7933 __constant_range(__c, 0, 7);
7934
7935extern __ATTRS_o __vector unsigned short
7936vec_srdb(__vector unsigned short __a, __vector unsigned short __b, int __c)
7937 __constant_range(__c, 0, 7);
7938
7939extern __ATTRS_o __vector signed int
7940vec_srdb(__vector signed int __a, __vector signed int __b, int __c)
7941 __constant_range(__c, 0, 7);
7942
7943extern __ATTRS_o __vector unsigned int
7944vec_srdb(__vector unsigned int __a, __vector unsigned int __b, int __c)
7945 __constant_range(__c, 0, 7);
7946
7947extern __ATTRS_o __vector signed long long
7948vec_srdb(__vector signed long long __a, __vector signed long long __b, int __c)
7949 __constant_range(__c, 0, 7);
7950
7951extern __ATTRS_o __vector unsigned long long
7952vec_srdb(__vector unsigned long long __a, __vector unsigned long long __b,
7953 int __c)
7954 __constant_range(__c, 0, 7);
7955
7956extern __ATTRS_o __vector float
7957vec_srdb(__vector float __a, __vector float __b, int __c)
7958 __constant_range(__c, 0, 7);
7959
7960extern __ATTRS_o __vector double
7961vec_srdb(__vector double __a, __vector double __b, int __c)
7962 __constant_range(__c, 0, 7);
7963
7964#define vec_srdb(X, Y, Z) ((__typeof__((vec_srdb)((X), (Y), (Z)))) \
7965 __builtin_s390_vsrd((__vector unsigned char)(X), \
7966 (__vector unsigned char)(Y), (Z)))
7967
7968#endif
7969
7970/*-- vec_abs ----------------------------------------------------------------*/
7971
7972static inline __ATTRS_o_ai __vector signed char
7973vec_abs(__vector signed char __a) {
7974 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed char)0));
7975}
7976
7977static inline __ATTRS_o_ai __vector signed short
7978vec_abs(__vector signed short __a) {
7979 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed short)0));
7980}
7981
7982static inline __ATTRS_o_ai __vector signed int
7983vec_abs(__vector signed int __a) {
7984 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed int)0));
7985}
7986
7987static inline __ATTRS_o_ai __vector signed long long
7988vec_abs(__vector signed long long __a) {
7989 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed long long)0));
7990}
7991
7992#if __ARCH__ >= 12
7993static inline __ATTRS_o_ai __vector float
7994vec_abs(__vector float __a) {
7995 return __builtin_s390_vflpsb(__a);
7996}
7997#endif
7998
7999static inline __ATTRS_o_ai __vector double
8000vec_abs(__vector double __a) {
8001 return __builtin_s390_vflpdb(__a);
8002}
8003
8004/*-- vec_nabs ---------------------------------------------------------------*/
8005
8006#if __ARCH__ >= 12
8007static inline __ATTRS_o_ai __vector float
8008vec_nabs(__vector float __a) {
8009 return __builtin_s390_vflnsb(__a);
8010}
8011#endif
8012
8013static inline __ATTRS_o_ai __vector double
8014vec_nabs(__vector double __a) {
8015 return __builtin_s390_vflndb(__a);
8016}
8017
8018/*-- vec_max ----------------------------------------------------------------*/
8019
8020static inline __ATTRS_o_ai __vector signed char
8021vec_max(__vector signed char __a, __vector signed char __b) {
8022 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8023}
8024
8025// This prototype is deprecated.
8026static inline __ATTRS_o_ai __vector signed char
8027vec_max(__vector signed char __a, __vector __bool char __b) {
8028 __vector signed char __bc = (__vector signed char)__b;
8029 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8030}
8031
8032// This prototype is deprecated.
8033static inline __ATTRS_o_ai __vector signed char
8034vec_max(__vector __bool char __a, __vector signed char __b) {
8035 __vector signed char __ac = (__vector signed char)__a;
8036 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8037}
8038
8039static inline __ATTRS_o_ai __vector unsigned char
8040vec_max(__vector unsigned char __a, __vector unsigned char __b) {
8041 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8042}
8043
8044// This prototype is deprecated.
8045static inline __ATTRS_o_ai __vector unsigned char
8046vec_max(__vector unsigned char __a, __vector __bool char __b) {
8047 __vector unsigned char __bc = (__vector unsigned char)__b;
8048 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8049}
8050
8051// This prototype is deprecated.
8052static inline __ATTRS_o_ai __vector unsigned char
8053vec_max(__vector __bool char __a, __vector unsigned char __b) {
8054 __vector unsigned char __ac = (__vector unsigned char)__a;
8055 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8056}
8057
8058static inline __ATTRS_o_ai __vector signed short
8059vec_max(__vector signed short __a, __vector signed short __b) {
8060 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8061}
8062
8063// This prototype is deprecated.
8064static inline __ATTRS_o_ai __vector signed short
8065vec_max(__vector signed short __a, __vector __bool short __b) {
8066 __vector signed short __bc = (__vector signed short)__b;
8067 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8068}
8069
8070// This prototype is deprecated.
8071static inline __ATTRS_o_ai __vector signed short
8072vec_max(__vector __bool short __a, __vector signed short __b) {
8073 __vector signed short __ac = (__vector signed short)__a;
8074 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8075}
8076
8077static inline __ATTRS_o_ai __vector unsigned short
8078vec_max(__vector unsigned short __a, __vector unsigned short __b) {
8079 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8080}
8081
8082// This prototype is deprecated.
8083static inline __ATTRS_o_ai __vector unsigned short
8084vec_max(__vector unsigned short __a, __vector __bool short __b) {
8085 __vector unsigned short __bc = (__vector unsigned short)__b;
8086 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8087}
8088
8089// This prototype is deprecated.
8090static inline __ATTRS_o_ai __vector unsigned short
8091vec_max(__vector __bool short __a, __vector unsigned short __b) {
8092 __vector unsigned short __ac = (__vector unsigned short)__a;
8093 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8094}
8095
8096static inline __ATTRS_o_ai __vector signed int
8097vec_max(__vector signed int __a, __vector signed int __b) {
8098 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8099}
8100
8101// This prototype is deprecated.
8102static inline __ATTRS_o_ai __vector signed int
8103vec_max(__vector signed int __a, __vector __bool int __b) {
8104 __vector signed int __bc = (__vector signed int)__b;
8105 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8106}
8107
8108// This prototype is deprecated.
8109static inline __ATTRS_o_ai __vector signed int
8110vec_max(__vector __bool int __a, __vector signed int __b) {
8111 __vector signed int __ac = (__vector signed int)__a;
8112 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8113}
8114
8115static inline __ATTRS_o_ai __vector unsigned int
8116vec_max(__vector unsigned int __a, __vector unsigned int __b) {
8117 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8118}
8119
8120// This prototype is deprecated.
8121static inline __ATTRS_o_ai __vector unsigned int
8122vec_max(__vector unsigned int __a, __vector __bool int __b) {
8123 __vector unsigned int __bc = (__vector unsigned int)__b;
8124 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8125}
8126
8127// This prototype is deprecated.
8128static inline __ATTRS_o_ai __vector unsigned int
8129vec_max(__vector __bool int __a, __vector unsigned int __b) {
8130 __vector unsigned int __ac = (__vector unsigned int)__a;
8131 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8132}
8133
8134static inline __ATTRS_o_ai __vector signed long long
8135vec_max(__vector signed long long __a, __vector signed long long __b) {
8136 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8137}
8138
8139// This prototype is deprecated.
8140static inline __ATTRS_o_ai __vector signed long long
8141vec_max(__vector signed long long __a, __vector __bool long long __b) {
8142 __vector signed long long __bc = (__vector signed long long)__b;
8143 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8144}
8145
8146// This prototype is deprecated.
8147static inline __ATTRS_o_ai __vector signed long long
8148vec_max(__vector __bool long long __a, __vector signed long long __b) {
8149 __vector signed long long __ac = (__vector signed long long)__a;
8150 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8151}
8152
8153static inline __ATTRS_o_ai __vector unsigned long long
8154vec_max(__vector unsigned long long __a, __vector unsigned long long __b) {
8155 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8156}
8157
8158// This prototype is deprecated.
8159static inline __ATTRS_o_ai __vector unsigned long long
8160vec_max(__vector unsigned long long __a, __vector __bool long long __b) {
8161 __vector unsigned long long __bc = (__vector unsigned long long)__b;
8162 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
8163}
8164
8165// This prototype is deprecated.
8166static inline __ATTRS_o_ai __vector unsigned long long
8167vec_max(__vector __bool long long __a, __vector unsigned long long __b) {
8168 __vector unsigned long long __ac = (__vector unsigned long long)__a;
8169 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
8170}
8171
8172#if __ARCH__ >= 12
8173static inline __ATTRS_o_ai __vector float
8174vec_max(__vector float __a, __vector float __b) {
8175 return __builtin_s390_vfmaxsb(__a, __b, 0);
8176}
8177#endif
8178
8179static inline __ATTRS_o_ai __vector double
8180vec_max(__vector double __a, __vector double __b) {
8181#if __ARCH__ >= 12
8182 return __builtin_s390_vfmaxdb(__a, __b, 0);
8183#else
8184 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
8185#endif
8186}
8187
8188/*-- vec_min ----------------------------------------------------------------*/
8189
8190static inline __ATTRS_o_ai __vector signed char
8191vec_min(__vector signed char __a, __vector signed char __b) {
8192 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8193}
8194
8195// This prototype is deprecated.
8196static inline __ATTRS_o_ai __vector signed char
8197vec_min(__vector signed char __a, __vector __bool char __b) {
8198 __vector signed char __bc = (__vector signed char)__b;
8199 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8200}
8201
8202// This prototype is deprecated.
8203static inline __ATTRS_o_ai __vector signed char
8204vec_min(__vector __bool char __a, __vector signed char __b) {
8205 __vector signed char __ac = (__vector signed char)__a;
8206 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8207}
8208
8209static inline __ATTRS_o_ai __vector unsigned char
8210vec_min(__vector unsigned char __a, __vector unsigned char __b) {
8211 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8212}
8213
8214// This prototype is deprecated.
8215static inline __ATTRS_o_ai __vector unsigned char
8216vec_min(__vector unsigned char __a, __vector __bool char __b) {
8217 __vector unsigned char __bc = (__vector unsigned char)__b;
8218 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8219}
8220
8221// This prototype is deprecated.
8222static inline __ATTRS_o_ai __vector unsigned char
8223vec_min(__vector __bool char __a, __vector unsigned char __b) {
8224 __vector unsigned char __ac = (__vector unsigned char)__a;
8225 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8226}
8227
8228static inline __ATTRS_o_ai __vector signed short
8229vec_min(__vector signed short __a, __vector signed short __b) {
8230 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8231}
8232
8233// This prototype is deprecated.
8234static inline __ATTRS_o_ai __vector signed short
8235vec_min(__vector signed short __a, __vector __bool short __b) {
8236 __vector signed short __bc = (__vector signed short)__b;
8237 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8238}
8239
8240// This prototype is deprecated.
8241static inline __ATTRS_o_ai __vector signed short
8242vec_min(__vector __bool short __a, __vector signed short __b) {
8243 __vector signed short __ac = (__vector signed short)__a;
8244 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8245}
8246
8247static inline __ATTRS_o_ai __vector unsigned short
8248vec_min(__vector unsigned short __a, __vector unsigned short __b) {
8249 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8250}
8251
8252// This prototype is deprecated.
8253static inline __ATTRS_o_ai __vector unsigned short
8254vec_min(__vector unsigned short __a, __vector __bool short __b) {
8255 __vector unsigned short __bc = (__vector unsigned short)__b;
8256 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8257}
8258
8259// This prototype is deprecated.
8260static inline __ATTRS_o_ai __vector unsigned short
8261vec_min(__vector __bool short __a, __vector unsigned short __b) {
8262 __vector unsigned short __ac = (__vector unsigned short)__a;
8263 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8264}
8265
8266static inline __ATTRS_o_ai __vector signed int
8267vec_min(__vector signed int __a, __vector signed int __b) {
8268 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8269}
8270
8271// This prototype is deprecated.
8272static inline __ATTRS_o_ai __vector signed int
8273vec_min(__vector signed int __a, __vector __bool int __b) {
8274 __vector signed int __bc = (__vector signed int)__b;
8275 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8276}
8277
8278// This prototype is deprecated.
8279static inline __ATTRS_o_ai __vector signed int
8280vec_min(__vector __bool int __a, __vector signed int __b) {
8281 __vector signed int __ac = (__vector signed int)__a;
8282 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8283}
8284
8285static inline __ATTRS_o_ai __vector unsigned int
8286vec_min(__vector unsigned int __a, __vector unsigned int __b) {
8287 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8288}
8289
8290// This prototype is deprecated.
8291static inline __ATTRS_o_ai __vector unsigned int
8292vec_min(__vector unsigned int __a, __vector __bool int __b) {
8293 __vector unsigned int __bc = (__vector unsigned int)__b;
8294 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8295}
8296
8297// This prototype is deprecated.
8298static inline __ATTRS_o_ai __vector unsigned int
8299vec_min(__vector __bool int __a, __vector unsigned int __b) {
8300 __vector unsigned int __ac = (__vector unsigned int)__a;
8301 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8302}
8303
8304static inline __ATTRS_o_ai __vector signed long long
8305vec_min(__vector signed long long __a, __vector signed long long __b) {
8306 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8307}
8308
8309// This prototype is deprecated.
8310static inline __ATTRS_o_ai __vector signed long long
8311vec_min(__vector signed long long __a, __vector __bool long long __b) {
8312 __vector signed long long __bc = (__vector signed long long)__b;
8313 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8314}
8315
8316// This prototype is deprecated.
8317static inline __ATTRS_o_ai __vector signed long long
8318vec_min(__vector __bool long long __a, __vector signed long long __b) {
8319 __vector signed long long __ac = (__vector signed long long)__a;
8320 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8321}
8322
8323static inline __ATTRS_o_ai __vector unsigned long long
8324vec_min(__vector unsigned long long __a, __vector unsigned long long __b) {
8325 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8326}
8327
8328// This prototype is deprecated.
8329static inline __ATTRS_o_ai __vector unsigned long long
8330vec_min(__vector unsigned long long __a, __vector __bool long long __b) {
8331 __vector unsigned long long __bc = (__vector unsigned long long)__b;
8332 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
8333}
8334
8335// This prototype is deprecated.
8336static inline __ATTRS_o_ai __vector unsigned long long
8337vec_min(__vector __bool long long __a, __vector unsigned long long __b) {
8338 __vector unsigned long long __ac = (__vector unsigned long long)__a;
8339 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
8340}
8341
8342#if __ARCH__ >= 12
8343static inline __ATTRS_o_ai __vector float
8344vec_min(__vector float __a, __vector float __b) {
8345 return __builtin_s390_vfminsb(__a, __b, 0);
8346}
8347#endif
8348
8349static inline __ATTRS_o_ai __vector double
8350vec_min(__vector double __a, __vector double __b) {
8351#if __ARCH__ >= 12
8352 return __builtin_s390_vfmindb(__a, __b, 0);
8353#else
8354 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
8355#endif
8356}
8357
8358/*-- vec_add_u128 -----------------------------------------------------------*/
8359
8360static inline __ATTRS_ai __vector unsigned char
8361vec_add_u128(__vector unsigned char __a, __vector unsigned char __b) {
8362 return (__vector unsigned char)
8363 (unsigned __int128 __attribute__((__vector_size__(16))))
8364 ((__int128)__a + (__int128)__b);
8365}
8366
8367/*-- vec_addc ---------------------------------------------------------------*/
8368
8369static inline __ATTRS_o_ai __vector unsigned char
8370vec_addc(__vector unsigned char __a, __vector unsigned char __b) {
8371 return __builtin_s390_vaccb(__a, __b);
8372}
8373
8374static inline __ATTRS_o_ai __vector unsigned short
8375vec_addc(__vector unsigned short __a, __vector unsigned short __b) {
8376 return __builtin_s390_vacch(__a, __b);
8377}
8378
8379static inline __ATTRS_o_ai __vector unsigned int
8380vec_addc(__vector unsigned int __a, __vector unsigned int __b) {
8381 return __builtin_s390_vaccf(__a, __b);
8382}
8383
8384static inline __ATTRS_o_ai __vector unsigned long long
8385vec_addc(__vector unsigned long long __a, __vector unsigned long long __b) {
8386 return __builtin_s390_vaccg(__a, __b);
8387}
8388
8389/*-- vec_addc_u128 ----------------------------------------------------------*/
8390
8391static inline __ATTRS_ai __vector unsigned char
8392vec_addc_u128(__vector unsigned char __a, __vector unsigned char __b) {
8393 return (__vector unsigned char)
8394 (unsigned __int128 __attribute__((__vector_size__(16))))
8395 __builtin_s390_vaccq((unsigned __int128)__a, (unsigned __int128)__b);
8396}
8397
8398/*-- vec_adde_u128 ----------------------------------------------------------*/
8399
8400static inline __ATTRS_ai __vector unsigned char
8401vec_adde_u128(__vector unsigned char __a, __vector unsigned char __b,
8402 __vector unsigned char __c) {
8403 return (__vector unsigned char)
8404 (unsigned __int128 __attribute__((__vector_size__(16))))
8405 __builtin_s390_vacq((unsigned __int128)__a, (unsigned __int128)__b,
8406 (unsigned __int128)__c);
8407}
8408
8409/*-- vec_addec_u128 ---------------------------------------------------------*/
8410
8411static inline __ATTRS_ai __vector unsigned char
8412vec_addec_u128(__vector unsigned char __a, __vector unsigned char __b,
8413 __vector unsigned char __c) {
8414 return (__vector unsigned char)
8415 (unsigned __int128 __attribute__((__vector_size__(16))))
8416 __builtin_s390_vacccq((unsigned __int128)__a, (unsigned __int128)__b,
8417 (unsigned __int128)__c);
8418}
8419
8420/*-- vec_avg ----------------------------------------------------------------*/
8421
8422static inline __ATTRS_o_ai __vector signed char
8423vec_avg(__vector signed char __a, __vector signed char __b) {
8424 return __builtin_s390_vavgb(__a, __b);
8425}
8426
8427static inline __ATTRS_o_ai __vector signed short
8428vec_avg(__vector signed short __a, __vector signed short __b) {
8429 return __builtin_s390_vavgh(__a, __b);
8430}
8431
8432static inline __ATTRS_o_ai __vector signed int
8433vec_avg(__vector signed int __a, __vector signed int __b) {
8434 return __builtin_s390_vavgf(__a, __b);
8435}
8436
8437static inline __ATTRS_o_ai __vector signed long long
8438vec_avg(__vector signed long long __a, __vector signed long long __b) {
8439 return __builtin_s390_vavgg(__a, __b);
8440}
8441
8442static inline __ATTRS_o_ai __vector unsigned char
8443vec_avg(__vector unsigned char __a, __vector unsigned char __b) {
8444 return __builtin_s390_vavglb(__a, __b);
8445}
8446
8447static inline __ATTRS_o_ai __vector unsigned short
8448vec_avg(__vector unsigned short __a, __vector unsigned short __b) {
8449 return __builtin_s390_vavglh(__a, __b);
8450}
8451
8452static inline __ATTRS_o_ai __vector unsigned int
8453vec_avg(__vector unsigned int __a, __vector unsigned int __b) {
8454 return __builtin_s390_vavglf(__a, __b);
8455}
8456
8457static inline __ATTRS_o_ai __vector unsigned long long
8458vec_avg(__vector unsigned long long __a, __vector unsigned long long __b) {
8459 return __builtin_s390_vavglg(__a, __b);
8460}
8461
8462/*-- vec_checksum -----------------------------------------------------------*/
8463
8464static inline __ATTRS_ai __vector unsigned int
8465vec_checksum(__vector unsigned int __a, __vector unsigned int __b) {
8466 return __builtin_s390_vcksm(__a, __b);
8467}
8468
8469/*-- vec_gfmsum -------------------------------------------------------------*/
8470
8471static inline __ATTRS_o_ai __vector unsigned short
8472vec_gfmsum(__vector unsigned char __a, __vector unsigned char __b) {
8473 return __builtin_s390_vgfmb(__a, __b);
8474}
8475
8476static inline __ATTRS_o_ai __vector unsigned int
8477vec_gfmsum(__vector unsigned short __a, __vector unsigned short __b) {
8478 return __builtin_s390_vgfmh(__a, __b);
8479}
8480
8481static inline __ATTRS_o_ai __vector unsigned long long
8482vec_gfmsum(__vector unsigned int __a, __vector unsigned int __b) {
8483 return __builtin_s390_vgfmf(__a, __b);
8484}
8485
8486/*-- vec_gfmsum_128 ---------------------------------------------------------*/
8487
8488static inline __ATTRS_o_ai __vector unsigned char
8489vec_gfmsum_128(__vector unsigned long long __a,
8490 __vector unsigned long long __b) {
8491 return (__vector unsigned char)
8492 (unsigned __int128 __attribute__((__vector_size__(16))))
8493 __builtin_s390_vgfmg(__a, __b);
8494}
8495
8496/*-- vec_gfmsum_accum -------------------------------------------------------*/
8497
8498static inline __ATTRS_o_ai __vector unsigned short
8499vec_gfmsum_accum(__vector unsigned char __a, __vector unsigned char __b,
8500 __vector unsigned short __c) {
8501 return __builtin_s390_vgfmab(__a, __b, __c);
8502}
8503
8504static inline __ATTRS_o_ai __vector unsigned int
8505vec_gfmsum_accum(__vector unsigned short __a, __vector unsigned short __b,
8506 __vector unsigned int __c) {
8507 return __builtin_s390_vgfmah(__a, __b, __c);
8508}
8509
8510static inline __ATTRS_o_ai __vector unsigned long long
8511vec_gfmsum_accum(__vector unsigned int __a, __vector unsigned int __b,
8512 __vector unsigned long long __c) {
8513 return __builtin_s390_vgfmaf(__a, __b, __c);
8514}
8515
8516/*-- vec_gfmsum_accum_128 ---------------------------------------------------*/
8517
8518static inline __ATTRS_o_ai __vector unsigned char
8519vec_gfmsum_accum_128(__vector unsigned long long __a,
8520 __vector unsigned long long __b,
8521 __vector unsigned char __c) {
8522 return (__vector unsigned char)
8523 (unsigned __int128 __attribute__((__vector_size__(16))))
8524 __builtin_s390_vgfmag(__a, __b, (unsigned __int128)__c);
8525}
8526
8527/*-- vec_mladd --------------------------------------------------------------*/
8528
8529static inline __ATTRS_o_ai __vector signed char
8530vec_mladd(__vector signed char __a, __vector signed char __b,
8531 __vector signed char __c) {
8532 return __a * __b + __c;
8533}
8534
8535static inline __ATTRS_o_ai __vector signed char
8536vec_mladd(__vector unsigned char __a, __vector signed char __b,
8537 __vector signed char __c) {
8538 return (__vector signed char)__a * __b + __c;
8539}
8540
8541static inline __ATTRS_o_ai __vector signed char
8542vec_mladd(__vector signed char __a, __vector unsigned char __b,
8543 __vector unsigned char __c) {
8544 return __a * (__vector signed char)__b + (__vector signed char)__c;
8545}
8546
8547static inline __ATTRS_o_ai __vector unsigned char
8548vec_mladd(__vector unsigned char __a, __vector unsigned char __b,
8549 __vector unsigned char __c) {
8550 return __a * __b + __c;
8551}
8552
8553static inline __ATTRS_o_ai __vector signed short
8554vec_mladd(__vector signed short __a, __vector signed short __b,
8555 __vector signed short __c) {
8556 return __a * __b + __c;
8557}
8558
8559static inline __ATTRS_o_ai __vector signed short
8560vec_mladd(__vector unsigned short __a, __vector signed short __b,
8561 __vector signed short __c) {
8562 return (__vector signed short)__a * __b + __c;
8563}
8564
8565static inline __ATTRS_o_ai __vector signed short
8566vec_mladd(__vector signed short __a, __vector unsigned short __b,
8567 __vector unsigned short __c) {
8568 return __a * (__vector signed short)__b + (__vector signed short)__c;
8569}
8570
8571static inline __ATTRS_o_ai __vector unsigned short
8572vec_mladd(__vector unsigned short __a, __vector unsigned short __b,
8573 __vector unsigned short __c) {
8574 return __a * __b + __c;
8575}
8576
8577static inline __ATTRS_o_ai __vector signed int
8578vec_mladd(__vector signed int __a, __vector signed int __b,
8579 __vector signed int __c) {
8580 return __a * __b + __c;
8581}
8582
8583static inline __ATTRS_o_ai __vector signed int
8584vec_mladd(__vector unsigned int __a, __vector signed int __b,
8585 __vector signed int __c) {
8586 return (__vector signed int)__a * __b + __c;
8587}
8588
8589static inline __ATTRS_o_ai __vector signed int
8590vec_mladd(__vector signed int __a, __vector unsigned int __b,
8591 __vector unsigned int __c) {
8592 return __a * (__vector signed int)__b + (__vector signed int)__c;
8593}
8594
8595static inline __ATTRS_o_ai __vector unsigned int
8596vec_mladd(__vector unsigned int __a, __vector unsigned int __b,
8597 __vector unsigned int __c) {
8598 return __a * __b + __c;
8599}
8600
8601/*-- vec_mhadd --------------------------------------------------------------*/
8602
8603static inline __ATTRS_o_ai __vector signed char
8604vec_mhadd(__vector signed char __a, __vector signed char __b,
8605 __vector signed char __c) {
8606 return __builtin_s390_vmahb(__a, __b, __c);
8607}
8608
8609static inline __ATTRS_o_ai __vector unsigned char
8610vec_mhadd(__vector unsigned char __a, __vector unsigned char __b,
8611 __vector unsigned char __c) {
8612 return __builtin_s390_vmalhb(__a, __b, __c);
8613}
8614
8615static inline __ATTRS_o_ai __vector signed short
8616vec_mhadd(__vector signed short __a, __vector signed short __b,
8617 __vector signed short __c) {
8618 return __builtin_s390_vmahh(__a, __b, __c);
8619}
8620
8621static inline __ATTRS_o_ai __vector unsigned short
8622vec_mhadd(__vector unsigned short __a, __vector unsigned short __b,
8623 __vector unsigned short __c) {
8624 return __builtin_s390_vmalhh(__a, __b, __c);
8625}
8626
8627static inline __ATTRS_o_ai __vector signed int
8628vec_mhadd(__vector signed int __a, __vector signed int __b,
8629 __vector signed int __c) {
8630 return __builtin_s390_vmahf(__a, __b, __c);
8631}
8632
8633static inline __ATTRS_o_ai __vector unsigned int
8634vec_mhadd(__vector unsigned int __a, __vector unsigned int __b,
8635 __vector unsigned int __c) {
8636 return __builtin_s390_vmalhf(__a, __b, __c);
8637}
8638
8639/*-- vec_meadd --------------------------------------------------------------*/
8640
8641static inline __ATTRS_o_ai __vector signed short
8642vec_meadd(__vector signed char __a, __vector signed char __b,
8643 __vector signed short __c) {
8644 return __builtin_s390_vmaeb(__a, __b, __c);
8645}
8646
8647static inline __ATTRS_o_ai __vector unsigned short
8648vec_meadd(__vector unsigned char __a, __vector unsigned char __b,
8649 __vector unsigned short __c) {
8650 return __builtin_s390_vmaleb(__a, __b, __c);
8651}
8652
8653static inline __ATTRS_o_ai __vector signed int
8654vec_meadd(__vector signed short __a, __vector signed short __b,
8655 __vector signed int __c) {
8656 return __builtin_s390_vmaeh(__a, __b, __c);
8657}
8658
8659static inline __ATTRS_o_ai __vector unsigned int
8660vec_meadd(__vector unsigned short __a, __vector unsigned short __b,
8661 __vector unsigned int __c) {
8662 return __builtin_s390_vmaleh(__a, __b, __c);
8663}
8664
8665static inline __ATTRS_o_ai __vector signed long long
8666vec_meadd(__vector signed int __a, __vector signed int __b,
8667 __vector signed long long __c) {
8668 return __builtin_s390_vmaef(__a, __b, __c);
8669}
8670
8671static inline __ATTRS_o_ai __vector unsigned long long
8672vec_meadd(__vector unsigned int __a, __vector unsigned int __b,
8673 __vector unsigned long long __c) {
8674 return __builtin_s390_vmalef(__a, __b, __c);
8675}
8676
8677/*-- vec_moadd --------------------------------------------------------------*/
8678
8679static inline __ATTRS_o_ai __vector signed short
8680vec_moadd(__vector signed char __a, __vector signed char __b,
8681 __vector signed short __c) {
8682 return __builtin_s390_vmaob(__a, __b, __c);
8683}
8684
8685static inline __ATTRS_o_ai __vector unsigned short
8686vec_moadd(__vector unsigned char __a, __vector unsigned char __b,
8687 __vector unsigned short __c) {
8688 return __builtin_s390_vmalob(__a, __b, __c);
8689}
8690
8691static inline __ATTRS_o_ai __vector signed int
8692vec_moadd(__vector signed short __a, __vector signed short __b,
8693 __vector signed int __c) {
8694 return __builtin_s390_vmaoh(__a, __b, __c);
8695}
8696
8697static inline __ATTRS_o_ai __vector unsigned int
8698vec_moadd(__vector unsigned short __a, __vector unsigned short __b,
8699 __vector unsigned int __c) {
8700 return __builtin_s390_vmaloh(__a, __b, __c);
8701}
8702
8703static inline __ATTRS_o_ai __vector signed long long
8704vec_moadd(__vector signed int __a, __vector signed int __b,
8705 __vector signed long long __c) {
8706 return __builtin_s390_vmaof(__a, __b, __c);
8707}
8708
8709static inline __ATTRS_o_ai __vector unsigned long long
8710vec_moadd(__vector unsigned int __a, __vector unsigned int __b,
8711 __vector unsigned long long __c) {
8712 return __builtin_s390_vmalof(__a, __b, __c);
8713}
8714
8715/*-- vec_mulh ---------------------------------------------------------------*/
8716
8717static inline __ATTRS_o_ai __vector signed char
8718vec_mulh(__vector signed char __a, __vector signed char __b) {
8719 return __builtin_s390_vmhb(__a, __b);
8720}
8721
8722static inline __ATTRS_o_ai __vector unsigned char
8723vec_mulh(__vector unsigned char __a, __vector unsigned char __b) {
8724 return __builtin_s390_vmlhb(__a, __b);
8725}
8726
8727static inline __ATTRS_o_ai __vector signed short
8728vec_mulh(__vector signed short __a, __vector signed short __b) {
8729 return __builtin_s390_vmhh(__a, __b);
8730}
8731
8732static inline __ATTRS_o_ai __vector unsigned short
8733vec_mulh(__vector unsigned short __a, __vector unsigned short __b) {
8734 return __builtin_s390_vmlhh(__a, __b);
8735}
8736
8737static inline __ATTRS_o_ai __vector signed int
8738vec_mulh(__vector signed int __a, __vector signed int __b) {
8739 return __builtin_s390_vmhf(__a, __b);
8740}
8741
8742static inline __ATTRS_o_ai __vector unsigned int
8743vec_mulh(__vector unsigned int __a, __vector unsigned int __b) {
8744 return __builtin_s390_vmlhf(__a, __b);
8745}
8746
8747/*-- vec_mule ---------------------------------------------------------------*/
8748
8749static inline __ATTRS_o_ai __vector signed short
8750vec_mule(__vector signed char __a, __vector signed char __b) {
8751 return __builtin_s390_vmeb(__a, __b);
8752}
8753
8754static inline __ATTRS_o_ai __vector unsigned short
8755vec_mule(__vector unsigned char __a, __vector unsigned char __b) {
8756 return __builtin_s390_vmleb(__a, __b);
8757}
8758
8759static inline __ATTRS_o_ai __vector signed int
8760vec_mule(__vector signed short __a, __vector signed short __b) {
8761 return __builtin_s390_vmeh(__a, __b);
8762}
8763
8764static inline __ATTRS_o_ai __vector unsigned int
8765vec_mule(__vector unsigned short __a, __vector unsigned short __b) {
8766 return __builtin_s390_vmleh(__a, __b);
8767}
8768
8769static inline __ATTRS_o_ai __vector signed long long
8770vec_mule(__vector signed int __a, __vector signed int __b) {
8771 return __builtin_s390_vmef(__a, __b);
8772}
8773
8774static inline __ATTRS_o_ai __vector unsigned long long
8775vec_mule(__vector unsigned int __a, __vector unsigned int __b) {
8776 return __builtin_s390_vmlef(__a, __b);
8777}
8778
8779/*-- vec_mulo ---------------------------------------------------------------*/
8780
8781static inline __ATTRS_o_ai __vector signed short
8782vec_mulo(__vector signed char __a, __vector signed char __b) {
8783 return __builtin_s390_vmob(__a, __b);
8784}
8785
8786static inline __ATTRS_o_ai __vector unsigned short
8787vec_mulo(__vector unsigned char __a, __vector unsigned char __b) {
8788 return __builtin_s390_vmlob(__a, __b);
8789}
8790
8791static inline __ATTRS_o_ai __vector signed int
8792vec_mulo(__vector signed short __a, __vector signed short __b) {
8793 return __builtin_s390_vmoh(__a, __b);
8794}
8795
8796static inline __ATTRS_o_ai __vector unsigned int
8797vec_mulo(__vector unsigned short __a, __vector unsigned short __b) {
8798 return __builtin_s390_vmloh(__a, __b);
8799}
8800
8801static inline __ATTRS_o_ai __vector signed long long
8802vec_mulo(__vector signed int __a, __vector signed int __b) {
8803 return __builtin_s390_vmof(__a, __b);
8804}
8805
8806static inline __ATTRS_o_ai __vector unsigned long long
8807vec_mulo(__vector unsigned int __a, __vector unsigned int __b) {
8808 return __builtin_s390_vmlof(__a, __b);
8809}
8810
8811/*-- vec_msum_u128 ----------------------------------------------------------*/
8812
8813#if __ARCH__ >= 12
8814extern __ATTRS_o __vector unsigned char
8815vec_msum_u128(__vector unsigned long long __a, __vector unsigned long long __b,
8816 __vector unsigned char __c, int __d)
8817 __constant_range(__d, 0, 15);
8818
8819#define vec_msum_u128(X, Y, Z, W) \
8820 ((__typeof__((vec_msum_u128)((X), (Y), (Z), (W)))) \
8821 (unsigned __int128 __attribute__((__vector_size__(16)))) \
8822 __builtin_s390_vmslg((X), (Y), (unsigned __int128)(Z), (W)))
8823#endif
8824
8825/*-- vec_sub_u128 -----------------------------------------------------------*/
8826
8827static inline __ATTRS_ai __vector unsigned char
8828vec_sub_u128(__vector unsigned char __a, __vector unsigned char __b) {
8829 return (__vector unsigned char)
8830 (unsigned __int128 __attribute__((__vector_size__(16))))
8831 ((__int128)__a - (__int128)__b);
8832}
8833
8834/*-- vec_subc ---------------------------------------------------------------*/
8835
8836static inline __ATTRS_o_ai __vector unsigned char
8837vec_subc(__vector unsigned char __a, __vector unsigned char __b) {
8838 return __builtin_s390_vscbib(__a, __b);
8839}
8840
8841static inline __ATTRS_o_ai __vector unsigned short
8842vec_subc(__vector unsigned short __a, __vector unsigned short __b) {
8843 return __builtin_s390_vscbih(__a, __b);
8844}
8845
8846static inline __ATTRS_o_ai __vector unsigned int
8847vec_subc(__vector unsigned int __a, __vector unsigned int __b) {
8848 return __builtin_s390_vscbif(__a, __b);
8849}
8850
8851static inline __ATTRS_o_ai __vector unsigned long long
8852vec_subc(__vector unsigned long long __a, __vector unsigned long long __b) {
8853 return __builtin_s390_vscbig(__a, __b);
8854}
8855
8856/*-- vec_subc_u128 ----------------------------------------------------------*/
8857
8858static inline __ATTRS_ai __vector unsigned char
8859vec_subc_u128(__vector unsigned char __a, __vector unsigned char __b) {
8860 return (__vector unsigned char)
8861 (unsigned __int128 __attribute__((__vector_size__(16))))
8862 __builtin_s390_vscbiq((unsigned __int128)__a, (unsigned __int128)__b);
8863}
8864
8865/*-- vec_sube_u128 ----------------------------------------------------------*/
8866
8867static inline __ATTRS_ai __vector unsigned char
8868vec_sube_u128(__vector unsigned char __a, __vector unsigned char __b,
8869 __vector unsigned char __c) {
8870 return (__vector unsigned char)
8871 (unsigned __int128 __attribute__((__vector_size__(16))))
8872 __builtin_s390_vsbiq((unsigned __int128)__a, (unsigned __int128)__b,
8873 (unsigned __int128)__c);
8874}
8875
8876/*-- vec_subec_u128 ---------------------------------------------------------*/
8877
8878static inline __ATTRS_ai __vector unsigned char
8879vec_subec_u128(__vector unsigned char __a, __vector unsigned char __b,
8880 __vector unsigned char __c) {
8881 return (__vector unsigned char)
8882 (unsigned __int128 __attribute__((__vector_size__(16))))
8883 __builtin_s390_vsbcbiq((unsigned __int128)__a, (unsigned __int128)__b,
8884 (unsigned __int128)__c);
8885}
8886
8887/*-- vec_sum2 ---------------------------------------------------------------*/
8888
8889static inline __ATTRS_o_ai __vector unsigned long long
8890vec_sum2(__vector unsigned short __a, __vector unsigned short __b) {
8891 return __builtin_s390_vsumgh(__a, __b);
8892}
8893
8894static inline __ATTRS_o_ai __vector unsigned long long
8895vec_sum2(__vector unsigned int __a, __vector unsigned int __b) {
8896 return __builtin_s390_vsumgf(__a, __b);
8897}
8898
8899/*-- vec_sum_u128 -----------------------------------------------------------*/
8900
8901static inline __ATTRS_o_ai __vector unsigned char
8902vec_sum_u128(__vector unsigned int __a, __vector unsigned int __b) {
8903 return (__vector unsigned char)
8904 (unsigned __int128 __attribute__((__vector_size__(16))))
8905 __builtin_s390_vsumqf(__a, __b);
8906}
8907
8908static inline __ATTRS_o_ai __vector unsigned char
8909vec_sum_u128(__vector unsigned long long __a, __vector unsigned long long __b) {
8910 return (__vector unsigned char)
8911 (unsigned __int128 __attribute__((__vector_size__(16))))
8912 __builtin_s390_vsumqg(__a, __b);
8913}
8914
8915/*-- vec_sum4 ---------------------------------------------------------------*/
8916
8917static inline __ATTRS_o_ai __vector unsigned int
8918vec_sum4(__vector unsigned char __a, __vector unsigned char __b) {
8919 return __builtin_s390_vsumb(__a, __b);
8920}
8921
8922static inline __ATTRS_o_ai __vector unsigned int
8923vec_sum4(__vector unsigned short __a, __vector unsigned short __b) {
8924 return __builtin_s390_vsumh(__a, __b);
8925}
8926
8927/*-- vec_test_mask ----------------------------------------------------------*/
8928
8929static inline __ATTRS_o_ai int
8930vec_test_mask(__vector signed char __a, __vector unsigned char __b) {
8931 return __builtin_s390_vtm((__vector unsigned char)__a,
8932 (__vector unsigned char)__b);
8933}
8934
8935static inline __ATTRS_o_ai int
8936vec_test_mask(__vector unsigned char __a, __vector unsigned char __b) {
8937 return __builtin_s390_vtm(__a, __b);
8938}
8939
8940static inline __ATTRS_o_ai int
8941vec_test_mask(__vector signed short __a, __vector unsigned short __b) {
8942 return __builtin_s390_vtm((__vector unsigned char)__a,
8943 (__vector unsigned char)__b);
8944}
8945
8946static inline __ATTRS_o_ai int
8947vec_test_mask(__vector unsigned short __a, __vector unsigned short __b) {
8948 return __builtin_s390_vtm((__vector unsigned char)__a,
8949 (__vector unsigned char)__b);
8950}
8951
8952static inline __ATTRS_o_ai int
8953vec_test_mask(__vector signed int __a, __vector unsigned int __b) {
8954 return __builtin_s390_vtm((__vector unsigned char)__a,
8955 (__vector unsigned char)__b);
8956}
8957
8958static inline __ATTRS_o_ai int
8959vec_test_mask(__vector unsigned int __a, __vector unsigned int __b) {
8960 return __builtin_s390_vtm((__vector unsigned char)__a,
8961 (__vector unsigned char)__b);
8962}
8963
8964static inline __ATTRS_o_ai int
8965vec_test_mask(__vector signed long long __a, __vector unsigned long long __b) {
8966 return __builtin_s390_vtm((__vector unsigned char)__a,
8967 (__vector unsigned char)__b);
8968}
8969
8970static inline __ATTRS_o_ai int
8971vec_test_mask(__vector unsigned long long __a,
8972 __vector unsigned long long __b) {
8973 return __builtin_s390_vtm((__vector unsigned char)__a,
8974 (__vector unsigned char)__b);
8975}
8976
8977#if __ARCH__ >= 12
8978static inline __ATTRS_o_ai int
8979vec_test_mask(__vector float __a, __vector unsigned int __b) {
8980 return __builtin_s390_vtm((__vector unsigned char)__a,
8981 (__vector unsigned char)__b);
8982}
8983#endif
8984
8985static inline __ATTRS_o_ai int
8986vec_test_mask(__vector double __a, __vector unsigned long long __b) {
8987 return __builtin_s390_vtm((__vector unsigned char)__a,
8988 (__vector unsigned char)__b);
8989}
8990
8991/*-- vec_madd ---------------------------------------------------------------*/
8992
8993#if __ARCH__ >= 12
8994static inline __ATTRS_o_ai __vector float
8995vec_madd(__vector float __a, __vector float __b, __vector float __c) {
8996 return __builtin_s390_vfmasb(__a, __b, __c);
8997}
8998#endif
8999
9000static inline __ATTRS_o_ai __vector double
9001vec_madd(__vector double __a, __vector double __b, __vector double __c) {
9002 return __builtin_s390_vfmadb(__a, __b, __c);
9003}
9004
9005/*-- vec_msub ---------------------------------------------------------------*/
9006
9007#if __ARCH__ >= 12
9008static inline __ATTRS_o_ai __vector float
9009vec_msub(__vector float __a, __vector float __b, __vector float __c) {
9010 return __builtin_s390_vfmssb(__a, __b, __c);
9011}
9012#endif
9013
9014static inline __ATTRS_o_ai __vector double
9015vec_msub(__vector double __a, __vector double __b, __vector double __c) {
9016 return __builtin_s390_vfmsdb(__a, __b, __c);
9017}
9018
9019/*-- vec_nmadd ---------------------------------------------------------------*/
9020
9021#if __ARCH__ >= 12
9022static inline __ATTRS_o_ai __vector float
9023vec_nmadd(__vector float __a, __vector float __b, __vector float __c) {
9024 return __builtin_s390_vfnmasb(__a, __b, __c);
9025}
9026
9027static inline __ATTRS_o_ai __vector double
9028vec_nmadd(__vector double __a, __vector double __b, __vector double __c) {
9029 return __builtin_s390_vfnmadb(__a, __b, __c);
9030}
9031#endif
9032
9033/*-- vec_nmsub ---------------------------------------------------------------*/
9034
9035#if __ARCH__ >= 12
9036static inline __ATTRS_o_ai __vector float
9037vec_nmsub(__vector float __a, __vector float __b, __vector float __c) {
9038 return __builtin_s390_vfnmssb(__a, __b, __c);
9039}
9040
9041static inline __ATTRS_o_ai __vector double
9042vec_nmsub(__vector double __a, __vector double __b, __vector double __c) {
9043 return __builtin_s390_vfnmsdb(__a, __b, __c);
9044}
9045#endif
9046
9047/*-- vec_sqrt ---------------------------------------------------------------*/
9048
9049#if __ARCH__ >= 12
9050static inline __ATTRS_o_ai __vector float
9051vec_sqrt(__vector float __a) {
9052 return __builtin_s390_vfsqsb(__a);
9053}
9054#endif
9055
9056static inline __ATTRS_o_ai __vector double
9057vec_sqrt(__vector double __a) {
9058 return __builtin_s390_vfsqdb(__a);
9059}
9060
9061/*-- vec_ld2f ---------------------------------------------------------------*/
9062
9063// This prototype is deprecated.
9064static inline __ATTRS_ai __vector double
9065vec_ld2f(const float *__ptr) {
9066 typedef float __v2f32 __attribute__((__vector_size__(8)));
9067 return __builtin_convertvector(*(const __v2f32 *)__ptr, __vector double);
9068}
9069
9070/*-- vec_st2f ---------------------------------------------------------------*/
9071
9072// This prototype is deprecated.
9073static inline __ATTRS_ai void
9074vec_st2f(__vector double __a, float *__ptr) {
9075 typedef float __v2f32 __attribute__((__vector_size__(8)));
9076 *(__v2f32 *)__ptr = __builtin_convertvector(__a, __v2f32);
9077}
9078
9079/*-- vec_ctd ----------------------------------------------------------------*/
9080
9081// This prototype is deprecated.
9082static inline __ATTRS_o_ai __vector double
9083vec_ctd(__vector signed long long __a, int __b)
9084 __constant_range(__b, 0, 31) {
9085 __vector double __conv = __builtin_convertvector(__a, __vector double);
9086 __conv *= ((__vector double)(__vector unsigned long long)
9087 ((0x3ffULL - __b) << 52));
9088 return __conv;
9089}
9090
9091// This prototype is deprecated.
9092static inline __ATTRS_o_ai __vector double
9093vec_ctd(__vector unsigned long long __a, int __b)
9094 __constant_range(__b, 0, 31) {
9095 __vector double __conv = __builtin_convertvector(__a, __vector double);
9096 __conv *= ((__vector double)(__vector unsigned long long)
9097 ((0x3ffULL - __b) << 52));
9098 return __conv;
9099}
9100
9101/*-- vec_ctsl ---------------------------------------------------------------*/
9102
9103// This prototype is deprecated.
9104static inline __ATTRS_o_ai __vector signed long long
9105vec_ctsl(__vector double __a, int __b)
9106 __constant_range(__b, 0, 31) {
9107 __a *= ((__vector double)(__vector unsigned long long)
9108 ((0x3ffULL + __b) << 52));
9109 return __builtin_convertvector(__a, __vector signed long long);
9110}
9111
9112/*-- vec_ctul ---------------------------------------------------------------*/
9113
9114// This prototype is deprecated.
9115static inline __ATTRS_o_ai __vector unsigned long long
9116vec_ctul(__vector double __a, int __b)
9117 __constant_range(__b, 0, 31) {
9118 __a *= ((__vector double)(__vector unsigned long long)
9119 ((0x3ffULL + __b) << 52));
9120 return __builtin_convertvector(__a, __vector unsigned long long);
9121}
9122
9123/*-- vec_doublee ------------------------------------------------------------*/
9124
9125#if __ARCH__ >= 12
9126static inline __ATTRS_ai __vector double
9127vec_doublee(__vector float __a) {
9128 typedef float __v2f32 __attribute__((__vector_size__(8)));
9129 __v2f32 __pack = __builtin_shufflevector(__a, __a, 0, 2);
9130 return __builtin_convertvector(__pack, __vector double);
9131}
9132#endif
9133
9134/*-- vec_floate -------------------------------------------------------------*/
9135
9136#if __ARCH__ >= 12
9137static inline __ATTRS_ai __vector float
9138vec_floate(__vector double __a) {
9139 typedef float __v2f32 __attribute__((__vector_size__(8)));
9140 __v2f32 __pack = __builtin_convertvector(__a, __v2f32);
9141 return __builtin_shufflevector(__pack, __pack, 0, -1, 1, -1);
9142}
9143#endif
9144
9145/*-- vec_double -------------------------------------------------------------*/
9146
9147static inline __ATTRS_o_ai __vector double
9148vec_double(__vector signed long long __a) {
9149 return __builtin_convertvector(__a, __vector double);
9150}
9151
9152static inline __ATTRS_o_ai __vector double
9153vec_double(__vector unsigned long long __a) {
9154 return __builtin_convertvector(__a, __vector double);
9155}
9156
9157/*-- vec_float --------------------------------------------------------------*/
9158
9159#if __ARCH__ >= 13
9160
9161static inline __ATTRS_o_ai __vector float
9162vec_float(__vector signed int __a) {
9163 return __builtin_convertvector(__a, __vector float);
9164}
9165
9166static inline __ATTRS_o_ai __vector float
9167vec_float(__vector unsigned int __a) {
9168 return __builtin_convertvector(__a, __vector float);
9169}
9170
9171#endif
9172
9173/*-- vec_signed -------------------------------------------------------------*/
9174
9175static inline __ATTRS_o_ai __vector signed long long
9176vec_signed(__vector double __a) {
9177 return __builtin_convertvector(__a, __vector signed long long);
9178}
9179
9180#if __ARCH__ >= 13
9181static inline __ATTRS_o_ai __vector signed int
9182vec_signed(__vector float __a) {
9183 return __builtin_convertvector(__a, __vector signed int);
9184}
9185#endif
9186
9187/*-- vec_unsigned -----------------------------------------------------------*/
9188
9189static inline __ATTRS_o_ai __vector unsigned long long
9190vec_unsigned(__vector double __a) {
9191 return __builtin_convertvector(__a, __vector unsigned long long);
9192}
9193
9194#if __ARCH__ >= 13
9195static inline __ATTRS_o_ai __vector unsigned int
9196vec_unsigned(__vector float __a) {
9197 return __builtin_convertvector(__a, __vector unsigned int);
9198}
9199#endif
9200
9201/*-- vec_roundp -------------------------------------------------------------*/
9202
9203#if __ARCH__ >= 12
9204static inline __ATTRS_o_ai __vector float
9205vec_roundp(__vector float __a) {
9206 return __builtin_s390_vfisb(__a, 4, 6);
9207}
9208#endif
9209
9210static inline __ATTRS_o_ai __vector double
9211vec_roundp(__vector double __a) {
9212 return __builtin_s390_vfidb(__a, 4, 6);
9213}
9214
9215/*-- vec_ceil ---------------------------------------------------------------*/
9216
9217#if __ARCH__ >= 12
9218static inline __ATTRS_o_ai __vector float
9219vec_ceil(__vector float __a) {
9220 // On this platform, vec_ceil never triggers the IEEE-inexact exception.
9221 return __builtin_s390_vfisb(__a, 4, 6);
9222}
9223#endif
9224
9225static inline __ATTRS_o_ai __vector double
9226vec_ceil(__vector double __a) {
9227 // On this platform, vec_ceil never triggers the IEEE-inexact exception.
9228 return __builtin_s390_vfidb(__a, 4, 6);
9229}
9230
9231/*-- vec_roundm -------------------------------------------------------------*/
9232
9233#if __ARCH__ >= 12
9234static inline __ATTRS_o_ai __vector float
9235vec_roundm(__vector float __a) {
9236 return __builtin_s390_vfisb(__a, 4, 7);
9237}
9238#endif
9239
9240static inline __ATTRS_o_ai __vector double
9241vec_roundm(__vector double __a) {
9242 return __builtin_s390_vfidb(__a, 4, 7);
9243}
9244
9245/*-- vec_floor --------------------------------------------------------------*/
9246
9247#if __ARCH__ >= 12
9248static inline __ATTRS_o_ai __vector float
9249vec_floor(__vector float __a) {
9250 // On this platform, vec_floor never triggers the IEEE-inexact exception.
9251 return __builtin_s390_vfisb(__a, 4, 7);
9252}
9253#endif
9254
9255static inline __ATTRS_o_ai __vector double
9256vec_floor(__vector double __a) {
9257 // On this platform, vec_floor never triggers the IEEE-inexact exception.
9258 return __builtin_s390_vfidb(__a, 4, 7);
9259}
9260
9261/*-- vec_roundz -------------------------------------------------------------*/
9262
9263#if __ARCH__ >= 12
9264static inline __ATTRS_o_ai __vector float
9265vec_roundz(__vector float __a) {
9266 return __builtin_s390_vfisb(__a, 4, 5);
9267}
9268#endif
9269
9270static inline __ATTRS_o_ai __vector double
9271vec_roundz(__vector double __a) {
9272 return __builtin_s390_vfidb(__a, 4, 5);
9273}
9274
9275/*-- vec_trunc --------------------------------------------------------------*/
9276
9277#if __ARCH__ >= 12
9278static inline __ATTRS_o_ai __vector float
9279vec_trunc(__vector float __a) {
9280 // On this platform, vec_trunc never triggers the IEEE-inexact exception.
9281 return __builtin_s390_vfisb(__a, 4, 5);
9282}
9283#endif
9284
9285static inline __ATTRS_o_ai __vector double
9286vec_trunc(__vector double __a) {
9287 // On this platform, vec_trunc never triggers the IEEE-inexact exception.
9288 return __builtin_s390_vfidb(__a, 4, 5);
9289}
9290
9291/*-- vec_roundc -------------------------------------------------------------*/
9292
9293#if __ARCH__ >= 12
9294static inline __ATTRS_o_ai __vector float
9295vec_roundc(__vector float __a) {
9296 return __builtin_s390_vfisb(__a, 4, 0);
9297}
9298#endif
9299
9300static inline __ATTRS_o_ai __vector double
9301vec_roundc(__vector double __a) {
9302 return __builtin_s390_vfidb(__a, 4, 0);
9303}
9304
9305/*-- vec_rint ---------------------------------------------------------------*/
9306
9307#if __ARCH__ >= 12
9308static inline __ATTRS_o_ai __vector float
9309vec_rint(__vector float __a) {
9310 // vec_rint may trigger the IEEE-inexact exception.
9311 return __builtin_s390_vfisb(__a, 0, 0);
9312}
9313#endif
9314
9315static inline __ATTRS_o_ai __vector double
9316vec_rint(__vector double __a) {
9317 // vec_rint may trigger the IEEE-inexact exception.
9318 return __builtin_s390_vfidb(__a, 0, 0);
9319}
9320
9321/*-- vec_round --------------------------------------------------------------*/
9322
9323#if __ARCH__ >= 12
9324static inline __ATTRS_o_ai __vector float
9325vec_round(__vector float __a) {
9326 return __builtin_s390_vfisb(__a, 4, 4);
9327}
9328#endif
9329
9330static inline __ATTRS_o_ai __vector double
9331vec_round(__vector double __a) {
9332 return __builtin_s390_vfidb(__a, 4, 4);
9333}
9334
9335/*-- vec_fp_test_data_class -------------------------------------------------*/
9336
9337#if __ARCH__ >= 12
9338extern __ATTRS_o __vector __bool int
9339vec_fp_test_data_class(__vector float __a, int __b, int *__c)
9340 __constant_range(__b, 0, 4095);
9341
9342extern __ATTRS_o __vector __bool long long
9343vec_fp_test_data_class(__vector double __a, int __b, int *__c)
9344 __constant_range(__b, 0, 4095);
9345
9346#define vec_fp_test_data_class(X, Y, Z) \
9347 ((__typeof__((vec_fp_test_data_class)((X), (Y), (Z)))) \
9348 __extension__ ({ \
9349 __vector unsigned char __res; \
9350 __vector unsigned char __x = (__vector unsigned char)(X); \
9351 int *__z = (Z); \
9352 switch (sizeof ((X)[0])) { \
9353 case 4: __res = (__vector unsigned char) \
9354 __builtin_s390_vftcisb((__vector float)__x, (Y), __z); \
9355 break; \
9356 default: __res = (__vector unsigned char) \
9357 __builtin_s390_vftcidb((__vector double)__x, (Y), __z); \
9358 break; \
9359 } __res; }))
9360#else
9361#define vec_fp_test_data_class(X, Y, Z) \
9362 ((__vector __bool long long)__builtin_s390_vftcidb((X), (Y), (Z)))
9363#endif
9364
9365#define __VEC_CLASS_FP_ZERO_P (1 << 11)
9366#define __VEC_CLASS_FP_ZERO_N (1 << 10)
9367#define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | __VEC_CLASS_FP_ZERO_N)
9368#define __VEC_CLASS_FP_NORMAL_P (1 << 9)
9369#define __VEC_CLASS_FP_NORMAL_N (1 << 8)
9370#define __VEC_CLASS_FP_NORMAL (__VEC_CLASS_FP_NORMAL_P | \
9371 __VEC_CLASS_FP_NORMAL_N)
9372#define __VEC_CLASS_FP_SUBNORMAL_P (1 << 7)
9373#define __VEC_CLASS_FP_SUBNORMAL_N (1 << 6)
9374#define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \
9375 __VEC_CLASS_FP_SUBNORMAL_N)
9376#define __VEC_CLASS_FP_INFINITY_P (1 << 5)
9377#define __VEC_CLASS_FP_INFINITY_N (1 << 4)
9378#define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \
9379 __VEC_CLASS_FP_INFINITY_N)
9380#define __VEC_CLASS_FP_QNAN_P (1 << 3)
9381#define __VEC_CLASS_FP_QNAN_N (1 << 2)
9382#define __VEC_CLASS_FP_QNAN (__VEC_CLASS_FP_QNAN_P | __VEC_CLASS_FP_QNAN_N)
9383#define __VEC_CLASS_FP_SNAN_P (1 << 1)
9384#define __VEC_CLASS_FP_SNAN_N (1 << 0)
9385#define __VEC_CLASS_FP_SNAN (__VEC_CLASS_FP_SNAN_P | __VEC_CLASS_FP_SNAN_N)
9386#define __VEC_CLASS_FP_NAN (__VEC_CLASS_FP_QNAN | __VEC_CLASS_FP_SNAN)
9387#define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \
9388 __VEC_CLASS_FP_SUBNORMAL | \
9389 __VEC_CLASS_FP_ZERO | \
9390 __VEC_CLASS_FP_INFINITY)
9391
9392/*-- vec_extend_to_fp32_hi --------------------------------------------------*/
9393
9394#if __ARCH__ >= 14
9395#define vec_extend_to_fp32_hi(X, W) \
9396 ((__vector float)__builtin_s390_vclfnhs((X), (W)));
9397#endif
9398
9399/*-- vec_extend_to_fp32_hi --------------------------------------------------*/
9400
9401#if __ARCH__ >= 14
9402#define vec_extend_to_fp32_lo(X, W) \
9403 ((__vector float)__builtin_s390_vclfnls((X), (W)));
9404#endif
9405
9406/*-- vec_round_from_fp32 ----------------------------------------------------*/
9407
9408#if __ARCH__ >= 14
9409#define vec_round_from_fp32(X, Y, W) \
9410 ((__vector unsigned short)__builtin_s390_vcrnfs((X), (Y), (W)));
9411#endif
9412
9413/*-- vec_convert_to_fp16 ----------------------------------------------------*/
9414
9415#if __ARCH__ >= 14
9416#define vec_convert_to_fp16(X, W) \
9417 ((__vector unsigned short)__builtin_s390_vcfn((X), (W)));
9418#endif
9419
9420/*-- vec_convert_from_fp16 --------------------------------------------------*/
9421
9422#if __ARCH__ >= 14
9423#define vec_convert_from_fp16(X, W) \
9424 ((__vector unsigned short)__builtin_s390_vcnf((X), (W)));
9425#endif
9426
9427/*-- vec_cp_until_zero ------------------------------------------------------*/
9428
9429static inline __ATTRS_o_ai __vector signed char
9430vec_cp_until_zero(__vector signed char __a) {
9431 return ((__vector signed char)
9432 __builtin_s390_vistrb((__vector unsigned char)__a));
9433}
9434
9435static inline __ATTRS_o_ai __vector __bool char
9436vec_cp_until_zero(__vector __bool char __a) {
9437 return ((__vector __bool char)
9438 __builtin_s390_vistrb((__vector unsigned char)__a));
9439}
9440
9441static inline __ATTRS_o_ai __vector unsigned char
9442vec_cp_until_zero(__vector unsigned char __a) {
9443 return __builtin_s390_vistrb(__a);
9444}
9445
9446static inline __ATTRS_o_ai __vector signed short
9447vec_cp_until_zero(__vector signed short __a) {
9448 return ((__vector signed short)
9449 __builtin_s390_vistrh((__vector unsigned short)__a));
9450}
9451
9452static inline __ATTRS_o_ai __vector __bool short
9453vec_cp_until_zero(__vector __bool short __a) {
9454 return ((__vector __bool short)
9455 __builtin_s390_vistrh((__vector unsigned short)__a));
9456}
9457
9458static inline __ATTRS_o_ai __vector unsigned short
9459vec_cp_until_zero(__vector unsigned short __a) {
9460 return __builtin_s390_vistrh(__a);
9461}
9462
9463static inline __ATTRS_o_ai __vector signed int
9464vec_cp_until_zero(__vector signed int __a) {
9465 return ((__vector signed int)
9466 __builtin_s390_vistrf((__vector unsigned int)__a));
9467}
9468
9469static inline __ATTRS_o_ai __vector __bool int
9470vec_cp_until_zero(__vector __bool int __a) {
9471 return ((__vector __bool int)
9472 __builtin_s390_vistrf((__vector unsigned int)__a));
9473}
9474
9475static inline __ATTRS_o_ai __vector unsigned int
9476vec_cp_until_zero(__vector unsigned int __a) {
9477 return __builtin_s390_vistrf(__a);
9478}
9479
9480/*-- vec_cp_until_zero_cc ---------------------------------------------------*/
9481
9482static inline __ATTRS_o_ai __vector signed char
9483vec_cp_until_zero_cc(__vector signed char __a, int *__cc) {
9484 return (__vector signed char)
9485 __builtin_s390_vistrbs((__vector unsigned char)__a, __cc);
9486}
9487
9488static inline __ATTRS_o_ai __vector __bool char
9489vec_cp_until_zero_cc(__vector __bool char __a, int *__cc) {
9490 return (__vector __bool char)
9491 __builtin_s390_vistrbs((__vector unsigned char)__a, __cc);
9492}
9493
9494static inline __ATTRS_o_ai __vector unsigned char
9495vec_cp_until_zero_cc(__vector unsigned char __a, int *__cc) {
9496 return __builtin_s390_vistrbs(__a, __cc);
9497}
9498
9499static inline __ATTRS_o_ai __vector signed short
9500vec_cp_until_zero_cc(__vector signed short __a, int *__cc) {
9501 return (__vector signed short)
9502 __builtin_s390_vistrhs((__vector unsigned short)__a, __cc);
9503}
9504
9505static inline __ATTRS_o_ai __vector __bool short
9506vec_cp_until_zero_cc(__vector __bool short __a, int *__cc) {
9507 return (__vector __bool short)
9508 __builtin_s390_vistrhs((__vector unsigned short)__a, __cc);
9509}
9510
9511static inline __ATTRS_o_ai __vector unsigned short
9512vec_cp_until_zero_cc(__vector unsigned short __a, int *__cc) {
9513 return __builtin_s390_vistrhs(__a, __cc);
9514}
9515
9516static inline __ATTRS_o_ai __vector signed int
9517vec_cp_until_zero_cc(__vector signed int __a, int *__cc) {
9518 return (__vector signed int)
9519 __builtin_s390_vistrfs((__vector unsigned int)__a, __cc);
9520}
9521
9522static inline __ATTRS_o_ai __vector __bool int
9523vec_cp_until_zero_cc(__vector __bool int __a, int *__cc) {
9524 return (__vector __bool int)
9525 __builtin_s390_vistrfs((__vector unsigned int)__a, __cc);
9526}
9527
9528static inline __ATTRS_o_ai __vector unsigned int
9529vec_cp_until_zero_cc(__vector unsigned int __a, int *__cc) {
9530 return __builtin_s390_vistrfs(__a, __cc);
9531}
9532
9533/*-- vec_cmpeq_idx ----------------------------------------------------------*/
9534
9535static inline __ATTRS_o_ai __vector signed char
9536vec_cmpeq_idx(__vector signed char __a, __vector signed char __b) {
9537 return (__vector signed char)
9538 __builtin_s390_vfeeb((__vector unsigned char)__a,
9539 (__vector unsigned char)__b);
9540}
9541
9542static inline __ATTRS_o_ai __vector unsigned char
9543vec_cmpeq_idx(__vector __bool char __a, __vector __bool char __b) {
9544 return __builtin_s390_vfeeb((__vector unsigned char)__a,
9545 (__vector unsigned char)__b);
9546}
9547
9548static inline __ATTRS_o_ai __vector unsigned char
9549vec_cmpeq_idx(__vector unsigned char __a, __vector unsigned char __b) {
9550 return __builtin_s390_vfeeb(__a, __b);
9551}
9552
9553static inline __ATTRS_o_ai __vector signed short
9554vec_cmpeq_idx(__vector signed short __a, __vector signed short __b) {
9555 return (__vector signed short)
9556 __builtin_s390_vfeeh((__vector unsigned short)__a,
9557 (__vector unsigned short)__b);
9558}
9559
9560static inline __ATTRS_o_ai __vector unsigned short
9561vec_cmpeq_idx(__vector __bool short __a, __vector __bool short __b) {
9562 return __builtin_s390_vfeeh((__vector unsigned short)__a,
9563 (__vector unsigned short)__b);
9564}
9565
9566static inline __ATTRS_o_ai __vector unsigned short
9567vec_cmpeq_idx(__vector unsigned short __a, __vector unsigned short __b) {
9568 return __builtin_s390_vfeeh(__a, __b);
9569}
9570
9571static inline __ATTRS_o_ai __vector signed int
9572vec_cmpeq_idx(__vector signed int __a, __vector signed int __b) {
9573 return (__vector signed int)
9574 __builtin_s390_vfeef((__vector unsigned int)__a,
9575 (__vector unsigned int)__b);
9576}
9577
9578static inline __ATTRS_o_ai __vector unsigned int
9579vec_cmpeq_idx(__vector __bool int __a, __vector __bool int __b) {
9580 return __builtin_s390_vfeef((__vector unsigned int)__a,
9581 (__vector unsigned int)__b);
9582}
9583
9584static inline __ATTRS_o_ai __vector unsigned int
9585vec_cmpeq_idx(__vector unsigned int __a, __vector unsigned int __b) {
9586 return __builtin_s390_vfeef(__a, __b);
9587}
9588
9589/*-- vec_cmpeq_idx_cc -------------------------------------------------------*/
9590
9591static inline __ATTRS_o_ai __vector signed char
9592vec_cmpeq_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) {
9593 return (__vector signed char)
9594 __builtin_s390_vfeebs((__vector unsigned char)__a,
9595 (__vector unsigned char)__b, __cc);
9596}
9597
9598static inline __ATTRS_o_ai __vector unsigned char
9599vec_cmpeq_idx_cc(__vector __bool char __a, __vector __bool char __b, int *__cc) {
9600 return __builtin_s390_vfeebs((__vector unsigned char)__a,
9601 (__vector unsigned char)__b, __cc);
9602}
9603
9604static inline __ATTRS_o_ai __vector unsigned char
9605vec_cmpeq_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9606 int *__cc) {
9607 return __builtin_s390_vfeebs(__a, __b, __cc);
9608}
9609
9610static inline __ATTRS_o_ai __vector signed short
9611vec_cmpeq_idx_cc(__vector signed short __a, __vector signed short __b,
9612 int *__cc) {
9613 return (__vector signed short)
9614 __builtin_s390_vfeehs((__vector unsigned short)__a,
9615 (__vector unsigned short)__b, __cc);
9616}
9617
9618static inline __ATTRS_o_ai __vector unsigned short
9619vec_cmpeq_idx_cc(__vector __bool short __a, __vector __bool short __b, int *__cc) {
9620 return __builtin_s390_vfeehs((__vector unsigned short)__a,
9621 (__vector unsigned short)__b, __cc);
9622}
9623
9624static inline __ATTRS_o_ai __vector unsigned short
9625vec_cmpeq_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9626 int *__cc) {
9627 return __builtin_s390_vfeehs(__a, __b, __cc);
9628}
9629
9630static inline __ATTRS_o_ai __vector signed int
9631vec_cmpeq_idx_cc(__vector signed int __a, __vector signed int __b, int *__cc) {
9632 return (__vector signed int)
9633 __builtin_s390_vfeefs((__vector unsigned int)__a,
9634 (__vector unsigned int)__b, __cc);
9635}
9636
9637static inline __ATTRS_o_ai __vector unsigned int
9638vec_cmpeq_idx_cc(__vector __bool int __a, __vector __bool int __b, int *__cc) {
9639 return __builtin_s390_vfeefs((__vector unsigned int)__a,
9640 (__vector unsigned int)__b, __cc);
9641}
9642
9643static inline __ATTRS_o_ai __vector unsigned int
9644vec_cmpeq_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9645 int *__cc) {
9646 return __builtin_s390_vfeefs(__a, __b, __cc);
9647}
9648
9649/*-- vec_cmpeq_or_0_idx -----------------------------------------------------*/
9650
9651static inline __ATTRS_o_ai __vector signed char
9652vec_cmpeq_or_0_idx(__vector signed char __a, __vector signed char __b) {
9653 return (__vector signed char)
9654 __builtin_s390_vfeezb((__vector unsigned char)__a,
9655 (__vector unsigned char)__b);
9656}
9657
9658static inline __ATTRS_o_ai __vector unsigned char
9659vec_cmpeq_or_0_idx(__vector __bool char __a, __vector __bool char __b) {
9660 return __builtin_s390_vfeezb((__vector unsigned char)__a,
9661 (__vector unsigned char)__b);
9662}
9663
9664static inline __ATTRS_o_ai __vector unsigned char
9665vec_cmpeq_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) {
9666 return __builtin_s390_vfeezb(__a, __b);
9667}
9668
9669static inline __ATTRS_o_ai __vector signed short
9670vec_cmpeq_or_0_idx(__vector signed short __a, __vector signed short __b) {
9671 return (__vector signed short)
9672 __builtin_s390_vfeezh((__vector unsigned short)__a,
9673 (__vector unsigned short)__b);
9674}
9675
9676static inline __ATTRS_o_ai __vector unsigned short
9677vec_cmpeq_or_0_idx(__vector __bool short __a, __vector __bool short __b) {
9678 return __builtin_s390_vfeezh((__vector unsigned short)__a,
9679 (__vector unsigned short)__b);
9680}
9681
9682static inline __ATTRS_o_ai __vector unsigned short
9683vec_cmpeq_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) {
9684 return __builtin_s390_vfeezh(__a, __b);
9685}
9686
9687static inline __ATTRS_o_ai __vector signed int
9688vec_cmpeq_or_0_idx(__vector signed int __a, __vector signed int __b) {
9689 return (__vector signed int)
9690 __builtin_s390_vfeezf((__vector unsigned int)__a,
9691 (__vector unsigned int)__b);
9692}
9693
9694static inline __ATTRS_o_ai __vector unsigned int
9695vec_cmpeq_or_0_idx(__vector __bool int __a, __vector __bool int __b) {
9696 return __builtin_s390_vfeezf((__vector unsigned int)__a,
9697 (__vector unsigned int)__b);
9698}
9699
9700static inline __ATTRS_o_ai __vector unsigned int
9701vec_cmpeq_or_0_idx(__vector unsigned int __a, __vector unsigned int __b) {
9702 return __builtin_s390_vfeezf(__a, __b);
9703}
9704
9705/*-- vec_cmpeq_or_0_idx_cc --------------------------------------------------*/
9706
9707static inline __ATTRS_o_ai __vector signed char
9708vec_cmpeq_or_0_idx_cc(__vector signed char __a, __vector signed char __b,
9709 int *__cc) {
9710 return (__vector signed char)
9711 __builtin_s390_vfeezbs((__vector unsigned char)__a,
9712 (__vector unsigned char)__b, __cc);
9713}
9714
9715static inline __ATTRS_o_ai __vector unsigned char
9716vec_cmpeq_or_0_idx_cc(__vector __bool char __a, __vector __bool char __b,
9717 int *__cc) {
9718 return __builtin_s390_vfeezbs((__vector unsigned char)__a,
9719 (__vector unsigned char)__b, __cc);
9720}
9721
9722static inline __ATTRS_o_ai __vector unsigned char
9723vec_cmpeq_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9724 int *__cc) {
9725 return __builtin_s390_vfeezbs(__a, __b, __cc);
9726}
9727
9728static inline __ATTRS_o_ai __vector signed short
9729vec_cmpeq_or_0_idx_cc(__vector signed short __a, __vector signed short __b,
9730 int *__cc) {
9731 return (__vector signed short)
9732 __builtin_s390_vfeezhs((__vector unsigned short)__a,
9733 (__vector unsigned short)__b, __cc);
9734}
9735
9736static inline __ATTRS_o_ai __vector unsigned short
9737vec_cmpeq_or_0_idx_cc(__vector __bool short __a, __vector __bool short __b,
9738 int *__cc) {
9739 return __builtin_s390_vfeezhs((__vector unsigned short)__a,
9740 (__vector unsigned short)__b, __cc);
9741}
9742
9743static inline __ATTRS_o_ai __vector unsigned short
9744vec_cmpeq_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9745 int *__cc) {
9746 return __builtin_s390_vfeezhs(__a, __b, __cc);
9747}
9748
9749static inline __ATTRS_o_ai __vector signed int
9750vec_cmpeq_or_0_idx_cc(__vector signed int __a, __vector signed int __b,
9751 int *__cc) {
9752 return (__vector signed int)
9753 __builtin_s390_vfeezfs((__vector unsigned int)__a,
9754 (__vector unsigned int)__b, __cc);
9755}
9756
9757static inline __ATTRS_o_ai __vector unsigned int
9758vec_cmpeq_or_0_idx_cc(__vector __bool int __a, __vector __bool int __b,
9759 int *__cc) {
9760 return __builtin_s390_vfeezfs((__vector unsigned int)__a,
9761 (__vector unsigned int)__b, __cc);
9762}
9763
9764static inline __ATTRS_o_ai __vector unsigned int
9765vec_cmpeq_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9766 int *__cc) {
9767 return __builtin_s390_vfeezfs(__a, __b, __cc);
9768}
9769
9770/*-- vec_cmpne_idx ----------------------------------------------------------*/
9771
9772static inline __ATTRS_o_ai __vector signed char
9773vec_cmpne_idx(__vector signed char __a, __vector signed char __b) {
9774 return (__vector signed char)
9775 __builtin_s390_vfeneb((__vector unsigned char)__a,
9776 (__vector unsigned char)__b);
9777}
9778
9779static inline __ATTRS_o_ai __vector unsigned char
9780vec_cmpne_idx(__vector __bool char __a, __vector __bool char __b) {
9781 return __builtin_s390_vfeneb((__vector unsigned char)__a,
9782 (__vector unsigned char)__b);
9783}
9784
9785static inline __ATTRS_o_ai __vector unsigned char
9786vec_cmpne_idx(__vector unsigned char __a, __vector unsigned char __b) {
9787 return __builtin_s390_vfeneb(__a, __b);
9788}
9789
9790static inline __ATTRS_o_ai __vector signed short
9791vec_cmpne_idx(__vector signed short __a, __vector signed short __b) {
9792 return (__vector signed short)
9793 __builtin_s390_vfeneh((__vector unsigned short)__a,
9794 (__vector unsigned short)__b);
9795}
9796
9797static inline __ATTRS_o_ai __vector unsigned short
9798vec_cmpne_idx(__vector __bool short __a, __vector __bool short __b) {
9799 return __builtin_s390_vfeneh((__vector unsigned short)__a,
9800 (__vector unsigned short)__b);
9801}
9802
9803static inline __ATTRS_o_ai __vector unsigned short
9804vec_cmpne_idx(__vector unsigned short __a, __vector unsigned short __b) {
9805 return __builtin_s390_vfeneh(__a, __b);
9806}
9807
9808static inline __ATTRS_o_ai __vector signed int
9809vec_cmpne_idx(__vector signed int __a, __vector signed int __b) {
9810 return (__vector signed int)
9811 __builtin_s390_vfenef((__vector unsigned int)__a,
9812 (__vector unsigned int)__b);
9813}
9814
9815static inline __ATTRS_o_ai __vector unsigned int
9816vec_cmpne_idx(__vector __bool int __a, __vector __bool int __b) {
9817 return __builtin_s390_vfenef((__vector unsigned int)__a,
9818 (__vector unsigned int)__b);
9819}
9820
9821static inline __ATTRS_o_ai __vector unsigned int
9822vec_cmpne_idx(__vector unsigned int __a, __vector unsigned int __b) {
9823 return __builtin_s390_vfenef(__a, __b);
9824}
9825
9826/*-- vec_cmpne_idx_cc -------------------------------------------------------*/
9827
9828static inline __ATTRS_o_ai __vector signed char
9829vec_cmpne_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) {
9830 return (__vector signed char)
9831 __builtin_s390_vfenebs((__vector unsigned char)__a,
9832 (__vector unsigned char)__b, __cc);
9833}
9834
9835static inline __ATTRS_o_ai __vector unsigned char
9836vec_cmpne_idx_cc(__vector __bool char __a, __vector __bool char __b, int *__cc) {
9837 return __builtin_s390_vfenebs((__vector unsigned char)__a,
9838 (__vector unsigned char)__b, __cc);
9839}
9840
9841static inline __ATTRS_o_ai __vector unsigned char
9842vec_cmpne_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9843 int *__cc) {
9844 return __builtin_s390_vfenebs(__a, __b, __cc);
9845}
9846
9847static inline __ATTRS_o_ai __vector signed short
9848vec_cmpne_idx_cc(__vector signed short __a, __vector signed short __b,
9849 int *__cc) {
9850 return (__vector signed short)
9851 __builtin_s390_vfenehs((__vector unsigned short)__a,
9852 (__vector unsigned short)__b, __cc);
9853}
9854
9855static inline __ATTRS_o_ai __vector unsigned short
9856vec_cmpne_idx_cc(__vector __bool short __a, __vector __bool short __b,
9857 int *__cc) {
9858 return __builtin_s390_vfenehs((__vector unsigned short)__a,
9859 (__vector unsigned short)__b, __cc);
9860}
9861
9862static inline __ATTRS_o_ai __vector unsigned short
9863vec_cmpne_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9864 int *__cc) {
9865 return __builtin_s390_vfenehs(__a, __b, __cc);
9866}
9867
9868static inline __ATTRS_o_ai __vector signed int
9869vec_cmpne_idx_cc(__vector signed int __a, __vector signed int __b, int *__cc) {
9870 return (__vector signed int)
9871 __builtin_s390_vfenefs((__vector unsigned int)__a,
9872 (__vector unsigned int)__b, __cc);
9873}
9874
9875static inline __ATTRS_o_ai __vector unsigned int
9876vec_cmpne_idx_cc(__vector __bool int __a, __vector __bool int __b, int *__cc) {
9877 return __builtin_s390_vfenefs((__vector unsigned int)__a,
9878 (__vector unsigned int)__b, __cc);
9879}
9880
9881static inline __ATTRS_o_ai __vector unsigned int
9882vec_cmpne_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
9883 int *__cc) {
9884 return __builtin_s390_vfenefs(__a, __b, __cc);
9885}
9886
9887/*-- vec_cmpne_or_0_idx -----------------------------------------------------*/
9888
9889static inline __ATTRS_o_ai __vector signed char
9890vec_cmpne_or_0_idx(__vector signed char __a, __vector signed char __b) {
9891 return (__vector signed char)
9892 __builtin_s390_vfenezb((__vector unsigned char)__a,
9893 (__vector unsigned char)__b);
9894}
9895
9896static inline __ATTRS_o_ai __vector unsigned char
9897vec_cmpne_or_0_idx(__vector __bool char __a, __vector __bool char __b) {
9898 return __builtin_s390_vfenezb((__vector unsigned char)__a,
9899 (__vector unsigned char)__b);
9900}
9901
9902static inline __ATTRS_o_ai __vector unsigned char
9903vec_cmpne_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) {
9904 return __builtin_s390_vfenezb(__a, __b);
9905}
9906
9907static inline __ATTRS_o_ai __vector signed short
9908vec_cmpne_or_0_idx(__vector signed short __a, __vector signed short __b) {
9909 return (__vector signed short)
9910 __builtin_s390_vfenezh((__vector unsigned short)__a,
9911 (__vector unsigned short)__b);
9912}
9913
9914static inline __ATTRS_o_ai __vector unsigned short
9915vec_cmpne_or_0_idx(__vector __bool short __a, __vector __bool short __b) {
9916 return __builtin_s390_vfenezh((__vector unsigned short)__a,
9917 (__vector unsigned short)__b);
9918}
9919
9920static inline __ATTRS_o_ai __vector unsigned short
9921vec_cmpne_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) {
9922 return __builtin_s390_vfenezh(__a, __b);
9923}
9924
9925static inline __ATTRS_o_ai __vector signed int
9926vec_cmpne_or_0_idx(__vector signed int __a, __vector signed int __b) {
9927 return (__vector signed int)
9928 __builtin_s390_vfenezf((__vector unsigned int)__a,
9929 (__vector unsigned int)__b);
9930}
9931
9932static inline __ATTRS_o_ai __vector unsigned int
9933vec_cmpne_or_0_idx(__vector __bool int __a, __vector __bool int __b) {
9934 return __builtin_s390_vfenezf((__vector unsigned int)__a,
9935 (__vector unsigned int)__b);
9936}
9937
9938static inline __ATTRS_o_ai __vector unsigned int
9939vec_cmpne_or_0_idx(__vector unsigned int __a, __vector unsigned int __b) {
9940 return __builtin_s390_vfenezf(__a, __b);
9941}
9942
9943/*-- vec_cmpne_or_0_idx_cc --------------------------------------------------*/
9944
9945static inline __ATTRS_o_ai __vector signed char
9946vec_cmpne_or_0_idx_cc(__vector signed char __a, __vector signed char __b,
9947 int *__cc) {
9948 return (__vector signed char)
9949 __builtin_s390_vfenezbs((__vector unsigned char)__a,
9950 (__vector unsigned char)__b, __cc);
9951}
9952
9953static inline __ATTRS_o_ai __vector unsigned char
9954vec_cmpne_or_0_idx_cc(__vector __bool char __a, __vector __bool char __b,
9955 int *__cc) {
9956 return __builtin_s390_vfenezbs((__vector unsigned char)__a,
9957 (__vector unsigned char)__b, __cc);
9958}
9959
9960static inline __ATTRS_o_ai __vector unsigned char
9961vec_cmpne_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
9962 int *__cc) {
9963 return __builtin_s390_vfenezbs(__a, __b, __cc);
9964}
9965
9966static inline __ATTRS_o_ai __vector signed short
9967vec_cmpne_or_0_idx_cc(__vector signed short __a, __vector signed short __b,
9968 int *__cc) {
9969 return (__vector signed short)
9970 __builtin_s390_vfenezhs((__vector unsigned short)__a,
9971 (__vector unsigned short)__b, __cc);
9972}
9973
9974static inline __ATTRS_o_ai __vector unsigned short
9975vec_cmpne_or_0_idx_cc(__vector __bool short __a, __vector __bool short __b,
9976 int *__cc) {
9977 return __builtin_s390_vfenezhs((__vector unsigned short)__a,
9978 (__vector unsigned short)__b, __cc);
9979}
9980
9981static inline __ATTRS_o_ai __vector unsigned short
9982vec_cmpne_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
9983 int *__cc) {
9984 return __builtin_s390_vfenezhs(__a, __b, __cc);
9985}
9986
9987static inline __ATTRS_o_ai __vector signed int
9988vec_cmpne_or_0_idx_cc(__vector signed int __a, __vector signed int __b,
9989 int *__cc) {
9990 return (__vector signed int)
9991 __builtin_s390_vfenezfs((__vector unsigned int)__a,
9992 (__vector unsigned int)__b, __cc);
9993}
9994
9995static inline __ATTRS_o_ai __vector unsigned int
9996vec_cmpne_or_0_idx_cc(__vector __bool int __a, __vector __bool int __b,
9997 int *__cc) {
9998 return __builtin_s390_vfenezfs((__vector unsigned int)__a,
9999 (__vector unsigned int)__b, __cc);
10000}
10001
10002static inline __ATTRS_o_ai __vector unsigned int
10003vec_cmpne_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10004 int *__cc) {
10005 return __builtin_s390_vfenezfs(__a, __b, __cc);
10006}
10007
10008/*-- vec_cmprg --------------------------------------------------------------*/
10009
10010static inline __ATTRS_o_ai __vector __bool char
10011vec_cmprg(__vector unsigned char __a, __vector unsigned char __b,
10012 __vector unsigned char __c) {
10013 return (__vector __bool char)__builtin_s390_vstrcb(__a, __b, __c, 4);
10014}
10015
10016static inline __ATTRS_o_ai __vector __bool short
10017vec_cmprg(__vector unsigned short __a, __vector unsigned short __b,
10018 __vector unsigned short __c) {
10019 return (__vector __bool short)__builtin_s390_vstrch(__a, __b, __c, 4);
10020}
10021
10022static inline __ATTRS_o_ai __vector __bool int
10023vec_cmprg(__vector unsigned int __a, __vector unsigned int __b,
10024 __vector unsigned int __c) {
10025 return (__vector __bool int)__builtin_s390_vstrcf(__a, __b, __c, 4);
10026}
10027
10028/*-- vec_cmprg_cc -----------------------------------------------------------*/
10029
10030static inline __ATTRS_o_ai __vector __bool char
10031vec_cmprg_cc(__vector unsigned char __a, __vector unsigned char __b,
10032 __vector unsigned char __c, int *__cc) {
10033 return (__vector __bool char)__builtin_s390_vstrcbs(__a, __b, __c, 4, __cc);
10034}
10035
10036static inline __ATTRS_o_ai __vector __bool short
10037vec_cmprg_cc(__vector unsigned short __a, __vector unsigned short __b,
10038 __vector unsigned short __c, int *__cc) {
10039 return (__vector __bool short)__builtin_s390_vstrchs(__a, __b, __c, 4, __cc);
10040}
10041
10042static inline __ATTRS_o_ai __vector __bool int
10043vec_cmprg_cc(__vector unsigned int __a, __vector unsigned int __b,
10044 __vector unsigned int __c, int *__cc) {
10045 return (__vector __bool int)__builtin_s390_vstrcfs(__a, __b, __c, 4, __cc);
10046}
10047
10048/*-- vec_cmprg_idx ----------------------------------------------------------*/
10049
10050static inline __ATTRS_o_ai __vector unsigned char
10051vec_cmprg_idx(__vector unsigned char __a, __vector unsigned char __b,
10052 __vector unsigned char __c) {
10053 return __builtin_s390_vstrcb(__a, __b, __c, 0);
10054}
10055
10056static inline __ATTRS_o_ai __vector unsigned short
10057vec_cmprg_idx(__vector unsigned short __a, __vector unsigned short __b,
10058 __vector unsigned short __c) {
10059 return __builtin_s390_vstrch(__a, __b, __c, 0);
10060}
10061
10062static inline __ATTRS_o_ai __vector unsigned int
10063vec_cmprg_idx(__vector unsigned int __a, __vector unsigned int __b,
10064 __vector unsigned int __c) {
10065 return __builtin_s390_vstrcf(__a, __b, __c, 0);
10066}
10067
10068/*-- vec_cmprg_idx_cc -------------------------------------------------------*/
10069
10070static inline __ATTRS_o_ai __vector unsigned char
10071vec_cmprg_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10072 __vector unsigned char __c, int *__cc) {
10073 return __builtin_s390_vstrcbs(__a, __b, __c, 0, __cc);
10074}
10075
10076static inline __ATTRS_o_ai __vector unsigned short
10077vec_cmprg_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10078 __vector unsigned short __c, int *__cc) {
10079 return __builtin_s390_vstrchs(__a, __b, __c, 0, __cc);
10080}
10081
10082static inline __ATTRS_o_ai __vector unsigned int
10083vec_cmprg_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10084 __vector unsigned int __c, int *__cc) {
10085 return __builtin_s390_vstrcfs(__a, __b, __c, 0, __cc);
10086}
10087
10088/*-- vec_cmprg_or_0_idx -----------------------------------------------------*/
10089
10090static inline __ATTRS_o_ai __vector unsigned char
10091vec_cmprg_or_0_idx(__vector unsigned char __a, __vector unsigned char __b,
10092 __vector unsigned char __c) {
10093 return __builtin_s390_vstrczb(__a, __b, __c, 0);
10094}
10095
10096static inline __ATTRS_o_ai __vector unsigned short
10097vec_cmprg_or_0_idx(__vector unsigned short __a, __vector unsigned short __b,
10098 __vector unsigned short __c) {
10099 return __builtin_s390_vstrczh(__a, __b, __c, 0);
10100}
10101
10102static inline __ATTRS_o_ai __vector unsigned int
10103vec_cmprg_or_0_idx(__vector unsigned int __a, __vector unsigned int __b,
10104 __vector unsigned int __c) {
10105 return __builtin_s390_vstrczf(__a, __b, __c, 0);
10106}
10107
10108/*-- vec_cmprg_or_0_idx_cc --------------------------------------------------*/
10109
10110static inline __ATTRS_o_ai __vector unsigned char
10111vec_cmprg_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10112 __vector unsigned char __c, int *__cc) {
10113 return __builtin_s390_vstrczbs(__a, __b, __c, 0, __cc);
10114}
10115
10116static inline __ATTRS_o_ai __vector unsigned short
10117vec_cmprg_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10118 __vector unsigned short __c, int *__cc) {
10119 return __builtin_s390_vstrczhs(__a, __b, __c, 0, __cc);
10120}
10121
10122static inline __ATTRS_o_ai __vector unsigned int
10123vec_cmprg_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10124 __vector unsigned int __c, int *__cc) {
10125 return __builtin_s390_vstrczfs(__a, __b, __c, 0, __cc);
10126}
10127
10128/*-- vec_cmpnrg -------------------------------------------------------------*/
10129
10130static inline __ATTRS_o_ai __vector __bool char
10131vec_cmpnrg(__vector unsigned char __a, __vector unsigned char __b,
10132 __vector unsigned char __c) {
10133 return (__vector __bool char)__builtin_s390_vstrcb(__a, __b, __c, 12);
10134}
10135
10136static inline __ATTRS_o_ai __vector __bool short
10137vec_cmpnrg(__vector unsigned short __a, __vector unsigned short __b,
10138 __vector unsigned short __c) {
10139 return (__vector __bool short)__builtin_s390_vstrch(__a, __b, __c, 12);
10140}
10141
10142static inline __ATTRS_o_ai __vector __bool int
10143vec_cmpnrg(__vector unsigned int __a, __vector unsigned int __b,
10144 __vector unsigned int __c) {
10145 return (__vector __bool int)__builtin_s390_vstrcf(__a, __b, __c, 12);
10146}
10147
10148/*-- vec_cmpnrg_cc ----------------------------------------------------------*/
10149
10150static inline __ATTRS_o_ai __vector __bool char
10151vec_cmpnrg_cc(__vector unsigned char __a, __vector unsigned char __b,
10152 __vector unsigned char __c, int *__cc) {
10153 return (__vector __bool char)
10154 __builtin_s390_vstrcbs(__a, __b, __c, 12, __cc);
10155}
10156
10157static inline __ATTRS_o_ai __vector __bool short
10158vec_cmpnrg_cc(__vector unsigned short __a, __vector unsigned short __b,
10159 __vector unsigned short __c, int *__cc) {
10160 return (__vector __bool short)
10161 __builtin_s390_vstrchs(__a, __b, __c, 12, __cc);
10162}
10163
10164static inline __ATTRS_o_ai __vector __bool int
10165vec_cmpnrg_cc(__vector unsigned int __a, __vector unsigned int __b,
10166 __vector unsigned int __c, int *__cc) {
10167 return (__vector __bool int)
10168 __builtin_s390_vstrcfs(__a, __b, __c, 12, __cc);
10169}
10170
10171/*-- vec_cmpnrg_idx ---------------------------------------------------------*/
10172
10173static inline __ATTRS_o_ai __vector unsigned char
10174vec_cmpnrg_idx(__vector unsigned char __a, __vector unsigned char __b,
10175 __vector unsigned char __c) {
10176 return __builtin_s390_vstrcb(__a, __b, __c, 8);
10177}
10178
10179static inline __ATTRS_o_ai __vector unsigned short
10180vec_cmpnrg_idx(__vector unsigned short __a, __vector unsigned short __b,
10181 __vector unsigned short __c) {
10182 return __builtin_s390_vstrch(__a, __b, __c, 8);
10183}
10184
10185static inline __ATTRS_o_ai __vector unsigned int
10186vec_cmpnrg_idx(__vector unsigned int __a, __vector unsigned int __b,
10187 __vector unsigned int __c) {
10188 return __builtin_s390_vstrcf(__a, __b, __c, 8);
10189}
10190
10191/*-- vec_cmpnrg_idx_cc ------------------------------------------------------*/
10192
10193static inline __ATTRS_o_ai __vector unsigned char
10194vec_cmpnrg_idx_cc(__vector unsigned char __a, __vector unsigned char __b,
10195 __vector unsigned char __c, int *__cc) {
10196 return __builtin_s390_vstrcbs(__a, __b, __c, 8, __cc);
10197}
10198
10199static inline __ATTRS_o_ai __vector unsigned short
10200vec_cmpnrg_idx_cc(__vector unsigned short __a, __vector unsigned short __b,
10201 __vector unsigned short __c, int *__cc) {
10202 return __builtin_s390_vstrchs(__a, __b, __c, 8, __cc);
10203}
10204
10205static inline __ATTRS_o_ai __vector unsigned int
10206vec_cmpnrg_idx_cc(__vector unsigned int __a, __vector unsigned int __b,
10207 __vector unsigned int __c, int *__cc) {
10208 return __builtin_s390_vstrcfs(__a, __b, __c, 8, __cc);
10209}
10210
10211/*-- vec_cmpnrg_or_0_idx ----------------------------------------------------*/
10212
10213static inline __ATTRS_o_ai __vector unsigned char
10214vec_cmpnrg_or_0_idx(__vector unsigned char __a, __vector unsigned char __b,
10215 __vector unsigned char __c) {
10216 return __builtin_s390_vstrczb(__a, __b, __c, 8);
10217}
10218
10219static inline __ATTRS_o_ai __vector unsigned short
10220vec_cmpnrg_or_0_idx(__vector unsigned short __a, __vector unsigned short __b,
10221 __vector unsigned short __c) {
10222 return __builtin_s390_vstrczh(__a, __b, __c, 8);
10223}
10224
10225static inline __ATTRS_o_ai __vector unsigned int
10226vec_cmpnrg_or_0_idx(__vector unsigned int __a, __vector unsigned int __b,
10227 __vector unsigned int __c) {
10228 return __builtin_s390_vstrczf(__a, __b, __c, 8);
10229}
10230
10231/*-- vec_cmpnrg_or_0_idx_cc -------------------------------------------------*/
10232
10233static inline __ATTRS_o_ai __vector unsigned char
10234vec_cmpnrg_or_0_idx_cc(__vector unsigned char __a,
10235 __vector unsigned char __b,
10236 __vector unsigned char __c, int *__cc) {
10237 return __builtin_s390_vstrczbs(__a, __b, __c, 8, __cc);
10238}
10239
10240static inline __ATTRS_o_ai __vector unsigned short
10241vec_cmpnrg_or_0_idx_cc(__vector unsigned short __a,
10242 __vector unsigned short __b,
10243 __vector unsigned short __c, int *__cc) {
10244 return __builtin_s390_vstrczhs(__a, __b, __c, 8, __cc);
10245}
10246
10247static inline __ATTRS_o_ai __vector unsigned int
10248vec_cmpnrg_or_0_idx_cc(__vector unsigned int __a,
10249 __vector unsigned int __b,
10250 __vector unsigned int __c, int *__cc) {
10251 return __builtin_s390_vstrczfs(__a, __b, __c, 8, __cc);
10252}
10253
10254/*-- vec_find_any_eq --------------------------------------------------------*/
10255
10256static inline __ATTRS_o_ai __vector __bool char
10257vec_find_any_eq(__vector signed char __a, __vector signed char __b) {
10258 return (__vector __bool char)
10259 __builtin_s390_vfaeb((__vector unsigned char)__a,
10260 (__vector unsigned char)__b, 4);
10261}
10262
10263static inline __ATTRS_o_ai __vector __bool char
10264vec_find_any_eq(__vector __bool char __a, __vector __bool char __b) {
10265 return (__vector __bool char)
10266 __builtin_s390_vfaeb((__vector unsigned char)__a,
10267 (__vector unsigned char)__b, 4);
10268}
10269
10270static inline __ATTRS_o_ai __vector __bool char
10271vec_find_any_eq(__vector unsigned char __a, __vector unsigned char __b) {
10272 return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 4);
10273}
10274
10275static inline __ATTRS_o_ai __vector __bool short
10276vec_find_any_eq(__vector signed short __a, __vector signed short __b) {
10277 return (__vector __bool short)
10278 __builtin_s390_vfaeh((__vector unsigned short)__a,
10279 (__vector unsigned short)__b, 4);
10280}
10281
10282static inline __ATTRS_o_ai __vector __bool short
10283vec_find_any_eq(__vector __bool short __a, __vector __bool short __b) {
10284 return (__vector __bool short)
10285 __builtin_s390_vfaeh((__vector unsigned short)__a,
10286 (__vector unsigned short)__b, 4);
10287}
10288
10289static inline __ATTRS_o_ai __vector __bool short
10290vec_find_any_eq(__vector unsigned short __a, __vector unsigned short __b) {
10291 return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 4);
10292}
10293
10294static inline __ATTRS_o_ai __vector __bool int
10295vec_find_any_eq(__vector signed int __a, __vector signed int __b) {
10296 return (__vector __bool int)
10297 __builtin_s390_vfaef((__vector unsigned int)__a,
10298 (__vector unsigned int)__b, 4);
10299}
10300
10301static inline __ATTRS_o_ai __vector __bool int
10302vec_find_any_eq(__vector __bool int __a, __vector __bool int __b) {
10303 return (__vector __bool int)
10304 __builtin_s390_vfaef((__vector unsigned int)__a,
10305 (__vector unsigned int)__b, 4);
10306}
10307
10308static inline __ATTRS_o_ai __vector __bool int
10309vec_find_any_eq(__vector unsigned int __a, __vector unsigned int __b) {
10310 return (__vector __bool int)__builtin_s390_vfaef(__a, __b, 4);
10311}
10312
10313/*-- vec_find_any_eq_cc -----------------------------------------------------*/
10314
10315static inline __ATTRS_o_ai __vector __bool char
10316vec_find_any_eq_cc(__vector signed char __a, __vector signed char __b,
10317 int *__cc) {
10318 return (__vector __bool char)
10319 __builtin_s390_vfaebs((__vector unsigned char)__a,
10320 (__vector unsigned char)__b, 4, __cc);
10321}
10322
10323static inline __ATTRS_o_ai __vector __bool char
10324vec_find_any_eq_cc(__vector __bool char __a, __vector __bool char __b,
10325 int *__cc) {
10326 return (__vector __bool char)
10327 __builtin_s390_vfaebs((__vector unsigned char)__a,
10328 (__vector unsigned char)__b, 4, __cc);
10329}
10330
10331static inline __ATTRS_o_ai __vector __bool char
10332vec_find_any_eq_cc(__vector unsigned char __a, __vector unsigned char __b,
10333 int *__cc) {
10334 return (__vector __bool char)__builtin_s390_vfaebs(__a, __b, 4, __cc);
10335}
10336
10337static inline __ATTRS_o_ai __vector __bool short
10338vec_find_any_eq_cc(__vector signed short __a, __vector signed short __b,
10339 int *__cc) {
10340 return (__vector __bool short)
10341 __builtin_s390_vfaehs((__vector unsigned short)__a,
10342 (__vector unsigned short)__b, 4, __cc);
10343}
10344
10345static inline __ATTRS_o_ai __vector __bool short
10346vec_find_any_eq_cc(__vector __bool short __a, __vector __bool short __b,
10347 int *__cc) {
10348 return (__vector __bool short)
10349 __builtin_s390_vfaehs((__vector unsigned short)__a,
10350 (__vector unsigned short)__b, 4, __cc);
10351}
10352
10353static inline __ATTRS_o_ai __vector __bool short
10354vec_find_any_eq_cc(__vector unsigned short __a, __vector unsigned short __b,
10355 int *__cc) {
10356 return (__vector __bool short)__builtin_s390_vfaehs(__a, __b, 4, __cc);
10357}
10358
10359static inline __ATTRS_o_ai __vector __bool int
10360vec_find_any_eq_cc(__vector signed int __a, __vector signed int __b,
10361 int *__cc) {
10362 return (__vector __bool int)
10363 __builtin_s390_vfaefs((__vector unsigned int)__a,
10364 (__vector unsigned int)__b, 4, __cc);
10365}
10366
10367static inline __ATTRS_o_ai __vector __bool int
10368vec_find_any_eq_cc(__vector __bool int __a, __vector __bool int __b,
10369 int *__cc) {
10370 return (__vector __bool int)
10371 __builtin_s390_vfaefs((__vector unsigned int)__a,
10372 (__vector unsigned int)__b, 4, __cc);
10373}
10374
10375static inline __ATTRS_o_ai __vector __bool int
10376vec_find_any_eq_cc(__vector unsigned int __a, __vector unsigned int __b,
10377 int *__cc) {
10378 return (__vector __bool int)__builtin_s390_vfaefs(__a, __b, 4, __cc);
10379}
10380
10381/*-- vec_find_any_eq_idx ----------------------------------------------------*/
10382
10383static inline __ATTRS_o_ai __vector signed char
10384vec_find_any_eq_idx(__vector signed char __a, __vector signed char __b) {
10385 return (__vector signed char)
10386 __builtin_s390_vfaeb((__vector unsigned char)__a,
10387 (__vector unsigned char)__b, 0);
10388}
10389
10390static inline __ATTRS_o_ai __vector unsigned char
10391vec_find_any_eq_idx(__vector __bool char __a, __vector __bool char __b) {
10392 return __builtin_s390_vfaeb((__vector unsigned char)__a,
10393 (__vector unsigned char)__b, 0);
10394}
10395
10396static inline __ATTRS_o_ai __vector unsigned char
10397vec_find_any_eq_idx(__vector unsigned char __a, __vector unsigned char __b) {
10398 return __builtin_s390_vfaeb(__a, __b, 0);
10399}
10400
10401static inline __ATTRS_o_ai __vector signed short
10402vec_find_any_eq_idx(__vector signed short __a, __vector signed short __b) {
10403 return (__vector signed short)
10404 __builtin_s390_vfaeh((__vector unsigned short)__a,
10405 (__vector unsigned short)__b, 0);
10406}
10407
10408static inline __ATTRS_o_ai __vector unsigned short
10409vec_find_any_eq_idx(__vector __bool short __a, __vector __bool short __b) {
10410 return __builtin_s390_vfaeh((__vector unsigned short)__a,
10411 (__vector unsigned short)__b, 0);
10412}
10413
10414static inline __ATTRS_o_ai __vector unsigned short
10415vec_find_any_eq_idx(__vector unsigned short __a, __vector unsigned short __b) {
10416 return __builtin_s390_vfaeh(__a, __b, 0);
10417}
10418
10419static inline __ATTRS_o_ai __vector signed int
10420vec_find_any_eq_idx(__vector signed int __a, __vector signed int __b) {
10421 return (__vector signed int)
10422 __builtin_s390_vfaef((__vector unsigned int)__a,
10423 (__vector unsigned int)__b, 0);
10424}
10425
10426static inline __ATTRS_o_ai __vector unsigned int
10427vec_find_any_eq_idx(__vector __bool int __a, __vector __bool int __b) {
10428 return __builtin_s390_vfaef((__vector unsigned int)__a,
10429 (__vector unsigned int)__b, 0);
10430}
10431
10432static inline __ATTRS_o_ai __vector unsigned int
10433vec_find_any_eq_idx(__vector unsigned int __a, __vector unsigned int __b) {
10434 return __builtin_s390_vfaef(__a, __b, 0);
10435}
10436
10437/*-- vec_find_any_eq_idx_cc -------------------------------------------------*/
10438
10439static inline __ATTRS_o_ai __vector signed char
10440vec_find_any_eq_idx_cc(__vector signed char __a,
10441 __vector signed char __b, int *__cc) {
10442 return (__vector signed char)
10443 __builtin_s390_vfaebs((__vector unsigned char)__a,
10444 (__vector unsigned char)__b, 0, __cc);
10445}
10446
10447static inline __ATTRS_o_ai __vector unsigned char
10448vec_find_any_eq_idx_cc(__vector __bool char __a,
10449 __vector __bool char __b, int *__cc) {
10450 return __builtin_s390_vfaebs((__vector unsigned char)__a,
10451 (__vector unsigned char)__b, 0, __cc);
10452}
10453
10454static inline __ATTRS_o_ai __vector unsigned char
10455vec_find_any_eq_idx_cc(__vector unsigned char __a,
10456 __vector unsigned char __b, int *__cc) {
10457 return __builtin_s390_vfaebs(__a, __b, 0, __cc);
10458}
10459
10460static inline __ATTRS_o_ai __vector signed short
10461vec_find_any_eq_idx_cc(__vector signed short __a,
10462 __vector signed short __b, int *__cc) {
10463 return (__vector signed short)
10464 __builtin_s390_vfaehs((__vector unsigned short)__a,
10465 (__vector unsigned short)__b, 0, __cc);
10466}
10467
10468static inline __ATTRS_o_ai __vector unsigned short
10469vec_find_any_eq_idx_cc(__vector __bool short __a,
10470 __vector __bool short __b, int *__cc) {
10471 return __builtin_s390_vfaehs((__vector unsigned short)__a,
10472 (__vector unsigned short)__b, 0, __cc);
10473}
10474
10475static inline __ATTRS_o_ai __vector unsigned short
10476vec_find_any_eq_idx_cc(__vector unsigned short __a,
10477 __vector unsigned short __b, int *__cc) {
10478 return __builtin_s390_vfaehs(__a, __b, 0, __cc);
10479}
10480
10481static inline __ATTRS_o_ai __vector signed int
10482vec_find_any_eq_idx_cc(__vector signed int __a,
10483 __vector signed int __b, int *__cc) {
10484 return (__vector signed int)
10485 __builtin_s390_vfaefs((__vector unsigned int)__a,
10486 (__vector unsigned int)__b, 0, __cc);
10487}
10488
10489static inline __ATTRS_o_ai __vector unsigned int
10490vec_find_any_eq_idx_cc(__vector __bool int __a,
10491 __vector __bool int __b, int *__cc) {
10492 return __builtin_s390_vfaefs((__vector unsigned int)__a,
10493 (__vector unsigned int)__b, 0, __cc);
10494}
10495
10496static inline __ATTRS_o_ai __vector unsigned int
10497vec_find_any_eq_idx_cc(__vector unsigned int __a,
10498 __vector unsigned int __b, int *__cc) {
10499 return __builtin_s390_vfaefs(__a, __b, 0, __cc);
10500}
10501
10502/*-- vec_find_any_eq_or_0_idx -----------------------------------------------*/
10503
10504static inline __ATTRS_o_ai __vector signed char
10505vec_find_any_eq_or_0_idx(__vector signed char __a,
10506 __vector signed char __b) {
10507 return (__vector signed char)
10508 __builtin_s390_vfaezb((__vector unsigned char)__a,
10509 (__vector unsigned char)__b, 0);
10510}
10511
10512static inline __ATTRS_o_ai __vector unsigned char
10513vec_find_any_eq_or_0_idx(__vector __bool char __a,
10514 __vector __bool char __b) {
10515 return __builtin_s390_vfaezb((__vector unsigned char)__a,
10516 (__vector unsigned char)__b, 0);
10517}
10518
10519static inline __ATTRS_o_ai __vector unsigned char
10520vec_find_any_eq_or_0_idx(__vector unsigned char __a,
10521 __vector unsigned char __b) {
10522 return __builtin_s390_vfaezb(__a, __b, 0);
10523}
10524
10525static inline __ATTRS_o_ai __vector signed short
10526vec_find_any_eq_or_0_idx(__vector signed short __a,
10527 __vector signed short __b) {
10528 return (__vector signed short)
10529 __builtin_s390_vfaezh((__vector unsigned short)__a,
10530 (__vector unsigned short)__b, 0);
10531}
10532
10533static inline __ATTRS_o_ai __vector unsigned short
10534vec_find_any_eq_or_0_idx(__vector __bool short __a,
10535 __vector __bool short __b) {
10536 return __builtin_s390_vfaezh((__vector unsigned short)__a,
10537 (__vector unsigned short)__b, 0);
10538}
10539
10540static inline __ATTRS_o_ai __vector unsigned short
10541vec_find_any_eq_or_0_idx(__vector unsigned short __a,
10542 __vector unsigned short __b) {
10543 return __builtin_s390_vfaezh(__a, __b, 0);
10544}
10545
10546static inline __ATTRS_o_ai __vector signed int
10547vec_find_any_eq_or_0_idx(__vector signed int __a,
10548 __vector signed int __b) {
10549 return (__vector signed int)
10550 __builtin_s390_vfaezf((__vector unsigned int)__a,
10551 (__vector unsigned int)__b, 0);
10552}
10553
10554static inline __ATTRS_o_ai __vector unsigned int
10555vec_find_any_eq_or_0_idx(__vector __bool int __a,
10556 __vector __bool int __b) {
10557 return __builtin_s390_vfaezf((__vector unsigned int)__a,
10558 (__vector unsigned int)__b, 0);
10559}
10560
10561static inline __ATTRS_o_ai __vector unsigned int
10562vec_find_any_eq_or_0_idx(__vector unsigned int __a,
10563 __vector unsigned int __b) {
10564 return __builtin_s390_vfaezf(__a, __b, 0);
10565}
10566
10567/*-- vec_find_any_eq_or_0_idx_cc --------------------------------------------*/
10568
10569static inline __ATTRS_o_ai __vector signed char
10570vec_find_any_eq_or_0_idx_cc(__vector signed char __a,
10571 __vector signed char __b, int *__cc) {
10572 return (__vector signed char)
10573 __builtin_s390_vfaezbs((__vector unsigned char)__a,
10574 (__vector unsigned char)__b, 0, __cc);
10575}
10576
10577static inline __ATTRS_o_ai __vector unsigned char
10578vec_find_any_eq_or_0_idx_cc(__vector __bool char __a,
10579 __vector __bool char __b, int *__cc) {
10580 return __builtin_s390_vfaezbs((__vector unsigned char)__a,
10581 (__vector unsigned char)__b, 0, __cc);
10582}
10583
10584static inline __ATTRS_o_ai __vector unsigned char
10585vec_find_any_eq_or_0_idx_cc(__vector unsigned char __a,
10586 __vector unsigned char __b, int *__cc) {
10587 return __builtin_s390_vfaezbs(__a, __b, 0, __cc);
10588}
10589
10590static inline __ATTRS_o_ai __vector signed short
10591vec_find_any_eq_or_0_idx_cc(__vector signed short __a,
10592 __vector signed short __b, int *__cc) {
10593 return (__vector signed short)
10594 __builtin_s390_vfaezhs((__vector unsigned short)__a,
10595 (__vector unsigned short)__b, 0, __cc);
10596}
10597
10598static inline __ATTRS_o_ai __vector unsigned short
10599vec_find_any_eq_or_0_idx_cc(__vector __bool short __a,
10600 __vector __bool short __b, int *__cc) {
10601 return __builtin_s390_vfaezhs((__vector unsigned short)__a,
10602 (__vector unsigned short)__b, 0, __cc);
10603}
10604
10605static inline __ATTRS_o_ai __vector unsigned short
10606vec_find_any_eq_or_0_idx_cc(__vector unsigned short __a,
10607 __vector unsigned short __b, int *__cc) {
10608 return __builtin_s390_vfaezhs(__a, __b, 0, __cc);
10609}
10610
10611static inline __ATTRS_o_ai __vector signed int
10612vec_find_any_eq_or_0_idx_cc(__vector signed int __a,
10613 __vector signed int __b, int *__cc) {
10614 return (__vector signed int)
10615 __builtin_s390_vfaezfs((__vector unsigned int)__a,
10616 (__vector unsigned int)__b, 0, __cc);
10617}
10618
10619static inline __ATTRS_o_ai __vector unsigned int
10620vec_find_any_eq_or_0_idx_cc(__vector __bool int __a,
10621 __vector __bool int __b, int *__cc) {
10622 return __builtin_s390_vfaezfs((__vector unsigned int)__a,
10623 (__vector unsigned int)__b, 0, __cc);
10624}
10625
10626static inline __ATTRS_o_ai __vector unsigned int
10627vec_find_any_eq_or_0_idx_cc(__vector unsigned int __a,
10628 __vector unsigned int __b, int *__cc) {
10629 return __builtin_s390_vfaezfs(__a, __b, 0, __cc);
10630}
10631
10632/*-- vec_find_any_ne --------------------------------------------------------*/
10633
10634static inline __ATTRS_o_ai __vector __bool char
10635vec_find_any_ne(__vector signed char __a, __vector signed char __b) {
10636 return (__vector __bool char)
10637 __builtin_s390_vfaeb((__vector unsigned char)__a,
10638 (__vector unsigned char)__b, 12);
10639}
10640
10641static inline __ATTRS_o_ai __vector __bool char
10642vec_find_any_ne(__vector __bool char __a, __vector __bool char __b) {
10643 return (__vector __bool char)
10644 __builtin_s390_vfaeb((__vector unsigned char)__a,
10645 (__vector unsigned char)__b, 12);
10646}
10647
10648static inline __ATTRS_o_ai __vector __bool char
10649vec_find_any_ne(__vector unsigned char __a, __vector unsigned char __b) {
10650 return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 12);
10651}
10652
10653static inline __ATTRS_o_ai __vector __bool short
10654vec_find_any_ne(__vector signed short __a, __vector signed short __b) {
10655 return (__vector __bool short)
10656 __builtin_s390_vfaeh((__vector unsigned short)__a,
10657 (__vector unsigned short)__b, 12);
10658}
10659
10660static inline __ATTRS_o_ai __vector __bool short
10661vec_find_any_ne(__vector __bool short __a, __vector __bool short __b) {
10662 return (__vector __bool short)
10663 __builtin_s390_vfaeh((__vector unsigned short)__a,
10664 (__vector unsigned short)__b, 12);
10665}
10666
10667static inline __ATTRS_o_ai __vector __bool short
10668vec_find_any_ne(__vector unsigned short __a, __vector unsigned short __b) {
10669 return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 12);
10670}
10671
10672static inline __ATTRS_o_ai __vector __bool int
10673vec_find_any_ne(__vector signed int __a, __vector signed int __b) {
10674 return (__vector __bool int)
10675 __builtin_s390_vfaef((__vector unsigned int)__a,
10676 (__vector unsigned int)__b, 12);
10677}
10678
10679static inline __ATTRS_o_ai __vector __bool int
10680vec_find_any_ne(__vector __bool int __a, __vector __bool int __b) {
10681 return (__vector __bool int)
10682 __builtin_s390_vfaef((__vector unsigned int)__a,
10683 (__vector unsigned int)__b, 12);
10684}
10685
10686static inline __ATTRS_o_ai __vector __bool int
10687vec_find_any_ne(__vector unsigned int __a, __vector unsigned int __b) {
10688 return (__vector __bool int)__builtin_s390_vfaef(__a, __b, 12);
10689}
10690
10691/*-- vec_find_any_ne_cc -----------------------------------------------------*/
10692
10693static inline __ATTRS_o_ai __vector __bool char
10694vec_find_any_ne_cc(__vector signed char __a,
10695 __vector signed char __b, int *__cc) {
10696 return (__vector __bool char)
10697 __builtin_s390_vfaebs((__vector unsigned char)__a,
10698 (__vector unsigned char)__b, 12, __cc);
10699}
10700
10701static inline __ATTRS_o_ai __vector __bool char
10702vec_find_any_ne_cc(__vector __bool char __a,
10703 __vector __bool char __b, int *__cc) {
10704 return (__vector __bool char)
10705 __builtin_s390_vfaebs((__vector unsigned char)__a,
10706 (__vector unsigned char)__b, 12, __cc);
10707}
10708
10709static inline __ATTRS_o_ai __vector __bool char
10710vec_find_any_ne_cc(__vector unsigned char __a,
10711 __vector unsigned char __b, int *__cc) {
10712 return (__vector __bool char)__builtin_s390_vfaebs(__a, __b, 12, __cc);
10713}
10714
10715static inline __ATTRS_o_ai __vector __bool short
10716vec_find_any_ne_cc(__vector signed short __a,
10717 __vector signed short __b, int *__cc) {
10718 return (__vector __bool short)
10719 __builtin_s390_vfaehs((__vector unsigned short)__a,
10720 (__vector unsigned short)__b, 12, __cc);
10721}
10722
10723static inline __ATTRS_o_ai __vector __bool short
10724vec_find_any_ne_cc(__vector __bool short __a,
10725 __vector __bool short __b, int *__cc) {
10726 return (__vector __bool short)
10727 __builtin_s390_vfaehs((__vector unsigned short)__a,
10728 (__vector unsigned short)__b, 12, __cc);
10729}
10730
10731static inline __ATTRS_o_ai __vector __bool short
10732vec_find_any_ne_cc(__vector unsigned short __a,
10733 __vector unsigned short __b, int *__cc) {
10734 return (__vector __bool short)__builtin_s390_vfaehs(__a, __b, 12, __cc);
10735}
10736
10737static inline __ATTRS_o_ai __vector __bool int
10738vec_find_any_ne_cc(__vector signed int __a,
10739 __vector signed int __b, int *__cc) {
10740 return (__vector __bool int)
10741 __builtin_s390_vfaefs((__vector unsigned int)__a,
10742 (__vector unsigned int)__b, 12, __cc);
10743}
10744
10745static inline __ATTRS_o_ai __vector __bool int
10746vec_find_any_ne_cc(__vector __bool int __a,
10747 __vector __bool int __b, int *__cc) {
10748 return (__vector __bool int)
10749 __builtin_s390_vfaefs((__vector unsigned int)__a,
10750 (__vector unsigned int)__b, 12, __cc);
10751}
10752
10753static inline __ATTRS_o_ai __vector __bool int
10754vec_find_any_ne_cc(__vector unsigned int __a,
10755 __vector unsigned int __b, int *__cc) {
10756 return (__vector __bool int)__builtin_s390_vfaefs(__a, __b, 12, __cc);
10757}
10758
10759/*-- vec_find_any_ne_idx ----------------------------------------------------*/
10760
10761static inline __ATTRS_o_ai __vector signed char
10762vec_find_any_ne_idx(__vector signed char __a, __vector signed char __b) {
10763 return (__vector signed char)
10764 __builtin_s390_vfaeb((__vector unsigned char)__a,
10765 (__vector unsigned char)__b, 8);
10766}
10767
10768static inline __ATTRS_o_ai __vector unsigned char
10769vec_find_any_ne_idx(__vector __bool char __a, __vector __bool char __b) {
10770 return __builtin_s390_vfaeb((__vector unsigned char)__a,
10771 (__vector unsigned char)__b, 8);
10772}
10773
10774static inline __ATTRS_o_ai __vector unsigned char
10775vec_find_any_ne_idx(__vector unsigned char __a, __vector unsigned char __b) {
10776 return __builtin_s390_vfaeb(__a, __b, 8);
10777}
10778
10779static inline __ATTRS_o_ai __vector signed short
10780vec_find_any_ne_idx(__vector signed short __a, __vector signed short __b) {
10781 return (__vector signed short)
10782 __builtin_s390_vfaeh((__vector unsigned short)__a,
10783 (__vector unsigned short)__b, 8);
10784}
10785
10786static inline __ATTRS_o_ai __vector unsigned short
10787vec_find_any_ne_idx(__vector __bool short __a, __vector __bool short __b) {
10788 return __builtin_s390_vfaeh((__vector unsigned short)__a,
10789 (__vector unsigned short)__b, 8);
10790}
10791
10792static inline __ATTRS_o_ai __vector unsigned short
10793vec_find_any_ne_idx(__vector unsigned short __a, __vector unsigned short __b) {
10794 return __builtin_s390_vfaeh(__a, __b, 8);
10795}
10796
10797static inline __ATTRS_o_ai __vector signed int
10798vec_find_any_ne_idx(__vector signed int __a, __vector signed int __b) {
10799 return (__vector signed int)
10800 __builtin_s390_vfaef((__vector unsigned int)__a,
10801 (__vector unsigned int)__b, 8);
10802}
10803
10804static inline __ATTRS_o_ai __vector unsigned int
10805vec_find_any_ne_idx(__vector __bool int __a, __vector __bool int __b) {
10806 return __builtin_s390_vfaef((__vector unsigned int)__a,
10807 (__vector unsigned int)__b, 8);
10808}
10809
10810static inline __ATTRS_o_ai __vector unsigned int
10811vec_find_any_ne_idx(__vector unsigned int __a, __vector unsigned int __b) {
10812 return __builtin_s390_vfaef(__a, __b, 8);
10813}
10814
10815/*-- vec_find_any_ne_idx_cc -------------------------------------------------*/
10816
10817static inline __ATTRS_o_ai __vector signed char
10818vec_find_any_ne_idx_cc(__vector signed char __a,
10819 __vector signed char __b, int *__cc) {
10820 return (__vector signed char)
10821 __builtin_s390_vfaebs((__vector unsigned char)__a,
10822 (__vector unsigned char)__b, 8, __cc);
10823}
10824
10825static inline __ATTRS_o_ai __vector unsigned char
10826vec_find_any_ne_idx_cc(__vector __bool char __a,
10827 __vector __bool char __b, int *__cc) {
10828 return __builtin_s390_vfaebs((__vector unsigned char)__a,
10829 (__vector unsigned char)__b, 8, __cc);
10830}
10831
10832static inline __ATTRS_o_ai __vector unsigned char
10833vec_find_any_ne_idx_cc(__vector unsigned char __a,
10834 __vector unsigned char __b,
10835 int *__cc) {
10836 return __builtin_s390_vfaebs(__a, __b, 8, __cc);
10837}
10838
10839static inline __ATTRS_o_ai __vector signed short
10840vec_find_any_ne_idx_cc(__vector signed short __a,
10841 __vector signed short __b, int *__cc) {
10842 return (__vector signed short)
10843 __builtin_s390_vfaehs((__vector unsigned short)__a,
10844 (__vector unsigned short)__b, 8, __cc);
10845}
10846
10847static inline __ATTRS_o_ai __vector unsigned short
10848vec_find_any_ne_idx_cc(__vector __bool short __a,
10849 __vector __bool short __b, int *__cc) {
10850 return __builtin_s390_vfaehs((__vector unsigned short)__a,
10851 (__vector unsigned short)__b, 8, __cc);
10852}
10853
10854static inline __ATTRS_o_ai __vector unsigned short
10855vec_find_any_ne_idx_cc(__vector unsigned short __a,
10856 __vector unsigned short __b, int *__cc) {
10857 return __builtin_s390_vfaehs(__a, __b, 8, __cc);
10858}
10859
10860static inline __ATTRS_o_ai __vector signed int
10861vec_find_any_ne_idx_cc(__vector signed int __a,
10862 __vector signed int __b, int *__cc) {
10863 return (__vector signed int)
10864 __builtin_s390_vfaefs((__vector unsigned int)__a,
10865 (__vector unsigned int)__b, 8, __cc);
10866}
10867
10868static inline __ATTRS_o_ai __vector unsigned int
10869vec_find_any_ne_idx_cc(__vector __bool int __a,
10870 __vector __bool int __b, int *__cc) {
10871 return __builtin_s390_vfaefs((__vector unsigned int)__a,
10872 (__vector unsigned int)__b, 8, __cc);
10873}
10874
10875static inline __ATTRS_o_ai __vector unsigned int
10876vec_find_any_ne_idx_cc(__vector unsigned int __a,
10877 __vector unsigned int __b, int *__cc) {
10878 return __builtin_s390_vfaefs(__a, __b, 8, __cc);
10879}
10880
10881/*-- vec_find_any_ne_or_0_idx -----------------------------------------------*/
10882
10883static inline __ATTRS_o_ai __vector signed char
10884vec_find_any_ne_or_0_idx(__vector signed char __a,
10885 __vector signed char __b) {
10886 return (__vector signed char)
10887 __builtin_s390_vfaezb((__vector unsigned char)__a,
10888 (__vector unsigned char)__b, 8);
10889}
10890
10891static inline __ATTRS_o_ai __vector unsigned char
10892vec_find_any_ne_or_0_idx(__vector __bool char __a,
10893 __vector __bool char __b) {
10894 return __builtin_s390_vfaezb((__vector unsigned char)__a,
10895 (__vector unsigned char)__b, 8);
10896}
10897
10898static inline __ATTRS_o_ai __vector unsigned char
10899vec_find_any_ne_or_0_idx(__vector unsigned char __a,
10900 __vector unsigned char __b) {
10901 return __builtin_s390_vfaezb(__a, __b, 8);
10902}
10903
10904static inline __ATTRS_o_ai __vector signed short
10905vec_find_any_ne_or_0_idx(__vector signed short __a,
10906 __vector signed short __b) {
10907 return (__vector signed short)
10908 __builtin_s390_vfaezh((__vector unsigned short)__a,
10909 (__vector unsigned short)__b, 8);
10910}
10911
10912static inline __ATTRS_o_ai __vector unsigned short
10913vec_find_any_ne_or_0_idx(__vector __bool short __a,
10914 __vector __bool short __b) {
10915 return __builtin_s390_vfaezh((__vector unsigned short)__a,
10916 (__vector unsigned short)__b, 8);
10917}
10918
10919static inline __ATTRS_o_ai __vector unsigned short
10920vec_find_any_ne_or_0_idx(__vector unsigned short __a,
10921 __vector unsigned short __b) {
10922 return __builtin_s390_vfaezh(__a, __b, 8);
10923}
10924
10925static inline __ATTRS_o_ai __vector signed int
10926vec_find_any_ne_or_0_idx(__vector signed int __a,
10927 __vector signed int __b) {
10928 return (__vector signed int)
10929 __builtin_s390_vfaezf((__vector unsigned int)__a,
10930 (__vector unsigned int)__b, 8);
10931}
10932
10933static inline __ATTRS_o_ai __vector unsigned int
10934vec_find_any_ne_or_0_idx(__vector __bool int __a,
10935 __vector __bool int __b) {
10936 return __builtin_s390_vfaezf((__vector unsigned int)__a,
10937 (__vector unsigned int)__b, 8);
10938}
10939
10940static inline __ATTRS_o_ai __vector unsigned int
10941vec_find_any_ne_or_0_idx(__vector unsigned int __a,
10942 __vector unsigned int __b) {
10943 return __builtin_s390_vfaezf(__a, __b, 8);
10944}
10945
10946/*-- vec_find_any_ne_or_0_idx_cc --------------------------------------------*/
10947
10948static inline __ATTRS_o_ai __vector signed char
10949vec_find_any_ne_or_0_idx_cc(__vector signed char __a,
10950 __vector signed char __b, int *__cc) {
10951 return (__vector signed char)
10952 __builtin_s390_vfaezbs((__vector unsigned char)__a,
10953 (__vector unsigned char)__b, 8, __cc);
10954}
10955
10956static inline __ATTRS_o_ai __vector unsigned char
10957vec_find_any_ne_or_0_idx_cc(__vector __bool char __a,
10958 __vector __bool char __b, int *__cc) {
10959 return __builtin_s390_vfaezbs((__vector unsigned char)__a,
10960 (__vector unsigned char)__b, 8, __cc);
10961}
10962
10963static inline __ATTRS_o_ai __vector unsigned char
10964vec_find_any_ne_or_0_idx_cc(__vector unsigned char __a,
10965 __vector unsigned char __b, int *__cc) {
10966 return __builtin_s390_vfaezbs(__a, __b, 8, __cc);
10967}
10968
10969static inline __ATTRS_o_ai __vector signed short
10970vec_find_any_ne_or_0_idx_cc(__vector signed short __a,
10971 __vector signed short __b, int *__cc) {
10972 return (__vector signed short)
10973 __builtin_s390_vfaezhs((__vector unsigned short)__a,
10974 (__vector unsigned short)__b, 8, __cc);
10975}
10976
10977static inline __ATTRS_o_ai __vector unsigned short
10978vec_find_any_ne_or_0_idx_cc(__vector __bool short __a,
10979 __vector __bool short __b, int *__cc) {
10980 return __builtin_s390_vfaezhs((__vector unsigned short)__a,
10981 (__vector unsigned short)__b, 8, __cc);
10982}
10983
10984static inline __ATTRS_o_ai __vector unsigned short
10985vec_find_any_ne_or_0_idx_cc(__vector unsigned short __a,
10986 __vector unsigned short __b, int *__cc) {
10987 return __builtin_s390_vfaezhs(__a, __b, 8, __cc);
10988}
10989
10990static inline __ATTRS_o_ai __vector signed int
10991vec_find_any_ne_or_0_idx_cc(__vector signed int __a,
10992 __vector signed int __b, int *__cc) {
10993 return (__vector signed int)
10994 __builtin_s390_vfaezfs((__vector unsigned int)__a,
10995 (__vector unsigned int)__b, 8, __cc);
10996}
10997
10998static inline __ATTRS_o_ai __vector unsigned int
10999vec_find_any_ne_or_0_idx_cc(__vector __bool int __a,
11000 __vector __bool int __b, int *__cc) {
11001 return __builtin_s390_vfaezfs((__vector unsigned int)__a,
11002 (__vector unsigned int)__b, 8, __cc);
11003}
11004
11005static inline __ATTRS_o_ai __vector unsigned int
11006vec_find_any_ne_or_0_idx_cc(__vector unsigned int __a,
11007 __vector unsigned int __b, int *__cc) {
11008 return __builtin_s390_vfaezfs(__a, __b, 8, __cc);
11009}
11010
11011/*-- vec_search_string_cc ---------------------------------------------------*/
11012
11013#if __ARCH__ >= 13
11014
11015static inline __ATTRS_o_ai __vector unsigned char
11016vec_search_string_cc(__vector signed char __a, __vector signed char __b,
11017 __vector unsigned char __c, int *__cc) {
11018 return __builtin_s390_vstrsb((__vector unsigned char)__a,
11019 (__vector unsigned char)__b, __c, __cc);
11020}
11021
11022static inline __ATTRS_o_ai __vector unsigned char
11023vec_search_string_cc(__vector __bool char __a, __vector __bool char __b,
11024 __vector unsigned char __c, int *__cc) {
11025 return __builtin_s390_vstrsb((__vector unsigned char)__a,
11026 (__vector unsigned char)__b, __c, __cc);
11027}
11028
11029static inline __ATTRS_o_ai __vector unsigned char
11030vec_search_string_cc(__vector unsigned char __a, __vector unsigned char __b,
11031 __vector unsigned char __c, int *__cc) {
11032 return __builtin_s390_vstrsb(__a, __b, __c, __cc);
11033}
11034
11035static inline __ATTRS_o_ai __vector unsigned char
11036vec_search_string_cc(__vector signed short __a, __vector signed short __b,
11037 __vector unsigned char __c, int *__cc) {
11038 return __builtin_s390_vstrsh((__vector unsigned short)__a,
11039 (__vector unsigned short)__b, __c, __cc);
11040}
11041
11042static inline __ATTRS_o_ai __vector unsigned char
11043vec_search_string_cc(__vector __bool short __a, __vector __bool short __b,
11044 __vector unsigned char __c, int *__cc) {
11045 return __builtin_s390_vstrsh((__vector unsigned short)__a,
11046 (__vector unsigned short)__b, __c, __cc);
11047}
11048
11049static inline __ATTRS_o_ai __vector unsigned char
11050vec_search_string_cc(__vector unsigned short __a, __vector unsigned short __b,
11051 __vector unsigned char __c, int *__cc) {
11052 return __builtin_s390_vstrsh(__a, __b, __c, __cc);
11053}
11054
11055static inline __ATTRS_o_ai __vector unsigned char
11056vec_search_string_cc(__vector signed int __a, __vector signed int __b,
11057 __vector unsigned char __c, int *__cc) {
11058 return __builtin_s390_vstrsf((__vector unsigned int)__a,
11059 (__vector unsigned int)__b, __c, __cc);
11060}
11061
11062static inline __ATTRS_o_ai __vector unsigned char
11063vec_search_string_cc(__vector __bool int __a, __vector __bool int __b,
11064 __vector unsigned char __c, int *__cc) {
11065 return __builtin_s390_vstrsf((__vector unsigned int)__a,
11066 (__vector unsigned int)__b, __c, __cc);
11067}
11068
11069static inline __ATTRS_o_ai __vector unsigned char
11070vec_search_string_cc(__vector unsigned int __a, __vector unsigned int __b,
11071 __vector unsigned char __c, int *__cc) {
11072 return __builtin_s390_vstrsf(__a, __b, __c, __cc);
11073}
11074
11075#endif
11076
11077/*-- vec_search_string_until_zero_cc ----------------------------------------*/
11078
11079#if __ARCH__ >= 13
11080
11081static inline __ATTRS_o_ai __vector unsigned char
11082vec_search_string_until_zero_cc(__vector signed char __a,
11083 __vector signed char __b,
11084 __vector unsigned char __c, int *__cc) {
11085 return __builtin_s390_vstrszb((__vector unsigned char)__a,
11086 (__vector unsigned char)__b, __c, __cc);
11087}
11088
11089static inline __ATTRS_o_ai __vector unsigned char
11090vec_search_string_until_zero_cc(__vector __bool char __a,
11091 __vector __bool char __b,
11092 __vector unsigned char __c, int *__cc) {
11093 return __builtin_s390_vstrszb((__vector unsigned char)__a,
11094 (__vector unsigned char)__b, __c, __cc);
11095}
11096
11097static inline __ATTRS_o_ai __vector unsigned char
11098vec_search_string_until_zero_cc(__vector unsigned char __a,
11099 __vector unsigned char __b,
11100 __vector unsigned char __c, int *__cc) {
11101 return __builtin_s390_vstrszb(__a, __b, __c, __cc);
11102}
11103
11104static inline __ATTRS_o_ai __vector unsigned char
11105vec_search_string_until_zero_cc(__vector signed short __a,
11106 __vector signed short __b,
11107 __vector unsigned char __c, int *__cc) {
11108 return __builtin_s390_vstrszh((__vector unsigned short)__a,
11109 (__vector unsigned short)__b, __c, __cc);
11110}
11111
11112static inline __ATTRS_o_ai __vector unsigned char
11113vec_search_string_until_zero_cc(__vector __bool short __a,
11114 __vector __bool short __b,
11115 __vector unsigned char __c, int *__cc) {
11116 return __builtin_s390_vstrszh((__vector unsigned short)__a,
11117 (__vector unsigned short)__b, __c, __cc);
11118}
11119
11120static inline __ATTRS_o_ai __vector unsigned char
11121vec_search_string_until_zero_cc(__vector unsigned short __a,
11122 __vector unsigned short __b,
11123 __vector unsigned char __c, int *__cc) {
11124 return __builtin_s390_vstrszh(__a, __b, __c, __cc);
11125}
11126
11127static inline __ATTRS_o_ai __vector unsigned char
11128vec_search_string_until_zero_cc(__vector signed int __a,
11129 __vector signed int __b,
11130 __vector unsigned char __c, int *__cc) {
11131 return __builtin_s390_vstrszf((__vector unsigned int)__a,
11132 (__vector unsigned int)__b, __c, __cc);
11133}
11134
11135static inline __ATTRS_o_ai __vector unsigned char
11136vec_search_string_until_zero_cc(__vector __bool int __a,
11137 __vector __bool int __b,
11138 __vector unsigned char __c, int *__cc) {
11139 return __builtin_s390_vstrszf((__vector unsigned int)__a,
11140 (__vector unsigned int)__b, __c, __cc);
11141}
11142
11143static inline __ATTRS_o_ai __vector unsigned char
11144vec_search_string_until_zero_cc(__vector unsigned int __a,
11145 __vector unsigned int __b,
11146 __vector unsigned char __c, int *__cc) {
11147 return __builtin_s390_vstrszf(__a, __b, __c, __cc);
11148}
11149
11150#endif
11151
11152#undef __constant_pow2_range
11153#undef __constant_range
11154#undef __constant
11155#undef __ATTRS_o
11156#undef __ATTRS_o_ai
11157#undef __ATTRS_ai
11158
11159#else
11160
11161#error "Use -fzvector to enable vector extensions"
11162
11163#endif
#define V(N, I)
Definition: ASTContext.h:3443
_Float16 __2f16 __attribute__((ext_vector_type(2)))
Zeroes the upper 128 bits (bits 255:128) of all YMM registers.
__device__ double
__device__ int
__device__ float
static __inline__ vector bool char __ATTRS_o_ai vec_cmpeq(vector signed char __a, vector signed char __b)
Definition: altivec.h:1708
static __inline__ signed char __ATTRS_o_ai vec_extract(vector signed char __a, signed int __b)
Definition: altivec.h:13541
static __inline__ vector float __ATTRS_o_ai vec_ceil(vector float __a)
Definition: altivec.h:1659
static __inline__ int __ATTRS_o_ai vec_any_ngt(vector float __a, vector float __b)
Definition: altivec.h:17261
static __inline__ int __ATTRS_o_ai vec_any_ne(vector signed char __a, vector signed char __b)
Definition: altivec.h:17035
static __ATTRS_o_ai vector signed char vec_xl(ptrdiff_t __offset, const signed char *__ptr)
Definition: altivec.h:17724
static __inline__ int __ATTRS_o_ai vec_any_nge(vector float __a, vector float __b)
Definition: altivec.h:17243
static __inline__ vector signed char __ATTRS_o_ai vec_sldw(vector signed char __a, vector signed char __b, unsigned const int __c)
Definition: altivec.h:9301
static __inline__ vector float vector float vector float __c
Definition: altivec.h:4800
static __inline__ vector short __ATTRS_o_ai vec_mule(vector signed char __a, vector signed char __b)
Definition: altivec.h:6263
static __inline__ int __ATTRS_o_ai vec_any_le(vector signed char __a, vector signed char __b)
Definition: altivec.h:16640
static __inline__ vector float vector float __b
Definition: altivec.h:578
static __inline__ vector float __ATTRS_o_ai vec_round(vector float __a)
Definition: altivec.h:8469
#define vec_xld2
Definition: altivec.h:17714
#define vec_xlw4
Definition: altivec.h:17715
static __inline__ vector signed int __ATTRS_o_ai vec_subc(vector signed int __a, vector signed int __b)
Definition: altivec.h:12108
static __inline__ vector signed int __ATTRS_o_ai vec_addc(vector signed int __a, vector signed int __b)
Definition: altivec.h:585
static __inline__ int __ATTRS_o_ai vec_all_le(vector signed char __a, vector signed char __b)
Definition: altivec.h:15377
static __ATTRS_o_ai vector bool char vec_reve(vector bool char __a)
Definition: altivec.h:17528
static __inline__ vector signed char __ATTRS_o_ai vec_splats(signed char __a)
Definition: altivec.h:14737
static __inline__ vector bool char __ATTRS_o_ai vec_revb(vector bool char __a)
Definition: altivec.h:17598
static __inline__ int __ATTRS_o_ai vec_any_nan(vector float __a)
Definition: altivec.h:17020
static __inline__ int __ATTRS_o_ai vec_all_eq(vector signed char __a, vector signed char __b)
Definition: altivec.h:14802
static __inline__ vector signed char __ATTRS_o_ai vec_andc(vector signed char __a, vector signed char __b)
Definition: altivec.h:1235
static __inline__ vector signed int __ATTRS_o_ai vec_sld(vector signed int, vector signed int, unsigned const int __c)
Definition: altivec.h:9149
static __inline__ vector short __ATTRS_o_ai vec_unpackl(vector signed char __a)
Definition: altivec.h:12781
static __inline__ int __ATTRS_o_ai vec_all_ne(vector signed char __a, vector signed char __b)
Definition: altivec.h:15755
#define vec_xstd2
Definition: altivec.h:17992
static __inline__ vector signed int __ATTRS_o_ai vec_signed(vector float __a)
Definition: altivec.h:3495
static __inline__ vector signed char __ATTRS_o_ai vec_avg(vector signed char __a, vector signed char __b)
Definition: altivec.h:1586
static __ATTRS_o_ai void vec_xst(vector signed char __vec, ptrdiff_t __offset, signed char *__ptr)
Definition: altivec.h:17995
static __inline__ vector signed char __ATTRS_o_ai vec_splat_s8(signed char __a)
Definition: altivec.h:10320
static __inline__ int __ATTRS_o_ai vec_all_nan(vector float __a)
Definition: altivec.h:15739
static __inline__ vector signed char __ATTRS_o_ai vec_mergel(vector signed char __a, vector signed char __b)
Definition: altivec.h:5361
static __inline__ int __ATTRS_o_ai vec_all_ngt(vector float __a, vector float __b)
Definition: altivec.h:15981
static __inline__ vector float __ATTRS_o_ai vec_floor(vector float __a)
Definition: altivec.h:4026
static __inline__ int __ATTRS_o_ai vec_all_gt(vector signed char __a, vector signed char __b)
Definition: altivec.h:15190
static __inline__ vector int __ATTRS_o_ai vec_splat_s32(signed char __a)
Definition: altivec.h:10353
#define __ATTRS_o_ai
Definition: altivec.h:46
static __inline__ vector signed char __ATTRS_o_ai vec_promote(signed char __a, int __b)
Definition: altivec.h:14648
static __inline__ vector signed char __ATTRS_o_ai vec_perm(vector signed char __a, vector signed char __b, vector unsigned char __c)
Definition: altivec.h:7962
static __inline__ vector signed short __ATTRS_o_ai vec_mladd(vector signed short, vector signed short, vector signed short)
static __inline__ vector signed char __ATTRS_o_ai vec_sel(vector signed char __a, vector signed char __b, vector unsigned char __c)
Definition: altivec.h:8588
static __inline__ int __ATTRS_o_ai vec_any_numeric(vector float __a)
Definition: altivec.h:17315
static __inline__ vector float __ATTRS_o_ai vec_float(vector signed int __a)
Definition: altivec.h:3579
static __inline__ vector unsigned int __ATTRS_o_ai vec_splat_u32(signed char __a)
Definition: altivec.h:10384
static __inline__ vector signed char __ATTRS_o_ai vec_mergeh(vector signed char __a, vector signed char __b)
Definition: altivec.h:5091
static __inline__ vector signed char __ATTRS_o_ai vec_rl(vector signed char __a, vector unsigned char __b)
Definition: altivec.h:8287
static __inline__ vector bool char __ATTRS_o_ai vec_cmplt(vector signed char __a, vector signed char __b)
Definition: altivec.h:2435
static __inline__ vector unsigned int __ATTRS_o_ai vec_unsigned(vector float __a)
Definition: altivec.h:3537
static __inline__ vector float __ATTRS_o_ai vec_roundp(vector float __a)
Definition: altivec.h:1674
static __inline__ vector signed char __ATTRS_o_ai vec_max(vector signed char __a, vector signed char __b)
Definition: altivec.h:4838
static __inline__ int __ATTRS_o_ai vec_all_lt(vector signed char __a, vector signed char __b)
Definition: altivec.h:15558
static __inline__ int __ATTRS_o_ai vec_any_ge(vector signed char __a, vector signed char __b)
Definition: altivec.h:16260
#define vec_xstw4
Definition: altivec.h:17993
static __inline__ int __ATTRS_o_ai vec_all_numeric(vector float __a)
Definition: altivec.h:16036
static __inline__ vector signed char __ATTRS_o_ai vec_nor(vector signed char __a, vector signed char __b)
Definition: altivec.h:6729
static __inline__ vector bool char __ATTRS_o_ai vec_cmpge(vector signed char __a, vector signed char __b)
Definition: altivec.h:2243
static __inline__ vector signed char __ATTRS_o_ai vec_pack(vector signed short __a, vector signed short __b)
Definition: altivec.h:7389
static __inline__ vector unsigned char __ATTRS_o_ai vec_packsu(vector short __a, vector short __b)
Definition: altivec.h:7844
static __inline__ vector short __ATTRS_o_ai vec_mulo(vector signed char __a, vector signed char __b)
Definition: altivec.h:6409
static __inline__ int __ATTRS_o_ai vec_all_nge(vector float __a, vector float __b)
Definition: altivec.h:15963
static __inline__ vector signed char __ATTRS_o_ai vec_srl(vector signed char __a, vector unsigned char __b)
Definition: altivec.h:10619
static __inline__ vector signed char __ATTRS_o_ai vec_min(vector signed char __a, vector signed char __b)
Definition: altivec.h:5742
static __inline__ vector signed char __ATTRS_o_ai vec_splat(vector signed char __a, unsigned const int __b)
Definition: altivec.h:10090
static vector float __ATTRS_o_ai vec_nabs(vector float __a)
Definition: altivec.h:18264
static __inline__ vector short __ATTRS_o_ai vec_unpackh(vector signed char __a)
Definition: altivec.h:12642
static __inline__ vector short __ATTRS_o_ai vec_splat_s16(signed char __a)
Definition: altivec.h:10337
static __inline__ int __ATTRS_o_ai vec_any_nlt(vector float __a, vector float __b)
Definition: altivec.h:17297
static __inline__ vector signed char __ATTRS_o_ai vec_abs(vector signed char __a)
Definition: altivec.h:117
static __inline__ vector signed short __ATTRS_o_ai vec_madd(vector signed short __a, vector signed short __b, vector signed short __c)
Definition: altivec.h:4756
static __inline__ int __ATTRS_o_ai vec_any_lt(vector signed char __a, vector signed char __b)
Definition: altivec.h:16830
static __inline__ int __ATTRS_o_ai vec_all_ge(vector signed char __a, vector signed char __b)
Definition: altivec.h:15010
static __inline__ vector float __ATTRS_o_ai vec_roundm(vector float __a)
Definition: altivec.h:4041
static __inline__ int __ATTRS_o_ai vec_all_nle(vector float __a, vector float __b)
Definition: altivec.h:16000
static __inline__ vector float __ATTRS_o_ai vec_trunc(vector float __a)
Definition: altivec.h:12597
static __inline__ vector bool char __ATTRS_o_ai vec_cmpgt(vector signed char __a, vector signed char __b)
Definition: altivec.h:2131
static __inline__ vector signed char __ATTRS_o_ai vec_insert(signed char __a, vector signed char __b, int __c)
Definition: altivec.h:13668
static __inline__ vector signed char __ATTRS_o_ai vec_sll(vector signed char __a, vector unsigned char __b)
Definition: altivec.h:9524
static __inline__ int __ATTRS_o_ai vec_any_gt(vector signed char __a, vector signed char __b)
Definition: altivec.h:16450
static __inline__ vector bool char __ATTRS_o_ai vec_cmple(vector signed char __a, vector signed char __b)
Definition: altivec.h:2369
static __inline__ vector unsigned short __ATTRS_o_ai vec_splat_u16(signed char __a)
Definition: altivec.h:10376
static __inline__ int __ATTRS_o_ai vec_all_nlt(vector float __a, vector float __b)
Definition: altivec.h:16018
static __inline__ vector signed char __ATTRS_o_ai vec_packs(vector short __a, vector short __b)
Definition: altivec.h:7715
static __inline__ int __ATTRS_o_ai vec_any_eq(vector signed char __a, vector signed char __b)
Definition: altivec.h:16052
static __inline__ vector float __ATTRS_o_ai vec_roundz(vector float __a)
Definition: altivec.h:12612
static __inline__ int __ATTRS_o_ai vec_any_nle(vector float __a, vector float __b)
Definition: altivec.h:17279
static __inline__ vector float __ATTRS_o_ai vec_nmsub(vector float __a, vector float __b, vector float __c)
Definition: altivec.h:6699
static __inline__ vector unsigned char __ATTRS_o_ai vec_splat_u8(unsigned char __a)
Definition: altivec.h:10368
static __inline__ void int __a
Definition: emmintrin.h:4079
static __inline__ void unsigned int __value
Definition: movdirintrin.h:20
#define __conv
Definition: opencl-c.h:36