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